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 677927 - (patch) Implement application menu
(patch) Implement application menu
Status: RESOLVED FIXED
Product: devhelp
Classification: Applications
Component: General
git master
Other Linux
: Normal enhancement
: ---
Assigned To: devhelp-maint
devhelp-maint
Depends on:
Blocks: 674957 678898
 
 
Reported: 2012-06-12 08:25 UTC by Aleksander Morgado
Modified: 2012-07-21 14:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot of devhelp with application menu, not running in gnome-shell (60.31 KB, image/png)
2012-06-29 07:03 UTC, Frederic Peters
Details

Description Aleksander Morgado 2012-06-12 08:25:49 UTC
Port Devhelp to use the new GtkApplication along with the application-level menu.
Comment 1 Aleksander Morgado 2012-06-12 08:26:30 UTC
Assigning to myself, already have a branch for this.
Comment 2 Aleksander Morgado 2012-06-12 11:02:50 UTC
I pushed a new branch named 'application-menu' to gnome git, which contains the port to use GtkApplication and the new application menu:

http://git.gnome.org/browse/devhelp/log/?h=application-menu

I think it works quite well, but I'm afraid this would need a bump in the library version, as I completely get rid of DhBase and convert it into a DhApp which inherits from GtkApplication.

Comments?
Comment 3 Frederic Peters 2012-06-12 12:48:24 UTC
Indeed, I looked at anjuta and it uses dh_base_get_book_manager, so it really needs to get its soname bumped; apart that it looks fine, I just added a gnome-3-4 branch, so master is ready for new developments.
Comment 4 Aleksander Morgado 2012-06-24 14:10:38 UTC
I'll need to rework a bit the branch I think, as we shouldn't be exposing all the GApplication-specific stuff in the libdevhelp library.
Comment 5 Aleksander Morgado 2012-06-24 14:46:28 UTC
fredp: Any suggestion for the soname bump? Should it be libdevhelp-4.la or better use libdevhelp-3.5.la and keep it until the next bump? I think I'll try to cleanup the library as much as possible, given the required bump.
Comment 6 Aleksander Morgado 2012-06-24 14:58:28 UTC
Hum.. probably LIBDEVHELP_CURRENT=1 is enough for the bump, without renaming the library itself, right?
Comment 7 Aleksander Morgado 2012-06-26 16:15:14 UTC
I just updated the 'application-menu' branch, and wrote a patch for Anjuta to support the latest changes in Devhelp, see bug 678898.

All ready for review again.
Comment 8 Frederic Peters 2012-06-29 07:03:15 UTC
Created attachment 217587 [details]
screenshot of devhelp with application menu, not running in gnome-shell

It works fine but the result in fallback mode doesn't look nice at all, at it gets two menubars; I don't know if it would be possible to combine them in that situation (I kind of remember apps with different menus in those situations, but can't find them at the moment).
Comment 9 Aleksander Morgado 2012-06-29 07:27:06 UTC
Oh, interesting, I never thought about the fallback mode. But I bet that your screenshot is actually the expected behaviour for a GtkApplication using GMenus in fallback mode...
Comment 10 Javier Jardón (IRC: jjardon) 2012-06-29 14:41:16 UTC
(In reply to comment #9)
> Oh, interesting, I never thought about the fallback mode. But I bet that your
> screenshot is actually the expected behaviour for a GtkApplication using GMenus
> in fallback mode...

Nope, the application menu and the menu bar should be in the same "row" in fallback mode.
Take a look to the screenshots here:
http://developer.gnome.org/gtk3/stable/GtkApplication.html
Comment 11 Aleksander Morgado 2012-07-02 14:09:54 UTC
I'll work on making that change then.
Comment 12 Aleksander Morgado 2012-07-06 13:36:56 UTC
Ok, so the 'application-menu' branch is again ready for review.

I converted the UI description file to GtkBuilder format, so now we only maintain one UI file instead of two separate ones. I also converted all the GtkActions in DhWindow into GActions. 

The window menu is now set with gtk_application_set_menubar() and in fallback mode it properly shows a first "Devhelp" menu item followed by the remaining items from the window menu.
Comment 13 Frederic Peters 2012-07-21 13:16:53 UTC
It works fine, excellent, thanks, go and merge it.

Therre's just a minor thing: when I close a window, I get 4 lines like this printed to stderr:

(devhelp:17927): GLib-GObject-WARNING **: gsignal.c:2576: instance `0xdee790' has no handler with id `4323'

However this doesn't seem to have any bad effect, so we'll live with them unless you fancy tracking it.
Comment 14 Aleksander Morgado 2012-07-21 14:05:23 UTC
Merged to git master now.

Regarding the warnings, I cannot see them in my setup... Can you open a new bug for those and give me exact glib/gtk versions being used?