Created
February 24, 2021 01:41
-
-
Save troyready/429cd82d2cf50265d21087397990ba8d to your computer and use it in GitHub Desktop.
Adaptation of https://gitlab.gnome.org/GNOME/evolution/-/issues/992 for debian bullseye
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ru evolution-3.38.3/src/calendar/gui/e-comp-editor.c evolution-3.38.3-patched/src/calendar/gui/e-comp-editor.c | |
--- evolution-3.38.3/src/calendar/gui/e-comp-editor.c 2021-01-08 02:49:31.000000000 -0800 | |
+++ evolution-3.38.3-patched/src/calendar/gui/e-comp-editor.c 2021-02-23 17:39:13.623163055 -0800 | |
@@ -968,6 +968,9 @@ | |
gboolean close_after_save) | |
{ | |
EActivity *activity; | |
+ ECalComponent *comp; | |
+ EShell *shell; | |
+ ESourceRegistry *registry; | |
const gchar *summary; | |
ECalObjModType recur_mod = E_CAL_OBJ_MOD_THIS; | |
SaveData *sd; | |
@@ -994,12 +997,18 @@ | |
e_comp_editor_enable (comp_editor, FALSE); | |
+ shell = e_comp_editor_get_shell (comp_editor); | |
+ registry = e_shell_get_registry (shell); | |
+ comp = e_cal_component_new_from_icalcomponent (i_cal_component_clone (component)); | |
+ | |
sd = g_slice_new0 (SaveData); | |
sd->comp_editor = g_object_ref (comp_editor); | |
sd->source_client = comp_editor->priv->source_client ? g_object_ref (comp_editor->priv->source_client) : NULL; | |
sd->target_client = g_object_ref (comp_editor->priv->target_client); | |
sd->component = i_cal_component_clone (component); | |
- sd->with_send = with_send; | |
+ sd->with_send = with_send && (!itip_has_any_attendees (comp) || | |
+ (itip_organizer_is_user (registry, comp, sd->target_client) || | |
+ itip_sentby_is_user (registry, comp, sd->target_client))); | |
sd->close_after_save = close_after_save; | |
sd->recur_mod = recur_mod; | |
sd->first_send = E_CAL_COMPONENT_METHOD_NONE; | |
@@ -1016,6 +1025,7 @@ | |
if (activity) | |
e_activity_bar_set_activity (comp_editor->priv->activity_bar, activity); | |
+ g_clear_object (&comp); | |
g_clear_object (&activity); | |
g_free (source_display_name); | |
} | |
diff -ru evolution-3.38.3/src/calendar/gui/e-comp-editor-event.c evolution-3.38.3-patched/src/calendar/gui/e-comp-editor-event.c | |
--- evolution-3.38.3/src/calendar/gui/e-comp-editor-event.c 2021-01-08 02:49:31.000000000 -0800 | |
+++ evolution-3.38.3-patched/src/calendar/gui/e-comp-editor-event.c 2021-02-23 17:29:37.236349208 -0800 | |
@@ -168,16 +168,16 @@ | |
is_organizer = (flags & (E_COMP_EDITOR_FLAG_IS_NEW | E_COMP_EDITOR_FLAG_ORGANIZER_IS_USER)) != 0; | |
event_editor = E_COMP_EDITOR_EVENT (comp_editor); | |
- gtk_widget_set_sensitive (event_editor->priv->all_day_check, !force_insensitive && is_organizer); | |
+ gtk_widget_set_sensitive (event_editor->priv->all_day_check, !force_insensitive); | |
#define sensitize_part(x) G_STMT_START { \ | |
widget = e_comp_editor_property_part_get_label_widget (x); \ | |
if (widget) \ | |
- gtk_widget_set_sensitive (widget, !force_insensitive && is_organizer); \ | |
+ gtk_widget_set_sensitive (widget, !force_insensitive); \ | |
\ | |
widget = e_comp_editor_property_part_get_edit_widget (x); \ | |
if (widget) \ | |
- gtk_widget_set_sensitive (widget, !force_insensitive && is_organizer); \ | |
+ gtk_widget_set_sensitive (widget, !force_insensitive); \ | |
} G_STMT_END | |
sensitize_part (event_editor->priv->dtstart); | |
@@ -194,10 +194,10 @@ | |
gtk_widget_set_sensitive (edit_widget, TRUE); | |
action = e_comp_editor_get_action (comp_editor, "all-day-event"); | |
- gtk_action_set_sensitive (action, !force_insensitive && is_organizer); | |
+ gtk_action_set_sensitive (action, !force_insensitive); | |
action = e_comp_editor_get_action (comp_editor, "classification-menu"); | |
- gtk_action_set_sensitive (action, !force_insensitive && is_organizer); | |
+ gtk_action_set_sensitive (action, !force_insensitive); | |
if (event_editor->priv->insensitive_info_alert) | |
e_alert_response (event_editor->priv->insensitive_info_alert, GTK_RESPONSE_OK); | |
@@ -212,7 +212,7 @@ | |
else if (e_client_is_readonly (E_CLIENT (client))) | |
message = _("Event cannot be edited, because the selected calendar is read only"); | |
else if (!is_organizer) | |
- message = _("Event cannot be fully edited, because you are not the organizer"); | |
+ message = _("Changes made to the event will not be sent to the attendees, because you are not the organizer"); | |
if (message) { | |
EAlert *alert; | |
diff -ru evolution-3.38.3/src/calendar/gui/e-comp-editor-memo.c evolution-3.38.3-patched/src/calendar/gui/e-comp-editor-memo.c | |
--- evolution-3.38.3/src/calendar/gui/e-comp-editor-memo.c 2021-01-08 02:49:31.000000000 -0800 | |
+++ evolution-3.38.3-patched/src/calendar/gui/e-comp-editor-memo.c 2021-02-23 17:30:57.068795059 -0800 | |
@@ -220,7 +220,7 @@ | |
else if (e_client_is_readonly (E_CLIENT (client))) | |
message = _("Memo cannot be edited, because the selected memo list is read only"); | |
else if (!is_organizer) | |
- message = _("Memo cannot be fully edited, because you are not the organizer"); | |
+ message = _("Changes made to the memo will not be sent to the attendees, because you are not the organizer"); | |
if (message) { | |
EAlert *alert; | |
diff -ru evolution-3.38.3/src/calendar/gui/e-comp-editor-page-attachments.c evolution-3.38.3-patched/src/calendar/gui/e-comp-editor-page-attachments.c | |
--- evolution-3.38.3/src/calendar/gui/e-comp-editor-page-attachments.c 2021-01-08 02:49:31.000000000 -0800 | |
+++ evolution-3.38.3-patched/src/calendar/gui/e-comp-editor-page-attachments.c 2021-02-23 17:32:18.813227748 -0800 | |
@@ -221,20 +221,15 @@ | |
{ | |
ECompEditor *comp_editor; | |
GtkAction *action; | |
- guint32 flags; | |
- gboolean is_organizer; | |
g_return_if_fail (E_IS_COMP_EDITOR_PAGE_ATTACHMENTS (page)); | |
E_COMP_EDITOR_PAGE_CLASS (e_comp_editor_page_attachments_parent_class)->sensitize_widgets (page, force_insensitive); | |
comp_editor = e_comp_editor_page_ref_editor (page); | |
- flags = e_comp_editor_get_flags (comp_editor); | |
- | |
- is_organizer = (flags & (E_COMP_EDITOR_FLAG_IS_NEW | E_COMP_EDITOR_FLAG_ORGANIZER_IS_USER)) != 0; | |
action = e_comp_editor_get_action (comp_editor, "attachments-attach"); | |
- gtk_action_set_sensitive (action, !force_insensitive && is_organizer); | |
+ gtk_action_set_sensitive (action, !force_insensitive); | |
g_clear_object (&comp_editor); | |
} | |
diff -ru evolution-3.38.3/src/calendar/gui/e-comp-editor-page-general.c evolution-3.38.3-patched/src/calendar/gui/e-comp-editor-page-general.c | |
--- evolution-3.38.3/src/calendar/gui/e-comp-editor-page-general.c 2021-01-08 02:49:31.000000000 -0800 | |
+++ evolution-3.38.3-patched/src/calendar/gui/e-comp-editor-page-general.c 2021-02-23 17:34:13.181799276 -0800 | |
@@ -921,7 +921,7 @@ | |
gtk_widget_set_sensitive (page_general->priv->attendees_list_view, !read_only && !force_insensitive); | |
action = e_comp_editor_get_action (comp_editor, "option-attendees"); | |
- gtk_action_set_sensitive (action, !force_insensitive && !read_only && organizer_is_user); | |
+ gtk_action_set_sensitive (action, !force_insensitive && !read_only); | |
if (page_general->priv->comp_color && | |
!e_comp_editor_property_part_get_sensitize_handled (page_general->priv->comp_color)) { | |
diff -ru evolution-3.38.3/src/calendar/gui/e-comp-editor-page-recurrence.c evolution-3.38.3-patched/src/calendar/gui/e-comp-editor-page-recurrence.c | |
--- evolution-3.38.3/src/calendar/gui/e-comp-editor-page-recurrence.c 2021-01-08 02:49:31.000000000 -0800 | |
+++ evolution-3.38.3-patched/src/calendar/gui/e-comp-editor-page-recurrence.c 2021-02-23 17:35:45.650237443 -0800 | |
@@ -1493,19 +1493,13 @@ | |
gboolean force_insensitive) | |
{ | |
ECompEditorPageRecurrence *page_recurrence; | |
- ECompEditor *comp_editor; | |
GtkTreeSelection *selection; | |
- gboolean create_recurrence, any_selected, is_organizer; | |
- guint32 flags; | |
+ gboolean create_recurrence, any_selected; | |
g_return_if_fail (E_IS_COMP_EDITOR_PAGE_RECURRENCE (page)); | |
E_COMP_EDITOR_PAGE_CLASS (e_comp_editor_page_recurrence_parent_class)->sensitize_widgets (page, force_insensitive); | |
- comp_editor = e_comp_editor_page_ref_editor (page); | |
- flags = e_comp_editor_get_flags (comp_editor); | |
- g_clear_object (&comp_editor); | |
- | |
page_recurrence = E_COMP_EDITOR_PAGE_RECURRENCE (page); | |
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (page_recurrence->priv->exceptions_tree_view)); | |
@@ -1513,8 +1507,6 @@ | |
force_insensitive = force_insensitive || page_recurrence->priv->is_custom; | |
create_recurrence = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (page_recurrence->priv->recr_check_box)); | |
any_selected = gtk_tree_selection_count_selected_rows (selection) > 0; | |
- is_organizer = (flags & (E_COMP_EDITOR_FLAG_IS_NEW | E_COMP_EDITOR_FLAG_ORGANIZER_IS_USER)) != 0; | |
- force_insensitive = force_insensitive || !is_organizer; | |
gtk_widget_set_sensitive (page_recurrence->priv->recr_check_box, !force_insensitive); | |
gtk_widget_set_sensitive (page_recurrence->priv->recr_hbox, !force_insensitive && create_recurrence); | |
diff -ru evolution-3.38.3/src/calendar/gui/e-comp-editor-task.c evolution-3.38.3-patched/src/calendar/gui/e-comp-editor-task.c | |
--- evolution-3.38.3/src/calendar/gui/e-comp-editor-task.c 2021-01-08 02:49:31.000000000 -0800 | |
+++ evolution-3.38.3-patched/src/calendar/gui/e-comp-editor-task.c 2021-02-23 17:36:49.542529740 -0800 | |
@@ -517,7 +517,7 @@ | |
gtk_widget_set_sensitive (edit_widget, TRUE); | |
action = e_comp_editor_get_action (comp_editor, "all-day-task"); | |
- gtk_action_set_sensitive (action, !force_insensitive && is_organizer); | |
+ gtk_action_set_sensitive (action, !force_insensitive); | |
if (task_editor->priv->insensitive_info_alert) | |
e_alert_response (task_editor->priv->insensitive_info_alert, GTK_RESPONSE_OK); | |
@@ -532,7 +532,7 @@ | |
else if (e_client_is_readonly (E_CLIENT (client))) | |
message = _("Task cannot be edited, because the selected task list is read only"); | |
else if (!is_organizer) | |
- message = _("Task cannot be fully edited, because you are not the organizer"); | |
+ message = _("Changes made to the task will not be sent to the attendees, because you are not the organizer"); | |
if (message) { | |
EAlert *alert; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment