diff options
author | Peter Williams <peterw@ximian.com> | 2001-07-03 02:42:18 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2001-07-03 02:42:18 +0800 |
commit | 26b8fe817e4eebb373dfcdbf49b55d971084bf6e (patch) | |
tree | 209432ab48a505354ff104be7fc421a12737b593 /mail/folder-browser-factory.c | |
parent | a881f16f9338fd78ef80bbbdb38b2e65675f2d4d (diff) | |
download | gsoc2013-evolution-26b8fe817e4eebb373dfcdbf49b55d971084bf6e.tar.gz gsoc2013-evolution-26b8fe817e4eebb373dfcdbf49b55d971084bf6e.tar.zst gsoc2013-evolution-26b8fe817e4eebb373dfcdbf49b55d971084bf6e.zip |
New file. Protoypes for the Mail Folder Cache, which provides a place for
2001-07-02 Peter Williams <peterw@ximian.com>
* mail-folder-cache.h: New file. Protoypes for the Mail Folder Cache, which
provides a place for all the disparate pieces of the mailer to save bits of
information about a folder. Centralizes the information display code.
* mail-folder-cache.c: New file. Implements the Mail Folder Cache.
* Makefile.am (evolution_mail_SOURCES): Add the mail-folder-cache.{c,h}
* folder-browser-factory.c (fb_get_svi): Copy of that absurdly long-named
function in mail-display.c that gets the GNOME_Evolution_ShellView.
(control_activate): Set the ShellView for the folder cache.
* folder-browser.c (got_folder): Tell the folder browser about this folder.
* mail-callbacks.c (create_folders): Tell the folder cache about the new
folders.
* mail-local.c (reconfigure_folder_reconfigure): Don't unhook our
events as we no longer hook them up.
(register_folder_registered): Tell the folder cache about this
folder's place in the local storage.
(register_folder_register): No longer hook events; the Folder Cache
will do this.
(local_folder_changed, local_folder_changed_proxy): Move to mail-folder-cache.c
(free_local_folder): No longer unhook events.
* mail-ops.c (do_update_subfolders_rec): Instead of setting the
folder status ourselves, inform the Folder Cache about the changes.
* mail-tools.c (mail_tool_uri_to_folder): Replace danw's cache
with the new Mail Folder Cache.
(cache_folder, etc): removed.
svn path=/trunk/; revision=10694
Diffstat (limited to 'mail/folder-browser-factory.c')
-rw-r--r-- | mail/folder-browser-factory.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c index 021ae363cf..a3ad7f2fbe 100644 --- a/mail/folder-browser-factory.c +++ b/mail/folder-browser-factory.c @@ -37,6 +37,7 @@ #include "mail-config.h" #include "mail-ops.h" #include "mail-session.h" +#include "mail-folder-cache.h" #include "evolution-shell-component-utils.h" #include "camel/camel-vtrash-folder.h" @@ -44,6 +45,35 @@ /* The FolderBrowser BonoboControls we have. */ static EList *control_list = NULL; +/* copied from mail-display.c for now.... */ +static GNOME_Evolution_ShellView +fb_get_svi (BonoboControl *control) +{ + Bonobo_ControlFrame control_frame; + GNOME_Evolution_ShellView shell_view_interface; + CORBA_Environment ev; + + 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_queryInterface (control_frame, + "IDL:GNOME/Evolution/ShellView:1.0", + &ev); + CORBA_exception_free (&ev); + + if (shell_view_interface != CORBA_OBJECT_NIL) + gtk_object_set_data (GTK_OBJECT (control), + "mail_threads_shell_view_interface", + shell_view_interface); + else + g_warning ("Control frame doesn't have Evolution/ShellView."); + + return shell_view_interface; +} + static void control_activate (BonoboControl *control, BonoboUIComponent *uic, @@ -66,6 +96,8 @@ control_activate (BonoboControl *control, folder_browser_ui_add_list (fb); folder_browser_ui_add_message (fb); + mail_folder_cache_set_shell_view (fb_get_svi (control)); + if (fb->folder) mail_refresh_folder (fb->folder, NULL, NULL); } |