6136 Commits
Author SHA1 Message Date
Georges Basile Stavracas Neto 509165286e gui/application: Change --debug to --verbose
And support multiple calls to it. Each call increase the verbose
level, up to level 4. Level 4 increases all tracing.

You can run Calendar as:

$ gnome-calendar -vvvv

now and that'll enable tracing.

Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/work_items/1234
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/858>
2026-10-02 13:58:05 +00:00
Georges Basile Stavracas Neto a3598c0c11 main: Always initialize logging
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/858>
2026-10-02 13:58:05 +00:00
Georges Basile Stavracas Neto c4c5c81cdf core/log: Enable tracing with G_MESSAGES_DEBUG=all
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/858>
2026-10-02 13:58:04 +00:00
Georges Basile Stavracas Neto b82f6bbcb8 core/log: Support verbosity levels
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/858>
2026-10-02 13:58:04 +00:00
Georges Basile Stavracas Neto d0e8fa85b3 gui/application: Change --version shortname to uppercase V
This will free -v for --verbose

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/858>
2026-10-02 13:58:03 +00: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
Antonio Marin 4d0da828f6 Update Romanian translation 2026-09-30 19:52:28 +00: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
Niklas Wimmer 32504d3092 docs: Rewrite the contributing guide
Expanded the introduction and possible areas of contribution. Also
improved structure and added more links to communication channels.

Removed the description of how patches can be submitted, in favour
of a more prominent link to welcome.gnome.org, which provides this
information in much more depth.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/855>
2026-09-30 18:30:44 +00:00
Efstathios Iosifidis ebbc95a1bd Update Greek translation
(cherry picked from commit ec168dd7b4f21d8f1b6b5886e9ba3e63772fadd2)
2026-09-27 22:24:25 +00:00
Efstathios Iosifidis 8634d1ac13 Update Greek translation
(cherry picked from commit 8aaf664e4ed9d57d5b294e521074c165d1167fce)
2026-09-27 22:22:06 +00:00
mindonwarp 93c7bdcb6a views: Redraw the agenda view when week-start-day changes
Updates the visible rows after the selected date shifts within the week.
The agenda view displays all events starting from the selected day and
up until the last day of the same week.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/822>
2026-09-26 20:03:20 +02:00
mindonwarp a6a977e5ca views: Redraw the date chooser (mini-calendar) after changing week-start-day
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/822>
2026-09-26 17:22:00 +00:00
mindonwarp be55238eaa views: Redraw month view rows after changing week-start-day
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/822>
2026-09-26 17:22:00 +00:00
mindonwarp 1fd99f71b2 views: Redraw week view after changing week-start-day
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/822>
2026-09-26 17:22:00 +00:00
mindonwarp fc5cf5229c gui: Extend the GcalView interface with a method to redraw the weekday layout
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/822>
2026-09-26 17:22:00 +00:00
mindonwarp 107d4a067e gui: Use the new GcalContext API to get week start day once
This gets the globally set start-of-week setting on application startup.
Making the views redraw themselves on setting change while running will
be a later step.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/822>
2026-09-26 17:22:00 +00:00
mindonwarp acd8fbaf69 utils: Use ISO weekday numbering for 'get_first_weekday' function
Change the 'get_first_weekday' function to number the weekdays
Monday(1)-Sunday(7) like ISO does. Change the function name to reflect
that. Add tests for different locales, although the tests depend on
system-installed locales.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/822>
2026-09-26 17:22:00 +00:00
mindonwarp a0a6ae2a2c core/utils: Find the actual 'default' locale start of week day
Use the gcal-utils to find the actual day in case the desktop setting
for start of week is set to 'default'. After this commit, all usages of
that function have to be changed to use the GcalContext instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/822>
2026-09-26 17:21:59 +00:00
mindonwarp 059d72499f core: Get week start day from GcalContext
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/822>
2026-09-26 17:21:59 +00:00
mindonwarp c874bde622 refactor: Reduce code duplication in GcalContext
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/822>
2026-09-26 17:21:58 +00:00
mindonwarp 6e1330430b core: Get week start day from settings portal
Uses the already available settings portal in GcalContext to fetch and
track changes in global "week start day" desktop setting. Will use this
later to redraw views.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/822>
2026-09-26 17:21:58 +00:00
mindonwarp c0a74ed76f utils: Align GcalWeekDay enum with ISO 8601
Start the enum from Monday-Sunday (1-7). Adapt code that references the
`is_workday()` utility method, which in turn uses the GcalWeekDay enum
to combine pairs of days by bitwise or-ing.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/822>
2026-09-26 17:21:57 +00:00
mindonwarp 2ef27531f4 chore: Set gsettings-desktop-schemas dep to 50.alpha
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/822>
2026-09-26 17:21:57 +00:00
Zelda Ahmed bff0f6dac1 views/agenda: Drop GcalAgendaViewDayRow
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/809>
2026-09-26 13:02:27 +01:00
Zelda Ahmed 11ef9db5c2 views/agenda: Rework scrolling to use gtk_list_view_scroll_to
Since we refactored all events widgets and date headers to be
constructed by GtkListView directly, we are able to use
`gtk_list_view_scroll_to` to jump to the top of the list when opening
the agenda view, and changing date, instead of needing a complicated
timer and GSource callback

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/809>
2026-09-26 13:02:27 +01:00
Zelda Ahmed 3fe8eadcd9 theme/css: Adjust agenda view CSS
Tweak CSS to target the event widget rows/headers in the listview
directly, rather then the `GcalAgendaViewDayRow`'s first, which are no
longer being made by the agenda view's listview

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/809>
2026-09-26 13:02:27 +01:00
Zelda Ahmed 7694e9846d views/agenda: Use ListView factories for creating the date headers
Similar to the previous commit, we now create the date header label
using the model provided directly from `ListView:header-factory`, by
querying the date of the day the item is in the section of.

This requires copying the auxiliary method `new_date_header_string ()`
from `gcal-agenda-view-day-item.c` to `gcal-agenda-view.c` for
generating the appropriate using facing string for the header

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/809>
2026-09-26 13:02:27 +01:00
Georges Basile Stavracas Neto c1b689dbda gui/event-widget: Protect against NULL events
GcalEventWidget was adjusted to handle NULL events so it could
more easily be used in GtkListView & family, however, what was
left out of thie adjustment were the functions related to the
orientation of the event.

Protect these functions by only running them when an event widget
is around.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/809>
2026-09-26 13:02:27 +01:00
Zelda Ahmed 55d9cc68bc views/agenda: Use ListView item factory for creating event widgets
Instead of having the `GtkListView` create a row for each day containing
their own internal `GtkListBox` to store the event widgets, move the
creation of event widgets to the `GtkListView`'s item factory.

The motivation for this change is having internal listbox's inside a
`GtkListView` is problematic for keyboard navigation, because the user
can either:

- The event widgets in the internal listbox's can not be activated by
  pressing Space/Enter on a focused event widget if the listbox row's are set to be focusable.
- If the internal listbox's rows are set to be unfocusable, the user is
  not able to navigate the event widgets using the arrow keys, Page
  Up/Down or Home/End.

To use `GtkListView:factory` to generate the event widgets, we first
wrap the filtered day model inside the list view around a
`GtkFlattenListModel` to concatenate all the containing
`GcalAgendaViewItem` (which contain a given event and the date it occurs
on) in the day models together. This gives us a model of all events that
can be turned into event widgets, and a model of day sections to create
headers for each day in the next commit.

This approach was taken because we do not get the activated row widget,
unlike with the previously used `GtkListBox` where the row widget is
passed as an argument in `::row-activated`, and there is no feasible
other way to obtain the correct event widget from a `GtkListView`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/809>
2026-09-26 13:02:27 +01:00
Zelda Ahmed 3f1bc3edf0 view/agenda-view-day: Use a map model to create GcalAgendaViewItems for each event of the day
Required some small changes to `gcal-agenda-day-row.c` to keep the
application working - `create_day_row_func` was tweaked to query the
given item for the event, instead of assuming the event is the item
itself. This will be removed (alongside the rest of GcalAgendaDayRow) in
a later commit

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/809>
2026-09-26 13:02:27 +01:00
Zelda Ahmed 4ea2fcfcbe guis/views: Introduce GcalAgendaViewItem
GcalAgendaViewItem is an auxiliary object that will be used instead of
the raw events by GcalAgendaViewDay in a later commit to construct the
event widgets inside the main ListView of the agenda view as opposed to
a creating them inside of a `GtkListBox` inside each row of the
ListView.

Holding a reference to the event widget will be necessary in later
commits, so when a ListView row is activated, we can query its model of
GcalAgendaViewItem's with the given activated position, and pass the
correct item's event widget to `gcal_view_event_activated ()`

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/809>
2026-09-26 13:02:27 +01:00
Martin a6ede83217 Update Slovenian translation 2026-09-26 10:56:13 +00:00
Niklas Wimmer cf0a0835c1 calendar-management: Reduce online page to online calendars
Removes all UI and logic for local calendars from the
new-online-calendar page. This is now handled by the
new-local-calendar page.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/850>
2026-09-26 00:04:12 +00:00
Niklas Wimmer 85ec836d04 calendar-management: Reduce local page to local calendars
Removes all UI and logic for online calendars from the
new-local-calendar page. This is now handled by the
new-online-calendar page.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/850>
2026-09-26 00:04:12 +00:00
Titouan Real 8a21b82e42 calendar-management: Replace bottom button with menu
The new menu allows opening either the new-local-calendar or the
new-online-calendar page. As of this commit both pages still show
the same content, this will be fixed in the following commits.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/850>
2026-09-26 00:04:12 +00:00
Niklas Wimmer 736b724d24 calendar-management: Remove new-calendar page
This page will be replaced by the two pages created in the previous
commits, new-local-calendar and new-online-calendar.

To keep the project compiling the button to add a new calendar now
temporarily points at new-local-calendar. The button will be replaced
by a menu exposing both new pages in one of the following commits.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/850>
2026-09-26 00:04:12 +00:00
Niklas Wimmer 06910d9a89 calendar-management: Add new-online-calendar page
This is a copy of the existing new-calendar page, but with a
different class name.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/850>
2026-09-26 00:04:12 +00:00