[meld/deprecation-cleanup: 36/48] data: Move the shortcut dialog UI to resource loading
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/deprecation-cleanup: 36/48] data: Move the shortcut dialog UI to resource loading
- Date: Sun, 2 Dec 2018 02:45:09 +0000 (UTC)
commit 17e7642f34eda440e8bfcfb8463bc90a1ac6c5f8
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Dec 2 07:58:14 2018 +1000
data: Move the shortcut dialog UI to resource loading
We're using GTK+'s support for implicitly loading this from a well-known
name.
meld/meldwindow.py | 4 ----
data/ui/shortcuts.ui => meld/resources/gtk/help-overlay.ui | 2 +-
meld/resources/meld.gresource.xml | 1 +
3 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/meld/meldwindow.py b/meld/meldwindow.py
index a34b1e30..cc9c28b5 100644
--- a/meld/meldwindow.py
+++ b/meld/meldwindow.py
@@ -219,10 +219,6 @@ class MeldWindow(Gtk.ApplicationWindow):
rmenu = self.ui.get_widget('/Menubar/FileMenu/Recent').get_submenu()
rmenu.connect("map", self._on_recentmenu_map)
- builder = meld.ui.util.get_builder("shortcuts.ui")
- shortcut_window = builder.get_object("shortcuts-meld")
- self.set_help_overlay(shortcut_window)
-
def do_realize(self):
Gtk.ApplicationWindow.do_realize(self)
diff --git a/data/ui/shortcuts.ui b/meld/resources/gtk/help-overlay.ui
similarity index 99%
rename from data/ui/shortcuts.ui
rename to meld/resources/gtk/help-overlay.ui
index 2ed0e1d2..24175269 100644
--- a/data/ui/shortcuts.ui
+++ b/meld/resources/gtk/help-overlay.ui
@@ -2,7 +2,7 @@
<interface>
<!-- interface-requires gtk+ 3.17 -->
- <object class="GtkShortcutsWindow" id="shortcuts-meld">
+ <object class="GtkShortcutsWindow" id="help_overlay">
<property name="modal">True</property>
<child>
<object class="GtkShortcutsSection">
diff --git a/meld/resources/meld.gresource.xml b/meld/resources/meld.gresource.xml
index ca2a22ec..79e8dd07 100644
--- a/meld/resources/meld.gresource.xml
+++ b/meld/resources/meld.gresource.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/meld">
+ <file>gtk/help-overlay.ui</file>
<file>icons/16x16/actions/meld-change-apply-left.png</file>
<file>icons/16x16/actions/meld-change-apply-right.png</file>
<file>icons/16x16/actions/meld-change-copy.png</file>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]