diff options
-rw-r--r-- | shell/view/frame/Frame.py | 16 | ||||
-rw-r--r-- | shell/view/frame/notificationtray.py | 4 |
2 files changed, 14 insertions, 6 deletions
diff --git a/shell/view/frame/Frame.py b/shell/view/frame/Frame.py index 03c11d7..a48b6dd 100644 --- a/shell/view/frame/Frame.py +++ b/shell/view/frame/Frame.py @@ -148,19 +148,23 @@ class Frame: top_panel = self._create_panel(grid, 0, 0, 16, 1) box = ZoomBox(self._shell, self._menu_shell) - top_panel.append(box, hippo.PACK_FIXED) [x, y] = grid.point(1, 0) + top_panel.append(box, hippo.PACK_FIXED) top_panel.move(box, x, y) tray = NotificationTray() - box = hippo.CanvasWidget() - box.props.widget = tray + tray_box = hippo.CanvasBox(box_width=grid.dimension(1), + box_height=grid.dimension(1), + xalign=hippo.ALIGNMENT_END) - top_panel.append(box, hippo.PACK_FIXED) + tray_widget = hippo.CanvasWidget() + tray_widget.props.widget = tray + tray_box.append(tray_widget, gtk.EXPAND) - [x, y] = grid.point(5, 0) - top_panel.move(box, x, y) + [x, y] = grid.point(14, 0) + top_panel.append(tray_box, hippo.PACK_FIXED) + top_panel.move(tray_box, x, y) bottom_panel = self._create_panel(grid, 0, 11, 16, 1) diff --git a/shell/view/frame/notificationtray.py b/shell/view/frame/notificationtray.py index 1a6986c..5fa5123 100644 --- a/shell/view/frame/notificationtray.py +++ b/shell/view/frame/notificationtray.py @@ -8,7 +8,11 @@ class NotificationTray(gtk.HBox): self._manager = TrayManager() self._manager.connect('tray-icon-added', self._icon_added_cb) + self._manager.connect('tray-icon-removed', self._icon_removed_cb) self._manager.manage_screen(gtk.gdk.screen_get_default()) def _icon_added_cb(self, manager, icon): self.pack_start(icon, False) + + def _icon_removed_cb(self, manager, icon): + icon.destroy() |