[Dextrose] [PATCH] uy#698: Rectifying "Activity-icons not displaying, if notification-messages are shown"

Ajay Garg ajay at activitycentral.com
Wed Dec 21 15:14:08 EST 2011


Sent the modified (version 2) patch.

Now, the behaviour is corrected (journal icon shown; no blank space in
between icons)  PLUS  the message-notification-icon is shown at the
end of all activity-icons.

Thanks Esteban and Anish.


Regards,
Ajay

On Wed, Dec 21, 2011 at 5:50 PM, Anish Mangal <anish at sugarlabs.org> wrote:
> On Wed, Dec 21, 2011 at 17:31, Ajay Garg <ajay at activitycentral.com> wrote:
>> On Wed, Dec 21, 2011 at 5:07 PM, Esteban Bordón
>> <ebordon at plan.ceibal.edu.uy> wrote:
>>> Thanks Ajay, this patch works well. I just have one comment, when the
>>> messages are not displayed the icon-frame shows a blank space.\
>>
>> My pleasure (sorry again, for being stupid the first time around).
>>
>> The blank space is expected.
>>
>> We need to have the ability to pop-up messages any time.
>>
>> By keeping this fixed-allocated-space, the message-notification-icon
>> will have a fixed space in the top-panel-frame. Otherwise, (amongst
>> many other options), the message-notification icon will be appended to
>> the activity-icons-tray (if at all that is possible); which might miss
>> user's eye in the activities-tray-scroll-bar, owing to a large number
>> of activity-icons.
>>
>> Probably, a few more feedback might help :)
>
> No! The notification icon should be the rightmost one (as it is
> currently), _after_ all activity icons have been displayed. So this
> blank space should be removed.
>
> This was arrived at after design discussions and shouldn't be changed
> abruptly. If you feel that your approach is the correct one, please
> send a separate email with the [DESIGN] tag discussing this.
>
>>
>>
>>
>>
>>
>>
>>>
>>> This patch will be included in dx3?
>>
>> If the above is acceptable, the patch is good to go from my side.
>> Also, the code-change is a very isolated one, and minimal; so I guess,
>> there should not be a problem.
>>
>
> Following the review process, I see no reason that this shouldn't be
> included in the dx3 patchset.
>
>>
>> Regards,
>> Ajay
>>
>>>
>>> cheers,
>>> Esteban.
>>>
>>> 2011/12/21 Ajay Garg <ajay at activitycentral.com>
>>>>
>>>> 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
>>>>
>>>
>> _______________________________________________
>> Dextrose mailing list
>> Dextrose at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/dextrose
>
>
>
> --
> Anish | anish at sugarlabs.org


More information about the Dextrose mailing list