diff --git a/shell/view/BuddyMenu.py b/shell/view/BuddyMenu.py index aa3de6a7..aae4e1ea 100644 --- a/shell/view/BuddyMenu.py +++ b/shell/view/BuddyMenu.py @@ -21,6 +21,7 @@ import gobject import hippo from sugar.graphics.palette import Palette +from sugar.graphics.menuitem import MenuItem from sugar.graphics import units from sugar.presence import presenceservice @@ -74,10 +75,10 @@ class BuddyMenu(Palette): friends = shell_model.get_friends() if friends.has_buddy(self._buddy): - menu_item = gtk.MenuItem(_('Remove friend')) #, 'theme:stock-remove') + menu_item = MenuItem(_('Remove friend'), 'stock-remove') menu_item.connect('activate', self._remove_friend_cb) else: - menu_item = gtk.MenuItem(_('Make friend')) #, 'theme:stock-add') + menu_item = MenuItem(_('Make friend'), 'stock-add') menu_item.connect('activate', self._make_friend_cb) self.append_menu_item(menu_item) menu_item.show() @@ -88,7 +89,7 @@ class BuddyMenu(Palette): # FIXME check that the buddy is not in the activity already - menu_item = gtk.MenuItem(_('Invite')) #, 'theme:stock-invite') + menu_item = MenuItem(_('Invite'), 'stock-invite') menu_item.connect('activate', self._invite_friend_cb) self.append_menu_item(menu_item) menu_item.show() diff --git a/sugar/graphics/Makefile.am b/sugar/graphics/Makefile.am index c15c5027..f88bd1b4 100644 --- a/sugar/graphics/Makefile.am +++ b/sugar/graphics/Makefile.am @@ -11,6 +11,7 @@ sugar_PYTHON = \ font.py \ frame.py \ notebook.py \ + menuitem.py \ objectchooser.py \ radiotoolbutton.py \ roundbox.py \ diff --git a/sugar/graphics/menuitem.py b/sugar/graphics/menuitem.py index c16c1666..492f5f13 100644 --- a/sugar/graphics/menuitem.py +++ b/sugar/graphics/menuitem.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007, Eduardo Silva (edsiper@gmail.com) +# Copyright (C) 2007, Eduardo Silva # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -22,7 +22,7 @@ class MenuItem(gtk.ImageMenuItem): def __init__(self, text_label, icon_name=None): gtk.ImageMenuItem.__init__(self, text_label) if icon_name: - icon = Icon(icon_name, gtk.ICON_SIZE_SMALL_TOOLBAR) + icon = Icon(icon_name, gtk.ICON_SIZE_MENU) self.set_image(icon) icon.show()