Bug 538579 - DateTime SWT.DATE and SWT.Time styles do not allow to set value
Summary: DateTime SWT.DATE and SWT.Time styles do not allow to set value
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.9   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: 4.9 RC2   Edit
Assignee: Xi Yan CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2018-09-04 06:20 EDT by Lucas Koehler CLA
Modified: 2018-09-05 09:54 EDT (History)
6 users (show)

See Also:
akurtakov: pmc_approved+


Attachments
Adapted DateTime snippet (Snippet 250) (975 bytes, text/plain)
2018-09-04 06:20 EDT, Lucas Koehler CLA
no flags Details
Broken editing of Date and Time (9.46 KB, image/png)
2018-09-04 06:23 EDT, Lucas Koehler CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Koehler CLA 2018-09-04 06:20:37 EDT
Created attachment 275673 [details]
Adapted DateTime snippet (Snippet 250)

When editing a date or a time in a DateTime configured with the SWT.DATE or SWT.TIME style bits, the editing does not work: Simply an integer is shown instead of the day, month and year for a date or the hours, minutes and seconds for a time.
This makes the widget comletely unusable with the aforementioned style bits.
Comment 1 Lucas Koehler CLA 2018-09-04 06:23:44 EDT
Created attachment 275674 [details]
Broken editing of Date and Time
Comment 2 Xi Yan CLA 2018-09-04 09:34:56 EDT
I can reproduce the issue. Also, clicking the entry seems to cause a NPE.
Comment 3 Xi Yan CLA 2018-09-04 10:23:53 EDT
This is caused by: https://git.eclipse.org/r/#/c/126598/
Comment 4 Andrey Loskutov CLA 2018-09-04 11:26:56 EDT
(In reply to Xi Yan from comment #3)
> This is caused by: https://git.eclipse.org/r/#/c/126598/

I'm sorry I have no Linux access this week. Simeon, can you please check this?
Comment 5 Xi Yan CLA 2018-09-04 11:31:59 EDT
(In reply to Andrey Loskutov from comment #4)
> (In reply to Xi Yan from comment #3)
> > This is caused by: https://git.eclipse.org/r/#/c/126598/
> 
> I'm sorry I have no Linux access this week. Simeon, can you please check
> this?

I think I have a fix right now, will upload to Gerrit after some testing.
Comment 6 Eclipse Genie CLA 2018-09-04 11:39:54 EDT
New Gerrit change created: https://git.eclipse.org/r/128655
Comment 8 Eclipse Genie CLA 2018-09-04 13:55:01 EDT
New Gerrit change created: https://git.eclipse.org/r/128665
Comment 10 Simeon Andreev CLA 2018-09-05 05:46:05 EDT
(In reply to Andrey Loskutov from comment #4)
> (In reply to Xi Yan from comment #3)
> > This is caused by: https://git.eclipse.org/r/#/c/126598/
> 
> I'm sorry I have no Linux access this week. Simeon, can you please check
> this?

I can confirm, reverting the commit from change 126598 fixes the problem. So does applying the patch from Xi Yan (change 128655).

BTW I noticed odd behaviour for the left widget of the snippet for this bug, the calendar of the GTK spin button. When clicking the plus, if the years are selected, the years go down instead of going up (by two and not by one, no less). Is this expected? Occurs both with reverted patch from bug 537364, as well as fix for this bug.

GTK 3.22.10
Comment 11 Xi Yan CLA 2018-09-05 09:35:39 EDT
(In reply to Simeon Andreev from comment #10)
> (In reply to Andrey Loskutov from comment #4)
> > (In reply to Xi Yan from comment #3)
> > > This is caused by: https://git.eclipse.org/r/#/c/126598/
> > 
> > I'm sorry I have no Linux access this week. Simeon, can you please check
> > this?
> 
> I can confirm, reverting the commit from change 126598 fixes the problem. So
> does applying the patch from Xi Yan (change 128655).
> 
> BTW I noticed odd behaviour for the left widget of the snippet for this bug,
> the calendar of the GTK spin button. When clicking the plus, if the years
> are selected, the years go down instead of going up (by two and not by one,
> no less). Is this expected? Occurs both with reverted patch from bug 537364,
> as well as fix for this bug.
> 
> GTK 3.22.10

That is odd, and it only happens with SWT.LONG style too. I filed a new bug 538648 for this.
Comment 12 Xi Yan CLA 2018-09-05 09:54:34 EDT
Verified in I20180904-2000.