Commit Graph
2593 Commits
Author SHA1 Message Date
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
Hari Rana db8127e79a calendar-row: Port to AdwActionRow
`AdwSwitchRow` doesn't allow us to add widgets before the switch as a suffix, which will be required for further use.
2023-08-07 23:15:22 +00: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
Victoria Lacroix b35212c88c gcal-application: Ctrl+R to synchronize calendars
In !332, there was some difficulty with having two accelerators for the
"Synchronize calendars" action, so the Ctrl+R accelerator was left out.

This commit adds the Ctrl+R accelerator to gcal-window.ui by specifying
it before the F5 accelerator. The result is that only F5 is shown as an
accelerator in the overlay menu, but Ctrl+R still works.

Ctrl+R was also added to help-overlay.ui, displayed alongside F5.

Fixes #1052
2023-08-06 11:08:35 -04:00
Hari Rana c6aaf730b9 window: Add F5 shortcut for Synchronize Calendars 2023-08-04 19:05:15 -04:00
Hari Rana f210382bdc calendar-row: Port to AdwSwitchRow 2023-08-03 22:11:12 -04:00
Hari Rana 3c5a1cf870 notes-section: Disable Tab 2023-08-03 11:26:19 +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
Hari Rana 21bfed06e9 schedule-section: Show date when selecting the same day next week 2023-08-02 12:38:53 +00:00
axtloss 4079b5be0e calendar-editor/new-calendar: Fix unresponsive dialog after failed login
Adds the hide-on-close property to the dialog to stop it from becoming
unresponsive after the user tries to enter credentials multiple times.
2023-07-30 13:48:40 +00:00
Hari Rana 962646f065 calendar-row: Add go-next icon to indicate subpages 2023-07-29 07:49:44 +00:00
axtloss 779e3cd080 calendar-editor/new-calendar: Port authorization window to AdwMessageDialog
Replaces the AdwWindow authorization window with an AdwMessageDialog

Fixes #1044
2023-07-25 07:17:27 +00:00
Hari Rana 38455a074f calendar-button: Add F8 shortcut 2023-07-23 15:27:10 -04:00
Hari Rana be337bfe70 event-editor-dialog: Various keyboard improvements
- Add Esc as shortcut to close window
- Add mnemonics for Cancel and Done buttons
2023-07-23 14:14:33 +00:00
Hari Rana 2bb1ae90e4 calendars-page: Add mnemonic for "Undo" 2023-07-23 09:58:25 -04:00
Hari Rana 0646e00ee6 window: Correct typo 2023-07-21 20:00:45 -04:00
Hari Rana 540c27f72d calendars-page: Add Esc as shortcut to close window 2023-07-21 15:51:43 -04:00
Hari Rana cccd2d7118 window: Add shortcut for Manage Calendars 2023-07-21 18:46:23 +00:00
Hari Rana 10c2e20016 calendar-button: Use hyphen 2023-07-20 19:06:07 -04:00
Victoria Lacroix aec45594f9 gcal-utils: Combine GNOME Settings launchers
This refactor combines the functions
gcal_utils_launch_online_accounts_panel and
gcal_utils_launch_datetime_settings_panel into a single function that
takes a panel ID as an argument.
2023-07-15 23:04:51 +00:00
Victoria Lacroix 3526cadcca gcal-window: datetime settings shortcut
Shortcut is added so that time-related system settings can be easily
accessed. See #1023

The code is largely just a copy-paste of the code that opens the
"Online Accounts…" menu.

Fixes #1023
2023-07-15 23:04:51 +00:00
Hari Rana 3b818bf9dd edit-calendar: Fix visibility row 2023-06-22 09:44:20 -04:00
Georges Basile Stavracas Neto 750ab0aef8 calendar-management/calendars: Update title 2023-06-22 00:20:21 +00:00