From 98ec7731e724a074ab0e0f8b36b838e0b40b083b Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Tue, 3 Nov 2009 12:01:33 +0000 Subject: [PATCH] Used the gramps way of editing files svn: r13489 --- src/PluginUtils/_PluginWindows.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/PluginUtils/_PluginWindows.py b/src/PluginUtils/_PluginWindows.py index 95eb4ae24..6ea7a6a4a 100644 --- a/src/PluginUtils/_PluginWindows.py +++ b/src/PluginUtils/_PluginWindows.py @@ -47,6 +47,7 @@ import gobject import ManagedWindow import Errors from gen.plug import PluginRegister, PTYPE_STR +from gui.utils import open_file_with_default_application from gui.pluginmanager import GuiPluginManager import _Tool as Tool from QuestionDialog import InfoDialog @@ -311,12 +312,9 @@ Location: %(fpath)s return id = model.get_value(node, 4) pdata = self.__preg.get_plugin(id) - if "EDITOR" in os.environ: - os.system("""$EDITOR "%s" &""" % - os.path.join(pdata.fpath, pdata.fname)) - else: - os.system("""gedit "%s" &""" % - os.path.join(pdata.fpath, pdata.fname)) + open_file_with_default_application( + os.path.join(pdata.fpath, pdata.fname) + ) #------------------------------------------------------------------------- #