diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-10-27 21:19:24 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-10-28 15:53:56 +0800 |
commit | 9fb03deb660336545d874bc33e35669ce7f57c8d (patch) | |
tree | 581a3b83349c8ca3ccb22c9e56328fa3beec4457 /libempathy-gtk | |
parent | e10818e57080f0c45797adb407234a07f81d571b (diff) | |
download | gsoc2013-empathy-9fb03deb660336545d874bc33e35669ce7f57c8d.tar gsoc2013-empathy-9fb03deb660336545d874bc33e35669ce7f57c8d.tar.gz gsoc2013-empathy-9fb03deb660336545d874bc33e35669ce7f57c8d.tar.bz2 gsoc2013-empathy-9fb03deb660336545d874bc33e35669ce7f57c8d.tar.lz gsoc2013-empathy-9fb03deb660336545d874bc33e35669ce7f57c8d.tar.xz gsoc2013-empathy-9fb03deb660336545d874bc33e35669ce7f57c8d.tar.zst gsoc2013-empathy-9fb03deb660336545d874bc33e35669ce7f57c8d.zip |
add empathy_contact_chooser_show_tree_view()
https://bugzilla.gnome.org/show_bug.cgi?id=662843
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-contact-chooser.c | 18 | ||||
-rw-r--r-- | libempathy-gtk/empathy-contact-chooser.h | 3 |
2 files changed, 16 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-contact-chooser.c b/libempathy-gtk/empathy-contact-chooser.c index 7f31e711e..7a9e7344d 100644 --- a/libempathy-gtk/empathy-contact-chooser.c +++ b/libempathy-gtk/empathy-contact-chooser.c @@ -37,6 +37,7 @@ struct _EmpathyContactChooserPrivate EmpathyIndividualStore *store; EmpathyIndividualView *view; GtkWidget *search_entry; + GtkWidget *scroll_view; GPtrArray *search_words; gchar *search_str; @@ -383,7 +384,6 @@ empathy_contact_chooser_init (EmpathyContactChooser *self) { EmpathyIndividualManager *mgr; GtkTreeSelection *selection; - GtkWidget *scroll; GQuark features[] = { TP_ACCOUNT_MANAGER_FEATURE_CORE, 0 }; self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, EMPATHY_TYPE_CONTACT_CHOOSER, @@ -429,13 +429,14 @@ empathy_contact_chooser_init (EmpathyContactChooser *self) g_signal_connect (self->priv->view, "row-activated", G_CALLBACK (view_activate_cb), self); - scroll = gtk_scrolled_window_new (NULL, NULL); + self->priv->scroll_view = gtk_scrolled_window_new (NULL, NULL); - gtk_container_add (GTK_CONTAINER (scroll), GTK_WIDGET (self->priv->view)); + gtk_container_add (GTK_CONTAINER (self->priv->scroll_view), + GTK_WIDGET (self->priv->view)); - gtk_box_pack_start (GTK_BOX (self), scroll, TRUE, TRUE, 6); + gtk_box_pack_start (GTK_BOX (self), self->priv->scroll_view, TRUE, TRUE, 6); gtk_widget_show (GTK_WIDGET (self->priv->view)); - gtk_widget_show (scroll); + gtk_widget_show (self->priv->scroll_view); } GtkWidget * @@ -469,3 +470,10 @@ empathy_contact_chooser_show_search_entry (EmpathyContactChooser *self, { gtk_widget_set_visible (self->priv->search_entry, show); } + +void +empathy_contact_chooser_show_tree_view (EmpathyContactChooser *self, + gboolean show) +{ + gtk_widget_set_visible (GTK_WIDGET (self->priv->scroll_view), show); +} diff --git a/libempathy-gtk/empathy-contact-chooser.h b/libempathy-gtk/empathy-contact-chooser.h index 87466beb8..66c8fbe4e 100644 --- a/libempathy-gtk/empathy-contact-chooser.h +++ b/libempathy-gtk/empathy-contact-chooser.h @@ -64,6 +64,9 @@ void empathy_contact_chooser_set_filter_func (EmpathyContactChooser *self, void empathy_contact_chooser_show_search_entry (EmpathyContactChooser *self, gboolean show); +void empathy_contact_chooser_show_tree_view (EmpathyContactChooser *self, + gboolean show); + G_END_DECLS #endif |