diff --git a/activities/Makefile.am b/activities/Makefile.am index 84bfa853..c900fb64 100644 --- a/activities/Makefile.am +++ b/activities/Makefile.am @@ -1 +1 @@ -SUBDIRS = browser chat terminal +SUBDIRS = browser chat groupchat terminal diff --git a/activities/browser/browser.activity b/activities/browser/browser.activity index 6a1d3cdf..47eea7f3 100644 --- a/activities/browser/browser.activity +++ b/activities/browser/browser.activity @@ -1,7 +1,7 @@ [Activity] name = Web id = com.redhat.Sugar.BrowserActivity -icon = browser-activity +icon = activity-web python_module = browser.BrowserActivity.BrowserActivity default_type = _web_olpc._udp show_launcher = yes diff --git a/activities/groupchat/GroupChatActivity.py b/activities/groupchat/GroupChatActivity.py new file mode 100644 index 00000000..32cfac55 --- /dev/null +++ b/activities/groupchat/GroupChatActivity.py @@ -0,0 +1,8 @@ +from gettext import gettext as _ + +from sugar.activity.Activity import Activity + +class GroupChatActivity(Activity): + def __init__(self): + Activity.__init__(self) + self.set_title(_('Group chat')) diff --git a/activities/groupchat/Makefile.am b/activities/groupchat/Makefile.am new file mode 100644 index 00000000..66e99151 --- /dev/null +++ b/activities/groupchat/Makefile.am @@ -0,0 +1,6 @@ +sugardir = $(pkgdatadir)/activities/groupchat +sugar_PYTHON = \ + __init__.py \ + GroupChatActivity.py + +EXTRA_DIST = groupchat.activity diff --git a/activities/groupchat/__init__.py b/activities/groupchat/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/activities/groupchat/groupchat.activity b/activities/groupchat/groupchat.activity new file mode 100644 index 00000000..2c8734a1 --- /dev/null +++ b/activities/groupchat/groupchat.activity @@ -0,0 +1,6 @@ +[Activity] +name = GroupChat +icon = activity-groupchat +id = com.redhat.Sugar.GroupChatActivity +python_module = groupchat.GroupChatActivity.GroupChatActivity +show_launcher = yes diff --git a/configure.ac b/configure.ac index e569750c..f9b516a4 100644 --- a/configure.ac +++ b/configure.ac @@ -27,6 +27,7 @@ dbus-installed.conf activities/Makefile activities/browser/Makefile activities/chat/Makefile +activities/groupchat/Makefile activities/terminal/Makefile shell/Makefile shell/data/Makefile diff --git a/shell/home/HomeView.py b/shell/home/HomeView.py index 29f2e233..09627b66 100644 --- a/shell/home/HomeView.py +++ b/shell/home/HomeView.py @@ -38,8 +38,11 @@ class TasksItem(DonutItem): self._items[activity.get_id()] = item class ActivityItem(IconItem): + ICON_SIZE = 30 + def __init__(self, activity): - IconItem.__init__(self, activity.get_icon(), 'white', 30) + IconItem.__init__(self, activity.get_icon(), 'white', + ActivityItem.ICON_SIZE) self._activity = activity def get_activity_id(self): @@ -58,6 +61,8 @@ class ActivityBar(goocanvas.Group): def add_activity(self, activity): item = ActivityItem(activity) + x = (ActivityItem.ICON_SIZE + 6) * self.get_n_children() + item.set_property('x', x) self.add_child(item) class Background(goocanvas.Group): diff --git a/sugar/canvas/IconItem.py b/sugar/canvas/IconItem.py index bf57bce9..73098b72 100644 --- a/sugar/canvas/IconItem.py +++ b/sugar/canvas/IconItem.py @@ -21,9 +21,12 @@ class IconCache(gobject.GObject): icon_file.close() if color != None: - style = '.fill-color {fill: %s; stroke: %s;}' % (color, color) + style = '.fill-color {fill: %s;}' % (color) data = re.sub('\.fill-color \{.*\}', style, data) + style = '.fill-and-stroke-color {fill: %s; stroke: %s;}' % (color, color) + data = re.sub('\.fill-and-stroke-color \{.*\}', style, data) + loader = gtk.gdk.pixbuf_loader_new_with_mime_type('image/svg-xml') loader.set_size(size, size) loader.write(data)