aboutsummaryrefslogtreecommitdiffstats
path: root/shell/evolution-test-component.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-05-08 02:53:10 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-05-08 02:53:10 +0800
commit03e2a84eda5327f01e768e74caa81247faf7a157 (patch)
treed4798b79f967e18f8b3dbbea64dd78c3a1b896dd /shell/evolution-test-component.c
parent197f7bcd679d5e3d35045e094828b39693c2ffc8 (diff)
downloadgsoc2013-evolution-03e2a84eda5327f01e768e74caa81247faf7a157.tar
gsoc2013-evolution-03e2a84eda5327f01e768e74caa81247faf7a157.tar.gz
gsoc2013-evolution-03e2a84eda5327f01e768e74caa81247faf7a157.tar.bz2
gsoc2013-evolution-03e2a84eda5327f01e768e74caa81247faf7a157.tar.lz
gsoc2013-evolution-03e2a84eda5327f01e768e74caa81247faf7a157.tar.xz
gsoc2013-evolution-03e2a84eda5327f01e768e74caa81247faf7a157.tar.zst
gsoc2013-evolution-03e2a84eda5327f01e768e74caa81247faf7a157.zip
Use the new evolution_shell_client_create_storage_set_view() call.
* evolution-test-component.c (create_new_folder_selector): Use the new evolution_shell_client_create_storage_set_view() call. * evolution-shell-client.c (evolution_shell_client_create_storage_set_view): New. svn path=/trunk/; revision=16707
Diffstat (limited to 'shell/evolution-test-component.c')
-rw-r--r--shell/evolution-test-component.c39
1 files changed, 15 insertions, 24 deletions
diff --git a/shell/evolution-test-component.c b/shell/evolution-test-component.c
index c11d2c4607..d083248395 100644
--- a/shell/evolution-test-component.c
+++ b/shell/evolution-test-component.c
@@ -212,7 +212,6 @@ create_new_folder_selector (EvolutionShellComponent *shell_component)
GNOME_Evolution_Shell corba_shell;
GNOME_Evolution_StorageSetView storage_set_view_iface;
GtkWidget *dialog;
- Bonobo_Control control;
GtkWidget *control_widget;
CORBA_Environment ev;
@@ -222,25 +221,13 @@ create_new_folder_selector (EvolutionShellComponent *shell_component)
g_assert (shell_client != NULL);
corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
- control = GNOME_Evolution_Shell_createStorageSetView (corba_shell, &ev);
- if (BONOBO_EX (&ev)) {
- g_warning ("Cannot create StorageSetView -- %s", BONOBO_EX_ID (&ev));
- CORBA_exception_free (&ev);
- return;
- }
-
- storage_set_view_iface = Bonobo_Unknown_queryInterface (control, "IDL:GNOME/Evolution/StorageSetView:1.0", &ev);
- if (BONOBO_EX (&ev) || storage_set_view_iface == CORBA_OBJECT_NIL) {
- g_warning ("Cannot get StorageSetView interface");
- if (BONOBO_EX (&ev))
- g_warning ("CORBA exception -- %s", BONOBO_EX_ID (&ev));
- CORBA_exception_free (&ev);
- return;
- }
-
- GNOME_Evolution_StorageSetView__set_showCheckboxes (storage_set_view_iface, TRUE, &ev);
- if (BONOBO_EX (&ev)) {
- g_warning ("Cannot show checkboxes -- %s", BONOBO_EX_ID (&ev));
+ control_widget = evolution_shell_client_create_storage_set_view (shell_client,
+ CORBA_OBJECT_NIL,
+ NULL,
+ &storage_set_view_iface,
+ &ev);
+ if (control_widget == NULL) {
+ g_warning ("Can't create the StorageSetView control -- %s", BONOBO_EX_ID (&ev));
CORBA_exception_free (&ev);
return;
}
@@ -249,19 +236,23 @@ create_new_folder_selector (EvolutionShellComponent *shell_component)
gtk_window_set_default_size (GTK_WINDOW (dialog), 200, 400);
gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, TRUE, FALSE);
- control_widget = bonobo_widget_new_control_from_objref (control, CORBA_OBJECT_NIL);
gtk_container_add (GTK_CONTAINER (GNOME_DIALOG (dialog)->vbox), control_widget);
- gtk_widget_show (control_widget);
- gtk_widget_show (dialog);
+ GNOME_Evolution_StorageSetView__set_showCheckboxes (storage_set_view_iface, TRUE, &ev);
+ if (BONOBO_EX (&ev))
+ g_warning ("Cannot show checkboxes -- %s", BONOBO_EX_ID (&ev));
gtk_signal_connect (GTK_OBJECT (dialog), "clicked",
GTK_SIGNAL_FUNC (dialog_clicked_callback), storage_set_view_iface);
- /* This is necessary to unref the StorageSetView iface. */
+ /* This is necessary to unref the StorageSetView iface once we are done
+ with it. */
gtk_signal_connect (GTK_OBJECT (dialog), "destroy",
GTK_SIGNAL_FUNC (dialog_destroy_callback), storage_set_view_iface);
+ gtk_widget_show (control_widget);
+ gtk_widget_show (dialog);
+
CORBA_exception_free (&ev);
}