For unknown reasons, the `::row-activated` signal is not emitted
whenever the user presses an activation button on the keyboard
such as Enter or Space, even though the list box row has focus.
Ideally, we want the list box rows to be activatable, so that
activating them will simply emit the "event-activated" signal and
pop up the popover.
Since this doesn't work, the next best thing is to make the event
widgets themselves focusable and the list box rows unfocusable.
This will unfortunately lose the ability to navigate with arrow
keys, as well as Home/End and Page Up/Down. However, the user will
at least be able to activate them and access events in
the agenda view.
A `FIXME` label has been added because this should be fixed as soon
as possible.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/807>
For a while, we have been setting child visibility to false, which
hid the horizontal line separators. However, I started scrolling in
the month view today and came to realize that they were disappearing
sporadically when scrolling upwards.
This happens because we use the `box-shadow` CSS property to apply the
box shadow a pixel above the month view row, which keeps it visible
in the view even when the month view row itself is no longer in
the page. Adding a pixel fixes that.
This reverts commit f4702dde1f.
"Additive inverse" basically means transforming a positive number
into a negative equivalent, or vice-versa; for example, from 5 to -5.
Instead of inverting conditions in right-to-left languages to
compare the X coordinate, a much simpler approach to this is to
normalize the X coordinate by applying additive inverse in
right-to-left languages.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/744>
When hovering over the bottom side of a month cell regardless of
the sensitivity state of the overflow button, it queries the
button's tooltip text. Using `gtk_widget_set_child_visible()`
fixes that issue.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/743>
Since we don't make use of the overlay anymore, it's best to remove
it altogether.
This also changes the behavior of the widgets a bit: It adds an
empty AdwBin widget which expands vertically, allowing us to avoid
aligning the header and overflow button.
The pattern goes from reducible (where we deduct the overflow
height to retrieve the content) to additive (where we add the
overflow height to the content height), which requires us to
adapt GcalMonthViewRow with this new behavior.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/743>
Only GcalCalendarComboRow, GcalAttendeesSection, and GcalRemindersSection
remain unfocusable on read-only events.
In the case of GcalRemindersSection, we eventually want to allow setting
reminders regardless of the writable state of the event; however, since
dialog is centered around the assumption that a read-only event should
never be edited, which includes reminders, these changes will have to be
done in a separate merge request.
Closes: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/737>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/499>
Currently, GcalEventEditorSection is an interface that doesn't
really do much apart from requiring a property and providing
virtual methods.
This proposed approach turns it into an abstract class, derived
from AdwPreferencesGroup, which gives access to virtual methods
as well as public methods. It comes with the same benefits of
an interface, while sharing a lot of code that were duplicated
in the previous commits.
As a stopgap measure, it overrides several GtkWidget virtual
methods to smoothly transition without causing the commits
to break. These overrides will get removed in a later commit.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
This is a preliminary step for moving the comparison and
application logic of each section into the dialog.
Essentially, the dialog will pass the duplicate event to each
section, and these sections will modify the event. If the user
presses "Save", the dialog will compare the edited event to
the original event, and apply if they are different.
This also adds the `get_event()` method which will be used
in the future.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
As described in the previous commit, this approach is more
predictable because the focus is decided in the same place.
The focus grabbing behavior is set after notifying
the `GcalEventEditorDialog:event` property as otherwise it would
not select the entire text in some occasions.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/782>
This will allow for a cleaner and more predictable focus behavior,
as this will give the capability to the dialog to grab focus
on either the "Done" button or summary section depending on the
writability, as opposed to the current approach, where the
summary section assumes that it is already writable and grabs focus,
which then the dialog sets focus on the "Done" button.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/782>