Skip to content

Commit

Permalink
Simplified OS X GIMP and Photoshop calling code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Beep6581 committed Jul 14, 2016
1 parent 5127e94 commit 0608ad8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions rtgui/extprog.cc
Expand Up @@ -250,7 +250,10 @@ bool ExtProgStore::openInGimp (const Glib::ustring& fileName)

#elif defined __APPLE__

auto cmdLine = Glib::ustring("open -a /Applications/GIMP.app \'") + fileName + Glib::ustring("\'");
// Apps should be opened using the simplest, case-insensitive form, "open -a NameOfProgram"
// Calling the executable directly is said to often cause trouble,
// https://discuss.pixls.us/t/affinity-photo-as-external-editor-how-to/1756/18
auto cmdLine = Glib::ustring("open -a GIMP \'") + fileName + Glib::ustring("\'");
auto success = spawnCommandAsync (cmdLine);

#else
Expand Down Expand Up @@ -279,7 +282,7 @@ bool ExtProgStore::openInGimp (const Glib::ustring& fileName)

#elif defined __APPLE__

cmdLine = Glib::ustring("open -a /Applications/Gimp.app/Contents/Resources/start \'") + fileName + Glib::ustring("\'");
cmdLine = Glib::ustring("open -a GIMP-dev \'") + fileName + Glib::ustring("\'");
success = ExtProgStore::spawnCommandAsync (cmdLine);

#else
Expand All @@ -301,7 +304,7 @@ bool ExtProgStore::openInPhotoshop (const Glib::ustring& fileName)

#elif defined __APPLE__

const auto cmdLine = Glib::ustring("open -a \'") + Glib::build_filename(options.psDir, "Photoshop.app\' ") + Glib::ustring("\'") + fileName + Glib::ustring("\'");
const auto cmdLine = Glib::ustring("open -a Photoshop \'") + fileName + Glib::ustring("\'");

#else

Expand Down

0 comments on commit 0608ad8

Please sign in to comment.