Mercurial > pidgin
comparison console/gntblist.c @ 14919:056c8a27668c
[gaim-migrate @ 17691]
Change some minor stuff. This should get rid of the blinking in the buddylist
(and the tooltip) when a new account signs on. This just might get rid of some
crashes too.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Tue, 07 Nov 2006 02:59:24 +0000 |
parents | ea920bd4a00b |
children | ef80d4c30a90 |
comparison
equal
deleted
inserted
replaced
14918:f1e353fa21de | 14919:056c8a27668c |
---|---|
1161 int lastseen = 0; | 1161 int lastseen = 0; |
1162 | 1162 |
1163 widget = ggblist->tree; | 1163 widget = ggblist->tree; |
1164 tree = GNT_TREE(widget); | 1164 tree = GNT_TREE(widget); |
1165 | 1165 |
1166 if (!gnt_widget_has_focus(ggblist->tree)) | 1166 if (!gnt_widget_has_focus(ggblist->tree) || |
1167 (ggblist->context && !GNT_WIDGET_IS_FLAG_SET(ggblist->context, GNT_WIDGET_INVISIBLE))) | |
1167 return; | 1168 return; |
1168 | 1169 |
1169 if (ggblist->tooltip) | 1170 if (ggblist->tooltip) |
1170 { | 1171 { |
1171 /* XXX: Once we can properly redraw on expose events, this can be removed at the end | 1172 /* XXX: Once we can properly redraw on expose events, this can be removed at the end |
1181 | 1182 |
1182 if (GAIM_BLIST_NODE_IS_CONTACT(node)) { | 1183 if (GAIM_BLIST_NODE_IS_CONTACT(node)) { |
1183 GaimBuddy *pr = gaim_contact_get_priority_buddy((GaimContact*)node); | 1184 GaimBuddy *pr = gaim_contact_get_priority_buddy((GaimContact*)node); |
1184 gboolean offline = !GAIM_BUDDY_IS_ONLINE(pr); | 1185 gboolean offline = !GAIM_BUDDY_IS_ONLINE(pr); |
1185 gboolean showoffline = gaim_prefs_get_bool(PREF_ROOT "/showoffline"); | 1186 gboolean showoffline = gaim_prefs_get_bool(PREF_ROOT "/showoffline"); |
1186 | 1187 const char *alias = gaim_contact_get_alias((GaimContact*)node); |
1187 title = g_strdup(gaim_contact_get_alias((GaimContact*)node)); | 1188 const char *name = gaim_buddy_get_name(pr); |
1189 | |
1190 title = g_strdup(alias); | |
1191 if (g_utf8_collate(alias, name)) | |
1192 g_string_append_printf(str, _("Nickname: %s\n"), gaim_buddy_get_name(pr)); | |
1188 tooltip_for_buddy(pr, str); | 1193 tooltip_for_buddy(pr, str); |
1189 for (node = node->child; node; node = node->next) { | 1194 for (node = node->child; node; node = node->next) { |
1190 if (offline) { | 1195 if (offline) { |
1191 int value = gaim_blist_node_get_int(node, "last_seen"); | 1196 int value = gaim_blist_node_get_int(node, "last_seen"); |
1192 if (value > lastseen) | 1197 if (value > lastseen) |
1885 | 1890 |
1886 gaim_conversation_new(GAIM_CONV_TYPE_IM, account, username); | 1891 gaim_conversation_new(GAIM_CONV_TYPE_IM, account, username); |
1887 } | 1892 } |
1888 | 1893 |
1889 static void | 1894 static void |
1890 send_im_select(void) | 1895 send_im_select(GntMenuItem *item, gpointer n) |
1891 { | 1896 { |
1892 GaimRequestFields *fields; | 1897 GaimRequestFields *fields; |
1893 GaimRequestFieldGroup *group; | 1898 GaimRequestFieldGroup *group; |
1894 GaimRequestField *field; | 1899 GaimRequestField *field; |
1895 | 1900 |