aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/folder-browser-factory.c18
-rw-r--r--mail/folder-browser-factory.h4
-rw-r--r--mail/mail-threads.c9
4 files changed, 26 insertions, 15 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 13a8385d25..cf5c3f161f 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,13 @@
+2000-08-13 Ettore Perazzoli <ettore@helixcode.com>
+
+ * mail-threads.c (update_active_views): Just iterate through all
+ the controls, not just the active ones.
+
+ * folder-browser-factory.c: Don't keep track of active controls.
+ Rather, keep track of all of them.
+ (folder_browser_factory_get_active_control_list): Removed.
+ (folder_browser_factory_get_control_list): New.
+
2000-08-13 Dan Winship <danw@helixcode.com>
* Makefile.am (evolution_mail_SOURCES): add mail-local.h
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
index c8575e6747..602cff09b4 100644
--- a/mail/folder-browser-factory.c
+++ b/mail/folder-browser-factory.c
@@ -26,8 +26,8 @@
#include "shell/Evolution.h"
#include "mail-config.h"
-/* The active folder browser BonoboControls. */
-static GList *active_controls = NULL;
+/* The FolderBrowser BonoboControls we have. */
+static GList *control_list = NULL;
static GnomeUIInfo gnome_toolbar [] = {
GNOMEUIINFO_ITEM_STOCK (N_("Get mail"), N_("Check for new mail"), fetch_mail, GNOME_STOCK_PIXMAP_MAIL_RCV),
@@ -61,8 +61,6 @@ 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);
@@ -182,8 +180,6 @@ control_deactivate (BonoboControl *control,
{
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...");
@@ -223,7 +219,7 @@ control_destroy_cb (BonoboControl *control,
{
GtkWidget *folder_browser = user_data;
- active_controls = g_list_remove (active_controls, control);
+ control_list = g_list_remove (control_list, control);
gtk_object_destroy (GTK_OBJECT (folder_browser));
}
@@ -256,13 +252,15 @@ folder_browser_factory_new_control (const char *uri)
control_activate_cb, folder_browser);
gtk_signal_connect (GTK_OBJECT (control), "destroy",
- control_destroy_cb, folder_browser);
+ control_destroy_cb, folder_browser);
+
+ control_list = g_list_prepend (control_list, control);
return control;
}
GList *
-folder_browser_factory_get_active_control_list (void)
+folder_browser_factory_get_control_list (void)
{
- return active_controls;
+ return control_list;
}
diff --git a/mail/folder-browser-factory.h b/mail/folder-browser-factory.h
index a2346d5119..7af5028ada 100644
--- a/mail/folder-browser-factory.h
+++ b/mail/folder-browser-factory.h
@@ -13,7 +13,7 @@
#include <bonobo.h>
-BonoboControl *folder_browser_factory_new_control (const char *uri);
-GList *folder_browser_factory_get_active_control_list (void);
+BonoboControl *folder_browser_factory_new_control (const char *uri);
+GList *folder_browser_factory_get_control_list (void);
#endif /* _FOLDER_BROWSER_FACTORY_H */
diff --git a/mail/mail-threads.c b/mail/mail-threads.c
index 7047cb013d..8df6d3f5e0 100644
--- a/mail/mail-threads.c
+++ b/mail/mail-threads.c
@@ -988,6 +988,9 @@ retrieve_shell_view_interface_from_control (BonoboControl *control)
control_frame = bonobo_control_get_control_frame (control);
+ if (control_frame == NULL)
+ return CORBA_OBJECT_NIL;
+
CORBA_exception_init (&ev);
shell_view_interface = Bonobo_Unknown_query_interface (control_frame,
"IDL:Evolution/ShellView:1.0",
@@ -1007,11 +1010,11 @@ retrieve_shell_view_interface_from_control (BonoboControl *control)
static void
update_active_views (void)
{
- GList *active_controls;
+ GList *controls;
GList *p;
- active_controls = folder_browser_factory_get_active_control_list ();
- for (p = active_controls; p != NULL; p = p->next) {
+ controls = folder_browser_factory_get_control_list ();
+ for (p = controls; p != NULL; p = p->next) {
BonoboControl *control;
Evolution_ShellView shell_view_interface;
CORBA_Environment ev;