GNOME Bugzilla – Bug 682235
gtkmenubutton: repurpose set_menu for GMenuModel
Last modified: 2013-02-03 22:35:23 UTC
gtk_menu_button_set_menu takes a GtkMenu and gtk_menu_button_set_menu_model takes a GMenuModel. I think we should use the set_menu name for setting the menu model. It's the preferred (and encouraged) way to give the button a menu, so it should get the more obvious name. Also, setting the menu widget directly might be deprecated at some point, in which case we'll lose the "good name" forever.
Created attachment 221796 [details] [review] gtkmenubutton: repurpose set_menu for GMenuModel Use gtk_menu_button_set_menu for setting a GMenuModel instead of a GtkMenu on the button. Introduce set_gtk_menu for setting the menu widget directly. Setting the menu widget directly will be discouraged (or even deprecated) in the future. The most obvious name should be used for the common case of setting a menu model.
Plan: for today's release we'll introduce a new API (_set_popup()) and deprecate the _set_menu() API (so that people can move). It's far too close to the release to just rip it out. Later, we'll take out the _set_menu() API and rename _set_menu_model() to it.
Created attachment 221918 [details] [review] GtkMenuButton: rename _set_menu() to _set_popup() It's too close to the release so we'll keep _set_menu() around, but deprecate it, pointing to the new API. It will be removed (and the name reused) before the 3.6.0 release.
Review of attachment 221918 [details] [review]: Looks fine to me
Comment on attachment 221918 [details] [review] GtkMenuButton: rename _set_menu() to _set_popup() Attachment 221918 [details] pushed as 0244dc8 - GtkMenuButton: rename _set_menu() to _set_popup()