aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Meire <blackskad@gmail.com>2010-01-17 18:29:49 +0800
committerThomas Meire <blackskad@gmail.com>2010-01-21 08:20:08 +0800
commit1d1701965496cb0d66a759cb4f7996de44a02044 (patch)
treeee3499159e87da157f7c2400a1823d49cacb78cc
parenta988a27966b67140d57695edd32b8563cb3a2d03 (diff)
downloadgsoc2013-empathy-1d1701965496cb0d66a759cb4f7996de44a02044.tar
gsoc2013-empathy-1d1701965496cb0d66a759cb4f7996de44a02044.tar.gz
gsoc2013-empathy-1d1701965496cb0d66a759cb4f7996de44a02044.tar.bz2
gsoc2013-empathy-1d1701965496cb0d66a759cb4f7996de44a02044.tar.lz
gsoc2013-empathy-1d1701965496cb0d66a759cb4f7996de44a02044.tar.xz
gsoc2013-empathy-1d1701965496cb0d66a759cb4f7996de44a02044.tar.zst
gsoc2013-empathy-1d1701965496cb0d66a759cb4f7996de44a02044.zip
added case sensitive search for adium themes (reverted previous commit)
-rw-r--r--libempathy-gtk/empathy-chat-text-view.c14
-rw-r--r--libempathy-gtk/empathy-chat-view.c12
-rw-r--r--libempathy-gtk/empathy-chat-view.h12
-rw-r--r--libempathy-gtk/empathy-log-window.c9
-rw-r--r--libempathy-gtk/empathy-search-bar.c11
-rw-r--r--libempathy-gtk/empathy-theme-adium.c18
6 files changed, 49 insertions, 27 deletions
diff --git a/libempathy-gtk/empathy-chat-text-view.c b/libempathy-gtk/empathy-chat-text-view.c
index 278a63f42..14c78ce25 100644
--- a/libempathy-gtk/empathy-chat-text-view.c
+++ b/libempathy-gtk/empathy-chat-text-view.c
@@ -838,7 +838,8 @@ chat_text_view_clear (EmpathyChatView *view)
static gboolean
chat_text_view_find_previous (EmpathyChatView *view,
const gchar *search_criteria,
- gboolean new_search)
+ gboolean new_search,
+ gboolean match_case)
{
EmpathyChatTextViewPriv *priv;
GtkTextBuffer *buffer;
@@ -891,6 +892,7 @@ chat_text_view_find_previous (EmpathyChatView *view,
priv->find_last_direction = FALSE;
+ /* FIXME: doesn't respect match_case */
found = empathy_text_iter_backward_search (&iter_at_mark,
search_criteria,
&iter_match_start,
@@ -909,7 +911,8 @@ chat_text_view_find_previous (EmpathyChatView *view,
priv->find_wrapped = TRUE;
result = chat_text_view_find_previous (view,
search_criteria,
- FALSE);
+ FALSE,
+ match_case);
priv->find_wrapped = FALSE;
}
@@ -953,7 +956,8 @@ chat_text_view_find_previous (EmpathyChatView *view,
static gboolean
chat_text_view_find_next (EmpathyChatView *view,
const gchar *search_criteria,
- gboolean new_search)
+ gboolean new_search,
+ gboolean match_case)
{
EmpathyChatTextViewPriv *priv;
GtkTextBuffer *buffer;
@@ -1006,6 +1010,7 @@ chat_text_view_find_next (EmpathyChatView *view,
priv->find_last_direction = TRUE;
+ /* FIXME: doesn't respect match_case */
found = empathy_text_iter_forward_search (&iter_at_mark,
search_criteria,
&iter_match_start,
@@ -1024,7 +1029,8 @@ chat_text_view_find_next (EmpathyChatView *view,
priv->find_wrapped = TRUE;
result = chat_text_view_find_next (view,
search_criteria,
- FALSE);
+ FALSE,
+ match_case);
priv->find_wrapped = FALSE;
}
diff --git a/libempathy-gtk/empathy-chat-view.c b/libempathy-gtk/empathy-chat-view.c
index 7072ca065..e68839635 100644
--- a/libempathy-gtk/empathy-chat-view.c
+++ b/libempathy-gtk/empathy-chat-view.c
@@ -129,14 +129,16 @@ empathy_chat_view_clear (EmpathyChatView *view)
gboolean
empathy_chat_view_find_previous (EmpathyChatView *view,
const gchar *search_criteria,
- gboolean new_search)
+ gboolean new_search,
+ gboolean match_case)
{
g_return_val_if_fail (EMPATHY_IS_CHAT_VIEW (view), FALSE);
if (EMPATHY_TYPE_CHAT_VIEW_GET_IFACE (view)->find_previous) {
return EMPATHY_TYPE_CHAT_VIEW_GET_IFACE (view)->find_previous (view,
search_criteria,
- new_search);
+ new_search,
+ match_case);
}
return FALSE;
}
@@ -144,14 +146,16 @@ empathy_chat_view_find_previous (EmpathyChatView *view,
gboolean
empathy_chat_view_find_next (EmpathyChatView *view,
const gchar *search_criteria,
- gboolean new_search)
+ gboolean new_search,
+ gboolean match_case)
{
g_return_val_if_fail (EMPATHY_IS_CHAT_VIEW (view), FALSE);
if (EMPATHY_TYPE_CHAT_VIEW_GET_IFACE (view)->find_next) {
return EMPATHY_TYPE_CHAT_VIEW_GET_IFACE (view)->find_next (view,
search_criteria,
- new_search);
+ new_search,
+ match_case);
}
return FALSE;
}
diff --git a/libempathy-gtk/empathy-chat-view.h b/libempathy-gtk/empathy-chat-view.h
index 52b39d124..11010c45b 100644
--- a/libempathy-gtk/empathy-chat-view.h
+++ b/libempathy-gtk/empathy-chat-view.h
@@ -53,10 +53,12 @@ struct _EmpathyChatViewIface {
void (*clear) (EmpathyChatView *view);
gboolean (*find_previous) (EmpathyChatView *view,
const gchar *search_criteria,
- gboolean new_search);
+ gboolean new_search,
+ gboolean match_case);
gboolean (*find_next) (EmpathyChatView *view,
const gchar *search_criteria,
- gboolean new_search);
+ gboolean new_search,
+ gboolean match_case);
void (*find_abilities) (EmpathyChatView *view,
const gchar *search_criteria,
gboolean *can_do_previous,
@@ -79,10 +81,12 @@ gboolean empathy_chat_view_get_has_selection (EmpathyChatView *view);
void empathy_chat_view_clear (EmpathyChatView *view);
gboolean empathy_chat_view_find_previous (EmpathyChatView *view,
const gchar *search_criteria,
- gboolean new_search);
+ gboolean new_search,
+ gboolean match_case);
gboolean empathy_chat_view_find_next (EmpathyChatView *view,
const gchar *search_criteria,
- gboolean new_search);
+ gboolean new_search,
+ gboolean match_case);
void empathy_chat_view_find_abilities (EmpathyChatView *view,
const gchar *search_criteria,
gboolean *can_do_previous,
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index c8785e2c0..dba887780 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -410,7 +410,8 @@ log_window_find_changed_cb (GtkTreeSelection *selection,
window->last_find, FALSE);
empathy_chat_view_find_next (window->chatview_find,
window->last_find,
- TRUE);
+ TRUE,
+ FALSE);
empathy_chat_view_find_abilities (window->chatview_find,
window->last_find,
&can_do_previous,
@@ -605,6 +606,7 @@ log_window_button_next_clicked_cb (GtkWidget *widget,
empathy_chat_view_find_next (window->chatview_find,
window->last_find,
+ FALSE,
FALSE);
empathy_chat_view_find_abilities (window->chatview_find,
window->last_find,
@@ -625,6 +627,7 @@ log_window_button_previous_clicked_cb (GtkWidget *widget,
empathy_chat_view_find_previous (window->chatview_find,
window->last_find,
+ FALSE,
FALSE);
empathy_chat_view_find_abilities (window->chatview_find,
window->last_find,
@@ -1113,7 +1116,8 @@ log_window_entry_chats_changed_cb (GtkWidget *entry,
if (str) {
empathy_chat_view_find_next (window->chatview_chats,
str,
- TRUE);
+ TRUE,
+ FALSE);
}
}
@@ -1128,6 +1132,7 @@ log_window_entry_chats_activate_cb (GtkWidget *entry,
if (str) {
empathy_chat_view_find_next (window->chatview_chats,
str,
+ FALSE,
FALSE);
}
}
diff --git a/libempathy-gtk/empathy-search-bar.c b/libempathy-gtk/empathy-search-bar.c
index 42c8716fb..1a76582c2 100644
--- a/libempathy-gtk/empathy-search-bar.c
+++ b/libempathy-gtk/empathy-search-bar.c
@@ -167,15 +167,20 @@ empathy_search_bar_search (EmpathySearchBar *self,
GTK_TOGGLE_BUTTON (priv->search_match_case));
/* highlight & search */
- // TODO: add case parameter
empathy_chat_view_highlight (priv->chat_view, search, match_case);
if (next)
{
- found = empathy_chat_view_find_next (priv->chat_view, search, new_search);
+ found = empathy_chat_view_find_next (priv->chat_view,
+ search,
+ new_search,
+ match_case);
}
else
{
- found = empathy_chat_view_find_previous (priv->chat_view, search, new_search);
+ found = empathy_chat_view_find_previous (priv->chat_view,
+ search,
+ new_search,
+ match_case);
}
/* (don't) display the not found label */
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index 41a36ab64..f57fe9531 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -706,26 +706,24 @@ theme_adium_clear (EmpathyChatView *view)
static gboolean
theme_adium_find_previous (EmpathyChatView *view,
const gchar *search_criteria,
- gboolean new_search)
+ gboolean new_search,
+ gboolean match_case)
{
- if (new_search) {
- webkit_web_view_unmark_text_matches (WEBKIT_WEB_VIEW (view));
- }
+ /* FIXME: Doesn't respect new_search */
return webkit_web_view_search_text (WEBKIT_WEB_VIEW (view),
- search_criteria, FALSE,
+ search_criteria, match_case,
FALSE, TRUE);
}
static gboolean
theme_adium_find_next (EmpathyChatView *view,
const gchar *search_criteria,
- gboolean new_search)
+ gboolean new_search,
+ gboolean match_case)
{
- if (new_search) {
- webkit_web_view_unmark_text_matches (WEBKIT_WEB_VIEW (view));
- }
+ /* FIXME: Doesn't respect new_search */
return webkit_web_view_search_text (WEBKIT_WEB_VIEW (view),
- search_criteria, FALSE,
+ search_criteria, match_case,
TRUE, TRUE);
}