The overflow layout displays "Other n events" when there are too much event
that a cell can accomodate.
But on rtl languages, due to the layering out of the cell, the position of the
overflow is not renderend on the mirrored date.
We fix that by mirroring the positon of the day on which the events occur so
that the events can appear on the right day.
https://bugzilla.gnome.org/show_bug.cgi?id=777427
Month view used to calculate the event's start date and end date from
the physical layout of the month and compare it with the event's
original start date and end date to see if there is a change and then
update as necessary by either slanted start or end, when either is/are
not equal to the one in the original start and end dates.
However, the way in which the start date and end date in RTL language are
calculated must be different since the layering of the days in the weeks
are opposite. Month view uses precalculated days number to mirror the
last week, which already chop off the days_delay number from cell_idx value.
In RTL, this cause issues such that the days are calculated wrongly and a
slanted start or end is visible. Because the date is not the same as the
original events date, month view thinks that the view needs an update and
so tries to update the view wrongly.
We can fix this by using the cell_idx value to calculate the days and then
substracting the days_delay value after that.
https://bugzilla.gnome.org/show_bug.cgi?id=777426
It should be very clear that days outside the current
month are actually not valid. The current drawing
algorithm does not differentiate that, thought, and
draws everything at the same color.
Fix that by greying out the days outside the current
month.
https://bugzilla.gnome.org/show_bug.cgi?id=763771
The week view can display mutilple events that can partly or fully span
same time ranges.
But week view fails to make correct assumption about the width of events when
two or more events span some time ranges in which these events also span some
time ranges with other events, and whereby the number of these other events
that they span time ranges with does not coincide with the number of the events
that the other event also span. Week view ended up calculating cells that
appears horizontally jointed up. Also int16_compare() does not dereference the
pointer from g_ptr_array_sort() correctly and that makes it sort events
incorrectly and hence making events appears vertically jointed up.
If an event have other events in which they span some time, we calcuate its width
by taking into consideration of all the events that the other event may span
time with. The event that has the higher number of time spans is considered.
We also save and retrieve our positions using UINT_TO_POINTER and POINTER_TO_UINT()
respectively, and then dereference the pointer from g_ptr_array_sort() correctly.
https://bugzilla.gnome.org/show_bug.cgi?id=777416
While dragging and dropping a recurrent event, pop
up the recurrence-dialog to allow the user to choose
the set of events to which the changes should be
applied.
https://bugzilla.gnome.org/show_bug.cgi?id=782755
Don't hardcode month-day order, use g_date_time_format() and
mark the format string for translation and let translators choose
their preferred formats.
This patch also removes context from the existing "%B %d" date
format because it is unnecessary and this allows the format to be
reused by the patch.
https://bugzilla.gnome.org/show_bug.cgi?id=780629
Currently, GcalManager always assumes E_CAL_OBJ_MOD_THIS
when modifying or deleting events. Since we're landing
the groundwork for recurrence management, we can't assume
this anymore.
This patch, then, allows GcalManager:modify_event() and
:remove_event() receive the ECalObjModType instead of
assuming E_CAL_OBJ_MOD_THIS. However, this commit does
not add recurrence support yet, and every call to these
functions are still passing E_CAL_OBJ_MOD_THIS.
https://bugzilla.gnome.org/show_bug.cgi?id=782755
The overflow layout sit at the bottom of a cell to display "Other X events"
when there is no room to accomodate more.
The issue is that the overflow layout does not have margin property like
other views(layouts) in the cell, so instead it appears either too far from or
too close to the border depending on the text it accomodates.
We can fix this by setting the margin property.
https://bugzilla.gnome.com/show_bug.cgi?id=771581
The overflow layout used to display "Other X events" text when
there is no enough space to accomodate more events.
This used to get mixed-up/overlapped with the date label because the
overflow label uses whole cell width as width.
We can fix this by substracting date label width from overflow label
width to accomodate the date label.
https://bugzilla.gnome.com/show_bug.cgi?id=7771581https://bugzilla.gnome.org/show_bug.cgi?id=771581
The overflow layout sit at the bottom of a cell to display "Other X events"
when there is no room to accomodate more.
The issue is that the overflow layout does not have margin property like
other views(layouts) in the cell, so instead it appears either too far from or
too close to the border depending on the text it accomodates.
We can fix this by setting the margin property.
https://bugzilla.gnome.com/show_bug.cgi?id=7771581
Dnd at week header crashes with segmentation fault
The problem, calculation of dnd_date returns NULL when week_start is
in previous month.
Fix that by using g_date_time_add_days() function
https://bugzilla.gnome.org/show_bug.cgi?id=781955
The Problem: When user remove 4rt fullday event, header only shows two
events and not shows 3rd fullday event
Because, we check and set visibility of event that user wants to remove
from calendar, before remove event from event list which causes 3rd
event unvisible.
Fix that with check and set visibility of event after remove event
from event list, then visibilties and overflow corretly calculated
https://bugzilla.gnome.org/show_bug.cgi?id=777423
Valgrind was reporting some "Conditional jump or move depends on
uninitialised value(s)" and "Invalid read of size 4" when hovering
year-view.
It was found some uninitialised variables in the code and they were
initialised before being used.
https://bugzilla.gnome.org/show_bug.cgi?id=781430
By storing the coordinates array in a local pointer,
we avoid 9 super slow full memory lookups. That matters
when we're inside the drawing function, trying to keep
60fps.
The current implementation is deficient in many ways, the
worst one being the it relying on GObject semi-synchronous
property emission.
This issue was exposed by the Week view code, where the active
date was updated, but delayed to reach the Week header and some
events were being added ~before~ the active date changed.
With this work, I was also able to figure out a bunch of code
that relied on this (i.e. luck) to work.
On RTL languages, the calcs to detect the start and end
of the new event were wrong, leading to the weird behavior
it currently has.
Fix that by correctly calculating the start and end cells
on RTL languages.
https://bugzilla.gnome.org/show_bug.cgi?id=777429
The code in ECalDataModelSubscriber:component_changed() and
:component_removed() was actually duplicated, and we can
simplify the :component_changed() routine by simply removing
and readding the event.
The current Year view drawing routine gathers events
every single time we draw the navigator. This is, to
the best case, slow to death. In fact, this is why
year view's navigator is so memory and processor
consuming.
To fix that, cache the added components and simply
query them at drawing time.
One of the biggest issues of GNOME Calendar views right now
is that they rely on GObject property system to update the
active date. Even gcal_view_set_date() is just a wrapper
around GObject set.
Because GObject asynchronously updates the property by letting
the mainloop handle it, we can never be assured that all the
views had their views updated before updating the data model.
This patch temporarily adds sanity checks to GcalWeekHeader
to prevent making Calendar unusable, until we fix GcalView.
As the assignment of display-text, and in turn that of event-widget's height,
is taken care of in event-widget, we no longer need to consider natural-
height, while assigning height in week-grid.
This patch fixes this issue by removing natural-height, and directly
assigning the desired value to height.
https://bugzilla.gnome.org/show_bug.cgi?id=778070
When dragging events around, the cursors show a + as opposed to a
an arrow indicating that the event is being moved. This can confuse
users.
The fix is to tell GTK that the drag being performed is a move.
https://bugzilla.gnome.org/show_bug.cgi?id=774922
When comparing events' dates against week dates, we must
be careful to compare UTC with UTC. Otherwise, some events
will be left, specially at the first and last days.
In this commit, the correct week number is set in week-view.
The problem is, the week number of week-view is being set according to
the first day of the week (if the first and last day of the week
are in the same year), or the first and last day of the week
(if the first and last day are in different years).
To fix this, the week number is being set according to the middle day
of the week (according to ISO 8601 standards), resulting in correct
week numbers.
https://bugzilla.gnome.org/show_bug.cgi?id=779331
There are some weird cases around the globe where the timezone
changes in the middle of the day. In GMT-8:00, for example, the
DST changes at 2:00 am. This makes the timezone of thestart of
the week different from the event's timezone, and somehow the
GLib API doesn't take that into account when calculating the
diff between two dates.
Fix that by also considering different timezones when calculating
the event start and end positions.
https://bugzilla.gnome.org/show_bug.cgi?id=780079
Sometimes, we'll need to ignore the reported minimum sizes
to be able to set the width of events to an acceptable
size. This is the case of the week grid.
https://bugzilla.gnome.org/show_bug.cgi?id=780052