From fc8c3af3634ac6454d2ec7227bd958aa0201de89 Mon Sep 17 00:00:00 2001 From: tommy Date: Fri, 15 May 2009 06:12:28 +1200 Subject: [PATCH] Ensure tablet-config can find files when installed someplace other than /usr --- code/tablet-config | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/tablet-config b/code/tablet-config index c355259..a21abde 100755 --- a/code/tablet-config +++ b/code/tablet-config @@ -763,8 +763,14 @@ if __name__ == '__main__': statusicon = gtk.status_icon_new_from_file("./input-tablet.svg") gladefile = "./tablet-config.glade" else: - statusicon = gtk.status_icon_new_from_file("/usr/share/icons/input-tablet.svg") - gladefile = "/usr/share/tablet-apps/tablet-config.glade" + script = sys.argv[0] + if script.endswith('bin/tablet-config'): + prefix = script.replace('bin/tablet-config', '') + else: + prefix = '/usr' + iconfile = os.path.join(prefix, 'share/tablet-apps/input-tablet.svg') + statusicon = gtk.status_icon_new_from_file(iconfile) + gladefile = os.path.join(prefix, 'share/tablet-apps/tablet-config.glade') a = GraphicsTabletApplet(gladefile, statusicon) a.Run() -- 2.11.4.GIT