aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-01-15 19:49:23 -0600
committerTed Gould <ted@canonical.com>2009-01-15 19:49:23 -0600
commite50f228a7e4116c902a992a12ce9332c4481bf4c (patch)
treeefb5a67ccdebe2c65cb9e16adac75b47f846a318
parentd1c2ed2c5ccdfefc8c63e591a1742d8d61f310c4 (diff)
downloadlibayatana-indicator-e50f228a7e4116c902a992a12ce9332c4481bf4c.tar.gz
libayatana-indicator-e50f228a7e4116c902a992a12ce9332c4481bf4c.tar.bz2
libayatana-indicator-e50f228a7e4116c902a992a12ce9332c4481bf4c.zip
Adding in a marshaller for the DBus signals that we need
-rw-r--r--libindicate/Makefile.am16
-rw-r--r--libindicate/listener-marshal.list2
-rw-r--r--libindicate/listener.c9
3 files changed, 26 insertions, 1 deletions
diff --git a/libindicate/Makefile.am b/libindicate/Makefile.am
index b3c173a..53917b7 100644
--- a/libindicate/Makefile.am
+++ b/libindicate/Makefile.am
@@ -9,7 +9,9 @@ EXTRA_DIST = \
BUILT_SOURCES = \
dbus-indicate-server.h \
- dbus-indicate-client.h
+ dbus-indicate-client.h \
+ listener-marshal.c \
+ listener-marshal.h
lib_LTLIBRARIES = \
libindicate.la
@@ -30,6 +32,8 @@ libindicate_la_SOURCES = \
dbus-indicate-client.h \
server.c \
listener.c \
+ listener-marshal.c \
+ listener-marshal.h \
indicator.c
libindicate_la_LDFLAGS = \
@@ -57,5 +61,15 @@ dbus-indicate-client.h: indicate-interface.xml
--output=dbus-indicate-client.h \
$(srcdir)/indicate-interface.xml
+listener-marshal.h: listener-marshal.list
+ libtool --mode=execute glib-genmarshal --header \
+ --prefix=indicate_listener_marshal $(srcdir)/listener-marshal.list \
+ > listener-marshal.h
+
+listener-marshal.c: listener-marshal.list
+ libtool --mode=execute glib-genmarshal --body \
+ --prefix=indicate_listener_marshal $(srcdir)/listener-marshal.list \
+ > listener-marshal.c
+
pkgconfig_DATA = indicate.pc
pkgconfigdir = $(libdir)/pkgconfig
diff --git a/libindicate/listener-marshal.list b/libindicate/listener-marshal.list
new file mode 100644
index 0000000..c02c70f
--- /dev/null
+++ b/libindicate/listener-marshal.list
@@ -0,0 +1,2 @@
+# IndicatorAdded, IndicatorRemoved, IndicatorModified
+VOID:UINT,STRING
diff --git a/libindicate/listener.c b/libindicate/listener.c
index e60ad0f..a26ddcc 100644
--- a/libindicate/listener.c
+++ b/libindicate/listener.c
@@ -1,5 +1,6 @@
#include "listener.h"
+#include "listener-marshal.h"
#include <dbus/dbus-glib-bindings.h>
#include "dbus-indicate-client.h"
@@ -76,6 +77,12 @@ indicate_listener_class_init (IndicateListenerClass * class)
G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING);
*/
+ dbus_g_object_register_marshaller(indicate_listener_marshal_VOID__UINT_STRING,
+ G_TYPE_NONE,
+ G_TYPE_UINT,
+ G_TYPE_STRING,
+ G_TYPE_INVALID);
+
return;
}
@@ -255,6 +262,7 @@ todo_idle (gpointer data)
IndicateListener * listener = INDICATE_LISTENER(data);
if (listener == NULL) {
g_error("Listener got lost in todo_idle");
+ listener->todo_idle = 0;
return FALSE;
}
@@ -262,6 +270,7 @@ todo_idle (gpointer data)
/* Basically if we have no todo, we need to stop running. This
* is done this way to make the function error handling simpler
* and results in an extra run */
+ listener->todo_idle = 0;
return FALSE;
}