Commit Graph
18 Commits
Author SHA1 Message Date
Georges Basile Stavracas Neto 136fd16a0a gui/date-chooser: Port to GListModel
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/742>
2026-05-03 16:57:54 +00:00
Hari Rana ccd3e5cae3 common/date-chooser: Replace "context" method with context getter method
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702>
2026-03-23 19:30:00 +00:00
Guillaume Bernard 5a663ee671 multi-choice: Fix i18n of navigation button tooltips
The previous approach built tooltip strings by formatting a translated
category name (e.g. "Month") into a generic "Previous %1$s" template.
This is a classic gettext concatenation anti-pattern: languages with
grammatical gender (French, Spanish, German, …) need the adjective to
agree with the noun, and word order can differ from English, so
translators of the format string have no way to produce a correct
result.

Replace the format strings and their helper callbacks with two explicit
GObject properties on GcalMultiChoice: prev-button-tooltip-text and
next-button-tooltip-text. The buttons in the template now bind to
these properties directly. Each widget instance in gcal-date-chooser.blp
sets its own fully self-contained translatable string ("Previous month",
"Next month", "Previous year", "Next year"), giving translators all the
context they need to handle gender and word order correctly.

Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1547
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/721>
2026-03-10 20:43:02 -03:00
Hari Rana 50e048c7e0 utils: Turn number of weekdays into a macro
While "7" may be obvious in the context of calendaring that
it represents the number of week days, it often gives me the
impression of it being a magic number when I'm hyperfocused on certain
parts of the codebase for several consecutive hours. Turning the
number into a macro helps me scan functions much more easily.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/674>
2026-03-08 21:53:40 -04:00
Fabian Hügel 66a8c6b7ab common/date-chooser: Jump to first day of month on button press
Encode the day in the combined choice value and use the callbacks
introduced in the previous commit to always jump to the first day
of the month when the next/previous month buttons are clicked.

Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1103
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/369>
2026-02-21 20:22:34 -05:00
Zoey Ahmed 272f7fd34f multi-choice: Bind category to tooltip + a11y label
This adds a tooltip to the multi choice buttons, with the text
"Previous/Next (category)". This fixes the warnings in the date
chooser popover.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/681>
2026-01-29 02:21:43 +00:00
Zoey Ahmed f32eae827e calendar-row: Add presentation role to color dot img
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/681>
2026-01-29 02:21:42 +00:00
Hari Rana 7e63f5f7e2 calendar-row: Add APIs
Since the calendar row widget is becoming an expandable widget,
several APIs were added to the widget:
- `gcal_calendar_row_get_calendar`
- `gcal_calendar_row_add_suffix`
- `gcal_calendar_row_get_first_suffix_child`
- `gcal_calendar_row_add_header_class`
- `gcal_calendar_row_remove_header_class`

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/362>
2025-11-18 11:37:18 -03:00
Hari Rana f8c5751174 calendar-row: Rename calendar-combo-row-item to calendar-row
Currently, the quick add popover implements its own row
widget for each calendar, which duplicates tons of unnecessary
code. This commit streamlines the calendar-combo-row-item row
widget to make it reusable elsewhere.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/362>
2025-11-18 11:37:07 -03:00
Hari Rana ba716102b9 common/date-chooser: Make arrow left/right move focus across grid
This also notifies the user when out of bound with arrow buttons.

Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1036
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/608>
2025-07-05 21:07:50 +00:00
Hari Rana 032a71dde6 common/date-chooser: Skip calendar grid with tab
Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1036
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/608>
2025-07-05 21:07:50 +00:00
Hari Rana d809192dd5 common/date-chooser: Wrap months
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/603>
2025-06-29 08:51:46 -04:00
Hari Rana 7a40a3be6a common/date-chooser: Add accessible labels to GcalMultiChoice widgets
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/603>
2025-06-29 08:51:27 -04:00
Jamie Gravendeel a509de8b1e gui: Port to Blueprint
This was mostly done with `blueprint-compiler port`.

Since Blueprint doesn't know about custom templates, I had to manually change some values from strings to literals.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/567>
2025-06-08 14:31:01 +02:00
Markus Göllnitz 4a4dce8ee3 views: add time direction property
The time direction property tells which orientation one
needs to scroll to change the time of the view. In these
directions (up/down v left/right) the new prev/next
buttons will be pointing.

The two buttons will be added in a subsequent commit,
and will gain view-dependent tooltips.

Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/542>
2025-06-08 09:59:00 +00:00
Titouan Real 931254c2a4 common/date-chooser: Housekeeping
Add some assertions and comments
2025-04-09 15:35:20 +00:00
Titouan Real 303cba1622 gui: Move DateChooser to common
DateChooser is used both by the event editor and the main window.
Moving it to common for a better file organization.
2025-04-09 15:35:20 +00:00
Titouan Real 0aa0619e99 gui: Move CalendarComboRow to common
CalendarComboRow is used both by the event editor and the importer.
Moving it to common for a better file organization.
2025-04-09 15:35:20 +00:00