[empathy] simple toggle button to match the case
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] simple toggle button to match the case
- Date: Thu, 21 Jan 2010 10:45:04 +0000 (UTC)
commit 993766233887be988d3864c64be85c83989d42ad
Author: Thomas Meire <blackskad gmail com>
Date: Sat Jan 16 16:41:50 2010 +0100
simple toggle button to match the case
libempathy-gtk/empathy-search-bar.c | 7 +++++++
libempathy-gtk/empathy-search-bar.ui | 12 ++++++++++++
2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-search-bar.c b/libempathy-gtk/empathy-search-bar.c
index 2a16fbf..1bf3c54 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 9768b1e..8020566 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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]