aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/itip-formatter
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-10-16 03:02:42 +0800
committerMilan Crha <mcrha@redhat.com>2009-10-16 03:02:42 +0800
commitf74a1448947259f52293ba922b64b2b3b8ff726c (patch)
treea85e893277db5a7564ba2857f87b8f256227f06d /plugins/itip-formatter
parent3766e19a2aafccaae1f662bc8770f074fdcc4a2d (diff)
downloadgsoc2013-evolution-f74a1448947259f52293ba922b64b2b3b8ff726c.tar
gsoc2013-evolution-f74a1448947259f52293ba922b64b2b3b8ff726c.tar.gz
gsoc2013-evolution-f74a1448947259f52293ba922b64b2b3b8ff726c.tar.bz2
gsoc2013-evolution-f74a1448947259f52293ba922b64b2b3b8ff726c.tar.lz
gsoc2013-evolution-f74a1448947259f52293ba922b64b2b3b8ff726c.tar.xz
gsoc2013-evolution-f74a1448947259f52293ba922b64b2b3b8ff726c.tar.zst
gsoc2013-evolution-f74a1448947259f52293ba922b64b2b3b8ff726c.zip
Bug #322261 - vCalendar replies are sent out using the default account
Diffstat (limited to 'plugins/itip-formatter')
-rw-r--r--plugins/itip-formatter/itip-formatter.c22
-rw-r--r--plugins/itip-formatter/itip-view.c1
2 files changed, 14 insertions, 9 deletions
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index a0daa6f156..250bbef2d6 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -233,9 +233,20 @@ find_to_address (struct _itip_puri *pitip, icalcomponent *ical_comp, icalparamet
it = e_list_get_iterator((EList *)pitip->accounts);
- /* Look through the list of attendees to find the user's address */
+ if (!pitip->to_address && pitip->msg) {
+ EAccount *account = em_utils_guess_account (pitip->msg, pitip->folder);
+
+ if (account) {
+ pitip->to_address = g_strdup (e_account_get_string (account, E_ACCOUNT_ID_ADDRESS));
+ if (pitip->to_address && !*pitip->to_address) {
+ g_free (pitip->to_address);
+ pitip->to_address = NULL;
+ }
+ }
+ }
- if (!pitip->my_address)
+ /* Look through the list of attendees to find the user's address */
+ if (!pitip->to_address)
while (e_iterator_is_valid(it)) {
const EAccount *account = e_iterator_get(it);
icalproperty *prop = NULL;
@@ -290,8 +301,7 @@ find_to_address (struct _itip_puri *pitip, icalcomponent *ical_comp, icalparamet
* previous loop, but it would hurt the performance for all providers in
* general. Hence, we choose to iterate through the accounts list again.
*/
-
- if (!pitip->my_address)
+ if (!pitip->to_address)
while (e_iterator_is_valid(it)) {
const EAccount *account = e_iterator_get(it);
icalproperty *prop = NULL;
@@ -1923,7 +1933,6 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data)
}
if (!save_schedules && pitip->delete_message) {
- g_message ("Deleting!");
camel_folder_delete_message (pitip->folder, pitip->uid);
}
@@ -2509,14 +2518,12 @@ source_selection_changed (ESourceSelector *selector, gpointer data)
GSList *groups;
/* first we clear all the completion flags from all sources */
- g_message ("Clearing selection");
for (groups = e_source_list_peek_groups (source_list); groups; groups = groups->next) {
ESourceGroup *group = E_SOURCE_GROUP (groups->data);
GSList *sources;
for (sources = e_source_group_peek_sources (group); sources; sources = sources->next) {
ESource *source = E_SOURCE (sources->data);
- g_message ("Unsetting for %s", e_source_peek_name (source));
e_source_set_property (source, "conflict", NULL);
}
}
@@ -2525,7 +2532,6 @@ source_selection_changed (ESourceSelector *selector, gpointer data)
property on those sources */
selection = e_source_selector_get_selection (selector);
for (l = selection; l; l = l->next) {
- g_message ("Setting for %s", e_source_peek_name (E_SOURCE (l->data)));
e_source_set_property (E_SOURCE (l->data), "conflict", "true");
}
e_source_selector_free_selection (selection);
diff --git a/plugins/itip-formatter/itip-view.c b/plugins/itip-formatter/itip-view.c
index a5505597a0..648d35e349 100644
--- a/plugins/itip-formatter/itip-view.c
+++ b/plugins/itip-formatter/itip-view.c
@@ -774,7 +774,6 @@ button_clicked_cb (GtkWidget *widget, gpointer data)
response = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), DATA_RESPONSE_KEY));
- g_message ("Response %d", response);
g_signal_emit (G_OBJECT (data), signals[RESPONSE], 0, response);
}