comparison pidgin/gtkblist.c @ 26479:f5f08111da52

propagate from branch 'im.pidgin.pidgin' (head a609160715ae18beed98b084aac19bc0f6551362) to branch 'im.pidgin.pidgin.vv' (head 6e683319559d829234bc548e0795ed03403af478)
author Mike Ruprecht <maiku@soc.pidgin.im>
date Wed, 01 Apr 2009 04:25:37 +0000
parents 38238d41923b 1b2d418c26ff
children bd61f91e669a b290c7b9fc73 1337d2813b2d 5391094529c6
comparison
equal deleted inserted replaced
26477:e1523f30bdb5 26479:f5f08111da52
3944 nametext = g_markup_escape_text(name, strlen(name)); 3944 nametext = g_markup_escape_text(name, strlen(name));
3945 3945
3946 presence = purple_buddy_get_presence(b); 3946 presence = purple_buddy_get_presence(b);
3947 3947
3948 /* Name is all that is needed */ 3948 /* Name is all that is needed */
3949 if (aliased && biglist) { 3949 if (!aliased || biglist) {
3950 3950
3951 /* Status Info */ 3951 /* Status Info */
3952 prpl = purple_find_prpl(purple_account_get_protocol_id(b->account)); 3952 prpl = purple_find_prpl(purple_account_get_protocol_id(b->account));
3953 3953
3954 if (prpl != NULL) 3954 if (prpl != NULL)
4084 status_color = NULL; 4084 status_color = NULL;
4085 } 4085 }
4086 } 4086 }
4087 4087
4088 /* Put it all together */ 4088 /* Put it all together */
4089 if (aliased && biglist && (statustext || idletime)) { 4089 if ((!aliased || biglist) && (statustext || idletime)) {
4090 /* using <span size='smaller'> breaks the status, so it must be seperated into <small><span>*/ 4090 /* using <span size='smaller'> breaks the status, so it must be seperated into <small><span>*/
4091 if (name_color) { 4091 if (name_color) {
4092 text = g_strdup_printf("<span font_desc='%s' foreground='%s'>%s</span>\n" 4092 text = g_strdup_printf("<span font_desc='%s' foreground='%s'>%s</span>\n"
4093 "<small><span font_desc='%s' foreground='%s'>%s%s%s</span></small>", 4093 "<small><span font_desc='%s' foreground='%s'>%s%s%s</span></small>",
4094 name_font, name_color, nametext, status_font, status_color, 4094 name_font, name_color, nametext, status_font, status_color,
6489 gchar *mark, *tmp; 6489 gchar *mark, *tmp;
6490 gboolean showicons = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons"); 6490 gboolean showicons = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons");
6491 gboolean biglist = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons"); 6491 gboolean biglist = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons");
6492 PidginBlistNode *ui; 6492 PidginBlistNode *ui;
6493 PurpleConversation *conv; 6493 PurpleConversation *conv;
6494 gboolean hidden; 6494 gboolean hidden = FALSE;
6495 GdkColor *bgcolor = NULL; 6495 GdkColor *bgcolor = NULL;
6496 FontColorPair *pair; 6496 FontColorPair *pair;
6497 PidginBlistTheme *theme; 6497 PidginBlistTheme *theme;
6498 gboolean selected = (gtkblist->selected_node == node); 6498 gboolean selected = (gtkblist->selected_node == node);
6499 gboolean nick_said = FALSE; 6499 gboolean nick_said = FALSE;
6747 whoalias = gtk_entry_get_text(GTK_ENTRY(data->entry_for_alias)); 6747 whoalias = gtk_entry_get_text(GTK_ENTRY(data->entry_for_alias));
6748 if (*whoalias == '\0') 6748 if (*whoalias == '\0')
6749 whoalias = NULL; 6749 whoalias = NULL;
6750 6750
6751 g = NULL; 6751 g = NULL;
6752 if ((grp != NULL) && (*grp != '\0') && ((g = purple_find_group(grp)) == NULL)) 6752 if ((grp != NULL) && (*grp != '\0'))
6753 { 6753 {
6754 g = purple_group_new(grp); 6754 if ((g = purple_find_group(grp)) == NULL)
6755 purple_blist_add_group(g, NULL); 6755 {
6756 } 6756 g = purple_group_new(grp);
6757 6757 purple_blist_add_group(g, NULL);
6758 b = purple_buddy_new(data->account, who, whoalias); 6758 }
6759 purple_blist_add_buddy(b, NULL, g, NULL); 6759
6760 b = purple_find_buddy_in_group(data->account, who, g);
6761 }
6762 else if ((b = purple_find_buddy(data->account, who)) != NULL)
6763 {
6764 g = purple_buddy_get_group(b);
6765 }
6766
6767 if (b == NULL)
6768 {
6769 b = purple_buddy_new(data->account, who, whoalias);
6770 purple_blist_add_buddy(b, NULL, g, NULL);
6771 }
6772
6760 purple_account_add_buddy(data->account, b); 6773 purple_account_add_buddy(data->account, b);
6761 6774
6762 /* Offer to merge people with the same alias. */ 6775 /* Offer to merge people with the same alias. */
6763 if (whoalias != NULL && g != NULL) 6776 if (whoalias != NULL && g != NULL)
6764 gtk_blist_auto_personize((PurpleBlistNode *)g, whoalias); 6777 gtk_blist_auto_personize((PurpleBlistNode *)g, whoalias);