# HG changeset patch # User Sean Egan # Date 1135123022 0 # Node ID dc836b5f2acb63b5cb9db687db29def15b071d72 # Parent 177bdacdfcf848cb7653a6a5b39eebf6a683765e [gaim-migrate @ 14913] Relatively, this is a massively minor change, but in the few times I've used Status, I've often found myself wanting to change from Available to Away while keeping the same message. Instead of clearing the imhtml, this selects all the text in it, so you can just start typing to change the message, or leave it alone to keep it the same. Cool? diff -r 177bdacdfcf8 -r dc836b5f2acb src/gtkstatusbox.c --- a/src/gtkstatusbox.c Tue Dec 20 23:16:56 2005 +0000 +++ b/src/gtkstatusbox.c Tue Dec 20 23:57:02 2005 +0000 @@ -1067,6 +1067,8 @@ if (status_box->imhtml_visible) { + GtkTextBuffer *buf; + GtkTextIter start, end; gtk_widget_show_all(status_box->vbox); if (GTK_WIDGET_IS_SENSITIVE(GTK_WIDGET(status_box))) { status_box->typing = g_timeout_add(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box); @@ -1074,9 +1076,12 @@ gtk_widget_hide(status_box->toolbar); gtk_widget_hide(status_box->hsep); } - gtk_imhtml_clear(GTK_IMHTML(status_box->imhtml)); - gtk_imhtml_clear_formatting(GTK_IMHTML(status_box->imhtml)); - gtk_widget_grab_focus(status_box->imhtml); + gtk_widget_grab_focus(status_box->imhtml); + buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(status_box->imhtml)); + gtk_text_buffer_get_start_iter(buf, &start); + gtk_text_buffer_get_end_iter(buf, &end); + gtk_text_buffer_move_mark_by_name(buf, "insert", &end); + gtk_text_buffer_move_mark_by_name(buf, "selection_bound", &start); } else {