Commit Graph
1817 Commits
Author SHA1 Message Date
Florian Brosch 91ec4990ab weather: Use shorter timeouts if local weather info is invalid 2017-12-11 21:38:06 -02:00
Florian Brosch 50e675da05 timer: Improve duration api
- rename duration setter
- add duration getter
2017-12-11 21:34:23 -02:00
Florian Brosch 5475df20c6 weather: Set check-interval-renew to 3h. 2017-12-11 21:34:22 -02:00
Florian Brosch 2a0a6064aa weather: Rename check-interval to check-interval-renew.
In preparation for check-interval-new.
2017-12-11 21:33:47 -02:00
Florian Brosch 83d6eaef9a weather: Introduce a proper timer for forecasts. 2017-12-11 21:32:01 -02:00
Florian Brosch 72dc615bfd weather: Drop gcal_weather_service_get_location_name() 2017-12-11 21:32:01 -02:00
Florian Brosch 9d4bf09ca7 weather: Use find_nearest_city instead of new_detached 2017-12-11 21:32:01 -02:00
Florian Brosch 12da918357 window: Improve weather setting sensitivity 2017-12-11 21:32:01 -02:00
Florian Brosch f4f0c3a38d window: Set style class "error" for invalid locations 2017-12-11 21:32:01 -02:00
Florian Brosch f0fa9eca70 week-header: Properly handle weather infos on date changes 2017-12-11 21:32:01 -02:00
Florian Brosch d1ee082142 weather: Re-use old weather predictions on errors 2017-12-11 21:32:00 -02:00
Florian Brosch eb3e4a4078 Synchronise weather on application.sync. 2017-12-11 21:29:33 -02:00
Florian Brosch 75fc1f41e6 weather: steal a data point from tomorrow in case there is none for "today".
This commit also improves night/day icon selection.
2017-12-11 21:29:33 -02:00
Florian Brosch 2cbdba9a95 weather: Display service attributions in AboutDialog.
Note that this injects strings we can't translate.
2017-12-11 21:29:33 -02:00
Florian Brosch a188c68653 week-header: Style temperatures 2017-12-11 21:29:33 -02:00
Florian Brosch 30297f084d weather: week: Add space between icon and temperature 2017-12-11 21:29:33 -02:00
Florian Brosch a58047257b weather: Use -night icons only for fold-results when it makes sense. 2017-12-11 21:29:33 -02:00
Florian Brosch b1b5cf2d73 weather: Change weather icon selection heuristic.
The original version used conditions as key. This does
not work out for all providers. They might return no
value while gweather derives icons from other fields.
2017-12-11 21:29:33 -02:00
Florian Brosch 1f3173823b weather: Integrate weather into our main windows. 2017-12-11 21:29:31 -02:00
Florian Brosch 950a2cda8f weather: Pin weather services to applications. 2017-12-11 21:25:16 -02:00
Florian Brosch 4ffbf68b23 week-header: Add initial weather support.
This is still work in progress. API is stable but presentation
is not. It also contains some LOCs for unfinished mouse-over and
click-events.
2017-12-11 21:23:20 -02:00
Florian Brosch d701f2c7a6 weather: Add optional reading point logging 2017-12-11 21:23:20 -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
Florian Brosch c5c832241e Weather: Change weather update signal. 2017-12-11 21:23:20 -02:00
Florian Brosch 0248cf918e weather: Rename WeatherInfo.weather_info to gweather_info
This should make next commit less confusing.
2017-12-11 21:23:19 -02:00
Florian Brosch 45d365ff42 weather: Improve weather folding 2017-12-11 21:23:19 -02:00
Florian Brosch 0c51e061e2 weather: Improve logging 2017-12-11 21:23:19 -02:00
Florian Brosch 30612fee5c weather: Add a TODO
We should switch to a async version of geocode_reverse_resolve.
2017-12-11 21:23:19 -02:00
Florian Brosch 8d85af0960 weather: Prepare global time zone support.
This patch allows to change time-zones for
weather reports.
2017-12-11 21:23:19 -02:00
Florian Brosch 13342ac82e weather: Properly extract and translate weather information.
Completes commit 98cc78d6de66fc3a79abd9148ba03e9b21f89fb1.
2017-12-11 21:23:19 -02:00
Florian Brosch d7c9e70c31 weather: Simplify and inline property param flags 2017-12-11 21:23:19 -02:00
Florian Brosch 17af30b19c weather: Allow to set a fix location. 2017-12-11 21:23:19 -02:00
Florian Brosch 83bec27ad5 Initial weather service.
This commit introduces two new classes:

 1. GCalWeatherService
 2. GCalWeatherInfo

GcalWeatherservice picks-up the current location and periodically
fetches weather reports represented by GcalWeatherInfo.

The weather part is not complete yet.
2017-12-11 21:23:19 -02:00
Guenther Wutz 0f6efd8668 utils: reworked uri splitting with help of libsoup
Currently we split a URI string with a Regex which is error prone. As
libsoup already provides a facility to parse a URI into its parts
we should use this instead. Therefore our utility method is not necessary anymore.
2017-12-11 20:08:09 +01:00
Mohammed Sadiq f1a8aaed5f window: Simplify navigation code
Using <accelerator> in GtkBuilder can simplify lots of C code.
2017-12-06 21:40:15 +05:30
Mohammed Sadiq fd3cb3e9b5 window: Reuse window-state-changed callback
window-state-changed signal is already handled in window_state_method.
It is better not to override it again in class_init function.
2017-12-06 21:40:15 +05:30
Mohammed Sadiq 75ad9228f6 window: Simplify saving/loading window states
Follow https://wiki.gnome.org/HowDoI/SaveWindowState

* Use tuples in gsetting schema to save size and position
* Save changes to variable instead of saving to gsettings after every timemout
* Save the changes back to gsettings when the window is finalized.
2017-12-06 19:16:40 +05:30
Georges Basile Stavracas Neto 06f4a5b182 Merge branch 'mcatanzaro/leak' into 'master'
event: Fix a minor leak

See merge request GNOME/gnome-calendar!6
2017-12-06 11:04:02 +00:00
Georges Basile Stavracas Neto 89e90fec6d Merge branch 'wip/mcatanzaro/timezone' into 'master'
Events created in month or year view are created with incorrect time and missing timezone

Closes #168

See merge request GNOME/gnome-calendar!7
2017-12-06 10:45:42 +00:00
Georges Basile Stavracas Neto 276ecef0eb Merge branch 'wip/mcatanzaro/tooltips' into 'master'
event-widget: Fix time in tooltip text

Closes #225

See merge request GNOME/gnome-calendar!8
2017-12-06 10:40:51 +00:00
Michael Catanzaro 0724d4092e event: Save local time correctly
The old code here was not setting tzid correctly. It me took hours to
figure out how to do this, but it turned out to be simple once I found
the right place, buried deep in the e-d-s source code.

Now, ideally we would not change the timezone of the event every time we
edit it. But some big changes in how GNOME Calendar tracks timezone are
going to be required if we do that. In particular, I believe we would
have to stop saving all day events in UTC, and give up on using
GDateTime as we do now, and track timezone completely separately
everywhere using icaltimezone. This is what e-d-s does, and it's
probably what we should be doing too. But that would be a big change.
This commit solves the basic problem, which is to ensure the event is
scheduled for the right time, regardless of timezone.

This finally completely fixes #168.
2017-12-05 21:54:39 -06:00
Michael Catanzaro a7304ed9b0 event: Restore handling of all day events
This brings back the original handling of all day events that we had
before I reverted the previous commit.
2017-12-05 21:54:39 -06:00
Michael Catanzaro 281ed44f1c Revert "event: correctly store timezones"
This reverts commit ce2c955269.

This commit is not right. Lots of code in Calendar relies on being able
to set the timezone of a GcalEvent, and this results in us always
ignoring the timezone set by Calendar in preference to whatever happened
to be in the ECalComponentDateTime previously. That might not be so bad,
but additionally, the time is not adjusted accordingly, so this actually
results in the time of events changing unexpectedly from what Calendar
is trying to set.

The code to explicitly store UTC times for all day events is OK (I
guess) and will be restored in a subsequent commit.
2017-12-05 21:54:39 -06:00
Michael Catanzaro 1d8a164634 event: Fix changing the timezone
g_date_time_equal() corrects for timezone offsets to ensure that, e.g.,
6 AM CST is treated as equal to 12 PM UTC. This means attempts to change
the start and end times of events to the same time in another timezone
are currently failing. We need to remove this attempt at optimization
because it prevents gcal_event_set_timezone() from ever doing anything.
2017-12-05 21:53:00 -06:00
Michael Catanzaro 8740ca2df1 event-widget: Fix time in tooltip text
The tooltips think all events start and end between 1:00 and 1:59,
because we are missing a % in the format string and the I looks like 1.

I like it when bugs turn out to be easy. Fixes #225.
2017-12-05 21:50:32 -06:00
Georges Basile Stavracas Neto bbbabecc58 Merge branch 'master' into 'master'
Add <Ctrl>+f shortcut to activate search bar.

See merge request GNOME/gnome-calendar!5
2017-12-05 23:13:44 +00:00
Michael Catanzaro ce8e8c217e edit-dialog: Fix timezone for events created in month view
In month view, when clicking on a day of the month, every event is
initially an All Day event until the user opens the Edit Details dialog
and unchecks the checkbox. This means that the event is originally
created in UTC time, and needs to be explicitly switched to local time.
2017-12-05 16:28:18 -06:00
Michael Catanzaro 2cca96c349 event: Fix a minor leak 2017-12-05 13:36:29 -06:00
George Willian Condomitti 7c2ca40f0b window: Add <Ctrl>+f shortcut to toggle search bar.
[221]
2017-12-04 16:04:41 -02:00
Georges Basile Stavracas Neto 8c4a0ca613 event-widget: always hide color box on vertical events
Otherwise we get weird borders on Week view.
2017-12-01 11:26:59 -02:00