Commit Graph
2131 Commits
Author SHA1 Message Date
Georges Basile Stavracas Neto f052cb6589 event-widget: Remove idle on destroy
Finalize may be too late for us, since a widget
may be destroyed long before it's finalized.

Remove the idle timer on destroy then.
2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto 7a0b55aa61 timeline: Replace useless function by GcalEvent counterpart 2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto 1f6559de68 Remove ECalDataModel and ECalDataModelSubscriber
Drop the bomb!
2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto c68ef4b9ab manager: Remove more unused API 2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto 399b9d8d00 Simplify calendar views
We don't need a split subscription update step in GcalView
anymore, since subscribers communicate range directly to
the timeline now.
2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto 84eeb58804 Move Shell search to GcalShellSearchProvider
Add a custom timeline to GcalShellSearchProvier and use
it to gather events.

Do a massive cleanup of unused APIs as well.
2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto 06fbe2c2b9 month-view: Properly notify the "context" property
After adding the EXPLICIT_NOTIFY flag, we needed to make
GcalMonthView notify about it manually, otherwise the
context wouldn't propagate to GcalMonthPopover. We never
did that.

Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/553
2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto 02f21fddab manager: Remove main ECalDataModel
It is not used by any views, nor by the search engine.
2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto 9cb29b6dc5 manager: Update event gathering API 2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto 72952e42cb timeline: Add API to gather events at a certain range
Will be used by the month popover.
2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto 70bcc18bf9 manager: Remove unused API 2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto c0016b266b search: Port to GcalTimeline 2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto 2d46e673ca timeline: Add filtering API
This will be used by the search.
2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto 7cfc264c6d views: Remove ECalDataModel code 2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto 9787f02e5b views: Implement GcalTimelineSubscriber 2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto 6bcf1a3705 manager: Add GcalTimelineSubscribers to GcalTimeline
Instead of subscribing to the ECalDataModel's API, use the
new API.
2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto 3692a0ccf6 Introduce the new calendar monitoring API
It is, as expected, heavily inspired by the ECalDataModel code,
except it uses GDateTime, is timezone aware, and can handle all
day events correctly.
2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto 94413c26b1 event: Remove event cache
It's for the best. The cache was being more
problematic than it was worth it.
2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto 92f331cd9f range-tree: Add API to remove data
It'll be useful to remove entries without knowing their
range.
2020-04-01 21:06:50 -03:00
Georges Basile Stavracas Neto ec0c17f6fb range-tree: Support destroy function 2020-04-01 21:06:50 -03:00
Georges Basile Stavracas Neto 78248bec5e calendar: Mark all properties as G_PARAM_EXPLICIT_NOTIFY
We explicitly notify them all, so mark them as such. Otherwise,
GLib notifies it when changing these properties through bindings
and such.
2020-04-01 21:06:50 -03:00
Georges Basile Stavracas Neto 90597ca128 calendar: Only notify visibility when it changes
Otherwise we get weird double-notify issues from it.
2020-04-01 21:06:50 -03:00
Georges Basile Stavracas Neto f182813e49 event: Protect event cache with a lock
We'll be creating events from multiple threads soon,
so make sure the event cache is protected enough.
2020-04-01 21:06:50 -03:00
Georges Basile Stavracas Neto ae2a6b9d21 range-tree: Switch to use GDateTime
Using raw integers forces us to select a pre-defined
start and end ranges for the timeline. Since we want
to reuse this data structure on GcalTimeline, make it
a bit more useful.
2020-04-01 21:06:50 -03:00
Georges Basile Stavracas Neto 047078d67d build: Move foward typedefs to gcal-types.h
Standard practice; gcal-types.h is meant to only be
used by header files.
2020-04-01 21:06:50 -03:00
Georges Basile Stavracas Neto 58ce571e93 build: Include src/ files
This will be required by tests in order to
find headers in src/
2020-04-01 21:06:50 -03:00
Kai A. Hiller 8f0a860966 gcal-calender-popover: Make sorting stable
When multiple calendars with the same name exist, their relative order in the
list is random and changes e.g. when toggling the checkmark next to them. The
result is glitchy behavior.

Now when two calendars have the same name we do a secondary sort by their ID,
resulting in a nice deterministic order.
2020-04-01 22:58:28 +00:00
Michael Catanzaro a439fd2b1d date-time-utils: fall back to UTC when timezone is unrecognized
For whatever reason, libical doesn't support the Etc/UTC timezone.
Currently we crash gnome-calendar whenever libical doesn't support the
current timezone (as returned by GTimeZone). Let's fall back to UTC
instead.

Fixes #485
2020-02-18 17:07:55 -06:00
Georges Basile Stavracas Neto 2be799d78d edit-dialog: Make the new alarm row have a label
With the introduction of the new event editor, Calendar
saw it receive sections of editable properties of the
events. One of these sections is the "Reminders" section,
that contains the reminders (also called alarms) of an
event.

However, this section's row to add a new alarm does not
match the proposed mockups for it. It currently has a
combo box that shows the popover with selectable reminder
times, instead of being a clickable row.

Make it a clickable listbox row, and show the alarms popover
when clicked.

https://gitlab.gnome.org/GNOME/gnome-calendar/issues/502
2019-12-06 16:37:12 -03:00
Niels De Graef 4d05ffb9d3 Don't forget to chain up to parent finalize
This can give a small memory leak and can prevent the necessary closing
of resources.
2019-12-02 19:53:59 +00:00
Georges Basile Stavracas Neto 866cdabe9c edit-dialog: Move the all day switch to the top of the list
As nitpicked by Sam.
2019-12-02 16:41:56 -03:00
Georges Basile Stavracas Neto 87c1ffb9d5 Reimplement alarm support
This is a complete reimplementation of alarms in Calendar.

Rejoice.
2019-12-02 16:41:56 -03:00
Georges Basile Stavracas Neto e871486766 edit-dialog: Split recurrency widgets in different rows 2019-12-02 16:41:56 -03:00
Georges Basile Stavracas Neto 23e1544a25 edit-dialog: Simplify notes widgetry
Remove an intemediary GtkBox that is now not necessary anymore.
2019-12-02 16:41:56 -03:00
Georges Basile Stavracas Neto 4a1c5b9cc6 edit-dialog: Split Reminders to its own section 2019-12-02 16:41:56 -03:00
Georges Basile Stavracas Neto ce47cfea86 time-selector: Make it a GtkBox directly 2019-12-02 16:41:56 -03:00
Georges Basile Stavracas Neto 34eb3a2343 utils: Use GDate to compare dates 2019-12-02 16:41:56 -03:00
Georges Basile Stavracas Neto 3896aac734 edit-dialog: Make date & time rows expandable
Add a human-readable label and move the widgets to the expandable
section.
2019-12-02 16:41:56 -03:00
Georges Basile Stavracas Neto 948447d8bf edit-dialog: Turn the All Day check a switch 2019-12-02 16:41:56 -03:00
Georges Basile Stavracas Neto d14175895a date-selector: Reduce width 2019-12-02 16:41:56 -03:00
Georges Basile Stavracas Neto d5529f1782 edit-dialog: Move widgets to lisbox rows 2019-12-02 16:41:56 -03:00
Georges Basile Stavracas Neto bb310421c1 edit-dialog: Make it a HdyDialog subclass 2019-12-02 16:41:56 -03:00
Georges Basile Stavracas Neto 646a002826 project: Add libhandy dependency 2019-12-02 16:41:56 -03:00
Georges Basile Stavracas Neto b772349c3f Move UI files to src/
Keep it in sync with what To Do and Settings do.
2019-12-02 16:41:56 -03:00
Georges Basile Stavracas Neto 58974cb7e2 manager: Only remove connected calendars
The "source-removed" signal can pass any kind of source,
including source collections that even have the calendar
extension, but are not connected.
2019-10-09 13:02:35 -03:00
Georges Basile Stavracas Neto cafd17627c year-view: Trivial code cleanup 2019-10-09 12:37:01 -03:00
Georges Basile Stavracas Neto 1c39e501f6 calendar: Always initialize color 2019-10-09 12:37:01 -03:00
Georges Basile Stavracas Neto 262cd40eec manager: Instrument removing calendars 2019-10-09 12:37:01 -03:00
Georges Basile Stavracas Neto 1308e33f1d manager: Always return if calendar creation fails
This is an embarrassing mistake: when an error is propagated,
we always need to return! The error matching should only be
used for deciding whether to warn or not.

https://gitlab.gnome.org/GNOME/gnome-calendar/issues/470
https://gitlab.gnome.org/GNOME/gnome-calendar/issues/264
2019-10-09 12:37:01 -03:00
Michael Catanzaro e053c0cae8 quick-add-popover: Use more g_signal_connect_object
We need to disconnect from the GcalManager when the GcalQuickAddPopover
is destroyed, or crashes happen.
2019-10-07 10:37:50 -05:00