[Sugar-devel] Fwd: MenuItems and PaletteMenuItems

Gonzalo Odiard gonzalo at laptop.org
Fri Nov 29 16:19:51 EST 2013


I have found this old mail, sadly without reply.

Gonzalo

---------- Forwarded message ----------
From: Gonzalo Odiard <gonzalo at laptop.org>
Date: Wed, May 22, 2013 at 2:55 PM
Subject: MenuItems and PaletteMenuItems
To: Sugar-dev Devel <sugar-devel at lists.sugarlabs.org>


After using MenuItem in activities and find problems with the use with
touch (SL#4500), Simon said today on irc, we should use PaletteMenuItem and
pointed to a example on journaltoolbox.py

I need clarify a few points.

* Is MenuItem deprecated? Should be marked in that way to avoid developer
confussion or removed at all from sugar-toolkit-gtk3?

* There are a few uses in Sugar, should be replaced?
Is a easy task, and we can avoid found errors later.

[gonzalo at localhost sugar]$ grep -r  MenuItem * --include=*.py | grep -v
Palette
src/jarabe/view/viewsource.py:from sugar3.graphics.menuitem import MenuItem
src/jarabe/view/viewsource.py:            menu_item =
MenuItem(_('Duplicate'))
src/jarabe/view/viewsource.py:            menu_item = MenuItem(_('Keep'))
src/jarabe/journal/journaltoolbox.py:from sugar3.graphics.menuitem import
MenuItem
src/jarabe/journal/journaltoolbox.py:            menu_item =
MenuItem(activity_info.get_name())
src/jarabe/journal/palettes.py:from sugar3.graphics.menuitem import MenuItem
src/jarabe/journal/palettes.py:            menu_item =
MenuItem(resume_label, 'activity-start')
src/jarabe/journal/palettes.py:            menu_item =
MenuItem(resume_with_label, 'activity-start')
src/jarabe/journal/palettes.py:            menu_item = MenuItem(_('No
activity to start entry'))
src/jarabe/journal/palettes.py:        menu_item = MenuItem(_('Copy to'))
src/jarabe/journal/palettes.py:            menu_item =
MenuItem(_('Duplicate'))
src/jarabe/journal/palettes.py:        menu_item = MenuItem(_('Send to'),
'document-send')
src/jarabe/journal/palettes.py:            menu_item = MenuItem(_('View
Details'), 'go-right')
src/jarabe/journal/palettes.py:        menu_item = MenuItem(_('Erase'),
'list-remove')
src/jarabe/journal/palettes.py:class VolumeMenu(MenuItem):
src/jarabe/journal/palettes.py:        MenuItem.__init__(self, label)
src/jarabe/journal/palettes.py:class ClipboardMenu(MenuItem):
src/jarabe/journal/palettes.py:        MenuItem.__init__(self,
_('Clipboard'))
src/jarabe/journal/palettes.py:                    menu_item =
MenuItem(text_label=friend.get_nick(),
src/jarabe/journal/palettes.py:                menu_item = MenuItem(_('No
friends present'))
src/jarabe/journal/palettes.py:            menu_item = MenuItem(_('No valid
connection found'))
src/jarabe/journal/palettes.py:            menu_item =
MenuItem(activity_info.get_name())
src/jarabe/journal/palettes.py:            menu_item =
MenuItem(resume_label)
src/jarabe/frame/clipboardmenu.py:from sugar3.graphics.menuitem import
MenuItem
src/jarabe/frame/clipboardmenu.py:        self._remove_item =
MenuItem(pgettext('Clipboard', 'Remove'),
src/jarabe/frame/clipboardmenu.py:        self._open_item =
MenuItem(_('Open'), 'zoom-activity')
src/jarabe/frame/clipboardmenu.py:        self._journal_item =
MenuItem(_('Keep'))
src/jarabe/frame/clipboardmenu.py:            item =
Gtk.MenuItem(activity_info.get_name())
src/jarabe/frame/activitiestray.py:from sugar3.graphics.menuitem import
MenuItem
src/jarabe/frame/activitiestray.py:        menu_item = MenuItem(_('Join'),
icon_name='dialog-ok')
src/jarabe/frame/activitiestray.py:        menu_item =
MenuItem(_('Decline'), icon_name='dialog-cancel')

Gonzalo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20131129/72231326/attachment.html>


More information about the Sugar-devel mailing list