GNOME Bugzilla – Bug 735488
Duplicate menu items when running in environments that don't show the app menu
Last modified: 2014-08-26 22:06:50 UTC
When the GtkSetting shell-shows-app-menu is FALSE, we show the app menu in the start of the header bar, but we also duplicate all the app menu items in the gear menu. It looks like we use gtk_application_window_set_show_menubar() in an attempt to prevent it from showing a menubar with the fallback app menu, but now that the fallback app menu has moved to the header bar, this doesn't work. I'm not really sure how we can trick GTK+ into not showing the fallback app menu in the header bar, except by not setting the app menu in the first place. I see two options: * Stop duplicating app menu items in the gear menu and accept that we show a fallback app menu in the headerbar. * Test with gtk_application_prefers_app_menu() before calling gtk_application_set_app_menu() so that we don't set an app menu at all. The disadvantage of the second option is that we won't be able to respond immediately to changes in the shell-shows-app-menu setting, like we currently do. See also bug #Bug 735487 (same issue for Epiphany)
Good catch; my preference goes to the first option, so that we can remove the code that handles specially that case in Nautilus.
The following fixes have been pushed: 56e6bb2 actions: remove unused GtkActions 7149021 window-menus: don't special case no-app-menu anymore 2bd2e4e shell-ui: remove duplicate actions in gear menu for app menu
Created attachment 284558 [details] [review] actions: remove unused GtkActions We can now remove all the GtkActions that were only used as a proxy towards the GAction, since we don't expose them anywhere in the UI. NAUTILUS_ACTION_EDIT_BOOKMARKS is still used for media keys, so keep it for now.
Created attachment 284559 [details] [review] window-menus: don't special case no-app-menu anymore We're relying on GTK+ showing the app menu in the header bar these days, so we don't need this special case anymore.
Created attachment 284560 [details] [review] shell-ui: remove duplicate actions in gear menu for app menu These days, GTK+ just shows an app menu on the headerbar.