Commit Graph
2848 Commits
Author SHA1 Message Date
Georges Basile Stavracas Neto 5283bfe546 event-editor/dialog: Compose calendars model
Currently we only show writable calendars in the calendar row, but
for read-only events, the read-only calendar must be selected. But
that's impossible because it's not in the model.

Change the model to a flattened list as follows:

+ FlattenListModel -----------+
|                             |
| + writable calendars -----+ |
| |                         | |
| | - Calendar 1            | |
| | - Calendar 2            | |
| | - Calendar 3            | |
| | [...]                   | |
| |                         | |
| +-------------------------+ |
| + read-only calendars ----+ |
| |                         | |
| | - Calendar 1            | |
| | [...]                   | |
| |                         | |
| +-------------------------+ |
+-----------------------------+

The read-only calendars list only ever has 1 item: the calendar
of the current event, and only if the event is in a read-only
calendar.
2024-11-08 17:38:10 -03:00
Georges Basile Stavracas Neto 1354467dc1 event-editor/dialog: Bind sensitive to writable property
So that the row is insensitive for read-only calendars.
2024-11-08 17:37:28 -03:00
Georges Basile Stavracas Neto 5b0c44c06c calendar-combo-row: Fix a memory leak 2024-11-08 17:17:47 -03:00
Titouan Real aca797d192 Remove GcalCalendarRow 2024-11-08 19:09:56 +01:00
Titouan Real 923cb668da Make GcalEventEditor use GcalCalendarComboRow 2024-11-08 19:09:56 +01:00
Titouan Real 3ca07464a2 Make GcalImportDialog use GcalCalendarComboRow 2024-11-08 19:09:56 +01:00
Titouan Real 90d2b262a3 Add GcalCalendarComboRow & GcalCalendarComboRowItem 2024-11-08 19:09:52 +01:00
Abdullahi Usman b44c712a3a agenda-view: Sort events in chronological order
agenda-view sort_func uses gcal_date_time_compare_date, which is
insufficient for this case.
we want to compare events date(s) down to the last minute, so that we
can be able to sort them in chronological order.
we use the g_date_time_compare function.

Fixes: #936

Co-authored-by: Georges Basile Stavracas Neto
<georges.stavracas@gmail.com>
2024-11-06 10:53:09 -03:00
Georges Basile Stavracas Neto 416a369f0c window: Remove unused error handling 2024-11-06 10:43:42 -03:00
Georges Basile Stavracas Neto 2c3eceaa48 style: Use CSS variable for event radius 2024-11-06 10:40:32 -03:00
Georges Basile Stavracas Neto 1e8fa097e0 window: Simplify CSS recalculation code 2024-11-06 10:36:46 -03:00
Georges Basile Stavracas Neto 963e6a28dd style: Remove unused CSS style 2024-11-06 10:24:18 -03:00
Jamie Gravendeel b3b6c5fd5d style: Bump 6px border radii to 9px
See https://gitlab.gnome.org/GNOME/libadwaita/-/commit/d450cb30c59694f604d4396993281797035bc51c
2024-11-06 13:21:57 +00:00
Georges Basile Stavracas Neto 6b92164ff2 importer: Don't duplicate string unnecessarily 2024-11-06 10:05:27 -03:00
Georges Basile Stavracas Neto 2d75d3fb30 importer: Assert instead of trace
We go to great lengths to convert to UTF-8, so it's only fair to
expect it to be UTF-8
2024-11-06 10:04:26 -03:00
Georges Basile Stavracas Neto fa88b4999c importer: Cosmetics 2024-11-06 10:04:03 -03:00
Otávio Silva 98ced271ef importer: convert different file encodings to UTF-8
Files that aren't in the UTF-8 encoding were breaking the import dialog.
This tries to guess the encoding of the file before processing it, based
on the Byte Order Mark (BOM), and converts it to UTF-8.

Fixes #1243
2024-11-05 21:10:29 +00:00
Enzo MAROS 0e09efc43c window: Create calendar-management-dialog on demand
When the user deletes a calendar in the calendar management dialog, a
popover allows them to undo the deletion. The calendar is fully deleted
only when the toast is dismissed or when the toast reaches its timeout.
When the user closes the calendar management dialog without dismissing
the toast and before the end of the timeout, the calendar can still be
manipulated for a short period of time.

To fix this, I removed the calendar-management-dialog from the UI of the
window, and made the window create and destroy the dialog on demand.
This forces the toast overlay to dismiss all toasts.
2024-10-22 12:35:45 +00:00
Austin Pringle 11db394643 gcal-week-header: Change week header capitalization on week number heading. 2024-10-22 11:48:15 +00:00
Automeris naranja 061c027520 event-editor-dialog: Use an AdwBanner when a calendar is read-only
Using a tooltip to inform when the calendar is read-only won't
work in touch devices.

This change also improves a11y, as Orca now reads this message,
something that wasn't happening before.
2024-10-22 11:29:53 +00:00
Brage Fuglseth 3c85d7d19e metainfo: Expand and modernize
- Reorder to be consistent with other apps
- Remove `<help>` link to Discourse as that tag is intended for
  persistent docs rather than a place to ask for help
- Remove deprecated `.desktop` suffix from `<id>`
- Add brand colors
- Update HW requirements to be more in accordance with AppStream
  recommendations
2024-10-17 17:52:46 +00:00
Georges Basile Stavracas Neto 004fdb0f3d utils: Shuffle and cleanup some paintable code
- It's only used in GcalShellSearchProvider so move it there.
- GdkTexture implements GIcon so no need to convert to a pixbuf.
2024-10-11 22:55:03 -03:00
Georges Basile Stavracas Neto c5424c8bfa calendar-management/new-calendar: Remove unused code 2024-10-11 22:39:04 -03:00
Georges Basile Stavracas Neto fc642bb65d build: Remove enum templates
Meson has a handy way to do that without these template files. Let's
just use it
2024-10-11 22:36:35 -03:00
Georges Basile Stavracas Neto 41208bc746 47.0 2024-09-16 10:28:53 -03:00
Otávio Silva b25623071f view: Fix drag and drop issue with events in daylight saving time
When dragging and dropping events in week view during the week of
daylight savings time switch, events were off by one hour. This fixes this
behavior by using the util function gcal_date_time_add_floating_minutes.

Fixes #1198
2024-08-28 00:20:18 +00:00
Jean-François Fortin Tam f7aadd23bb import-dialog: Add a11y description on "hidden" calendar status icons 2024-08-27 15:25:22 -04:00
Jean-François Fortin Tam 7566bf273b import-dialog: Show indicator icons for invisible calendars
When importing .ics files as events,
you can assign the resulting events to any writable calendar,
even those hidden from the view.

However, it is good to have a hint of such calendars being invisible.
That way, users can have predictable expectations.

Fixes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1184
2024-08-27 15:04:03 -04:00
Jean-François Fortin Tam f76659c706 import-dialog: Move parent source name color code
Reading the `get_source_parent_name_color` call after `color_paintable`,
one gets the impression they are somehow related, but they are not.

Furthermore, this unfortunate location complicates my upcoming changes.
Let's relocate that code next to the context where it is actually used.

This improves clarity and maintainability.
2024-08-27 14:45:49 -04:00
Diego Iván M.E 9443520411 utils: Fix double free in gcal_create_writable_calendars_model
gtk_filter_list_model_new expected that the model passed to be
an owned reference, but we were passing an unowned one, causing
a double free after the function is called repeatedly. This
was particularly noticeable in the importer dialog.

Fixes #1282
2024-08-27 13:40:28 +00:00
Diego Iván M.E 2df48b6fc2 import-dialog: Fix default calendar search
By !474, we now use a GListModel to store the calendars.
Nonetheless, we still use the GListStore API, which no longer
works.

This commit introduces a simple linear search for the default calendar
2024-08-27 13:40:28 +00:00
Jean-François Fortin Tam a844920620 gcal-window: Set a general tooltip for the "Today" button
This static tooltip helps users discover what the feature is about.
It also helps with accessibility in general.
2024-08-23 17:14:59 -04:00
Hari Rana d7131d5141 import: Only list writable calendars 2024-08-23 13:46:00 -03:00
Hari Rana 26d34930b6 event-editor: Only list writable calendars 2024-08-23 13:46:00 -03:00
Hari Rana 8ff3a843b3 utils: Add function to create writable-only calendars lists 2024-08-23 13:46:00 -03:00
Jean-François Fortin Tam fb5b03b2df new-calendar: Title the local calendar group
In practice, the name and color widgets are currently meant to be used
when creating a local calendar, not when subscribing online, especially
as a single online calendar link can bundle multiple calendars.

This makes the scope of those widgets clearer,
and also makes the dialog more balanced.

Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/566
2024-08-23 15:50:40 +00:00
Jean-François Fortin Tam 29396acf46 new-calendar: Use "title" in AdwPreferencesGroup
Replace the manually positioned & styled group label by a property

This simplifies the XML code, makes the style match the rest of the UI,
and prevents libadwaita from sometimes moving such labels to the bottom.
2024-08-23 15:50:40 +00:00
Jean-François Fortin Tam 126929b8c5 new-calendar: Clarify web calendar strings
Now that the "Open" button has been removed,
it is now a feature to "Connect" rather than "Import",
so update the section title to reflect that.

Also give a hint as to what protocols are supported.
2024-08-23 15:50:40 +00:00
Jean-François Fortin Tam a74ae36e6c Remove gcal-file-chooser-button code
As it is no longer used in the calendar management dialog,
and it was not used anywhere else in the codebase,
it can now be dropped entirely.
2024-08-23 15:50:40 +00:00
Jean-François Fortin Tam f827b8a1f2 Remove .ics file importer button in "New Calendar"
A file imported as a "new calendar" would make it dependent on the file.
This feature was confusing everybody and is downright dangerous.

This does not prevent anyone from creating normal calendars,
and importing events from .ics files into them.

Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/390
2024-08-23 15:50:40 +00:00
Nathan Pratta TeodosioandSimon McVittie 1a9bd4e9ca time_t is now 64 bits, long is not enough in all architectures.
Co-authored-by: Simon McVittie <smcv@collabora.com>
2024-08-23 15:49:03 +00:00
Diego Iván M.E f482f3521f drop-overlay: Mark as not visible when there are no DnD operations
This allows the GtkInspector to select widgets that are behind it.

Fixes #1271
2024-08-20 13:47:43 +00:00
Jean-François Fortin Tam 588bec96b6 utils/source-discoverer: Fix HTTP errors interpretation
There can be many reasons why a request is not allowed or authorized.
403 and 405 HTTP error codes do not prompt the visitor for credentials.
Only 401 and 407 responses are credentials prompts.

Only raise a username and password request when facing a 401 or 407.

Fixes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/645
Fixes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/552
2024-08-16 18:47:57 -04:00
Jean-François Fortin Tam 577efdd967 utils/source-discoverer: Add a debug statement
This debug statement would happen before any interpretation of errors,
which is useful in troubleshooting issues related to interpretation.

Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/645
2024-08-16 18:47:57 -04:00
Jean-François Fortin Tam 2860a468f1 new-calendar: Show webcalendar subscription errors
Let the user know what went wrong,
using a secondary icon and tooltip directly in the URL entry field.
Also provide a hint to GTK that it is meant to be a URL field.

Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1177
2024-08-16 18:46:36 -04:00
Diego Iván M.E 50c1197d61 new-calendar-page: Reset entry progress when validating
This way, the pulse is hidden once the operation fails, is cancelled
or succeeds.

Fixes #1273
2024-08-13 12:58:12 -06:00
Diego Iván M.E 648badb826 new-calendar-page: Cancel validation/discovery when user types
It allows the user to fix typos in URLs or delete them. Before this,
it would still prompt the password dialog, for instance

Closes #1272
2024-08-13 12:58:09 -06:00
Diego Iván M.E b024319f60 new-calendar-page: Change URL validation feedback
Currently, the progress bar is pulsed as soon as the user starts
typing, giving the impression that a process is on going. But,
in reality, validation is performed 500 ms.

After this changes the progress bar is pulsed only when validation
is on-going. The timeout has been increased to 750ms too.
2024-08-13 12:55:51 -06:00
Georges Basile Stavracas Neto 5f86b88c3b views/month: Increase overflow popover min width
Makes it so that it's at least 1.25 the width of a day cell, and at
most 1.5 of that.

Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1166
2024-08-13 16:25:45 +00:00
Georges Basile Stavracas Neto 2b85b9c680 views/month: Rename a variable
Makes it clearer that this is the day cell.
2024-08-13 16:25:45 +00:00