Georges Basile Stavracas Neto
9ef437009f
gui/event-widget: Make event setter public
...
And make the "event" property read-write and not construct-only.
This will be useful for recycling event widgets later.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/758 >
2026-05-19 22:20:09 +00:00
Georges Basile Stavracas Neto
3104f16f7c
gui/event-widget: Connect to signals using GSignalGroup
...
It'll make it easier when making the "event" property mutable later
on.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/758 >
2026-05-19 22:20:09 +00:00
Georges Basile Stavracas Neto
e4d1fdf13c
gui/event-widget: Use more bindings in the UI file
...
Instead of manually connecting to signals and binding to properties
in code.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/758 >
2026-05-19 22:20:09 +00:00
Georges Basile Stavracas Neto
378b7f6075
views/month: Remove unused field
...
The hash table is not used since we moved to list models.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/761 >
2026-05-05 21:37:05 -03:00
Georges Basile Stavracas Neto
64efb3a06b
views/month: Completely hide invisible rows
...
Instead of just skipping painting. This should remove rows and event
widgets from the CSS tree, avoid measurements and relayouts, and a
few other benefits.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/761 >
2026-05-05 21:36:58 -03:00
Georges Basile Stavracas Neto
32d962aa8d
gui/event-widget: Remove useless queue_draw
...
We use a label these days, no need for manual drawing code.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/761 >
2026-05-05 21:36:48 -03:00
Georges Basile Stavracas Neto
c62af398e5
gui/event-widget: Remove unused fields
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/761 >
2026-05-05 21:36:42 -03:00
Georges Basile Stavracas Neto
bfc4a7dc62
gui/event-widget: Use modern practices for properties
...
Use a property array, install them all at once, and notify using
g_object_notify_by_pspec().
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/761 >
2026-05-05 21:36:36 -03:00
Hari Rana
8629b1f422
views/month-cell: Create activation signal and shortcuts from utility function
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/747 >
2026-05-04 10:42:02 +00:00
Hari Rana
c507fb23af
gui/event-widget: Create activation signal and shortcuts from utility function
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/747 >
2026-05-04 10:42:02 +00:00
Georges Basile Stavracas Neto
16a67b7f60
views/week-header: Use gdkarrayimpl.c as backing store
...
Same deal. It's faster.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/757 >
2026-05-03 15:30:20 -03:00
Georges Basile Stavracas Neto
c9c4f1c046
gui/window: Only add Agenda view to timeline when visible
...
There's no point in adding the Agenda view to the timeline when it's
invisible, it just causes invisible and unnecessary event widget
recreation.
Add it lazily to the timeline, when the page visibility changes.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/757 >
2026-05-03 14:56:07 -03:00
Georges Basile Stavracas Neto
95bc0a8fb2
views/month: Reduce to 3 pages
...
Now that the timeline handles augmentation, the Month view doesn't need
to fetch so much data at once. Reduce to 3 pages of month rows.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/757 >
2026-05-03 14:56:07 -03:00
Georges Basile Stavracas Neto
08f3f94ec1
gui/application: Stop weather service on shutdown
...
Instead of during context finalization, which is too late.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/742 >
2026-05-03 16:57:54 +00:00
Georges Basile Stavracas Neto
cd82c2c52c
gui/date-chooser: Properly remove idle source
...
When disposing of the widget, also remove the associated idle source
that might exist. This prevents a crash.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/742 >
2026-05-03 16:57:54 +00:00
Georges Basile Stavracas Neto
c084e28400
views/week: Don't deal with events out of range
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/742 >
2026-05-03 16:57:54 +00:00
Georges Basile Stavracas Neto
c71fcf7029
views/month: Add "range" property to rows and use it
...
Use it as the binding source of the GtkExpression for the boolean
filter used to filter the list of events. This allows automatic
filtering when the "range" property changes.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/742 >
2026-05-03 16:57:54 +00:00
Georges Basile Stavracas Neto
afd9f9b954
core/timeline: Remove message queueing and listeners
...
"Let go and move on." - The Fool?
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/742 >
2026-05-03 16:57:54 +00:00
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
Georges Basile Stavracas Neto
d065d4b9e8
views/agenda: Port to GListModel
...
This is a major rework of the Agenda view. It splits the view into
GcalAgendaViewDay, which represent a single day with events; and
GcalAgendaViewDayRow, which is the actual widget with a title label,
and a listbox with event widgets.
The Agenda view itself merely manages a list of GcalAgendaViewDays,
and updates them with the events model, and active dates.
This allows us to get rid of the custom listbox row, and the confusing
checks for event widgets, and all the bugs the came with it. It also
allows for removing the internal GcalRangeTree, and delegate all
event management to list models.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/742 >
2026-05-03 16:57:54 +00:00
Georges Basile Stavracas Neto
fa03c6f9af
views/week-grid: Port to GListModel
...
And, while at it, rewrite the layout algorithm to operate on blocks of
overlapping events, and segmented columns. Like the month view row,
layouts blocks are invalidated at any point in time, but recalculated
immediately before a relayout happens.
The reason for doing such a massive rewrite while in the middle of the
port to GListModel is because it's easier to handle GListModel data
with this approach, than with the previous approach of storing it all
in a GcalRangeTree.
Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1153
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/742 >
2026-05-03 16:57:53 +00:00
Georges Basile Stavracas Neto
34e28e31fe
views/week: Port week header to GListModel
...
Rework the add/remove functions to make them internal. The remove
function can now operate on GcalEvent* instead of gchar* uuid,
since it's not bound to GcalTimelineSubscriber anymore.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/742 >
2026-05-03 16:57:52 +00:00
Georges Basile Stavracas Neto
c635db3495
views/week: Port to GPtrArray
...
GLists are an artifact of times immemorial and we should
avoid using them as much as possible. In this commit, for
example, there were a couple of accidentally quadratic
pieces of code.
Port (mostly of) the week view header to GPtrArray.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/742 >
2026-05-03 16:57:51 +00:00
Georges Basile Stavracas Neto
039b75755e
views/month: Port to GListModel
...
Neutralize the add/remove/update vfuncs (we can't remove them yet).
Pass the event model to the individual week rows, and let them
filter their events using a GtkFilterListModel.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/742 >
2026-05-03 16:57:51 +00:00
Jordan Petridis
b900a65760
Use standalone Month format when appropriate
...
Some locales use different strings for the months depending if they are
accompanied by a numberic date or not. When we use the month name as a
standalone, we should use %OB instead to accomodate for these locales.
For more see: https://docs.gtk.org/glib/method.DateTime.format.html
Close #1546
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/705 >
2026-04-23 16:28:06 +00:00
Jan-Michael Brummer
63879a0d63
event-widget: Truncate long strings by char not by bytes
...
Longer text were truncated by bytes instead of chars leading to
invalid text as UTF text sizes are bigger than one byte.
Fix it by using the correct utf8 offset pointer.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/750 >
2026-04-23 11:36:00 +00:00
Alistair Francis
6c09758633
event-popover: Support the maps URI for opening locations
...
Open gnome-maps (or other map application) when clicking on a map icon
next to the location address.
Resolves: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/326
Signed-off-by: Alistair Francis <alistair@alistair23.me >
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/590 >
2026-04-09 12:04:11 +00:00
Hari Rana
92b74849bf
views/month-cell: Add AdwBin as parent to methods retrieving height of widget
...
This is future-proofing the uncertain decision of removing
GtkWidget's `margin-*` properties in the future, which is what
we're currently using to retrieve the height of certain widgets.
Whenever the intention is to get the entire size of a particular
widget, including properties that contribute to layout such as
margins, the `get_width()`/`get_height()` methods don't include
these properties during calculations. However, getting the size
of the parent widget will include them in its entirety.
As such, the safest path is to use AdwBin as the parent to the
respective widgets, and using it to retrieve the height.
See: <https://gitlab.gnome.org/GNOME/gtk/-/issues/6556#note_2056432 >
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/739 >
2026-04-03 16:37:14 -04:00
Hari Rana
49e0521b67
views/week-view: Adapt to high contrast
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/710 >
2026-03-31 21:55:32 -04:00
Joshua Brot
1baefcc465
gui: Run Blueprint formatter
...
Reformatting blueprints to align with the updated formatter.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/736 >
2026-03-27 18:16:29 -04:00
Zoey Ahmed
fbfacb6972
gui/blueprint: Drop unneeded casts to built-ins
...
Blueprint can now "infer" the type a closure returns, as long as it is
not the property of a custom GType, so some of the casts (e.g. `as
<string>`) will not be necessary anymore
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/733 >
2026-03-24 16:43:10 +00:00
Hari Rana
c0063f29c8
calendar-management/calendars-page: Delete calendar during unmapping
...
The previous commit reintroduced
https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1270
In order to solve this without destroying the dialog,
the calendar is forcefully deleted when unmapping.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/712 >
2026-03-24 16:14:47 +00:00
Hari Rana
98a993de4d
gui/window: Reuse calendar management dialog
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/712 >
2026-03-24 16:14:47 +00:00
Hari Rana
8012dc4404
calendar-management/calendar-management-dialog: Replace hide() override with unmap()
...
`hide()` stopped working since we ported to AdwDialog. We certainly
don't want to override the `close()` virtual method from AdwDialog,
as page transitions begin while the dialog is closing. Instead,
we can override `unmap()`, which will do it at the very end.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/712 >
2026-03-24 16:14:47 +00:00
Hari Rana
e0250064f6
core/shell-search-provider: Replace "context" property with context getter method
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702 >
2026-03-23 19:30:04 +00:00
Hari Rana
088d826c34
gui/importer: Replace "context" property with context getter method
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702 >
2026-03-23 19:30:04 +00:00
Hari Rana
b5d12237d5
gui/window: Remove "context" property
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702 >
2026-03-23 19:30:04 +00:00
Hari Rana
170bed7755
gui/event-popover: Replace "context" property with context getter method
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702 >
2026-03-23 19:30:02 +00:00
Hari Rana
037ffd3700
gui/event-widget: Replace "context" property with context getter method
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702 >
2026-03-23 19:30:02 +00:00
Hari Rana
3c9a525710
gui/calendar-management: Replace "context" property with context getter method
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702 >
2026-03-23 19:30:02 +00:00
Hari Rana
3f486c2ccc
gui/search-button: Replace "context" property with context getter method
...
This is the last remaining widget whose `context` property was bound
to GcalWindow's on construction and was null-asserted before
setting the value, making the FIXME comment unnecessary.
Fixes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1463
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702 >
2026-03-23 19:30:02 +00:00
Hari Rana
c7c5d49b14
gui/sync-indicator: Replace "context" property with context getter method
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702 >
2026-03-23 19:30:01 +00:00
Hari Rana
0e73034ffe
gui/quick-add-popover: Replace "context" property with context getter method
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702 >
2026-03-23 19:30:01 +00:00
Hari Rana
9b4c166a18
event-editor/event-editor-dialog: Replace "context" property with context getter method
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702 >
2026-03-23 19:30:01 +00:00
Hari Rana
f44a1ee942
event-editor/event-editor-section: Remove "context" property
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702 >
2026-03-23 19:30:00 +00:00
Hari Rana
669906c601
event-editor/summary-section: Remove "context" property
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702 >
2026-03-23 19:30:00 +00:00
Hari Rana
b979ea05b5
event-editor/schedule-section: Replace "context" property with context getter method
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702 >
2026-03-23 19:30:00 +00:00
Hari Rana
7bcb78b6ae
event-editor/reminders-section: Remove "context" property
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702 >
2026-03-23 19:30:00 +00:00
Hari Rana
aafbd71ced
event-editor/notes-section: Remove "context" property
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702 >
2026-03-23 19:30:00 +00:00
Hari Rana
a51b65f5f7
event-editor/attendees-section: Remove "context" property
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702 >
2026-03-23 19:30:00 +00:00