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
Georges Basile Stavracas Neto
09cd5d05cb
month-popover: sort events
2017-11-15 03:17:04 -02:00
Georges Basile Stavracas Neto
72b9b34235
month-view: win the fight against the sizing machinery
...
We can now guarantee that the month cells unconditionally get
their desired allocations, but the event widgets are only created
when necessary.
I won.
2017-11-15 02:31:03 -02:00
Georges Basile Stavracas Neto
eff50668d4
month-view: introduce new overflow popover window
...
This ~almost~ implements a perfectly semantic transition (which
is kinda impossible now).
2017-11-15 02:03:26 -02:00
Georges Basile Stavracas Neto
8d6785b6f7
month-view: implement a different hiding algorithm
...
As if the previous one wasn't crazy enough :(
2017-11-13 19:27:55 -02:00
Georges Basile Stavracas Neto
b4cc36b344
month-view: fight the sizing machinery even harder
...
Make sure something changed in child widgets AND events,
otherwise just top allocating at all.
2017-11-13 17:06:38 -02:00
Georges Basile Stavracas Neto
31409b6e44
month-view: improve layout algorithm
...
Multiday event handling was a mess, and still it. But this commit
makes it at least layout things correctly.
It's not perfect, though; This commit brought back that terrible
allocation cycle issue, since we're showing and hiding events in
size-allocate.
2017-11-13 14:23:35 -02:00
Georges Basile Stavracas Neto
2c9f7e2041
month-view: reorganize header
2017-11-13 12:44:04 -02:00
Georges Basile Stavracas Neto
86b565a817
month-view: Improve code readability
...
No real changes except code reorganization and refactoring, just
to make it a little bit less painful to read and maintain.
2017-11-13 12:40:45 -02:00
Georges Basile Stavracas Neto
2a11959bdd
month-cell: show +X in overflow label
...
Instead of "Other X Events".
2017-11-11 18:15:18 -02:00
Georges Basile Stavracas Neto
b5ad149261
month-cell: improve calculation of header box height
...
Should also consider the top and bottom margins.
2017-11-11 18:15:02 -02:00
Georges Basile Stavracas Neto
4dd4c2410f
month-cell: Move day label to top, split from overflow
2017-11-11 17:48:59 -02:00
Georges Basile Stavracas Neto
5977eeefc8
month-cell: only update label when date changes
...
If the date is the same, we don't need to update the label.
This might cause an infinite resize loop.
2017-10-31 01:11:26 -02:00
Georges Basile Stavracas Neto
907e55ccbe
month-view: remove reminescent dnd code
...
Month view does not manage Drag n' Drop anymore, but
this code was left behind by accident.
2017-10-31 01:00:15 -02:00
Georges Basile Stavracas Neto
1e54c9db12
month-view: only idle add month cell update when necessary
2017-10-31 00:34:45 -02:00
Georges Basile Stavracas Neto
523609f2c0
month-view: always update month cells in idle
...
This way, we can schedule the multiple resizing queueing
operations to after the size-allocate phase is over.
2017-10-29 19:05:42 -02:00
Georges Basile Stavracas Neto
3411dbb13d
month-view: don't outsmart GTK resizing machinery
...
If we need to resize, then let's just accept we need to
resize the month view (event if that's an expensive
operation) and do the resizing.
This fixed many minor annoyances like invisible overflow
labels, on-the-fly text direction changes, etc.
2017-10-07 11:40:48 -03:00
Georges Basile Stavracas Neto
ff9c663c8c
month-view: only update selection if there's a start date
...
We can potentially not have an end date set, but there's always
a start date. If there isn't, it means the user clicked from
outside of month view, or at an invalid cell, in which cases we
shouldn't display the quick add popover anyway.
2017-10-07 11:20:23 -03:00
Georges Basile Stavracas Neto
df40a4d8bf
month-view: don't hide month view when dragging from popover
2017-10-07 11:01:32 -03:00
Georges Basile Stavracas Neto
37fb5e8492
month-view: fix event positioning on RTL locales
...
We have to pick the mirrored column index on RTL locales.
2017-10-06 21:23:05 -03:00
Georges Basile Stavracas Neto
e59910f0e9
month-view: rewrite was a template widget
2017-10-06 20:32:00 -03: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
f486569e19
week-grid: improve positioning code
2017-09-14 13:31:04 -03:00
Georges Basile Stavracas Neto
25e5e9ecc1
view: don't add time headers in event lists
...
Nowadays, GcalEventWidget draws the time by itself. This
makes adding a time header pretty much useless.
Fix this double information by removing the time headers
from event listboxs.
2017-09-14 13:26:28 -03:00
Georges Basile Stavracas Neto
a853376629
event-widget: turn into a GtkBin subclass
...
The current GcalEventWidget implementation is a direct
GtkWidget subclass, which means we have to take care of
all the implementation details such as raising GdkWindows
and managing the drawing all by ourselves.
The event widget, however, can be easily described through
a GtkBuilder file. This would simplify the implementation
and makes us maintain less code.
Fix that by making GcalEventWidget a GtkBin subclass.
2017-09-14 13:26:28 -03:00