aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorbertrand <bertrand@helixcode.com>2000-03-13 08:10:21 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>2000-03-13 08:10:21 +0800
commit4ec9945f0595444a94b0816f0146bc797b3037b2 (patch)
tree55c70ce994cee42eec86c375faffabb0044ff404 /shell
parent4bfd8d8f291baa38ab1bf73eb1618a202834c660 (diff)
downloadgsoc2013-evolution-4ec9945f0595444a94b0816f0146bc797b3037b2.tar.gz
gsoc2013-evolution-4ec9945f0595444a94b0816f0146bc797b3037b2.tar.zst
gsoc2013-evolution-4ec9945f0595444a94b0816f0146bc797b3037b2.zip
added the get_e_folder_type function.
2000-03-12 bertrand <bertrand@helixcode.com> * shell/e-folder.c (e_folder_get_folder_type): added the get_e_folder_type function. 2000-03-12 bertrand <bertrand@helixcode.com> * folder-browser.h: added a reference to an Evolution::Shell object. * folder-browser-factory.c (folder_browser_set_shell): (folder_browser_control_add_service_repository_interface): (folder_browser_factory): the folder-browser control now implements the Evolution/ServiceRepository interface. Sync for matt svn path=/trunk/; revision=2108
Diffstat (limited to 'shell')
-rw-r--r--shell/e-folder.c13
-rw-r--r--shell/e-folder.h2
-rw-r--r--shell/e-shell-view.c37
-rw-r--r--shell/e-shell.c1
4 files changed, 44 insertions, 9 deletions
diff --git a/shell/e-folder.c b/shell/e-folder.c
index 62e27cdfad..ba6e10b22e 100644
--- a/shell/e-folder.c
+++ b/shell/e-folder.c
@@ -165,6 +165,19 @@ e_folder_get_type_name (EFolder *efolder)
return NULL;
}
+
+EFolderType
+e_folder_get_folder_type (EFolder *efolder)
+{
+ g_return_val_if_fail (efolder != NULL, E_FOLDER_OTHER);
+ g_return_val_if_fail (E_IS_FOLDER (efolder), E_FOLDER_OTHER);
+
+ return (efolder->type);
+}
+
+
+
+
void
e_folder_construct (EFolder *efolder, EFolderType type,
const char *uri, const char *name,
diff --git a/shell/e-folder.h b/shell/e-folder.h
index 37b0f63862..f631191013 100644
--- a/shell/e-folder.h
+++ b/shell/e-folder.h
@@ -87,5 +87,7 @@ void e_folder_set_view_name (EFolder *efolder, const char *view_name);
const char *e_folder_get_type_name (EFolder *efolder);
+EFolderType e_folder_get_folder_type (EFolder *efolder);
+
#endif /* _E_FOLDER_H_ */
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index ea5f30897a..10ce194af5 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -73,18 +73,37 @@ e_shell_view_setup_shortcut_display (EShellView *eshell_view)
static GtkWidget *
get_view (EFolder *efolder)
{
- GtkWidget *w;
- /*char buffer [80];
+ GtkWidget *w = NULL;
+ BonoboControl control;
+ EFolderType e_folder_type;
- sprintf (buffer, "I am the view for %s\n",
- e_folder_get_description (efolder));
- w = gtk_label_new (buffer);
+
+
+ printf ("I am the view for %s\n",
+ e_folder_get_description (efolder));
+
+
- */
- w = bonobo_widget_new_control ("GOADID:Evolution:FolderBrowser:1.0",
- NULL);
- gtk_widget_show (w);
+ /* get the folder type */
+ e_folder_type = e_folder_get_folder_type (efolder);
+
+
+ /* depending on the type of folder,
+ * we launch a different bonobo component */
+ switch (e_folder_type) {
+
+ case E_FOLDER_MAIL :
+ w = bonobo_widget_new_control ("GOADID:Evolution:FolderBrowser:1.0",
+ NULL);
+ break;
+
+ default :
+ printf ("No bonobo component associated to %s\n",
+ e_folder_get_description (efolder));
+ }
+
+ if (w) gtk_widget_show (w);
return w;
diff --git a/shell/e-shell.c b/shell/e-shell.c
index e78a30e876..ec383746f0 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -9,6 +9,7 @@
* (C) 1999 Miguel de Icaza
* (C) 2000 Helix Code, Inc.
*/
+
#include <config.h>
#include <gtk/gtkmain.h>
#include <libgnome/libgnome.h>