[hamster-applet] don't ask for parent as we don't need it
- From: Toms Baugis <tbaugis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hamster-applet] don't ask for parent as we don't need it
- Date: Thu, 13 May 2010 09:41:11 +0000 (UTC)
commit 9f2721d03c85360b33697a5ab643fdc3e443e855
Author: Toms Bauģis <toms baugis gmail com>
Date: Thu May 13 10:40:14 2010 +0100
don't ask for parent as we don't need it
src/hamster/client.py | 11 ++++-------
src/hamster/configuration.py | 2 +-
2 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/src/hamster/client.py b/src/hamster/client.py
index 8f3ade1..11daec9 100644
--- a/src/hamster/client.py
+++ b/src/hamster/client.py
@@ -60,11 +60,9 @@ class Storage(gobject.GObject):
"activities-changed": (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()),
}
- def __init__(self, parent = None):
+ def __init__(self):
gobject.GObject.__init__(self)
- self.parent = parent
-
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
bus = dbus.SessionBus()
hamster_conn = dbus.Interface(bus.get_object('org.gnome.Hamster',
@@ -72,10 +70,9 @@ class Storage(gobject.GObject):
dbus_interface='org.gnome.Hamster')
self.conn = hamster_conn
- if parent:
- bus.add_signal_receiver(self._on_tags_changed, 'TagsChanged', 'org.gnome.Hamster')
- bus.add_signal_receiver(self._on_facts_changed, 'FactsChanged', 'org.gnome.Hamster')
- bus.add_signal_receiver(self._on_activities_changed, 'ActivitiesChanged', 'org.gnome.Hamster')
+ bus.add_signal_receiver(self._on_tags_changed, 'TagsChanged', 'org.gnome.Hamster')
+ bus.add_signal_receiver(self._on_facts_changed, 'FactsChanged', 'org.gnome.Hamster')
+ bus.add_signal_receiver(self._on_activities_changed, 'ActivitiesChanged', 'org.gnome.Hamster')
def _on_tags_changed(self):
diff --git a/src/hamster/configuration.py b/src/hamster/configuration.py
index 2bc43c8..2f37701 100644
--- a/src/hamster/configuration.py
+++ b/src/hamster/configuration.py
@@ -64,7 +64,7 @@ class RuntimeStore(Singleton):
else:
self.data_dir = os.path.join(defs.DATA_DIR, "hamster-applet")
- self.storage = Storage(self)
+ self.storage = Storage()
# figure out the correct database file
old_db_file = os.path.expanduser("~/.gnome2/hamster-applet/hamster.db")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]