aboutsummaryrefslogtreecommitdiffstats
path: root/mail/folder-browser-factory.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-06-13 03:29:17 +0800
committerDan Winship <danw@src.gnome.org>2000-06-13 03:29:17 +0800
commit860fb187ffb12a9373394b063826a9a3b01cf9b0 (patch)
treefa888ed69c56994497fcfda8d226039e42c93d78 /mail/folder-browser-factory.c
parent0931d27d61aa9f0ccc579be8d4c7b3c56bdd684f (diff)
downloadgsoc2013-evolution-860fb187ffb12a9373394b063826a9a3b01cf9b0.tar.gz
gsoc2013-evolution-860fb187ffb12a9373394b063826a9a3b01cf9b0.tar.zst
gsoc2013-evolution-860fb187ffb12a9373394b063826a9a3b01cf9b0.zip
Return the result of folder_browser_load_folder. (get_prop, set_prop,
* folder-browser.c (folder_browser_set_uri): Return the result of folder_browser_load_folder. (get_prop, set_prop, folder_browser_properties_init): Remove. No longer needed. * folder-browser-factory.c (folder_browser_factory_new_control): Add a "uri" argument, return NULL if setting it fails. (folder_browser_factory_new_control): Remove property bag stuff. (folder_browser_factory_init, folder_browser_factory): Remove this, since we're using the component factory now. * component-factory.c (create_view): Update for folder_browser_factory_new_control change and return NOTFOUND as appropriate. * main.c (main): Don't call folder_browser_factory_init. svn path=/trunk/; revision=3532
Diffstat (limited to 'mail/folder-browser-factory.c')
-rw-r--r--mail/folder-browser-factory.c42
1 files changed, 7 insertions, 35 deletions
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
index 540119d3fd..794f44d96d 100644
--- a/mail/folder-browser-factory.c
+++ b/mail/folder-browser-factory.c
@@ -163,7 +163,7 @@ control_destroy_cb (BonoboControl *control,
}
BonoboControl *
-folder_browser_factory_new_control (void)
+folder_browser_factory_new_control (const char *uri)
{
BonoboControl *control;
GtkWidget *folder_browser;
@@ -172,7 +172,12 @@ folder_browser_factory_new_control (void)
if (folder_browser == NULL)
return NULL;
- gtk_widget_show(folder_browser);
+ if (!folder_browser_set_uri (FOLDER_BROWSER (folder_browser), uri)) {
+ gtk_object_sink (GTK_OBJECT (folder_browser));
+ return NULL;
+ }
+
+ gtk_widget_show (folder_browser);
control = bonobo_control_new (folder_browser);
@@ -186,39 +191,6 @@ folder_browser_factory_new_control (void)
gtk_signal_connect (GTK_OBJECT (control), "destroy",
control_destroy_cb, folder_browser);
-
- bonobo_control_set_property_bag (control,
- FOLDER_BROWSER (folder_browser)->properties);
return control;
}
-
-/*
- * Creates the Folder Browser, wraps it in a Bonobo Control, and
- * sets the Bonobo Control properties to point to the Folder Browser
- * Properties
- */
-static BonoboObject *
-folder_browser_factory (BonoboGenericFactory *factory, void *closure)
-{
- return BONOBO_OBJECT (folder_browser_factory_new_control ());
-}
-
-void
-folder_browser_factory_init (void)
-{
- static BonoboGenericFactory *bonobo_folder_browser_factory = NULL;
-
- if (bonobo_folder_browser_factory != NULL)
- return;
-
- bonobo_folder_browser_factory = bonobo_generic_factory_new (CONTROL_FACTORY_ID,
- folder_browser_factory,
- NULL);
-
- if (bonobo_folder_browser_factory == NULL){
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("We are sorry, Evolution's Folder Browser can not be initialized."));
- exit (1);
- }
-}