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.
Use the widget to display calendars and distinguish whether
they are visible or not. Currently, it does not distinguish
read-only calendars, but once !494 is merged, it should not
be a problem.
This widget displays the calendar and shows whether it is
visible or not. The widget displays the color of the calendar
at the left of the label and the visibility state at the right.
because days starts at 01:01:01 (HH:MM::SS), some events at the start
or end of day may be push into another day or back into previous day.
day should starts at 00:00:00 and previous day should stop at 23:59:59.
fixes:
https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1255
When the alarm sound changes, the change is not updated because
gcal-manager does not see the changes.
We now update the components and make more comparisons so that
it can be seen by gcal-manager
Non-technical users may not realize why they can not edit some events
from read-only subscribed remote calendars.
A symbolic padlock icon does not suffice to make this obvious.
This tooltip makes the UI self-documenting, and improves accessibility.
In commit 1494f7407, we focus the summary entry when opening the dialog.
However, this prevents the Escape keyboard shortcut from working
when opening a read-only event after having opened a writable event.
Set focus onto the "Done" button when showing a read-only event,
as it's the only widget that can be activated/clicked in this situation.
This makes the "Escape", "Spacebar" and "Enter" keyboard shortcuts work.
Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1180
Use a GtkListBox and bind from the model. Create rows from the model
items, and bind properties as needed.
The action target is set only when the calendar is writable because
setting an invalid action+target pair makes the row insensitive.
Remove the ancient menu icon hack.
- Fix a bug where clicking the "Add Event" button created an empty title in the event editor dialog.
- Add "error" class when the user writes an invalid event name.
- Add new function to validate event name.
Because the sections are split into files, the event editor will need a signal to check that each section is correct, and each section will have to emit the signal. This will need to be done in a future commit.
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
Now that we keep precise control over GcalEvent instances, and
can use simple pointer comparisons everywhere, GcalMonthView
implemented its update function as a simple remove + add pair.
The problem is that we're not passing the old event instance,
so removals never actually happen, since the new instance is
not yet available to subscribers.
Pass old event in additio to the new one, and use it where it
makes sense.
Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1073
GtkDialog is being deprecated. Instead of using it,
we want to subclass AdwWindow. As part of this change
the content and headerbar are put together in one box.
These are still hardcoded instead of measuring the available space,
but it's better than nothing in the meantime.
Decent WMs size the window correctly if width/height exceed the screen.
Also, allow the Notes field to expand vertically, to fill the space.
Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/602
The GcalDateSelector returns an internal instance, while the 'until' date/time
is meant to be an own instance, which is freed by the GcalRecurrence instance
in its free function. That means the 'until' date/time is supposed to be reffed
when being assigned into the GcalRecurrence structure.
Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/892
When a recurrent event is edited, we now are able to only offer the
MOD_ALL option when it actually will work. However, we're still left
with the problem that we end up applying the instance-specific data
onto the main event, through an old hack.
The views already aren't able to offer the MOD_ALL property, since
they all change the dates of events, but GcalEventEditorDialog can,
and it must handle that properly.
For now, do the simplest possible approach, which is: retrive the
template event and apply all properties that can be applied to it,
without letting the start and end days leak into it. We already only
allow passing MOD_ALL on situations where the dates aren't really
modified, so it should be safe.
Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/882