Hi.
Here's the latest patch I'm hoping people with older machines can test.
The addition of the hasattr() tests has apparently resolved part of the
problems on running on older machines, and the get_action() fix at the
top of the patch was a genuine bug. Please test this if you are running
PythonCAD on a system using PyGTK releases older than 2.4.
Thanks.
Art
Index: PythonCAD/Interface/Gtk/gtkactions.py
===================================================================
--- PythonCAD/Interface/Gtk/gtkactions.py (revision 1791)
+++ PythonCAD/Interface/Gtk/gtkactions.py (working copy)
@@ -82,7 +82,7 @@
self.visible = visible
def get_action(self, action):
- return self.__actions.get(action.get_name())
+ return self.__actions.get(action)
def list_actions(self):
return self.__actions.values()
@@ -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
_______________________________________________
PythonCAD mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pythoncad