[gnome-characters: 1/2] Remove AppMenu
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-characters: 1/2] Remove AppMenu
- Date: Wed, 10 Oct 2018 20:16:16 +0000 (UTC)
commit edd6750771d29d040250f95311d83d4638b4a698
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Oct 10 12:15:05 2018 +1300
Remove AppMenu
https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement
data/app-menu.ui | 15 ---------------
data/menu.ui | 15 +++++++++++++++
data/meson.build | 1 -
data/org.gnome.Characters.data.gresource.xml | 1 -
po/POTFILES.in | 1 -
src/main.js | 10 +---------
6 files changed, 16 insertions(+), 27 deletions(-)
---
diff --git a/data/menu.ui b/data/menu.ui
index 34892e4..8955ece 100644
--- a/data/menu.ui
+++ b/data/menu.ui
@@ -46,6 +46,21 @@
</child>
</object>
</child>
+ <child>
+ <object class="GtkButton">
+ <property name="visible">True</property>
+ <property name="halign">start</property>
+ <property name="can_focus">False</property>
+ <property name="relief">none</property>
+ <property name="action_name">win.about</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="label" translatable="true">About Characters</property>
+ </object>
+ </child>
+ </object>
+ </child>
</object>
</child>
</template>
diff --git a/data/meson.build b/data/meson.build
index 3d73a06..bdb847f 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -17,7 +17,6 @@ resource_data = files(
'icons/hicolor/scalable/categories/characters-picture-symbolic.svg',
'icons/hicolor/scalable/categories/characters-punctuation-symbolic.svg',
'application.css',
- 'app-menu.ui',
'characterlist.ui',
'character.ui',
'mainview.ui',
diff --git a/data/org.gnome.Characters.data.gresource.xml b/data/org.gnome.Characters.data.gresource.xml
index 001be5d..6208af3 100644
--- a/data/org.gnome.Characters.data.gresource.xml
+++ b/data/org.gnome.Characters.data.gresource.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/Characters">
- <file preprocess="xml-stripblanks">app-menu.ui</file>
<file preprocess="xml-stripblanks">mainview.ui</file>
<file preprocess="xml-stripblanks">mainwindow.ui</file>
<file preprocess="xml-stripblanks">character.ui</file>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 11fde8e..1690b8e 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,5 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
-data/app-menu.ui
data/characterlist.ui
data/character.ui
data/mainview.ui
diff --git a/src/main.js b/src/main.js
index 57171e1..202e7a6 100644
--- a/src/main.js
+++ b/src/main.js
@@ -65,14 +65,6 @@ var MyApplication = GObject.registerClass({
window.show();
}
- _initAppMenu () {
- const builder = new Gtk.Builder();
- builder.add_from_resource('/org/gnome/Characters/app-menu.ui');
-
- const menu = builder.get_object('app-menu');
- this.set_app_menu(menu);
- }
-
vfunc_startup () {
super.vfunc_startup();
@@ -84,7 +76,7 @@ var MyApplication = GObject.registerClass({
{ name: 'search',
activate: this._onSearch,
parameter_type: new GLib.VariantType('as') }]);
- this._initAppMenu();
+ this.set_accels_for_action('app.quit', ['<Primary>q']);
settings = Util.getSettings('org.gnome.Characters',
'/org/gnome/Characters/');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]