aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@helixcode.com>2000-10-03 08:01:24 +0800
committerChris Toshok <toshok@src.gnome.org>2000-10-03 08:01:24 +0800
commit5d8858ccfabb580376c59c9f1ca3672189e2015f (patch)
treecfa191911c8d66297482879145217a31eb4c9501
parent29b9fbe51b2fd15b76617956a5517cb953f1ca29 (diff)
downloadgsoc2013-evolution-5d8858ccfabb580376c59c9f1ca3672189e2015f.tar.gz
gsoc2013-evolution-5d8858ccfabb580376c59c9f1ca3672189e2015f.tar.zst
gsoc2013-evolution-5d8858ccfabb580376c59c9f1ca3672189e2015f.zip
add fields for the storage set Bonobo_Control and Evolution_StorageSetView
2000-10-02 Chris Toshok <toshok@helixcode.com> * subscribe-dialog.h: add fields for the storage set Bonobo_Control and Evolution_StorageSetView interfaces. * subscribe-dialog.c (subscribe_dialog_gui_init): create the uih as early as possible, and add the storage set view to the left side of the hpaned. svn path=/trunk/; revision=5681
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/subscribe-dialog.c39
-rw-r--r--mail/subscribe-dialog.h29
3 files changed, 46 insertions, 31 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 26a2ab8a42..1c9e12f1aa 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,12 @@
+2000-10-02 Chris Toshok <toshok@helixcode.com>
+
+ * subscribe-dialog.h: add fields for the storage set
+ Bonobo_Control and Evolution_StorageSetView interfaces.
+
+ * subscribe-dialog.c (subscribe_dialog_gui_init): create the uih
+ as early as possible, and add the storage set view to the left
+ side of the hpaned.
+
2000-09-22 Michael Meeks <michael@helixcode.com>
* folder-browser-factory.c (set_pixmap): upd.
diff --git a/mail/subscribe-dialog.c b/mail/subscribe-dialog.c
index c95866e110..079e0ddf8c 100644
--- a/mail/subscribe-dialog.c
+++ b/mail/subscribe-dialog.c
@@ -26,6 +26,7 @@
#include <bonobo/bonobo-control.h>
#include <bonobo/bonobo-ui-component.h>
#include <bonobo/bonobo-ui-util.h>
+#include <bonobo/bonobo-widget.h>
#include "art/empty.xpm"
#include "art/mark.xpm"
@@ -391,22 +392,12 @@ subscribe_dialog_gui_init (SubscribeDialog *sc)
Bonobo_UIContainer container;
GtkWidget *folder_search_widget;
BonoboControl *search_control;
- GtkWidget *bonobo_win;
+ CORBA_Environment ev;
- /* Construct the app */
- bonobo_win = bonobo_win_new ("subscribe-dialog", "Subscribe");
-
- sc->storage_set_view = gtk_label_new ("Storage Set View");
- sc->table = gtk_table_new (1, 2, FALSE);
+ CORBA_exception_init (&ev);
- sc->hpaned = e_hpaned_new ();
- e_paned_add1 (E_PANED (sc->hpaned), sc->storage_set_view);
- e_paned_add2 (E_PANED (sc->hpaned), sc->table);
- e_paned_set_position (E_PANED (sc->hpaned), DEFAULT_STORAGE_SET_WIDTH);
-
- bonobo_win_set_contents (BONOBO_WIN (bonobo_win), sc->hpaned);
- gtk_widget_destroy (sc->app);
- sc->app = bonobo_win;
+ /* Construct the app */
+ sc->app = bonobo_win_new ("subscribe-dialog", "Subscribe");
/* Build the menu and toolbar */
sc->uih = bonobo_ui_handler_new ();
@@ -433,6 +424,21 @@ subscribe_dialog_gui_init (SubscribeDialog *sc)
update_pixmaps (container);
+ bonobo_ui_container_thaw (container, NULL);
+
+ sc->storage_set_control = Evolution_Shell_create_storage_set_view (sc->shell, &ev);
+ sc->storage_set_view_widget = bonobo_widget_new_control_from_objref (sc->storage_set_control,
+ container);
+
+ sc->table = gtk_table_new (1, 2, FALSE);
+
+ sc->hpaned = e_hpaned_new ();
+ e_paned_add1 (E_PANED (sc->hpaned), sc->storage_set_view_widget);
+ e_paned_add2 (E_PANED (sc->hpaned), sc->table);
+ e_paned_set_position (E_PANED (sc->hpaned), DEFAULT_STORAGE_SET_WIDTH);
+
+ bonobo_win_set_contents (BONOBO_WIN (sc->app), sc->hpaned);
+
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);
@@ -442,9 +448,6 @@ subscribe_dialog_gui_init (SubscribeDialog *sc)
bonobo_object_corba_objref (BONOBO_OBJECT (search_control)),
NULL);
- bonobo_ui_container_thaw (container, NULL);
-
-
/* set our our contents */
sc->description = html_new (TRUE);
put_html (GTK_HTML (sc->description), EXAMPLE_DESCR);
@@ -525,7 +528,7 @@ subscribe_dialog_gui_init (SubscribeDialog *sc)
gtk_widget_show (sc->description);
gtk_widget_show (sc->etable);
gtk_widget_show (sc->table);
- gtk_widget_show (sc->storage_set_view);
+ gtk_widget_show (sc->storage_set_view_widget);
gtk_widget_show (sc->hpaned);
/* FIXME: Session management and stuff? */
diff --git a/mail/subscribe-dialog.h b/mail/subscribe-dialog.h
index 5805c50b5f..282d4ad18f 100644
--- a/mail/subscribe-dialog.h
+++ b/mail/subscribe-dialog.h
@@ -7,6 +7,7 @@
#include "mail-types.h"
#include <gtk/gtktable.h>
#include <gal/e-table/e-tree-model.h>
+#include <bonobo/bonobo-control.h>
#include <bonobo/bonobo-ui-compat.h>
#include <bonobo/bonobo-property-bag.h>
#include "shell/Evolution.h"
@@ -21,19 +22,21 @@
struct _SubscribeDialog {
GtkObject parent;
- Evolution_Shell shell;
-
- BonoboUIHandler *uih;
-
- GtkWidget *app;
-
- GtkWidget *storage_set_view;
- GtkWidget *hpaned;
- GtkWidget *table;
- GtkWidget *description;
- GtkWidget *etable;
- ETreeModel *model;
- ETreePath *root;
+ Evolution_Shell shell;
+ Bonobo_Control storage_set_control;
+ Evolution_StorageSetView storage_set_view;
+
+ BonoboUIHandler *uih;
+
+ GtkWidget *app;
+
+ GtkWidget *storage_set_view_widget;
+ GtkWidget *hpaned;
+ GtkWidget *table;
+ GtkWidget *description;
+ GtkWidget *etable;
+ ETreeModel *model;
+ ETreePath *root;
};