Commit 0039034e authored by Kai Willadsen's avatar Kai Willadsen

meldwindow: Hook up the GtkShortcutWindow where possible

parent 290cb87d
......@@ -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())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment