utils: Add boolean flag for showing MOD_ALL
This will be used by next commit to more finely control editing of recurrent events.
This commit is contained in:
@@ -291,6 +291,7 @@ on_delete_button_clicked_cb (GtkButton *button,
|
|||||||
{
|
{
|
||||||
gcal_utils_ask_recurrence_modification_type (GTK_WIDGET (self),
|
gcal_utils_ask_recurrence_modification_type (GTK_WIDGET (self),
|
||||||
self->event,
|
self->event,
|
||||||
|
TRUE,
|
||||||
on_ask_recurrence_response_delete_cb,
|
on_ask_recurrence_response_delete_cb,
|
||||||
self);
|
self);
|
||||||
}
|
}
|
||||||
@@ -362,6 +363,7 @@ on_done_button_clicked_cb (GtkButton *button,
|
|||||||
{
|
{
|
||||||
gcal_utils_ask_recurrence_modification_type (GTK_WIDGET (self),
|
gcal_utils_ask_recurrence_modification_type (GTK_WIDGET (self),
|
||||||
self->event,
|
self->event,
|
||||||
|
TRUE,
|
||||||
on_ask_recurrence_response_save_cb,
|
on_ask_recurrence_response_save_cb,
|
||||||
self);
|
self);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -215,6 +215,7 @@ on_drop_target_drop_cb (GtkDropTarget *drop_target,
|
|||||||
{
|
{
|
||||||
gcal_utils_ask_recurrence_modification_type (GTK_WIDGET (self),
|
gcal_utils_ask_recurrence_modification_type (GTK_WIDGET (self),
|
||||||
event,
|
event,
|
||||||
|
TRUE,
|
||||||
on_ask_recurrence_response_cb,
|
on_ask_recurrence_response_cb,
|
||||||
self);
|
self);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -442,6 +442,7 @@ on_drop_target_drop_cb (GtkDropTarget *drop_target,
|
|||||||
|
|
||||||
gcal_utils_ask_recurrence_modification_type (GTK_WIDGET (self),
|
gcal_utils_ask_recurrence_modification_type (GTK_WIDGET (self),
|
||||||
event,
|
event,
|
||||||
|
TRUE,
|
||||||
on_ask_recurrence_response_cb,
|
on_ask_recurrence_response_cb,
|
||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1283,6 +1283,7 @@ on_drop_target_drop_cb (GtkDropTarget *drop_target,
|
|||||||
|
|
||||||
gcal_utils_ask_recurrence_modification_type (GTK_WIDGET (self),
|
gcal_utils_ask_recurrence_modification_type (GTK_WIDGET (self),
|
||||||
event,
|
event,
|
||||||
|
TRUE,
|
||||||
on_ask_recurrence_response_cb,
|
on_ask_recurrence_response_cb,
|
||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1298,6 +1298,7 @@ on_message_dialog_response_cb (GtkDialog *dialog,
|
|||||||
void
|
void
|
||||||
gcal_utils_ask_recurrence_modification_type (GtkWidget *parent,
|
gcal_utils_ask_recurrence_modification_type (GtkWidget *parent,
|
||||||
GcalEvent *event,
|
GcalEvent *event,
|
||||||
|
gboolean show_mod_all,
|
||||||
GcalAskRecurrenceCallback callback,
|
GcalAskRecurrenceCallback callback,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
@@ -1331,7 +1332,9 @@ gcal_utils_ask_recurrence_modification_type (GtkWidget *parent,
|
|||||||
if (!e_client_check_capability (E_CLIENT (client), E_CAL_STATIC_CAPABILITY_NO_THISANDFUTURE))
|
if (!e_client_check_capability (E_CLIENT (client), E_CAL_STATIC_CAPABILITY_NO_THISANDFUTURE))
|
||||||
gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Subsequent events"), GTK_RESPONSE_OK);
|
gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Subsequent events"), GTK_RESPONSE_OK);
|
||||||
|
|
||||||
gtk_dialog_add_button (GTK_DIALOG (dialog), _("_All events"), GTK_RESPONSE_YES);
|
if (show_mod_all)
|
||||||
|
gtk_dialog_add_button (GTK_DIALOG (dialog), _("_All events"), GTK_RESPONSE_YES);
|
||||||
|
|
||||||
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (gtk_widget_get_native (parent)));
|
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (gtk_widget_get_native (parent)));
|
||||||
g_signal_connect (dialog, "response", G_CALLBACK (on_message_dialog_response_cb), data);
|
g_signal_connect (dialog, "response", G_CALLBACK (on_message_dialog_response_cb), data);
|
||||||
|
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ void gcal_utils_extract_google_section (const gchar
|
|||||||
|
|
||||||
void gcal_utils_ask_recurrence_modification_type (GtkWidget *parent,
|
void gcal_utils_ask_recurrence_modification_type (GtkWidget *parent,
|
||||||
GcalEvent *event,
|
GcalEvent *event,
|
||||||
|
gboolean show_mod_all,
|
||||||
GcalAskRecurrenceCallback callback,
|
GcalAskRecurrenceCallback callback,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user