[PythonCAD] Need testers for PyGTK compatiblity patch
Art Haas
ahaas at airmail.net
Thu May 5 17:07:36 CEST 2005
Hi.
The previous patch is apparently not going to work, so I'm offering this
one as a second try. I'm not sure yet how to replace the
connect_by_path() method, or actually if the code in the gtkmenus.py
file that handles connecting the menu items to the accelgroup will
do the job for us.
Please test this on a machine using a PyGTK release prior to 2.4 and
let me know if things work.
Art
Index: PythonCAD/Interface/Gtk/gtkactions.py
===================================================================
--- PythonCAD/Interface/Gtk/gtkactions.py (revision 1791)
+++ PythonCAD/Interface/Gtk/gtkactions.py (revision 1801)
@@ -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()
@@ -363,8 +364,9 @@
if _count == 0:
# print "calling accelgroup.connect_by_path()"
# print "accelpath: " + self.__accelpath
- self.__accelgroup.connect_by_path(self.__accelpath,
- self._accel_cb)
+ if hasattr(self.__accelgroup, 'connect_by_path'):
+ self.__accelgroup.connect_by_path(self.__accelpath,
+ self._accel_cb)
_count = _count + 1
def disconnect_accelerator(self):
--
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