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 757946 - Let GtkApplication load the appmenu
Let GtkApplication load the appmenu
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on: 757826
Blocks:
 
 
Reported: 2015-11-11 13:57 UTC by Felipe Borges
Modified: 2015-11-23 11:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
application: let GtkApplication load the appmenu (2.89 KB, patch)
2015-11-11 13:58 UTC, Felipe Borges
none Details | Review
application: let GtkApplication load the appmenu (14.65 KB, patch)
2015-11-11 15:14 UTC, Felipe Borges
none Details | Review
application: let GtkApplication load the appmenu (15.39 KB, patch)
2015-11-11 15:16 UTC, Felipe Borges
none Details | Review
application: let GtkApplication load the appmenu (2.68 KB, patch)
2015-11-23 10:32 UTC, Felipe Borges
committed Details | Review

Description Felipe Borges 2015-11-11 13:57:48 UTC
.
Comment 1 Felipe Borges 2015-11-11 13:58:08 UTC
Created attachment 315264 [details] [review]
application: let GtkApplication load the appmenu

Since bgo#757826 introduced g_application_set_resource_base_path,
we don't need to use a GtkBuilder to load the appmenu.

GtkApplication automatically loads menus from the GtkBuilder resource
located at "gtk/menus.ui", relative to the application's resource
base path (see g_application_set_resource_base_path ()). The menu
with the ID "app-menu" is taken as the application's app menu.
Comment 2 Carlos Soriano 2015-11-11 14:17:11 UTC
Thanks for the patch Felipe!

However, we didn't do it in the past because of consistency.

As you can see all of the ui files are in src. Then we have the /gtk directory for copy pasted files from gtk (which is not the case of the menus.ui).

So basically what I wanted for some time is a hierarchy like gedit. That means, a resources directory where you will have a /gtk subdirectory for the menus, shortcuts window, etc.
And then in src you will still have the /gtk subdirectory for copy pasted files from gtk+.

As it is now, I prefer to keep the consistency rather than making the hierarchy more confusing. So I would like to accept the patch when the transition to /resources is done.
Comment 3 Felipe Borges 2015-11-11 15:14:28 UTC
Created attachment 315272 [details] [review]
application: let GtkApplication load the appmenu

Since bgo#757826 introduced g_application_set_resource_base_path,
we don't need to use a GtkBuilder to load the appmenu.

GtkApplication automatically loads menus from the GtkBuilder resource
located at "gtk/menus.ui", relative to the application's resource
base path (see g_application_set_resource_base_path ()). The menu
with the ID "app-menu" is taken as the application's app menu.
Comment 4 Felipe Borges 2015-11-11 15:16:05 UTC
Created attachment 315273 [details] [review]
application: let GtkApplication load the appmenu

Since bgo#757826 introduced g_application_set_resource_base_path,
we don't need to use a GtkBuilder to load the appmenu.

GtkApplication automatically loads menus from the GtkBuilder resource
located at "gtk/menus.ui", relative to the application's resource
base path (see g_application_set_resource_base_path ()). The menu
with the ID "app-menu" is taken as the application's app menu.
Comment 5 Felipe Borges 2015-11-23 10:32:09 UTC
Created attachment 316083 [details] [review]
application: let GtkApplication load the appmenu

Since bgo#757826 introduced g_application_set_resource_base_path,
we don't need to use a GtkBuilder to load the appmenu.

GtkApplication automatically loads menus from the GtkBuilder resource
located at "gtk/menus.ui", relative to the application's resource
base path (see g_application_set_resource_base_path ()). The menu
with the ID "app-menu" is taken as the application's app menu.
Comment 6 Carlos Soriano 2015-11-23 10:39:09 UTC
Review of attachment 316083 [details] [review]:

LGTM thanks!