GNOME Bugzilla – Bug 353719
recorder has path to glade and icons file paths hardcoded in script
Last modified: 2006-09-11 16:37:42 UTC
In the recorder script has the path to the glade and icon files hard coded in the script. For example: x = gtk.glade.XML('/usr/share/dogtail/glade/recorder.glade') Which causes problems if you install to a different prefix. So I worked around this by adding code like this (admittedly not very elegant): exec_root = sys.argv[0].split("/bin/")[0] if exec_root[0] is not '/': exec_root = "/usr" try: x = gtk.glade.XML('recorder.glade') except RuntimeError: x = gtk.glade.XML(exec_root + '/share/dogtail/glade/recorder.glade')
Thanks for the report, and the fix. I modified it very slightly, and committed it: try: x = gtk.glade.XML('recorder.glade') except RuntimeError: import sys exec_root = sys.argv[0].split("/bin/")[0] if exec_root[0] is not '/': exec_root = "/usr" x = gtk.glade.XML(exec_root + '/share/dogtail/glade/recorder.glade')