2000-02-14 Miguel de Icaza <miguel@gnu.org> * camel/providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Add the unicode libraries as well. * camel/camel-provider.c (camel_provider_register_as_module): Add error reporting here. Desire to use Solaris increases. Hair loss in the last two hours: 5,400. * camel/providers/mbox/camel-mbox-provider.c (camel_mbox_get_provider): Renamed function. * camel/camel.h: All include files use camel/ now here. * camel/providers/mbox/Makefile.am: Drop all the dynamism from Camel, and make this a standard library. * configure.in: set the UNICODE_LIBS variable here. 2000-02-14 Miguel de Icaza <miguel@gnu.org> * folder-browser.c (folder_browser_load_folder): New routine, loads a camel folder. (folder_browser_set_uri): redo. * session.c: new file. Implements SessionStores to keep track of a Session/Store tuple. svn path=/trunk/; revision=1783
69 lines
1.7 KiB
C
69 lines
1.7 KiB
C
/*
|
|
* folder-browser-factory.c: A Bonobo Control factory for Folder Browsers
|
|
*
|
|
* Author:
|
|
* Miguel de Icaza (miguel@helixcode.com)
|
|
*
|
|
* (C) 2000 Helix Code, Inc.
|
|
*/
|
|
#include <config.h>
|
|
#include <gnome.h>
|
|
#include <bonobo/bonobo-main.h>
|
|
#include <bonobo/bonobo-object.h>
|
|
#include <bonobo/bonobo-generic-factory.h>
|
|
#include <bonobo/bonobo-control.h>
|
|
#include "e-util/e-util.h"
|
|
#include "e-util/e-gui-utils.h"
|
|
#include "folder-browser.h"
|
|
#include "main.h"
|
|
|
|
/*
|
|
* 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)
|
|
{
|
|
BonoboControl *control;
|
|
GtkWidget *folder_browser;
|
|
|
|
folder_browser = folder_browser_new ();
|
|
if (folder_browser == NULL)
|
|
return NULL;
|
|
|
|
folder_browser_set_uri (FOLDER_BROWSER (folder_browser), "inbox");
|
|
|
|
control = bonobo_control_new (folder_browser);
|
|
if (control == NULL){
|
|
gtk_object_destroy (GTK_OBJECT (folder_browser));
|
|
return NULL;
|
|
}
|
|
|
|
bonobo_control_set_property_bag (
|
|
control,
|
|
FOLDER_BROWSER (folder_browser)->properties);
|
|
|
|
return BONOBO_OBJECT (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 (
|
|
"GOADID:Evolution:FolderBrowserFactory:1.0",
|
|
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);
|
|
}
|
|
}
|