diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2000-08-13 13:20:54 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2000-08-13 13:20:54 +0800 |
commit | 53337e992fde35e34fc9b8211ca717cc0c465705 (patch) | |
tree | 3113d63ff45c9895ee5b0242e613536ce62d00ee /mail/folder-browser-factory.c | |
parent | 9f128d951a3ab24341afbb677a2f1dd665b56548 (diff) | |
download | gsoc2013-evolution-53337e992fde35e34fc9b8211ca717cc0c465705.tar.gz gsoc2013-evolution-53337e992fde35e34fc9b8211ca717cc0c465705.tar.zst gsoc2013-evolution-53337e992fde35e34fc9b8211ca717cc0c465705.zip |
Get the mail component to use the new Evolution::ShellView interface.
This implementation is so ugly and evil and needs to be replaced.
Don't look at it. Go away.
svn path=/trunk/; revision=4797
Diffstat (limited to 'mail/folder-browser-factory.c')
-rw-r--r-- | mail/folder-browser-factory.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c index 4d288946b5..c8575e6747 100644 --- a/mail/folder-browser-factory.c +++ b/mail/folder-browser-factory.c @@ -7,19 +7,28 @@ * * (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-factory.h" + #include "folder-browser.h" #include "mail.h" #include "shell/Evolution.h" #include "mail-config.h" +/* The active folder browser BonoboControls. */ +static GList *active_controls = NULL; + static GnomeUIInfo gnome_toolbar [] = { GNOMEUIINFO_ITEM_STOCK (N_("Get mail"), N_("Check for new mail"), fetch_mail, GNOME_STOCK_PIXMAP_MAIL_RCV), GNOMEUIINFO_ITEM_STOCK (N_("Compose"), N_("Compose a new message"), compose_msg, GNOME_STOCK_PIXMAP_MAIL_NEW), @@ -52,6 +61,8 @@ control_activate (BonoboControl *control, BonoboUIHandler *uih, GtkWidget *toolbar, *toolbar_frame, *folder_browser; char *toolbar_name = g_strdup_printf ("/Toolbar%d", fb->serial); + active_controls = g_list_prepend (active_controls, control); + remote_uih = bonobo_control_get_remote_ui_handler (control); bonobo_ui_handler_set_container (uih, remote_uih); bonobo_object_release_unref (remote_uih, NULL); @@ -165,11 +176,14 @@ control_activate (BonoboControl *control, BonoboUIHandler *uih, } static void -control_deactivate (BonoboControl *control, BonoboUIHandler *uih, +control_deactivate (BonoboControl *control, + BonoboUIHandler *uih, FolderBrowser *fb) { char *toolbar_name = g_strdup_printf ("/Toolbar%d", fb->serial); + active_controls = g_list_remove (active_controls, control); + bonobo_ui_handler_menu_remove (uih, "/File/<Print Placeholder>/separator1"); bonobo_ui_handler_menu_remove (uih, "/File/<Print Placeholder>/Print message..."); @@ -209,6 +223,8 @@ control_destroy_cb (BonoboControl *control, { GtkWidget *folder_browser = user_data; + active_controls = g_list_remove (active_controls, control); + gtk_object_destroy (GTK_OBJECT (folder_browser)); } @@ -244,3 +260,9 @@ folder_browser_factory_new_control (const char *uri) return control; } + +GList * +folder_browser_factory_get_active_control_list (void) +{ + return active_controls; +} |