From e2a5d2a1c718623aaa99699a2be6d39a327a33c8 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Mon, 21 Aug 2006 06:03:11 +0000 Subject: Fix for bug #308271 svn path=/trunk/; revision=32608 --- plugins/new-mail-notify/new-mail-notify.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'plugins/new-mail-notify/new-mail-notify.c') diff --git a/plugins/new-mail-notify/new-mail-notify.c b/plugins/new-mail-notify/new-mail-notify.c index d2af002338..c3afa898b2 100644 --- a/plugins/new-mail-notify/new-mail-notify.c +++ b/plugins/new-mail-notify/new-mail-notify.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -45,7 +46,7 @@ static DBusConnection *bus = NULL; static gboolean enabled = FALSE; static void -send_dbus_message (const char *name, const char *data) +send_dbus_message (const char *name, const char *data, gboolean resolve) { DBusMessage *message; @@ -62,6 +63,18 @@ send_dbus_message (const char *name, const char *data) #endif DBUS_TYPE_INVALID); + if (resolve) { + char * display_name = em_utils_folder_name_from_uri(data); + dbus_message_append_args (message, +#if DBUS_VERSION >= 310 + DBUS_TYPE_STRING, &display_name, +#else + DBUS_TYPE_STRING, display_name, +#endif + DBUS_TYPE_INVALID); + + } + /* Sends the message */ dbus_connection_send (bus, message, NULL); @@ -73,14 +86,14 @@ void org_gnome_message_reading_notify (EPlugin *ep, EMEventTargetMessage *t) { if (bus != NULL) - send_dbus_message ("MessageReading", t->folder->name); + send_dbus_message ("MessageReading", t->folder->name, FALSE); } void org_gnome_new_mail_notify (EPlugin *ep, EMEventTargetFolder *t) { if (bus != NULL) - send_dbus_message ("Newmail", t->uri); + send_dbus_message ("Newmail", t->uri, TRUE); } -- cgit v1.2.3