pidgin/gtkstatusbox.c

changeset 41266
64805b295a5c
parent 41228
cfabfc1afd50
child 41314
0dc72eacd8bf
equal deleted inserted replaced
41265:3bad98fa1f0c 41266:64805b295a5c
431 * should modify status_box->store 431 * should modify status_box->store
432 */ 432 */
433 static void 433 static void
434 pidgin_status_box_refresh(PidginStatusBox *status_box) 434 pidgin_status_box_refresh(PidginStatusBox *status_box)
435 { 435 {
436 const char *aa_color;
437 PurpleSavedStatus *saved_status; 436 PurpleSavedStatus *saved_status;
438 char *primary, *secondary, *text; 437 char *primary, *secondary, *text;
439 const char *icon_name = NULL; 438 const char *icon_name = NULL;
440 GdkPixbuf *emblem = NULL; 439 GdkPixbuf *emblem = NULL;
441 GtkTreePath *path; 440 GtkTreePath *path;
491 } 490 }
492 491
493 icon_name = pidgin_icon_name_from_status_primitive(prim, "user-offline"); 492 icon_name = pidgin_icon_name_from_status_primitive(prim, "user-offline");
494 } 493 }
495 494
496 aa_color = pidgin_get_dim_grey_string(GTK_WIDGET(status_box));
497 if (status_box->account != NULL) { 495 if (status_box->account != NULL) {
498 text = g_strdup_printf("%s - <span size=\"smaller\" color=\"%s\">%s</span>", 496 text = g_strdup_printf("%s - <span size=\"smaller\">%s</span>",
499 purple_account_get_username(status_box->account), 497 purple_account_get_username(status_box->account),
500 aa_color, secondary ? secondary : primary); 498 secondary ? secondary : primary);
501 emblem = pidgin_create_protocol_icon(status_box->account, PIDGIN_PROTOCOL_ICON_SMALL); 499 emblem = pidgin_create_protocol_icon(status_box->account, PIDGIN_PROTOCOL_ICON_SMALL);
502 } else if (secondary != NULL) { 500 } else if (secondary != NULL) {
503 text = g_strdup_printf("%s<span size=\"smaller\" color=\"%s\"> - %s</span>", 501 text = g_strdup_printf("%s<span size=\"smaller\"> - %s</span>",
504 primary, aa_color, secondary); 502 primary, secondary);
505 } else { 503 } else {
506 text = g_strdup(primary); 504 text = g_strdup(primary);
507 } 505 }
508 g_free(primary); 506 g_free(primary);
509 g_free(secondary); 507 g_free(secondary);
1597 { 1595 {
1598 text = g_markup_escape_text(title, -1); 1596 text = g_markup_escape_text(title, -1);
1599 } 1597 }
1600 else 1598 else
1601 { 1599 {
1602 const char *aa_color;
1603 gchar *escaped_title, *escaped_desc; 1600 gchar *escaped_title, *escaped_desc;
1604
1605 aa_color = pidgin_get_dim_grey_string(GTK_WIDGET(status_box));
1606 1601
1607 escaped_title = g_markup_escape_text(title, -1); 1602 escaped_title = g_markup_escape_text(title, -1);
1608 escaped_desc = g_markup_escape_text(desc, -1); 1603 escaped_desc = g_markup_escape_text(desc, -1);
1609 text = g_strdup_printf("%s - <span color=\"%s\" size=\"smaller\">%s</span>", 1604 text = g_strdup_printf("%s - <span size=\"smaller\">%s</span>",
1610 escaped_title, 1605 escaped_title, escaped_desc);
1611 aa_color, escaped_desc);
1612 g_free(escaped_title); 1606 g_free(escaped_title);
1613 g_free(escaped_desc); 1607 g_free(escaped_desc);
1614 } 1608 }
1615 1609
1616 if (!pixbuf) { 1610 if (!pixbuf) {

mercurial