aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-search-bar.c7
-rw-r--r--libempathy-gtk/empathy-search-bar.ui12
2 files changed, 19 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-search-bar.c b/libempathy-gtk/empathy-search-bar.c
index 2a16fbf1d..1bf3c54e7 100644
--- a/libempathy-gtk/empathy-search-bar.c
+++ b/libempathy-gtk/empathy-search-bar.c
@@ -38,6 +38,8 @@ struct _EmpathySearchBarPriv
GtkWidget *search_entry;
+ GtkWidget *search_match_case;
+
GtkWidget *search_close;
GtkWidget *search_previous;
GtkWidget *search_next;
@@ -155,13 +157,17 @@ empathy_search_bar_search (EmpathySearchBar *self,
{
gchar *search;
gboolean found;
+ gboolean match_case;
EmpathySearchBarPriv *priv;
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));
/* highlight & search */
+ // TODO: add case parameter
empathy_chat_view_highlight (priv->chat_view, search);
if (next)
{
@@ -224,6 +230,7 @@ empathy_search_bar_init (EmpathySearchBar * self)
"search_previous", &priv->search_previous,
"search_next", &priv->search_next,
"search_not_found", &priv->search_not_found,
+ "search_match_case", &priv->search_match_case,
NULL);
g_free (filename);
diff --git a/libempathy-gtk/empathy-search-bar.ui b/libempathy-gtk/empathy-search-bar.ui
index 9768b1e6c..8020566bd 100644
--- a/libempathy-gtk/empathy-search-bar.ui
+++ b/libempathy-gtk/empathy-search-bar.ui
@@ -67,6 +67,18 @@
</packing>
</child>
<child>
+ <object class="GtkCheckButton" id="search_match_case">
+ <property name="label" translatable="yes">Match case</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="position">6</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkHBox" id="search_not_found">
<property name="spacing">6</property>
<child>