Add function for opening images with Gio::AppInfo
This commit is contained in:
@@ -339,3 +339,8 @@ bool ExtProgStore::openInCustomEditor (const Glib::ustring& fileName)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ExtProgStore::openInExternalEditor(const Glib::ustring &fileName, const Glib::RefPtr<Gio::AppInfo> &editorInfo)
|
||||||
|
{
|
||||||
|
return editorInfo->launch(Gio::File::create_for_path(fileName));
|
||||||
|
}
|
||||||
|
@@ -24,6 +24,11 @@
|
|||||||
|
|
||||||
#include "threadutils.h"
|
#include "threadutils.h"
|
||||||
|
|
||||||
|
namespace Gio
|
||||||
|
{
|
||||||
|
class AppInfo;
|
||||||
|
}
|
||||||
|
|
||||||
struct ExtProgAction
|
struct ExtProgAction
|
||||||
{
|
{
|
||||||
Glib::ustring filePathEXE;
|
Glib::ustring filePathEXE;
|
||||||
@@ -64,6 +69,7 @@ public:
|
|||||||
static bool openInGimp (const Glib::ustring& fileName);
|
static bool openInGimp (const Glib::ustring& fileName);
|
||||||
static bool openInPhotoshop (const Glib::ustring& fileName);
|
static bool openInPhotoshop (const Glib::ustring& fileName);
|
||||||
static bool openInCustomEditor (const Glib::ustring& fileName);
|
static bool openInCustomEditor (const Glib::ustring& fileName);
|
||||||
|
static bool openInExternalEditor(const Glib::ustring &fileName, const Glib::RefPtr<Gio::AppInfo> &editorInfo);
|
||||||
};
|
};
|
||||||
|
|
||||||
#define extProgStore ExtProgStore::getInstance()
|
#define extProgStore ExtProgStore::getInstance()
|
||||||
|
Reference in New Issue
Block a user