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 674937 - Provide an app menu
Provide an app menu
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
: 693962 701485 (view as bug list)
Depends on:
Blocks: 674957
 
 
Reported: 2012-04-27 11:51 UTC by Allan Day
Modified: 2013-06-03 02:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Allan Day 2012-04-27 11:51:17 UTC
See - https://live.gnome.org/GnomeGoals/PortToGMenu

Recommended app menu format:

Toolbar
--
Help
About Document Viewer
Quit


'Save Current Settings as Default' seems like something that belongs in the app menu, except that it's really confusing. I honestly have no idea what it means.

Likewise, ✓ Toolbar and ✓ Side bar seem like they should go in the app menu, but they don't seem to have a permanent effect. Bit weird...
Comment 1 José Aliste 2012-04-27 12:17:10 UTC
Allan, all of the settings are document-wise. There is a default for new documents, and saving the settings of the current document to be the default is what the save current setting as default does. So, I don't really think that any of this belong to the App Menu. All of this is because maintainers have tried hard to not to have a preferences dialog in Evince.
Comment 2 Allan Day 2012-04-27 12:59:14 UTC
OK, that's cool. Toolbar is application-wide though, right?

Help, About and Quit would be good for consistency with other apps.
Comment 3 Christian Persch 2012-04-27 16:18:41 UTC
We've always rejected 'quit' so far (bug 305305), and I don't think we should add it now either.
Comment 4 Carlos Garcia Campos 2012-05-02 16:53:47 UTC
I think the menu support in GTK only works for GtkApplicationWindow. We don't use either GtkApplication nor GtkApplicationWindow.
Comment 5 Christian Persch 2012-05-02 17:13:36 UTC
Yes. However in gtk master it's easy to just replace

gtk_main()

with

app = gtk_application_new (NULL, GTK_APPLICATION_NON_UNIQUE);
gtk_application_run()

and make EvWindow inherit from GtkApplicationWindow instead of GtkWindow.

There's a problem with gmenu not supporting context menus (yet?) so we'd have to keep using 2 different menu technologies for the app menu / menubar and the context menu... ugly :-(
Comment 6 Florian Müllner 2012-05-08 12:49:39 UTC
(In reply to comment #5)
> There's a problem with gmenu not supporting context menus (yet?) so we'd have
> to keep using 2 different menu technologies for the app menu / menubar and the
> context menu... ugly :-(

It is possible to use gtk_menu_new_from_model() for popup menus.
Comment 7 Christian Persch 2012-06-12 20:10:44 UTC
This is working on the "wip/app" branch; I just added a rudimentary app menu, since it wasn't clear exactly which items should be in it and which not.
Comment 8 Christian Persch 2012-06-23 15:13:51 UTC
I should note that the branch contains quite a bit more than just the straigt g[tk]application port and adding an app menu; I've gone a bit overboard maybe on general cleanup first and then also porting to GResource :-) It would be a bit hard to separate the follow-up cleanup from the gapplication/app menu stuff, but they're all in self-contained commits of course to ease review, testing and bisectability.

Also I ported to gdbus-codegen first because IMHO it makes the code simpler and more easy to follow, even if the extra objects required look a bit odd. And it fits better into the GApplication DBus hooks setup to do it with extra objects.

The patch set is lightly tested (ie running with it for a bit, trying to open multiple new docs etc), and all bugs encountered by that were fixed. There could of course still be others lurking ;-)

I'd like also to add that I, too, am not very convinced about app menus in general, so this patch set makes *no effort at all* to remove *any* menu items or the whole menus from evince (and I *don't* think we should do that in the future, either!); and it only exposes a minimal set (Print, About, Help, Close window) from the app menu for now.
Comment 9 Carlos Garcia Campos 2012-06-24 14:36:41 UTC
I've merged into master all commits except the GtkApplication and app menu bar ones. I'm still not sure we want it. I think it's very weird having some options in the window menubar and some others in the shell panel, maybe it makes sense for other applications, but not for evince, IMO. Maybe Help and About can be in the shell panel, but all other options belong to the instance window. It also breaks all users of focus follows mouse option of the window manager.
Comment 10 Allan Day 2012-06-25 08:24:25 UTC
(In reply to comment #9)
> I've merged into master all commits except the GtkApplication and app menu bar
> ones. I'm still not sure we want it. I think it's very weird having some
> options in the window menubar and some others in the shell panel, maybe it
> makes sense for other applications, but not for evince, IMO. Maybe Help and
> About can be in the shell panel, but all other options belong to the instance
> window. It also breaks all users of focus follows mouse option of the window
> manager.

I'd say that Help, About and Quit are the bare minimum for the app menu. There's a push this cycle to make sure that applications have this set of entries in their app menus; it's important for applications to be consistent in this regard.
Comment 11 Carlos Garcia Campos 2012-06-25 09:58:56 UTC
I agree on being consistent with other apps as long as it doesn't break valid use cases like focus follows mouse window manager setting, for example. Evince doesn't have a Quit action, and I'm not sure we want it either. I woulnd't mind if Help and About are in the shell panel since they are common to all window instances, but I think this should only happen when the window is maximized, otherwise those options are impossible to reach for focus follows mouse users.
Comment 12 Florian Müllner 2012-06-25 10:44:07 UTC
(In reply to comment #11)
> otherwise those options are impossible to reach for focus follows mouse users.

This is a Shell bug that will be fixed, not a reason for applications to add inconsistent hacks to work around the issue.
Comment 13 Carlos Garcia Campos 2012-06-25 11:06:45 UTC
we haven't added any hack, we simply don't provide an app menu for now.
Comment 14 Allan Day 2012-06-25 11:36:04 UTC
(In reply to comment #11)
> I agree on being consistent with other apps ...

So be consistent. What you're proposing would make Evince different to *every* other app. That's inevitably going to cause confusion. People will get used to these entries being in the app menu. They will expect to find them there.

> ... but I think this should only happen when the window is maximized,
> otherwise those options are impossible to reach for focus follows mouse users.

That is such a bad idea... it breaks pretty much every usability rule in the book. It's not just inconsistent between apps, but also inconsistent within Evince. You'd be breaking the experience for everyone, since you'd be making them uncertain about what should be universal patterns.

As a matter of fact, we've been working on a solution for focus follows mouse - it's a bug for the whole of GNOME, so please don't try and fix it in *one* app.
Comment 15 Florian Müllner 2012-06-25 11:39:26 UTC
(In reply to comment #13)
> we haven't added any hack, we simply don't provide an app menu for now.

Right, but I was referring to the consideration of disabling the app menu for non-maximized windows.
Comment 16 Carlos Garcia Campos 2012-06-25 12:07:24 UTC
(In reply to comment #15)
> (In reply to comment #13)
> > we haven't added any hack, we simply don't provide an app menu for now.
> 
> Right, but I was referring to the consideration of disabling the app menu for
> non-maximized windows.

ah, ok, I think adding a small delay in app menu change is indeed a good idea, so I'm looking forward to seeing that patch merged into gnome-shell.
Comment 17 Christian Persch 2012-06-25 12:13:16 UTC
(I need to rebase the branch after all that cherry-picking; I'll do that when I have a bit of time, soon.)
Comment 18 Christian Persch 2012-06-29 10:11:52 UTC
Branch has been rebased.
Comment 19 Carlos Garcia Campos 2012-08-07 17:11:55 UTC
I've merged most of the branch, but not the app menu commits, because I'm still not convinced it's a good idea for Evince. The only action I would add to the app menu is help, and I'm not sure it's worth the effort just for the help. About dialog is attached to a particular window, it's very weird using a global action that shows a dialog attached to a "random" window. Which one is the "active" window?
Comment 20 Carlos Garcia Campos 2012-08-14 16:16:17 UTC
I wouldn't mind if the app menu thing is implemented, if only Help is in the app menu. But instead of using a (so complex) ui manager adapter, help could be a global action implemented in EvApplication (ev_application_show_help() or something like that). then both GtkActions in EvWindow and GAction in the app menu would simply call ev_application_show_help().
Comment 21 Christian Persch 2012-09-05 15:32:49 UTC
Rebased and reworked the branch.
Comment 22 Magnus 2012-09-20 02:36:10 UTC
Please implement a fallback menu that makes sense for those who don't use GNOME Shell. The default fallback app menu is an usability disaster. It shouldn't be on ANY application.
Comment 23 Christian Persch 2012-09-20 11:08:41 UTC
Maybe you should look at what the branch actually does? It only *adds* an app menu; no regular menus were removed. And the app menu is only installed when the shell is running; no ugly fallbacks.
Comment 24 Magnus 2012-09-21 01:32:21 UTC
Sorry, I can't understand very well the code. But if the ugly fallback doesn't appear, then it's fine. I was asking because some apps already have the ugly fallback.
Comment 25 Christian Persch 2012-10-01 12:41:38 UTC
Pushed to master.

We decided to keep the previewer appmenu-less; the existing patch kept on the wip/app branch for reference.
Comment 26 Germán Poo-Caamaño 2013-02-16 21:23:29 UTC
*** Bug 693962 has been marked as a duplicate of this bug. ***
Comment 27 Justin 2013-02-17 07:00:20 UTC
>We've always rejected 'quit' so far (bug 305305), and I don't think we should
add it now either.

That bug is from 2005!!!. Even after 8 long years (Gnome changes, technology changes, usability changes, UI changes) and after so many duplicate bugs you don't feel the need to rethink that position?

>About dialog is attached to a particular window

The about dialogue shows the evince version, poppler backend version, licensing and credits. Which of that is window specific? 

May be you are confusing with the properties window?
Comment 28 Carlos Garcia Campos 2013-02-17 10:35:13 UTC
(In reply to comment #27)
> >About dialog is attached to a particular window
> 
> The about dialogue shows the evince version, poppler backend version, licensing
> and credits. Which of that is window specific? 

Yes, the concept is global and makes sense in the global app menu, but it's implemented as a modal dialog attached to a particular evince window.

> May be you are confusing with the properties window?

No
Comment 29 Justin 2013-02-18 12:56:16 UTC
(In reply to comment #28)
> .....but it's implemented as a modal dialog attached to a particular evince window.

Most of the gnome applications (nautilus, epiphany, gnome-documents,...) has about dialogue attached to specific windows. And all of them has about dialogue in the app menu.
Comment 30 Germán Poo-Caamaño 2013-06-03 02:05:49 UTC
*** Bug 701485 has been marked as a duplicate of this bug. ***