aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-chat-text-view.c4
-rw-r--r--libempathy-gtk/empathy-chat-view.c5
-rw-r--r--libempathy-gtk/empathy-chat-view.h6
-rw-r--r--libempathy-gtk/empathy-log-window.c4
-rw-r--r--libempathy-gtk/empathy-search-bar.c6
-rw-r--r--libempathy-gtk/empathy-theme-adium.c5
6 files changed, 18 insertions, 12 deletions
diff --git a/libempathy-gtk/empathy-chat-text-view.c b/libempathy-gtk/empathy-chat-text-view.c
index fcd6ebb32..278a63f42 100644
--- a/libempathy-gtk/empathy-chat-text-view.c
+++ b/libempathy-gtk/empathy-chat-text-view.c
@@ -1120,8 +1120,10 @@ chat_text_view_find_abilities (EmpathyChatView *view,
static void
chat_text_view_highlight (EmpathyChatView *view,
- const gchar *text)
+ const gchar *text,
+ gboolean match_case)
{
+ // TODO: do something useful with the match_case var
GtkTextBuffer *buffer;
GtkTextIter iter;
GtkTextIter iter_start;
diff --git a/libempathy-gtk/empathy-chat-view.c b/libempathy-gtk/empathy-chat-view.c
index ed5740a8e..7072ca065 100644
--- a/libempathy-gtk/empathy-chat-view.c
+++ b/libempathy-gtk/empathy-chat-view.c
@@ -175,12 +175,13 @@ empathy_chat_view_find_abilities (EmpathyChatView *view,
void
empathy_chat_view_highlight (EmpathyChatView *view,
- const gchar *text)
+ const gchar *text,
+ gboolean match_case)
{
g_return_if_fail (EMPATHY_IS_CHAT_VIEW (view));
if (EMPATHY_TYPE_CHAT_VIEW_GET_IFACE (view)->highlight) {
- EMPATHY_TYPE_CHAT_VIEW_GET_IFACE (view)->highlight (view, text);
+ EMPATHY_TYPE_CHAT_VIEW_GET_IFACE (view)->highlight (view, text, match_case);
}
}
diff --git a/libempathy-gtk/empathy-chat-view.h b/libempathy-gtk/empathy-chat-view.h
index f3478be6d..52b39d124 100644
--- a/libempathy-gtk/empathy-chat-view.h
+++ b/libempathy-gtk/empathy-chat-view.h
@@ -62,7 +62,8 @@ struct _EmpathyChatViewIface {
gboolean *can_do_previous,
gboolean *can_do_next);
void (*highlight) (EmpathyChatView *view,
- const gchar *text);
+ const gchar *text,
+ gboolean match_case);
void (*copy_clipboard) (EmpathyChatView *view);
};
@@ -87,7 +88,8 @@ void empathy_chat_view_find_abilities (EmpathyChatView *view,
gboolean *can_do_previous,
gboolean *can_do_next);
void empathy_chat_view_highlight (EmpathyChatView *view,
- const gchar *text);
+ const gchar *text,
+ gboolean match_case);
void empathy_chat_view_copy_clipboard (EmpathyChatView *view);
G_END_DECLS
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 09b3abd34..c8785e2c0 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -407,7 +407,7 @@ log_window_find_changed_cb (GtkTreeSelection *selection,
/* Highlight and find messages */
empathy_chat_view_highlight (window->chatview_find,
- window->last_find);
+ window->last_find, FALSE);
empathy_chat_view_find_next (window->chatview_find,
window->last_find,
TRUE);
@@ -1108,7 +1108,7 @@ log_window_entry_chats_changed_cb (GtkWidget *entry,
const gchar *str;
str = gtk_entry_get_text (GTK_ENTRY (window->entry_chats));
- empathy_chat_view_highlight (window->chatview_chats, str);
+ empathy_chat_view_highlight (window->chatview_chats, str, FALSE);
if (str) {
empathy_chat_view_find_next (window->chatview_chats,
diff --git a/libempathy-gtk/empathy-search-bar.c b/libempathy-gtk/empathy-search-bar.c
index 1bf3c54e7..42c8716fb 100644
--- a/libempathy-gtk/empathy-search-bar.c
+++ b/libempathy-gtk/empathy-search-bar.c
@@ -127,7 +127,7 @@ empathy_search_bar_show (EmpathySearchBar *self)
EmpathySearchBarPriv *priv = GET_PRIV (self);
search = gtk_editable_get_chars (GTK_EDITABLE (priv->search_entry), 0, -1);
- empathy_chat_view_highlight (priv->chat_view, search);
+ empathy_chat_view_highlight (priv->chat_view, search, TRUE);
empathy_search_bar_update_buttons (self, search);
/* grab the focus to the search entry */
@@ -143,7 +143,7 @@ empathy_search_bar_close_cb (GtkButton *button,
{
EmpathySearchBarPriv *priv = GET_PRIV (user_data);
- empathy_chat_view_highlight (priv->chat_view, "");
+ empathy_chat_view_highlight (priv->chat_view, "", FALSE);
gtk_widget_hide (GTK_WIDGET (user_data));
/* give the focus back to the focus-chain with the chat view */
@@ -168,7 +168,7 @@ empathy_search_bar_search (EmpathySearchBar *self,
/* highlight & search */
// TODO: add case parameter
- empathy_chat_view_highlight (priv->chat_view, search);
+ empathy_chat_view_highlight (priv->chat_view, search, match_case);
if (next)
{
found = empathy_chat_view_find_next (priv->chat_view, search, new_search);
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index 0a9fb9830..0a505eb57 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -739,11 +739,12 @@ theme_adium_find_abilities (EmpathyChatView *view,
static void
theme_adium_highlight (EmpathyChatView *view,
- const gchar *text)
+ const gchar *text,
+ gboolean match_case)
{
webkit_web_view_unmark_text_matches (WEBKIT_WEB_VIEW (view));
webkit_web_view_mark_text_matches (WEBKIT_WEB_VIEW (view),
- text, FALSE, 0);
+ text, match_case, 0);
webkit_web_view_set_highlight_text_matches (WEBKIT_WEB_VIEW (view),
TRUE);
}