diff options
Diffstat (limited to 'rpms/sugar/Sugar-Fix-globalkey-touchpad-corner-case.patch')
-rw-r--r-- | rpms/sugar/Sugar-Fix-globalkey-touchpad-corner-case.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/rpms/sugar/Sugar-Fix-globalkey-touchpad-corner-case.patch b/rpms/sugar/Sugar-Fix-globalkey-touchpad-corner-case.patch new file mode 100644 index 0000000..6d86f13 --- /dev/null +++ b/rpms/sugar/Sugar-Fix-globalkey-touchpad-corner-case.patch @@ -0,0 +1,50 @@ +From patchwork Wed Feb 16 21:15:12 2011 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [Sugar] Fix globalkey touchpad corner case +Date: Thu, 17 Feb 2011 02:15:12 -0000 +From: Martin Abente <martin.abente.lahaye@gmail.com> +X-Patchwork-Id: 674 +Message-Id: <1297890912-18522-1-git-send-email-martin.abente.lahaye@gmail.com> +To: dextrose@lists.sugarlabs.org, + anish@sugarlabs.org + +This patch is not intended for upstream. Is just a minimal +hack to fix a corner case, where the palette must be created +before the tray icon or global can toggle the touchpad mode. + +A serious fix could consist on moving the mode-switching +code from extensions/deviceicon/touchpad.py to a touchpad +module at src/jarabe/model. + +This model should provide a public mode_toggle method and +also emit proper signals when it occurs. This way different +pieces of sugar code will be able to interact with the touchpad +properly without repeating code all over. + +--- +extensions/deviceicon/touchpad.py | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/extensions/deviceicon/touchpad.py b/extensions/deviceicon/touchpad.py +index 357bdd6..366bf74 100644 +--- a/extensions/deviceicon/touchpad.py ++++ b/extensions/deviceicon/touchpad.py +@@ -52,13 +52,14 @@ class DeviceView(TrayIcon): + color = XoColor(client.get_string('/desktop/sugar/user/color')) + TrayIcon.__init__(self, icon_name=icon_name, xo_color=color) + ++ self._palette = ResourcePalette(_('My touchpad'), self.icon) ++ self._palette.set_group_id('frame') ++ + self.set_palette_invoker(FrameWidgetInvoker(self)) + self.connect('button-release-event', self.__button_release_event_cb) + + def create_palette(self): + """ On create, set the current mode. """ +- self._palette = ResourcePalette(_('My touchpad'), self.icon) +- self._palette.set_group_id('frame') + return self._palette + + def __button_release_event_cb(self, widget, event): |