After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735488 - Duplicate menu items when running in environments that don't show the app menu
Duplicate menu items when running in environments that don't show the app menu
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Main Toolbar
3.12.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-08-26 21:33 UTC by Michael Catanzaro
Modified: 2014-08-26 22:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
actions: remove unused GtkActions (10.12 KB, patch)
2014-08-26 22:06 UTC, Cosimo Cecchi
committed Details | Review
window-menus: don't special case no-app-menu anymore (4.29 KB, patch)
2014-08-26 22:06 UTC, Cosimo Cecchi
committed Details | Review
shell-ui: remove duplicate actions in gear menu for app menu (2.13 KB, patch)
2014-08-26 22:06 UTC, Cosimo Cecchi
committed Details | Review

Description Michael Catanzaro 2014-08-26 21:33:54 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)
Comment 1 Cosimo Cecchi 2014-08-26 21:37:26 UTC
Good catch; my preference goes to the first option, so that we can remove the code that handles specially that case in Nautilus.
Comment 2 Cosimo Cecchi 2014-08-26 22:06:39 UTC
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
Comment 3 Cosimo Cecchi 2014-08-26 22:06:43 UTC
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.
Comment 4 Cosimo Cecchi 2014-08-26 22:06:46 UTC
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.
Comment 5 Cosimo Cecchi 2014-08-26 22:06:50 UTC
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.