diff options
Diffstat (limited to 'src/jarabe/frame/frame.py')
-rw-r--r-- | src/jarabe/frame/frame.py | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/jarabe/frame/frame.py b/src/jarabe/frame/frame.py index 55f866f..079eeeb 100644 --- a/src/jarabe/frame/frame.py +++ b/src/jarabe/frame/frame.py @@ -35,6 +35,7 @@ from jarabe.frame.clipboardpanelwindow import ClipboardPanelWindow from jarabe.frame.notification import NotificationIcon, NotificationWindow from jarabe.model import notifications + TOP_RIGHT = 0 TOP_LEFT = 1 BOTTOM_RIGHT = 2 @@ -43,6 +44,7 @@ BOTTOM_LEFT = 3 _FRAME_HIDING_DELAY = 500 _NOTIFICATION_DURATION = 5000 + class _Animation(animator.Animation): def __init__(self, frame, end): start = frame.current_position @@ -52,6 +54,7 @@ class _Animation(animator.Animation): def next_frame(self, current): self._frame.move(current) + class _MouseListener(object): def __init__(self, frame): self._frame = frame @@ -79,6 +82,7 @@ class _MouseListener(object): self._hide_sid = gobject.timeout_add( _FRAME_HIDING_DELAY, self._hide_frame_timeout_cb) + class _KeyListener(object): def __init__(self, frame): self._frame = frame @@ -90,13 +94,14 @@ class _KeyListener(object): else: self._frame.show(Frame.MODE_KEYBOARD) + class Frame(object): - MODE_MOUSE = 0 + MODE_MOUSE = 0 MODE_KEYBOARD = 1 MODE_NON_INTERACTIVE = 2 def __init__(self): - logging.debug("STARTUP: Loading the frame") + logging.debug('STARTUP: Loading the frame') self.mode = None self._palette_group = palettegroup.get_group('frame') @@ -173,12 +178,12 @@ class Frame(object): def _create_top_panel(self): panel = self._create_panel(gtk.POS_TOP) - # TODO: setting box_width and hippo.PACK_EXPAND looks like a hack to me. - # Why hippo isn't respecting the request size of these controls? + # TODO: setting box_width and hippo.PACK_EXPAND looks like a hack to + # me. Why hippo isn't respecting the request size of these controls? zoom_toolbar = ZoomToolbar() panel.append(hippo.CanvasWidget(widget=zoom_toolbar, - box_width=4*style.GRID_CELL_SIZE)) + box_width=4 * style.GRID_CELL_SIZE)) zoom_toolbar.show() activities_tray = ActivitiesTray() @@ -193,7 +198,8 @@ class Frame(object): # TODO: same issue as in _create_top_panel() devices_tray = DevicesTray() - panel.append(hippo.CanvasWidget(widget=devices_tray), hippo.PACK_EXPAND) + panel.append(hippo.CanvasWidget(widget=devices_tray), + hippo.PACK_EXPAND) devices_tray.show() return panel @@ -322,7 +328,7 @@ class Frame(object): del self._notif_by_icon[icon] def __notification_received_cb(self, **kwargs): - logging.debug('__notification_received_cb %r', kwargs) + logging.debug('__notification_received_cb') icon = NotificationIcon() hints = kwargs['hints'] @@ -348,4 +354,3 @@ class Frame(object): # Do nothing for now. Our notification UI is so simple, there's no # point yet. pass - |