aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>2000-01-29 16:14:19 +0800
committerArturo Espinosa <unammx@src.gnome.org>2000-01-29 16:14:19 +0800
commit542fbe8d77f0505bf4e8ef4b03e8e2a1762309e6 (patch)
treef7d7890d9c359d0b8e26f8585a5043f6a6beb169
parent12ba6679acf39fabedc1748a57998a418e549df6 (diff)
downloadgsoc2013-evolution-542fbe8d77f0505bf4e8ef4b03e8e2a1762309e6.tar
gsoc2013-evolution-542fbe8d77f0505bf4e8ef4b03e8e2a1762309e6.tar.gz
gsoc2013-evolution-542fbe8d77f0505bf4e8ef4b03e8e2a1762309e6.tar.bz2
gsoc2013-evolution-542fbe8d77f0505bf4e8ef4b03e8e2a1762309e6.tar.lz
gsoc2013-evolution-542fbe8d77f0505bf4e8ef4b03e8e2a1762309e6.tar.xz
gsoc2013-evolution-542fbe8d77f0505bf4e8ef4b03e8e2a1762309e6.tar.zst
gsoc2013-evolution-542fbe8d77f0505bf4e8ef4b03e8e2a1762309e6.zip
Work on the factoyr
svn path=/trunk/; revision=1651
-rw-r--r--mail/Makefile.am22
-rw-r--r--mail/folder-browser-factory.c30
-rw-r--r--mail/folder-browser.h4
3 files changed, 43 insertions, 13 deletions
diff --git a/mail/Makefile.am b/mail/Makefile.am
index 98421cc6d4..40ae196396 100644
--- a/mail/Makefile.am
+++ b/mail/Makefile.am
@@ -14,16 +14,18 @@ EVOLUTION_MAIL_CORBA_GENERATED = \
Mail-skels.c \
Mail-stubs.c
-evolution_mail_SOURCES = \
- folder-browser-factory.c\
- folder-browser-factory.h\
- html-stream.c \
- html-stream.h \
- mail-display.h \
- mail-display.c \
- main.c \
- message-list.c \
- message-list.h \
+evolution_mail_SOURCES = \
+ folder-browser.c \
+ folder-browser.h \
+ folder-browser-factory.c \
+ folder-browser-factory.h \
+ html-stream.c \
+ html-stream.h \
+ mail-display.h \
+ mail-display.c \
+ main.c \
+ message-list.c \
+ message-list.h \
$(EVOLUTION_MAIL_CORBA_GENERATED)
evolution_mail_LDADD = \
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
index 17947b5f71..ed4f8b580c 100644
--- a/mail/folder-browser-factory.c
+++ b/mail/folder-browser-factory.c
@@ -11,14 +11,38 @@
#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)
{
- g_error ("Fill me in!");
-
- return NULL;
+ BonoboControl *control;
+ GtkWidget *folder_browser;
+
+ folder_browser = folder_browser_new ();
+ if (folder_browser == NULL)
+ return NULL;
+
+ 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
diff --git a/mail/folder-browser.h b/mail/folder-browser.h
index b3355518f7..b329575445 100644
--- a/mail/folder-browser.h
+++ b/mail/folder-browser.h
@@ -3,6 +3,7 @@
#include <gtk/gtktable.h>
#include "camel/camel-stream.h"
+#include <bonobo/bonobo-property-bag.h>
#define FOLDER_BROWSER_TYPE (folder_browser_get_type ())
#define FOLDER_BROWSER(o) (GTK_CHECK_CAST ((o), FOLDER_BROWSER_TYPE, FolderBrowser))
@@ -19,6 +20,7 @@ typedef struct {
* The current URI being displayed by the FolderBrowser
*/
char *uri;
+
} FolderBrowser;
typedef struct {
@@ -27,5 +29,7 @@ typedef struct {
GtkType folder_browser_get_type (void);
GtkWidget *folder_browser_new (void);
+void folder_browser_set_uri (FolderBrowser *folder_browser,
+ const char *uri);
#endif /* _FOLDER_BROWSER_H_ */