GNOME Bugzilla – Bug 677927
(patch) Implement application menu
Last modified: 2012-07-21 14:05:23 UTC
Port Devhelp to use the new GtkApplication along with the application-level menu.
Assigning to myself, already have a branch for this.
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?
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.
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.
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.
Hum.. probably LIBDEVHELP_CURRENT=1 is enough for the bump, without renaming the library itself, right?
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.
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).
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...
(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
I'll work on making that change then.
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.
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.
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?