Commit Graph
1288 Commits
Author SHA1 Message Date
Georges Basile Stavracas Neto 9c150de822 year-view: don't cancel selection while dragging
This breaks the users' expectations that the navigator
will keep the selected dates. The old behavior was hazardous
for users with disabilities.

https://bugzilla.gnome.org/show_bug.cgi?id=762462
2016-05-20 22:18:34 -03:00
Georges Basile Stavracas Neto 6a8a4dfad0 year-view: add hover effect to the navigator
The current implementation of the Year navigator gives
absolutely no clue that the days are actually selectable,
which may confuse some users.

A simple way to inform the user that the Year navigator
is actually interactive is the hovering effect.

Fix the lack of feedback by adding the hover effect to the
year navigator.

https://bugzilla.gnome.org/show_bug.cgi?id=762462
2016-05-20 22:09:00 -03:00
Isaque Galdino f32fd7d2f6 year-view: Reduce maximum of month columns
The view had a maximum of 6 month columns, leading to a huge amount of
vertical spaces, so it was requested to reduce that.

The maximum number of columns was reduced to 4, so the view will have a
maximum 4x3 months layout.

https://bugzilla.gnome.org/show_bug.cgi?id=753533
2016-05-20 12:07:11 -03:00
Georges Basile Stavracas Neto 7553d5191f window: change check button state when a source is enabled
Instead of destroying and readding the rows, simply set the
checkbutton's active state when the source is enabled or
disabled.

https://bugzilla.gnome.org/show_bug.cgi?id=766259
2016-05-20 11:41:22 -03:00
Georges Basile Stavracas Neto a83e8dd972 year-view: calculate number of rows on-the-fly
Instead of adding another field to the structure and
do many pointer lookups, calculate the number of rows
on the fly.
2016-05-19 09:57:42 -03:00
Georges Basile Stavracas Neto e6c9ecd7eb month-view: clear the pointer when it's not stored in place
It leaks a reference, but only happens for end date.
2016-05-18 11:57:43 -03:00
Georges Basile Stavracas Neto 12e6de6383 month-view: update comments
Many things changed during the mean time.
2016-05-18 11:51:10 -03:00
Georges Basile Stavracas Neto 266474c1e3 month-view: correctly check if dates are different
The previous commit introduced many changes in the way
the conditions are done. Unfortunately, one of these
conditions was only partially fixed.

Fix that by using the correct function to compare dates.
2016-05-18 11:27:11 -03:00
Georges Basile Stavracas Neto 692a9639a3 month-view: fix various reference issues with GDateTime
The current code does multiple needless unrefs, uses the
GDateTime API in a wrongly manner and leaks references
all around.

This causes the Calendar application to emit multiple warning
messages and in the worst case, crash immediately.

Fix that by rewriting the critical sections of the code that
deals with the start and end mark cells.

https://bugzilla.gnome.org/show_bug.cgi?id=763641
2016-05-18 11:20:00 -03:00
Isaque Galdino 3ead41b83f year-view: show all month's events
User requested when clicking month's name, all month's events are shown
in the sidebar.

https://bugzilla.gnome.org/show_bug.cgi?id=755394
2016-05-17 11:28:08 -03:00
Isaque Galdino 97d8859574 year-view: Remove hardcoded values
Improve year-view code, removing hardcoded values.

year-view have hardcoded values for grid cell sizes (width and height).
Those values need to be recalculated every time a change in font or any
other style are changed.

Sidebar width was also hardcoded instead of getting its value directly
from the ui file. That would prevent it from drawing the content
accordingly when ui file is changed.

This patch fixes those two issues by retrieving those values from CSS or
ui files.

This patch also adds code to resize and redraw the window when
show-week-numbers property is changed.

Popover mode was also changed and now sidebar will always be shown when
show-week-numbers is set or when there is space for only 3 or less
columns.

https://bugzilla.gnome.org/show_bug.cgi?id=753533
2016-05-16 12:03:39 -03:00
Isaque Galdino 5e05f99876 build: define first week day in the build script
Calendar is not handling locale correctly, e.g. user’ set language to
English (en-us) and format to Norwegian (nb-no), but Calendar assumes
English format rather than Norwegian.

Calendar code was ready to use the correct format, just like Shell and
GtkCalendar. The issue was in the build script which was setting the
correct locale variable responsible to make that code work.

This patch fixes the build script.

https://bugzilla.gnome.org/show_bug.cgi?id=762428
2016-05-08 14:30:00 -03:00
Georges Basile Stavracas Neto 48df0903e5 month-view: consider the top padding for the extra events popover
When the mouse button is released, only the bottom padding was being
taken into account to calculate whether the click was in the "Show
N events" area.

This commit fixes this issue by considering the top padding as well.

https://bugzilla.gnome.org/show_bug.cgi?id=765678
2016-05-08 14:14:56 -03:00
Thadeu Lima de Souza Cascardo c941326230 source-dialog: protect against NULL user address
e_webdav_discover_sources_finish can discover no user addresses and
return a NULL user_addresses. Check for that before calling
e_source_webdav_set_email_address.

https://bugzilla.gnome.org/show_bug.cgi?id=765170
2016-04-17 10:01:27 -03:00
Javier Sánchez Ochando 043cca24b6 window: make Today button insensitive when today is visible
When a view shows the current day, the Today button should be insensitive.
This patch makes today button sensitive only when today is not shown.

https://bugzilla.gnome.org/show_bug.cgi?id=747963
2016-03-27 11:26:39 -03:00
pandusonu2 a3cbaf1e81 month-view: selection across months
In this commit we change the data type of start_mark_cell and end_mark_cell to GDateTime from gint

Currently, the mark_cell's are gint and while moving across months, they cause a problem as they don't take the new month into consideration but the cell value of the selector.

To fix this, we changed the data type of the mark_cell's and modified all the functions dependant on it.

https://bugzilla.gnome.org/show_bug.cgi?id=763641
2016-03-26 17:31:25 -03:00
Monique Faria c49dae00bc event-widget: fade out past events
When an event is earlier than the current date, it gets faded out.

Every event from the same calendar showed the same shade of color, either it was an old, current or forward event. That could be tricky for the user to identify which ones were already over.

Now, events that are earlier thant the current date are half transparent to allow the user to easily track where the current date/time is.

https://bugzilla.gnome.org/show_bug.cgi?id=746267
2016-03-14 19:49:41 -03:00
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