From: Jeff E. <gi...@gi...> - 2009-11-29 14:40:40
|
touchy should use same glade file location as our other programs http://git.linuxcnc.org/?p=emc2.git;a=commitdiff;h=c9eb4e3 --- src/emc/usr_intf/touchy/Submakefile | 8 ++++---- src/emc/usr_intf/touchy/touchy.py | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/emc/usr_intf/touchy/Submakefile b/src/emc/usr_intf/touchy/Submakefile index 8993f30..e3d0697 100644 --- a/src/emc/usr_intf/touchy/Submakefile +++ b/src/emc/usr_intf/touchy/Submakefile @@ -1,7 +1,7 @@ TOUCHY_MODULES = mdi emc_interface hal_interface filechooser listing preferences PYTARGETS += ../bin/touchy ../lib/python/touchy/__init__.py $(patsubst %,../lib/python/touchy/%.py,$(TOUCHY_MODULES)) \ - ../lib/python/touchy/touchy.glade + ../share/emc/touchy.glade PYI18NSRCS += emc/usr_intf/touchy/touchy.py $(patsubst %,emc/usr_intf/touchy/%.py,$(TOUCHY_MODULES)) \ emc/usr_intf/touchy/touchy.glade @@ -16,10 +16,10 @@ PYI18NSRCS += emc/usr_intf/touchy/touchy.py $(patsubst %,emc/usr_intf/touchy/%.p @mkdir -p ../lib/python/touchy @cp $< $@ -../lib/python/touchy/touchy.glade: emc/usr_intf/touchy/touchy.glade +../share/emc/touchy.glade: emc/usr_intf/touchy/touchy.glade $(ECHO) Copying glade file $(notdir $@) - @mkdir -p ../lib/python/touchy - @cp $< $@ + mkdir -p $(dir $@) + cp -f $< $@ ../bin/touchy: emc/usr_intf/touchy/touchy.py @$(ECHO) Syntax checking python script $(notdir $@) diff --git a/src/emc/usr_intf/touchy/touchy.py b/src/emc/usr_intf/touchy/touchy.py index a758295..4851623 100755 --- a/src/emc/usr_intf/touchy/touchy.py +++ b/src/emc/usr_intf/touchy/touchy.py @@ -18,6 +18,7 @@ import sys, os BASE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "..")) libdir = os.path.join(BASE, "lib", "python") +datadir = os.path.join(BASE, "share", "emc") sys.path.insert(0, libdir) try: import pygtk @@ -90,7 +91,7 @@ invisible = gtk.gdk.Cursor(pix, pix, color, color, 0, 0) class touchy: def __init__(self): #Set the Glade file - self.gladefile = os.path.join(libdir, "touchy.glade") + self.gladefile = os.path.join(datadir, "touchy.glade") self.wTree = gtk.glade.XML(self.gladefile) self.num_mdi_labels = 11 |