aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-02-25 10:53:40 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-02-25 10:53:40 +0000
commitfd4ec6cba9f33c5630a9d47cadcee7230ee20441 (patch)
treed5ea8d5046c9b8456476810ef6a1931c91b31239 /src
parent2a47b946a59bdfe4bfefb136fe0f7475add03bb2 (diff)
fixed messageview's select all and selection reply.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@130 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/messageview.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/messageview.c b/src/messageview.c
index 02fd543a..f6b40764 100644
--- a/src/messageview.c
+++ b/src/messageview.c
@@ -24,7 +24,6 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtkvbox.h>
#include <gtk/gtkcontainer.h>
-#include <gtk/gtkeditable.h>
#include <gtk/gtkwindow.h>
#include <gtk/gtktextview.h>
#include <gtk/gtkmenu.h>
@@ -570,8 +569,15 @@ void messageview_select_all(MessageView *messageview)
TextView *text;
text = messageview_get_current_textview(messageview);
- if (text)
- gtk_editable_select_region(GTK_EDITABLE(text->text), 0, -1);
+ if (text) {
+ GtkTextView *textview = GTK_TEXT_VIEW(text->text);
+ GtkTextBuffer *buffer;
+ GtkTextIter start, end;
+
+ buffer = gtk_text_view_get_buffer(textview);
+ gtk_text_buffer_get_bounds(buffer, &start, &end);
+ gtk_text_buffer_select_range(buffer, &start, &end);
+ }
}
void messageview_set_position(MessageView *messageview, gint pos)
@@ -773,8 +779,8 @@ static void reply_cb(gpointer data, guint action, GtkWidget *widget)
msginfo = messageview->msginfo;
mlist = g_slist_append(NULL, msginfo);
- text = gtkut_editable_get_selection
- (GTK_EDITABLE(messageview->textview->text));
+ text = gtkut_text_view_get_selection
+ (GTK_TEXT_VIEW(messageview->textview->text));
if (text && *text == '\0') {
g_free(text);
text = NULL;