Bug 180226 - Calendar does not update date selected on mouse wheel
Summary: Calendar does not update date selected on mouse wheel
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-10 10:39 UTC by John Layt
Modified: 2009-02-01 01:39 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
workspace/libs/plasmaclock/ patch (catch some CalendarTable signals) (1.46 KB, patch)
2009-01-10 15:05 UTC, Dario Andres
Details
A better one (1.35 KB, patch)
2009-01-10 15:20 UTC, Dario Andres
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Layt 2009-01-10 10:39:54 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

In the Calendar plasmoid when you roll the mouse wheel the day grid changes the days being displayed by +/- a month, but the selected date itself does not change.  This results in having the displayed month/year not matching the displayed day grid which could result in confusion and errors.
Comment 1 Dario Andres 2009-01-10 15:05:12 UTC
Created attachment 30093 [details]
workspace/libs/plasmaclock/ patch (catch some CalendarTable signals)
Comment 2 Dario Andres 2009-01-10 15:19:35 UTC
Maybe catching the yearUpdated signal is unuseful as you can't get to a same month in a different year only by scrolling on clicking on the month "edge" , as it only moves one month.
Comment 3 Dario Andres 2009-01-10 15:20:04 UTC
Created attachment 30095 [details]
A better one
Comment 4 Dario Andres 2009-01-10 15:41:04 UTC
Mh, thinking about it, it may be confusing as scrolling will change the calendar table + month & year, however the selected date is still the same, if you click in the ">" arrow, you will jump to the next month (from the current date, which is different of the current month displayed)... (?)
Comment 5 John Layt 2009-01-10 19:51:40 UTC
I would suggest you have a look at KDateTable and KDatePicker in kdelibs/kdeui/widgets/ and see how we did it there.  Each +/- delta of the mouse wheel basically calls calendarSystem->addMonth(currentDate, 1 or -1) and lets the signals take care of updating everything else.  As a general rule, I'd suggest you try to match the behaviour of KDatePicker to ensure we keep a consistent experience across the entire desktop and apps.

It would be good if scrolling worked for all the other widgets too.  Scrolling over the Month combo should update the date by +/- a month.  Scrolling over the date edit widget should update the date by +/- a day.

Scrolling over the Week Number spinner does update the date and day table, except that scrolling up moves you forward in time unlike scrolling over the day table where scrolling up moves you backwards in time.  Not sure this can be changed though?  Also for some reason the changing the week number sets the date selected to a Thursday, surely the first day of the week would be a better selection?

Scrolling over the Year number doesn't work unless you click on it first to turn it into a spinner, the year number changes but the date doesn't get updated, nor does clicking on the arrows update the date like the week number spinner does.  

I also notice that if you pop the calendar up from the panel clock then select another window, that the calendar doesn't go away like it used to.  Is this a deliberate design choice, or do I need to raise another bug?
Comment 6 Chani 2009-01-11 09:00:25 UTC
the calendar staying is a design choice.
Comment 7 Marco Martin 2009-01-13 22:12:46 UTC
SVN commit 910630 by mart:

switch months with mouse wheel
BUG:180226
will backport to 4.2


 M  +6 -0      calendar.cpp  
 M  +1 -0      calendar.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=910630
Comment 8 missive 2009-02-01 01:39:43 UTC
I think it is confusing that wheel forward over the week spinner goes forward in time, but wheel forward over the calendar goes backward in time.