diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2009-01-21 10:52:05 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2009-01-21 10:52:05 +0800 |
commit | ab00f5b08adb1d74a0c70d935a32ffd982e86f34 (patch) | |
tree | 45bfaa44682bc3eee5a2ad8a64112b248767af5b /calendar/gui/dialogs | |
parent | 5a1c48696363e3f3c7ffe11bdffdcad6557f811a (diff) | |
download | gsoc2013-evolution-ab00f5b08adb1d74a0c70d935a32ffd982e86f34.tar gsoc2013-evolution-ab00f5b08adb1d74a0c70d935a32ffd982e86f34.tar.gz gsoc2013-evolution-ab00f5b08adb1d74a0c70d935a32ffd982e86f34.tar.bz2 gsoc2013-evolution-ab00f5b08adb1d74a0c70d935a32ffd982e86f34.tar.lz gsoc2013-evolution-ab00f5b08adb1d74a0c70d935a32ffd982e86f34.tar.xz gsoc2013-evolution-ab00f5b08adb1d74a0c70d935a32ffd982e86f34.tar.zst gsoc2013-evolution-ab00f5b08adb1d74a0c70d935a32ffd982e86f34.zip |
Merge revisions 37075:37107 from trunk.
svn path=/branches/kill-bonobo/; revision=37112
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r-- | calendar/gui/dialogs/cal-prefs-dialog.c | 57 | ||||
-rw-r--r-- | calendar/gui/dialogs/cal-prefs-dialog.glade | 110 | ||||
-rw-r--r-- | calendar/gui/dialogs/cal-prefs-dialog.h | 4 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 23 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor.h | 5 | ||||
-rw-r--r-- | calendar/gui/dialogs/event-editor.c | 8 | ||||
-rw-r--r-- | calendar/gui/dialogs/send-comp.c | 68 | ||||
-rw-r--r-- | calendar/gui/dialogs/send-comp.h | 2 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-editor.c | 8 |
9 files changed, 258 insertions, 27 deletions
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c index 38871c2f89..21ace5aea4 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.c +++ b/calendar/gui/dialogs/cal-prefs-dialog.c @@ -49,6 +49,7 @@ static const int hide_completed_units_map[] = { CAL_MINUTES, CAL_HOURS, CAL_DAYS, -1 }; +/* same is used for Birthdays & Anniversaries calendar */ static const int default_reminder_units_map[] = { CAL_MINUTES, CAL_HOURS, CAL_DAYS, -1 }; @@ -333,6 +334,12 @@ dnav_show_week_no_toggled (GtkToggleButton *toggle, CalendarPrefsDialog *prefs) } static void +dview_show_week_no_toggled (GtkToggleButton *toggle, CalendarPrefsDialog *prefs) +{ + calendar_config_set_dview_show_week_no (gtk_toggle_button_get_active (toggle)); +} + +static void hide_completed_tasks_toggled (GtkToggleButton *toggle, CalendarPrefsDialog *prefs) { gboolean hide; @@ -408,6 +415,34 @@ default_reminder_units_changed (GtkWidget *widget, CalendarPrefsDialog *prefs) } static void +ba_reminder_toggled (GtkToggleButton *toggle, CalendarPrefsDialog *prefs) +{ + gboolean enabled = gtk_toggle_button_get_active (toggle); + + calendar_config_set_ba_reminder (&enabled, NULL, NULL); +} + +static void +ba_reminder_interval_changed (GtkWidget *widget, CalendarPrefsDialog *prefs) +{ + const gchar *str; + int value; + + str = gtk_entry_get_text (GTK_ENTRY (widget)); + value = (int) g_ascii_strtod (str, NULL); + + calendar_config_set_ba_reminder (NULL, &value, NULL); +} + +static void +ba_reminder_units_changed (GtkWidget *widget, CalendarPrefsDialog *prefs) +{ + CalUnits units = e_dialog_combo_box_get (prefs->ba_reminder_units, default_reminder_units_map); + + calendar_config_set_ba_reminder (NULL, NULL, &units); +} + +static void alarms_selection_changed (ESourceSelector *selector, CalendarPrefsDialog *prefs) { ESourceList *source_list = prefs->alarms_list; @@ -483,6 +518,7 @@ setup_changes (CalendarPrefsDialog *prefs) g_signal_connect (G_OBJECT (prefs->show_end_times), "toggled", G_CALLBACK (show_end_times_toggled), prefs); g_signal_connect (G_OBJECT (prefs->compress_weekend), "toggled", G_CALLBACK (compress_weekend_toggled), prefs); g_signal_connect (G_OBJECT (prefs->dnav_show_week_no), "toggled", G_CALLBACK (dnav_show_week_no_toggled), prefs); + g_signal_connect (G_OBJECT (prefs->dview_show_week_no), "toggled", G_CALLBACK (dview_show_week_no_toggled), prefs); g_signal_connect (G_OBJECT (prefs->tasks_hide_completed), "toggled", G_CALLBACK (hide_completed_tasks_toggled), prefs); @@ -500,6 +536,11 @@ setup_changes (CalendarPrefsDialog *prefs) G_CALLBACK (default_reminder_interval_changed), prefs); g_signal_connect (G_OBJECT (prefs->default_reminder_units), "changed", G_CALLBACK (default_reminder_units_changed), prefs); + g_signal_connect (G_OBJECT (prefs->ba_reminder), "toggled", G_CALLBACK (ba_reminder_toggled), prefs); + g_signal_connect (G_OBJECT (prefs->ba_reminder_interval), "changed", + G_CALLBACK (ba_reminder_interval_changed), prefs); + g_signal_connect (G_OBJECT (prefs->ba_reminder_units), "changed", G_CALLBACK (ba_reminder_units_changed), prefs); + g_signal_connect (G_OBJECT (prefs->alarm_list_widget), "selection_changed", G_CALLBACK (alarms_selection_changed), prefs); @@ -593,6 +634,8 @@ show_config (CalendarPrefsDialog *prefs) gboolean sensitive, set = FALSE; icalcomponent *icalcomp, *dl_comp; char *location; + CalUnits units; + int interval; /* Timezone. */ location = calendar_config_get_timezone (); @@ -654,6 +697,9 @@ show_config (CalendarPrefsDialog *prefs) /* Date Navigator - Show Week Numbers. */ e_dialog_toggle_set (prefs->dnav_show_week_no, calendar_config_get_dnav_show_week_no ()); + /* Day/Work Week view - Show Week Number. */ + e_dialog_toggle_set (prefs->dview_show_week_no, calendar_config_get_dview_show_week_no ()); + /* Task list */ show_task_list_config (prefs); @@ -668,6 +714,13 @@ show_config (CalendarPrefsDialog *prefs) e_dialog_toggle_set (prefs->default_reminder, calendar_config_get_use_default_reminder ()); e_dialog_spin_set (prefs->default_reminder_interval, calendar_config_get_default_reminder_interval ()); e_dialog_combo_box_set (prefs->default_reminder_units, calendar_config_get_default_reminder_units (), default_reminder_units_map); + + /* Birthdays & Anniversaries reminder */ + set = calendar_config_get_ba_reminder (&interval, &units); + + e_dialog_toggle_set (prefs->ba_reminder, set); + e_dialog_spin_set (prefs->ba_reminder_interval, interval); + e_dialog_combo_box_set (prefs->ba_reminder_units, units, default_reminder_units_map); } /* plugin meta-data */ @@ -749,12 +802,16 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs) prefs->default_reminder = glade_xml_get_widget (gui, "default_reminder"); prefs->default_reminder_interval = glade_xml_get_widget (gui, "default_reminder_interval"); prefs->default_reminder_units = glade_xml_get_widget (gui, "default_reminder_units"); + prefs->ba_reminder = glade_xml_get_widget (gui, "ba_reminder"); + prefs->ba_reminder_interval = glade_xml_get_widget (gui, "ba_reminder_interval"); + prefs->ba_reminder_units = glade_xml_get_widget (gui, "ba_reminder_units"); /* Display tab */ prefs->time_divisions = glade_xml_get_widget (gui, "time_divisions"); prefs->show_end_times = glade_xml_get_widget (gui, "show_end_times"); prefs->compress_weekend = glade_xml_get_widget (gui, "compress_weekend"); prefs->dnav_show_week_no = glade_xml_get_widget (gui, "dnav_show_week_no"); + prefs->dview_show_week_no = glade_xml_get_widget (gui, "dview_show_week_no"); prefs->tasks_due_today_color = glade_xml_get_widget (gui, "tasks_due_today_color"); prefs->tasks_overdue_color = glade_xml_get_widget (gui, "tasks_overdue_color"); prefs->tasks_hide_completed = glade_xml_get_widget (gui, "tasks_hide_completed"); diff --git a/calendar/gui/dialogs/cal-prefs-dialog.glade b/calendar/gui/dialogs/cal-prefs-dialog.glade index 0282d17d4d..b8947b4c44 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.glade +++ b/calendar/gui/dialogs/cal-prefs-dialog.glade @@ -950,6 +950,98 @@ Days</property> <property name="fill">True</property> </packing> </child> + + <child> + <widget class="GtkHBox" id="hbox25"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">4</property> + + <child> + <widget class="GtkCheckButton" id="ba_reminder"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Show a _reminder</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkSpinButton" id="ba_reminder_interval"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">False</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">0 0 9999 1 10 10</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkComboBox" id="ba_reminder_units"> + <property name="visible">True</property> + <property name="items" translatable="yes">Minutes +Hours +Days</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="ba_reminder_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">before every anniversary/birthday</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> @@ -1176,6 +1268,24 @@ Days</property> <property name="fill">False</property> </packing> </child> + <child> + <widget class="GtkCheckButton" id="dview_show_week_no"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Show week n_umber in Day and Work Week View</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> diff --git a/calendar/gui/dialogs/cal-prefs-dialog.h b/calendar/gui/dialogs/cal-prefs-dialog.h index bb51d9d50d..895a263986 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.h +++ b/calendar/gui/dialogs/cal-prefs-dialog.h @@ -55,12 +55,16 @@ struct _CalendarPrefsDialog { GtkWidget *default_reminder; GtkWidget *default_reminder_interval; GtkWidget *default_reminder_units; + GtkWidget *ba_reminder; + GtkWidget *ba_reminder_interval; + GtkWidget *ba_reminder_units; /* Display tab */ GtkWidget *time_divisions; GtkWidget *show_end_times; GtkWidget *compress_weekend; GtkWidget *dnav_show_week_no; + GtkWidget *dview_show_week_no; GtkWidget *tasks_due_today_color; GtkWidget *tasks_overdue_color; GtkWidget *tasks_hide_completed; diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 5d9298cd18..e9967eccaf 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -171,7 +171,7 @@ static void comp_editor_show_help (CompEditor *editor); static void setup_widgets (CompEditor *editor); static void real_edit_comp (CompEditor *editor, ECalComponent *comp); -static gboolean real_send_comp (CompEditor *editor, ECalComponentItipMethod method); +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); @@ -897,6 +897,7 @@ save_comp_with_send (CompEditor *editor) CompEditorFlags flags; gboolean send; gboolean delegate; + gboolean strip_alarms = TRUE; priv = editor->priv; @@ -916,18 +917,18 @@ save_comp_with_send (CompEditor *editor) if (!save_comp (editor)) return FALSE; - if ((delegate && !e_cal_get_save_schedules (priv->client)) || (send && send_component_dialog ((GtkWindow *) editor, priv->client, priv->comp, !priv->existing_org))) { + if ((delegate && !e_cal_get_save_schedules (priv->client)) || (send && send_component_dialog ((GtkWindow *) editor, priv->client, priv->comp, !priv->existing_org, &strip_alarms))) { if ((itip_organizer_is_user (priv->comp, priv->client) || itip_sentby_is_user (priv->comp))) { if (e_cal_component_get_vtype (priv->comp) == E_CAL_COMPONENT_JOURNAL) - return comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_PUBLISH); + 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); + 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)) + if (!comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_REQUEST, strip_alarms)) return FALSE; if (delegate) - return comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_REPLY); + return comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_REPLY, strip_alarms); } } @@ -3083,7 +3084,7 @@ get_users_from_memo_comp (ECalComponent *comp, GList **users) } static gboolean -real_send_comp (CompEditor *editor, ECalComponentItipMethod method) +real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms) { CompEditorPrivate *priv; CompEditorFlags flags; @@ -3129,7 +3130,7 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod 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)) { + NULL, NULL, users, strip_alarms)) { g_object_unref (send_comp); return TRUE; } @@ -3150,7 +3151,7 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method) /* mime_attach_list is freed by itip_send_comp */ mime_attach_list = comp_editor_get_mime_attach_list (editor); if (itip_send_comp (method, send_comp, priv->client, - NULL, mime_attach_list, users)) { + NULL, mime_attach_list, users, strip_alarms)) { save_comp (editor); g_object_unref (send_comp); return TRUE; @@ -3272,7 +3273,7 @@ comp_editor_delete_comp (CompEditor *editor) * **/ gboolean -comp_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method) +comp_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms) { CompEditorClass *class; @@ -3281,7 +3282,7 @@ comp_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method) class = COMP_EDITOR_GET_CLASS (editor); if (class->send_comp) - return class->send_comp (editor, method); + return class->send_comp (editor, method, strip_alarms); return FALSE; } diff --git a/calendar/gui/dialogs/comp-editor.h b/calendar/gui/dialogs/comp-editor.h index 23a8d3acea..7fdc17ba16 100644 --- a/calendar/gui/dialogs/comp-editor.h +++ b/calendar/gui/dialogs/comp-editor.h @@ -67,7 +67,7 @@ struct _CompEditorClass { /* Virtual functions */ void (*edit_comp) (CompEditor *page, ECalComponent *comp); void (*object_created) (CompEditor *page); - gboolean (*send_comp) (CompEditor *page, ECalComponentItipMethod method); + gboolean (*send_comp) (CompEditor *page, ECalComponentItipMethod method, gboolean strip_alarms); void (*show_categories) (CompEditor *editor, gboolean visible); void (*show_role) (CompEditor *editor, gboolean visible); @@ -131,7 +131,8 @@ gboolean comp_editor_save_comp (CompEditor *editor, gboolean send); void comp_editor_delete_comp (CompEditor *editor); gboolean comp_editor_send_comp (CompEditor *editor, - ECalComponentItipMethod method); + ECalComponentItipMethod method, + gboolean strip_alarms); GSList * comp_editor_get_mime_attach_list(CompEditor *editor); gboolean comp_editor_close (CompEditor *editor); diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index ef94f631d0..72cbf37823 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -98,7 +98,7 @@ static const gchar *ui = "</ui>"; static void event_editor_edit_comp (CompEditor *editor, ECalComponent *comp); -static gboolean event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method); +static gboolean event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms); G_DEFINE_TYPE (EventEditor, event_editor, TYPE_COMP_EDITOR) @@ -619,7 +619,7 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp) } static gboolean -event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method) +event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms) { EventEditorPrivate *priv; ECalComponent *comp = NULL; @@ -638,7 +638,7 @@ event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method) client = e_meeting_store_get_e_cal (priv->model); result = itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp, - client, NULL, NULL, NULL); + client, NULL, NULL, NULL, strip_alarms); g_object_unref (comp); return result; @@ -646,7 +646,7 @@ event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method) parent: if (COMP_EDITOR_CLASS (event_editor_parent_class)->send_comp) - return COMP_EDITOR_CLASS (event_editor_parent_class)->send_comp (editor, method); + return COMP_EDITOR_CLASS (event_editor_parent_class)->send_comp (editor, method, strip_alarms); return FALSE; } diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c index 11d6e74757..a7d87c47f4 100644 --- a/calendar/gui/dialogs/send-comp.c +++ b/calendar/gui/dialogs/send-comp.c @@ -26,11 +26,44 @@ #include <config.h> #endif +#include <glib/gi18n-lib.h> #include "e-util/e-error.h" #include "send-comp.h" +static gboolean +have_nonprocedural_alarm (ECalComponent *comp) +{ + GList *uids, *l; + + g_return_val_if_fail (comp != NULL, FALSE); + + uids = e_cal_component_get_alarm_uids (comp); + + for (l = uids; l; l = l->next) { + ECalComponentAlarm *alarm; + ECalComponentAlarmAction action = E_CAL_COMPONENT_ALARM_UNKNOWN; + + alarm = e_cal_component_get_alarm (comp, (const char *)l->data); + if (alarm) { + e_cal_component_alarm_get_action (alarm, &action); + e_cal_component_alarm_free (alarm); + + if (action != E_CAL_COMPONENT_ALARM_NONE && + action != E_CAL_COMPONENT_ALARM_PROCEDURE && + action != E_CAL_COMPONENT_ALARM_UNKNOWN) { + cal_obj_uid_list_free (uids); + return TRUE; + } + } + } + + cal_obj_uid_list_free (uids); + + return FALSE; +} + /** * send_component_dialog: * @@ -40,11 +73,14 @@ * Return value: TRUE if the user clicked Yes, FALSE otherwise. **/ gboolean -send_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gboolean new) +send_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gboolean new, gboolean *strip_alarms) { ECalComponentVType vtype; const char *id; + if (strip_alarms) + *strip_alarms = TRUE; + if (e_cal_get_save_schedules (client)) return FALSE; @@ -72,10 +108,32 @@ send_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gbo return FALSE; } - if (e_error_run (parent, id, NULL) == GTK_RESPONSE_YES) - return TRUE; - else - return FALSE; + if (strip_alarms && have_nonprocedural_alarm (comp)) { + GtkWidget *dialog, *checkbox, *align; + gboolean res; + + dialog = e_error_new (parent, id, NULL); + checkbox = gtk_check_button_new_with_label (_("Send my alarms with this event")); + align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); + gtk_container_add (GTK_CONTAINER (align), checkbox); + gtk_widget_show (checkbox); + gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->vbox), align, TRUE, TRUE, 6); + gtk_widget_show (align); + + res = gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_YES; + + if (res) + *strip_alarms = !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox)); + + gtk_widget_destroy (GTK_WIDGET (dialog)); + + return res; + } else { + if (e_error_run (parent, id, NULL) == GTK_RESPONSE_YES) + return TRUE; + else + return FALSE; + } } gboolean diff --git a/calendar/gui/dialogs/send-comp.h b/calendar/gui/dialogs/send-comp.h index 4a1a6c55ab..21b310947a 100644 --- a/calendar/gui/dialogs/send-comp.h +++ b/calendar/gui/dialogs/send-comp.h @@ -28,7 +28,7 @@ #include <libecal/e-cal.h> #include <libecal/e-cal-component.h> -gboolean send_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gboolean new); +gboolean send_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gboolean new, gboolean *strip_alarms); gboolean send_component_prompt_subject (GtkWindow *parent, ECal *client, ECalComponent *comp); #endif diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c index 3ef5b4bcf2..656e7b4836 100644 --- a/calendar/gui/dialogs/task-editor.c +++ b/calendar/gui/dialogs/task-editor.c @@ -87,7 +87,7 @@ static const gchar *ui = "</ui>"; static void task_editor_edit_comp (CompEditor *editor, ECalComponent *comp); -static gboolean task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method); +static gboolean task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms); G_DEFINE_TYPE (TaskEditor, task_editor, TYPE_COMP_EDITOR) @@ -445,7 +445,7 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp) } static gboolean -task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method) +task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms) { TaskEditorPrivate *priv; ECalComponent *comp = NULL; @@ -464,7 +464,7 @@ task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method) client = e_meeting_store_get_e_cal (priv->model); result = itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp, - client, NULL, NULL, NULL); + client, NULL, NULL, NULL, strip_alarms); g_object_unref (comp); if (!result) @@ -473,7 +473,7 @@ task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method) parent: if (COMP_EDITOR_CLASS (task_editor_parent_class)->send_comp) - return COMP_EDITOR_CLASS (task_editor_parent_class)->send_comp (editor, method); + return COMP_EDITOR_CLASS (task_editor_parent_class)->send_comp (editor, method, strip_alarms); return FALSE; } |