]> Pileus Git - ~andy/gtk/commitdiff
Fixed GtkComboBox to properly set tearoff state on delegate GtkTreeMenu.
authorTristan Van Berkom <tristan.van.berkom@gmail.com>
Thu, 30 Dec 2010 07:46:50 +0000 (16:46 +0900)
committerTristan Van Berkom <tristan.van.berkom@gmail.com>
Tue, 4 Jan 2011 14:37:13 +0000 (23:37 +0900)
This breakage was also the cause of not correctly positioning the child
menu over the selected item.

gtk/gtkcombobox.c

index 489c2b724a8a25657a0bf9413e5f2c39d367e0cb..1b480cfd9c748dca8a4d1da095e450f42fe4bc78 100644 (file)
@@ -4796,6 +4796,11 @@ gtk_combo_box_set_add_tearoffs (GtkComboBox *combo_box,
     {
       combo_box->priv->add_tearoffs = add_tearoffs;
       gtk_combo_box_check_appearance (combo_box);
+
+      if (GTK_IS_TREE_MENU (combo_box->priv->popup_widget))
+       _gtk_tree_menu_set_tearoff (GTK_TREE_MENU (combo_box->priv->popup_widget), 
+                                   combo_box->priv->add_tearoffs);
+
       g_object_notify (G_OBJECT (combo_box), "add-tearoffs");
     }
 }