Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/model/homeactivity.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-06-01 11:38:34 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-06-01 11:38:34 (GMT)
commitb1a62c2fc09e7ea35b06e2e46ffabb3ba53f572e (patch)
treedbb9492fd5cb0e8a884de1a96396649ca09a1a7b /shell/model/homeactivity.py
parent2f6790105df59090abefff8047aa412d659d5cfb (diff)
Refactor part of the Home model. Should be much
cleaner and reliable. If you find bugs with it please let me know.
Diffstat (limited to 'shell/model/homeactivity.py')
-rw-r--r--shell/model/homeactivity.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/shell/model/homeactivity.py b/shell/model/homeactivity.py
index 4420399..ad42310 100644
--- a/shell/model/homeactivity.py
+++ b/shell/model/homeactivity.py
@@ -40,7 +40,7 @@ class HomeActivity(gobject.GObject):
gobject.PARAM_READWRITE),
}
- def __init__(self, bundle, activity_id):
+ def __init__(self, bundle=None, activity_id=None):
"""Initialise the HomeActivity
bundle -- sugar.activity.bundle.Bundle instance,
@@ -60,13 +60,8 @@ class HomeActivity(gobject.GObject):
self._launch_time = time.time()
self._launching = False
- logging.debug("Activity %s (%s) launching..." %
- (self._activity_id, self.get_type()))
-
def set_window(self, window):
"""An activity is 'launched' once we get its window."""
- logging.debug("Activity %s (%s) finished launching" %
- (self._activity_id, self.get_type()))
if self._window or self._xid:
raise RuntimeError("Activity is already launched!")
if not window:
@@ -93,7 +88,10 @@ class HomeActivity(gobject.GObject):
def get_icon_name(self):
"""Retrieve the bundle's icon (file) name"""
- return self._bundle.get_icon()
+ if self._bundle:
+ return self._bundle.get_icon()
+ else:
+ return None
def get_icon_color(self):
"""Retrieve the appropriate icon colour for this activity