Georges Basile Stavracas Neto
e897f38eee
week-header: simplify event addition
2016-12-08 03:09:35 -02:00
Georges Basile Stavracas Neto
7e68588cfb
week-header: rework drawing model
2016-12-08 03:09:35 -02:00
Georges Basile Stavracas Neto
f50a258f05
week-header: fix initial overflow check
2016-12-08 03:09:35 -02:00
Georges Basile Stavracas Neto
1c48d0a543
week-header: fix date handling
2016-12-08 03:09:35 -02:00
Georges Basile Stavracas Neto
e5407d8c72
week-grid, week-header: special-case today when drawing
...
The week grid should display a horizontal strip on the today
column, and the week header should draw the week day labels
with a custom color.
2016-12-08 03:09:35 -02:00
Georges Basile Stavracas Neto
1c048fb538
week-grid, week-header: improve rendering of vertical lines
2016-12-07 22:56:10 -02:00
Georges Basile Stavracas Neto
336e584099
week-grid: implement event handling
...
This is the glorious commit where Week grid starts
showing and handing events.
2016-12-07 21:31:30 -02:00
Georges Basile Stavracas Neto
29ad51b19a
project: introduce GcalRangeTree
...
In order to correctly implement the week grid, we must
have a fast and optimized data structure to handle date
intervals.
This commit introduces, then, GcalRangeTree. The range tree
is an augmented AVL tree designed to handle intervals (i.e.
ranges) rather than single-dimensional keys.
It is a very good struct since common operations like insert
and removal are O(log n). It also is optimized for the ranges
we work on, so the nodes only take up the absolutely minimum
space required.
2016-12-07 21:27:25 -02:00
Georges Basile Stavracas Neto
c93d634454
week-view: add events to the grid when needed
2016-12-07 17:02:47 -02:00
Georges Basile Stavracas Neto
8a9a58419a
week-grid: add stub add_event() and remove_event()
2016-12-07 17:02:14 -02:00
Georges Basile Stavracas Neto
54ff4eefc3
week-header: reimplement header expansion and collapsing
2016-12-03 01:40:10 -02:00
Georges Basile Stavracas Neto
4a7754c677
week-header: fix merging events
2016-12-03 00:04:06 -02:00
Georges Basile Stavracas Neto
adc4bbae9e
week-header: simplify event removal
2016-12-02 21:05:54 -02:00
Georges Basile Stavracas Neto
e6ccc0e6e4
week-header: lots of cleanups and fixes
...
I'm simply too tired to split them off in separate commits,
so let me explain here. This commit:
* Remove debug messages
* Fixes many off-by-n and const-mistakes
* Simplifies the code
2016-12-02 18:22:49 -02:00
Georges Basile Stavracas Neto
922e7ce542
week-header: remove unecessary code
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
18b788c997
week-header: rename function
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
ab50b0d039
week-header: rewrite event moving method
...
This method could've avoided an infinite loop case all this time,
and I didn't realize it.
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
1903474ca6
week-header: make event removal more robust
...
The current code does not move the remaining events up and,
when changing the week header various times, it ends up
showing completely bogus events at bogus positions.
Fix that by properly moving events up when removing them.
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
392c310f55
week-header: refactor event moving
...
Instead of passing the position of the widget in the
UI, pass the position of the widget in the model.
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
3b885d2874
week-header: fix style
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
2bc8f85ce8
week-header: simplify and extend moving column events
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
de36d449ed
week-header: don't allow negative widths
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
92ba507b9e
week-header: implement merging of consecultive events
...
When an event is placed in the same row consecultively, we must
guarantee that it's only one widget.
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
bb0e927fc2
week-grid: style cleanup
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
f4f2527e69
week-header: remove unused code
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
6e318f3463
week-header: start moving to use another event storage
...
Instead of using a single, giant GList to store all the available
events, use an array of sorted GLists.
This commit adds temporary debug messages, beware the huge output.
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
c66029d49f
window: fix week view range
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
1cf46abfed
week-view: don't set the subscriber range twice
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
2e7c6c8c58
week-header: visual improvements
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
12da2c44e7
week-view: improve drawing of the week grid
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
39076d1aaf
style: update hour sidebar padding
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
16a2d64874
week-header: simplify background drawing code
...
By moving the drawing area to a separate place, we're
able to avoid having to manually calculate the sidebar
width.
Also, because we can, the drawing code was simplified a
little bit by moving the bottom border to CSS.
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
2298379e51
week-header: reorganize widgets
...
Instead of a box inside the overlay, put the overlay inside the
box.
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto
154a01f4c1
week-view, week-grid: various fixed
...
This commit is a rebase, compile-warning remover and a
misbehaviour fixer too.
2016-12-01 23:48:53 -02:00
pandusonu2
a94a15ebba
window: add week-view shortcut
...
Add the shortcut to switch between views to the week-view
2016-12-01 23:48:53 -02:00
pandusonu2
b51f8c3ca6
week-grid: realize the week-grid
...
Activate the week-grid by writing the necessary realize, unrealize, map and unmap functions
2016-12-01 23:48:53 -02:00
pandusonu2
e16426db05
week-header: correct padding and drawing
...
Correct the padding for the expand button, to set some space between the button and the border.
Remove the extra code which results in drawing of an additional line.
2016-12-01 23:48:53 -02:00
pandusonu2
97ed5267e2
week-view: fix the sync between sidebar width
...
Fix the width of the sidebar sync between the week view and week header.
2016-12-01 23:48:53 -02:00
pandusonu2
4fde7e369d
week-header: remove unnecessary code and correct access of public functions
...
Remove code of functions which are no longer being used. Also corrected a few public functions and made them private as they won't be used.
2016-12-01 23:48:53 -02:00
pandusonu2
680f220fb2
week-view: draw the hours labels
...
Draw the hour labels in the sidebar of the week grid.
2016-12-01 23:48:53 -02:00
pandusonu2
4b1ff14b6a
week-header: work around with GtkOverlay error
...
Using the height request function to fix the error with height allocation of GtkOverlay widget.
2016-12-01 23:48:53 -02:00
pandusonu2
7927d3b11f
week-header: add support for expanded and collapsed mode
...
Add the expand button and the functions require to expand and collapse the header.
2016-12-01 23:48:53 -02:00
pandusonu2
d6ef05b31d
week-header: adjust theming to match the mockups
...
Set correct font weight, size and draw lines where required.
2016-12-01 23:48:53 -02:00
pandusonu2
4544b39b47
week-header: sort events before placing them
...
Sort the events based on multiday/single day, start date and duration.
2016-12-01 23:48:53 -02:00
pandusonu2
175d22e9ef
week-header: reposition present events on changing active date.
...
When an event lasts beyond the active week, the event placement doesn't change on changing the week.
We removed all the present events and added them to the list of events to be added to reposition them.
2016-12-01 23:48:53 -02:00
pandusonu2
665f91701b
week-header: set correct padding for the grid
...
Set the margin top, left, and right for the grid, according to the mockups.
2016-12-01 23:48:53 -02:00
pandusonu2
62d8fdc057
week-header: manage event display, position and removal
...
Manage the displaying, positioning and removal of events in the week-header.
2016-12-01 23:48:53 -02:00
pandusonu2
0a53f1440e
week-header: set line width and height as in mockup
...
Set the divider line width and height to match the mockup.
2016-12-01 23:48:53 -02:00
Georges Basile Stavracas Neto
a43df17b08
week-header: turn into a GtkGrid
...
If the header is a GtkScrolledWindow, all the content
(including the top labels and week names) are scrolled.
This is a wrong behavior, since only the events should
be scrollable.
Fix that by making GcalWeekHeader a GtkGrid, and adding
the scrolled window in the correct position.
2016-12-01 23:48:53 -02:00
pandusonu2
61f25b78db
week-header: override the size_allocate()
...
Override the size_allocate() widget function to set proper alignment for the grid.
2016-12-01 23:48:53 -02:00