Populate the app menu under GNOME 3

Reported by Allan Day on 2012-04-30
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Simple Scan
Medium
Unassigned

Bug Description

It is now possible to define an app menu under GNOME 3. A number of apps have already adopted these, and others are following suit. You can find out more about the ongoing effort to adopt app menus within GNOME here: https://live.gnome.org/GnomeGoals/PortToGMenu

It would be great if Simple Scan were consistent with other applications in providing an app menu.

Suggested app menu format (this will mean that you don't need a menu bar):

New Document
--
Document >
--
Preferences
--
Help
About Simple Scan
Quit

Document V

Save
Save As...
Email...
Print...

Related branches

lp:~moimael/simple-scan/remove-deprecated
Merged into lp:simple-scan at revision 670
Robert Ancell: Approve on 2013-11-24
moimael (community): Resubmit on 2013-11-24
Michael Nagel (nailor) on 2012-05-06
Changed in simple-scan:
status: New → Triaged
importance: Undecided → Medium
Allan Day (allanday) wrote :

Any progress with this? We're aiming to have applications ported by the release of 3.6 in September.

Michael Nagel (nailor) wrote :

I fear nobody is working on this right now...

moimael (moimael) wrote :

Here is a first attempt using recommended menu structure. But since this bug report is quite old, there are some new menu items.

Allan can you take a look and come up with an up to date design ?

I also removed some deprecated widgets like GtkVBox (GtkTable are still there) and bumped UI files to Gtk 3.10

Thanks !

moimael (moimael) wrote :

Updated patch which re-add accidentally dropped dropdown menu for GtkMenuToolButton "Scan" and remove entirely Document menuitem, since all functionalities are available from elsewhere.

moimael (moimael) wrote :

Updated patch which completely remove menubar !

It is much nicer now.

I think an updated design with GtkHeaderBar could be awesome (if any gnome designer hears me :) )

moimael (moimael) wrote :
moimael (moimael) wrote :

Are you interested in this patch ? To know if I should continue improving it ?

Robert Ancell (robert-ancell) wrote :

Hi moimael,

Yes, interested in this patch. Could you please convert it to a merge proposal? Then it's easier to review and apply.

To do this:
$ bzr branch lp:simple-scan
$ cd simple-scan
(make changes)
$ bzr commit
$ bzr push lp:~moimael/simple-scan/app-menu
Then go to https://code.launchpad.net/~moimael/simple-scan/app-menu and select "Propose for merging"

Robert Ancell (robert-ancell) wrote :

A quick look at the patch shows some things that make it hard to review:
- Code that's been quoted out - this should be removed if it's no longer required
- Lots of unrelated (?) changes in the .ui file - has it been reordered?
- Unrelated changes to the names of callback functions
- Unrelated changes to class types

Patches should just contain the minimum changes required to implement the feature.

If there are other changes you think should be applied these should be done as separate merge proposals.

Thanks!

Robert Ancell (robert-ancell) wrote :

Also, since Simple Scan is used on other desktops that don't necessarily have support for application menus / header bars it needs to be able to fall back to using traditional menus in these cases like gedit and others do.

moimael (moimael) wrote :

Yes I completely understand that. Initial patch was more of a proof of concept and UI experiment. Do you agree with removing the menubar ? At least under gnome shell ?

I'll investigate on how the fallback is done on gedit.

Quoted out code was code I still haven't ported to new UI.

The changes in UI file might be related to latest glade release and also removing menubar.

For callback function name change, I wasn't sure, just followed convention on other gnome apps, but I agree I should keep the name as they were.

So I will come up with simplier merge proposal and less invasive changes. Thanks !

Robert Ancell (robert-ancell) wrote :

Yes, agree with removing the menubar under GNOME shell.

moimael (moimael) wrote :

Just made a push request to first clean up deprecated item before starting to work on cleaner appmenu patches. Feedback appreciated ;)

moimael (moimael) wrote :

I changed the required Gtk release to 3.8 after seeing that next ubuntu will be based on it.

moimael (moimael) wrote :

A new branch wait for merge. I tested it under gnome-shell and unity.

App menu is shown under gnome shell but the menubar is not.

Under Unity menubar is shown while app menu is not.

I had to (sort of) duplicate some code related to callback since app menu and menubar doesn't take the same parameters. I'm not sure it's the best solution, I'd like to hear your thought about this.

Thanks !

moimael (moimael) wrote :

By the way, I just noticed that the horizontal scrollbar is completely screwed up due to not setting the GtkBox orientation. Here is a trivial fix attached. You might want to apply it before the app-menu branch.

Changed in simple-scan:
status: Triaged → Fix Committed
Changed in simple-scan:
milestone: none → 3.11.4
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers