plugins/tools: make file path build logic conform to Python standards

svn: r12450
This commit is contained in:
Gerald Britton
2009-04-15 19:27:17 +00:00
parent 1c7daa4ed5
commit 82aac3836f
11 changed files with 99 additions and 33 deletions

View File

@ -50,6 +50,13 @@ from PluginUtils import Tool
from gen.plug import PluginManager
import ManagedWindow
#-------------------------------------------------------------------------
#
# Constants
#
#-------------------------------------------------------------------------
_GLADE_FILE = "eval.glade"
#-------------------------------------------------------------------------
#
# Actual tool
@ -62,9 +69,10 @@ class Eval(Tool.Tool,ManagedWindow.ManagedWindow):
Tool.Tool.__init__(self,dbstate, options_class, name)
ManagedWindow.ManagedWindow.__init__(self,uistate,[],self.__class__)
base = os.path.dirname(__file__)
glade_file = base + os.sep + "eval.glade"
glade_file = '/tmp/eval.glade'
glade_file = os.path.join(
os.path.split(__file__)[0],
_GLADE_FILE)
self.glade = gtk.Builder()
self.glade.add_from_file(glade_file)