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 735487 - 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: epiphany
Classification: Core
Component: Interface
3.12.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks: 739638 755524
 
 
Reported: 2014-08-26 21:31 UTC by Michael Catanzaro
Modified: 2016-09-11 03:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot 1 (126.37 KB, image/png)
2014-08-26 21:31 UTC, Michael Catanzaro
  Details
screenshot 1 for real (137.87 KB, image/png)
2014-08-26 21:32 UTC, Michael Catanzaro
  Details
Stop duplicating items between menus (4.91 KB, patch)
2014-08-27 19:05 UTC, Michael Catanzaro
needs-work Details | Review

Description Michael Catanzaro 2014-08-26 21:31:33 UTC
Created attachment 284554 [details]
screenshot 1

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.
Comment 1 Michael Catanzaro 2014-08-26 21:32:12 UTC
Created attachment 284555 [details]
screenshot 1 for real
Comment 2 Michael Catanzaro 2014-08-26 21:32:47 UTC
No screenshot two; it seems to be not possible to take a screenshot of the hamburger menu.
Comment 3 Michael Catanzaro 2014-08-26 22:39:52 UTC
(In reply to comment #0)
> * Stop duplicating app menu items in the gear menu and accept that we show a
> fallback app menu in the headerbar.

This is what we're doing for nautilus.
Comment 4 Michael Catanzaro 2014-08-27 19:05:47 UTC
Created attachment 284630 [details] [review]
Stop duplicating items between menus

Nowadays the app menu is shown in the header bar, so we don't want to
put these items in the window menu anymore.

Reducing the size of this menu also prepares us for using a popover
menu.

This patch should be applied after the patch in bug #735540.
Comment 5 Jan-Michael Brummer 2015-04-03 19:32:22 UTC
Note: The above patch removes the short cut handling for incognito mode (ctrl+shift+n) due to removal of incognito menu item in pagepopup.
Comment 6 Michael Catanzaro 2015-04-03 21:17:29 UTC
Review of attachment 284630 [details] [review]:

Needs to not remove the shortcut
Comment 7 Michael Catanzaro 2015-04-03 21:54:40 UTC
TBH, I have no clue why it broke exactly one shortcut. Seems like either the shortcuts should all still work, or all be broken. Anyway, GtkAction and GtkUIManager are both deprecated; I've only seen them used in Epiphany and Nautilus (which no longer uses them) and I clearly don't understand how to use them properly. I will try to switch us to use GAction instead, which has a dramatically easier API. The minor problem is we need new API in WebKitGTK+ for this, to handle context menus. I don't plan to work on this in the near future, so for the time being I'll drop the patch from the Fedora build, since it only matters for people using Epiphany outside of GNOME, which should be a small minority of users.