| 143 |
143 |
| 144 /* set tooltip if messages are pending */ |
144 /* set tooltip if messages are pending */ |
| 145 if (ui_ops->set_tooltip) { |
145 if (ui_ops->set_tooltip) { |
| 146 GString *tooltip_text = g_string_new(""); |
146 GString *tooltip_text = g_string_new(""); |
| 147 for (l = convs, count = 0 ; l != NULL ; l = l->next, count++) { |
147 for (l = convs, count = 0 ; l != NULL ; l = l->next, count++) { |
| 148 if (PIDGIN_IS_PIDGIN_CONVERSATION(l->data)) { |
148 PurpleConversation *conv = (PurpleConversation *)l->data; |
| 149 PidginConversation *gtkconv = PIDGIN_CONVERSATION((PurpleConversation *)l->data); |
149 PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv); |
| 150 if (count == DOCKLET_TOOLTIP_LINE_LIMIT - 1) |
150 |
| 151 g_string_append(tooltip_text, _("Right-click for more unread messages...\n")); |
151 if (count == DOCKLET_TOOLTIP_LINE_LIMIT - 1) { |
| 152 else |
152 g_string_append(tooltip_text, _("Right-click for more unread messages...\n")); |
| 153 g_string_append_printf(tooltip_text, |
153 } else if(gtkconv) { |
| 154 ngettext("%d unread message from %s\n", "%d unread messages from %s\n", gtkconv->unseen_count), |
154 g_string_append_printf(tooltip_text, |
| 155 gtkconv->unseen_count, |
155 ngettext("%d unread message from %s\n", "%d unread messages from %s\n", gtkconv->unseen_count), |
| 156 gtk_label_get_text(GTK_LABEL(gtkconv->tab_label))); |
156 gtkconv->unseen_count, |
| |
157 gtk_label_get_text(GTK_LABEL(gtkconv->tab_label))); |
| |
158 } else { |
| |
159 g_string_append_printf(tooltip_text, |
| |
160 ngettext("%d unread message from %s\n", "%d unread messages from %s\n", |
| |
161 GPOINTER_TO_INT(purple_conversation_get_data(conv, "unseen-count"))), |
| |
162 GPOINTER_TO_INT(purple_conversation_get_data(conv, "unseen-count")), |
| |
163 purple_conversation_get_name(conv)); |
| 157 } |
164 } |
| 158 } |
165 } |
| 159 |
166 |
| 160 /* get rid of the last newline */ |
167 /* get rid of the last newline */ |
| 161 if (tooltip_text->len > 0) |
168 if (tooltip_text->len > 0) |