Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-10-16 18:42:39 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-10-16 18:42:39 (GMT)
commit1803ab1a88dae40d516e2b63c9d4b5cc645453bd (patch)
treeaa451dd62ed9da5ad2e2f306ce5d54d17d732280 /shell
parent528dc5a0464bed2d243915f53118180b91d2ba78 (diff)
Handle icon removal, better alignment
Diffstat (limited to 'shell')
-rw-r--r--shell/view/frame/Frame.py16
-rw-r--r--shell/view/frame/notificationtray.py4
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()