[hamster-applet] don't need the whole config machinery just to get day start
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [hamster-applet] don't need the whole config machinery just to get day start
- Date: Thu, 19 Nov 2009 11:40:25 +0000 (UTC)
commit 9a4ff739e8805e182f262c1bf7dc80b5469911e7
Author: Toms Bauģis <toms baugis gmail com>
Date: Thu Nov 19 11:39:02 2009 +0000
don't need the whole config machinery just to get day start
hamster/db.py | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/hamster/db.py b/hamster/db.py
index d3f8ab3..6dd6de2 100644
--- a/hamster/db.py
+++ b/hamster/db.py
@@ -78,16 +78,9 @@ class Storage(storage.Storage):
self.__setup.im_func.complete = True
self.run_fixtures()
- self.config = GconfStore()
-
- runtime.dispatcher.add_handler('gconf_on_day_start_changed', self.__on_day_start_changed)
- self.day_start = self.config.get_day_start()
__setup.complete = False
-
- def __on_day_start_changed(self, event, new_minutes):
- self.day_start = self.config.get_day_start()
def __get_category_list(self):
return self.fetchall("SELECT * FROM categories ORDER BY category_order")
@@ -474,8 +467,10 @@ class Storage(storage.Storage):
query += " ORDER BY a.start_time"
end_date = end_date or date
- #FIXME: add preference to set that
- split_time = self.day_start
+ from configuration import GconfStore
+ day_start = GconfStore().get_day_start()
+
+ split_time = day_start
datetime_from = dt.datetime.combine(date, split_time)
datetime_to = dt.datetime.combine(end_date, split_time) + dt.timedelta(days = 1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]