# # Patch by: Neil Jagdish Patel # # Fixes (LP: #436755) - Notifications don't show for POP items # diff -Nur -x '*.orig' -x '*~' evolution-indicator-0.2.4/src/evolution-indicator.c evolution-indicator-0.2.4.new/src/evolution-indicator.c --- evolution-indicator-0.2.4/src/evolution-indicator.c 2009-09-17 04:24:20.000000000 -0500 +++ evolution-indicator-0.2.4.new/src/evolution-indicator.c 2009-11-20 08:21:23.000000000 -0600 @@ -74,6 +74,7 @@ static GSList *indicators = NULL; static gint n_accounts = 0; +static IndicateIndicator *pop_indicator = NULL; static NotifyNotification *notification = NULL; static ca_context *canberra_cxt = NULL; static ca_proplist *canberra_props = NULL; @@ -237,7 +238,7 @@ g_static_mutex_lock (&mlock); - g_debug ("EI:mail_new_notify"); + g_debug ("EI:mail_new_notify: %s", t->uri); message_count += t->new; @@ -258,22 +259,25 @@ break; } } - if (indicator) - { - gint count; - - count = get_indicator_unread_count (indicator); - set_indicator_unread_count (indicator, count + t->new); - - indicate_indicator_set_property (indicator, - INDICATE_INDICATOR_MESSAGES_PROP_ATTENTION, - "true"); - } - else - { - g_warning ("Unable to find account that matches %s", t->uri); - } - } + if (!indicator && pop_indicator) /* Use pop (default) indicator */ + indicator = pop_indicator; + + if (indicator) + { + gint count; + + count = get_indicator_unread_count (indicator); + set_indicator_unread_count (indicator, count + t->new); + + indicate_indicator_set_property (indicator, + INDICATE_INDICATOR_MESSAGES_PROP_ATTENTION, + "true"); + } + else + { + g_warning ("Unable to find account that matches %s", t->uri); + } + } /* Show bubble */ if (show_bubble) @@ -470,6 +474,8 @@ g_signal_connect (indicator, "user-display", G_CALLBACK (show_evolution), NULL); + g_debug ("New Indicator: %s %s", name, url); + return indicator; } @@ -545,7 +551,7 @@ { GSList *accounts; GError *error = NULL; - gint i = 0; + gint i = 1; GTimeVal timeval = { 0 }; g_get_current_time (&timeval); @@ -596,7 +602,21 @@ NULL); /* Check to see account already exists and, if not, create it */ - indicator = find_indicator_for_url (indicators, data.url); + if (data.url && g_str_has_prefix (data.url, "pop:")) + { + if (pop_indicator == NULL) + { + pop_indicator = create_indicator ("pop:", + g_dgettext ("evolution-2.28", + "Inbox")); + g_debug ("New Inbox inidicator"); + } + indicator = pop_indicator; + } + else + { + indicator = find_indicator_for_url (indicators, data.url); + } if (indicator) { old_list = g_slist_remove (old_list, indicator);