aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-search-bar.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-search-bar.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-search-bar.c')
-rw-r--r--libempathy-gtk/empathy-search-bar.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-search-bar.c b/libempathy-gtk/empathy-search-bar.c
index dfd680ca5..87263338c 100644
--- a/libempathy-gtk/empathy-search-bar.c
+++ b/libempathy-gtk/empathy-search-bar.c
@@ -103,7 +103,8 @@ empathy_search_bar_size_allocate (GtkWidget *widget,
static void
empathy_search_bar_update_buttons (EmpathySearchBar *self,
- gchar *search)
+ gchar *search,
+ gboolean match_case)
{
gboolean can_go_forward = FALSE;
gboolean can_go_backward = FALSE;
@@ -111,7 +112,7 @@ empathy_search_bar_update_buttons (EmpathySearchBar *self,
EmpathySearchBarPriv* priv = GET_PRIV (self);
/* update previous / next buttons */
- empathy_chat_view_find_abilities (priv->chat_view, search,
+ empathy_chat_view_find_abilities (priv->chat_view, search, match_case,
&can_go_backward, &can_go_forward);
gtk_widget_set_sensitive (priv->search_previous,
@@ -124,11 +125,13 @@ void
empathy_search_bar_show (EmpathySearchBar *self)
{
gchar *search;
+ gboolean match_case;
EmpathySearchBarPriv *priv = GET_PRIV (self);
search = gtk_editable_get_chars (GTK_EDITABLE (priv->search_entry), 0, -1);
+ match_case = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->search_match_case));
empathy_chat_view_highlight (priv->chat_view, search, TRUE);
- empathy_search_bar_update_buttons (self, search);
+ empathy_search_bar_update_buttons (self, search, match_case);
/* grab the focus to the search entry */
gtk_widget_grab_focus (priv->search_entry);
@@ -188,7 +191,7 @@ empathy_search_bar_search (EmpathySearchBar *self,
!(found || EMP_STR_EMPTY (search)));
/* update the buttons */
- empathy_search_bar_update_buttons (self, search);
+ empathy_search_bar_update_buttons (self, search, match_case);
g_free (search);
}