aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/itip-formatter
diff options
context:
space:
mode:
authorCarsten Guenther <carsten.guenther@scalix.com>2005-08-19 01:06:00 +0800
committerCarsten Guenther <carsteng@src.gnome.org>2005-08-19 01:06:00 +0800
commit3f742a182f0ea8f53d4215d2434ed7ec52c8dbc4 (patch)
treef0fd843dabc083e9fbe2ad15d7e9ec2e5b215ee1 /plugins/itip-formatter
parent4f56bd0a43427ac45f7ca3ca20ca70a6e9696a64 (diff)
downloadgsoc2013-evolution-3f742a182f0ea8f53d4215d2434ed7ec52c8dbc4.tar
gsoc2013-evolution-3f742a182f0ea8f53d4215d2434ed7ec52c8dbc4.tar.gz
gsoc2013-evolution-3f742a182f0ea8f53d4215d2434ed7ec52c8dbc4.tar.bz2
gsoc2013-evolution-3f742a182f0ea8f53d4215d2434ed7ec52c8dbc4.tar.lz
gsoc2013-evolution-3f742a182f0ea8f53d4215d2434ed7ec52c8dbc4.tar.xz
gsoc2013-evolution-3f742a182f0ea8f53d4215d2434ed7ec52c8dbc4.tar.zst
gsoc2013-evolution-3f742a182f0ea8f53d4215d2434ed7ec52c8dbc4.zip
NULL-terminate calls to e_error_run; fixed typos in if-statement; some
2005-08-18 Carsten Guenther <carsten.guenther@scalix.com> * itip-formatter.c: (update_attendee_status): NULL-terminate calls to e_error_run; fixed typos in if-statement; some code cleanup. (cal_opened_cb, final_cal_opened_cb): Removed unnecessary message about not being able to open the calendar. svn path=/trunk/; revision=30158
Diffstat (limited to 'plugins/itip-formatter')
-rw-r--r--plugins/itip-formatter/ChangeLog8
-rw-r--r--plugins/itip-formatter/itip-formatter.c56
2 files changed, 38 insertions, 26 deletions
diff --git a/plugins/itip-formatter/ChangeLog b/plugins/itip-formatter/ChangeLog
index 2379aa180f..2f0abd9d44 100644
--- a/plugins/itip-formatter/ChangeLog
+++ b/plugins/itip-formatter/ChangeLog
@@ -1,3 +1,11 @@
+2005-08-18 Carsten Guenther <carsten.guenther@scalix.com>
+
+ * itip-formatter.c: (update_attendee_status): NULL-terminate
+ calls to e_error_run; fixed typos in if-statement; some code
+ cleanup.
+ (cal_opened_cb, final_cal_opened_cb): Removed unnecessary
+ message about not being able to open the calendar.
+
2005-08-11 Dinesh Layek <LDinesh@novell.com>
Fixes #305627
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index 4ed6cdc342..452529df32 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -270,11 +270,7 @@ cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
if (status != E_CALENDAR_STATUS_OK) {
d(printf ("Failed opening itip formatter calendar '%s' during non-search opening\n", e_source_peek_name (source)));
- itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_WARNING,
- "Failed to load the calendar '%s'", e_source_peek_name (source));
-
g_hash_table_remove (pitip->ecals[source_type], e_source_peek_uid (source));
-
return;
}
@@ -379,11 +375,7 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
* to find the item, this won't be cleared but the
* selector might be shown */
d(printf ("Failed opening itip formatter calendar '%s' during search opening... ", e_source_peek_name (source)));
- itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_WARNING,
- "Failed to load the calendar '%s'", e_source_peek_name (source));
-
g_hash_table_remove (pitip->ecals[source_type], e_source_peek_uid (source));
-
goto cleanup;
}
@@ -942,33 +934,45 @@ update_attendee_status (FormatItipPObject *pitip)
if ((a->status == ICAL_PARTSTAT_DELEGATED) && (del_prop = find_attendee (org_icalcomp, itip_strip_mailto (a->delto))) && !(find_attendee (icalcomp, itip_strip_mailto (a->delto)))) {
gint response;
delegate = icalproperty_get_attendee (del_prop);
-
- if ((response = e_error_run (NULL, "org.gnome.itip-formatter:add-delegate",itip_strip_mailto (a->value), itip_strip_mailto (delegate))) == GTK_RESPONSE_YES) {
- icalcomponent_add_property (icalcomp, icalproperty_new_clone (del_prop));
- e_cal_component_rescan (comp);
- } else if (response == GTK_RESPONSE_NO) {
- remove_delegate (pitip, delegate, itip_strip_mailto (a->value), comp);
- goto cleanup;
- } else
- goto cleanup;
+ response = e_error_run (NULL, "org.gnome.itip-formatter:add-delegate",
+ itip_strip_mailto (a->value),
+ itip_strip_mailto (delegate), NULL);
+ if (response == GTK_RESPONSE_YES) {
+ icalcomponent_add_property (icalcomp, icalproperty_new_clone (del_prop));
+ e_cal_component_rescan (comp);
+ } else if (response == GTK_RESPONSE_NO) {
+ remove_delegate (pitip, delegate, itip_strip_mailto (a->value), comp);
+ goto cleanup;
+ } else {
+ goto cleanup;
+ }
}
if (prop == NULL) {
gint response;
if (a->delfrom && *a->delfrom) {
- if ((response == e_error_run (NULL, "org.gnome.itip-formatter:add-delegate", itip_strip_mailto (a->delfrom)), itip_strip_mailto (a->value)) == GTK_RESPONSE_YES) {
- icalproperty *prop = find_attendee (icalcomp, itip_strip_mailto (a->value));
- icalcomponent_add_property (icalcomp,icalproperty_new_clone (prop));
- e_cal_component_rescan (comp);
-
- } else if (response == GTK_RESPONSE_NO){
- remove_delegate (pitip, itip_strip_mailto (a->value) , itip_strip_mailto (a->delfrom), comp);
+ response = e_error_run (NULL, "org.gnome.itip-formatter:add-delegate",
+ itip_strip_mailto (a->delfrom),
+ itip_strip_mailto (a->value), NULL);
+ if (response == GTK_RESPONSE_YES) {
+ icalproperty *prop = find_attendee (icalcomp, itip_strip_mailto (a->value));
+ icalcomponent_add_property (icalcomp,icalproperty_new_clone (prop));
+ e_cal_component_rescan (comp);
+ } else if (response == GTK_RESPONSE_NO) {
+ remove_delegate (pitip,
+ itip_strip_mailto (a->value),
+ itip_strip_mailto (a->delfrom),
+ comp);
goto cleanup;
- } else
+ } else {
goto cleanup;
+ }
}
- if (e_error_run (NULL, "org.gnome.itip-formatter:add-unknown-attendee", NULL) == GTK_RESPONSE_YES) {
+
+ response = (e_error_run (NULL, "org.gnome.itip-formatter:add-unknown-attendee", NULL));
+
+ if (response == GTK_RESPONSE_YES) {
change_status (icalcomp, itip_strip_mailto (a->value), a->status);
e_cal_component_rescan (comp);
} else {