menu button: avoid property order dependencies

With the code as written, use-popover has to be set first,
before the model. To avoid this ordering dependency, re-set
the model when use-popover changes.
This commit is contained in:
Matthias Clasen 2014-02-22 12:49:24 -05:00
parent ca35d1a4c4
commit 18749136da

View File

@ -1060,7 +1060,14 @@ gtk_menu_button_set_use_popover (GtkMenuButton *menu_button,
priv->use_popover = use_popover;
g_object_freeze_notify (G_OBJECT (menu_button));
if (priv->model)
gtk_menu_button_set_menu_model (menu_button, priv->model);
g_object_notify (G_OBJECT (menu_button), "use-popover");
g_object_thaw_notify (G_OBJECT (menu_button));
}
/**