[Skencil-commits] r530 - in skencil/trunk: . Sketch/UI

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sun Mar 5 00:46:56 CET 2006


Author: bh
Date: 2006-03-05 00:46:55 +0100 (Sun, 05 Mar 2006)
New Revision: 530

Modified:
   skencil/trunk/ChangeLog
   skencil/trunk/Sketch/UI/canvas.py
   skencil/trunk/Sketch/UI/gtkmisc.py
Log:
Silence some GtkDeprecationWarning


Modified: skencil/trunk/ChangeLog
===================================================================
--- skencil/trunk/ChangeLog	2006-03-04 22:54:02 UTC (rev 529)
+++ skencil/trunk/ChangeLog	2006-03-04 23:46:55 UTC (rev 530)
@@ -1,3 +1,15 @@
+2006-03-05  Bernhard Herzog  <bh at intevation.de>
+
+	Silence some GtkDeprecationWarning
+
+	* Sketch/UI/canvas.py (SketchCanvas.update_handles_idle): Use
+	gobject.idle_add instead of gtk.idle_add
+
+	* Sketch/UI/gtkmisc.py (SketchDrawingArea.UpdateWhenIdle): Use
+	gobject.idle_add instead of gtk.idle_add
+	(SketchDrawingArea.focus_in_event)
+	(SketchDrawingArea.focus_out_event): Use True instead of gtk.TRUE
+
 2006-03-04  Bernhard Herzog  <bh at intevation.de>
 
 	* po/fr.po: Use correct charset specification.

Modified: skencil/trunk/Sketch/UI/canvas.py
===================================================================
--- skencil/trunk/Sketch/UI/canvas.py	2006-03-04 22:54:02 UTC (rev 529)
+++ skencil/trunk/Sketch/UI/canvas.py	2006-03-04 23:46:55 UTC (rev 530)
@@ -1,5 +1,5 @@
 # Sketch - A Python-based interactive drawing program
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2003, 2005 by Bernhard Herzog
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2003, 2005, 2006 by Bernhard Herzog
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Library General Public
@@ -18,7 +18,7 @@
 from types import IntType
 from math import hypot
 
-import gtk, gtk.keysyms
+import gtk, gtk.keysyms, gobject
 
 import Sketch
 from Sketch import _, Point
@@ -404,7 +404,7 @@
 
     def update_handles_idle(self):
         if self.handles_idle_tag is None:
-            self.handles_idle_tag = gtk.idle_add(self.update_handles)
+            self.handles_idle_tag = gobject.idle_add(self.update_handles)
 
     def update_handles(self, redraw = 1):
         self.handles_idle_tag = None

Modified: skencil/trunk/Sketch/UI/gtkmisc.py
===================================================================
--- skencil/trunk/Sketch/UI/gtkmisc.py	2006-03-04 22:54:02 UTC (rev 529)
+++ skencil/trunk/Sketch/UI/gtkmisc.py	2006-03-04 23:46:55 UTC (rev 530)
@@ -1,5 +1,5 @@
 # Sketch - A Python-based interactive drawing program
-# Copyright (C) 2004, 2005 by Bernhard Herzog
+# Copyright (C) 2004, 2005, 2006 by Bernhard Herzog
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 by Bernhard Herzog
 #
 # This library is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307	USA
 
 import os
-import gtk
+import gtk, gobject
 from Sketch import _, _skgtk
 from Sketch.Base import Publisher, const
 from Sketch.Graphics import CreateRGBColor
@@ -260,7 +260,7 @@
         drawingarea is to queue a redraw which is not needed in Skencil
         and just causes unnecessary redraws.
         """
-        return gtk.TRUE
+        return True
 
     def focus_out_event(self, widget, event):
         """Handle focus_out_event
@@ -269,7 +269,7 @@
         drawingarea is to queue a redraw which is not needed in Skencil
         and just causes unnecessary redraws.
         """
-        return gtk.TRUE
+        return True
 
     def configure_event(self, widget, event):
         self.ResizedMethod(event.width, event.height)
@@ -285,7 +285,7 @@
 
     def UpdateWhenIdle(self):
         if self.idle_redraw_tag is None:
-            self.idle_redraw_tag = gtk.idle_add(self.idle_redraw)
+            self.idle_redraw_tag = gobject.idle_add(self.idle_redraw)
 
     def idle_redraw(self):
         self.idle_redraw_tag = None



More information about the Skencil-commits mailing list