Georges Basile Stavracas Neto
a799678f68
event: rewrite timezone support
...
Now with something that hopefully works.
https://gitlab.gnome.org/GNOME/gnome-calendar/issues/43
https://gitlab.gnome.org/GNOME/gnome-calendar/issues/302
2018-09-14 20:16:54 -03:00
Georges Basile Stavracas Neto
cfa8794313
manager: Move GcalClock to GcalApplication
...
GcalManager is basically an object that is shared
among classes that need to modify calendars, while
GcalClock is just a wall clock implementation.
Move it to GcalApplication, so that objects without
access to GcalManager can still access the clock.
2018-05-04 21:37:53 -03:00
Georges Basile Stavracas Neto
df7216f2f5
month-popover: don't be so small
...
This commit limits the month popover at least
250px wide. To make it actually usable.
2018-05-01 20:29:57 -03:00
Georges Basile Stavracas Neto
1da2151bb9
month-popover: popdown when adding new event
2018-05-01 20:29:36 -03:00
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
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
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
Georges Basile Stavracas Neto
a8d6bfea0b
month-popover: Properly mark static function as static
2018-01-27 14:30:31 -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
61b9ba85a2
month-view: cleanup includes
2017-12-16 23:52:06 -02: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
dcf4ff0bda
views: more weather service cleanups
...
Did I ever say how happy I'll be when people start
actually following my code style when densing code
to my projects?
2017-12-16 22:36:39 -02:00
Georges Basile Stavracas Neto
d283316382
views: simplify reference leak workaround
...
Oh so many unecessary casts =(
2017-12-16 21:49:22 -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
Georges Basile Stavracas Neto
c306bbc1ef
month-view: properly cleanup weather data from cells
2017-12-16 21:34:31 -02:00
Georges Basile Stavracas Neto
b70f3fa0b6
month-view: fix another allocation cycle
2017-12-12 11:06:46 -02:00
Georges Basile Stavracas Neto
d2dea218ae
view: pass the correct property value
...
It should be a pointer to a GcalWeatherService, not a pointer
to a pointer to a GcalWeatherService.
2017-12-12 11:06:07 -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
d13473d3bc
year-view: Show weather reports.
...
This view is not ref-counted correctly. I use the same
workaround to avoid runtime errors as for month views.
2017-12-11 22:06:54 -02:00
Florian Brosch
67f3a2057e
month-cell: Display temperatures
2017-12-11 22:06:52 -02:00
Florian Brosch
e9e403ce7a
month-view: Show weather reports.
...
This commit triggers two existing issues:
1. window size calculation
(this breaks month-cells)
2. wrong reference counts in views
(I use :destroy to avoid dangling pointers)
2017-12-11 21:54:55 -02:00
Florian Brosch
759e6ef0b1
week-header: Rename WeatherInfoPos to WeatherInfoDay and drop positions.
2017-12-11 21:38:08 -02:00
Florian Brosch
660e1c6178
Avoid single line comments.
2017-12-11 21:38:08 -02:00
Florian Brosch
f0fa9eca70
week-header: Properly handle weather infos on date changes
2017-12-11 21:32:01 -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
1f3173823b
weather: Integrate weather into our main windows.
2017-12-11 21:29:31 -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
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
f8ce4937c2
month-view: move variables around
...
Just to make it clear that these variables are only used when
we really need to reprocess the event widgets.
2017-11-25 11:43:52 -02:00
Georges Basile Stavracas Neto
63f3078a80
week-grid: don't try to optimize allocation
...
This is making the week grid miss some valid reallocation
cases.
2017-11-25 11:43:52 -02:00
Georges Basile Stavracas Neto
e73240bc9a
trivial: style fix
2017-11-21 20:13:28 -02:00
Georges Basile Stavracas Neto
e34964802c
month-view: remove unused variable
2017-11-21 20:13:28 -02:00
Georges Basile Stavracas Neto
bb2566dab8
month-view: hide last row if it's empty
...
This can make it put up to 5 events in my 1366x768 screen!
\o/
2017-11-19 12:29:29 -02:00
Georges Basile Stavracas Neto
0f1a8c93f2
month-view: fix hiding event widgets when removing
2017-11-19 12:18:32 -02:00
Georges Basile Stavracas Neto
1f1e351c47
month-view: remove useless field
...
This also fixes the bug where changing the text
direction doesn't reposition the event widgets.
2017-11-19 12:11:02 -02:00
Georges Basile Stavracas Neto
2e750b69e5
month-view: reorganize code
...
This is another major reorganization of the Month view's
allocation code. The goal is not to reduce the number
of lines, but to make them readable and maintainable.
During this reorganization, multiple bugs that were never
hit were ironed out! That itself would be a major win, but
since the code is actually more readable, we can expect
more improvements from now on.
2017-11-19 12:05:52 -02:00
Georges Basile Stavracas Neto
192e860edc
trivial: style fix
2017-11-18 21:57:25 -02:00
Georges Basile Stavracas Neto
9fa9de2df7
month-view: use a custom structure to help multiday allocation
...
Instead of using 3 different, barely synchronized arrays. This
makes the code easier to read, and is more semantic too.
2017-11-18 21:57:25 -02:00
Günther Wutz
b83b2b4e46
month-popover: typo fix in comment
2017-11-16 17:14:25 -02:00
Georges Basile Stavracas Neto
34d20a07ec
month-popover: remove leftover comment
2017-11-15 21:04:46 -02:00
Georges Basile Stavracas Neto
4d23949a99
month-view: properly update today mark
...
https://bugzilla.gnome.org/show_bug.cgi?id=775103
2017-11-15 20:15:28 -02:00
Georges Basile Stavracas Neto
54839efbf4
month-view: fix rtl
...
This removes much of the subtle complexities of the size allocation
function in month view, and finally delivers a readable and working
implementation of the month view.
This also introduces a small code refactoring, and fixes clicking
on a cell on RTL.
2017-11-15 19:03:10 -02:00