aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-06-05 04:53:10 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:26 +0800
commite7954c3f251aabbf95d099159709c8c66dfedc44 (patch)
tree08b6fbba02f05aa622cd54f45da223ef43066bb3 /calendar/gui/dialogs
parentdcaf6c52082765c2586a7d35b56b3dc417aa988d (diff)
downloadgsoc2013-evolution-e7954c3f251aabbf95d099159709c8c66dfedc44.tar
gsoc2013-evolution-e7954c3f251aabbf95d099159709c8c66dfedc44.tar.gz
gsoc2013-evolution-e7954c3f251aabbf95d099159709c8c66dfedc44.tar.bz2
gsoc2013-evolution-e7954c3f251aabbf95d099159709c8c66dfedc44.tar.lz
gsoc2013-evolution-e7954c3f251aabbf95d099159709c8c66dfedc44.tar.xz
gsoc2013-evolution-e7954c3f251aabbf95d099159709c8c66dfedc44.tar.zst
gsoc2013-evolution-e7954c3f251aabbf95d099159709c8c66dfedc44.zip
Coding style and whitespace cleanups.
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/comp-editor.c30
-rw-r--r--calendar/gui/dialogs/copy-source-dialog.c17
-rw-r--r--calendar/gui/dialogs/event-editor.c19
-rw-r--r--calendar/gui/dialogs/goto-dialog.c15
-rw-r--r--calendar/gui/dialogs/task-editor.c3
5 files changed, 59 insertions, 25 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index c8640b608a..cc794ae3f5 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -477,9 +477,14 @@ save_comp (CompEditor *editor)
if (result)
g_signal_emit_by_name (editor, "object_created");
} else {
+ gboolean has_recurrences;
- if (e_cal_component_has_recurrences (priv->comp) && priv->mod == CALOBJ_MOD_ALL)
- comp_util_sanitize_recurrence_master (priv->comp, priv->client);
+ has_recurrences =
+ e_cal_component_has_recurrences (priv->comp);
+
+ if (has_recurrences && priv->mod == CALOBJ_MOD_ALL)
+ comp_util_sanitize_recurrence_master (
+ priv->comp, priv->client);
if (priv->mod == CALOBJ_MOD_THIS) {
e_cal_component_set_rdate_list (priv->comp, NULL);
@@ -904,7 +909,9 @@ action_save_cb (GtkAction *action,
e_cal_component_has_recurrences (priv->comp)) {
gchar *rid;
rid = e_cal_component_get_recurid_as_string (priv->comp);
- e_cal_remove_object_with_mod (priv->client, uid, rid, priv->mod, &error);
+ e_cal_remove_object_with_mod (
+ priv->client, uid, rid,
+ priv->mod, &error);
g_free (rid);
} else
e_cal_remove_object (priv->client, uid, &error);
@@ -3020,8 +3027,8 @@ set_attendees_for_delegation (ECalComponent *comp,
icalcomp = e_cal_component_get_icalcomponent (comp);
for (prop = icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY);
- prop;
- prop = icalcomponent_get_next_property (icalcomp, ICAL_ATTENDEE_PROPERTY)) {
+ prop;
+ prop = icalcomponent_get_next_property (icalcomp, ICAL_ATTENDEE_PROPERTY)) {
const gchar *attendee = icalproperty_get_attendee (prop);
const gchar *delfrom = NULL;
@@ -3049,14 +3056,17 @@ get_users_from_memo_comp (ECalComponent *comp, GList **users)
icalcomp = e_cal_component_get_icalcomponent (comp);
for (icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
- icalprop != NULL;
- icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) {
- if (g_str_equal (icalproperty_get_x_name (icalprop), "X-EVOLUTION-RECIPIENTS")) {
+ icalprop != NULL;
+ icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) {
+ const gchar *x_name;
+
+ x_name = icalproperty_get_x_name (icalprop);
+
+ if (g_str_equal (x_name, "X-EVOLUTION-RECIPIENTS"))
break;
- }
}
- if (icalprop) {
+ if (icalprop) {
attendees = icalproperty_get_x (icalprop);
emails = g_strsplit (attendees, ";", -1);
diff --git a/calendar/gui/dialogs/copy-source-dialog.c b/calendar/gui/dialogs/copy-source-dialog.c
index f1c568849b..547a91069c 100644
--- a/calendar/gui/dialogs/copy-source-dialog.c
+++ b/calendar/gui/dialogs/copy-source-dialog.c
@@ -119,9 +119,13 @@ copy_source (CopySourceDialogData *csdd)
for (l = obj_list; l != NULL; l = l->next) {
/* FIXME: process recurrences */
/* FIXME: process errors */
- if (e_cal_get_object (dest_client, icalcomponent_get_uid (l->data), NULL,
- &icalcomp, NULL)) {
- e_cal_modify_object (dest_client, l->data, CALOBJ_MOD_ALL, NULL);
+ if (e_cal_get_object (
+ dest_client,
+ icalcomponent_get_uid (l->data),
+ NULL, &icalcomp, NULL)) {
+ e_cal_modify_object (
+ dest_client, l->data,
+ CALOBJ_MOD_ALL, NULL);
icalcomponent_free (icalcomp);
} else {
gchar *uid = NULL;
@@ -129,8 +133,11 @@ copy_source (CopySourceDialogData *csdd)
icalcomp = l->data;
- /* add timezone information from source ECal to the destination ECal */
- icalcomponent_foreach_tzid (icalcomp, add_timezone_to_cal_cb, &ftd);
+ /* Add timezone information from source
+ * ECal to the destination ECal. */
+ icalcomponent_foreach_tzid (
+ icalcomp,
+ add_timezone_to_cal_cb, &ftd);
if (e_cal_create_object (dest_client, icalcomp, &uid, &error)) {
g_free (uid);
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 41985bd8b7..64d3b67891 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -363,7 +363,8 @@ event_editor_constructor (GType type,
if (is_meeting) {
- if (e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS))
+ if (e_cal_get_static_capability (
+ client, CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS))
event_page_show_options (priv->event_page);
comp_editor_set_group_item (editor, TRUE);
@@ -651,8 +652,13 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
for (l = attendees; l != NULL; l = l->next) {
ECalComponentAttendee *ca = l->data;
EMeetingAttendee *ia;
+ gboolean addresses_match;
- if (delegate && !g_str_equal (itip_strip_mailto (ca->value), user_email))
+ addresses_match =
+ g_str_equal (user_email,
+ itip_strip_mailto (ca->value));
+
+ if (delegate && !addresses_match)
continue;
ia = E_MEETING_ATTENDEE (
@@ -677,13 +683,16 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
ia = e_meeting_store_find_self (priv->model, &row);
if (ia != NULL)
- e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_STATUS);
+ e_meeting_attendee_set_edit_level (
+ ia, E_MEETING_ATTENDEE_EDIT_STATUS);
} else if (e_cal_get_organizer_must_attend (client)) {
EMeetingAttendee *ia;
- ia = e_meeting_store_find_attendee (priv->model, organizer.value, &row);
+ ia = e_meeting_store_find_attendee (
+ priv->model, organizer.value, &row);
if (ia != NULL)
- e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
+ e_meeting_attendee_set_edit_level (
+ ia, E_MEETING_ATTENDEE_EDIT_NONE);
}
}
diff --git a/calendar/gui/dialogs/goto-dialog.c b/calendar/gui/dialogs/goto-dialog.c
index 282d5547ff..bc20baa7c2 100644
--- a/calendar/gui/dialogs/goto-dialog.c
+++ b/calendar/gui/dialogs/goto-dialog.c
@@ -60,21 +60,28 @@ static GoToDialog *dlg = NULL;
static void
year_changed (GtkAdjustment *adj, gpointer data)
{
+ GtkSpinButton *spin_button;
GoToDialog *dlg = data;
- dlg->year_val = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (dlg->year));
- e_calendar_item_set_first_month (dlg->ecal->calitem, dlg->year_val, dlg->month_val);
+ spin_button = GTK_SPIN_BUTTON (dlg->year);
+ dlg->year_val = gtk_spin_button_get_value_as_int (spin_button);
+
+ e_calendar_item_set_first_month (
+ dlg->ecal->calitem, dlg->year_val, dlg->month_val);
}
/* Callback used when a month button is toggled */
static void
month_changed (GtkToggleButton *toggle, gpointer data)
{
+ GtkComboBox *combo_box;
GoToDialog *dlg = data;
- dlg->month_val = gtk_combo_box_get_active (GTK_COMBO_BOX (dlg->month_combobox));
+ combo_box = GTK_COMBO_BOX (dlg->month_combobox);
+ dlg->month_val = gtk_combo_box_get_active (combo_box);
- e_calendar_item_set_first_month (dlg->ecal->calitem, dlg->year_val, dlg->month_val);
+ e_calendar_item_set_first_month (
+ dlg->ecal->calitem, dlg->year_val, dlg->month_val);
}
static void
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 30a5bbb9f9..f24db192b2 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -168,7 +168,8 @@ task_editor_constructor (GType type,
gtk_action_group_set_visible (action_group, is_assigned);
if (is_assigned) {
- if (e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS))
+ if (e_cal_get_static_capability (
+ client, CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS))
task_page_show_options (priv->task_page);
comp_editor_set_group_item (editor, TRUE);
}