[Pkg-sugar-commit] [sugar-toolkit-gtk3] 36/37: Replace signal used in UnfullscreenButton to enable use with touch - SL #3798
Jonas Smedegaard
dr at jones.dk
Sat Apr 18 17:19:58 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag v0.96.5
in repository sugar-toolkit-gtk3.
commit 378f1fed14425ce2e19b55e6fc4e026382eaff58
Author: Gonzalo Odiard <godiard at gmail.com>
Date: Thu Aug 9 13:09:31 2012 -0300
Replace signal used in UnfullscreenButton to enable use with touch - SL #3798
Use clicked instead of button-pressed-event, because button-pressed-event
and the button-release-event are not emitted on a touchscreen device by
a touch in GTK+ 3.
Signed-off-by: Gonzalo Odiard <gonzalo at laptop.org>
Acked-by: Manuel Quiñones <manuq at laptop.org>
Acked-by: Simon Schampijer <simon at laptop.org>
---
src/sugar3/graphics/window.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/sugar3/graphics/window.py b/src/sugar3/graphics/window.py
index 2d9764d..23a8d4f 100644
--- a/src/sugar3/graphics/window.py
+++ b/src/sugar3/graphics/window.py
@@ -65,8 +65,8 @@ class UnfullscreenButton(Gtk.Window):
self._button.show()
self.add(self._button)
- def connect_button_press(self, cb):
- self._button.connect('button-press-event', cb)
+ def connect_button_clicked(self, cb):
+ self._button.connect('clicked', cb)
def _reposition(self):
x = Gdk.Screen.width() - self._width
@@ -114,8 +114,8 @@ class Window(Gtk.Window):
self._is_fullscreen = False
self._unfullscreen_button = UnfullscreenButton()
self._unfullscreen_button.set_transient_for(self)
- self._unfullscreen_button.connect_button_press(
- self.__unfullscreen_button_pressed)
+ self._unfullscreen_button.connect_button_clicked(
+ self.__unfullscreen_button_clicked)
self._unfullscreen_button_timeout_id = None
def reveal(self):
@@ -253,7 +253,7 @@ class Window(Gtk.Window):
return True
return False
- def __unfullscreen_button_pressed(self, widget, event):
+ def __unfullscreen_button_clicked(self, button):
self.unfullscreen()
def __motion_notify_cb(self, widget, event):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sugar/sugar-toolkit-gtk3.git
More information about the pkg-sugar-commit
mailing list