2005-02-16 [colin] 1.0.1cvs11.2
authorColin Leroy <colin@colino.net>
Wed, 16 Feb 2005 09:28:53 +0000 (09:28 +0000)
committerColin Leroy <colin@colino.net>
Wed, 16 Feb 2005 09:28:53 +0000 (09:28 +0000)
* src/messageview.c
Fix messageview_select_all

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/messageview.c

index 33a74b1..93418ee 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-16 [colin]     1.0.1cvs11.2
+
+       * src/messageview.c
+               Fix messageview_select_all
+
 2005-02-16 [colin]     1.0.1cvs11.1
 
        * src/mh.c
index c12d47b..f4a81ba 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.5.2.11 -r 1.5.2.12 src/gtk/pluginwindow.c; ) > 1.0.1cvs7.3.patchset
 ( cvs diff -u -r 1.83.2.30 -r 1.83.2.31 src/mimeview.c; cvs diff -u -r 1.36.2.23 -r 1.36.2.25 src/common/utils.c; ) > 1.0.1cvs8.1.patchset
 ( cvs diff -u -r 1.79.2.8 -r 1.79.2.9 src/mh.c; ) > 1.0.1cvs11.1.patchset
+( cvs diff -u -r 1.94.2.45 -r 1.94.2.46 src/messageview.c; ) > 1.0.1cvs11.2.patchset
index 4523749..fc68c02 100644 (file)
@@ -13,7 +13,7 @@ INTERFACE_AGE=0
 BINARY_AGE=0
 EXTRA_VERSION=11
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.1
+EXTRA_GTK2_VERSION=.2
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
index 9e9e1fe..e67f84b 100644 (file)
@@ -914,10 +914,28 @@ void messageview_copy_clipboard(MessageView *messageview)
 void messageview_select_all(MessageView *messageview)
 {
        TextView *text;
+       GtkTextView *edit = NULL;
+       GtkTextBuffer *textbuf;
+       gint body_pos = 0;
+       GtkTextIter start, end;
+       
+       g_return_if_fail(messageview != NULL);
 
        text = messageview_get_current_textview(messageview);
-       if (text)
-               gtk_editable_select_region(GTK_EDITABLE(text->text), 0, -1);
+       g_return_if_fail(text != NULL);
+
+       edit = GTK_TEXT_VIEW(text->text);
+       g_return_if_fail(edit != NULL);
+
+       textbuf = gtk_text_view_get_buffer(edit);
+       g_return_if_fail(textbuf != NULL);
+
+       gtk_text_buffer_get_bounds(textbuf, &start, &end);
+       
+       gtk_text_buffer_move_mark_by_name(textbuf, 
+               "selection_bound", &start);
+       gtk_text_buffer_move_mark_by_name(textbuf, 
+               "insert", &end);
 }
 
 void messageview_set_position(MessageView *messageview, gint pos)