[hamster-applet] avoid area filling change context



commit 141fd3acda332be79f43454544668836210b9db3
Author: Toms Bauģis <toms baugis gmail com>
Date:   Sun Jun 14 16:18:41 2009 +0100

    avoid area filling change context

 hamster/graphics.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/hamster/graphics.py b/hamster/graphics.py
index 0b51b31..0213aeb 100644
--- a/hamster/graphics.py
+++ b/hamster/graphics.py
@@ -138,6 +138,7 @@ class Area(gtk.DrawingArea):
         return x, y            
         
     def fill_area(self, x, y, w, h, color):
+        self.context.save()
         if color[0] > 1: color = [c / 256.0 for c in color]
 
         if len(color) == 3:
@@ -147,6 +148,7 @@ class Area(gtk.DrawingArea):
             
         self.context.rectangle(x, y, w, h)
         self.context.fill()
+        self.context.restore()
 
     def longest_label(self, labels):
         """returns width of the longest label"""



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