[Gimp-developer] [PATCH] app: avoid D-Bus error message when built without D-Bus support
- From: Ingo Brückl <ib wupperonline de>
- To: gimp-developer-list gnome org
- Subject: [Gimp-developer] [PATCH] app: avoid D-Bus error message when built without D-Bus support
- Date: Thu, 06 Oct 2016 03:07:25 +0200
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
HAVE_DBUS_GLIB.
---
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)
{
#ifndef GIMP_CONSOLE_COMPILATION
-
+#if HAVE_DBUS_GLIB
GDBusConnection *connection;
GError *error = NULL;
@@ -158,6 +158,7 @@ gimp_unique_dbus_open (const gchar **filenames,
g_clear_error (&error);
}
#endif
+#endif
return FALSE;
}
--
2.9.2
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]