diff --git a/rtgui/extprog.cc b/rtgui/extprog.cc index 57d57ecd8..939ead608 100644 --- a/rtgui/extprog.cc +++ b/rtgui/extprog.cc @@ -339,3 +339,8 @@ bool ExtProgStore::openInCustomEditor (const Glib::ustring& fileName) #endif } + +bool ExtProgStore::openInExternalEditor(const Glib::ustring &fileName, const Glib::RefPtr &editorInfo) +{ + return editorInfo->launch(Gio::File::create_for_path(fileName)); +} diff --git a/rtgui/extprog.h b/rtgui/extprog.h index c5e00bb1b..86dbc1674 100644 --- a/rtgui/extprog.h +++ b/rtgui/extprog.h @@ -24,6 +24,11 @@ #include "threadutils.h" +namespace Gio +{ + class AppInfo; +} + struct ExtProgAction { Glib::ustring filePathEXE; @@ -64,6 +69,7 @@ public: static bool openInGimp (const Glib::ustring& fileName); static bool openInPhotoshop (const Glib::ustring& fileName); static bool openInCustomEditor (const Glib::ustring& fileName); + static bool openInExternalEditor(const Glib::ustring &fileName, const Glib::RefPtr &editorInfo); }; #define extProgStore ExtProgStore::getInstance()