[gedit/wip/redesign2] quickopen: add accelerator
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/redesign2] quickopen: add accelerator
- Date: Wed, 25 Dec 2013 22:04:15 +0000 (UTC)
commit 118f8ba108b5ebea31747ef87d914653a3a520b2
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Wed Dec 25 23:03:57 2013 +0100
quickopen: add accelerator
plugins/quickopen/quickopen/__init__.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/plugins/quickopen/quickopen/__init__.py b/plugins/quickopen/quickopen/__init__.py
index 17da4f1..d2d37b6 100644
--- a/plugins/quickopen/quickopen/__init__.py
+++ b/plugins/quickopen/quickopen/__init__.py
@@ -23,6 +23,18 @@ from gi.repository import GObject, Gio, GLib, Gtk, Gedit
from .virtualdirs import RecentDocumentsDirectory
from .virtualdirs import CurrentDocumentsDirectory
+class QuickOpenAppActivatable(GObject.Object, Gedit.AppActivatable):
+ app = GObject.property(type=Gedit.App)
+
+ def __init__(self):
+ GObject.Object.__init__(self)
+
+ def do_activate(self):
+ self.app.add_accelerator("<Primary><Alt>O", "win.quickopen", None)
+
+ def do_deactivate(self):
+ self.app.remove_accelerator("win.quickopen", None)
+
class QuickOpenPlugin(GObject.Object, Gedit.WindowActivatable):
__gtype_name__ = "QuickOpenPlugin"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]