[Sugar-devel] [PATCH 1/2] Avoid Escape key disable fullscreen mode

Rafael Ortiz rafael at activitycentral.com
Mon Mar 26 11:34:06 EDT 2012


On Tue, Mar 20, 2012 at 12:57 PM, Manuel Kaufmann <humitos at gmail.com> wrote:

> This commit disconnect the __key_press_cb callback used in
> sugar.graphics.window.Window to handle the Key Press event and connect a
> new
> __key_press_cb callback (inside TerminalActivity) to manage the Escape key
> properly and send this key to the vte module (Virtual Terminal)
>
> This solves ticket: #440
>  - http://bugs.sugarlabs.org/ticket/440
> ---
>  terminal.py |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/terminal.py b/terminal.py
> index 77001ea..aed612a 100644
> --- a/terminal.py
> +++ b/terminal.py
> @@ -53,6 +53,11 @@ class TerminalActivity(activity.Activity):
>     def __init__(self, handle):
>         activity.Activity.__init__(self, handle)
>
> +        # HACK to avoid Escape key disable fullscreen mode on Terminal
> Activity
> +        # This is related with http://bugs.sugarlabs.org/ticket/440
> +        self.disconnect_by_func(self._Window__key_press_cb)
> +        self.connect('key-press-event', self.__key_press_cb)
> +
>         self.max_participants = 1
>
>         toolbar_box = ToolbarBox()
> --
> 1.7.9.1
>
> Thanks applied as:

http://git.sugarlabs.org/terminal/mainline/commit/f88b809dfb7c8f237ab7735f50ec4b8546ac4471

Will be in next terminal version.


Cheers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120326/241ad90f/attachment.html>


More information about the Sugar-devel mailing list