Commit Graph
67 Commits
Author SHA1 Message Date
Georges Basile Stavracas Neto 9787f02e5b views: Implement GcalTimelineSubscriber 2020-04-01 21:06:51 -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 357ec18a0a Fix GcalContext management
GObject automatically notifies when passing
properties as part of g_object_new(). This
happens after the instance is created, thus
after constructed().

By passing G_PARAM_EXPLICIT_NOTIFY, we avoid
this behavior. However, we are still notifying
PROP_CONTEXT in GcalWindow. Removing this other
notify fixes the crashes related to GcalContext.

https://gitlab.gnome.org/GNOME/gnome-calendar/issues/417
2019-10-04 20:54:05 -03:00
Michael Catanzaro 18ae67cb59 Use more g_signal_connect_object()
Most of these are probably paranoid, not bugs. I haven't done an
exhaustive review to see what really needs it: that would be
time-consuming and require significant familiarity with the Calendar
codebase. This was just a quick check. Anyway, I vote for paranoid
when it comes to using g_signal_connect() regardless. It's dangerous,
and there's no reason to ever leave a signal connected after the user
data object has been destroyed.

Fixes #423
2019-09-14 23:28:42 +00:00
Georges Basile Stavracas Neto 0baeaa160a window: Delegate changing dates to GcalView
The view knows its time range, and knows what the
next or previous dates should be. So instead of
calculating the next date manually, ask the views
for that.
2019-05-09 17:42:59 -03:00
Georges Basile Stavracas Neto da31180cba view: Let views handle subscription range
Instead of GcalWindow handling the ranges themselves,
delegate this responsibility to the views.
2019-05-09 17:42:58 -03:00
Georges Basile Stavracas Neto 1118c74881 event: Receive and operate on GcalCalendar
Instead of receiving an ESource, receive a GcalCalendar
and operate on it. Many places needed to be adjusted for
that.

Tests need to be rethinked.
2019-05-04 12:05:39 -03:00
Georges Basile Stavracas Neto c52bacfc3f utils: Move more API to gcal-date-time-utils.c 2019-04-26 13:57:05 -03:00
Georges Basile Stavracas Neto 073fc961c1 view: Turn 'active-date' into a GDateTime property
Drop the bomb!
2019-04-26 13:04:37 -03:00
Georges Basile Stavracas Neto c5b5023508 application: Move time format to GcalContext
It finally found its place under the sun.
2019-04-25 16:30:57 -03:00
Georges Basile Stavracas Neto 01fdf79e6a Use weather service from GcalContext
All those properties were a waste compared to storing it
into the context.
2019-04-25 16:30:56 -03:00
Georges Basile Stavracas Neto c175599550 view: Replace the manager property by the context 2019-04-25 16:30:55 -03:00
Georges Basile Stavracas Neto 8892c31379 week-view: Remove embarrassing debug message 2018-01-28 12:50:04 -02:00
Georges Basile Stavracas Neto 194407ecfb views: Instrument and fix reference leaks 2018-01-28 12:08:04 -02:00
Georges Basile Stavracas Neto 037567209c view: Remove first weekday helpers when unecessary
Not all views need to know the first weekday, and those
who need, it can be stored internally.
2018-01-28 10:20:19 -02:00
Georges Basile Stavracas Neto b936759e5c project: Make time format a first-class citizen
The current code deals with 12/24h clock formats almost like
a workaround of the issue. This commit adds proper support to
different clock formats.
2018-01-28 02:30:55 -02:00
Georges Basile Stavracas Neto 1dcf0d1f24 project: Unify headers 2018-01-27 22:35:20 -02:00
Georges Basile Stavracas Neto 499db7bfd4 weather: Rework weather management
This commit brings a few changes that I was too lazy to
split in different commits:

 * Remove a few useless arguments in the GcalWeatherService API
 * Move the weather management code from GcalWindow to GcalWeatherSettings
 * A few style changes
2018-01-27 20:36:29 -02:00
Adam Dingle 67efbd0f6c week-view: display "12 PM" correctly
https://gitlab.gnome.org/GNOME/gnome-calendar/issues/235
2018-01-10 10:10:46 +01:00
Georges Basile Stavracas Neto 9f1885d807 weather-service: use GPtrArray for public API
Using GLists and GSLists is a bad practice. These data
structures are too much inneficient and GPtrArray has
the advantage of having a free function pointer, so we
can hide the underlying free function from the consumers
of this API.

This also gets rid of another allocation cycle in Month
view.
2017-12-16 23:12:06 -02:00
Georges Basile Stavracas Neto 5c1bf907fa views: move :event-activated signal to GcalView
We don't really need to copy this signal to every GcalView
implementation. It's just wasting code.
2017-12-16 21:44:09 -02:00
Florian Brosch eceb826e77 Whitespace changes 2017-12-11 22:13:16 -02:00
Florian Brosch d51d1ea2cd view: Move weather API to interface GcalView
This allows us to get rid of similar code.
2017-12-11 22:09:59 -02:00
Florian Brosch 1f3173823b weather: Integrate weather into our main windows. 2017-12-11 21:29:31 -02:00
Florian Brosch 3d292038b2 week-view: Fix outdated ownership comment.
A comment states GcalWeekView.manager is a week reference. It is
not. It probably should be.
2017-12-11 21:23:20 -02:00
Georges Basile Stavracas Neto b9310a84a3 widgets: ensure types on class_init
This will avoid GtkBuilder crashing because it couldn't
find the correct type for a given widget.
2017-09-20 19:14:15 -03:00
Georges Basile Stavracas Neto e60c8593dd window: propagate manager using properties 2017-09-07 14:35:44 -03:00
Georges Basile Stavracas Neto 53a8278953 views: correctly hide events according to the mod type
When deleting events with recurrence, we want to hide the event
widgets according to the modification type. So that selecting
e.g. subsequent in the modification type dialog hides the event,
and the subsequent ones, truly reflecting the operation that will
happen.

Currently, however, the views don't do that, and only hide the
event that was asked to be deleted.

Fix that by passing the object modification type, and adapting the
views to take that into account.
2017-09-07 00:02:40 -03:00
Alex Benishek 311195857f Move from GPL 2 to GPL 3
Right now the project contains a mix of GPL 2 and GPL 3 code.
This commit moves all of the perviously GPL 2 code to GPL 3

https://bugzilla.gnome.org/show_bug.cgi?id=752649
2017-08-10 07:16:36 -03:00
Georges Basile Stavracas Neto dde6b5bf05 week-view: improve scroll timeout logic
Instead of keeping an active timeout source spamming the
console, just connect to the right signal and wait for the
week view to be visible again.
2017-05-16 17:48:25 -03:00
Mohammed Sadiq 178e6a269a week-view: fix signal emission on scrolled_window
This was causing segfault in week-view

https://bugzilla.gnome.org/show_bug.cgi?id=782269
2017-05-06 12:51:25 -03:00
Georges Basile Stavracas Neto aa5b963412 view: rework active-date
The current implementation is deficient in many ways, the
worst one being the it relying on GObject semi-synchronous
property emission.

This issue was exposed by the Week view code, where the active
date was updated, but delayed to reach the Week header and some
events were being added ~before~ the active date changed.

With this work, I was also able to figure out a bunch of code
that relied on this (i.e. luck) to work.
2017-04-12 20:51:23 -03:00
Georges Basile Stavracas Neto b93fe11da8 view: cleanup unused code 2017-03-29 16:25:47 -03:00
Georges Basile Stavracas Neto 8b718ee0a0 week-view, week-header: instrument more functions 2017-03-17 16:38:28 -03:00
Georges Basile Stavracas Neto 002271ebb1 views: get rid of current date
We can easily track the current date with GDateTime API,
so we don't actually need the current date field.
2017-03-17 15:49:12 -03:00
Georges Basile Stavracas Neto 1dadd34409 week-view: instrument possibly crasher function 2017-03-17 15:06:02 -03:00
Georges Basile Stavracas Neto 339b49e7d5 views: cleanup code 2017-03-17 11:13:19 -03:00
Georges Basile Stavracas Neto d5825bbd35 project: override log domains
This way, we can have more useful debug spils.
2017-03-17 10:14:25 -03:00
Georges Basile Stavracas Neto 180621cd91 week-view: also check for realized
Be more strict about the checks, and avoid crashes.
2017-03-14 15:53:09 -03:00
Joyjit Choudhury 06cdeb61ed week-view: set the first weekday for week-header & week-grid
In this commit, the first weekday is set for week-header & week-grid.

The issue is, the first weekday is being set only for week-view,
resulting in incorrect display of weekdays in the week-header.

To fix this, the first weekday for week-header & week-grid is set
along with that of week-view.

https://bugzilla.gnome.org/show_bug.cgi?id=779346
2017-03-02 07:20:31 -03:00
Georges Basile Stavracas Neto d63e007a7a week-grid, week-view: improve hour sidebar rendering
The hour strings are too soft and can barely be read. Fix
that by setting a stronger color.

https://bugzilla.gnome.org/show_bug.cgi?id=777420
2017-02-09 09:21:28 -02:00
Georges Basile Stavracas Neto 096327e046 week-view: set the header's and grid's manager as well 2017-01-17 10:50:32 -02:00
Georges Basile Stavracas Neto ffaf7153d7 week-header: implement event creation 2016-12-14 17:00:11 -02:00
Georges Basile Stavracas Neto e8906c9e04 week-view: smoothly scroll the grid when moving to today 2016-12-13 16:29:07 -02:00
Georges Basile Stavracas Neto f134da5a1d week-view: avoid segfault when scrolling when unmapped 2016-12-13 16:29:07 -02:00
Georges Basile Stavracas Neto 343283e37a week-grid: implement event creation 2016-12-13 16:29:07 -02:00
Georges Basile Stavracas Neto bcfe13bcbc week-view: adapt view and widgets to handle RTL 2016-12-08 20:33:34 -02:00
Georges Basile Stavracas Neto 7e53c433b7 week-view: center grid on date change 2016-12-08 19:14:03 -02:00
Georges Basile Stavracas Neto 7a6ca3d711 week-view: simplify code 2016-12-08 18:34:06 -02:00
Georges Basile Stavracas Neto 36f716ebf4 week-view: reimplement editing events 2016-12-08 18:23:25 -02:00