[gtk+/wip/dboles/combobox-cleanup: 1/4] combobox: Drop a workaround from the list mode age



commit 665bd495b23dc4b4414a11f8bbe621f1c455c879
Author: Daniel Boles <dboles src gnome org>
Date:   Fri Jan 20 00:45:01 2017 +0000

    combobox: Drop a workaround from the list mode age
    
    Specifically, for handling a tear-off menu, which is no longer possible.

 gtk/gtkcombobox.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 6b91c87..abcdc1a 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -2092,15 +2092,8 @@ gtk_combo_box_menu_setup (GtkComboBox *combo_box)
 
   priv->popup_widget = menu;
 
-  /*
-   * Note that we connect to show/hide on the toplevel, not the
-   * menu itself, since the menu is not shown/hidden when it is
-   * popped up while torn-off.
-   */
-  g_signal_connect (GTK_MENU (menu)->priv->toplevel, "show",
-                    G_CALLBACK (gtk_combo_box_menu_show), combo_box);
-  g_signal_connect (GTK_MENU (menu)->priv->toplevel, "hide",
-                    G_CALLBACK (gtk_combo_box_menu_hide), combo_box);
+  g_signal_connect (menu, "show", G_CALLBACK (gtk_combo_box_menu_show), combo_box);
+  g_signal_connect (menu, "hide", G_CALLBACK (gtk_combo_box_menu_hide), combo_box);
 
   gtk_menu_attach_to_widget (GTK_MENU (menu),
                              GTK_WIDGET (combo_box),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]