From 9dc350cbaf09635cf5a9cf49e5de5d3165c04f89 Mon Sep 17 00:00:00 2001 From: Amit Chaudhary Date: Wed, 8 May 2024 15:36:45 +0530 Subject: [PATCH] add shortcut to open shortcuts dialog --- src/mousam.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mousam.py b/src/mousam.py index e0ef4e8..dfe77fc 100644 --- a/src/mousam.py +++ b/src/mousam.py @@ -5,7 +5,7 @@ gi.require_version("Gtk", "4.0") gi.require_version("Adw", "1") -from gi.repository import Gtk, Adw, Gio +from gi.repository import Gtk, Adw, Gio,Gdk,GLib from gettext import gettext as _, pgettext as C_ @@ -67,7 +67,7 @@ def __init__(self, *args, **kwargs): self.header.pack_end(self.hamburger) # Create a menu button - self.location_button = Gtk.Button(label=_("Refresh")) + self.location_button = Gtk.Button(label=_("Location")) self.header.pack_end(self.location_button) self.location_button.set_icon_name("find-location-symbolic") self.location_button.connect("clicked", self._on_locations_clicked) @@ -384,3 +384,5 @@ def on_key_press(self, key_controller, keyval, keycode, state,*args): GLib.idle_add(self._on_locations_clicked) if keyval == Gdk.KEY_comma: GLib.idle_add(self._on_preferences_clicked) + if keyval == Gdk.KEY_question: + GLib.idle_add(self._show_shortcuts_dialog)