Commit Graph
1582 Commits
Author SHA1 Message Date
Georges Basile Stavracas Neto 1362762efe manager: fail when client unit isn't found
This is a temporary solution to avoid a crash that
some people are experiencing. More investigation is
required.

https://bugzilla.gnome.org/show_bug.cgi?id=781071
2017-04-13 07:08:35 -03:00
Georges Basile Stavracas Neto e26648a2c6 month-view: don't cancel selection on date change
https://bugzilla.gnome.org/show_bug.cgi?id=781244
2017-04-13 06:55:30 -03:00
Georges Basile Stavracas Neto 662373141b event-widget: correctly ellipsize descripton tooltip
https://bugzilla.gnome.org/show_bug.cgi?id=781185
2017-04-12 21:04:42 -03:00
Georges Basile Stavracas Neto aa5b963412 view: rework active-date
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.
2017-04-12 20:51:23 -03:00
Georges Basile Stavracas Neto 2e84c00233 Merge branch 'wip/gbsneto/docs' 2017-04-12 15:17:37 -03:00
Georges Basile Stavracas Neto 7681b7a2da project: document classes 2017-04-12 15:17:17 -03:00
Georges Basile Stavracas Neto 57a2bf8983 week-grid, week-header: simplify code
We don't need to check whether the end date is NULL,
for GcalEvent always ensures that.
2017-04-12 15:12:03 -03:00
Georges Basile Stavracas Neto 89f142d79e week-grid: draw today indicator above events 2017-04-12 14:21:02 -03:00
Georges Basile Stavracas Neto 6c784d03c4 event-widget: escape summary and description 2017-04-11 10:38:29 -03:00
Novi-Novi 21eba8ea0a event-widget: show tooltip with event details
In month view and year view, when the mouse is hovering over
an event, nothing is shown. A tooltip with the event information
would be much more useful in this scenario.

Fix that by showing a tooltip displaying the event's title, time
and date, and, if present, the location and notes of the event. Long
notes are truncated and ellipsized.

https://bugzilla.gnome.org/show_bug.cgi?id=774952
2017-04-11 09:50:15 -03:00
Georges Basile Stavracas Neto e3ef063e00 event: fix documentation 2017-04-08 20:59:51 -03:00
Georges Basile Stavracas Neto 014bcfddc5 doc: add skeleton documentation
This adds API documentation, generated at compile time.
2017-04-08 20:59:50 -03:00
Georges Basile Stavracas Neto b93fe11da8 view: cleanup unused code 2017-03-29 16:25:47 -03:00
Georges Basile Stavracas Neto 2f2867179d week-grid: fix event creation on RTL languages
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
2017-03-29 00:04:10 -03:00
Yash Singh 7e68bfb150 source-dialog: change label to "Expired" if account credentials expire
Earlier Calendar showed an account as "on" even when the credentials had expired.

This patch fixes the issue and instead shows "Expired" label upon expiration of credentials.

https://bugzilla.gnome.org/show_bug.cgi?id=761766
2017-03-27 09:06:27 -03:00
Georges Basile Stavracas Neto 19b1563aab year-view: simplify code
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.
2017-03-25 17:56:36 -03:00
Georges Basile Stavracas Neto 3bbd6b64e4 window: show quick add popover with a nice animation
Instead of plain show and hide it, let's add a smooth
animation.
2017-03-25 17:46:08 -03:00
Georges Basile Stavracas Neto a7d7726a35 year-view: optimize drawing
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.
2017-03-25 11:22:22 -03:00
Georges Basile Stavracas Neto c2f3953dde week-header: don't attempt to add events incorrectly
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.
2017-03-24 22:21:24 -03:00
Yash Singh 26ecf3c161 event-widget: assign display-text in appropriate format to event-widget
Earlier the height of event-widget with duration of 30 mins or less exceeded
the desired space in week-grid. As height available was not checked beforehand,
this resulted in some event-widgets getting height assigned which was more
than the height available.

This patch fixes the erroneous assignment of event-widget's height by first
comparing the required height with the available height. If the required
height exceeds the available height, then the display-text is given as a
single-line for the widget to fit properly.

https://bugzilla.gnome.org/show_bug.cgi?id=778070
2017-03-23 19:58:04 -03:00
Yash Singh 6cc6e4f7e7 week-grid: remove unneeded usage of natural-height
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
2017-03-23 19:53:46 -03:00
Jente Hidskes de2578ac54 views: use ACTION_MOVE to display correct cursor
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
2017-03-22 22:55:50 -03:00
Georges Basile Stavracas Neto 2544773645 manager: use EDS selectable property to track disabled agendas
This way, we can keep GNOME Calendar and Evolution synchronized.
And we can save some code too.
2017-03-17 21:25:23 -03:00
Georges Basile Stavracas Neto 82aa5fadb0 week-header: correctly check for updatable events
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.
2017-03-17 21:09:33 -03:00
Georges Basile Stavracas Neto f1b59d64d2 week-header: fix dnd at first column 2017-03-17 16:38:59 -03:00
Georges Basile Stavracas Neto 8b718ee0a0 week-view, week-header: instrument more functions 2017-03-17 16:38:28 -03:00
Georges Basile Stavracas Neto fa7f579592 window: correctly check today for week view 2017-03-17 16:11:42 -03:00
Georges Basile Stavracas Neto 002271ebb1 views: get rid of current date
We can easily track the current date with GDateTime API,
so we don't actually need the current date field.
2017-03-17 15:49:12 -03:00
Georges Basile Stavracas Neto 1dadd34409 week-view: instrument possibly crasher function 2017-03-17 15:06:02 -03:00
Georges Basile Stavracas Neto be137fca02 manager: unify completion flags
Instead of having a completion flag for GOA and calendars,
unify both of them and simplify some code.
2017-03-17 12:46:40 -03:00
Georges Basile Stavracas Neto 339b49e7d5 views: cleanup code 2017-03-17 11:13:19 -03:00
Georges Basile Stavracas Neto 0d44471546 window: cleanup code 2017-03-17 10:51:37 -03:00
Georges Basile Stavracas Neto d1a24d8adb application: cleanup code 2017-03-17 10:35:56 -03:00
Georges Basile Stavracas Neto 0b07d7d27d manager: improve code
This is a big cleanup commit where I tried my best to
make GcalManager code more structured and readable. This
included both cosmetic and functional changes.
2017-03-17 10:14:25 -03:00
Georges Basile Stavracas Neto cf6cdfd2aa project: use cairo_surface_t when possible
We can avoid an entire roundtrip from surface > pixbuf > surface
if we simply pass the surface to GtkImage. We also save quite
a bunch of debug lines.
2017-03-17 10:14:25 -03:00
Georges Basile Stavracas Neto 478db350e3 project: intrument functions
Add the newly added macros to provide useful tracing
information.
2017-03-17 10:14:25 -03:00
Georges Basile Stavracas Neto 7b05abea90 debug: add debug macros 2017-03-17 10:14:25 -03:00
Georges Basile Stavracas Neto d5825bbd35 project: override log domains
This way, we can have more useful debug spils.
2017-03-17 10:14:25 -03:00
Georges Basile Stavracas Neto 5d980de797 log: add initial logging capabilities 2017-03-17 10:14:25 -03:00
Kevin Lopez c3bffd5eeb search-view: no show search view if field is empty
When the search field is empty is not needed show the result drop down.

https://bugzilla.gnome.org/show_bug.cgi?id=747962
2017-03-16 21:32:04 -03:00
Joyjit Choudhury 35b2f90cab week-view: set correct week number
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
2017-03-16 20:31:37 -03:00
Georges Basile Stavracas Neto 0266202d40 week-header: continue fixing event positions 2017-03-15 09:50:51 -03:00
Georges Basile Stavracas Neto 669869cf3f week-header: fix calc of events' start and end positions
Another shot in this issue. Again.

https://bugzilla.gnome.org/show_bug.cgi?id=780051
2017-03-15 17:45:49 +05:30
Georges Basile Stavracas Neto d4ef9b22ca week-grid: consider daylight when calculating event position
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
2017-03-15 04:52:33 -07:00
Georges Basile Stavracas Neto 0b0dee101a quick-add-popover: only focus entry if popover is visible
Otherwise, we end up with a warning and many keybindings won't
work anymore.
2017-03-14 21:51:37 -03:00
Georges Basile Stavracas Neto 39d871d2ef week-grid: disconsider reported min-width for events
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
2017-03-14 20:50:53 -03:00
Georges Basile Stavracas Neto f608f8fd9d week-header: don't account first weekday twice
The auxiliary functions to calculate the week start
already takes the first weekday into account. We,
however, were considering it again when calculating
the event position.

Fix that by only considering it once, through the
get_start_of_week() function.

https://bugzilla.gnome.org/show_bug.cgi?id=780051
2017-03-14 20:27:32 -03:00
Georges Basile Stavracas Neto 0dcf86b7c2 week-header: improve drag and drop
The rudimentary drag n' drop support should also deal
with the following corner cases:

           All Day
Multiday |   TRUE   |   FALSE    |
         |----------|------------|
    TRUE |   utc    | no changes |
   FALSE |   utc    |    utc     |

https://bugzilla.gnome.org/show_bug.cgi?id=777424
2017-03-14 20:19:28 -03:00
Georges Basile Stavracas Neto c33d820387 week-grid: use a proper function to queue redraw
Same as 97698ad1c9 for the Week grid.
2017-03-14 20:17:46 -03:00
Georges Basile Stavracas Neto 180621cd91 week-view: also check for realized
Be more strict about the checks, and avoid crashes.
2017-03-14 15:53:09 -03:00