Georges Basile Stavracas Neto
9ace504ec4
Post-release version bump
2023-09-02 10:35:15 -03:00
Georges Basile Stavracas Neto
42df20b904
45.rc
2023-09-02 10:33:32 -03:00
Georges Basile Stavracas Neto
5503e5ca50
views/month: Handle reduced animations setting
...
Move rows slightly faster in that case.
Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1080
2023-09-02 10:28:39 -03:00
Georges Basile Stavracas Neto
20ad7f3676
views/month: Reset offset when animation is done
2023-09-02 10:26:41 -03:00
Georges Basile Stavracas Neto
b0813fb605
month-view-row: Clamp last cell to [first cell, 6]
...
This is not ideal but it's what we've got for now.
Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1083
2023-09-02 10:26:41 -03:00
Georges Basile Stavracas Neto
e3a350126b
gui/month-cell: Accept drops from other months
...
We support that now fairly easily, let's enable it.
Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1077
2023-08-25 18:07:04 -03:00
Georges Basile Stavracas Neto
f6c4fe108d
core/calendar-monitor: Join view thread in dispose
...
Joining the calendar view thread in finalize is too late; dispose
is an earlier phase, and recoverable.
Do that.
Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1085
2023-08-25 17:18:16 -03:00
Georges Basile Stavracas Neto
d8742df706
core/calendar-monitor: Remove unnecessary g_main_loop_quit()
2023-08-23 11:25:59 -03:00
Georges Basile Stavracas Neto
ef1f154c7a
core/shell-search-provider: Check for pending search
...
Now that GcalTimeline properly notifies about the complete state,
it uncovered an issue where GcalShellSearchProvider was dereferencing
a NULL pointer.
Protect against that.
2023-08-23 11:19:10 -03:00
Georges Basile Stavracas Neto
b32353e0ed
core/timeline: Update completed when adding or removing
...
We need to do that, so we can keep properly keep the complete
property up-to-date.
2023-08-23 11:19:10 -03:00
Georges Basile Stavracas Neto
0eb3ebb1fa
core/timeline: Track complete state differently
...
Don't try and track the number of completed calendars; instead,
recalculate the completed state from scratch every time. This
is not a performance concern, as we're dealing with at most some
hundreds of calendars.
2023-08-23 11:19:10 -03:00
Georges Basile Stavracas Neto
f16b0a1563
core/calendar-monitor: Assert more startup conditions
...
The calendar view thread can start spinning its own mainloop
before g_thread_new() returns, and in that case we have a NULL
thread.
Check that either the GThread is what we expect it to be, OR,
the thread is NULL and there are no messages in the queue.
2023-08-23 10:17:01 -03:00
Georges Basile Stavracas Neto
8403052d88
core/calendar-monitor: Initialize and clear mutex
...
An oversight from previous commits
2023-08-23 10:11:13 -03:00
Georges Basile Stavracas Neto
373da242d0
core/calendar: Ensure notify happens in main thread
...
The notify signals of ESourceSelectable seem to come from the
ESourceRegistry thread, and this has the potential to derail
the execution of Calendar. This might be true for all signals
we connect to.
Make sure to always emit notify signals on the main thread.
2023-08-23 09:33:01 -03:00
Georges Basile Stavracas Neto
42de771c24
core/calendar-monitor: Join thread before NULLifying it
...
This allows the threading macros to compare against the correct
value.
2023-08-23 09:33:01 -03:00
Georges Basile Stavracas Neto
6f45dcc26f
core/calendar: Notify about the right property
...
When we change colors, notify about colors, not the name.
2023-08-22 17:28:13 -03:00
Georges Basile Stavracas Neto
9e341d87e4
core/monitor: Assert we're in the right thread
...
Right now everything works as expected, but this should catch cases
where we're running functions on the wrong thread.
2023-08-22 17:25:56 -03:00
Georges Basile Stavracas Neto
df66e484a7
core: Add global threading utility
...
For now, we only store what's the main thread of the program.
2023-08-22 17:25:56 -03:00
Georges Basile Stavracas Neto
9e3a727eb7
Post-release version bump
2023-08-18 12:53:01 -03:00
Georges Basile Stavracas Neto
a489b76a68
45.beta
2023-08-18 12:50:25 -03:00
Georges Basile Stavracas Neto
970ece7814
Bump release version to 45.beta
...
I missed the alpha release :/
2023-08-18 12:01:35 -03:00
Georges Basile Stavracas Neto
da84b727b3
core/subscriber: Pass old event on update
...
Now that we keep precise control over GcalEvent instances, and
can use simple pointer comparisons everywhere, GcalMonthView
implemented its update function as a simple remove + add pair.
The problem is that we're not passing the old event instance,
so removals never actually happen, since the new instance is
not yet available to subscribers.
Pass old event in additio to the new one, and use it where it
makes sense.
Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1073
2023-08-18 10:41:41 -03:00
Georges Basile Stavracas Neto
60223adc5c
core/calendar-monitor: Replace signals by callbacks
...
This should save quite some resources when manipulating events.
Signals are relatively expensive, and 2 pointer chases are
definitely better than a global lock + FFI stashing + signal
manipulation.
2023-08-18 10:41:18 -03:00
Georges Basile Stavracas Neto
ec840fbab9
style: Improve selection visuals of month cells
...
Add specific CSS rules for the selected state, and make it a bit
more prominent.
2023-08-17 21:22:49 -03:00
Georges Basile Stavracas Neto
bd989aae66
views/month: Implement event creation flow
...
Add a click gesture to detect when we have to start monitoring
cursor motion. Also add a motion event controller to react to
cursor motion, and enable and disable the this motion controller
on button press and release, respectively.
Selection is implemented as a pair of GDateTimes stored in the
month view struct. Whenever a selection begins, the start date
is set; the end date is only set when moving the cursor. It is
valid to have a start of the selection, and no end (meaning, a
1 day selection); it is, however, forbidden to have an end but
not a start.
Future improvements can be added later, such as scrolling when
moving the cursor close to the edges of the month view. We're
gonna have to live without that for now though.
Implement the GcalView.clear_marks vfunc now that we have a
selection to operate on.
2023-08-17 21:13:54 -03:00
Georges Basile Stavracas Neto
ded56392ef
views/month: Use inclusive week end to format title
...
Otherwise we end up with D+1 in the last date.
2023-08-17 19:41:55 -03:00
Georges Basile Stavracas Neto
0e4c4d5177
views/month: Use month and year rangers in titles
2023-08-17 18:46:52 -03:00
Georges Basile Stavracas Neto
632484b719
month-cell: Cleanup unused function
...
We handle weather internally now, no need to expose a function to
set that.
2023-08-17 18:28:30 -03:00
Georges Basile Stavracas Neto
f344241a1a
weather-service: Cleanup unused method
2023-08-17 18:28:30 -03:00
Georges Basile Stavracas Neto
4a2412897a
month-cell: Bring back weather information
...
Now GcalMonthCell handles it internally, instead of receiving the
weather information from the parent view.
This is a modified version of a patch originally written by
camelCaseNick.
2023-08-17 18:27:05 -03:00
Georges Basile Stavracas Neto
904ae8c4f6
weather-service: Add method to fetch info for date
...
This will be used by next commit to reintroduce weather data
in the Month view.
Patch originally made by camelCaseNick.
2023-08-17 18:26:49 -03:00
Georges Basile Stavracas Neto
dabbc597d9
month-cell: Show month name on the 1st day
...
This helps differentiate when the month change happens.
2023-08-16 21:21:47 -03:00
Georges Basile Stavracas Neto
b8b1db7bcd
style: Improve out-of-month day cell visuals
...
Make them more easily recognizable.
2023-08-16 21:21:47 -03:00
Georges Basile Stavracas Neto
28ee1e1244
month-cell: Add 'numeric' CSS class
...
Gives us a nice consistent look
2023-08-16 21:21:47 -03:00
Georges Basile Stavracas Neto
f1f9d83943
views/month: Implement get_children_by_uuid
...
Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1057
2023-08-14 14:57:51 -03:00
Georges Basile Stavracas Neto
1fd984306f
views/month: Animate discrete scrolls
...
When scrolling with a scroll wheel, animate towards a target
row. If multiple scrolls happen before the animation completes,
change the target row of the animation.
2023-08-13 18:37:12 -03:00
Georges Basile Stavracas Neto
8f04f40272
views/month: Factor out row offsetting in a function
...
And use it in the pixel-based variant.
2023-08-13 18:37:12 -03:00
Georges Basile Stavracas Neto
12a9e8193f
views/month: Rename a function
...
We'll introduce a variant of this function that operates directly
on row offsets, instead of pixel values.
2023-08-13 18:37:12 -03:00
Georges Basile Stavracas Neto
da2b7328e0
views/month: Implement event updates
...
Just do a stupid remove + add, which is far from ideal but will
be enough for the time being.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
95cc40d8a8
window: Use non-deprecated function
...
gtk_widget_compute_point() is the hot new thing.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
77f355ed53
month-cell: Small style improvements
...
As suggested by Allan.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
176f8f28a8
views/month: Show overflow popover when requested
...
Basically, all that we used to do, but written in a different
way for the new month view.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
15032b6d05
month-view-row: Add 'show-overflow' signal
...
It just proxies the day cell's signal.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
57fa7b2d48
window: Compare week for month view too
...
The new month view operates on week rows, so it makes sense to
perform the same check than that of the week view.
https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1063
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
d5a36d4ad2
view: Operate on ranges
...
This is the data struct we should be using everywhere now.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
80efa6fd26
style: Improve day cell visuals
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
9b343db339
views/month: Improve date calculation for cell style
...
Use the center the view as the date with which the day cells
are styled. This should be enough to highlight the month with
most days visible onscreen.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
e7846a6b9c
views/month-view: Change visuals of out-of-month day cells
...
This still looks like garbage becase of the rudimentary way we
compute the current date, but it's a start.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
7e26bd5649
views/dazzling: Make it *the* month view
...
And move the old one to the attic. I'll keep the files around for
a while.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
7f7f55826c
month-view-row: Implement RTL support
...
This was remarkably easy.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
5bc8fffc71
views/dazzling: Add cached events to shuffled row
...
Cached events won't be readded by the backend, because they're
alread present in the view, so we have to manually add them to
the rows.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
ac3998f07d
month-cell: Add padding beneath day number
...
We need to breathe!
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
ddfd3ae498
month-view-row: Slant edges of multiday events
...
When the start or end of the event block doesn't match the event's
range, add slanted edges.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
56d9040030
month-cell: Set sensitivitiness of the button
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
b9d4405e69
views/week-header: Check for NULL child
...
I'm not sure if this is actually correct, but I'm too tired to
think the week header through, so let's just be slightly more
protective for now.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
a743f6884e
month-cell: Start insensitive
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
030f370015
month-cell: Don't change inscription visibility
...
Let's just change the text and preserve the visibility of the
inscription.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
c2b07a5e0a
views/dazzling: Detect week changes, not months
...
The new month view operates on weeks
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
d2c606a221
views/dazzling: Actually use start date
...
Oopsie
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
83acb98f9e
views/dazzling: Make debug prints more useful
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
66cb36e855
views/dazzling-month-view: Implement differential date change
...
Should make the Today button work properly now.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
1c307de688
views/dazzling: Remove unused field
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
f9f9ccbb8c
month-view-row: Rewrite layout algorithm
...
Calculate event blocks upfront, in a way that is agnostic to
pixel sizes, and keep them alive as long the event is around.
Calculate which event blocks are visible at layout time, and
only set the child visibility of the event widgets, instead
of truly showing or hiding them. This makes size_allocate not
queue relayouts.
There are many opportunities for optimizations that we can
eventually land, but this seems to work decently so far.
RTL support is still missing.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
b775256ef8
views/month-cell: Use GtkInscription
...
It allows us to change text without causing a relayout.
This will be important later.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
a04b5da975
month-view-row: Remove unnecessary field
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
6382b1f383
month-view-row: Remove redundant check
...
All events of a row are, technically, in the same row!
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
cc51e88ed2
month-view-row: React to event visibility
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
3506100f5b
views/dazzling-month-view: Show event popovers
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
3a36f75877
views/dazzling-month-view: Tentatively support wheel scroll
...
Add a dedicated discrete scroll event controller, and ensure
each event controller handles the right types of events.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
3f0b1e57de
views/dazzling-month-view: Handle events
...
Most of the code is copied from GcalMonthView, so it sucks
slightly. But it seems to work reasonably well so far.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
7f57cfeb83
range: Add API to check if range contains datetime
...
This will be used by next commits to make some code
more legible.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
f8f2c10a8e
views/dazzling-month-view: Propagate context to rows
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
adaf735ada
views/month-view-row: Remove unused variables
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
d62bd1ae77
views/dazzling-month-view: Sketch timeline subscription
...
Right now it does nothing beyond reporting a range, but eventually
we'll populate this code.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
628d530ee5
window: Don't leave GcalDazzlingMonthView alone in the rain
...
It is now part of the family, and we can't just bully this view
like this anymore.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
f36fcbbbbd
views/dazzling-month-view: Notify active-date changes
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
72d4f45cd1
views/dazzling-month-view: Initialize on current date
...
Calling gcal_view_set_date() ensures that all week rows have
their ranges setup. This will be useful later.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
a527bbe5dc
views: Sketch out new month view
...
Nothing really works here, this is very WIP. It doesn't even show
events. Let's build from here.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
3dc669f2ec
calendar-monitor: Set the right field when removing events
2023-08-07 14:51:52 +00:00
Georges Basile Stavracas Neto
04522b7817
core/calendar: Remove connection timeout
...
As per discussions, this is not really what we want here. There
already is offline caching and post-connection sync, so we want
to show events as soon as possible.
Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1027
Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/569
2023-08-07 14:51:52 +00:00
Georges Basile Stavracas Neto
2b78d57459
calendar-monitor: Don't replace new events
...
If an event is already present in the cache, don't attempt
to insert it, which replaces the available event instance
with the new one.
2023-08-02 11:05:06 -03:00
Georges Basile Stavracas Neto
9c21dff77d
calendar-monitor: Improve lifecycle of updated events
...
Keep a ref alive while updating the old event, as it may be
destroyed during signal emission.
2023-08-02 11:05:00 -03:00
Georges Basile Stavracas Neto
745e022aa0
calendar-monitor: Don't remove events unnecessarily
...
Apparently I never properly implemented range comparison in
remove_events_outside_range(). Do so now.
This makes the infinite scrolling month view stop flickering
events when changing weeks.
2023-08-02 11:04:52 -03:00
Georges Basile Stavracas Neto
f7ee9279ad
calendar-monitor: Operate in batches
...
Instead of smashing the main thread's mainloop with
potentially hundreds or even thousands of idles that
add, remove, or update individual events, pass arrays
of events around.
2023-08-02 11:04:40 -03:00
Georges Basile Stavracas Neto
8b403f10ef
calendar-monitor: Use a GPtrArray for accumulated events
...
This will ease future changes.
2023-08-02 11:04:37 -03:00
Georges Basile Stavracas Neto
e47ee2dc17
views/week: Simplify variable with g_autoptr
2023-08-02 11:04:25 -03:00
Georges Basile Stavracas Neto
07dd7780ad
view: Cosmetics
2023-08-02 11:04:12 -03:00
Georges Basile Stavracas Neto
eb0c123b3a
window: Use gtk_css_provider_load_from_string
...
And bump the GTK4 dependency version
2023-08-02 11:03:58 -03:00
Georges Basile Stavracas Neto
a7f0af6e8a
event-editor: Shuffle some code
...
Declaring the entries struct inline saves us a few
lines of code.
2023-08-02 11:03:50 -03:00
Georges Basile Stavracas Neto
5ec16818e3
gschema: Bring back some strings
2023-08-02 11:03:40 -03:00
Georges Basile Stavracas Neto
750ab0aef8
calendar-management/calendars: Update title
2023-06-22 00:20:21 +00:00
Georges Basile Stavracas Neto
cfad123629
calendar-management: Cleanup some more
2023-06-22 00:20:21 +00:00
Georges Basile Stavracas Neto
400eb12572
calendar-management/dialog: Update default sizes
2023-06-22 00:20:21 +00:00
Georges Basile Stavracas Neto
106655def2
calendar-management/calendars: Switch to toasts
...
It's time to move on from the old in-app notification style.
Switch to toasts.
2023-06-22 00:20:21 +00:00
Georges Basile Stavracas Neto
5e5eb75be0
calendar-management/new-calendar: Move add button to dialog
...
Move the add button from the headerbar into the dialog, make it
a pill button, and update the button label with the number of
calendars that will be added.
2023-06-22 00:20:21 +00:00
Georges Basile Stavracas Neto
a13b4ae4f6
calendar-management/pages: Subclass AdwBin
...
It's simpler.
2023-06-22 00:20:21 +00:00
Georges Basile Stavracas Neto
bdda09abb8
calendar-management: Port to AdwNavigationView
...
The interfacing that GcalCalendarManagementDialog had is somewhat
similar to AdwNavigationView, with pages and signaling basically
matching the same semantics.
We can save some code by switching to AdwNavigationView then, as
the heavy-lifting of page management is done there now.
The headerbar of the dialog is no more; instead, each page has its
own headerbar that automatically gets a back button.
Page activation and deactivation works essentially the same, but
uses AdwNavigationView signals to manage that.
2023-06-22 00:20:21 +00:00
Georges Basile Stavracas Neto
bd042ba4e8
calendar-button: Workaround listbox style
...
Use the 'modelbutton' CSS name to mimic the style of model buttons.
Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/849
2023-05-23 19:14:42 -03:00
Georges Basile Stavracas Neto
3c672e0784
Move sync indicator into a separate widget
...
And move the new widget into the headerbar itself, instead of
the calendars button.
2023-05-23 19:01:19 -03:00
Georges Basile Stavracas Neto
b5c9d5b73f
window: Use AdwToolbarView to look prettier
...
We're fashion now.
2023-05-23 17:01:54 -03:00