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
|
||||
F2 Friends zoom level
|
||||
F3 Home zoom level
|
||||
F4 Activity zoom level
|
||||
|
||||
Shift+Alt+F9 Show the frame
|
||||
Shift+Alt+F10 Toggle chat visibility
|
||||
Shift+Alt+F11 Open a terminal activity
|
||||
Shift+Alt+F12 Open the log viewer
|
||||
Alt+f Show the frame
|
||||
Alt+o Toggle overlay visibility
|
||||
Alt+= Open the developer console
|
||||
Alt+0 Open the developer console
|
||||
|
||||
Ctrl+S Activate sketch mode in chat
|
||||
|
@ -105,8 +105,8 @@ class Shell(gobject.GObject):
|
||||
self._key_grabber.grab('<alt>Tab')
|
||||
|
||||
# For non-OLPC machines
|
||||
self._key_grabber.grab('<shft><alt>F9')
|
||||
self._key_grabber.grab('<shft><alt>F10')
|
||||
self._key_grabber.grab('<alt>f')
|
||||
self._key_grabber.grab('<alt>o')
|
||||
|
||||
def _key_pressed_cb(self, grabber, key):
|
||||
if key == 'F1':
|
||||
@ -139,9 +139,9 @@ class Shell(gobject.GObject):
|
||||
self._hw_manager.set_display_mode(HardwareManager.B_AND_W_MODE)
|
||||
elif key == '<alt>equal' or key == '<alt>0':
|
||||
gobject.idle_add(self._show_console_cb)
|
||||
elif key == '<shft><alt>F9':
|
||||
elif key == '<alt>f':
|
||||
self._frame.notify_key_press()
|
||||
elif key == '<shft><alt>F10':
|
||||
elif key == '<alt>o':
|
||||
self.toggle_chat_visibility()
|
||||
elif key == '0xDC': # Camera key
|
||||
self._handle_camera_key()
|
||||
|
@ -157,7 +157,7 @@ class Frame:
|
||||
|
||||
def __init__(self, shell):
|
||||
self._windows = []
|
||||
self._active_menus = 0
|
||||
self._hover_frame = False
|
||||
self._shell = shell
|
||||
self._mode = Frame.INACTIVE
|
||||
|
||||
@ -256,25 +256,25 @@ class Frame:
|
||||
panel.connect('enter-notify-event', self._enter_notify_cb)
|
||||
panel.connect('leave-notify-event', self._leave_notify_cb)
|
||||
|
||||
menu_shell = panel.get_menu_shell()
|
||||
menu_shell.connect('activated', self._menu_shell_activated_cb)
|
||||
menu_shell.connect('deactivated', self._menu_shell_deactivated_cb)
|
||||
self._menu_shell = panel.get_menu_shell()
|
||||
self._menu_shell.connect('activated',
|
||||
self._menu_shell_activated_cb)
|
||||
self._menu_shell.connect('deactivated',
|
||||
self._menu_shell_deactivated_cb)
|
||||
|
||||
def _menu_shell_activated_cb(self, menu_shell):
|
||||
self._active_menus += 1
|
||||
self._timeline.goto('slide_in', True)
|
||||
|
||||
def _menu_shell_deactivated_cb(self, menu_shell):
|
||||
self._active_menus -= 1
|
||||
if self._mode != Frame.STICKY:
|
||||
if self._mode != Frame.STICKY and not self._hover_frame:
|
||||
self._timeline.play('before_slide_out', 'slide_out')
|
||||
|
||||
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))
|
||||
|
||||
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))
|
||||
return True
|
||||
|
||||
@ -289,9 +289,14 @@ class Frame:
|
||||
|
||||
self._leave_notify()
|
||||
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):
|
||||
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.AUTOMATIC):
|
||||
self._timeline.play('before_slide_out', 'slide_out')
|
||||
|
Loading…
Reference in New Issue
Block a user