From 061c02752008bcf75edd750f73c42df0a0f7dbdd Mon Sep 17 00:00:00 2001 From: Automeris naranja Date: Thu, 2 May 2024 23:33:34 -0300 Subject: [PATCH] event-editor-dialog: Use an AdwBanner when a calendar is read-only Using a tooltip to inform when the calendar is read-only won't work in touch devices. This change also improves a11y, as Orca now reads this message, something that wasn't happening before. --- .../event-editor/gcal-event-editor-dialog.c | 2 - .../event-editor/gcal-event-editor-dialog.ui | 112 +++++++++--------- 2 files changed, 58 insertions(+), 56 deletions(-) diff --git a/src/gui/event-editor/gcal-event-editor-dialog.c b/src/gui/event-editor/gcal-event-editor-dialog.c index 8db3a9fd..550776f5 100644 --- a/src/gui/event-editor/gcal-event-editor-dialog.c +++ b/src/gui/event-editor/gcal-event-editor-dialog.c @@ -55,7 +55,6 @@ struct _GcalEventEditorDialog GtkWidget *cancel_button; GtkWidget *delete_group; GtkWidget *done_button; - GtkWidget *lock; GcalEventEditorSection *notes_section; GcalEventEditorSection *reminders_section; GcalEventEditorSection *schedule_section; @@ -626,7 +625,6 @@ gcal_event_editor_dialog_class_init (GcalEventEditorDialogClass *klass) gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, cancel_button); gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, delete_group); gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, done_button); - gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, lock); gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, notes_section); gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, reminders_section); gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, schedule_section); diff --git a/src/gui/event-editor/gcal-event-editor-dialog.ui b/src/gui/event-editor/gcal-event-editor-dialog.ui index 844f3edd..a1056f72 100644 --- a/src/gui/event-editor/gcal-event-editor-dialog.ui +++ b/src/gui/event-editor/gcal-event-editor-dialog.ui @@ -16,14 +16,6 @@ - - - - <b>This event is part of a read-only calendar</b> -You cannot delete or change this event. - changes-prevent-symbolic - - @@ -115,74 +107,86 @@ You cannot delete or change this event. - - True - - + + vertical - - - - - - + + This event is in a read-only calendar. It cannot be edited or deleted. + - - - - Schedule + + True + + - - + + + + + + - - - - - - Reminders + - - + + Schedule + + + + + - - - - - - Notes + - - - True + + Reminders + + + + + - - - - - + - - - - Delete Event - + + Notes + + + + True + + + + + + + + + + + Delete Event + + + + + + - +