Fix external editor on macOS
Avoid using Gio::AppInfo.
This commit is contained in:
@@ -42,6 +42,13 @@ struct ExtProgAction
|
||||
bool execute (const std::vector<Glib::ustring>& fileNames) const;
|
||||
};
|
||||
|
||||
struct EditorInfo
|
||||
{
|
||||
Glib::ustring name;
|
||||
Glib::ustring commandline;
|
||||
bool isNativeCommand;
|
||||
};
|
||||
|
||||
// Stores all external programs that could be called by the user
|
||||
class ExtProgStore
|
||||
{
|
||||
@@ -70,7 +77,7 @@ public:
|
||||
static bool openInGimp (const Glib::ustring& fileName);
|
||||
static bool openInPhotoshop (const Glib::ustring& fileName);
|
||||
static bool openInCustomEditor (const Glib::ustring& fileName, const Glib::ustring* command = nullptr);
|
||||
static bool openInExternalEditor(const Glib::ustring &fileName, const Glib::RefPtr<Gio::AppInfo> &editorInfo, bool nativeCommand);
|
||||
static bool openInExternalEditor(const Glib::ustring &fileName, const EditorInfo &editorInfo);
|
||||
};
|
||||
|
||||
#define extProgStore ExtProgStore::getInstance()
|
||||
|
Reference in New Issue
Block a user