[PythonCAD] Twenty-fourth release of PythonCAD now available

Art Haas ahaas at airmail.net
Tue May 3 18:39:39 CEST 2005


On Mon, May 02, 2005 at 04:50:07PM -0500, Art Haas wrote:
> On Fri, Apr 29, 2005 at 04:51:52PM +1200, Wilbert Knol wrote:
> > Whilst R23 worked OK, R24 causes run-time problems:
> > (best viewed without word-wrap..)
> > 
> > [wk at wk PythonCAD-DS1-R24]$ ./gtkpycad.py
> > [ ... python backtrace ...]
> > [wk at wk PythonCAD-DS1-R24]$
> > 
> > My system is probably to blame; it has been butchered around a bit.
> 
> Hi.
> 
> No, this is a bug in that the code uses the 'set_no_show_all' method
> which is not available in older PyGTK releases. I'll fix this up
> probably with a hasattr() test and post a simple patch, but it will need
> testing, and possibly/probably other bugs of this nature may turn up.

Here's the trivial patch that will only call this method if it is
found. Please let me know if this patch is all that is needed to get
the latest PythonCAD release running on your system.

Art Haas

Index: PythonCAD/Interface/Gtk/gtkactions.py
===================================================================
--- PythonCAD/Interface/Gtk/gtkactions.py	(revision 1791)
+++ PythonCAD/Interface/Gtk/gtkactions.py	(revision 1792)
@@ -291,7 +291,8 @@
             widget.show()
         else:
             widget.hide()
-        widget.set_no_show_all(True)
+        if hasattr(widget, 'set_no_show_all'):
+            widget.set_no_show_all(True)
         if isinstance(widget, gtk.MenuItem):
             if self.__accelpath is not None:
                 self.connect_accelerator()

-- 
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822


More information about the PythonCAD mailing list