Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
This commit is contained in:
commit
4853f68eaa
12
README
12
README
@ -15,17 +15,17 @@ SUGAR_PROFILE=profile-2 sugar
|
|||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
Key bindings
|
Emulator key bindings
|
||||||
============
|
=====================
|
||||||
|
|
||||||
F1 Mesh zoom level
|
F1 Mesh zoom level
|
||||||
F2 Friends zoom level
|
F2 Friends zoom level
|
||||||
F3 Home zoom level
|
F3 Home zoom level
|
||||||
F4 Activity zoom level
|
F4 Activity zoom level
|
||||||
|
|
||||||
Shift+Alt+F9 Show the frame
|
Alt+f Show the frame
|
||||||
Shift+Alt+F10 Toggle chat visibility
|
Alt+o Toggle overlay visibility
|
||||||
Shift+Alt+F11 Open a terminal activity
|
Alt+= Open the developer console
|
||||||
Shift+Alt+F12 Open the log viewer
|
Alt+0 Open the developer console
|
||||||
|
|
||||||
Ctrl+S Activate sketch mode in chat
|
Ctrl+S Activate sketch mode in chat
|
||||||
|
@ -105,8 +105,8 @@ class Shell(gobject.GObject):
|
|||||||
self._key_grabber.grab('<alt>Tab')
|
self._key_grabber.grab('<alt>Tab')
|
||||||
|
|
||||||
# For non-OLPC machines
|
# For non-OLPC machines
|
||||||
self._key_grabber.grab('<shft><alt>F9')
|
self._key_grabber.grab('<alt>f')
|
||||||
self._key_grabber.grab('<shft><alt>F10')
|
self._key_grabber.grab('<alt>o')
|
||||||
|
|
||||||
def _key_pressed_cb(self, grabber, key):
|
def _key_pressed_cb(self, grabber, key):
|
||||||
if key == 'F1':
|
if key == 'F1':
|
||||||
@ -139,9 +139,9 @@ class Shell(gobject.GObject):
|
|||||||
self._hw_manager.set_display_mode(HardwareManager.B_AND_W_MODE)
|
self._hw_manager.set_display_mode(HardwareManager.B_AND_W_MODE)
|
||||||
elif key == '<alt>equal' or key == '<alt>0':
|
elif key == '<alt>equal' or key == '<alt>0':
|
||||||
gobject.idle_add(self._show_console_cb)
|
gobject.idle_add(self._show_console_cb)
|
||||||
elif key == '<shft><alt>F9':
|
elif key == '<alt>f':
|
||||||
self._frame.notify_key_press()
|
self._frame.notify_key_press()
|
||||||
elif key == '<shft><alt>F10':
|
elif key == '<alt>o':
|
||||||
self.toggle_chat_visibility()
|
self.toggle_chat_visibility()
|
||||||
elif key == '0xDC': # Camera key
|
elif key == '0xDC': # Camera key
|
||||||
self._handle_camera_key()
|
self._handle_camera_key()
|
||||||
|
@ -157,7 +157,7 @@ class Frame:
|
|||||||
|
|
||||||
def __init__(self, shell):
|
def __init__(self, shell):
|
||||||
self._windows = []
|
self._windows = []
|
||||||
self._active_menus = 0
|
self._hover_frame = False
|
||||||
self._shell = shell
|
self._shell = shell
|
||||||
self._mode = Frame.INACTIVE
|
self._mode = Frame.INACTIVE
|
||||||
|
|
||||||
@ -256,25 +256,25 @@ class Frame:
|
|||||||
panel.connect('enter-notify-event', self._enter_notify_cb)
|
panel.connect('enter-notify-event', self._enter_notify_cb)
|
||||||
panel.connect('leave-notify-event', self._leave_notify_cb)
|
panel.connect('leave-notify-event', self._leave_notify_cb)
|
||||||
|
|
||||||
menu_shell = panel.get_menu_shell()
|
self._menu_shell = panel.get_menu_shell()
|
||||||
menu_shell.connect('activated', self._menu_shell_activated_cb)
|
self._menu_shell.connect('activated',
|
||||||
menu_shell.connect('deactivated', self._menu_shell_deactivated_cb)
|
self._menu_shell_activated_cb)
|
||||||
|
self._menu_shell.connect('deactivated',
|
||||||
|
self._menu_shell_deactivated_cb)
|
||||||
|
|
||||||
def _menu_shell_activated_cb(self, menu_shell):
|
def _menu_shell_activated_cb(self, menu_shell):
|
||||||
self._active_menus += 1
|
|
||||||
self._timeline.goto('slide_in', True)
|
self._timeline.goto('slide_in', True)
|
||||||
|
|
||||||
def _menu_shell_deactivated_cb(self, menu_shell):
|
def _menu_shell_deactivated_cb(self, menu_shell):
|
||||||
self._active_menus -= 1
|
if self._mode != Frame.STICKY and not self._hover_frame:
|
||||||
if self._mode != Frame.STICKY:
|
|
||||||
self._timeline.play('before_slide_out', 'slide_out')
|
self._timeline.play('before_slide_out', 'slide_out')
|
||||||
|
|
||||||
def _enter_notify_cb(self, window, event):
|
def _enter_notify_cb(self, window, event):
|
||||||
self._timeline.goto('slide_in', True)
|
self._enter_notify()
|
||||||
logging.debug('Frame._enter_notify_cb ' + str(self._mode))
|
logging.debug('Frame._enter_notify_cb ' + str(self._mode))
|
||||||
|
|
||||||
def _drag_motion_cb(self, window, context, x, y, time):
|
def _drag_motion_cb(self, window, context, x, y, time):
|
||||||
self._timeline.goto('slide_in', True)
|
self._enter_notify()
|
||||||
logging.debug('Frame._drag_motion_cb ' + str(self._mode))
|
logging.debug('Frame._drag_motion_cb ' + str(self._mode))
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@ -289,9 +289,14 @@ class Frame:
|
|||||||
|
|
||||||
self._leave_notify()
|
self._leave_notify()
|
||||||
logging.debug('Frame._leave_notify_cb ' + str(self._mode))
|
logging.debug('Frame._leave_notify_cb ' + str(self._mode))
|
||||||
|
|
||||||
|
def _enter_notify(self):
|
||||||
|
self._hover_frame = True
|
||||||
|
self._timeline.goto('slide_in', True)
|
||||||
|
|
||||||
def _leave_notify(self):
|
def _leave_notify(self):
|
||||||
if self._active_menus == 0 and \
|
self._hover_frame = False
|
||||||
|
if not self._menu_shell.is_active() and \
|
||||||
(self._mode == Frame.HIDE_ON_LEAVE or \
|
(self._mode == Frame.HIDE_ON_LEAVE or \
|
||||||
self._mode == Frame.AUTOMATIC):
|
self._mode == Frame.AUTOMATIC):
|
||||||
self._timeline.play('before_slide_out', 'slide_out')
|
self._timeline.play('before_slide_out', 'slide_out')
|
||||||
|
Loading…
Reference in New Issue
Block a user