[kupfer] ui: Implement double-click on icons to activate
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer] ui: Implement double-click on icons to activate
- Date: Mon, 21 Mar 2011 14:23:37 +0000 (UTC)
commit 519852d9cfcb6a3fa0a8acdfa5b8a7ff539cd1c5
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Mon Mar 21 15:22:39 2011 +0100
ui: Implement double-click on icons to activate
Launchpad-bug: https://bugs.launchpad.net/kupfer/+bug/700948
kupfer/ui/browser.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/kupfer/ui/browser.py b/kupfer/ui/browser.py
index 0054dfa..68e7d67 100644
--- a/kupfer/ui/browser.py
+++ b/kupfer/ui/browser.py
@@ -935,6 +935,7 @@ class Interface (gobject.GObject):
# as well as window => panewidgets
for widget in (self.search, self.action, self.third):
widget.connect("activate", self._activate)
+ widget.connect("button-press-event", self._panewidget_button_press)
widget.connect("cursor-changed", self._selection_changed)
# window signals
window.connect("configure-event", widget._window_config)
@@ -1474,6 +1475,13 @@ class Interface (gobject.GObject):
wid = self._widget_for_pane(pane)
wid.set_object_stack(controller.get_object_stack(pane))
+ def _panewidget_button_press(self, widget, event):
+ " mouse clicked on a pane widget "
+ # activate on double-click
+ if event.type == gtk.gdk._2BUTTON_PRESS:
+ self.activate()
+ return True
+
def _selection_changed(self, widget, match):
pane = self._pane_for_widget(widget)
self.data_controller.select(pane, match)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]