[gnome-boxes/drop-app-menu: 2/4] collection-toolbar: Prevent Gtk+ from creating app-menu
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/drop-app-menu: 2/4] collection-toolbar: Prevent Gtk+ from creating app-menu
- Date: Tue, 9 Oct 2018 15:42:36 +0000 (UTC)
commit e1c273c14f9efa40f8b6730c8c295dcfe2d0a6ba
Author: Felipe Borges <felipeborges gnome org>
Date: Tue Oct 9 17:30:20 2018 +0200
collection-toolbar: Prevent Gtk+ from creating app-menu
AppMenus are going away in GNOME 3.32. So far Boxes was relying on
Gtk+ to discover the "gtk/menus.ui" resource and create an appmenu
from it.
The deprecation strategy will add existing app-menus automatically
in the headerbar, in order to avoid introducing accessibility
regressions.
This way, we should prevent Boxes' current menu from being mistakenly
picked up by GtkApplication as a legacy appmenu. We can easily
achieve this by renaming the menu resource away from "gtk/menus.ui".
See the "Automatic resources" section in the GtkApplication
documentation for details of this behavior.
https://developer.gnome.org/gtk3/stable/GtkApplication.html
This is a complementary effort of the AppMenu retirement initiative.
https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement
Fixes #223
data/gnome-boxes.gresource.xml | 2 +-
src/collection-toolbar.vala | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/data/gnome-boxes.gresource.xml b/data/gnome-boxes.gresource.xml
index b52c0904..84086d4a 100644
--- a/data/gnome-boxes.gresource.xml
+++ b/data/gnome-boxes.gresource.xml
@@ -2,7 +2,7 @@
<gresources>
<gresource prefix="/org/gnome/Boxes">
<file>gtk-style.css</file>
- <file preprocess="xml-stripblanks" alias="gtk/menus.ui">ui/menus.ui</file>
+ <file preprocess="xml-stripblanks">ui/menus.ui</file>
<file>icons/boxes-arrow.svg</file>
<file>icons/boxes-create.png</file>
<file>icons/empty-boxes.png</file>
diff --git a/src/collection-toolbar.vala b/src/collection-toolbar.vala
index 76bcac4c..3e2d5b0e 100644
--- a/src/collection-toolbar.vala
+++ b/src/collection-toolbar.vala
@@ -43,7 +43,7 @@ public void setup_ui (AppWindow window) {
filter_switcher.setup_ui (window);
- var builder = new Builder.from_resource ("/org/gnome/Boxes/gtk/menus.ui");
+ var builder = new Builder.from_resource ("/org/gnome/Boxes/ui/menus.ui");
MenuModel menu = (MenuModel) builder.get_object ("app-menu");
hamburger_btn.popover = new Popover.from_model (hamburger_btn, menu);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]