After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 353719 - recorder has path to glade and icons file paths hardcoded in script
recorder has path to glade and icons file paths hardcoded in script
Status: RESOLVED FIXED
Product: dogtail
Classification: Deprecated
Component: Recorder
CVS HEAD
Other Linux
: Normal normal
: ---
Assigned To: Dogtail Maintainers
Dogtail Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-31 18:57 UTC by Tim Lee
Modified: 2006-09-11 16:37 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description Tim Lee 2006-08-31 18:57:05 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')
Comment 1 Zack Cerza 2006-09-11 16:37:42 UTC
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')