diff options
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/gui/calendar-config.c | 10 | ||||
-rw-r--r-- | calendar/gui/comp-util.c | 3 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 7 | ||||
-rw-r--r-- | calendar/gui/dialogs/delete-comp.c | 6 | ||||
-rw-r--r-- | calendar/gui/dialogs/delete-comp.h | 2 | ||||
-rw-r--r-- | calendar/gui/e-calendar-table.c | 6 | ||||
-rw-r--r-- | calendar/gui/e-calendar-view.c | 21 | ||||
-rw-r--r-- | calendar/gui/e-calendar-view.h | 2 |
8 files changed, 32 insertions, 25 deletions
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c index 11c3c8f33d..3341d7c51b 100644 --- a/calendar/gui/calendar-config.c +++ b/calendar/gui/calendar-config.c @@ -1575,8 +1575,16 @@ calendar_config_select_day_second_zone (void) dialog = e_timezone_dialog_get_toplevel (tzdlg); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { + const char *location = NULL; + zone = e_timezone_dialog_get_timezone (tzdlg); - calendar_config_set_day_second_zone (zone ? icaltimezone_get_location (zone) : NULL); + if (zone == icaltimezone_get_utc_timezone ()) { + location = "UTC"; + } else if (zone) { + location = icaltimezone_get_location (zone); + } + + calendar_config_set_day_second_zone (location); } g_object_unref (tzdlg); diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c index 57704da0f2..53fdacefb9 100644 --- a/calendar/gui/comp-util.c +++ b/calendar/gui/comp-util.c @@ -820,8 +820,7 @@ comp_util_sanitize_recurrence_master (ECalComponent *comp, ECal *client) e_cal_component_get_recurid (comp, &rid); e_cal_component_get_dtstart (comp, &sdt); - if (icaltime_compare_date_only (*rid.datetime.value, *sdt.value) == 0) - { + if (rid.datetime.value && sdt.value && icaltime_compare_date_only (*rid.datetime.value, *sdt.value) == 0) { ECalComponentDateTime msdt, medt, edt; int *sequence; diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index bee9daf99a..049f90a1ff 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -1934,7 +1934,7 @@ comp_editor_set_summary (CompEditor *editor, !editor->priv->warned && !(editor->priv->flags & COMP_EDITOR_DELEGATE) && editor->priv->existing_org && - !editor->priv->user_org; + !editor->priv->user_org && !(editor->priv->flags & COMP_EDITOR_NEW_ITEM); if (show_warning) { e_notice ( @@ -1982,7 +1982,8 @@ comp_editor_set_changed (CompEditor *editor, show_warning = changed && !editor->priv->warned && !(editor->priv->flags & COMP_EDITOR_DELEGATE) && - editor->priv->existing_org && !editor->priv->user_org; + editor->priv->existing_org && !editor->priv->user_org + && !(editor->priv->flags & COMP_EDITOR_NEW_ITEM); if (show_warning) { e_notice ( @@ -2808,7 +2809,7 @@ page_dates_changed_cb (CompEditor *editor, if (page != (CompEditorPage *) l->data) comp_editor_page_set_dates (l->data, dates); - if (!priv->warned && priv->existing_org && !priv->user_org) { + 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; diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c index 3508f38f02..e5ae1e6cdc 100644 --- a/calendar/gui/dialogs/delete-comp.c +++ b/calendar/gui/dialogs/delete-comp.c @@ -167,7 +167,7 @@ cb_toggled_cb (GtkWidget *toggle, gpointer data) } gboolean -prompt_retract_dialog (ECalComponent *comp, char **retract_text, GtkWidget *parent) +prompt_retract_dialog (ECalComponent *comp, char **retract_text, GtkWidget *parent, gboolean *retract) { char *message = NULL; ECalComponentVType type = E_CAL_COMPONENT_NO_TYPE; @@ -232,13 +232,15 @@ prompt_retract_dialog (ECalComponent *comp, char **retract_text, GtkWidget *pare GtkTextIter text_iter_start, text_iter_end; GtkTextBuffer *text_buffer; + *retract = TRUE; text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (entry)); gtk_text_buffer_get_start_iter (text_buffer, &text_iter_start); gtk_text_buffer_get_end_iter (text_buffer, &text_iter_end); *retract_text = gtk_text_buffer_get_text (text_buffer, &text_iter_start, &text_iter_end, FALSE); - } + } else + *retract = FALSE; } gtk_widget_destroy ((GtkWidget *) dialog); diff --git a/calendar/gui/dialogs/delete-comp.h b/calendar/gui/dialogs/delete-comp.h index a2f85301a0..bb4b5983d9 100644 --- a/calendar/gui/dialogs/delete-comp.h +++ b/calendar/gui/dialogs/delete-comp.h @@ -33,6 +33,6 @@ gboolean delete_component_dialog (ECalComponent *comp, gboolean consider_as_untitled, int n_comps, ECalComponentVType vtype, GtkWidget *widget); -gboolean prompt_retract_dialog (ECalComponent *comp, char **retract_text, GtkWidget *parent); +gboolean prompt_retract_dialog (ECalComponent *comp, char **retract_text, GtkWidget *parent, gboolean *retract); #endif diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index e914e5095b..26c0ad6dea 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -1132,9 +1132,6 @@ check_for_retract (ECalComponent *comp, ECal *client) ret_val = TRUE; } - if (!ret_val) - ret_val = e_account_list_find(itip_addresses_get(), E_ACCOUNT_FIND_ID_ADDRESS, strip) != NULL; - g_free (email); return ret_val; } @@ -1180,8 +1177,7 @@ e_calendar_table_delete_selected (ECalendarTable *cal_table) char *retract_comment = NULL; gboolean retract = FALSE; - retract = prompt_retract_dialog (comp, &retract_comment, GTK_WIDGET (cal_table)); - delete = retract; + delete = prompt_retract_dialog (comp, &retract_comment, GTK_WIDGET (cal_table), &retract); if (retract) { GList *users = NULL; icalcomponent *icalcomp = NULL, *mod_comp = NULL; diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index 4a3bd2e75c..cc51599440 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -73,7 +73,6 @@ struct _ECalendarViewPrivate { static void e_calendar_view_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void e_calendar_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static void e_calendar_view_destroy (GtkObject *object); -static void open_event_with_flags (ECalendarView *cal_view, ECal *client, icalcomponent *icalcomp, guint32 flags); /* Property IDs */ @@ -963,9 +962,6 @@ check_for_retract (ECalComponent *comp, ECal *client) ret_val = TRUE; } - if (!ret_val) - ret_val = e_account_list_find(itip_addresses_get(), E_ACCOUNT_FIND_ID_ADDRESS, strip) != NULL; - g_free (email); return ret_val; } @@ -986,11 +982,12 @@ delete_event (ECalendarView *cal_view, ECalendarViewEvent *event) if (!e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER)) e_cal_component_set_recurid (comp, NULL); + /*FIXME Retract should be moved to Groupwise features plugin */ if (check_for_retract (comp, event->comp_data->client)) { char *retract_comment = NULL; gboolean retract = FALSE; - retract = prompt_retract_dialog (comp, &retract_comment, GTK_WIDGET (cal_view)); + delete = prompt_retract_dialog (comp, &retract_comment, GTK_WIDGET (cal_view), &retract); if (retract) { GList *users = NULL; icalcomponent *icalcomp = NULL, *mod_comp = NULL; @@ -1102,11 +1099,12 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view) e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp)); vtype = e_cal_component_get_vtype (comp); + /*FIXME Retract should be moved to Groupwise features plugin */ if (check_for_retract (comp, event->comp_data->client)) { char *retract_comment = NULL; gboolean retract = FALSE; - retract = prompt_retract_dialog (comp, &retract_comment, GTK_WIDGET (cal_view)); + delete = prompt_retract_dialog (comp, &retract_comment, GTK_WIDGET (cal_view), &retract); if (retract) { GList *users = NULL; icalcomponent *icalcomp = NULL, *mod_comp = NULL; @@ -1569,7 +1567,7 @@ on_delegate (EPopup *ep, EPopupItem *pitem, void *data) flags |= COMP_EDITOR_MEETING | COMP_EDITOR_DELEGATE; - open_event_with_flags (cal_view, event->comp_data->client, clone, flags); + e_calendar_view_open_event_with_flags (cal_view, event->comp_data->client, clone, flags); icalcomponent_free (clone); g_list_free (selected); @@ -1917,7 +1915,7 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view, flags |= COMP_EDITOR_USER_ORG; } - open_event_with_flags (cal_view, default_client, + e_calendar_view_open_event_with_flags (cal_view, default_client, icalcomp, flags); g_object_unref (comp); @@ -2008,8 +2006,8 @@ object_created_cb (CompEditor *ce, ECalendarView *cal_view) #endif } -static void -open_event_with_flags (ECalendarView *cal_view, ECal *client, icalcomponent *icalcomp, guint32 flags) +CompEditor * +e_calendar_view_open_event_with_flags (ECalendarView *cal_view, ECal *client, icalcomponent *icalcomp, guint32 flags) { CompEditor *ce; const char *uid; @@ -2038,6 +2036,7 @@ open_event_with_flags (ECalendarView *cal_view, ECal *client, icalcomponent *ica gtk_window_present (GTK_WINDOW (ce)); + return ce; } /** @@ -2072,7 +2071,7 @@ e_calendar_view_edit_appointment (ECalendarView *cal_view, } - open_event_with_flags (cal_view, client, icalcomp, flags); + e_calendar_view_open_event_with_flags (cal_view, client, icalcomp, flags); } void diff --git a/calendar/gui/e-calendar-view.h b/calendar/gui/e-calendar-view.h index e5d8478b8e..5116c7c9c9 100644 --- a/calendar/gui/e-calendar-view.h +++ b/calendar/gui/e-calendar-view.h @@ -27,6 +27,7 @@ #include <gtk/gtk.h> #include "e-cal-model.h" #include "gnome-cal.h" +#include "dialogs/comp-editor.h" G_BEGIN_DECLS @@ -142,6 +143,7 @@ void e_calendar_view_paste_clipboard (ECalendarView *cal_view); void e_calendar_view_delete_selected_event (ECalendarView *cal_view); void e_calendar_view_delete_selected_events (ECalendarView *cal_view); void e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view); +CompEditor* e_calendar_view_open_event_with_flags (ECalendarView *cal_view, ECal *client, icalcomponent *icalcomp, guint32 flags); GtkMenu *e_calendar_view_create_popup_menu (ECalendarView *cal_view); |