aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-06-01 06:21:39 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-06-01 06:21:39 +0000
commit040f904adcc02197cbbd26804a4a81fdb1866a36 (patch)
tree56539700727d8de19b7e1e975c36bb27d99f296e
parentf7b0e6bfdb8e043b59134a85a049522289d0c1c7 (diff)
improved sequential message searches.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@304 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.ja6
-rw-r--r--configure.in2
-rw-r--r--src/textview.c8
4 files changed, 17 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index e94586a4..5be4b589 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2005-06-01
+ * src/textview.c:
+ textview_search_string()
+ textview_search_string_backward(): improved sequential searches.
+
+2005-06-01
+
* src/summaryview.c: don't include the current message for
"View/Go to/(Prev|Next) (unread|new) message".
diff --git a/ChangeLog.ja b/ChangeLog.ja
index fde8b83a..f55074cc 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,5 +1,11 @@
2005-06-01
+ * src/textview.c:
+ textview_search_string()
+ textview_search_string_backward(): 連続した検索を改良。
+
+2005-06-01
+
* src/summaryview.c: 「表示/移動/(前の|次の)(未読|新着)メッセージ」
で現在のメッセージを含まないようにした。
diff --git a/configure.in b/configure.in
index e94ffcb0..8e538a16 100644
--- a/configure.in
+++ b/configure.in
@@ -9,7 +9,7 @@ MINOR_VERSION=9
MICRO_VERSION=12
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=
+EXTRA_VERSION=+svn
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl set $target
diff --git a/src/textview.c b/src/textview.c
index 46b4f11a..e86499f3 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -1305,8 +1305,7 @@ gboolean textview_search_string(TextView *textview, const gchar *str,
len = g_utf8_strlen(str, -1);
g_return_val_if_fail(len >= 0, FALSE);
- mark = gtk_text_buffer_get_insert(buffer);
- gtk_text_buffer_get_iter_at_mark(buffer, &iter, mark);
+ gtk_text_buffer_get_selection_bounds(buffer, NULL, &iter);
if (gtkut_text_buffer_find(buffer, &iter, str, case_sens,
&match_pos)) {
@@ -1315,6 +1314,7 @@ gboolean textview_search_string(TextView *textview, const gchar *str,
gtk_text_iter_forward_chars(&end, len);
/* place "insert" at the last character */
gtk_text_buffer_select_range(buffer, &end, &match_pos);
+ mark = gtk_text_buffer_get_insert(buffer);
gtk_text_view_scroll_to_mark(text, mark, 0.0, FALSE, 0.0, 0.0);
return TRUE;
}
@@ -1338,8 +1338,7 @@ gboolean textview_search_string_backward(TextView *textview, const gchar *str,
len = g_utf8_strlen(str, -1);
g_return_val_if_fail(len >= 0, FALSE);
- mark = gtk_text_buffer_get_insert(buffer);
- gtk_text_buffer_get_iter_at_mark(buffer, &iter, mark);
+ gtk_text_buffer_get_selection_bounds(buffer, &iter, NULL);
if (gtkut_text_buffer_find_backward(buffer, &iter, str, case_sens,
&match_pos)) {
@@ -1347,6 +1346,7 @@ gboolean textview_search_string_backward(TextView *textview, const gchar *str,
gtk_text_iter_forward_chars(&end, len);
gtk_text_buffer_select_range(buffer, &match_pos, &end);
+ mark = gtk_text_buffer_get_insert(buffer);
gtk_text_view_scroll_to_mark(text, mark, 0.0, FALSE, 0.0, 0.0);
return TRUE;
}