GNOME Bugzilla – Bug 747963
The Today button should be insensitive when today is visible.
Last modified: 2017-04-17 18:20:40 UTC
When a view shows the current day, the Today button should be insensitive.
Created attachment 304681 [details] [review] Today button is only sensitive when a view does not show the current day.
(In reply to Javier Sánchez Ochando from comment #1) > Created attachment 304681 [details] [review] [review] > Today button is only sensitive when a view does not show the current day. Thank you, I'll review it on Tuesday.
Review of attachment 304681 [details] [review]: The patch does not apply to master.
Created attachment 324786 [details] [review] This patch makes today button sensitive only when today is not shown.
Review of attachment 324786 [details] [review]: Some style issues left. ::: src/gcal-window.c @@ +153,3 @@ + icaltimetype *new_date); + +static gboolean update_current_date (GcalWindow *window); These 2 prototypes are not needed, only add the update_today_button_sensitive() one. @@ +426,3 @@ + sensitive = + window->active_date->year != window->current_date->year || + window->active_date->month != window->current_date->month; The alignment is wrong, write it as follows: sensitive = cond1 || cond2; @@ +431,3 @@ + case GCAL_WINDOW_VIEW_YEAR: + sensitive = + window->active_date->year != window->current_date->year; Put this only in one line. @@ +437,3 @@ + sensitive = + window->active_date->year != window->current_date->year || + window->active_date->month != window->current_date->month; in default, set sensitive to TRUE.
Created attachment 324832 [details] [review] This patch makes today button sensitive only when today is not shown. Fixed some coding style issues.
Thanks for fixing the bug.
That change is a bit confusing. In month view you can see the selected day (it has a doted-line rectangle), wouldn't it make sense to rather active "today" when the selected day is not today and have the button brings back the selection on the actual day?
(In reply to Sebastien Bacher from comment #8) > That change is a bit confusing. In month view you can see the selected day > (it has a doted-line rectangle), wouldn't it make sense to rather active > "today" when the selected day is not today and have the button brings back > the selection on the actual day? Only month-view has a notion of selection and Today button apply for both views, so it should do the same on both views.