aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-04-26 20:36:24 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-04-30 23:30:19 +0800
commitaec33928b7b77fe64b0afdf13b5db126e7f5dfac (patch)
tree04236fce76b859c96dc977741106aa06e28aa977 /plugins
parent2214b6049d9402f91567d1bea66259b29993ae9f (diff)
downloadgsoc2013-evolution-aec33928b7b77fe64b0afdf13b5db126e7f5dfac.tar
gsoc2013-evolution-aec33928b7b77fe64b0afdf13b5db126e7f5dfac.tar.gz
gsoc2013-evolution-aec33928b7b77fe64b0afdf13b5db126e7f5dfac.tar.bz2
gsoc2013-evolution-aec33928b7b77fe64b0afdf13b5db126e7f5dfac.tar.lz
gsoc2013-evolution-aec33928b7b77fe64b0afdf13b5db126e7f5dfac.tar.xz
gsoc2013-evolution-aec33928b7b77fe64b0afdf13b5db126e7f5dfac.tar.zst
gsoc2013-evolution-aec33928b7b77fe64b0afdf13b5db126e7f5dfac.zip
Adapt to Camel API changes.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/groupwise-features/junk-mail-settings.c2
-rw-r--r--plugins/groupwise-features/mail-retract.c6
-rw-r--r--plugins/groupwise-features/share-folder-common.c16
-rw-r--r--plugins/groupwise-features/status-track.c2
-rw-r--r--plugins/itip-formatter/itip-formatter.c16
-rw-r--r--plugins/mail-notification/mail-notification.c5
-rw-r--r--plugins/mark-all-read/mark-all-read.c13
-rw-r--r--plugins/templates/templates.c10
8 files changed, 46 insertions, 24 deletions
diff --git a/plugins/groupwise-features/junk-mail-settings.c b/plugins/groupwise-features/junk-mail-settings.c
index 192b4f2b0d..6e72b67320 100644
--- a/plugins/groupwise-features/junk-mail-settings.c
+++ b/plugins/groupwise-features/junk-mail-settings.c
@@ -77,7 +77,7 @@ gw_junk_mail_settings_cb (GtkAction *action, EShellView *shell_view)
folder = e_mail_reader_get_folder (reader);
g_return_if_fail (folder != NULL);
- cnc = get_cnc (folder->parent_store);
+ cnc = get_cnc (camel_folder_get_parent_store (folder));
dialog = gtk_dialog_new_with_buttons (_("Junk Settings"),
NULL,
diff --git a/plugins/groupwise-features/mail-retract.c b/plugins/groupwise-features/mail-retract.c
index 69b9acd5f0..466da1cb23 100644
--- a/plugins/groupwise-features/mail-retract.c
+++ b/plugins/groupwise-features/mail-retract.c
@@ -63,7 +63,7 @@ gw_retract_mail_cb (GtkAction *action, EShellView *shell_view)
{
EGwConnection *cnc;
CamelFolder *folder;
- CamelStore *store;
+ CamelStore *parent_store;
gchar *id = NULL;
GtkWidget *confirm_dialog, *confirm_warning;
GtkWidget *content_area;
@@ -72,9 +72,9 @@ gw_retract_mail_cb (GtkAction *action, EShellView *shell_view)
g_return_if_fail (get_selected_info (shell_view, &folder, &id));
g_return_if_fail (folder != NULL);
- store = folder->parent_store;
+ parent_store = camel_folder_get_parent_store (folder);
- cnc = get_cnc (store);
+ cnc = get_cnc (parent_store);
if (cnc && E_IS_GW_CONNECTION(cnc)) {
confirm_dialog = gtk_dialog_new_with_buttons (
diff --git a/plugins/groupwise-features/share-folder-common.c b/plugins/groupwise-features/share-folder-common.c
index 10e9b341dc..91758da535 100644
--- a/plugins/groupwise-features/share-folder-common.c
+++ b/plugins/groupwise-features/share-folder-common.c
@@ -93,12 +93,14 @@ void
shared_folder_commit (EPlugin *ep, EConfigTarget *tget)
{
EMConfigTargetFolder *target = (EMConfigTargetFolder *)tget->config->target;
- CamelFolder *folder = target->folder;
- CamelStore *store = folder->parent_store;
+ CamelStore *parent_store;
EMFolderTreeModel *model = NULL; /*mail_component_peek_tree_model (mail_component_peek ())*/;
+
+ parent_store = camel_folder_get_parent_store (target->folder);
+
if (common) {
share_folder (common);
- refresh_folder_tree (model, store);
+ refresh_folder_tree (model, parent_store);
g_object_run_dispose ((GObject *)common);
common = NULL;
}
@@ -370,7 +372,7 @@ org_gnome_shared_folder_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_d
EMConfigTargetFolder *target= (EMConfigTargetFolder *)hook_data->config->target;
CamelFolder *folder = target->folder;
- folder_name = g_strdup (folder->full_name);
+ folder_name = g_strdup (camel_folder_get_full_name (folder));
folderuri = g_strdup(target->uri);
if (folderuri && folder_name)
account = g_strrstr(folderuri, "groupwise");
@@ -396,8 +398,10 @@ org_gnome_shared_folder_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_d
}
if (account) {
- CamelStore *store = folder->parent_store;
- cnc = get_cnc (store);
+ CamelStore *parent_store;
+
+ parent_store = camel_folder_get_parent_store (folder);
+ cnc = get_cnc (parent_store);
if (E_IS_GW_CONNECTION (cnc))
id = get_container_id (cnc, folder_name);
diff --git a/plugins/groupwise-features/status-track.c b/plugins/groupwise-features/status-track.c
index 0243e1e453..83ecf6c1bf 100644
--- a/plugins/groupwise-features/status-track.c
+++ b/plugins/groupwise-features/status-track.c
@@ -184,7 +184,7 @@ gw_track_message_status_cb (GtkAction *action,
gtk_table_set_col_spacings (table ,12);
gtk_table_set_row_spacings (table, 6);
gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (table), FALSE, TRUE, 0);
- cnc = get_cnc (folder->parent_store);
+ cnc = get_cnc (camel_folder_get_parent_store (folder));
if (E_IS_GW_CONNECTION(cnc)) {
GSList *recipient_list;
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index 5e555434ca..90f5b9ae27 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -816,6 +816,7 @@ find_server (struct _itip_puri *pitip, ECalComponent *comp)
GSList *groups, *l, *sources_conflict = NULL, *all_sources = NULL;
const gchar *uid;
gchar *rid = NULL;
+ CamelStore *parent_store;
CamelURL *url;
gchar *uri;
ESource *source = NULL, *current_source = NULL;
@@ -823,8 +824,10 @@ find_server (struct _itip_puri *pitip, ECalComponent *comp)
e_cal_component_get_uid (comp, &uid);
rid = e_cal_component_get_recurid_as_string (comp);
- url = CAMEL_SERVICE (pitip->folder->parent_store)->url;
- uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
+ parent_store = camel_folder_get_parent_store (pitip->folder);
+
+ url = CAMEL_SERVICE (parent_store)->url;
+ uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
itip_view_set_buttons_sensitive (ITIP_VIEW (pitip->view), FALSE);
@@ -1981,8 +1984,10 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data)
tag = camel_message_info_user_tag (mi, "recurrence-key");
camel_message_info_free (mi);
if (tag) {
- gint i = 0, count;
+ CamelStore *parent_store;
GSList *list = NULL;
+ const gchar *full_name;
+ gint i = 0, count;
count = camel_folder_summary_count (pitip->folder->summary);
for (i = 0; i < count; i++) {
@@ -2001,7 +2006,10 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data)
}
camel_message_info_free (mi);
}
- camel_db_delete_uids (pitip->folder->parent_store->cdb_w, pitip->folder->full_name, list, NULL);
+
+ full_name = camel_folder_get_full_name (pitip->folder);
+ parent_store = camel_folder_get_parent_store (pitip->folder);
+ camel_db_delete_uids (parent_store->cdb_w, full_name, list, NULL);
g_slist_free (list);
}
} else {
diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c
index 9503aaf27a..e6dd1a267d 100644
--- a/plugins/mail-notification/mail-notification.c
+++ b/plugins/mail-notification/mail-notification.c
@@ -217,7 +217,10 @@ static void
read_notify_dbus (EMEventTargetMessage *t)
{
if (bus != NULL)
- send_dbus_message ("MessageReading", t->folder->name, 0, NULL, NULL, NULL);
+ send_dbus_message (
+ "MessageReading",
+ camel_folder_get_name (t->folder),
+ 0, NULL, NULL, NULL);
}
static void
diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c
index 4bc389e77c..6f968ba0c6 100644
--- a/plugins/mark-all-read/mark-all-read.c
+++ b/plugins/mark-all-read/mark-all-read.c
@@ -348,8 +348,9 @@ mar_got_folder (gchar *folder_uri,
gpointer data)
{
CamelFolderInfo *folder_info;
- CamelStore *store;
+ CamelStore *parent_store;
CamelException ex;
+ const gchar *full_name;
gint response;
/* FIXME we have to disable the menu item */
@@ -358,9 +359,11 @@ mar_got_folder (gchar *folder_uri,
camel_exception_init (&ex);
- store = folder->parent_store;
+ full_name = camel_folder_get_full_name (folder);
+ parent_store = camel_folder_get_parent_store (folder);
+
folder_info = camel_store_get_folder_info (
- store, folder->full_name,
+ parent_store, full_name,
CAMEL_STORE_FOLDER_INFO_RECURSIVE |
CAMEL_STORE_FOLDER_INFO_FAST, &ex);
@@ -375,10 +378,10 @@ mar_got_folder (gchar *folder_uri,
if (response == GTK_RESPONSE_NO)
mark_all_as_read (folder);
else if (response == GTK_RESPONSE_YES)
- mar_all_sub_folders (store, folder_info, &ex);
+ mar_all_sub_folders (parent_store, folder_info, &ex);
exit:
- camel_store_free_folder_info (store, folder_info);
+ camel_store_free_folder_info (parent_store, folder_info);
}
static void
diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c
index 97281246b5..74e167a9fe 100644
--- a/plugins/templates/templates.c
+++ b/plugins/templates/templates.c
@@ -554,22 +554,24 @@ build_template_menus_recurse (GtkUIManager *ui_manager,
GPtrArray *uids;
GtkAction *action;
const gchar *action_label;
+ const gchar *folder_name;
gchar *action_name;
gchar *path;
guint ii;
folder = camel_store_get_folder (
store, folder_info->full_name, 0, NULL);
+ folder_name = camel_folder_get_name (folder);
action_name = g_strdup_printf (
"templates-menu-%d", *action_count);
*action_count = *action_count + 1;
/* To avoid having a Templates dir, we ignore the top level */
- if (g_str_has_suffix (folder->name, "Templates"))
+ if (g_str_has_suffix (folder_name, "Templates"))
action_label = _("Templates");
else
- action_label = folder->name;
+ action_label = folder_name;
action = gtk_action_new (
action_name, action_label, NULL, NULL);
@@ -700,6 +702,7 @@ update_actions_cb (EShellView *shell_view)
CamelStore *store;
EMailReader *reader;
GPtrArray *uids;
+ const gchar *full_name;
guint action_count = 0;
guint merge_id;
gpointer data;
@@ -730,9 +733,10 @@ update_actions_cb (EShellView *shell_view)
store = e_mail_local_get_store ();
templates_folder = e_mail_local_get_folder (E_MAIL_FOLDER_TEMPLATES);
+ full_name = camel_folder_get_full_name (templates_folder);
folder_info = camel_store_get_folder_info (
- store, templates_folder->full_name,
+ store, full_name,
CAMEL_STORE_FOLDER_INFO_RECURSIVE |
CAMEL_STORE_FOLDER_INFO_FAST, NULL);