ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #00607
[Branch ~indicator-applet-developers/evolution-indicator/trunk] Rev 55: Fix 436755 (indicator-applet doesn't change icon when I recieve new e-mails via Evolution)
Merge authors:
Neil J. Patel (njpatel)
------------------------------------------------------------
revno: 55 [merge]
committer: Neil Jagdish Patel <neil.patel@xxxxxxxxxxxxx>
branch nick: trunk
timestamp: Thu 2009-11-19 15:15:03 -0600
message:
Fix 436755 (indicator-applet doesn't change icon when I recieve new e-mails via Evolution)
Basically add support for a default Inbox for POP3
modified:
po/Makefile.in.in
src/evolution-indicator.c
modified:
po/Makefile.in.in
src/evolution-indicator.c
--
lp:evolution-indicator
https://code.launchpad.net/~indicator-applet-developers/evolution-indicator/trunk
Your team ayatana-commits is subscribed to branch lp:evolution-indicator.
To unsubscribe from this branch go to https://code.launchpad.net/~indicator-applet-developers/evolution-indicator/trunk/+edit-subscription.
=== modified file 'po/Makefile.in.in'
--- po/Makefile.in.in 2009-09-08 10:18:17 +0000
+++ po/Makefile.in.in 2009-11-19 18:51:08 +0000
@@ -129,7 +129,7 @@
done
# Empty stubs to satisfy archaic automake needs
-dvi info tags TAGS ID:
+dvi info ctags tags CTAGS TAGS ID:
# Define this as empty until I found a useful application.
install-exec installcheck:
=== modified file 'src/evolution-indicator.c'
--- src/evolution-indicator.c 2009-09-17 09:25:05 +0000
+++ src/evolution-indicator.c 2009-11-19 20:28:50 +0000
@@ -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);
+ 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);
- }
- }
+ 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);