# HG changeset patch # User Sean Egan # Date 1135123022 0 # Node ID 7bbd410442cb013ef35afb3735cefc8adf316c44 # Parent 8e15977b9705139d79f50a747b0043611f8655ac [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? committer: Tailor Script diff -r 8e15977b9705 -r 7bbd410442cb 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 {