wxListBox::~wxListBox() { if (m_treeview) { GTKDisconnect(m_treeview); GtkTreeSelection* selection = gtk_tree_view_get_selection(m_treeview); if (selection) GTKDisconnect(selection); } Clear(); }
wxMiniFrame::~wxMiniFrame() { if (m_widget) { GtkWidget* eventbox = gtk_bin_get_child(GTK_BIN(m_widget)); GTKDisconnect(eventbox); } }
wxComboBox::~wxComboBox() { if (m_entry) { GTKDisconnect(m_entry); g_object_remove_weak_pointer(G_OBJECT(m_entry), (void**)&m_entry); } }
wxWebViewWebKit::~wxWebViewWebKit() { if (m_web_view) GTKDisconnect(m_web_view); if (m_dbusServer) g_dbus_server_stop(m_dbusServer); g_clear_object(&m_dbusServer); g_clear_object(&m_extension); }
wxNotebook::~wxNotebook() { // Ensure that we don't generate page changing events during the // destruction, this is unexpected and may reference the already (half) // destroyed parent window, for example. So make sure our switch_page // callback is not called from inside DeleteAllPages() by disconnecting all // the callbacks associated with this widget. GTKDisconnect(m_widget); DeleteAllPages(); }
wxRadioBox::~wxRadioBox() { wxRadioBoxButtonsInfoList::compatibility_iterator node = m_buttonsInfo.GetFirst(); while (node) { GtkWidget *button = GTK_WIDGET( node->GetData()->button ); GTKDisconnect(button); gtk_widget_destroy( button ); node = node->GetNext(); } WX_CLEAR_LIST( wxRadioBoxButtonsInfoList, m_buttonsInfo ); }
int wxMessageDialog::ShowModal() { WX_HOOK_MODAL_DIALOG(); // break the mouse capture as it would interfere with modal dialog (see // wxDialog::ShowModal) wxWindow * const win = wxWindow::GetCapture(); if ( win ) win->GTKReleaseMouseAndNotify(); if ( !m_widget ) { GTKCreateMsgDialog(); wxCHECK_MSG( m_widget, wxID_CANCEL, wxT("failed to create GtkMessageDialog") ); } // This should be necessary, but otherwise the // parent TLW will disappear.. if (m_parent) gtk_window_present( GTK_WINDOW(m_parent->m_widget) ); wxOpenModalDialogLocker modalLocker; gint result = gtk_dialog_run(GTK_DIALOG(m_widget)); GTKDisconnect(m_widget); gtk_widget_destroy(m_widget); g_object_unref(m_widget); m_widget = NULL; switch (result) { default: wxFAIL_MSG(wxT("unexpected GtkMessageDialog return code")); // fall through case GTK_RESPONSE_CANCEL: case GTK_RESPONSE_DELETE_EVENT: case GTK_RESPONSE_CLOSE: return wxID_CANCEL; case GTK_RESPONSE_OK: return wxID_OK; case GTK_RESPONSE_YES: return wxID_YES; case GTK_RESPONSE_NO: return wxID_NO; case GTK_RESPONSE_HELP: return wxID_HELP; } }
void wxNativeContainerWindow::OnNativeDestroyed() { // unfortunately we simply can't do anything else than leak memory here: // we really need to call _gdk_window_destroy(m_widget->win, TRUE) to // indicate that the native window was deleted, but we can't do this // because it's a private GDK function and calling normal // gdk_window_destroy() results in X errors while nulling just the window // pointer and destroying m_widget results in many GTK errors GTKDisconnect(m_widget); m_widget = NULL; // notice that we intentionally don't use Close() nor Delete() here as our // window (and the windows of all of our children) is invalid any more and // any attempts to use it, as may happen with the delayed destruction, will // result in GDK warnings at best and crashes or X errors at worst delete this; }
wxWebViewWebKit::~wxWebViewWebKit() { if (m_web_view) GTKDisconnect(m_web_view); }
wxComboBox::~wxComboBox() { if (m_entry) GTKDisconnect(m_entry); }
wxCheckBox::~wxCheckBox() { if (m_widgetCheckbox && m_widgetCheckbox != m_widget) GTKDisconnect(m_widgetCheckbox); }
wxSlider::~wxSlider() { if (m_scale && m_scale != m_widget) GTKDisconnect(m_scale); }
wxGtkFileCtrl::~wxGtkFileCtrl() { if (m_fcWidget) GTKDisconnect(m_fcWidget); }