Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2009-02-17 11:35:18 (GMT)
committer Simon Schampijer <simon@schampijer.de>2009-02-17 11:35:18 (GMT)
commiteb8a2d0e20cb19e8de1254d9f40cce2e51e0adfb (patch)
tree2039926205b763c310afe6a669e1558c8d6f6301 /extensions
parent3dac4c53652c70ae5301036e7c5db3c7638a76ed (diff)
View Source: Use activity icon outline for Bundle Source, part of #360
Diffstat (limited to 'extensions')
-rw-r--r--extensions/globalkey/viewsource.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/extensions/globalkey/viewsource.py b/extensions/globalkey/viewsource.py
index 11e5d63..43e02fe 100644
--- a/extensions/globalkey/viewsource.py
+++ b/extensions/globalkey/viewsource.py
@@ -27,8 +27,10 @@ import gtksourceview2
import dbus
from sugar.graphics import style
+from sugar.graphics.icon import Icon
from sugar.graphics.toolbutton import ToolButton
from sugar.graphics.radiotoolbutton import RadioToolButton
+from sugar.bundle.activitybundle import ActivityBundle
from sugar import mime
from jarabe.model import shell
@@ -196,8 +198,14 @@ class Toolbar(gtk.Toolbar):
self._add_separator()
- if bundle_path is not None and os.path.exists(bundle_path):
- activity_button = RadioToolButton(named_icon='printer')
+ if bundle_path is not None and os.path.exists(bundle_path):
+ activity_bundle = ActivityBundle(bundle_path)
+ file_name = activity_bundle.get_icon()
+ activity_button = RadioToolButton()
+ icon = Icon(file=file_name,
+ icon_size=gtk.ICON_SIZE_LARGE_TOOLBAR)
+ activity_button.set_icon_widget(icon)
+ icon.show()
activity_button.props.tooltip = _('Activity')
activity_button.connect('toggled', self.__button_toggled_cb,
bundle_path)
@@ -205,7 +213,7 @@ class Toolbar(gtk.Toolbar):
activity_button.show()
self._add_separator()
- if document_path is not None and os.path.exists(document_path):
+ if document_path is not None and os.path.exists(document_path):
document_button = RadioToolButton(named_icon='document-generic')
document_button.props.tooltip = _('Document')
document_button.props.group = activity_button