# HG changeset patch # User Richard Laager # Date 1140575115 0 # Node ID 41c4b4aa523aaa4feac55dd494d3b018e7f36cee # Parent d65250edebe0344293fe47fd6d02938ac747ca64 [gaim-migrate @ 15682] SF Patch #1435980 from Sadrul "A few fixes for per-account statusboxes: 1. Add properly so that the right status is set when a status is selected from the dropdown. 2. Use the prpl-icon for per-account statusboxes. 3. Show the correct active status in the cell-view." committer: Tailor Script diff -r d65250edebe0 -r 41c4b4aa523a src/gtkstatusbox.c --- a/src/gtkstatusbox.c Wed Feb 22 02:24:23 2006 +0000 +++ b/src/gtkstatusbox.c Wed Feb 22 02:25:15 2006 +0000 @@ -352,6 +352,10 @@ /* This should never happen, but just in case... */ primary = g_strdup("New status"); } + else if (status_box->account != NULL) + { + primary = g_strdup(gaim_status_get_name(gaim_account_get_active_status(status_box->account))); + } else if (gaim_savedstatus_is_transient(saved_status)) primary = g_strdup(gaim_primitive_get_name_from_type(gaim_savedstatus_get_type(saved_status))); else @@ -387,9 +391,14 @@ pixbuf = status_box->connecting_pixbufs[status_box->connecting_index]; else { - pixbuf = gaim_gtk_create_gaim_icon_with_status( - gaim_savedstatus_get_type(saved_status), - show_buddy_icons ? 1.0 : 0.5); + if (status_box->account != NULL) + pixbuf = gaim_gtk_create_prpl_icon_with_status(status_box->account, + gaim_status_get_type(gaim_account_get_active_status(status_box->account)), + show_buddy_icons ? 1.0 : 0.5); + else + pixbuf = gaim_gtk_create_gaim_icon_with_status( + gaim_savedstatus_get_type(saved_status), + show_buddy_icons ? 1.0 : 0.5); if (!gaim_savedstatus_is_transient(saved_status)) { @@ -412,8 +421,9 @@ } if (status_box->account != NULL) { - text = g_strdup_printf("%s\n%s", + text = g_strdup_printf("%s%s%s", gaim_account_get_username(status_box->account), + show_buddy_icons ? "\n" : " - ", aa_color, secondary ? secondary : primary); } else if (secondary != NULL) { char *separator; @@ -688,10 +698,10 @@ tmp = gaim_gtk_create_prpl_icon_with_status(account, status_type, show_buddy_icons ? 1.0 : 0.5); gtk_gaim_status_box_add(GTK_GAIM_STATUS_BOX(status_box), - gaim_status_type_get_primitive(status_type), - tmp, + GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE, tmp, gaim_status_type_get_name(status_type), - NULL, NULL); + NULL, + GINT_TO_POINTER(gaim_status_type_get_primitive(status_type))); if (tmp != NULL) g_object_unref(tmp); }