[gnome-characters/bilelmoussaoui/gtk4: 22/71] shortcuts: use gtk's automatic way for loading it
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-characters/bilelmoussaoui/gtk4: 22/71] shortcuts: use gtk's automatic way for loading it
- Date: Thu, 25 Nov 2021 11:03:10 +0000 (UTC)
commit 2e046c34692644130b8d0c9a60dc921adb415d6f
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Sat Nov 20 18:02:50 2021 +0100
shortcuts: use gtk's automatic way for loading it
data/org.gnome.Characters.data.gresource.xml | 2 +-
data/shortcuts.ui | 8 +-------
src/window.js | 4 ----
3 files changed, 2 insertions(+), 12 deletions(-)
---
diff --git a/data/org.gnome.Characters.data.gresource.xml b/data/org.gnome.Characters.data.gresource.xml
index 5564d15..a219f7f 100644
--- a/data/org.gnome.Characters.data.gresource.xml
+++ b/data/org.gnome.Characters.data.gresource.xml
@@ -5,7 +5,7 @@
<file preprocess="xml-stripblanks">mainwindow.ui</file>
<file preprocess="xml-stripblanks">character.ui</file>
<file preprocess="xml-stripblanks">characterlist.ui</file>
- <file preprocess="xml-stripblanks">shortcuts.ui</file>
+ <file preprocess="xml-stripblanks" alias="gtk/help-overlay.ui">shortcuts.ui</file>
<file preprocess="xml-stripblanks">menu.ui</file>
<file preprocess="xml-stripblanks">sidebar.ui</file>
<file>style.css</file>
diff --git a/data/shortcuts.ui b/data/shortcuts.ui
index 3ca64c7..adb19a8 100644
--- a/data/shortcuts.ui
+++ b/data/shortcuts.ui
@@ -1,40 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <object class="GtkShortcutsWindow" id="shortcuts">
+ <object class="GtkShortcutsWindow" id="help_overlay">
<property name="modal">True</property>
<child>
<object class="GtkShortcutsSection">
- <property name="visible">1</property>
<property name="section-name">shortcuts</property>
<property name="max-height">10</property>
<child>
<object class="GtkShortcutsGroup">
- <property name="visible">1</property>
<property name="title" translatable="yes" context="shortcut window">General</property>
<child>
<object class="GtkShortcutsShortcut">
- <property name="visible">1</property>
<property name="accelerator">F10</property>
<property name="title" translatable="yes" context="shortcut window">Open menu</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
- <property name="visible">1</property>
<property name="accelerator"><ctrl>F</property>
<property name="title" translatable="yes" context="shortcut window">Search</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
- <property name="visible">1</property>
<property name="accelerator"><ctrl>question</property>
<property name="title" translatable="yes" context="shortcut window">Keyboard
shortcuts</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
- <property name="visible">1</property>
<property name="accelerator"><ctrl>Q</property>
<property name="title" translatable="yes" context="shortcut window">Quit</property>
</object>
diff --git a/src/window.js b/src/window.js
index 8afe14b..fee77cf 100644
--- a/src/window.js
+++ b/src/window.js
@@ -102,10 +102,6 @@ var MainWindow = GObject.registerClass({
this._mainView = new MainView(this._sidebar);
this._container.append(this._mainView);
-
- let builder = Gtk.Builder.new_from_resource('/org/gnome/Characters/shortcuts.ui');
- let helpOverlay = builder.get_object("shortcuts");
- this.set_help_overlay(helpOverlay);
// Due to limitations of gobject-introspection wrt GdkEvent
// and GdkEventKey, this needs to be a signal handler
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]