aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-chat-text-view.c
diff options
context:
space:
mode:
authorThomas Meire <blackskad@gmail.com>2010-01-20 00:25:36 +0800
committerThomas Meire <blackskad@gmail.com>2010-01-21 08:20:08 +0800
commitba2326210afd63d1ae622c57b76b3b1f56ab4e9e (patch)
tree0b77cf03eb841925a3238b0be30027d18b212b2f /libempathy-gtk/empathy-chat-text-view.c
parent0f812eb93730b84b7cbb60aaacf803aabdd6f9c5 (diff)
downloadgsoc2013-empathy-ba2326210afd63d1ae622c57b76b3b1f56ab4e9e.tar
gsoc2013-empathy-ba2326210afd63d1ae622c57b76b3b1f56ab4e9e.tar.gz
gsoc2013-empathy-ba2326210afd63d1ae622c57b76b3b1f56ab4e9e.tar.bz2
gsoc2013-empathy-ba2326210afd63d1ae622c57b76b3b1f56ab4e9e.tar.lz
gsoc2013-empathy-ba2326210afd63d1ae622c57b76b3b1f56ab4e9e.tar.xz
gsoc2013-empathy-ba2326210afd63d1ae622c57b76b3b1f56ab4e9e.tar.zst
gsoc2013-empathy-ba2326210afd63d1ae622c57b76b3b1f56ab4e9e.zip
add match_case option to find_abilities
Diffstat (limited to 'libempathy-gtk/empathy-chat-text-view.c')
-rw-r--r--libempathy-gtk/empathy-chat-text-view.c49
1 files changed, 34 insertions, 15 deletions
diff --git a/libempathy-gtk/empathy-chat-text-view.c b/libempathy-gtk/empathy-chat-text-view.c
index ea8b1937e..07f8f6cb9 100644
--- a/libempathy-gtk/empathy-chat-text-view.c
+++ b/libempathy-gtk/empathy-chat-text-view.c
@@ -1096,6 +1096,7 @@ chat_text_view_find_next (EmpathyChatView *view,
static void
chat_text_view_find_abilities (EmpathyChatView *view,
const gchar *search_criteria,
+ gboolean match_case,
gboolean *can_do_previous,
gboolean *can_do_next)
{
@@ -1122,11 +1123,20 @@ chat_text_view_find_abilities (EmpathyChatView *view,
gtk_text_buffer_get_start_iter (buffer, &iter_at_mark);
}
- *can_do_previous = empathy_text_iter_backward_search (&iter_at_mark,
- search_criteria,
- &iter_match_start,
- &iter_match_end,
- NULL);
+ if (match_case) {
+ *can_do_previous = gtk_text_iter_backward_search (&iter_at_mark,
+ search_criteria,
+ 0,
+ &iter_match_start,
+ &iter_match_end,
+ NULL);
+ } else {
+ *can_do_previous = empathy_text_iter_backward_search (&iter_at_mark,
+ search_criteria,
+ &iter_match_start,
+ &iter_match_end,
+ NULL);
+ }
}
if (can_do_next) {
@@ -1138,11 +1148,20 @@ chat_text_view_find_abilities (EmpathyChatView *view,
gtk_text_buffer_get_start_iter (buffer, &iter_at_mark);
}
- *can_do_next = empathy_text_iter_forward_search (&iter_at_mark,
- search_criteria,
- &iter_match_start,
- &iter_match_end,
- NULL);
+ if (match_case) {
+ *can_do_next = gtk_text_iter_forward_search (&iter_at_mark,
+ search_criteria,
+ 0,
+ &iter_match_start,
+ &iter_match_end,
+ NULL);
+ } else {
+ *can_do_next = empathy_text_iter_forward_search (&iter_at_mark,
+ search_criteria,
+ &iter_match_start,
+ &iter_match_end,
+ NULL);
+ }
}
}
@@ -1177,11 +1196,11 @@ chat_text_view_highlight (EmpathyChatView *view,
while (1) {
if (match_case) {
found = gtk_text_iter_forward_search (&iter,
- text,
- 0,
- &iter_match_start,
- &iter_match_end,
- NULL);
+ text,
+ 0,
+ &iter_match_start,
+ &iter_match_end,
+ NULL);
} else {
found = empathy_text_iter_forward_search (&iter,
text,