[hamster-applet] fixed warning about cell size returned as a float



commit 9df11831f3f4a19a75d147f8c4eb40f87a04f56e
Author: Toms Bauģis <toms baugis gmail com>
Date:   Wed Jul 14 13:23:34 2010 +0100

    fixed warning about cell size returned as a float

 src/hamster/widgets/facttree.py |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)
---
diff --git a/src/hamster/widgets/facttree.py b/src/hamster/widgets/facttree.py
index c06187e..1d96b4a 100644
--- a/src/hamster/widgets/facttree.py
+++ b/src/hamster/widgets/facttree.py
@@ -416,14 +416,6 @@ class FactCellRenderer(gtk.GenericCellRenderer):
             self.render_cell(context, (x,y,width,height), widget)
 
 
-
-    def set_color(self, context, color):
-        context.set_source_rgba(*self.color_to_cairo_rgba(color))
-
-    def color_to_cairo_rgba(self, c, a=1):
-        return c.red/65535.0, c.green/65535.0, c.blue/65535.0, a
-
-
     def render_cell(self, context, bounds, widget, really = True):
         if not bounds:
             return -1
@@ -451,7 +443,6 @@ class FactCellRenderer(gtk.GenericCellRenderer):
 
 
 
-
         """ start time and end time at beginning of column """
         interval = fact["start_time"].strftime("%H:%M -")
         if fact["end_time"]:
@@ -584,7 +575,7 @@ class FactCellRenderer(gtk.GenericCellRenderer):
     def on_get_size(self, widget, cell_area):
         if "id" not in self.data:
             if self.data["first"]:
-                return (0, 0, 0, (self.default_size + 10) * 1.5)
+                return (0, 0, 0, int((self.default_size + 10) * 1.5))
             else:
                 return (0, 0, 0, (self.default_size + 10) * 2)
 



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