Start with text selected
[darcs-mirror-screen-message.debian.git] / sm.c
diff --git a/sm.c b/sm.c
index 6edcc52..ad53f93 100644 (file)
--- a/sm.c
+++ b/sm.c
@@ -193,6 +193,9 @@ int main(int argc, char **argv) {
                input = g_string_new(":-)");
 
        gtk_text_buffer_set_text(tb, input->str, input->len);
+       GtkTextIter start, end;
+       gtk_text_buffer_get_bounds(tb, &start, &end);
+       gtk_text_buffer_select_range(tb, &start, &end);
 
        quit = gtk_button_new_from_stock(GTK_STOCK_QUIT);
        g_signal_connect(G_OBJECT(quit), "clicked", G_CALLBACK(gtk_main_quit), NULL);