Georges Basile Stavracas Neto
7e53c433b7
week-view: center grid on date change
2016-12-08 19:14:03 -02:00
Georges Basile Stavracas Neto
c1ab1c2d3b
week-header, week-grid: remove duplicate code
2016-12-08 18:53:34 -02:00
Georges Basile Stavracas Neto
7a6ca3d711
week-view: simplify code
2016-12-08 18:34:06 -02:00
Georges Basile Stavracas Neto
b8a297fdde
week-header: small ui fix
...
Add 2px at the bottom so events don't overlap with the
bottom line.
2016-12-08 18:31:01 -02:00
Georges Basile Stavracas Neto
36f716ebf4
week-view: reimplement editing events
2016-12-08 18:23:25 -02:00
Georges Basile Stavracas Neto
5238e6ff9d
week-header: don't rearrange events if week didn't change
2016-12-08 17:50:30 -02:00
Georges Basile Stavracas Neto
f98a465612
week-header: don't set a minimum content height
2016-12-08 16:40:00 -02:00
Georges Basile Stavracas Neto
f7658bede2
week-header: fix various issues with dates
...
When breaking and merging event widgets, the start
and end dates must be updated to reflect the current
widget state.
2016-12-08 16:39:02 -02:00
Georges Basile Stavracas Neto
e474ac1902
week-header: redraw the whole background on draw()
2016-12-08 16:21:08 -02:00
Georges Basile Stavracas Neto
6e3b4a5f04
week-header: don't leak overflow labels when expanded
2016-12-08 16:20:10 -02:00
Georges Basile Stavracas Neto
21c9f721ae
week-header: properly propagate height when expanded
2016-12-08 16:10:46 -02:00
Georges Basile Stavracas Neto
3f4715fd4a
week-header: batch fix overflow management
...
It's getting close to be completely working.
2016-12-08 16:04:07 -02:00
Georges Basile Stavracas Neto
13906a3000
week-header: fix all-day events, add comments
2016-12-08 16:00:39 -02:00
Georges Basile Stavracas Neto
74ac2d83ee
week-view: fix active and current date handling
...
The active date is the visible date, while the current date
is today. We shouldn't confuse those two.
2016-12-08 14:18:37 -02:00
Georges Basile Stavracas Neto
6fc89fb626
week-header: remove needless margin
2016-12-08 03:14:40 -02:00
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
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
Georges Basile Stavracas Neto
591d8af5e4
theme: add a nice transition on the month chooser widget
2016-10-03 19:56:42 -03:00
Georges Basile Stavracas Neto
65c619b433
edit-dialog: also set top and bottom margins
...
It looks like the cursor at the "Notes" section of the
edit dialog has no vertical space to breath, and it's
a little bit annoying as it runs away from the expected
position.
Fix that by adding a small margin at the top and the bottom
of the text view at the "Notes" section.
2016-10-03 19:37:08 -03:00
Georges Basile Stavracas Neto
6967c520c9
manager: make all calendars offline-sync
...
This prevents downloading the same calendar (which can be huge)
over and over, saving us some bandwidth.
https://bugzilla.gnome.org/show_bug.cgi?id=764623
2016-10-03 14:10:45 -03:00
Georges Basile Stavracas Neto
3d3dddf815
manager: avoid deep nesting
...
Use an early return rather than deep nesting to improve the
code legibility.
https://bugzilla.gnome.org/show_bug.cgi?id=764623
2016-10-03 14:10:35 -03:00
Georges Basile Stavracas Neto
7d3cd7f727
month-view: queue redraw on scroll
...
If we scroll to a month that has no event widget to
display, the redraw is not dispatched and looks like
Calendar is broken.
Fix that by always queuing a redraw.
2016-10-02 08:19:19 -03:00
Georges Basile Stavracas Neto
050bdd37d2
Bump 3.22.1 release
2016-10-01 20:58:25 -03:00
Georges Basile Stavracas Neto
23cc46a01a
event: fix comparison if event is today
...
Since the end times are open-ended, we have to consider the very second
before the actual end time.
https://bugzilla.gnome.org/show_bug.cgi?id=772104
2016-10-01 20:43:37 -03:00
Georges Basile Stavracas Neto
159da57e46
quick-add-popover: always set seconds to 0
...
https://bugzilla.gnome.org/show_bug.cgi?id=772104
2016-10-01 20:35:48 -03:00
Georges Basile Stavracas Neto
e8dbe48baa
quick-add-popover: focus "Create" button after selecting an agenda
...
So that the keyboard flow is smooth and clean.
https://bugzilla.gnome.org/show_bug.cgi?id=770714
2016-10-01 20:15:14 -03:00
Georges Basile Stavracas Neto
152f6ff8b7
month-view: use G_DECLARE_FINAL_TYPE
...
Instead of using the old GLib boilerplate code, use the new
utilities and simplify the code a little bit. This also allows
us to remove the private field of month view.
2016-10-01 19:56:01 -03:00
Georges Basile Stavracas Neto
a2edfd48b6
subscriber-view: add an autoptr cleanup function
...
So that we can use G_DECLARE_{FINAL,DERIVABLE}_TYPE() utility macros.
2016-10-01 19:54:54 -03:00
Georges Basile Stavracas Neto
62aa66b8da
year-view: implement scrolling to change year
...
Following the previous work on month view, this commit
implements scrolling capabilities to Year view. We do
this not only with the :scroll-event, but also using the
:edge-overshot signal of GtkScrolledWindow.
2016-10-01 19:16:18 -03:00
Georges Basile Stavracas Neto
eb7ad4959b
month-view: allow changing months with scrolling
...
It is very natural and intuitive to try and change the current date
by scrolling. The current implementation of the Month view, however,
blatantly ignores scroll events.
Fix that by hearing to the scrolling events and changing the month
when the scroll is enough.
2016-10-01 19:15:54 -03:00
Georges Basile Stavracas Neto
55b21874a7
event-widget: propagate scrolling event
...
When the event widget's GdkWindow receives an event scroll,
the event is lost because it doesn't handle it. It should,
however, propagate the scroll event so that the container
is able to properly parse it.
Fix that by making GcalEventWidget listen and propagate
scrolled events.
2016-10-01 18:32:24 -03:00
Georges Basile Stavracas Neto
81b178acff
search-view: fix segfault
2016-09-28 21:04:51 -03:00
Georges Basile Stavracas Neto
be3833b977
quick-add-popover: only increase day on single day events
2016-09-28 01:11:14 -03:00
Georges Basile Stavracas Neto
653fb86d16
quick-add-popover: fix single all-day events
2016-09-28 01:02:45 -03:00
Georges Basile Stavracas Neto
a8f4346e1c
edit-dialog: setup the correct label when selecting a calendar
...
Since now we manually manage the headerbar title and subtitle, setting
them via GtkHeaderBar API won't have any effect.
Fix that by directly setting the subtitle label.
https://bugzilla.gnome.org/show_bug.cgi?id=771565
2016-09-28 00:34:23 -03:00
Georges Basile Stavracas Neto
1e1452810e
quick-add-popover: only today events are timed
...
Everything else is all day.
https://bugzilla.gnome.org/show_bug.cgi?id=770713
2016-09-28 00:29:52 -03:00
Georges Basile Stavracas Neto
f1069c96d6
event: implement GInitable
...
Since the event creation can fail, lets make it a GInitable
so that we can fail during initialization.
https://bugzilla.gnome.org/show_bug.cgi?id=763166
2016-09-28 00:07:28 -03:00
Georges Basile Stavracas Neto
e79bdfb933
search-view: fix time label
...
We want to show "All day" when the event is all day, not
when it ~isn't~ all day.
https://bugzilla.gnome.org/show_bug.cgi?id=771677
2016-09-27 23:16:20 -03:00
Georges Basile Stavracas Neto
4582ade21d
edit-dialog: sync time and date widgets' sizing
...
So the time widgets don't grow over the date widgets and break
the vertical layout of the edit dialog.
https://bugzilla.gnome.org/show_bug.cgi?id=771440
2016-09-27 22:48:27 -03:00
Georges Basile Stavracas Neto
81873994da
views: protect against invalid drop
...
If the user tries to drop a e.g. file, GNOME Calendar crashes
immediately.
While the desired behavior would be checking if that's an ics file,
lets just not crash for now.
https://bugzilla.gnome.org/show_bug.cgi?id=771680
2016-09-27 22:41:17 -03:00
Georges Basile Stavracas Neto
10391ae6a9
manager: setup default calendar on event creation
...
When an event is successfully created, make that the default source.
https://bugzilla.gnome.org/show_bug.cgi?id=771570
2016-09-27 22:35:48 -03:00
Georges Basile Stavracas Neto
df13ac2a59
quick-add-popover: track default calendar
...
Update the selected calendar when the default one changes.
https://bugzilla.gnome.org/show_bug.cgi?id=771570
2016-09-27 22:30:11 -03:00
Georges Basile Stavracas Neto
dfdcb7c29c
manager: add ::default-calendar property
...
This property acts as a proxy to ESourceRegistry::default-calendar
and will be used by future patches to track when the default calendar
changes.
https://bugzilla.gnome.org/show_bug.cgi?id=771570
2016-09-27 22:28:59 -03:00
Georges Basile Stavracas Neto
97f8979c53
month-view: hide overflow popover on drag and drop
...
When the user starts a drag operation from the overflow popover,
it should hide itself, otherwise it can block dropping the event
below it. Currently, this is not what happens.
Fix that by making the overflow popover a drag and drop target,
and hide it when it detects drag movement.
https://bugzilla.gnome.org/show_bug.cgi?id=771663
2016-09-27 21:48:07 -03:00
Georges Basile Stavracas Neto
a76d40d290
quick-add-popover: only show writable calendars
...
There is no reason to display read-only calendars, since the
user can't add any events on it.
Fix that by only showing writable calendars.
https://bugzilla.gnome.org/show_bug.cgi?id=768324
2016-09-27 21:30:43 -03:00
Georges Basile Stavracas Neto
9da6896105
manager: remove unused ::source-activated signal
...
We're not using it anymore, no need to keep it here.
https://bugzilla.gnome.org/show_bug.cgi?id=768324
2016-09-27 21:29:49 -03:00
Georges Basile Stavracas Neto
3ef45ccf9f
quick-add-popover: focus the summary entry when shown
...
So the user can start typing right away.
2016-09-27 21:20:45 -03:00
Georges Basile Stavracas Neto
96626352d3
month-view: calculate popover events on a per-event basis
...
Since we need to special-case the datetimes to deal with UTC
all day events, using a general local GTimeZone would cause
the cloned all-day events to show wrongly inside the popover.
Fix that by calculating each event's start and end dates according
to the all day events.
https://bugzilla.gnome.org/show_bug.cgi?id=771655
2016-09-27 21:08:09 -03:00
Georges Basile Stavracas Neto
54470d21e9
Bump 3.22.0 release
2016-09-19 16:28:45 -03:00
Georges Basile Stavracas Neto
84bcfdc4bf
Bump 3.21.92 release
2016-09-14 16:44:14 -03:00
Georges Basile Stavracas Neto
e9a5a12d5e
date-selector: remove hack
...
Seems like Gtk+ fixed the positioning code, and we don't
need this hack anymore.
2016-09-14 16:11:33 -03:00
Georges Basile Stavracas Neto
18c5607d87
edit-dialog: fix typo
2016-09-14 16:11:22 -03:00
Georges Basile Stavracas Neto
4e7706847e
project: bump gtk+ min version
...
We use features of the latest release 3.21.6, so make it a
requirement.
2016-09-14 14:16:37 -03:00
Georges Basile Stavracas Neto
08fcf33a28
event-widget: don't DnD read-only events
...
Read-only events can't be moved, so don't allow it.
https://bugzilla.gnome.org/show_bug.cgi?id=771116
2016-09-14 14:10:13 -03:00
Georges Basile Stavracas Neto
7104c95ffb
month-view: fix DnD highlight
...
https://bugzilla.gnome.org/show_bug.cgi?id=771115
2016-09-14 14:01:37 -03:00
Georges Basile Stavracas Neto
f25c3675cd
quick-add-popover: let calendar list be the same height
2016-09-14 13:47:37 -03:00
Georges Basile Stavracas Neto
50aa895347
edit-dialog: limit and ellipsize title
...
So it doesn't grow endlessly.
https://bugzilla.gnome.org/show_bug.cgi?id=771400
2016-09-14 13:18:37 -03:00
Georges Basile Stavracas Neto
faf61122fd
Bump 3.21.91 release
2016-08-30 01:14:42 -03:00
Georges Basile Stavracas Neto
56ae69d6c4
edit-dialog: keep start and end dates synchronized
...
Never let them enter in an invalid state, where the end
date is ahead of the start date.
https://bugzilla.gnome.org/show_bug.cgi?id=770263
2016-08-30 00:30:58 -03:00
Georges Basile Stavracas Neto
3560a9de43
edit-dialog: fix insensitive time choosers
...
They are hidden now, no need to handle the sensitive
state of them as well.
2016-08-30 00:30:58 -03:00
Georges Basile Stavracas Neto
a483af3741
edit-dialog: simplify sensitive state handling
...
Instead of manually handling every single widget, simply
sync the GtkWidget:sensitive property of the topmost box.
2016-08-30 00:30:58 -03:00
Georges Basile Stavracas Neto
cd50bec506
project: fix build warnings
...
https://bugzilla.gnome.org/show_bug.cgi?id=770466
2016-08-29 23:08:39 -03:00
Georges Basile Stavracas Neto
cef7f02a65
date-selector: update text even for today
...
When the date selector is initialized, the text is
blank, even when the date is set for today.
Fix that by updating the text when setting the date.
2016-07-24 20:09:37 -03:00
Georges Basile Stavracas Neto
faf85a7fb0
date-chooser: support hovering days
...
Another fixup in order to make the current date chooser
more streamlined with GNOME Shell's calendar.
2016-07-23 17:47:12 -03:00
Georges Basile Stavracas Neto
93900ae9e9
date-chooser: tweak style
...
To keep the current date chooser in sync with
GNOME Shell, tweak the week names to show only
the first, upcased letter of the week name.
Also, this commit avoids making day number circles
ellipses when the week number is not present.
2016-07-23 17:47:12 -03:00
Georges Basile Stavracas Neto
2744f5acd2
date-selector: bind weekday numbers with desktop
...
The current implementation of the new calendar widget
accepts showing the week numbers in a modern and much
more consistent way.
The behavior, however, is not aligned with the rest of
the application and the desktop, which share a setting
to show or hide the week number.
Fix that by synchronizing the new calendar's week number
property with the specific setting.
2016-07-23 17:47:11 -03:00
Georges Basile Stavracas Neto
459756b2a2
edit-dialog: adapt to better display the date selectors
...
This commit is purely aesthetical, and is here in order to
make the edit dialog look more like the proposed mockups.
2016-07-23 17:47:11 -03:00