aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorThomas Meire <blackskad@gmail.com>2010-01-19 23:55:09 +0800
committerThomas Meire <blackskad@gmail.com>2010-01-21 08:20:08 +0800
commit0f812eb93730b84b7cbb60aaacf803aabdd6f9c5 (patch)
tree67ae4dfd05bdf348b7f7a9b628a2fc125921662a /libempathy-gtk
parenta60052ef99b114614a598bc6fd623ae4bd6b4d52 (diff)
downloadgsoc2013-empathy-0f812eb93730b84b7cbb60aaacf803aabdd6f9c5.tar
gsoc2013-empathy-0f812eb93730b84b7cbb60aaacf803aabdd6f9c5.tar.gz
gsoc2013-empathy-0f812eb93730b84b7cbb60aaacf803aabdd6f9c5.tar.bz2
gsoc2013-empathy-0f812eb93730b84b7cbb60aaacf803aabdd6f9c5.tar.lz
gsoc2013-empathy-0f812eb93730b84b7cbb60aaacf803aabdd6f9c5.tar.xz
gsoc2013-empathy-0f812eb93730b84b7cbb60aaacf803aabdd6f9c5.tar.zst
gsoc2013-empathy-0f812eb93730b84b7cbb60aaacf803aabdd6f9c5.zip
respect match_case in chat_text_view_highlight
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-chat-text-view.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/libempathy-gtk/empathy-chat-text-view.c b/libempathy-gtk/empathy-chat-text-view.c
index 8d00bf577..ea8b1937e 100644
--- a/libempathy-gtk/empathy-chat-text-view.c
+++ b/libempathy-gtk/empathy-chat-text-view.c
@@ -1151,7 +1151,6 @@ chat_text_view_highlight (EmpathyChatView *view,
const gchar *text,
gboolean match_case)
{
- // TODO: do something useful with the match_case var
GtkTextBuffer *buffer;
GtkTextIter iter;
GtkTextIter iter_start;
@@ -1176,12 +1175,20 @@ chat_text_view_highlight (EmpathyChatView *view,
}
while (1) {
- found = empathy_text_iter_forward_search (&iter,
- text,
- &iter_match_start,
- &iter_match_end,
- NULL);
-
+ if (match_case) {
+ found = gtk_text_iter_forward_search (&iter,
+ text,
+ 0,
+ &iter_match_start,
+ &iter_match_end,
+ NULL);
+ } else {
+ found = empathy_text_iter_forward_search (&iter,
+ text,
+ &iter_match_start,
+ &iter_match_end,
+ NULL);
+ }
if (!found) {
break;
}