event-editor: Fix the "Save" / "Done" button label

The "Done" button was apparently meant for read-only events,
while the "Save" action was for everything else.
It didn't work correctly because of a mismatch between code and UI XML.

Fixes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1142
This commit is contained in:
Jean-François Fortin Tam
2024-02-23 16:19:40 +00:00
committed by Georges Basile Stavracas Neto
parent cb82e04755
commit 06b3c38db8
@@ -647,7 +647,7 @@ gcal_event_editor_dialog_class_init (GcalEventEditorDialogClass *klass)
properties[PROP_WRITABLE] = g_param_spec_boolean ("writable", properties[PROP_WRITABLE] = g_param_spec_boolean ("writable",
"Whether the current event can be edited", "Whether the current event can be edited",
"Whether the current event can be edited or not", "Whether the current event can be edited or not",
TRUE, FALSE,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, N_PROPS, properties); g_object_class_install_properties (object_class, N_PROPS, properties);
@@ -684,8 +684,6 @@ gcal_event_editor_dialog_init (GcalEventEditorDialog *self)
}; };
gint i = 0; gint i = 0;
self->writable = TRUE;
/* Actions */ /* Actions */
self->action_group = g_simple_action_group_new (); self->action_group = g_simple_action_group_new ();
g_action_map_add_action_entries (G_ACTION_MAP (self->action_group), g_action_map_add_action_entries (G_ACTION_MAP (self->action_group),