diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-03-13 05:10:12 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-03-13 05:10:12 +0800 |
commit | fff110978aa79dcde9654c8386eb828b1c752c63 (patch) | |
tree | b280395f967b7a532a7b36e15a7982f35723872b /mail/folder-browser.c | |
parent | e19514f1319263d57cb9ebf900513518b011c3b3 (diff) | |
download | gsoc2013-evolution-fff110978aa79dcde9654c8386eb828b1c752c63.tar gsoc2013-evolution-fff110978aa79dcde9654c8386eb828b1c752c63.tar.gz gsoc2013-evolution-fff110978aa79dcde9654c8386eb828b1c752c63.tar.bz2 gsoc2013-evolution-fff110978aa79dcde9654c8386eb828b1c752c63.tar.lz gsoc2013-evolution-fff110978aa79dcde9654c8386eb828b1c752c63.tar.xz gsoc2013-evolution-fff110978aa79dcde9654c8386eb828b1c752c63.tar.zst gsoc2013-evolution-fff110978aa79dcde9654c8386eb828b1c752c63.zip |
Set the folder on a folder-browser object.
2002-03-12 Jeffrey Stedfast <fejj@ximian.com>
* folder-browser.c (folder_browser_set_folder): Set the folder on
a folder-browser object.
* folder-browser-window.c (folder_browser_window_new): Simple
window to display a folder-browser.
* mail-callbacks.c (view_digest): New callback to open a
folder-browser-window with a digest folder.
svn path=/trunk/; revision=16127
Diffstat (limited to 'mail/folder-browser.c')
-rw-r--r-- | mail/folder-browser.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/mail/folder-browser.c b/mail/folder-browser.c index 48b2f01297..eb7ea566dd 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -868,6 +868,23 @@ got_folder(char *uri, CamelFolder *folder, void *data) } void +folder_browser_set_folder (FolderBrowser *fb, CamelFolder *folder, const char *uri) +{ + g_return_if_fail (IS_FOLDER_BROWSER (fb)); + g_return_if_fail (CAMEL_IS_FOLDER (folder)); + + if (fb->get_id != -1) { + /* FIXME: cancel the get_folder request? */ + } + + g_free (fb->uri); + fb->uri = g_strdup (uri); + + gtk_object_ref (GTK_OBJECT (fb)); + got_folder (uri, folder, fb); +} + +void folder_browser_set_ui_component (FolderBrowser *fb, BonoboUIComponent *uicomp) { g_return_if_fail (IS_FOLDER_BROWSER (fb)); @@ -2176,10 +2193,13 @@ folder_browser_new (const GNOME_Evolution_Shell shell, const char *uri) } CORBA_exception_free (&ev); - - folder_browser->uri = g_strdup (uri); - gtk_object_ref (GTK_OBJECT (folder_browser)); - folder_browser->get_id = mail_get_folder (folder_browser->uri, 0, got_folder, folder_browser, mail_thread_new); + + if (uri) { + folder_browser->uri = g_strdup (uri); + gtk_object_ref (GTK_OBJECT (folder_browser)); + folder_browser->get_id = mail_get_folder (folder_browser->uri, 0, got_folder, + folder_browser, mail_thread_new); + } return GTK_WIDGET (folder_browser); } |