void generic_bcache::remove_binding(in_addr_t hoa, in_addr_t ha, in_addr_t coa) { if (bindings_.find(hoa) == bindings_.end()) { deregister_callback(hoa, ha, coa); return; } deregister_callback(hoa, bindings_[hoa].ha, bindings_[hoa].coa); return_home_callback(hoa); bindings_.erase(hoa); }
void selection_properties_t::on_app_activate(bool b_activated) { if (b_activated) { if (GetFocus() != get_wnd()) register_callback(); } else { deregister_callback(); } }
void selection_properties_t::notify_on_destroy() { g_windows.remove_item(this); if (g_windows.get_count() == 0) g_message_window.destroy(); static_api_ptr_t<play_callback_manager>()->unregister_callback(this); static_api_ptr_t<metadb_io_v3>()->unregister_callback(this); deregister_callback(); m_handles.remove_all(); m_selection_handles.remove_all(); m_edit_handles.remove_all(); m_selection_holder.release(); }
binding *generic_bcache::add_binding(in_addr_t hoa, in_addr_t ha, in_addr_t coa) { binding *ret; if (bindings_.find(hoa) == bindings_.end()) { register_callback(hoa, ha, coa); leave_home_callback(hoa); ret = &bindings_[hoa]; } else { ret = &bindings_[hoa]; if(ret->coa != coa || ret->ha != ret->ha) { deregister_callback(hoa, ret->ha, ret->coa); register_callback(hoa, ha, coa); } else { update_callback(hoa); } } return ret; }
void selection_properties_t::notify_on_set_focus(HWND wnd_lost) { deregister_callback(); m_selection_holder = static_api_ptr_t<ui_selection_manager>()->acquire(); m_selection_holder->set_selection(m_handles); }