Mercurial > pidgin.yaz
diff pidgin/gtkblist.c @ 21220:b1fa7765ca4b
propagate from branch 'im.pidgin.pidgin' (head d42511319051bcfa8adb3ed8e3f11a26cabc43f4)
to branch 'next.minor' (head 3526bc084159c5c57e580e9e9e190b6ff502fdbe)
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Fri, 12 Oct 2007 02:18:35 +0000 |
parents | 5f829728a1a5 58b9a33968e1 |
children | 6bbd66f67fa8 |
line wrap: on
line diff
--- a/pidgin/gtkblist.c Fri Oct 12 02:06:38 2007 +0000 +++ b/pidgin/gtkblist.c Fri Oct 12 02:18:35 2007 +0000 @@ -3070,7 +3070,7 @@ { N_("/Buddies/Get User _Info..."), "<CTL>I", pidgin_dialogs_info, 0, "<StockItem>", PIDGIN_STOCK_TOOLBAR_USER_INFO }, { N_("/Buddies/View User _Log..."), "<CTL>L", pidgin_dialogs_log, 0, "<Item>", NULL }, { "/Buddies/sep1", NULL, NULL, 0, "<Separator>", NULL }, - { N_("/Buddies/Show"), NULL, NULL, 0, "<Branch>", NULL}, + { N_("/Buddies/Sh_ow"), NULL, NULL, 0, "<Branch>", NULL}, { N_("/Buddies/Show/_Offline Buddies"), NULL, pidgin_blist_edit_mode_cb, 1, "<CheckItem>", NULL }, { N_("/Buddies/Show/_Empty Groups"), NULL, pidgin_blist_show_empty_groups_cb, 1, "<CheckItem>", NULL }, { N_("/Buddies/Show/Buddy _Details"), NULL, pidgin_blist_buddy_details_cb, 1, "<CheckItem>", NULL }, @@ -3663,25 +3663,31 @@ else idletime = g_strdup(_("Idle")); - if (!selected) + if (!selected) { + g_free(text); text = g_strdup_printf("<span color='%s'>%s</span>\n" - "<span color='%s' size='smaller'>%s%s%s</span>", - dim_grey(), esc, dim_grey(), - idletime != NULL ? idletime : "", - (idletime != NULL && statustext != NULL) ? " - " : "", - statustext != NULL ? statustext : ""); + "<span color='%s' size='smaller'>%s%s%s</span>", + dim_grey(), esc, dim_grey(), + idletime != NULL ? idletime : "", + (idletime != NULL && statustext != NULL) ? " - " : "", + statustext != NULL ? statustext : ""); + } } - else if (!selected && !statustext) /* We handle selected text later */ + else if (!selected && !statustext) {/* We handle selected text later */ + g_free(text); text = g_strdup_printf("<span color='%s'>%s</span>", dim_grey(), esc); - else if (!selected && !text) + } else if (!selected && !text) { + g_free(text); text = g_strdup_printf("<span color='%s'>%s</span>\n" "<span color='%s' size='smaller'>%s</span>", dim_grey(), esc, dim_grey(), statustext != NULL ? statustext : ""); + } } else if (!PURPLE_BUDDY_IS_ONLINE(b)) { - if (!selected && !statustext) /* We handle selected text later */ + if (!selected && !statustext) {/* We handle selected text later */ + g_free(text); text = g_strdup_printf("<span color='%s'>%s</span>", dim_grey(), esc); - else if (!selected && !text) + } else if (!selected && !text) text = g_strdup_printf("<span color='%s'>%s</span>\n" "<span color='%s' size='smaller'>%s</span>", dim_grey(), esc, dim_grey(), @@ -3698,13 +3704,15 @@ } /* It is selected. */ - if ((selected && !text) || (selected && idletime)) + if ((selected && !text) || (selected && idletime)) { + g_free(text); text = g_strdup_printf("%s\n" "<span size='smaller'>%s%s%s</span>", esc, idletime != NULL ? idletime : "", (idletime != NULL && statustext != NULL) ? " - " : "", statustext != NULL ? statustext : ""); + } g_free(idletime); g_free(statustext); @@ -4339,7 +4347,6 @@ gpointer user_data) { PurpleAccount *account; - PurpleStatusType *status_type; gchar *escaped, *text; GtkWidget *button, *label, *image, *hbox; GdkPixbuf *pixbuf; @@ -4354,8 +4361,8 @@ hbox = gtk_hbox_new(FALSE, 6); /* Create the icon */ - if ((status_type = purple_account_get_status_type_with_primitive(account, - PURPLE_STATUS_OFFLINE))) { + if (purple_account_get_status_type_with_primitive(account, + PURPLE_STATUS_OFFLINE) != NULL) { pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_SMALL); if (pixbuf != NULL) { image = gtk_image_new_from_pixbuf(pixbuf); @@ -5359,7 +5366,7 @@ BUDDY_ICON_COLUMN, avatar, BUDDY_ICON_VISIBLE_COLUMN, biglist, EMBLEM_COLUMN, emblem, - EMBLEM_VISIBLE_COLUMN, emblem, + EMBLEM_VISIBLE_COLUMN, (emblem != NULL), PROTOCOL_ICON_COLUMN, pidgin_create_prpl_icon(buddy->account, PIDGIN_PRPL_ICON_SMALL), PROTOCOL_ICON_VISIBLE_COLUMN, purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_protocol_icons"), BGCOLOR_COLUMN, NULL, @@ -5370,6 +5377,8 @@ g_free(mark); g_free(idle); + if(emblem) + g_object_unref(emblem); if(status) g_object_unref(status); if(avatar) @@ -5541,6 +5550,8 @@ -1); g_free(mark); + if(emblem) + g_object_unref(emblem); if(status) g_object_unref(status); if(avatar)