After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 777414 - week-view: don't shrink events when start and end times are the same
week-view: don't shrink events when start and end times are the same
Status: RESOLVED FIXED
Product: gnome-calendar
Classification: Applications
Component: Views
unspecified
Other Linux
: Normal normal
: 3.26
Assigned To: GNOME Calendar maintainers
GNOME Calendar maintainers
Depends on:
Blocks:
 
 
Reported: 2017-01-18 02:16 UTC by Mohammed Sadiq
Modified: 2017-02-01 17:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
week-view timeless event (image) (1.24 KB, image/png)
2017-01-18 02:16 UTC, Mohammed Sadiq
  Details
week-grid: enforce a minimum width (1.65 KB, patch)
2017-01-26 21:16 UTC, Georges Basile Stavracas Neto
committed Details | Review
week-grid: make sure events span at least 1 minute (1.24 KB, patch)
2017-01-26 21:16 UTC, Georges Basile Stavracas Neto
committed Details | Review

Description Mohammed Sadiq 2017-01-18 02:16:40 UTC
Created attachment 343687 [details]
week-view timeless event (image)

There is a possibility that the user may set (accidentally) the beginning and end of a event time to be the same. week-view should not shrink those events into a hardly clickable vertical line.

How to reproduce:
1. Create a timed event
2. Let the beginning and end time be the same

Result:
A vertical line is shown in place of the event.

Please see the attached screenshot
Comment 1 Christian Stadelmann 2017-01-25 22:28:47 UTC
Note that this bug is not present if the duration is at least one minute.
Comment 2 Christian Stadelmann 2017-01-25 22:42:05 UTC
Note also that there is a bug in giving rendering coordinates, which results in a Gtk-WARNING printed to command line:

gtk_widget_size_allocate(): attempt to allocate widget with width -2147483648 and height 38
Comment 3 Georges Basile Stavracas Neto 2017-01-26 21:16:14 UTC
Created attachment 344358 [details] [review]
week-grid: enforce a minimum width
Comment 4 Georges Basile Stavracas Neto 2017-01-26 21:16:23 UTC
Created attachment 344359 [details] [review]
week-grid: make sure events span at least 1 minute

When adding an event with the same start and end dates and
times, the event effectively spans 0 minutes, leading a division
by zero and causing varius UI glitches.

Fix that by making sure events span at least 1 minute.
Comment 5 Isaque Galdino 2017-02-01 00:53:38 UTC
Review of attachment 344359 [details] [review]:

Code change seems OK
Comment 6 Isaque Galdino 2017-02-01 00:54:46 UTC
Review of attachment 344358 [details] [review]:

Code change seems OK
Comment 7 Georges Basile Stavracas Neto 2017-02-01 17:07:25 UTC
Thanks for the review.

Attachment 344358 [details] pushed as e119d27 - week-grid: enforce a minimum width
Attachment 344359 [details] pushed as cdc5bde - week-grid: make sure events span at least 1 minute