Commit e505a992 authored by sumpfralle's avatar sumpfralle

skip "gtk.RecentManager" if it is not available (e.g. currently for the...

skip "gtk.RecentManager" if it is not available (e.g. currently for the "appunti" Windows packages of GTK)


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@299 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent c2107532
...@@ -1885,8 +1885,14 @@ class ProjectGui: ...@@ -1885,8 +1885,14 @@ class ProjectGui:
dialog.destroy() dialog.destroy()
# add the file to the list of recently used ones # add the file to the list of recently used ones
if filename: if filename:
try:
recent = gtk.RecentManager() recent = gtk.RecentManager()
recent.add_item("file://%s" % str(filename)) recent.add_item("file://%s" % str(filename))
except AttributeError:
# GTK 2.12.1 seems to have problems with "RecentManager" on Windows.
# Sadly this is the version, that is shipped with the "appunti" GTK
# packages for Windows (April 2010).
pass
return filename return filename
def setOutputFilename(self, filename): def setOutputFilename(self, filename):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment