aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/new-mail-notify
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2006-08-21 14:03:11 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2006-08-21 14:03:11 +0800
commite2a5d2a1c718623aaa99699a2be6d39a327a33c8 (patch)
treed609eac2a903ccecd342c9ed85ad5c5e699be83b /plugins/new-mail-notify
parent8177c10b7843a873cb1feefd390363c1518e805d (diff)
downloadgsoc2013-evolution-e2a5d2a1c718623aaa99699a2be6d39a327a33c8.tar.gz
gsoc2013-evolution-e2a5d2a1c718623aaa99699a2be6d39a327a33c8.tar.zst
gsoc2013-evolution-e2a5d2a1c718623aaa99699a2be6d39a327a33c8.zip
Fix for bug #308271
svn path=/trunk/; revision=32608
Diffstat (limited to 'plugins/new-mail-notify')
-rw-r--r--plugins/new-mail-notify/ChangeLog8
-rw-r--r--plugins/new-mail-notify/new-mail-notify.c19
2 files changed, 24 insertions, 3 deletions
diff --git a/plugins/new-mail-notify/ChangeLog b/plugins/new-mail-notify/ChangeLog
index 385c54446b..dd63a1b5a1 100644
--- a/plugins/new-mail-notify/ChangeLog
+++ b/plugins/new-mail-notify/ChangeLog
@@ -1,3 +1,11 @@
+2006-08-21 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Fix for bug #308271 Patch by Johannes Berg
+
+ * new-mail-notify.c: (send_dbus_message),
+ (org_gnome_message_reading_notify), (org_gnome_new_mail_notify): Send
+ the folder name also in the message.
+
2006-04-18 Jeffrey Stedfast <fejj@novell.com>
* new-mail-notify.c (org_gnome_message_reading_notify): Don't try
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 <glib.h>
#include <gconf/gconf-client.h>
#include <e-util/e-config.h>
+#include <mail/em-utils.h>
#include <mail/em-event.h>
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
@@ -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);
}