# HG changeset patch # User Ka-Hing Cheung # Date 1256629906 0 # Node ID a5c7229981be808e6412614f184bd8e29329ebe9 # Parent 6534ca3bc3bf31761f065379df0acb2cc187a344 don't remember the message if we switch to a saved status (transient or not), because otherwise the old status message may show up several status changes later, which is confusing. diff -r 6534ca3bc3bf -r a5c7229981be pidgin/gtkstatusbox.c --- a/pidgin/gtkstatusbox.c Tue Oct 27 07:42:02 2009 +0000 +++ b/pidgin/gtkstatusbox.c Tue Oct 27 07:51:46 2009 +0000 @@ -914,6 +914,21 @@ if (status_changed) { message = purple_savedstatus_get_message(saved_status); + + /* + * If we are going to hide the imhtml, don't retain the + * message because showing the old message later is + * confusing. If we are going to set the message to a pre-set, + * then we need to do this anyway + * + * Suppress the "changed" signal because the status + * was changed programmatically. + */ + gtk_widget_set_sensitive(GTK_WIDGET(status_box->imhtml), FALSE); + + gtk_imhtml_clear(GTK_IMHTML(status_box->imhtml)); + gtk_imhtml_clear_formatting(GTK_IMHTML(status_box->imhtml)); + if (!purple_savedstatus_is_transient(saved_status) || !message || !*message) { status_box->imhtml_visible = FALSE; @@ -924,18 +939,10 @@ status_box->imhtml_visible = TRUE; gtk_widget_show_all(status_box->vbox); - /* - * Suppress the "changed" signal because the status - * was changed programmatically. - */ - gtk_widget_set_sensitive(GTK_WIDGET(status_box->imhtml), FALSE); - - gtk_imhtml_clear(GTK_IMHTML(status_box->imhtml)); - gtk_imhtml_clear_formatting(GTK_IMHTML(status_box->imhtml)); gtk_imhtml_append_text(GTK_IMHTML(status_box->imhtml), message, 0); - gtk_widget_set_sensitive(GTK_WIDGET(status_box->imhtml), TRUE); } + gtk_widget_set_sensitive(GTK_WIDGET(status_box->imhtml), TRUE); update_size(status_box); }