macos: do not call dbus for uniqueness

DBus can cause instability on the MacOS platform, and regardless
MacOS handles application uniqueness already.

The batch version has also been modified as it only applies if
compiled as an application, since it returns FALSE if it is complied
as a console app.

(cherry picked from commit 9102e47637)
This commit is contained in:
Lukas Oberhuber
2023-01-08 22:55:55 +00:00
committed by Jehan
parent 68e637bd44
commit be38a37444

View File

@ -48,6 +48,8 @@ gimp_unique_open (const gchar **filenames,
{ {
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
return gimp_unique_win32_open (filenames, as_new); return gimp_unique_win32_open (filenames, as_new);
#elif defined (PLATFORM_OSX)
return FALSE;
#else #else
return gimp_unique_dbus_open (filenames, as_new); return gimp_unique_dbus_open (filenames, as_new);
#endif #endif
@ -60,6 +62,8 @@ gimp_unique_batch_run (const gchar *batch_interpreter,
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
g_printerr ("Batch commands cannot be run in existing instance in Win32.\n"); g_printerr ("Batch commands cannot be run in existing instance in Win32.\n");
return FALSE; return FALSE;
#elif defined (PLATFORM_OSX)
return FALSE;
#else #else
return gimp_unique_dbus_batch_run (batch_interpreter, return gimp_unique_dbus_batch_run (batch_interpreter,
batch_commands); batch_commands);