From: Richard L. <rl...@us...> - 2006-02-22 02:25:18
|
Update of /cvsroot/gaim/gaim/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7992/src Modified Files: gtkstatusbox.c Log Message: 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." Index: gtkstatusbox.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkstatusbox.c,v retrieving revision 1.110 retrieving revision 1.111 diff -u -d -p -r1.110 -r1.111 --- gtkstatusbox.c 14 Feb 2006 07:48:11 -0000 1.110 +++ gtkstatusbox.c 22 Feb 2006 02:25:15 -0000 1.111 @@ -352,6 +352,10 @@ gtk_gaim_status_box_refresh(GtkGaimStatu /* 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 @@ gtk_gaim_status_box_refresh(GtkGaimStatu 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 @@ gtk_gaim_status_box_refresh(GtkGaimStatu } if (status_box->account != NULL) { - text = g_strdup_printf("%s\n<span size=\"smaller\">%s</span>", + text = g_strdup_printf("%s%s<span size=\"smaller\" color=\"%s\">%s</span>", 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 @@ gtk_gaim_status_box_regenerate(GtkGaimSt 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); } |