[Galago-commits] r2410 - in trunk/notify-daemon-ng: . src

galago-commits at freedesktop.org galago-commits at freedesktop.org
Tue Jan 10 23:33:19 PST 2006


Author: chipx86
Date: 2006-01-10 23:33:17 -0800 (Tue, 10 Jan 2006)
New Revision: 2410

Modified:
   trunk/notify-daemon-ng/ChangeLog
   trunk/notify-daemon-ng/configure.ac
   trunk/notify-daemon-ng/src/eggnotificationbubblewidget.c
   trunk/notify-daemon-ng/src/notifydaemon.c
Log:
Although it's a small hack, add support back for D-BUS 0.36+.


Modified: trunk/notify-daemon-ng/ChangeLog
===================================================================
--- trunk/notify-daemon-ng/ChangeLog	2006-01-11 06:57:59 UTC (rev 2409)
+++ trunk/notify-daemon-ng/ChangeLog	2006-01-11 07:33:17 UTC (rev 2410)
@@ -1,3 +1,10 @@
+Tue Jan 10 23:32:55 PST 2006  Christian Hammond <chipx86 at chipx86.com>
+
+	* src/eggnotificationbubblewidget.c:
+	* src/notifydaemon.c:
+	* configure.ac:
+	  - Although it's a small hack, add support back for D-BUS 0.36+.
+
 Tue Jan 10 22:57:51 PST 2006  Christian Hammond <chipx86 at chipx86.com>
 
 	* src/eggnotificationbubblewidget.c:

Modified: trunk/notify-daemon-ng/configure.ac
===================================================================
--- trunk/notify-daemon-ng/configure.ac	2006-01-11 06:57:59 UTC (rev 2409)
+++ trunk/notify-daemon-ng/configure.ac	2006-01-11 07:33:17 UTC (rev 2410)
@@ -68,7 +68,8 @@
 
 AC_CHECK_LIB([popt], [poptGetArg], , AC_MSG_ERROR([Popt is required]))
 
-pkg_modules="gtk+-2.0 >= 2.2.2 glib-2.0 >= 2.2.2, dbus-1 >= 0.60, dbus-glib-1 >= 0.60"
+REQ_DBUS_VERSION=0.36
+pkg_modules="gtk+-2.0 >= 2.2.2 glib-2.0 >= 2.2.2, dbus-1 >= $REQ_DBUS_VERSION, dbus-glib-1 >= $REQ_DBUS_VERSION"
 PKG_CHECK_MODULES(NOTIFY_DAEMON, [$pkg_modules])
 AC_SUBST(NOTIFY_DAEMON_CFLAGS)
 AC_SUBST(NOTIFY_DAEMON_LIBS)

Modified: trunk/notify-daemon-ng/src/eggnotificationbubblewidget.c
===================================================================
--- trunk/notify-daemon-ng/src/eggnotificationbubblewidget.c	2006-01-11 06:57:59 UTC (rev 2409)
+++ trunk/notify-daemon-ng/src/eggnotificationbubblewidget.c	2006-01-11 07:33:17 UTC (rev 2410)
@@ -963,6 +963,8 @@
   channel_intensity = color1.blue * factor + color2.blue * (1 - factor);
   result.blue = CLAMP (channel_intensity, 0, 65535);
 
+  result.pixel = 0xFF; /* This is never really used. */
+
   return result;
 }
 

Modified: trunk/notify-daemon-ng/src/notifydaemon.c
===================================================================
--- trunk/notify-daemon-ng/src/notifydaemon.c	2006-01-11 06:57:59 UTC (rev 2409)
+++ trunk/notify-daemon-ng/src/notifydaemon.c	2006-01-11 07:33:17 UTC (rev 2410)
@@ -54,6 +54,21 @@
   GSList *poptart_stack;
 };
 
+#define CHECK_DBUS_VERSION(major, minor) \
+	(DBUS_MAJOR_VER > (major) || \
+	 (DBUS_MAJOR_VER == (major) && DBUS_MINOR_VER >= (minor)))
+
+#if !CHECK_DBUS_VERSION(0, 60)
+/* This is a hack that will go away in time. For now, it's fairly safe. */
+struct _DBusGMethodInvocation
+{
+	DBusGConnection *connection;
+	DBusGMessage *message;
+	const DBusGObjectInfo *object;
+	const DBusGMethodInfo *method;
+};
+#endif /* D-BUS < 0.60 */
+
 static void notify_daemon_finalize (GObject * object);
 static void _emit_closed_signal (GObject *notify_widget);
 
@@ -148,8 +163,7 @@
 
       dest = g_object_get_data (notify_widget,
                                 "_notify_sender");
-      id = GPOINTER_TO_UINT (g_object_get_data (notify_widget,
-                                                "_notify_id"));
+      id = GPOINTER_TO_UINT (g_object_get_data (notify_widget, "_notify_id"));
 
       g_assert (dest != NULL);
 
@@ -622,7 +636,8 @@
       link = link->next;
     }
 
-  g_signal_connect (bw, "destroy", _remove_bubble_from_poptart_stack, daemon);
+  g_signal_connect(G_OBJECT(bw), "destroy",
+				   G_CALLBACK(_remove_bubble_from_poptart_stack), daemon);
   priv->poptart_stack = g_slist_prepend (priv->poptart_stack, bw); 
 }
 
@@ -747,7 +762,12 @@
   else
     return_id = id;
 
+#if CHECK_DBUS_VERSION(0, 60)
   sender = dbus_g_method_get_sender (context);
+#else
+  sender = g_strdup(dbus_message_get_sender(
+	dbus_g_message_get_message(context->message)));
+#endif
 
   g_object_set_data (G_OBJECT (bw), "_notify_id", GUINT_TO_POINTER (return_id));
   g_object_set_data_full (G_OBJECT (bw), 



More information about the galago-commits mailing list