hamster-applet r834 - trunk/hamster



Author: tbaugis
Date: Wed Mar  4 22:50:06 2009
New Revision: 834
URL: http://svn.gnome.org/viewvc/hamster-applet?rev=834&view=rev

Log:
disabled scaling for now - it needs more work: the -1 interval 
should apply just for totals per day and should not influence
all other numbers. And the movement was a bit jerky.

Modified:
   trunk/hamster/stats.py

Modified: trunk/hamster/stats.py
==============================================================================
--- trunk/hamster/stats.py	(original)
+++ trunk/hamster/stats.py	Wed Mar  4 22:50:06 2009
@@ -70,10 +70,7 @@
                                         show_scale = True,
                                         max_bar_width = 35,
                                         grid_stride = 4,
-                                        legend_width = 20,
-                                        more_on_left = self.more_on_left,
-                                        less_on_left = self.less_on_left,
-                                        min_key_count = 8)
+                                        legend_width = 20)
         self.get_widget("totals_by_day").add(self.day_chart)
 
 
@@ -96,9 +93,9 @@
                                       dt.timedelta(self.view_date.weekday() + 1)
         # look if we need to start on sunday or monday
         self.start_date = self.start_date + \
-                                      dt.timedelta(self.locale_first_weekday() - 1)
+                                      dt.timedelta(self.locale_first_weekday())
         
-        self.end_date = self.start_date + dt.timedelta(7)
+        self.end_date = self.start_date + dt.timedelta(6)
 
         
         self.week_view = self.get_widget("week")
@@ -165,6 +162,10 @@
                 cell.set_property('markup', markup)
 
         def duration_painter(column, cell, model, iter):
+            cell.set_property('xalign', 1)
+            cell.set_property('yalign', 0)
+    
+
             text = model.get_value(iter, 2)
             if model.iter_parent(iter) == None:
                 if model.get_path(iter) == (0,):
@@ -174,9 +175,6 @@
             cell.set_property('markup', text)
     
 
-        self.insensitive_color = gtk.Label().style.fg[gtk.STATE_INSENSITIVE].to_string()
-
-
         self.fact_tree = self.get_widget("facts")
         self.fact_tree.set_headers_visible(False)
         self.fact_tree.set_tooltip_column(1)
@@ -196,6 +194,10 @@
         timeCell = gtk.CellRendererText()
         timeColumn.pack_end(timeCell, True)
         timeColumn.set_cell_data_func(timeCell, duration_painter)
+
+
+
+
         self.fact_tree.append_column(timeColumn)
         
         self.fact_tree.set_model(self.fact_store)
@@ -457,8 +459,8 @@
         self.view_date = dt.date.today()
         if self.week_view.get_active():
             self.start_date = self.view_date - dt.timedelta(self.view_date.weekday() + 1)
-            self.start_date = self.start_date + dt.timedelta(self.locale_first_weekday() -1)
-            self.end_date = self.start_date + dt.timedelta(7)
+            self.start_date = self.start_date + dt.timedelta(self.locale_first_weekday())
+            self.end_date = self.start_date + dt.timedelta(6)
         
         elif self.month_view.get_active():
             self.start_date = self.view_date - dt.timedelta(self.view_date.day - 1) #set to beginning of month



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]