Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Kaufmann <humitos@gmail.com>2012-03-20 17:57:33 (GMT)
committer Rafael Ortiz <rafael@activitycentral.com>2012-03-26 15:26:34 (GMT)
commitf88b809dfb7c8f237ab7735f50ec4b8546ac4471 (patch)
tree44eb15571680835f1e49080972d06bd1feb254c5
parent561635ba7450f3d5de786bb1d6298b4a26173d3d (diff)
Avoid Escape key disable fullscreen mode
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 Signed-off-by: Rafael Ortiz <rafael@activitycentral.com>
-rw-r--r--terminal.py5
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()