aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-account-gui.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-01-27 20:35:26 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-01-27 20:35:26 +0800
commitce042b31b62f51282a3e66d1d0725fd5236d9096 (patch)
tree61c6c032f5d7fcdfb2ee7b7dd9cd96bd84e629ad /mail/mail-account-gui.c
parent2cf803cfc656c511342b5d80f464fe590b3f5d9d (diff)
downloadgsoc2013-evolution-ce042b31b62f51282a3e66d1d0725fd5236d9096.tar.gz
gsoc2013-evolution-ce042b31b62f51282a3e66d1d0725fd5236d9096.tar.zst
gsoc2013-evolution-ce042b31b62f51282a3e66d1d0725fd5236d9096.zip
** See bug #53084 and others.
2004-01-27 Not Zed <NotZed@Ximian.com> ** See bug #53084 and others. * em-migrate.c (em_migrate): remove the vfolder_revert hack. * em-composer-utils.c (ask_confirm_for_only_bcc): removed unused vars. * mail-tools.c (mail_tool_get_local_inbox): removed, handled by mail_component_get_folder now. * mail-component.c (mail_component_*): Changed the api slightly. Using NULL as the component argument automatically implies you want the default component. (em_uri_from_camel, em_uri_to_camel): moved to em-utils.[ch]. Ok so it isn't namespaced right ... *shrug*. (mail_component_get_local_inbox): removed. (mail_component_get_folder): single entry point for getting standard folders. This is MT-Safe. (mail_component_get_folder_uri): single entry point for getting standard folder uri's. This is MT-Safe. (add_store): removed, moved to mail_component_add_store. (mail_component_load_store_by_uri): call mail_component_add_store directly rather than copying its code. (default_*_folder*): Removed, use accessor methods instead, fixed all callers. (setup_local_store): renamed to mc_setup_local_store, use proper url encoding too. make run-once and thread-safe. (MailComponentPrivate): Added a lock. (mail_control_new): exported properly to kill warnings. (mail_component_init): dont setup_local_store or add accounts here. (impl_createControls): setup local store/accounts here. (mail_component_peek): dont setup vfolder storage here. (mc_startup): internal function to startup stuff needed for gui operation. (setup_search_context): make run-once. (mail_component_peek_search_context): call setup_search_context incase it isn't setup yet. (impl_upgradeFromVersion): remove the local store setup hack. svn path=/trunk/; revision=24462
Diffstat (limited to 'mail/mail-account-gui.c')
-rw-r--r--mail/mail-account-gui.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index b2c35b3bfb..2864adba2f 100644
--- a/mail/mail-account-gui.c
+++ b/mail/mail-account-gui.c
@@ -42,6 +42,7 @@
#include "mail-send-recv.h"
#include "mail-signature-editor.h"
#include "mail-component.h"
+#include "em-utils.h"
#include "em-composer-prefs.h"
#include "mail-config.h"
#include "mail-ops.h"
@@ -54,8 +55,6 @@
#define d(x)
-extern char *default_drafts_folder_uri, *default_sent_folder_uri;
-
static void save_service (MailAccountGuiService *gsvc, GHashTable *extra_conf, EAccountService *service);
static void service_changed (GtkEntry *entry, gpointer user_data);
@@ -1080,12 +1079,12 @@ default_folders_clicked (GtkButton *button, gpointer user_data)
/* Drafts folder */
g_free (gui->drafts_folder_uri);
- gui->drafts_folder_uri = g_strdup (default_drafts_folder_uri);
+ gui->drafts_folder_uri = g_strdup(mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS));
em_folder_selection_button_set_selection((EMFolderSelectionButton *)gui->drafts_folder_button, gui->drafts_folder_uri);
/* Sent folder */
g_free (gui->sent_folder_uri);
- gui->sent_folder_uri = g_strdup (default_sent_folder_uri);
+ gui->sent_folder_uri = g_strdup(mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_SENT));
em_folder_selection_button_set_selection((EMFolderSelectionButton *)gui->sent_folder_button, gui->sent_folder_uri);
}
@@ -1587,7 +1586,7 @@ mail_account_gui_new (EAccount *account, EMAccountPrefs *dialog)
if (account->drafts_folder_uri)
gui->drafts_folder_uri = em_uri_to_camel (account->drafts_folder_uri);
else
- gui->drafts_folder_uri = g_strdup (default_drafts_folder_uri);
+ gui->drafts_folder_uri = g_strdup(mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS));
em_folder_selection_button_set_selection((EMFolderSelectionButton *)gui->drafts_folder_button, gui->drafts_folder_uri);
/* Sent folder */
@@ -1596,7 +1595,7 @@ mail_account_gui_new (EAccount *account, EMAccountPrefs *dialog)
if (account->sent_folder_uri)
gui->sent_folder_uri = em_uri_to_camel (account->sent_folder_uri);
else
- gui->sent_folder_uri = g_strdup (default_sent_folder_uri);
+ gui->sent_folder_uri = g_strdup(mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_SENT));
em_folder_selection_button_set_selection((EMFolderSelectionButton *)gui->sent_folder_button, gui->sent_folder_uri);
/* Special Folders "Reset Defaults" button */
@@ -2010,7 +2009,7 @@ mail_account_gui_save (MailAccountGui *gui)
new->drafts_folder_uri = em_uri_from_camel (gui->drafts_folder_uri);
} else {
/* assign defaults - the uri is unknown to us (probably pointed to an old source url) */
- new->drafts_folder_uri = em_uri_from_camel (default_drafts_folder_uri);
+ new->drafts_folder_uri = em_uri_from_camel(mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS));
}
/* Check to make sure that the Sent folder uri is "valid" before assigning it */
@@ -2019,7 +2018,7 @@ mail_account_gui_save (MailAccountGui *gui)
new->sent_folder_uri = em_uri_from_camel (gui->sent_folder_uri);
} else {
/* assign defaults - the uri is unknown to us (probably pointed to an old source url) */
- new->sent_folder_uri = em_uri_from_camel (default_sent_folder_uri);
+ new->sent_folder_uri = em_uri_from_camel(mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_SENT));
}
new->always_cc = gtk_toggle_button_get_active (gui->always_cc);