aboutsummaryrefslogtreecommitdiffstats
path: root/mail/subscribe-control-factory.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@helixcode.com>2000-09-29 11:09:26 +0800
committerChris Toshok <toshok@src.gnome.org>2000-09-29 11:09:26 +0800
commite20e97c2081eb38854c93495a41d7315259bc715 (patch)
tree473f02750bb06966cdc45f2723a96a8dcca68128 /mail/subscribe-control-factory.c
parent338c81f70a92560970f7a6c542c38a3839cc748c (diff)
downloadgsoc2013-evolution-e20e97c2081eb38854c93495a41d7315259bc715.tar
gsoc2013-evolution-e20e97c2081eb38854c93495a41d7315259bc715.tar.gz
gsoc2013-evolution-e20e97c2081eb38854c93495a41d7315259bc715.tar.bz2
gsoc2013-evolution-e20e97c2081eb38854c93495a41d7315259bc715.tar.lz
gsoc2013-evolution-e20e97c2081eb38854c93495a41d7315259bc715.tar.xz
gsoc2013-evolution-e20e97c2081eb38854c93495a41d7315259bc715.tar.zst
gsoc2013-evolution-e20e97c2081eb38854c93495a41d7315259bc715.zip
added prototype.
2000-09-28 Chris Toshok <toshok@helixcode.com> * subscribe-control.h (subscribe_search): added prototype. * subscribe-control.c (subscribe_search): new function. * subscribe-control-factory.c (make_folder_search_widget): new function, to add search widget to toolbar. (control_activate): create the search widget and add it to the toolbar. svn path=/trunk/; revision=5632
Diffstat (limited to 'mail/subscribe-control-factory.c')
-rw-r--r--mail/subscribe-control-factory.c38
1 files changed, 36 insertions, 2 deletions
diff --git a/mail/subscribe-control-factory.c b/mail/subscribe-control-factory.c
index 9d1cbb9caa..9ab6748d46 100644
--- a/mail/subscribe-control-factory.c
+++ b/mail/subscribe-control-factory.c
@@ -77,13 +77,38 @@ update_pixmaps (Bonobo_UIContainer container)
set_pixmap (container, "/Toolbar/RefreshList", "forward.png"); /* XXX */
}
+static GtkWidget*
+make_folder_search_widget (GtkSignalFunc start_search_func,
+ gpointer user_data_for_search)
+{
+ GtkWidget *search_vbox = gtk_vbox_new (FALSE, 0);
+ GtkWidget *search_entry = gtk_entry_new ();
+
+ if (start_search_func) {
+ gtk_signal_connect (GTK_OBJECT (search_entry), "activate",
+ start_search_func,
+ user_data_for_search);
+ }
+
+ /* add the search entry to the our search_vbox */
+ gtk_box_pack_start (GTK_BOX (search_vbox), search_entry,
+ FALSE, TRUE, 3);
+ gtk_box_pack_start (GTK_BOX (search_vbox),
+ gtk_label_new(_("Display Folders containing")),
+ FALSE, TRUE, 0);
+
+ return search_vbox;
+}
+
static void
control_activate (BonoboControl *control, BonoboUIHandler *uih,
- SubscribeControl *fb)
+ SubscribeControl *sc)
{
GtkWidget *subscribe_control;
BonoboUIComponent *component;
Bonobo_UIContainer container;
+ GtkWidget *folder_search_widget;
+ BonoboControl *search_control;
container = bonobo_control_get_remote_ui_handler (control);
bonobo_ui_handler_set_container (uih, container);
@@ -107,6 +132,15 @@ control_activate (BonoboControl *control, BonoboUIHandler *uih,
update_pixmaps (container);
+ folder_search_widget = make_folder_search_widget (subscribe_search, sc);
+ gtk_widget_show_all (folder_search_widget);
+ search_control = bonobo_control_new (folder_search_widget);
+
+ bonobo_ui_container_object_set (container,
+ "/Toolbar/FolderSearch",
+ bonobo_object_corba_objref (BONOBO_OBJECT (search_control)),
+ NULL);
+
bonobo_ui_container_thaw (container, NULL);
}
@@ -152,7 +186,7 @@ control_destroy_cb (BonoboControl *control,
BonoboControl *
subscribe_control_factory_new_control (const char *uri,
- const Evolution_Shell shell)
+ const Evolution_Shell shell)
{
BonoboControl *control;
GtkWidget *subscribe_control;