Commit Graph
3478 Commits
Author SHA1 Message Date
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
ARAKHNID 2c4faa8f3a date-chooser: Clamp to first day of month when clicking previous/next buttons
When clicking the previous/next buttons, the view might not be aligned
to the start of the month, which can cause confusion.

Clamping the date to the first of the month removes this confusion by
being consistent. This also matches the behavior of the previous/next
buttons in the main toolbar.

Closes #1606

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/821>
2026-09-16 12:00:33 +00:00
Georges Basile Stavracas Neto c534f00366 event-widget: Rework transparency of past events
Instead of applying the "dimmed" CSS class - which comes from Adwaita
and applies an overall opacity change - add a new custom "past" CSS
class and change the opacity of specific elements.

This avoids opacity in the group, which in turn allows GTK to avoid
rendering these event widgets in offscreens, which should be faster.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/828>
2026-09-16 11:57:32 +00:00
Brage Fuglseth 2a3e1b02b5 utils: Use correct URL for GNOME Meet
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/834>
2026-09-16 07:07:37 -04:00
Georges Basile Stavracas Neto e7f284ae27 51.0 2026-09-13 17:37:54 -03: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
Maximiliano Sandoval 28e0b65017 Stop using G_GNUC_CONST in _get_type functions
As per g_type_ensure's documentation it is incorrect to mark _get_type
functions with G_GNUC_CONST since they have side-effects on their first
run.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/5223 for more
details.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/819>
2026-08-29 11:06:13 +00:00
Georges Basile Stavracas Neto 176d29260e 51.rc
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/818>
2026-08-28 19:31:18 -04:00
Felipe Alves pipe-felipe 56128e0574 views/week-view: Fix inverted Ctrl+scroll zoom direction
Ctrl+scrolling with a mouse wheel zoomed in the opposite direction
than expected: scrolling up zoomed out and scrolling down zoomed in,
which is inconsistent with other GNOME apps such as Loupe and
Nautilus.

Negate the scroll delta in both smooth (touchpad) and discrete
(mouse wheel) scrolling cases, so scrolling up now zooms in.

Fixes #1633

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/815>
2026-08-28 22:01:23 +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
tytan652 d1a400c856 utils/source-discoverer: Allow ICS with LF line breaks
RFC 5545 states that CRLF line breaks should be used but other consumer
seems to allow CR being missing.

https://datatracker.ietf.org/doc/html/rfc5545#section-3.1

Note, that the check result was ignored if the content-type is
text/calendar.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/814>
2026-08-28 21:51:52 +00:00
Anthony Zang 7693feb248 views/month: Cancel active animation before starting new ones
Before, two finger scrolls on mint cinnamon (X11 scroll instead of
wayland) caused month view to crash. g_clear_obj... orphan would an
animation allowing two animations to exist at once, causing conflict
when the orphan continued in the background. The two animations would be
generated due to X11's legacy support of both discrete notch scrolling
and the two finger smooth scrolling.

I replaced g_clear... with cancel_row_offset_animation in
snap_to_top_row which ensures that the orphaned animation is dead prior
to reassigning variables.

Fixes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/1616
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/801>
2026-08-28 21:48:26 +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
Kaiky CintraandRyan Oliveira 3a6d120863 views/month-view: Implement drag and drop handling on month view
Replicate the week grid implementation of drag-and-drop to
allow events to be dropped on top of other events in the month view.

Closes: #1092

Co-authored-by: Ryan Oliveira <ryan.oliveiraf@usp.br>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/806>
2026-08-14 22:24:01 +00:00
Kaiky Cintra 3aed975bf5 views/month-cell: Remove drag and drop handling from month cell
Co-authored by: Ryan Oliveira ryan.oliveiraf@usp.br

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/806>
2026-08-14 22:24:01 +00: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
Georges Basile Stavracas Neto 6d44af6656 gui/event-widget-pool: Ensure event widgets are visible
They might have been made invisible after e.g. being deleted.

Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/1623
Fixes: 59cae05929
2026-08-06 12:04:50 -03:00
Niklas Wimmer a79065f58b Release 51.beta
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/803>
2026-07-31 05:46:48 -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
Niklas Wimmer 81954048f9 core/event: Fix schedule comparison function
Fixes a few problems in the schedule comparison code:

- Same recurrence pointer short-circuits to TRUE: a pointer to the
  same recurrence is not a sufficient condition, because the dates
  could still be different (this is especially true if the recurrence
  is NULL for both events, but also holds if that is not the case).
  Also deleted the explicit check if only one of the recurrence
  pointers is NULL, because that is the first thing that is checked
  in `gcal_recurrence_is_equal()` anyway.
- Date comparisons only check if the date moved into a specific
  direction: the correct logic is to check if they are not the same,
  no matter in which direction the date moved.
- The time is not compared: for non all-day events, it is necessary
  to compare the time values too. The glib function that is now used
  for that also checks the date, so these checks can be collapsed
  into one.

For the second and third point it seems like some things got a bit
mixed up in
https://gitlab.gnome.org/GNOME/gnome-calendar/-/commit/2ee6dfc5e7bd5823bee5029a7ac3a32d3c247ba9:

- The `gcal_schedule_section_changed()` implementation already used the
  `g_date_time_equal()` function (which is now used again).
- It was `gcal_schedule_section_day_changed()` which only compared the
  dates using `gcal_date_time_compare_date()`, but this function was
  only used for edits to recurring events to determine whether to
  allow changing all instances. This commit now exposes a regression
  in this part of the code, which is tracked separately in
  https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/1613.

Fixes: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/1612>
See: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/783>
See: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/1613>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/792>
2026-07-22 10:27:57 -04:00
Niklas Wimmer ea2c637b35 core/range: Fix compare function
Fixes a regression from
https://gitlab.gnome.org/GNOME/gnome-calendar/-/commit/62345668748b571939c1c7b441e44664a05a0287

Essentially, `gcal_range_compare()` is just a faster subset of
`gcal_range_calculate_overlap()`. The commit that introduced this
regression accidentally flipped the sign of the compare function,
which made it no longer match with the implementation of overlap.

The function's implementation also did not match its doc comment,
returning any integer instead of only `-1`, `0` or `1`. Since the
behavior described in the doc comment is more commonly used for
comparison functions, the implementation was adjusted to match it.

To avoid any such failures in the future, the next commits will
add tests to validate.

Fixes: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/1615>
See: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/770>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/798>
2026-07-22 14:13:36 +00: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
Georges Basile Stavracas Neto 3a38f92f7a 51.alpha 2026-06-29 21:55:10 -03:00
Zelda Ahmed c1549d59fa gui/event-popover: Use en-dash instead of em-dash for date ranges
En-dashes "–" should be used instead of the longer em-dashes "—", since
the dash was used to represent a range of dates, which means the correct
dash to use is the en-dash

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/789>
2026-06-29 16:44:23 +01:00
Zelda Ahmed b29cf4e517 core/event: Use en-dash instead of em-dash
En-dashes "–" should be used instead of the longer em-dashes "—", since
the dash was used to represent a range of dates, which means the correct
dash to use is the en-dash

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/789>
2026-06-29 16:44:18 +01:00