Georges Basile Stavracas Neto
d272bbe3c8
week-view: use the correct inclusive end date
...
Event dates are, by definition, inclusive on their
start dates, but exclusives on their end dates. That
means that end dates don't actually contain the date
they represent.
Week grid code, however, was considering that end date
as inclusive, and the layout code was miscalculated
because of that.
Fix that by using an inclusive end date when calculating
the event span. Since Calendar does not support subsecond
precision, we do that by subtracting one second from the
exclusive end date.
Issue: #279
2018-05-01 18:50:27 -03:00
Georges Basile Stavracas Neto
93b22f2c43
month-view: reorganize code
2018-05-01 11:06:47 -03:00
Georges Basile Stavracas Neto
fd5e6daf13
event-widget: use correct end date on tooltip
...
The end date of all-day events should have one day decreased,
since the final day is not technically what the user expects
it to be.
Issue: #257
2018-04-30 22:19:13 -03:00
Georges Basile Stavracas Neto
b6df8cde7b
manager: fix reference management
...
GcalManager:remove_event() is an asynchronous function
that, by the time the callback is executed, unreferences
the event that is being removed. This implies that, when
the function was called, a reference was taken -- we don't
want the event to be finalized during the operation, after
all.
The problem is that the reference was never taken.
Fix that by properly owning a reference to the event when
removing it, and dropping it when the removal is finished.
Issue: #268
2018-04-30 21:26:03 -03:00
Georges Basile Stavracas Neto
91fdf1783b
event: improve documentation for gcal_event_is_multiday
...
Add some examples, so I can remember them in a few days from
now.
2018-04-30 20:45:01 -03:00
Georges Basile Stavracas Neto
bedc98b192
event: fix multiday check
...
Checking if an event is multiday is currently broken
because g_date_time_difference() returns raw time spans,
and that value means "there is 24h of difference between
these dates", when what we're looking for is "how many
days are between these two dates".
To fix that, use the GDate API instead of GDateTime.
2018-04-30 19:31:01 -03:00
Andrea Azzarone
9d0b44d4e3
view: Auto disconnect weather-changed signal handler
...
Use g_signal_connect_object in order to auto disconnect the weather-changed
signal handler when the view object is finalized.
https://gitlab.gnome.org/GNOME/gnome-calendar/issues/271
2018-04-11 17:45:02 +02:00
Rafal Luzynski
e6483e96e2
utils: Use nominative/genitive month names correctly
...
These changes are needed since the standalone (nominative) vs. full date
format (genitive) month names support has been introduced in Linux with
glibc 2.27. They are also supported in *BSD systems.
See also:
https://bugzilla.gnome.org/show_bug.cgi?id=749206
https://sourceware.org/bugzilla/show_bug.cgi?id=10871
https://gitlab.gnome.org/GNOME/gnome-calendar/issues/125
2018-03-05 15:57:03 -03:00
Georges Basile Stavracas Neto
a8350555da
event: trivial cleanups
2018-02-27 14:57:20 -03:00
Georges Basile Stavracas Neto
3b860ece2e
utils: add autoptr support to ECalComponent
2018-02-26 23:18:10 -03:00
Georges Basile Stavracas Neto
1234dd8292
manager: small cleanup
...
Use g_clear_pointer()
2018-02-23 15:48:15 -03:00
Elias Entrup
5f4c5f5cbe
event-widget: Handle NULL in event sorting
...
The application crashes when e_cal_component_get_last_modified
returns NULL which is used for sorting events.
2018-02-11 23:30:34 +00:00
Iñigo Martínez
11fb4717a2
tests: Fix GCalManager test
...
The unit test that checks GCalManager test fails due to missing
schemas.
This patch allows schemas to be compiled in the build tree and also
sets the environment variables so tests can found them and run
properly.
Additional code and testing from Mohammed Sadiq <sadiq@sadiqpk.org >
2018-02-11 23:17:12 +00:00
Piotr Drąg
d9e306bb86
main: Mark g_set_application_name for translation
...
According to [1], it should be marked for translation.
[1] https://developer.gnome.org/glib/stable/glib-Miscellaneous-Utility-Functions.html#g-set-application-name
2018-02-05 17:19:41 +01:00
Georges Basile Stavracas Neto
c60a881ca3
event: Use G_DEFINE_QUARK
2018-01-30 02:07:47 -02:00
Georges Basile Stavracas Neto
503191377f
application: More code style cleanup and reorganization
2018-01-30 01:30:59 -02:00
Georges Basile Stavracas Neto
ab259fe57b
date-selector: Use parameter specs to declare properties
2018-01-30 01:10:43 -02:00
Georges Basile Stavracas Neto
f83826515e
edit-dialog: Use parameter specs to define properties
2018-01-30 01:10:25 -02:00
Georges Basile Stavracas Neto
f3b4f68bf0
event: Use parameter specs to declare properties
2018-01-30 01:10:08 -02:00
Georges Basile Stavracas Neto
8892c31379
week-view: Remove embarrassing debug message
2018-01-28 12:50:04 -02:00
Georges Basile Stavracas Neto
09b986f526
quick-add-popover: Only remove existing rows
...
We can receive the source-changed signal on read-only sources,
and these sources have no row associated. Trying to remove the
non-existing row would yield a warning.
2018-01-28 12:45:57 -02:00
Georges Basile Stavracas Neto
f698981aa8
application: Improve order of statup
...
This commit makes sure that logging is set before
actually logging anything. It also sychronizes the
application startup with the manager startup.
2018-01-28 12:39:13 -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
58b3340736
window: Remove dead code
...
An unused variable and a binding to a non existing property
2018-01-28 11:17:50 -02:00
Georges Basile Stavracas Neto
7364d8bf29
manager: Handle refresh in the source directly
...
Instead of implementing code to refresh sources, let's just
use the ESourceRefresh extension and let Evolution handle that.
2018-01-28 10:43:48 -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
30ba757c40
utils: Cleanup first weekday function
2018-01-28 09:59:08 -02:00
Georges Basile Stavracas Neto
3873b3b5bb
shell-search-provider: Remove dead fixme
2018-01-28 09:56:17 -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
79987734cd
enums: Generate enums with standard GLib syntax
2018-01-28 02:30:07 -02:00
Georges Basile Stavracas Neto
c7f6fd19c4
project: Move enums to gcal-enums.h
2018-01-28 00:44:36 -02:00
Georges Basile Stavracas Neto
71e9c3e0c7
shell-search-provider: Instrument and modernize code
2018-01-28 00:27:56 -02:00
Georges Basile Stavracas Neto
0bfc6fe291
shell-search-provider: Rework property initialization
2018-01-28 00:13:15 -02:00
Georges Basile Stavracas Neto
9424d8f3cc
weather-settings: Only deserialize valid locations
2018-01-27 23:32:21 -02:00
Georges Basile Stavracas Neto
fe53414b07
weather-settings: Instrument more loading functions
2018-01-27 23:27:25 -02:00
Georges Basile Stavracas Neto
a7aa997ac3
weather-service: Remove more dead code
2018-01-27 23:27:03 -02:00
Georges Basile Stavracas Neto
c4ca9cac3c
project: Rename GcalSearchView to GcalSearchPopover
...
This was never a view, but a popover.
2018-01-27 23:02:36 -02:00
Georges Basile Stavracas Neto
1dcf0d1f24
project: Unify headers
2018-01-27 22:35:20 -02:00
Georges Basile Stavracas Neto
ac4f8feb15
weather-service: More small refactorings
...
Now it appears to be fully funcitonal again!
2018-01-27 22:26:30 -02:00
Georges Basile Stavracas Neto
718266f349
window: Bind manager to GcalWeatherSettings
...
A missing entry point from the previous refactorings
2018-01-27 22:25:57 -02:00
Georges Basile Stavracas Neto
50ec8fd30b
window: Notify properties by pspec
...
It avoids lookups on the class properties.
2018-01-27 22:25:32 -02:00
Georges Basile Stavracas Neto
6dc3d9ee39
weather-settings: Improve start/stop logic
2018-01-27 21:56:58 -02:00
Georges Basile Stavracas Neto
5dddff9939
weather-service: Fix debug location
...
This is tricking us into thinking the code is being
executed when in fact it's falling into the early return.
2018-01-27 21:56:14 -02:00
Georges Basile Stavracas Neto
5a651b01f8
window: Rework property initialization
...
There is a clear chain of properties that must be respected
in order to make Calendar initialize properly:
1. GcalManager, since it provider access to the settings
2. The initial date
3. GcalWeatherService, that depends on settings and the initial date
2018-01-27 21:46:15 -02:00
Georges Basile Stavracas Neto
5a0844c127
application: Remove conditional include
...
We always generate the config file nowadays.
2018-01-27 21:26:33 -02:00
Georges Basile Stavracas Neto
737181c655
application: Use g_auto* to simplify code
2018-01-27 21:11:08 -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
Georges Basile Stavracas Neto
ab20672aeb
weather: Move to a subdirectory
2018-01-27 15:24:32 -02:00
Georges Basile Stavracas Neto
a8d6bfea0b
month-popover: Properly mark static function as static
2018-01-27 14:30:31 -02:00
Georges Basile Stavracas Neto
702c089c17
weather-service: Simplify code
2018-01-27 14:30:02 -02:00