From 28e4bc9d892e4b1907d95769c1c5473c9cc016c3 Mon Sep 17 00:00:00 2001 From: Vlad Date: Tue, 18 May 2010 14:03:56 +0300 Subject: [PATCH] next step for dbus notifications --- applet/src/livewp-common.h | 4 ++++ applet/src/livewp-dbus.c | 5 ++++- applet/src/livewp-dbus.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/applet/src/livewp-common.h b/applet/src/livewp-common.h index a8bfddc..9ed2505 100644 --- a/applet/src/livewp-common.h +++ b/applet/src/livewp-common.h @@ -103,4 +103,8 @@ struct _AWallpaperPluginClass #define LIVEWP_SIGNAL_RELOAD_CONFIG_PATH "/org/maemo/livewp/reload_config" #define LIVEWP_RELOAD_CONFIG "reload_config" #define LIVEWP_RELOAD_PLUGIN "reload_plugin" +/* For DBUS */ +#define CALLNOTIF_SIGNAL_INTERFACE "org.freedesktop.Notifications" +#define CALLNOTIF_SIGNAL_PATH "/org/freedesktop/Notifications" +#define CALLNOTIF_MEMBER "NotificationClosed" #endif diff --git a/applet/src/livewp-dbus.c b/applet/src/livewp-dbus.c index ea4c06f..0520674 100644 --- a/applet/src/livewp-dbus.c +++ b/applet/src/livewp-dbus.c @@ -108,6 +108,7 @@ get_livewp_signal_cb(DBusConnection *conn, DBusMessage *msg, Animation_Wallpaper START_FUNCTION; #endif +fprintf (stderr, "PATH11111111111111111111 %s %s %s\n", dbus_message_get_path(msg), dbus_message_get_interface (msg), dbus_message_get_member (msg)); if (dbus_message_is_signal(msg, LIVEWP_SIGNAL_INTERFACE, LIVEWP_RELOAD_CONFIG)){ if(read_config(priv)){ fprintf(stderr, "\nCan not read config file.\n"); @@ -118,7 +119,9 @@ get_livewp_signal_cb(DBusConnection *conn, DBusMessage *msg, Animation_Wallpaper #endif } } + if (dbus_message_is_signal(msg, CALLNOTIF_SIGNAL_INTERFACE, CALLNOTIF_MEMBER)){ + fprintf(stderr,"