[Gimp-developer] [PATCH] app: avoid D-Bus error message when built without D-Bus support

It is pointless to connect to a message bus when GIMP has been compiled
without D-Bus support. Although it's harmless, the resulting error
message is confusing and should be avoided.

So only compile gimp_unique_dbus_open() in its entirety if
 app/unique.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/unique.c b/app/unique.c
index 8e0f477..649f3ab 100644
--- a/app/unique.c
+++ b/app/unique.c
@@ -71,7 +71,7 @@ gimp_unique_dbus_open (const gchar **filenames,
                        gboolean      as_new)
   GDBusConnection *connection;
   GError          *error = NULL;

@@ -158,6 +158,7 @@ gimp_unique_dbus_open (const gchar **filenames,
       g_clear_error (&error);

   return FALSE;

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]