[Sugar-devel] [PATCH sugar 2/2] Switch to private implementation of EventIcon

Sascha Silbe silbe at activitycentral.com
Tue Jul 24 18:23:47 EDT 2012


EventIcon will only be used by the non-hippo-canvas GTK2 version of
sugar, but neither by the GTK3 version of sugar nor by any
Activity. Shipping EventIcon as part of sugar removes the need to rely
on an unreleased version of sugar-toolkit.

Signed-off-by: Sascha Silbe <silbe at activitycentral.com>
---
 extensions/cpsection/aboutme/view.py |    3 ++-
 src/jarabe/desktop/favoritesview.py  |    2 +-
 src/jarabe/desktop/friendview.py     |    2 +-
 src/jarabe/desktop/groupbox.py       |    2 +-
 src/jarabe/desktop/meshbox.py        |    2 +-
 src/jarabe/journal/expandedentry.py  |    2 +-
 src/jarabe/journal/listview.py       |    3 ++-
 src/jarabe/view/Makefile.am          |    1 +
 src/jarabe/view/buddyicon.py         |    3 ++-
 src/jarabe/view/pulsingicon.py       |    5 ++++-
 10 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/extensions/cpsection/aboutme/view.py b/extensions/cpsection/aboutme/view.py
index d68167e..81fe8f9 100644
--- a/extensions/cpsection/aboutme/view.py
+++ b/extensions/cpsection/aboutme/view.py
@@ -19,12 +19,13 @@ import gtk
 import gobject
 from gettext import gettext as _
 
-from sugar.graphics.icon import EventIcon
 from sugar.graphics import style
 from sugar.graphics.xocolor import XoColor, colors
 
 from jarabe.controlpanel.sectionview import SectionView
 from jarabe.controlpanel.inlinealert import InlineAlert
+from jarabe.view.eventicon import EventIcon
+
 
 _STROKE_COLOR = 0
 _FILL_COLOR = 1
diff --git a/src/jarabe/desktop/favoritesview.py b/src/jarabe/desktop/favoritesview.py
index a9a2e14..1ab4bdc 100644
--- a/src/jarabe/desktop/favoritesview.py
+++ b/src/jarabe/desktop/favoritesview.py
@@ -26,7 +26,6 @@ import gtk
 
 from sugar.graphics import style
 from sugar.graphics.icon import Icon
-from sugar.graphics.icon import EventIcon
 from sugar.graphics.menuitem import MenuItem
 from sugar.graphics.alert import Alert
 from sugar.graphics.xocolor import XoColor
@@ -39,6 +38,7 @@ from jarabe.view.palettes import CurrentActivityPalette
 from jarabe.view.palettes import ActivityPalette
 from jarabe.view.buddyicon import BuddyIcon
 from jarabe.view.buddymenu import BuddyMenu
+from jarabe.view.eventicon import EventIcon
 from jarabe.model.buddy import get_owner_instance
 from jarabe.model import shell
 from jarabe.model import bundleregistry
diff --git a/src/jarabe/desktop/friendview.py b/src/jarabe/desktop/friendview.py
index 39b5550..01c2b71 100644
--- a/src/jarabe/desktop/friendview.py
+++ b/src/jarabe/desktop/friendview.py
@@ -17,10 +17,10 @@
 
 import gtk
 
-from sugar.graphics.icon import EventIcon
 from sugar.graphics import style
 
 from jarabe.view.buddyicon import BuddyIcon
+from jarabe.view.eventicon import EventIcon
 from jarabe.model import bundleregistry
 
 
diff --git a/src/jarabe/desktop/groupbox.py b/src/jarabe/desktop/groupbox.py
index c7f5f6e..4fcd6c2 100644
--- a/src/jarabe/desktop/groupbox.py
+++ b/src/jarabe/desktop/groupbox.py
@@ -19,10 +19,10 @@ import logging
 import gconf
 
 from sugar.graphics import style
-from sugar.graphics.icon import EventIcon
 from sugar.graphics.xocolor import XoColor
 
 from jarabe.view.buddymenu import BuddyMenu
+from jarabe.view.eventicon import EventIcon
 from jarabe.model.buddy import get_owner_instance
 from jarabe.model import friends
 from jarabe.desktop.friendview import FriendView
diff --git a/src/jarabe/desktop/meshbox.py b/src/jarabe/desktop/meshbox.py
index 046e1e4..1de3779 100644
--- a/src/jarabe/desktop/meshbox.py
+++ b/src/jarabe/desktop/meshbox.py
@@ -27,7 +27,6 @@ import gtk
 import gconf
 
 from sugar.graphics.icon import Icon
-from sugar.graphics.icon import EventIcon
 from sugar.graphics import style
 from sugar.graphics import palette
 from sugar.graphics import iconentry
@@ -39,6 +38,7 @@ from jarabe.model import neighborhood
 from jarabe.model.buddy import get_owner_instance
 from jarabe.view.buddyicon import BuddyIcon
 from jarabe.view.buddymenu import BuddyMenu
+from jarabe.view.eventicon import EventIcon
 from jarabe.desktop.networkviews import WirelessNetworkView
 from jarabe.desktop.networkviews import OlpcMeshView
 from jarabe.desktop.networkviews import SugarAdhocView
diff --git a/src/jarabe/journal/expandedentry.py b/src/jarabe/journal/expandedentry.py
index b69cd10..e0c603f 100644
--- a/src/jarabe/journal/expandedentry.py
+++ b/src/jarabe/journal/expandedentry.py
@@ -27,7 +27,6 @@ import gtk
 import simplejson
 
 from sugar.graphics import style
-from sugar.graphics.icon import EventIcon
 from sugar.graphics.xocolor import XoColor
 from sugar.util import format_size
 
@@ -35,6 +34,7 @@ from jarabe.journal.keepicon import KeepIcon
 from jarabe.journal.palettes import ObjectPalette, BuddyPalette
 from jarabe.journal import misc
 from jarabe.journal import model
+from jarabe.view.eventicon import EventIcon
 
 
 class Separator(gtk.VBox):
diff --git a/src/jarabe/journal/listview.py b/src/jarabe/journal/listview.py
index 1f4117d..f6a867f 100644
--- a/src/jarabe/journal/listview.py
+++ b/src/jarabe/journal/listview.py
@@ -25,7 +25,7 @@ import gconf
 import pango
 
 from sugar.graphics import style
-from sugar.graphics.icon import EventIcon, Icon, CellRendererIcon
+from sugar.graphics.icon import Icon, CellRendererIcon
 from sugar.graphics.xocolor import XoColor
 from sugar import util
 
@@ -33,6 +33,7 @@ from jarabe.journal.listmodel import ListModel
 from jarabe.journal.palettes import ObjectPalette, BuddyPalette
 from jarabe.journal import model
 from jarabe.journal import misc
+from jarabe.view.eventicon import EventIcon
 
 
 UPDATE_INTERVAL = 300
diff --git a/src/jarabe/view/Makefile.am b/src/jarabe/view/Makefile.am
index 630f184..31ccfa4 100644
--- a/src/jarabe/view/Makefile.am
+++ b/src/jarabe/view/Makefile.am
@@ -4,6 +4,7 @@ sugar_PYTHON =				\
 	buddyicon.py			\
 	buddymenu.py			\
 	customizebundle.py		\
+	eventicon.py			\
 	keyhandler.py			\
 	launcher.py			\
 	palettes.py			\
diff --git a/src/jarabe/view/buddyicon.py b/src/jarabe/view/buddyicon.py
index 14af344..663bd92 100644
--- a/src/jarabe/view/buddyicon.py
+++ b/src/jarabe/view/buddyicon.py
@@ -14,10 +14,11 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-from sugar.graphics.icon import EventIcon
 from sugar.graphics import style
 
 from jarabe.view.buddymenu import BuddyMenu
+from jarabe.view.eventicon import EventIcon
+
 
 _FILTERED_ALPHA = 0.33
 
diff --git a/src/jarabe/view/pulsingicon.py b/src/jarabe/view/pulsingicon.py
index 58dce88..39e0bab 100644
--- a/src/jarabe/view/pulsingicon.py
+++ b/src/jarabe/view/pulsingicon.py
@@ -18,9 +18,12 @@ import math
 
 import gobject
 
-from sugar.graphics.icon import Icon, EventIcon
+from sugar.graphics.icon import Icon
 from sugar.graphics import style
 
+from jarabe.view.eventicon import EventIcon
+
+
 _INTERVAL = 100
 _STEP = math.pi / 10  # must be a fraction of pi, for clean caching
 _MINIMAL_ALPHA_VALUE = 0.33
-- 
1.7.10



More information about the Sugar-devel mailing list