100 Commits
Author SHA1 Message Date
Hari RanaandNiklas Wimmer 4defb0019b common/date-chooser: Focus selected date in grid when tabbing into it
When tabbing into a grid or list of items that are selectable,
we want to focus the selected item when entering it. At the moment,
we only focus the first or last item in the date chooser grid,
rather than the selected item.

Co-authored-by: Niklas Wimmer <niklas@viric.eu>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/869>
2026-10-26 08:25:25 -04:00
Hari RanaandPeter Eisenmann 4f7403fd71 core/search-provider: Simplify the way range_changed is being set
Co-authored-by: Peter Eisenmann <p3732@getgoogleoff.me>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/873>
2026-10-25 19:48:04 +00:00
Hari Rana e49788c952 utils: Remove gcal_set_date_time()
`g_set_date_time()` now exists.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/873>
2026-10-25 19:48:04 +00:00
Hari Rana 84875616ab src: Use g_set_date_time()
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/873>
2026-10-25 19:48:04 +00:00
Hari Rana acd87d2626 mailmap: Add file
See: https://git-scm.com/docs/gitmailmap
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/879>
2026-10-16 14:41:14 +00:00
Hari Rana d6a4137c80 views/agenda: Remove FIXME
`clear_marks()` doesn't need to be implemented in the agenda view.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/872>
2026-10-06 08:05:17 -04:00
Hari Rana 12caabb67d views/month: Set date when the dates are different
Fixes: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/1500>
Fixes: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/1649>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/871>
2026-10-05 11:38:57 +00:00
Hari Rana e27e477e69 gui/calendar-navigation-button: Fix memory leak
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/865>
2026-10-04 14:06:44 +00:00
Hari Rana b1f6e609c6 views/week-grid: Only set parent when child_data->widget has been created
`add_event_to_block()` assumes that the child widget has never been
parented, so it will always set the parent widget when the widget
is already parented, which triggers a critical error in GTK.

This patch addresses this situation by only parenting when the
widget has just been created. Additionally, it asserts that the
parent widget is `self` in the end, so that it crashes if this
is incorrect.

Fixes: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/1643>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/863>
2026-10-03 19:24:19 -04:00
6bba8e2cc8 common/date-chooser: Increment or decrement year when GcalMultiChoice wraps
Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/97
Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/1484

Co-authored-by: mindonwarp <mind.on.warp@gmail.com>
Co-authored-by: Koc13 <ilija.kocinac@proton.me>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/853>
2026-10-02 13:32:27 +00:00
Hari Rana 1c5b826af0 gui/window: Only enable "win.today" action on the current day
Fixes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/1021
Fixes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/1066
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/839>
2026-10-01 13:34:54 -04:00
Hari Rana b2838e034f views/month-view: Follow day of week when scrolling
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/839>
2026-10-01 13:33:04 -04:00
Hari Rana 11294bd1ac utils: Add macro for computing days after first weekday
Currently, `gcal_date_time_get_start_of_week()` seems to be
the only user of this macro function. In the next commit, the
month view will use it to traverse weeks while maintaining
the weekday.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/839>
2026-10-01 13:31:55 -04:00
Hari Rana 5aec783a85 common/date-chooser: Use GcalMultiChoice::user-changed
At the moment `gcal_date_chooser_set_date()` is automatically setting
the day to 1, which is undesirable behavior for a method that is
designed to "just" set the date. By connecting to
`GcalMultiChoice::explicitly-changed`, we can simply have the day
set to 1 to accompanying callbacks.

Currently, `multi_choice_changed()` is invoked 50 times at startup.
By using `GcalMultiChoice::explicitly-changed`, `multi_choice_changed()`
is only invoked 10 times. This is still more than ideal, but it's
a significant drop.

Fixes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/1639
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/837>
2026-09-30 14:57:26 -04:00
Hari Rana be244e13c8 event-editor/multi-choice: Add signal for emitting explicit changes
We currently rely on connecting the `notify::value` signal,
which is emitted every time the value is changed explicitly or
implicitly. This can be problematic when, for example, the user
scrolls in the month view, which changes the value of each
GcalDateChooser widget, and each minor difference will re-emit
the signal until it's over. The `GcalMultiChoice::user-changed`
signal will only emit when the user presses the
previous/next buttons.

The next commit will port GcalDateChooser
to `GcalMultiChoice::user-changed`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/837>
2026-09-30 14:57:26 -04:00
Hari Rana 68ac34e8d8 event-editor/multi-choice: Document and rearrange properties and signals
This rearranges and documents the rest of the properties, as well
as providing getter and setter methods for properties that don't
have any.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/754>
2026-09-30 18:34:37 +00:00
Hari Rana 6fd70d4f65 common/multi-choice: Use gcal_multi_choice_get_max_value()
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/754>
2026-09-30 18:34:37 +00:00
Hari Rana 096139721d gui/multi-choice: Rework value properties
This changes the way the current value is being set, as well as
proper getter and setter methods for respective min and max values.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/754>
2026-09-30 18:34:37 +00:00
Hari Rana 12c30b818e event-editor/multi-choice: Add "numeric" style class
See: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/style-classes.html#numeric
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/754>
2026-09-30 18:34:37 +00:00
Hari Rana 169902ecba event-editor/multi-choice: Use GcalStackLabel
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/754>
2026-09-30 18:34:37 +00:00
Hari Rana 1a3ba22430 common/stack-label: Introduce GcalStackLabel
This is meant to be used for widgets which desire to have an equal
amount of width allocated onto every label.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/754>
2026-09-30 18:34:37 +00:00
Hari Rana c9f273a47a event-editor/multi-choice: Consolidate action activation
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/754>
2026-09-30 18:34:37 +00:00
Hari Rana cc655b6459 event-editor/multi-choice: Wrap values mathematically
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/754>
2026-09-30 18:34:36 +00:00
Hari Rana bf8e9929e3 views/month-cell: Unstyle cells when overflow button is focused
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/835>
2026-09-25 19:13:29 +00:00
Hari Rana 02ad105088 views/month-view: Avoid selecting cells when pressing overflow button
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/835>
2026-09-25 19:13:29 +00:00
Hari Rana f91e21aaa9 common/date-chooser: Add row and column spacing
This adds back the spacing lost by the removal of margins
in the previous commit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/841>
2026-09-25 19:09:12 +00:00
Hari Rana 7c65f6a0ff event-editor/multi-choice: Remove margins
The margins applied in CSS caused some issues with alignment,
specifically in popovers where they would make the popover
wider than needed.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/841>
2026-09-25 19:09:12 +00:00
Hari Rana 05ec02fadb event-editor/multi-choice: Replace GtkToggleButton with AdwBin
Using GtkToggleButton in this case is not only overkill for our
intended use case, it is also a hinderance, as the states and focus
of the widget are handled by the widget itself, which can lead to
unpredictable and undesired behavior.

Using AdwBin solves this problem by allowing us to set the styles
and states from the parent, provided that the CSS name is changed
to "button". Switching to AdwBin also allows us to not override the
`focus()`, `grab_focus()`, and `get_platform_state()` virtual methods.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/841>
2026-09-25 19:09:12 +00:00
Hari Rana 1748014028 event-editor/multi-choice: Consolidate state flag changes
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/841>
2026-09-25 19:09:12 +00:00
Hari Rana c3d5c777ec event-editor/multi-choice: Port from GtkEventControllerKey to shortcuts
Since we wrap the values all the time now, this also removes
the `gtk_widget_error_bell()` call.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/841>
2026-09-25 19:09:11 +00:00
Hari Rana 34be5e4663 event-editor/multi-choice: Inherit GtkWidget
This is a prerequisite for removing the strong dependence on the
child GtkToggleButton widget, removing the platform state override,
and adding binding actions in later commits.

Inheriting AdwBin was attempted but it didn't work, as AdwBin
presumably messes with focusability and activation, making
it insufficient for this use case.

`hexpand=true` needs to be explicitly set.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/841>
2026-09-25 19:09:10 +00:00
Hari Rana f20c9235ce event-editor/multi-choice: Port to GtkPopoverBin
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/841>
2026-09-25 19:09:10 +00:00
Hari Rana 65896c6ece utils: Prefix macros with GCAL_
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/842>
2026-09-20 12:44:24 +00:00
Hari Rana 117c032d95 utils: Prefix every function with gcal_util_
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/842>
2026-09-20 12:44:24 +00:00
Hari Rana 38ad6ea3ea utils: Remove unused functions
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/842>
2026-09-20 12:44:23 +00:00
Hari Rana 307f4e78e7 event-editor/multi-choice: Use standard enum members in properties
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/840>
2026-09-19 15:07:03 -04:00
Hari Rana 99463b9a62 event-editor/multi-choice: Set accessible label without connecting signal
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/840>
2026-09-19 11:54:05 -04:00
Hari Rana 2bab7bdc3a event-editor/multi-choice: Remove animate property
We no longer use this property. Removing it will then allow us to
directly set the label without having to use GtkStack, but this
will be done in a later commit.

This also sets all transitions to "none".

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/840>
2026-09-19 11:54:05 -04:00
Hari Rana 3185997f38 event-editor/multi-choice: Remove wrap property
We no longer have a use case which requires us to keep the
`wrap` property to FALSE, so this patch removes that property
while keeping the wrap behavior.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/840>
2026-09-19 11:54:04 -04:00
Hari Rana d1e9443b62 common/date-chooser: Remove animate property
We no longer use this property per the previous commit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/840>
2026-09-19 11:54:04 -04:00
Hari Rana 681e24a772 common/date-chooser: Remove wrap property
This no longer exists per the previous commit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/840>
2026-09-19 11:54:04 -04:00
Hari Rana b8e06d32a1 event-editor/multi-choice: Remove unused overrides
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/840>
2026-09-19 11:54:04 -04:00
Hari Rana 14c20483ae event-editor/multi-choice: Use G_DEFINE_FINAL_TYPE_WITH_CODE()
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/840>
2026-09-19 11:54:01 -04:00
Hari Rana 0d1d339581 views: Document transfer none in gcal_view_set_date()
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/838>
2026-09-19 09:12:05 -04:00
Hari Rana 2f393ab117 views/month-view: Free GDateTime when setting active date
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/838>
2026-09-19 09:08:56 -04:00
Hari Rana dfb9ea645c common/date-chooser: Use GcalGizmo
GcalGizmo allows us to handle focus within child widgets
much more cleanly, as it no longer requires us to override the
ancestor and re-iterating through children.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/760>
2026-09-16 12:22:36 +00:00
Hari Rana 89ff82924b gui/gizmo: Introduce GcalGizmo
This is a utility widget akin to GtkGizmo[1] and AdwGizmo[2].
It is designed for use in complex widgets which require additional
features such as snapshotting, measuring/allocating, and
focusing capabilities.

We want to implement an entry row widget that allows multi-line content.
The first implementation had two widgets: GcalNotesRow for the widget
itself, and GcalNotesTitle to contain and animate the title by overriding
the measure() and size_allocate() class methods. The GcalNotesTitle
widget ended up becoming a basic widget that could easily be handled
by GcalGizmo. The new implementation simply uses GcalGizmo.[3]

Another potential user of GcalGizmo is GcalDateChooser, where the
date grid contains complicated logic for handling focus to a child widget.
Since GcalGizmo is designed to give full reign over focusability, we can
also use it to simplify focus. The layout manager can quickly be swapped to
GtkBinLayout since we don't want to handle custom measure/allocation logic.[4]

[1]: <https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkgizmo.c>
[2]: <https://gitlab.gnome.org/GNOME/libadwaita/-/blob/main/src/adw-gizmo.c>
[3]: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/737>
[4]: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/760>

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/790>
2026-09-09 14:57:14 -04:00
Hari Rana 9838bbee11 gui/application: Add support URL to about dialog
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/823>
2026-09-03 15:48:12 +00:00
Hari Rana a64e3b59a2 gui/calendar-list: Remove calendar-list style class
This fixes a bug where the calendar list in the sidebar would not
change the background color when hovering over a calendar.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/824>
2026-08-31 13:45:30 +00:00
Hari Rana 1b10e66078 gui/event-widget: Guard event popover's pointing coordinates on multi-day events
A follow-up on https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/677#note_2628484,
which prevents the event popover from pointing outside the event
widget's boundaries on multi-day events when activated before exceeding
the drag threshold:
https://docs.gtk.org/gtk4/property.Settings.gtk-dnd-drag-threshold.html

This is mainly useful for people who fidget and may sloppily
click and drag event widgets (before triggering the drag operation),
causing the popover to place itself in unpredictable locations.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/697>
2026-08-28 21:55:35 +00:00
Hari Rana b2b6002573 views/month-view: Skip view when tabbing backward with Control on event widget
When an event widget is focused, there is no way to skip the entire
view with key combinations.

This patch addresses this by allowing the user to skip the entire
view when pressing Ctrl+Shift+Tab.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/817>
2026-08-26 21:16:41 -04:00
Hari Rana 3c044ce77c views/month-view: Skip view when tabbing with Control on month cell
We want to skip the entire view, because, otherwise, it runs
gcal_month_view_row_focus_underlying_cell().

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/817>
2026-08-26 21:11:15 -04:00
Hari Rana e1bc583597 views/month-view: Use debug messages
Given the complexity of keyboard navigation in the month view, it
may be useful to rely on debug entries/exits to debug edge cases.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/817>
2026-08-26 20:08:28 -04:00
Hari Rana 2e5379982b views/month-view-row: Replace "adjacent with "overlaying" event
"Adjacent" is incorrect because we are focusing the event that is
in front of the month cell.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/816>
2026-08-25 22:02:50 -04:00
Hari Rana 14869fa02b views/month-view-row: Replace "adjacent" with "underlying" cell
"Adjacent" is incorrect because we are focusing the cell that is
behind the event widget.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/816>
2026-08-25 22:02:50 -04:00
Hari Rana 11e4d8ee8d views/month-view: Allow focusing adjacent event widget from cell
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/741>
2026-08-25 15:42:59 +00:00
Hari Rana ec967ea2b9 views/month-view-row: Add method for focusing adjacent event widget
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/741>
2026-08-25 15:42:59 +00:00
Hari Rana f7c4f7b25a views/month-view-row: Calculate spacings in code
Visually, this comes with the benefit of not having the first
and last visible event widgets take additional margins, as spacing
is only applied between event widgets.

This will also allow us to make use of gtk_widget_pick() without
having to rely on hardcoding 1 on the y axis.

The current approach has a one pixel margin at the top and bottom
of each event widget, which offsets the vertical position of
every event widget by one pixel. In order to pick the first
event widget, we'd want to call
gcal_month_cell_get_header_height() because this is where the
first event widget is placed. If we were to invoke
gtk_widget_pick() with (x, 0), where x is
half the width of the month cell, the returned value would be
NULL because gtk_widget_pick() does not account for margins,
so it would need to be (x, 1), with 1 hardcoded.

Since this patch removes that offset, we can simply use
(x, 0) without having to hardcode 1.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/813>
2026-08-19 09:39:33 -04:00
Hari Rana f19ad343de views/week-header: Add row spacing
This adds back the margins lost from event widgets, without
taking additional pixels on the first and last event widgets.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/813>
2026-08-19 09:37:58 -04:00
Hari Rana 1637997bd6 views/week-grid: Add margins to event widgets
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/813>
2026-08-19 09:37:28 -04:00
Hari Rana 256524ff4c events: Remove margin
In the next commits, gaps will be added onto appropriate widgets.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/813>
2026-08-19 09:34:29 -04:00
Hari Rana 7886ef6f19 views/month-view-row: Get header height during calculations
This is needed for the next commit, which adds gaps between
event widgets.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/813>
2026-08-19 09:25:14 -04:00
Hari Rana 4fc242fd7c views/agenda-view-day-row: Adjust focusability of row and event widget
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>
2026-08-14 21:40:58 +00:00
Hari Rana 506b07fe1c views/agenda-view-day-row: Describe row
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/807>
2026-08-14 21:40:58 +00:00
Hari Rana 63db10cc92 views/agenda: Make list items unfocusable
Without this, the entire row would become focusable, which is
an undesired functionality for people who navigate with a keyboard.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/807>
2026-08-14 21:40:58 +00:00
Hari Rana b4dd889615 flatpak: Apply more config options in evolution-data-server and libical
`WITH_CXX_BINDINGS` is deprecated in libical 4, so it's replaced with
`LIBICAL_CXX_BINDINGS`.

`LIBICAL_JAVA_BINDINGS=False` is required for libical 4.

Since we use `ENABLE_OAUTH2_WEBKITGTK4=OFF` in evolution-data-server,
we could also use `ENABLE_OAUTH2_WEBKITGTK=OFF` alongside.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/811>
2026-08-14 07:52:01 -04:00
Hari Rana 68d820b2f7 Revert "views/month-view: Remove offset"
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.
2026-07-28 08:14:43 -04:00
Hari Rana 5f21144fbb views/month-view-row: Additive inverse in right-to-left languages
"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>
2026-07-05 14:56:44 -04:00
Hari Rana 1f06a71ee0 views/month-cell: Set child visible instead of sensitive
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>
2026-07-04 23:04:29 -04:00
Hari Rana cc6edfed79 views/month-cell: Replace overlay with box and empty bin
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>
2026-07-04 23:04:29 -04:00
Hari Rana f76eb428a7 event-editor/summary-section: Request for validation when editing summary row
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/499>
2026-06-26 10:06:24 -04:00
Hari Rana c0e41b8ca0 event-editor/event-editor-dialog: Add signal for requesting validation
This will be needed to make the Save button sensitive/insensitive.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/499>
2026-06-26 10:06:24 -04:00
Hari Rana 026f148dca event-editor/event-editor-dialog: Always grab focus to summary section
Now that the summary section is always focusable, even when the event is
non-writable, we can make it grab focus every time.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/499>
2026-06-26 10:06:23 -04:00
Hari Rana b051c30e1b event-editor/event-editor-dialog: Unset sensitiveness of widgets
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>
2026-06-26 10:06:23 -04:00
Hari Rana cbf5d8e10b event-editor/schedule-section: Update editability of widgets
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/499>
2026-06-26 10:06:23 -04:00
Hari Rana b70763075b event-editor/notes-section: Update editability of text view
Related: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/737>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/499>
2026-06-26 10:06:19 -04:00
Hari Rana a83198b954 event-editor/summary-section: Update editability of widgets
Related: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/737>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/499>
2026-06-26 10:06:02 -04:00
Hari Rana f5ce577b36 event-editor/date-time-chooser: Add "editable" property
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/499>
2026-06-26 09:48:54 -04:00
Hari Rana 59a5f5f7b5 event-editor/date-chooser-row: Make menu button insensitive when row is uneditable
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/499>
2026-06-26 09:48:54 -04:00
Hari Rana 3219b98b1b event-editor/schedule-section: Set visible child name based on schedule type
This fixes a bug introduced by
https://gitlab.gnome.org/GNOME/gnome-calendar/-/commit/8bbaeb754b6b5b81e92173508ef20888d7c421a8
which forgot to update the page depending on the schedule type.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/499>
2026-06-26 09:48:54 -04:00
Hari Rana ec5489b263 event-editor/event-editor-section: Remove GtkWidget overrides
Now that all GcalEventEditorSection subclasses override `event_set()`,
we can safely remove these overrides.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
2026-06-26 08:23:09 -04:00
Hari Rana 40337612e8 event-editor/event-editor-dialog: Set GcalEventEditorSection:dialog property to all sections
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
2026-06-26 08:23:09 -04:00
Hari Rana 9b4c5606ac event-editor/summary-section: Subclass GcalEventEditorSection
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
2026-06-26 08:23:09 -04:00
Hari Rana 11ac931d55 event-editor/schedule-section: Subclass GcalEventEditorSection
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
2026-06-26 08:23:09 -04:00
Hari Rana f8c4fb786f event-editor/reminders-section: Subclass GcalEventEditorSection
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
2026-06-26 08:23:09 -04:00
Hari Rana 082e829651 event-editor/notes-section: Subclass GcalEventEditorSection
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
2026-06-26 08:23:09 -04:00
Hari Rana 61a3b9f869 event-editor/attendees-section: Subclass GcalEventEditorSection
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
2026-06-26 08:23:08 -04:00
Hari Rana 66e7d9b6d7 event-editor/event-editor-section: Turn it into an abstract class
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>
2026-06-26 08:23:08 -04:00
Hari Rana da9b28cf93 event-editor/attendees-section: Remove GcalEventEditorSection implementation
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
2026-06-26 08:23:08 -04:00
Hari Rana 5dc7e4d639 event-editor/schedule-section: Remove GcalEventEditorSection implementation
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
2026-06-26 08:23:08 -04:00
Hari Rana d1c5a085bd event-editor/reminders-section: Remove GcalEventEditorSection implementation
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
2026-06-26 08:23:08 -04:00
Hari Rana 63191bea9e event-editor/notes-section: Remove GcalEventEditorSection implementation
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
2026-06-26 08:23:08 -04:00
Hari Rana 09e5bd5859 event-editor/summary-section: Remove GcalEventEditorSection implementation
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
2026-06-26 08:23:07 -04:00
Hari Rana d62c2386b8 event-editor/event-editor-dialog: Compare original event with edited event
This also takes the opportunity to rework the save process.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
2026-06-26 08:22:32 -04:00
Hari Rana 854d991134 event-editor/attendees-section: Allow applying event when mapped
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
2026-06-26 08:14:03 -04:00
Hari Rana a2bcde8ccb event-editor/schedule-section: Write to event directly
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
2026-06-26 08:14:03 -04:00
Hari Rana 842f9939cf event-editor/reminders-section: Write to event directly
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
2026-06-26 08:14:03 -04:00
Hari Rana af8a619eac event-editor/notes-section: Write to event directly
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
2026-06-26 08:14:03 -04:00
Hari Rana 6e4062a9d6 event-editor/summary-section: Write to event directly
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/711>
2026-06-26 08:14:03 -04:00
Hari Rana b0d5cdbcb8 event-editor/event-editor-dialog: Store duplicate event instance
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>
2026-06-26 08:13:24 -04:00