Add icons to the activity ring palette. Part of #2028

This commit is contained in:
Dan Winship 2007-08-21 15:39:05 -04:00
parent 3084176057
commit 10dc80c8be

View File

@ -24,6 +24,7 @@ import gobject
import gtk import gtk
from sugar.graphics.canvasicon import CanvasIcon from sugar.graphics.canvasicon import CanvasIcon
from sugar.graphics.menuitem import MenuItem
from sugar.graphics.palette import Palette from sugar.graphics.palette import Palette
from sugar.graphics import style from sugar.graphics import style
from sugar.graphics import xocolor from sugar.graphics import xocolor
@ -87,14 +88,14 @@ class ActivityIcon(CanvasIcon):
palette.set_primary_text(self._activity.get_title()) palette.set_primary_text(self._activity.get_title())
resume_menu_item = gtk.MenuItem(_('Resume')) resume_menu_item = MenuItem(_('Resume'), 'zoom-activity')
resume_menu_item.connect('activate', self._resume_activate_cb) resume_menu_item.connect('activate', self._resume_activate_cb)
palette.menu.append(resume_menu_item) palette.menu.append(resume_menu_item)
resume_menu_item.show() resume_menu_item.show()
# FIXME: kludge # FIXME: kludge
if self._activity.get_type() != "org.laptop.JournalActivity": if self._activity.get_type() != "org.laptop.JournalActivity":
stop_menu_item = gtk.MenuItem(_('Stop')) stop_menu_item = MenuItem(_('Stop'), 'activity-stop')
stop_menu_item.connect('activate', self._stop_activate_cb) stop_menu_item.connect('activate', self._stop_activate_cb)
palette.menu.append(stop_menu_item) palette.menu.append(stop_menu_item)
stop_menu_item.show() stop_menu_item.show()