aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2010-09-02 01:28:52 +0800
committerPhilip Withnall <philip.withnall@collabora.co.uk>2010-09-02 18:09:18 +0800
commit0cdd19e18818fb096db954d48ae8770d3458908d (patch)
treeaefcc247b4f2ab485f248c9faa95595fc47de612 /libempathy-gtk
parent5bd4329e0aab6dd6a4a8e084ff8c46873fdcc525 (diff)
downloadgsoc2013-empathy-0cdd19e18818fb096db954d48ae8770d3458908d.tar
gsoc2013-empathy-0cdd19e18818fb096db954d48ae8770d3458908d.tar.gz
gsoc2013-empathy-0cdd19e18818fb096db954d48ae8770d3458908d.tar.bz2
gsoc2013-empathy-0cdd19e18818fb096db954d48ae8770d3458908d.tar.lz
gsoc2013-empathy-0cdd19e18818fb096db954d48ae8770d3458908d.tar.xz
gsoc2013-empathy-0cdd19e18818fb096db954d48ae8770d3458908d.tar.zst
gsoc2013-empathy-0cdd19e18818fb096db954d48ae8770d3458908d.zip
Add empathy_individual_linker_set_search_text()
Helps: bgo#628133
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-individual-linker.c20
-rw-r--r--libempathy-gtk/empathy-individual-linker.h3
2 files changed, 19 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-individual-linker.c b/libempathy-gtk/empathy-individual-linker.c
index eea1eaeef..8da456947 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 74fcfa6af..9d122dc51 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__ */