Commit Graph
118 Commits
Author SHA1 Message Date
Georges Basile Stavracas Neto 7a6a13d7e0 event: fix timezone handling
Using libical with libecal means that the dates
are always stored as UTF dates, and we receive the
timezone as the ECalComponentDateTime::tzid value.

This fact was net being considered when adding date
support on GcalEvent, and was causing various issues
when displaying dates.

Fix that by properly handling timezones in GcalEvent.
2016-02-15 20:42:47 -02:00
Georges Basile Stavracas Neto 8511285525 year-view: move comparing function from gcal-event-widget.c
The compare_for_single_day() method is reproducing the
same functionality from gcal_event_compare(), and the only
consumer is the Year View. So, for now, simplify the
comparing function and put it in year view file.

Also, this commit vastly improves and documents the year
view's algorithm to add events to the sidebar list.
2016-02-14 12:17:37 -02:00
Georges Basile Stavracas Neto 0ec0ea8121 event-widget: use GcalEvent internally
This saves a lot of code, and is much saner to maintain.
2016-02-14 12:17:37 -02:00
Isaque Galdino 9646d4f543 year-view: Fix for 01-01-2017 date
Previous fix was considering Jan 1st and Dec 31st to find the week
number, using ISO 8601 standard, and that was causing an issue with some
dates like Jan 1st, 2017 which was displaying week# 52 instead of
week #1.

The issue happened because ISO 8601 always consider Monday as the first
weekday, so as Jan 1st, 2017 is a Sunday, it' still considered week# 52
and not week# 1.

After checking GtkCalendar code I noticed it uses the same ISO 8601
standard but instead of using Jan 1st or Dec 31st, it always get the
week number based on the last day of that week, taking account if the
week starts on Sunday or Monday, depending on the locale. In our
example, using a calendar based on Sunday, Jan 1st, 2017 is the first
day of the week and Jan 7th, 2017 is the last one. Therefore I changed
week number code to always use the last day of the week.

https://bugzilla.gnome.org/show_bug.cgi?id=757622
2016-02-02 14:44:04 -02:00
Isaque Galdino e8c75cea32 year-view: Added visual clue for days with events
Year view didn't have hints for days with events and this feature was
requested to be added to gnome-calendar.

This is an old request but in the past gnome-design team though it would
be better to keep the layout simple without hints for days with events.
Now with the changes in gnome-shell calendar and in order to keep them
in sync, this feature was added to gnome-calendar.

In order to implement this code we had to add a few css styles and a
code to add a small circle below everyday with events. Although
gnome-shell calendar uses an svg image with a 3x3 dot, we chose to use a
pango function to draw the dot.

https://bugzilla.gnome.org/show_bug.cgi?id=743317
2016-01-29 22:51:12 -02:00
Georges Basile Stavracas Neto f9101b9bc8 year-view: turn into a final class 2016-01-19 20:45:05 -02:00
Isaque Galdino c4853dd855 gnome-calendar: Fix week #s in year view
Changed year view to use ISO 8601 standard to display the week #s
correctly when showing first and last weeks.

Year view was always starting week #s as 1, based on Jan 1st, and it
kept count the weeks until Dec 31st. But according to ISO 8601 standard,
that's not always true, i.e. Jan 1st 2016, is still in the 53th week of
2015, while Dec 31st 2014 is already in the 1st week of 2015.

Now the code is using ISO 8601 GDate function to get the correct week
number for the first and the last weeks of the year only. Other weeks
continue to use the same logic.

More about ISO 6801: https://en.wikipedia.org/wiki/ISO_8601#Week_dates

https://bugzilla.gnome.org/show_bug.cgi?id=757622
2016-01-19 18:09:30 -02:00
Georges Basile Stavracas Neto 5b8a26ec71 year-view: port to css nodes
Mainly by removing the gtk_widget_get_state_flags()
calls.
2016-01-04 16:50:40 -02:00
Erick Perez Castellanos cb25af0164 year-view: Get selected date before hiding popover
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=757931
2015-12-21 22:53:33 -06:00
Erick Perez Castellanos 5f6bd95750 Fix gcal_manager_is_client_writable() semantics
Fix all the calls to it accordingly.
2015-10-07 08:39:51 -05:00
Georges Basile Stavracas Neto d3a806a684 year-view: improve font rendering
By using doubles instead of integers, we give a very
fluid resize effect for year view.
2015-07-15 23:55:08 -03:00
Erick Pérez Castellanos 46c67688e1 year-view: set sidebar range timezone 2015-03-16 12:41:11 -04:00
Erick Pérez Castellanos 15604b13d8 year-view: fix sidebar headers 2015-02-16 09:31:21 -05:00
Erick Pérez Castellanos 8f1b118abb event-widget: fix events with no end date 2015-02-16 09:31:21 -05:00
Erick Pérez Castellanos 8fadbaa760 misc: fix various memory leaks 2015-02-16 09:31:20 -05:00
Erick Pérez Castellanos 44411f233a year-view: impl comp added properly
Previously we updated the sidebar completely, removing every children
and add it again after it. There's no need of it, if we provide a
sort_func to the ListBox and add only the component received
2015-02-16 09:31:20 -05:00
Erick Pérez Castellanos d32b9435f2 year-view: wrap add_class in save/restore block 2015-01-30 12:40:22 -05:00
Erick Pérez Castellanos 08b37bf8ea views: remove unused code 2015-01-29 00:01:10 -05:00
Erick Pérez Castellanos 86d5a23ddd app: initial current date marking work 2015-01-28 15:18:53 -05:00
Erick Pérez Castellanos 0d74fcc87f year-view: properly update active-date property 2015-01-27 23:09:32 -05:00
Erick Pérez Castellanos c8339d333d year-view: fix marking and placing of events 2015-01-27 23:07:44 -05:00
Erick Pérez Castellanos fa2f300362 app: move view subscription to GcalWindow
Initialize :manager property first and :active-date later. Allocate
::active_date instance on instance init vfunc.
2015-01-27 22:37:44 -05:00
Erick Pérez Castellanos 6d2dfdf9a1 app: update date when change in views
year-view: update date on selection
2015-01-27 19:10:28 -05:00
Erick Pérez Castellanos 9c33bd0dfc year-view: use icaltime_compare_date()
Hopefully, this fix once and for all the selection of the range to show
on the sidebar.
2015-01-27 17:48:34 -05:00
Erick Pérez Castellanos 4628799d2e year-view: include events overlapping the range 2015-01-27 13:25:37 -05:00
Erick Pérez Castellanos 9838f8c64e year-view: end-date passed to edit-dialog 2015-01-27 12:59:38 -05:00
Erick Pérez Castellanos 7b6037e707 year-view: add no events label to popover mode 2015-01-27 11:31:05 -05:00
Erick Pérez Castellanos 032b2fab55 year-view: fix range marking for a single day 2015-01-23 13:12:13 -05:00
Erick Pérez Castellanos ec80a90743 year-view: iterate properly through listbox children 2015-01-23 13:12:12 -05:00
Erick Pérez Castellanos 7ee9be263c year-view: show no events label when needed 2015-01-23 13:12:12 -05:00
Erick Pérez Castellanos bb41d9dc76 year-view: fix all-day events
icaltime_compare() keeps doing its own work as it see fits
2015-01-22 14:02:06 -05:00
Erick Pérez Castellanos 5aace8e060 year-view: add class tagging to events
We add three classes:
+ slanted-start
+ slanted-end
+ slanted

Those mean an event who does not start on the first cell is drawn, and event
who does not end on the last cell its drawn and bot things at the same time.
2015-01-22 13:44:25 -05:00
Erick Pérez Castellanos 92ea54ac7b year-view: fix bug when ListBoxRow child is NULL 2015-01-20 17:15:17 -05:00
Erick Pérez Castellanos 4247018bde year-view: initial UI for no events days 2015-01-20 17:06:22 -05:00
Erick Pérez Castellanos 9b222e8d5f year-view: fix 31 of december and query range
icaltime_compare_date_only doesn't work as I expected. So moving back to
icaltime_compare along and fixing condition to include not all-day events
2015-01-20 17:04:16 -05:00
Erick Pérez Castellanos 2ff6bb460e gcal-view: remove unused funcs 2015-01-20 15:03:12 -05:00
Erick Pérez Castellanos d76ba04d92 year-view: prevent segfault when there's no child 2015-01-20 13:47:39 -05:00
Erick Pérez Castellanos 18ee4de144 year-view: impl GcalView::get_children_by_uuid 2015-01-20 13:12:01 -05:00
Erick Pérez Castellanos c62d808a35 year-view: fix subscriber callback
GcalYearView::start_selected_date will always be started into something
and comparing against zero no matters what returns will enter in one of
the two categories
Still before 3.16, this code should change.
2015-01-20 13:12:00 -05:00
Erick Pérez Castellanos ffc7a7f577 year-view: update sidebar on year changing 2015-01-20 13:12:00 -05:00
Erick Pérez Castellanos 85d7461cff year-view: added popover mode 2015-01-20 13:12:00 -05:00
Erick Pérez Castellanos 70f788ad25 year-view: comment for post-release fixes 2015-01-20 13:12:00 -05:00
Erick Pérez Castellanos e1ba556f2e year-view: connect current_date to window
Update sidebar whenever the current_date is updated.
This current_date mechanism is going to be moved completely into GcalWindow.
2015-01-20 13:12:00 -05:00
Erick Pérez Castellanos caaf492a3d year-view: add manager subscription process 2015-01-20 13:12:00 -05:00
Erick Pérez Castellanos f7beeadbb2 year-view: adding second header to sidebar 2015-01-20 13:11:59 -05:00
Erick Pérez Castellanos fb3cc4caaf year-view: added update_sidebar and widget marking 2015-01-20 13:11:59 -05:00
Erick Pérez Castellanos 338f4c039f year-view: initial sidebar impl 2015-01-20 13:11:59 -05:00
Erick Pérez Castellanos 0770a12ea9 year-view: add event handling to navigator 2015-01-20 13:11:58 -05:00
Erick Pérez Castellanos e49418a26d year-view: add navigator drawing 2015-01-20 13:11:58 -05:00
Erick Pérez Castellanos 19c8ae9d0e year-view: provide GcalView implementation 2015-01-20 13:11:58 -05:00