diff options
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 167 | ||||
-rw-r--r-- | calendar/gui/dialogs/event-editor.c | 41 | ||||
-rw-r--r-- | calendar/gui/dialogs/recurrence-page.c | 4 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-editor.c | 31 |
4 files changed, 172 insertions, 71 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index dcb8dde7b1..ce01b7da4d 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -177,11 +177,15 @@ static const gchar *ui = static void comp_editor_show_help (CompEditor *editor); static void real_edit_comp (CompEditor *editor, ECalComponent *comp); -static gboolean real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms); +static gboolean real_send_comp (CompEditor *editor, + ECalComponentItipMethod method, + gboolean strip_alarms); static gboolean prompt_and_save_changes (CompEditor *editor, gboolean send); static void close_dialog (CompEditor *editor); -static void page_dates_changed_cb (CompEditor *editor, CompEditorPageDates *dates, CompEditorPage *page); +static void page_dates_changed_cb (CompEditor *editor, + CompEditorPageDates *dates, + CompEditorPage *page); static void obj_modified_cb (ECal *client, GList *objs, CompEditor *editor); static void obj_removed_cb (ECal *client, GList *uids, CompEditor *editor); @@ -415,7 +419,8 @@ save_comp (CompEditor *editor) clone = e_cal_component_clone (priv->comp); comp_editor_copy_new_attendees (clone, priv->comp); for (l = priv->pages; l != NULL; l = l->next) { - if (IS_COMP_EDITOR_PAGE(l->data) && !comp_editor_page_fill_component (l->data, clone)) { + if (IS_COMP_EDITOR_PAGE (l->data) && + !comp_editor_page_fill_component (l->data, clone)) { g_object_unref (clone); g_hash_table_destroy (timezones); comp_editor_show_page (editor, COMP_EDITOR_PAGE (l->data)); @@ -428,7 +433,9 @@ save_comp (CompEditor *editor) } /* If we are not the organizer, we don't update the sequence number */ - if (!e_cal_component_has_organizer (clone) || itip_organizer_is_user (clone, priv->client) || itip_sentby_is_user (clone, priv->client)) + if (!e_cal_component_has_organizer (clone) || + itip_organizer_is_user (clone, priv->client) || + itip_sentby_is_user (clone, priv->client)) e_cal_component_commit_sequence (clone); else e_cal_component_abort_sequence (clone); @@ -469,16 +476,20 @@ save_comp (CompEditor *editor) if (result && priv->mod == CALOBJ_MOD_THIS) { /* FIXME do we really need to do this ? */ - if ((flags & COMP_EDITOR_DELEGATE) || !e_cal_component_has_organizer (clone) || itip_organizer_is_user (clone, priv->client) || itip_sentby_is_user (clone, priv->client)) + if ((flags & COMP_EDITOR_DELEGATE) || + !e_cal_component_has_organizer (clone) || + itip_organizer_is_user (clone, priv->client) || + itip_sentby_is_user (clone, priv->client)) e_cal_component_commit_sequence (clone); else e_cal_component_abort_sequence (clone); } } - /* If the delay delivery is set, the items will not be created in the server immediately, - so we need not show them in the view. They will appear as soon as the server creates - it after the delay period */ + /* If the delay delivery is set, the items will not be created in + * the server immediately, so we need not show them in the view. + * They will appear as soon as the server creates it after the + * delay period. */ if (result && e_cal_component_has_attendees (priv->comp)) { gboolean delay_set = FALSE; icalproperty *icalprop; @@ -525,14 +536,18 @@ save_comp (CompEditor *editor) cal_comp_is_on_server (priv->comp, priv->source_client)) { /* Comp found a new home. Remove it from old one. */ - if (e_cal_component_is_instance (priv->comp) || e_cal_component_has_recurrences (priv->comp)) - e_cal_remove_object_with_mod (priv->source_client, orig_uid_copy, NULL, - CALOBJ_MOD_ALL, NULL); + if (e_cal_component_is_instance (priv->comp) || + e_cal_component_has_recurrences (priv->comp)) + e_cal_remove_object_with_mod ( + priv->source_client, orig_uid_copy, + NULL, CALOBJ_MOD_ALL, NULL); else - e_cal_remove_object (priv->source_client, orig_uid_copy, NULL); + e_cal_remove_object ( + priv->source_client, + orig_uid_copy, NULL); - /* Let priv->source_client point to new home, so we can move it - * again this session. */ + /* Let priv->source_client point to new home, + * so we can move it again this session. */ g_object_unref (priv->source_client); priv->source_client = g_object_ref (priv->client); @@ -575,17 +590,29 @@ save_comp_with_send (CompEditor *editor) return FALSE; delegated = delegate && !e_cal_get_save_schedules (priv->client); - if (delegated || (send && send_component_dialog ((GtkWindow *) editor, priv->client, priv->comp, !priv->existing_org, &strip_alarms, !priv->existing_org ? NULL : &only_new_attendees))) { + if (delegated || (send && send_component_dialog ( + (GtkWindow *) editor, priv->client, priv->comp, + !priv->existing_org, &strip_alarms, !priv->existing_org ? + NULL : &only_new_attendees))) { if (delegated) only_new_attendees = FALSE; - comp_editor_set_flags (editor, (comp_editor_get_flags (editor) & (~COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY)) | (only_new_attendees ? COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY : 0)); + comp_editor_set_flags ( + editor, (comp_editor_get_flags (editor) & + (~COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY)) | + (only_new_attendees ? + COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY : 0)); - if ((itip_organizer_is_user (priv->comp, priv->client) || itip_sentby_is_user (priv->comp, priv->client))) { + if ((itip_organizer_is_user (priv->comp, priv->client) || + itip_sentby_is_user (priv->comp, priv->client))) { if (e_cal_component_get_vtype (priv->comp) == E_CAL_COMPONENT_JOURNAL) - return comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_PUBLISH, strip_alarms); + return comp_editor_send_comp ( + editor, E_CAL_COMPONENT_METHOD_PUBLISH, + strip_alarms); else - return comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_REQUEST, strip_alarms); + return comp_editor_send_comp ( + editor, E_CAL_COMPONENT_METHOD_REQUEST, + strip_alarms); } else { if (!comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_REQUEST, strip_alarms)) return FALSE; @@ -754,7 +781,9 @@ remove_event_dialog (ECal *client, g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), TRUE); - dialog = gtk_message_dialog_new (parent, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s", _("Keep original item?")); + dialog = gtk_message_dialog_new ( + parent, 0, GTK_MESSAGE_QUESTION, + GTK_BUTTONS_YES_NO, "%s", _("Keep original item?")); gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE); ret = gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_YES; gtk_widget_destroy (dialog); @@ -799,13 +828,21 @@ action_save_cb (GtkAction *action, } if (!e_cal_is_read_only (priv->client, &read_only, NULL) || read_only) { - e_alert_run_dialog_for_args ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (editor)), "calendar:prompt-read-only-cal-editor", e_source_peek_name (e_cal_get_source (priv->client)), NULL); + e_alert_run_dialog_for_args ( + (GtkWindow *) gtk_widget_get_toplevel ( + GTK_WIDGET (editor)), + "calendar:prompt-read-only-cal-editor", + e_source_peek_name ( + e_cal_get_source (priv->client)), + NULL); return; } commit_all_fields (editor); if (e_cal_component_has_recurrences (priv->comp)) { - if (!recur_component_dialog (priv->client, priv->comp, &priv->mod, GTK_WINDOW (editor), delegated)) + if (!recur_component_dialog ( + priv->client, priv->comp, &priv->mod, + GTK_WINDOW (editor), delegated)) return; } else if (e_cal_component_is_instance (priv->comp)) priv->mod = CALOBJ_MOD_THIS; @@ -828,13 +865,15 @@ action_save_cb (GtkAction *action, flags = comp_editor_get_flags (editor); delegate = flags & COMP_EDITOR_DELEGATE; - if (delegate && !remove_event_dialog (priv->client, priv->comp, GTK_WINDOW (editor))) { + if (delegate && !remove_event_dialog ( + priv->client, priv->comp, GTK_WINDOW (editor))) { const gchar *uid = NULL; GError *error = NULL; e_cal_component_get_uid (priv->comp, &uid); - if (e_cal_component_is_instance (priv->comp) || e_cal_component_has_recurrences (priv->comp)) { + if (e_cal_component_is_instance (priv->comp) || + 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); @@ -1836,7 +1875,13 @@ prompt_and_save_changes (CompEditor *editor, gboolean send) switch (save_component_dialog (GTK_WINDOW(editor), priv->comp)) { case GTK_RESPONSE_YES: /* Save */ if (!e_cal_is_read_only (priv->client, &read_only, NULL) || read_only) { - e_alert_run_dialog_for_args ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (editor)), "calendar:prompt-read-only-cal-editor", e_source_peek_name (e_cal_get_source (priv->client)), NULL); + e_alert_run_dialog_for_args ( + (GtkWindow *) gtk_widget_get_toplevel ( + GTK_WIDGET (editor)), + "calendar:prompt-read-only-cal-editor", + e_source_peek_name ( + e_cal_get_source (priv->client)), + NULL); /* don't discard changes when selected readonly calendar */ return FALSE; } @@ -1853,7 +1898,9 @@ prompt_and_save_changes (CompEditor *editor, gboolean send) return FALSE; if (e_cal_component_is_instance (priv->comp)) - if (!recur_component_dialog (priv->client, priv->comp, &priv->mod, GTK_WINDOW (editor), FALSE)) + if (!recur_component_dialog ( + priv->client, priv->comp, &priv->mod, + GTK_WINDOW (editor), FALSE)) return FALSE; if (send && save_comp_with_send (editor)) @@ -2397,8 +2444,10 @@ comp_editor_remove_page (CompEditor *editor, CompEditorPage *page) return; /* Disconnect all the signals added in append_page(). */ - g_signal_handlers_disconnect_matched (page, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor); - g_signal_handlers_disconnect_matched (page_widget, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, page); + g_signal_handlers_disconnect_matched ( + page, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor); + g_signal_handlers_disconnect_matched ( + page_widget, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, page); gtk_notebook_remove_page (priv->notebook, page_num); @@ -2634,7 +2683,9 @@ real_edit_comp (CompEditor *editor, ECalComponent *comp) /* TODO These functions should be available in e-cal-component.c */ static void -set_attendees_for_delegation (ECalComponent *comp, const gchar *address, ECalComponentItipMethod method) +set_attendees_for_delegation (ECalComponent *comp, + const gchar *address, + ECalComponentItipMethod method) { icalproperty *prop; icalparameter *param; @@ -2671,8 +2722,9 @@ 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; - icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) { + 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")) { break; } @@ -2692,7 +2744,9 @@ get_users_from_memo_comp (ECalComponent *comp, GList **users) } static gboolean -real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms) +real_send_comp (CompEditor *editor, + ECalComponentItipMethod method, + gboolean strip_alarms) { CompEditorPrivate *priv; CompEditorFlags flags; @@ -2729,7 +2783,8 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean str if (e_cal_component_get_vtype (send_comp) == E_CAL_COMPONENT_JOURNAL) get_users_from_memo_comp (send_comp, &users); - /* The user updates the delegated status to the Organizer, so remove all other attendees */ + /* The user updates the delegated status to the Organizer, + * so remove all other attendees. */ if (flags & COMP_EDITOR_DELEGATE) { address = itip_get_comp_attendee (send_comp, priv->client); @@ -2737,10 +2792,13 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean str set_attendees_for_delegation (send_comp, address, method); } - if (!e_cal_component_has_attachments (priv->comp) - || e_cal_get_static_capability (priv->client, CAL_STATIC_CAPABILITY_CREATE_MESSAGES)) { - if (itip_send_comp (method, send_comp, priv->client, - NULL, NULL, users, strip_alarms, priv->flags & COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY)) { + if (!e_cal_component_has_attachments (priv->comp) || + e_cal_get_static_capability (priv->client, + CAL_STATIC_CAPABILITY_CREATE_MESSAGES)) { + if (itip_send_comp ( + method, send_comp, priv->client, + NULL, NULL, users, strip_alarms, + priv->flags & COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY)) { g_object_unref (send_comp); return TRUE; } @@ -2755,7 +2813,9 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean str for (attach = mime_attach_list; attach; attach = attach->next) { struct CalMimeAttach *cma = (struct CalMimeAttach *) attach->data; - attach_list = g_slist_append (attach_list, g_strconcat ("cid:", cma->content_id, NULL)); + attach_list = g_slist_append ( + attach_list, g_strconcat ( + "cid:", cma->content_id, NULL)); } if (attach_list) { @@ -2765,8 +2825,10 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean str g_slist_free (attach_list); } - if (itip_send_comp (method, send_comp, priv->client, - NULL, mime_attach_list, users, strip_alarms, priv->flags & COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY)) { + if (itip_send_comp ( + method, send_comp, priv->client, + NULL, mime_attach_list, users, strip_alarms, + priv->flags & COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY)) { gboolean saved = save_comp (editor); g_object_unref (send_comp); @@ -2879,7 +2941,8 @@ comp_editor_delete_comp (CompEditor *editor) priv = editor->priv; e_cal_component_get_uid (priv->comp, &uid); - if (e_cal_component_is_instance (priv->comp)|| e_cal_component_has_recurrences (priv->comp)) + if (e_cal_component_is_instance (priv->comp) || + e_cal_component_has_recurrences (priv->comp)) e_cal_remove_object_with_mod (priv->client, uid, NULL, CALOBJ_MOD_ALL, NULL); else @@ -2895,7 +2958,9 @@ comp_editor_delete_comp (CompEditor *editor) * **/ gboolean -comp_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms) +comp_editor_send_comp (CompEditor *editor, + ECalComponentItipMethod method, + gboolean strip_alarms) { CompEditorClass *class; @@ -2984,8 +3049,10 @@ comp_editor_get_mime_attach_list (CompEditor *editor) if (!desc || *desc == '\0') desc = _("attachment"); cal_mime_attach->description = g_strdup (desc); - cal_mime_attach->content_type = g_strdup (camel_data_wrapper_get_mime_type (wrapper)); - cal_mime_attach->content_id = g_strdup (camel_mime_part_get_content_id (mime_part)); + cal_mime_attach->content_type = g_strdup ( + camel_data_wrapper_get_mime_type (wrapper)); + cal_mime_attach->content_id = g_strdup ( + camel_mime_part_get_content_id (mime_part)); disp = camel_mime_part_get_disposition (mime_part); if (disp && !g_ascii_strcasecmp(disp, "inline")) @@ -3012,9 +3079,12 @@ page_dates_changed_cb (CompEditor *editor, if (page != (CompEditorPage *) l->data && IS_COMP_EDITOR_PAGE(l->data)) comp_editor_page_set_dates (l->data, dates); - if (!priv->warned && priv->existing_org && !priv->user_org && !(editor->priv->flags & COMP_EDITOR_NEW_ITEM)) { - e_notice (priv->notebook, GTK_MESSAGE_INFO, - _("Changes made to this item may be discarded if an update arrives")); + if (!priv->warned && priv->existing_org && !priv->user_org && + !(editor->priv->flags & COMP_EDITOR_NEW_ITEM)) { + e_notice ( + priv->notebook, GTK_MESSAGE_INFO, + _("Changes made to this item may be discarded " + "if an update arrives")); priv->warned = TRUE; } } @@ -3030,7 +3100,8 @@ obj_modified_cb (ECal *client, priv = editor->priv; /* We queried based on a specific UID so we definitely changed */ - if (changed_component_dialog ((GtkWindow *) editor, priv->comp, FALSE, priv->changed)) { + if (changed_component_dialog ( + (GtkWindow *) editor, priv->comp, FALSE, priv->changed)) { icalcomponent *icalcomp = icalcomponent_new_clone (objects->data); comp = e_cal_component_new (); diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index f055884d0d..b0dee13f27 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -106,8 +106,11 @@ static const gchar *ui = " </toolbar>" "</ui>"; -static void event_editor_edit_comp (CompEditor *editor, ECalComponent *comp); -static gboolean event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms); +static void event_editor_edit_comp (CompEditor *editor, + ECalComponent *comp); +static gboolean event_editor_send_comp (CompEditor *editor, + ECalComponentItipMethod method, + gboolean strip_alarms); G_DEFINE_TYPE (EventEditor, event_editor, TYPE_COMP_EDITOR) @@ -365,7 +368,9 @@ event_editor_constructor (GType type, event_page_show_options (priv->event_page); comp_editor_set_group_item (editor, TRUE); - if (!((flags & COMP_EDITOR_USER_ORG) || (flags & COMP_EDITOR_DELEGATE)|| (flags & COMP_EDITOR_NEW_ITEM))) { + if (!((flags & COMP_EDITOR_USER_ORG) || + (flags & COMP_EDITOR_DELEGATE) || + (flags & COMP_EDITOR_NEW_ITEM))) { GtkAction *action; action = comp_editor_get_action (editor, "free-busy"); @@ -635,7 +640,8 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp) gtk_action_set_visible (action, TRUE); } - if (!(delegate && e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY))) { + if (!(delegate && e_cal_get_static_capability ( + client, CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY))) { event_page_remove_all_attendees (priv->event_page); for (l = attendees; l != NULL; l = l->next) { @@ -645,11 +651,15 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp) if (delegate && !g_str_equal (itip_strip_mailto (ca->value), user_email)) continue; - ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_e_cal_component_attendee (ca)); + ia = E_MEETING_ATTENDEE ( + e_meeting_attendee_new_from_e_cal_component_attendee (ca)); - /* If we aren't the organizer or the attendee is just delegated, don't allow editing */ - if (!comp_editor_get_user_org (editor) || e_meeting_attendee_is_set_delto (ia)) - e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE); + /* If we aren't the organizer or the attendee + * is just delegated, don't allow editing. */ + if (!comp_editor_get_user_org (editor) || + e_meeting_attendee_is_set_delto (ia)) + e_meeting_attendee_set_edit_level ( + ia, E_MEETING_ATTENDEE_EDIT_NONE); event_page_add_attendee (priv->event_page, ia); @@ -663,7 +673,9 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp) EIterator *it; accounts = itip_addresses_get (); - for (it = e_list_get_iterator((EList *)accounts);e_iterator_is_valid(it);e_iterator_next(it)) { + for (it = e_list_get_iterator((EList *)accounts); + e_iterator_is_valid(it); + e_iterator_next(it)) { EMeetingAttendee *ia; account = (EAccount*)e_iterator_get(it); @@ -687,13 +699,17 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp) } e_cal_component_free_attendee_list (attendees); - comp_editor_set_needs_send (editor, priv->meeting_shown && (itip_organizer_is_user (comp, client) || itip_sentby_is_user (comp, client))); + comp_editor_set_needs_send ( + editor, priv->meeting_shown && (itip_organizer_is_user ( + comp, client) || itip_sentby_is_user (comp, client))); priv->updating = FALSE; } static gboolean -event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms) +event_editor_send_comp (CompEditor *editor, + ECalComponentItipMethod method, + gboolean strip_alarms) { EventEditorPrivate *priv; ECalComponent *comp = NULL; @@ -721,7 +737,8 @@ event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboo parent: if (COMP_EDITOR_CLASS (event_editor_parent_class)->send_comp) - return COMP_EDITOR_CLASS (event_editor_parent_class)->send_comp (editor, method, strip_alarms); + return COMP_EDITOR_CLASS (event_editor_parent_class)-> + send_comp (editor, method, strip_alarms); return FALSE; } diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index ae79698efd..c2efce759c 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -493,7 +493,7 @@ get_start_weekday_mask (ECalComponent *comp) e_cal_component_get_dtstart (comp, &dt); if (dt.value) { - short weekday; + gshort weekday; weekday = icaltime_day_of_week (*dt.value); retval = 0x1 << (weekday - 1); @@ -1325,7 +1325,7 @@ make_recurrence_special (RecurrencePage *rpage) /* Counts the elements in the by_xxx fields of an icalrecurrencetype */ static gint -count_by_xxx (short *field, gint max_elements) +count_by_xxx (gshort *field, gint max_elements) { gint i; diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c index 09494cec1a..01f65aa8fd 100644 --- a/calendar/gui/dialogs/task-editor.c +++ b/calendar/gui/dialogs/task-editor.c @@ -88,8 +88,11 @@ static const gchar *ui = " </toolbar>" "</ui>"; -static void task_editor_edit_comp (CompEditor *editor, ECalComponent *comp); -static gboolean task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms); +static void task_editor_edit_comp (CompEditor *editor, + ECalComponent *comp); +static gboolean task_editor_send_comp (CompEditor *editor, + ECalComponentItipMethod method, + gboolean strip_alarms); G_DEFINE_TYPE (TaskEditor, task_editor, TYPE_COMP_EDITOR) @@ -413,9 +416,12 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp) EMeetingAttendee *ia; ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_e_cal_component_attendee (ca)); - /* If we aren't the organizer or the attendee is just delegating, don't allow editing */ - if (!comp_editor_get_user_org (editor) || e_meeting_attendee_is_set_delto (ia)) - e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE); + /* If we aren't the organizer or the attendee is just + * delegating, don't allow editing. */ + if (!comp_editor_get_user_org (editor) || + e_meeting_attendee_is_set_delto (ia)) + e_meeting_attendee_set_edit_level ( + ia, E_MEETING_ATTENDEE_EDIT_NONE); task_page_add_attendee (priv->task_page, ia); g_object_unref (ia); @@ -428,7 +434,9 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp) EIterator *it; accounts = itip_addresses_get (); - for (it = e_list_get_iterator((EList *)accounts);e_iterator_is_valid(it);e_iterator_next(it)) { + for (it = e_list_get_iterator((EList *)accounts); + e_iterator_is_valid(it); + e_iterator_next(it)) { EMeetingAttendee *ia; account = (EAccount*)e_iterator_get(it); @@ -451,13 +459,17 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp) } e_cal_component_free_attendee_list (attendees); - comp_editor_set_needs_send (editor, priv->assignment_shown && itip_organizer_is_user (comp, client)); + comp_editor_set_needs_send ( + editor, priv->assignment_shown && + itip_organizer_is_user (comp, client)); priv->updating = FALSE; } static gboolean -task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms) +task_editor_send_comp (CompEditor *editor, + ECalComponentItipMethod method, + gboolean strip_alarms) { TaskEditorPrivate *priv; ECalComponent *comp = NULL; @@ -485,7 +497,8 @@ task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gbool parent: if (COMP_EDITOR_CLASS (task_editor_parent_class)->send_comp) - return COMP_EDITOR_CLASS (task_editor_parent_class)->send_comp (editor, method, strip_alarms); + return COMP_EDITOR_CLASS (task_editor_parent_class)-> + send_comp (editor, method, strip_alarms); return FALSE; } |