[Dextrose] [PATCH] uy#698: Rectifying "Activity-icons not displaying, if notification-messages are shown"
Ajay Garg
ajay at activitycentral.com
Wed Dec 21 03:22:23 EST 2011
Issue:
------
Originally discussed at :
http://lists.sugarlabs.org/archive/dextrose/2011-August/001340.html
and catched by Esteban Bordón, the issue is that whenever (and not just
at startup) any notification-messages are displayed, any Activity-icon
(and not just the Journal-Activity icon) is not displayed in the
top-panel-frame.
Technical history/details, plus the fix :
-----------------------------------------
The mesh-, group-, home-, and activity-zoom buttons are a group of
radiobuttons; only one may be visibly-active at a time (this is
highlighted by the white-background of the corresponding selected
zoom-button).
Please see:
"src/jarabe/frame/zoomtoolbar.py"
for code-details.
Similarly, all the opened activity-instances are shown by a yet another
group of radiobuttons; the selected activity being highlighed by the
corresponding selected activity-icon-button.
Now, what was happening, was that the notification-message-icon was
being added into the Activities-Tray (the second group of radiobuttons
as discussed above); but any further activity-icons were not being added
into the tray, because the notification-message-icon did not respect the
semantics of the activity-icons. Hence, the notification-message-icon, and
any other activity-icon (including Journal-activity icon) were not being
made a part of the same group.
Thus, the fix is that now the notification-message-icon, goes into a
third tray, in the top-panel-frame. This third tray, is actually a
simple gtk.HBox, with size equal to 1 grid.
Please see:
"src/jarabe/frame/frame.py"
"src/jarabe/frame/activitiestray.py"
for code-details.
Signed-off-by: Ajay Garg <ajay at activitycentral.com>
---
src/jarabe/frame/frame.py | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/jarabe/frame/frame.py b/src/jarabe/frame/frame.py
index cd1dc20..fbf45fc 100644
--- a/src/jarabe/frame/frame.py
+++ b/src/jarabe/frame/frame.py
@@ -195,6 +195,12 @@ class Frame(object):
box_width=4 * style.GRID_CELL_SIZE))
zoom_toolbar.show()
+ message_tray = gtk.HBox()
+ panel.append(hippo.CanvasWidget(widget=message_tray,
+ box_width=1 * style.GRID_CELL_SIZE))
+ message_tray.show()
+ self._message_tray = message_tray
+
activities_tray = ActivitiesTray()
panel.append(hippo.CanvasWidget(widget=activities_tray),
hippo.PACK_EXPAND)
@@ -321,7 +327,7 @@ class Frame(object):
elif corner == gtk.CORNER_TOP_RIGHT:
self._friends_tray.add_item(button)
else:
- self._activities_tray.add_item(button)
+ self._message_tray.add(button)
def _remove_message_button(self, button, corner):
if corner == gtk.CORNER_BOTTOM_RIGHT:
@@ -329,7 +335,7 @@ class Frame(object):
elif corner == gtk.CORNER_TOP_RIGHT:
self._friends_tray.remove_item(button)
else:
- self._activities_tray.remove_item(button)
+ self._message_tray.remove(button)
def _launch_notification_icon(self, icon_name, xo_color,
position, duration):
--
1.7.4.4
More information about the Dextrose
mailing list