[empathy] Add empathy_individual_linker_set_search_text()
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Add empathy_individual_linker_set_search_text()
- Date: Thu, 2 Sep 2010 10:22:25 +0000 (UTC)
commit 0cdd19e18818fb096db954d48ae8770d3458908d
Author: Philip Withnall <philip withnall collabora co uk>
Date: Wed Sep 1 18:28:52 2010 +0100
Add empathy_individual_linker_set_search_text()
Helps: bgo#628133
libempathy-gtk/empathy-individual-linker.c | 20 ++++++++++++++++----
libempathy-gtk/empathy-individual-linker.h | 3 +++
2 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-linker.c b/libempathy-gtk/empathy-individual-linker.c
index eea1eae..8da4569 100644
--- a/libempathy-gtk/empathy-individual-linker.c
+++ b/libempathy-gtk/empathy-individual-linker.c
@@ -68,6 +68,7 @@ typedef struct {
EmpathyPersonaStore *persona_store; /* owned */
GtkTreeViewColumn *toggle_column; /* child widget */
GtkCellRenderer *toggle_renderer; /* child widget */
+ GtkWidget *search_widget; /* child widget */
FolksIndividual *start_individual; /* owned, allow-none */
FolksIndividual *new_individual; /* owned, allow-none */
@@ -330,7 +331,7 @@ set_up (EmpathyIndividualLinker *self)
EmpathyIndividualManager *individual_manager;
GtkWidget *top_vbox;
GtkPaned *paned;
- GtkWidget *label, *scrolled_window, *search_bar;
+ GtkWidget *label, *scrolled_window;
GtkBox *vbox;
EmpathyPersonaView *persona_view;
gchar *tmp;
@@ -406,11 +407,12 @@ set_up (EmpathyIndividualLinker *self)
gtk_widget_show (scrolled_window);
/* Live search */
- search_bar = empathy_live_search_new (GTK_WIDGET (priv->individual_view));
+ priv->search_widget = empathy_live_search_new (
+ GTK_WIDGET (priv->individual_view));
empathy_individual_view_set_live_search (priv->individual_view,
- EMPATHY_LIVE_SEARCH (search_bar));
+ EMPATHY_LIVE_SEARCH (priv->search_widget));
- gtk_box_pack_end (vbox, search_bar, FALSE, TRUE, 0);
+ gtk_box_pack_end (vbox, priv->search_widget, FALSE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (alignment), GTK_WIDGET (vbox));
gtk_paned_pack1 (paned, alignment, TRUE, FALSE);
@@ -806,3 +808,13 @@ empathy_individual_linker_get_has_changed (EmpathyIndividualLinker *self)
return (g_hash_table_size (priv->changed_individuals) > 0) ? TRUE : FALSE;
}
+
+void
+empathy_individual_linker_set_search_text (EmpathyIndividualLinker *self,
+ const gchar *search_text)
+{
+ g_return_if_fail (EMPATHY_IS_INDIVIDUAL_LINKER (self));
+
+ empathy_live_search_set_text (
+ EMPATHY_LIVE_SEARCH (GET_PRIV (self)->search_widget), search_text);
+}
diff --git a/libempathy-gtk/empathy-individual-linker.h b/libempathy-gtk/empathy-individual-linker.h
index 74fcfa6..9d122dc 100644
--- a/libempathy-gtk/empathy-individual-linker.h
+++ b/libempathy-gtk/empathy-individual-linker.h
@@ -68,6 +68,9 @@ GList * empathy_individual_linker_get_linked_personas (
gboolean empathy_individual_linker_get_has_changed (
EmpathyIndividualLinker *self);
+void empathy_individual_linker_set_search_text (EmpathyIndividualLinker *self,
+ const gchar *search_text);
+
G_END_DECLS
#endif /* __EMPATHY_INDIVIDUAL_LINKER_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]