X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/86b65467096ed1cd7c8b914bc64db6680fddafc9..0a7ce61e65c6fffcc8ab1649ab29c08d90e13fdb:/src/gtk/combobox.cpp diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index 8dc1c7a820..00792deb14 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -45,8 +45,6 @@ extern "C" { static void gtkcombo_text_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo ) { - if (g_isIdle) wxapp_install_idle_handler(); - if (combo->m_ignoreNextUpdate) { combo->m_ignoreNextUpdate = false; @@ -118,8 +116,6 @@ extern "C" { static void gtkcombo_combo_select_child_callback( GtkList *WXUNUSED(list), GtkWidget *WXUNUSED(widget), wxComboBox *combo ) { - if (g_isIdle) wxapp_install_idle_handler(); - if (!combo->m_hasVMT) return; if (g_blockEventsOnDrag) return; @@ -171,8 +167,6 @@ extern "C" { static void gtkcombobox_text_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo ) { - if (g_isIdle) wxapp_install_idle_handler(); - if (!combo->m_hasVMT) return; wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() ); @@ -186,8 +180,6 @@ extern "C" { static void gtkcombobox_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo ) { - if (g_isIdle) wxapp_install_idle_handler(); - if (!combo->m_hasVMT) return; if (combo->GetSelection() == -1) @@ -250,8 +242,6 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value, const wxString& name ) { m_ignoreNextUpdate = false; - m_needParent = true; - m_acceptsFocus = true; m_prevSelection = 0; if (!PreCreation( parent, pos, size ) || @@ -349,7 +339,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value, g_signal_connect_after (m_widget, "changed", G_CALLBACK (gtkcombobox_changed_callback), this); - + } else #endif @@ -435,9 +425,9 @@ int wxComboBox::DoAppend( const wxString &item ) GtkRcStyle *style = CreateWidgetStyle(); if (style) { - gtk_widget_modify_style( GTK_WIDGET( list_item ), style ); + gtk_widget_modify_style(list_item, style); GtkBin *bin = GTK_BIN( list_item ); - GtkWidget *label = GTK_WIDGET( bin->child ); + GtkWidget *label = bin->child; gtk_widget_modify_style( label, style ); gtk_rc_style_unref( style ); } @@ -956,7 +946,10 @@ void wxComboBox::SetValue( const wxString& value ) wxString tmp; if (!value.IsNull()) tmp = value; + + DisableEvents(); gtk_entry_set_text( entry, wxGTK_CONV( tmp ) ); + EnableEvents(); InvalidateBestSize(); }