[meld] meldwindow: Hook up the GtkShortcutWindow where possible
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] meldwindow: Hook up the GtkShortcutWindow where possible
- Date: Sat, 13 Feb 2016 20:23:00 +0000 (UTC)
commit 0039034eb8f67e27464dfb3c1bf05dc54dbc0698
Author: Kai Willadsen <kai willadsen gmail com>
Date: Thu Feb 11 06:52:30 2016 +1000
meldwindow: Hook up the GtkShortcutWindow where possible
meld/meldwindow.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/meld/meldwindow.py b/meld/meldwindow.py
index 49b77cb..6b3d488 100644
--- a/meld/meldwindow.py
+++ b/meld/meldwindow.py
@@ -21,6 +21,7 @@ from gi.repository import Gio
from gi.repository import GLib
from gi.repository import Gtk
+import meld.ui.util
from . import dirdiff
from . import filediff
from . import filemerge
@@ -259,6 +260,14 @@ class MeldWindow(gnomeglade.Component):
rmenu = self.ui.get_widget('/Menubar/FileMenu/Recent').get_submenu()
rmenu.connect("map", self._on_recentmenu_map)
+ try:
+ builder = meld.ui.util.get_builder("shortcuts.ui")
+ shortcut_window = builder.get_object("shortcuts-meld")
+ self.widget.set_help_overlay(shortcut_window)
+ except GLib.Error:
+ # GtkShortcutsWindow is new in GTK+ 3.20
+ pass
+
def _on_recentmenu_map(self, recentmenu):
for imagemenuitem in recentmenu.get_children():
imagemenuitem.set_tooltip_text(imagemenuitem.get_label())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]