Commit Graph
1271 Commits
Author SHA1 Message Date
Anwar Sadath 14dc32891b edit-dialog: Respecting GNOME's 12/24 hour format
The edit dialog time picker didnt take into account GNOME's hour format.

The edit dialog time picker didnt take into account GNOME's hour format because the desktop settings clock-format from gcal-window was not passed to gcal-edit-dialog.

Now the data is passed through the function gcal_edit_dialog_time_format and everything works as required.

https://bugzilla.gnome.org/show_bug.cgi?id=703321
2016-03-14 17:40:22 -03:00
Isaque Galdino 32c5c824e3 year-view: Read show-weekdate from GNOME Shell
Year view always shows week numbers and by design team the default show
not display them.

This patch adds support to read "show week numbers" setting from GNOME
Shell (org.gnome.shell.calendar::show-weekdate) and to change year-view
accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=763251
2016-03-14 16:57:45 -03:00
fosero 465d786ae8 year-view: criticals on last day of month events
Adding 1 to the day variable at the end of the month results in an
invalid datetime, use g_date_time_add_days instead.

https://bugzilla.gnome.org/show_bug.cgi?id=763015
2016-03-14 16:54:54 -03:00
fosero 96d2b37fec month-view: fix end-of-month multi-day selections
Use g_date_time_add_days to add a day to the final day of the month to
fix behaviour when selecting a range up to the last day of the month.

https://bugzilla.gnome.org/show_bug.cgi?id=763015
2016-03-14 16:54:54 -03:00
fosero 2ac228a9b8 quick-add-popover: adjust end date properly
Subtracting 1 from the first day of the month leads to an invalid date
being shown: use a proper function to adjust the date.

https://bugzilla.gnome.org/show_bug.cgi?id=763015
2016-03-14 16:54:54 -03:00
fosero c67d52092c month-view: fix date adjust mishap
https://bugzilla.gnome.org/show_bug.cgi?id=763015
2016-03-14 16:54:53 -03:00
fosero 8a72bf0ce7 month-view: add selection background fill
https://bugzilla.gnome.org/show_bug.cgi?id=763217
2016-03-12 21:58:22 -03:00
fosero 0ce85f6072 month-view: cleanup multi-row selection drawing
The selection mode was drawing a number of boxes on multi-row
selections, resulting in unwanted outlines within the selection area.
This patch adds a multirow mode that just draws the outline of a
selection.

Make cell_{width,height} integers so divison lines always get drawn on
exact grid coordinates, otherwise line calculations could result in
fuzzy lines.

https://bugzilla.gnome.org/show_bug.cgi?id=763217
2016-03-12 21:58:22 -03:00
fosero 0fce5babcf month-view: fix line width inconsistencies
The line width used for the grid changed over time, resulting in
different values used at different places. Introduce a LINE_WIDTH
definition and use it consistently throughout when drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=763217
2016-03-12 21:58:22 -03:00
Georges Basile Stavracas Neto c9499b6f7b utils: better compare datetimes by date
By multiplying the year difference by 360 and
month difference by 30, we have a much better
idea of how far the dates are.
2016-03-11 22:55:00 -03:00
pandusonu2 a738acb462 month-view: wrap around months for selector
In this commit, we modify the position of the selector in the month view when the selector is out of bound of the present month

Presently, the selector in the month view doesn't move when it reaches the border of the month.

To fix this, whenever the keyboard_cell is less than first index of the month, we reduce the value of month by 1 and in the case it is greater than the max key cell, we are increasing the value of month by 1.

https://bugzilla.gnome.org/show_bug.cgi?id=763198
2016-03-11 22:44:15 -03:00
fosero 97704c3390 month-view: fix last day+1 selectable
It was possible to select the cell after the last day of the month by
clicking on it.

The days variable is the first day of the month cell + the number of
days in the month, so only cells less than this cell should be
considered actual month days.

https://bugzilla.gnome.org/show_bug.cgi?id=763495
2016-03-11 11:05:33 -03:00
Isaque Galdino 8af0e6f84e year-view: Week numbers shown in big dark squares
Design team testing with GNOME continuous, complained about week numbers
being shown in big dark squares. According to them, these wreck the
layout of the view.

Design team listed the issues, comparing to gnome-shell calendar as:
 * The containing boxes are larger in Calendar.
 * The background of the boxes has more contrast with the background (it
should be a lot lighter in Calendar).
 * Week numbers are an option in the shell, and are off by default.

This patches fixes the two first items: week numbers box' size and
color. Option to set on/off week numbers will be implemented in a future
patch.

https://bugzilla.gnome.org/show_bug.cgi?id=763251
2016-03-10 23:29:06 -03:00
Georges Basile Stavracas Neto 1f021f8da2 month-view: fix one more child context issue
The code for multiday events was broken as well.
2016-03-09 17:42:21 -03:00
Georges Basile Stavracas Neto 34a6ac389a view: update interface code
This commit updates GcalView interface to use
modern GLib API and, consequently, removes tons
of obsolete code.
2016-03-09 14:19:04 -03:00
Georges Basile Stavracas Neto 042a9b34ab month-view: emit dates in local timezone 2016-03-09 12:22:06 -03:00
Georges Basile Stavracas Neto 7d3e125012 event-widget: remove obsolete comment 2016-03-09 12:07:05 -03:00
Georges Basile Stavracas Neto 1c52e36c71 month-view: match style context state from child
We were mistakenly using the style context of the view
to retrieve the child's margin.

Fix that by retrieving the child margin from the child's
style context.
2016-03-09 12:04:28 -03:00
Isaque Galdino d7daa8fe29 year-view: Week numbers overlapping view edge
In some conditions when window is narrower than taller, week numbers
overlaps the view edge. That problem started after we added a
background to week numbers and moved it a little farther from the days.
The whole drawing function didn't take in account the space used by the
week numbers.

To fix that we had to move the whole drawing area and start to count the
space for the week numbers. We also had to change the logic to find the
day and month based on x,y coordinates.

https://bugzilla.gnome.org/show_bug.cgi?id=763251
2016-03-09 11:19:52 -03:00
Georges Basile Stavracas Neto fef23f1243 search-view: don't load events with no dtstart 2016-03-09 11:19:52 -03:00
Iain Lane ace87328a9 event: If no end date is given, make the event be all_day explicitly
Previously we were synthesising an end date of "start + 1 day", but this
isn't necessary. RFC 2445 tells us that no end date already means an all
day event.

Check this case directly.

https://bugzilla.gnome.org/show_bug.cgi?id=762985
2016-03-08 16:36:41 +00:00
fosero ba78e54916 month-view: initial selection on current day
Create the month view with the initial selection on the current day.

https://bugzilla.gnome.org/show_bug.cgi?id=763149
2016-03-08 12:59:48 -03:00
Monique Faria e48c585c94 event: fix crash when no end date is given
In this commit, we fixed a crash report that occurred when an event had no end date.

Events with no end dates are all-day, 1-day length events. But, when an event with no end date set was synchronized with calendar (happened mostly with birthdays), it caused crashes, because the function responsible for getting the end date received NULL.

To correct this, we considered that end = start + 1day when no end date is set. With this, the mistake was corrected. Another thing that was correct along with this were two memory leaks, caused by the allocation of both end and start date that were not been freed.

https://bugzilla.gnome.org/show_bug.cgi?id=762985
2016-03-08 00:48:16 -03:00
fosero 2244503a52 edit-dialog: don't try to update locked events
https://bugzilla.gnome.org/show_bug.cgi?id=763187
2016-03-06 19:27:32 -03:00
fosero e464eb6415 event: handle different tzid formats
tzid can have different formats depending on where it originates from:
regular or prefixed by a libical specific identifier. Use the
right icaltimezone_get_builtin_timezone* for each case.

https://bugzilla.gnome.org/show_bug.cgi?id=763180
2016-03-06 17:03:00 -03:00
Georges Basile Stavracas Neto 09b79e1cc8 Bump 3.19.91 release 2016-03-02 22:28:53 -03:00
Isaque Galdino 03b2ac9845 year-view: today button not working
Today button in the headerbar was not working when pressed in the
current year.

Button logic to update side panel was only triggered if there was a
change in the chosen year.

Fixed to update side panel whenever date is changed.

https://bugzilla.gnome.org/show_bug.cgi?id=762463
2016-03-02 01:06:52 -03:00
Georges Basile Stavracas Neto 64747e4f80 event: load tzid with icaltimezone_get_builtin_timezone 2016-03-01 15:27:07 -03:00
Georges Basile Stavracas Neto 7be1dd95fa event-widget: draw icons at the end of the widget
Instead of breaking the vertical alignment of events by
drawing icons both at the start and end of the widget,
only draw them by the end.

This commit also improves drawing for RTL locales.
2016-03-01 00:16:49 -03:00
Georges Basile Stavracas Neto 5227f3fcdc event-widget: show start time when event is timed
We differentiate all day events from timed events by their
ordering, but we don't give any visual clues of this
differentiation.

Fix that by adding the start time of the event when it's a
timed event.

https://bugzilla.gnome.org/show_bug.cgi?id=753131
2016-02-29 23:24:14 -03:00
Georges Basile Stavracas Neto d84be66d70 event-widget: bring back alarm icon 2016-02-29 22:20:52 -03:00
Georges Basile Stavracas Neto a56e6c00c3 event: both start & end dates must be midnight to be all day
https://bugzilla.gnome.org/show_bug.cgi?id=762570
2016-02-29 16:14:22 -03:00
Georges Basile Stavracas Neto 4d170155de event: remove spurious debug message 2016-02-29 16:09:55 -03:00
Georges Basile Stavracas Neto 9a3baf726c edit-dialog: correctly transform the edited datetime 2016-02-29 15:49:36 -03:00
Georges Basile Stavracas Neto ce2c955269 event: correctly store timezones 2016-02-29 15:49:22 -03:00
Georges Basile Stavracas Neto d70613929b utils: fix timezones on event component creation 2016-02-28 14:13:19 -03:00
Georges Basile Stavracas Neto 1cdd73a69a event: format tzid with builtin GDateTime facilities 2016-02-28 14:13:19 -03:00
Georges Basile Stavracas Neto af6f2141ab window: use g_clear_pointer instead of g_date_time_unref
This would handle the case where the datetime is NULL for us.
2016-02-28 14:13:19 -03:00
Georges Basile Stavracas Neto 85f4854a73 quick-add-popover: only multiday events are all day
Everything else is considered a 1h event starting now on
local timezone.
2016-02-26 21:14:30 +01:00
Georges Basile Stavracas Neto e85e55a350 month-view: only send end_date if event is multiday 2016-02-26 21:14:23 +01:00
Georges Basile Stavracas Neto 87620ebbbd event: properly set the timezone 2016-02-26 21:14:23 +01:00
fosero 83cf97ecb3 utils: let format_utc_offset handle microseconds
format_utc_offset can be called with the return value of
g_date_time_get_utc_offset returning microseconds in a gint64. It is
also still called with the return value of icaltimezone_get_utc_offset
in seconds. Deal with both.

https://bugzilla.gnome.org/show_bug.cgi?id=762438
2016-02-23 22:05:24 -03:00
Isaque Galdino 1e2a0d1a3d year-view: Change week numbers style
Week numbers in year view was using a small and very light style and
that was making difficult for users to be able to read it.

After a few conversation with gnome-design team, they proposed the best
approach it would be to use the same style as gnome-shell panel does.

The week numbers style was changed to be as close as possible to the
gnome-shell panel.

https://bugzilla.gnome.org/show_bug.cgi?id=759354
2016-02-22 00:04:08 -03:00
Georges Basile Stavracas Neto e067e8cf73 event-widget: disconnect from event's signals on finalize
When we finalize, we remove the event. Normally this means
that the event also gets finalized, as the widget almost
always holds the only reference to the event.

However, there are some rare cases where we finalize the widget
but not the event. If the event the updates the color or the
summary, we try to redraw the finalized widget and crash.

Fix that by disconnecting the signals when finalizing the widget.
2016-02-22 00:02:59 -03:00
Georges Basile Stavracas Neto e4bfdb7ed2 event: plug a memory leak 2016-02-22 00:02:59 -03:00
Georges Basile Stavracas Neto 079750561a window: remove queued event on finalize
When the user removes an event, we first hide it and,
after a timeout, we remove it. The problem is that if
the user closes the window before the timeout is fired,
the event never gets deleted.

Fix that by deleting the event on finalize if there's
any event queued.

https://bugzilla.gnome.org/show_bug.cgi?id=762284
2016-02-18 15:36:56 -02:00
Georges Basile Stavracas Neto d5cd6c7fc9 window: don't block mainloop when showing dialogs
By using gtk_dialog_run(), we enter in a recursive mainloop
which blocks the parent's one. Because of that, we see weird
things like the quick add popover not still floating around.
2016-02-18 15:28:17 -02:00
Georges Basile Stavracas Neto 9df6a37fd9 edit-dialog: fix more timezone issues 2016-02-18 10:27:53 +01:00
Georges Basile Stavracas Neto fd6d6e97c9 quick-add-popover: fix event creation again 2016-02-18 04:02:46 -02:00
Georges Basile Stavracas Neto 21aa8ecde4 event-widget: simplify rendering code 2016-02-18 04:02:46 -02:00