diff options
author | Casey Harkins <charkins@pidgin.im> | 2007-10-15 04:13:16 +0000 |
---|---|---|
committer | Casey Harkins <charkins@pidgin.im> | 2007-10-15 04:13:16 +0000 |
commit | 2f3657f11ea2b20b6d918bb319d2e9094c42f237 (patch) | |
tree | 955a46f54260173dbcb48b23199449b10d64a565 /pidgin/gtkdocklet.c | |
parent | f3662f0ada633d9a266a31ccfb1f312b8fdf0b3f (diff) | |
download | pidgin-2f3657f11ea2b20b6d918bb319d2e9094c42f237.tar.gz |
Make the docklet blink again for unread messages. Fixes #3211.
Diffstat (limited to 'pidgin/gtkdocklet.c')
-rw-r--r-- | pidgin/gtkdocklet.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/pidgin/gtkdocklet.c b/pidgin/gtkdocklet.c index 6a09ffd7fe..176b56e738 100644 --- a/pidgin/gtkdocklet.c +++ b/pidgin/gtkdocklet.c @@ -145,15 +145,22 @@ docklet_update_status() if (ui_ops->set_tooltip) { GString *tooltip_text = g_string_new(""); for (l = convs, count = 0 ; l != NULL ; l = l->next, count++) { - if (PIDGIN_IS_PIDGIN_CONVERSATION(l->data)) { - PidginConversation *gtkconv = PIDGIN_CONVERSATION((PurpleConversation *)l->data); - if (count == DOCKLET_TOOLTIP_LINE_LIMIT - 1) - g_string_append(tooltip_text, _("Right-click for more unread messages...\n")); - else - g_string_append_printf(tooltip_text, - ngettext("%d unread message from %s\n", "%d unread messages from %s\n", gtkconv->unseen_count), - gtkconv->unseen_count, - gtk_label_get_text(GTK_LABEL(gtkconv->tab_label))); + PurpleConversation *conv = (PurpleConversation *)l->data; + PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv); + + if (count == DOCKLET_TOOLTIP_LINE_LIMIT - 1) { + g_string_append(tooltip_text, _("Right-click for more unread messages...\n")); + } else if(gtkconv) { + g_string_append_printf(tooltip_text, + ngettext("%d unread message from %s\n", "%d unread messages from %s\n", gtkconv->unseen_count), + gtkconv->unseen_count, + gtk_label_get_text(GTK_LABEL(gtkconv->tab_label))); + } else { + g_string_append_printf(tooltip_text, + ngettext("%d unread message from %s\n", "%d unread messages from %s\n", + GPOINTER_TO_INT(purple_conversation_get_data(conv, "unseen-count"))), + GPOINTER_TO_INT(purple_conversation_get_data(conv, "unseen-count")), + purple_conversation_get_name(conv)); } } @@ -758,7 +765,7 @@ pidgin_docklet_clicked(int button_type) if (pending) { GList *l = get_pending_list(1); if (l != NULL) { - purple_conversation_present((PurpleConversation *)l->data); + pidgin_conv_present_conversation((PurpleConversation *)l->data); g_list_free(l); } } else { |