Mercurial > pidgin.yaz
changeset 28825:a5c7229981be
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.
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Tue, 27 Oct 2009 07:51:46 +0000 |
parents | 6534ca3bc3bf |
children | df0f40146b76 |
files | pidgin/gtkstatusbox.c |
diffstat | 1 files changed, 16 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- 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); }