<AWT Dev> [10] JDK-8190515: java.awt.Desktop.moveToTrash(File) prompts on Windows 7 but not on Mac

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

<AWT Dev> [10] JDK-8190515: java.awt.Desktop.moveToTrash(File) prompts on Windows 7 but not on Mac

Shashidhara H V

Hi All, Please review a fix for the below bug.

 

Bug: https://bugs.openjdk.java.net/browse/JDK-8190515

 

Webrev:  http://cr.openjdk.java.net/~sveerabhadra/8190515/webrev.00/

 

Summary: The file delete operation generates pop up dialog in windows7 and not in other higher than windows 7 versions. To keep it consistent across the different flavors, any dialog UI is being suppressed.

 

Thanks and regards,

Shashi

Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> [10] JDK-8190515: java.awt.Desktop.moveToTrash(File) prompts on Windows 7 but not on Mac

Sergey Bylokhov
Looks fine.

On 05/12/2017 23:23, Shashidhara Veerabhadraiah wrote:

> Hi All, Please review a fix for the below bug.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8190515
>
> Webrev: http://cr.openjdk.java.net/~sveerabhadra/8190515/webrev.00/
>
> Summary: The file delete operation generates pop up dialog in windows7
> and not in other higher than windows 7 versions. To keep it consistent
> across the different flavors, any dialog UI is being suppressed.
>
> Thanks and regards,
>
> Shashi
>


--
Best regards, Sergey.
Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> [10] JDK-8190515: java.awt.Desktop.moveToTrash(File) prompts on Windows 7 but not on Mac

Philip Race
I expect I must be misunderstanding something.
The bug seems to be saying we should eliminate  confirmation dialogs but the fix reads
like it does the opposite since it removes flag bits which suppress the dialogs :
-            fop.fFlags = FOF_ALLOWUNDO;
+            fop.fFlags = FOF_ALLOWUNDO | FOF_NOCONFIRMATION | FOF_NOERRORUI;

Does not "NOCONFIRMATION" mean "no confirmation dialog" ?

The bug says "does not happen on windows 10". Maybe there was a windows 7 bug ?
So after this fix, what happens on windows 7 and 10 ? What versions was the fix tested on ?

-phil.


On 12/8/17, 5:40 PM, Sergey Bylokhov wrote:
Looks fine.

On 05/12/2017 23:23, Shashidhara Veerabhadraiah wrote:
Hi All, Please review a fix for the below bug.

Bug: https://bugs.openjdk.java.net/browse/JDK-8190515

Webrev: http://cr.openjdk.java.net/~sveerabhadra/8190515/webrev.00/

Summary: The file delete operation generates pop up dialog in windows7 and not in other higher than windows 7 versions. To keep it consistent across the different flavors, any dialog UI is being suppressed.

Thanks and regards,

Shashi



Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> [10] JDK-8190515: java.awt.Desktop.moveToTrash(File) prompts on Windows 7 but not on Mac

Shashidhara H V

Hi Phil, Below are my replies below:

 

shashi

 

From: Philip Race
Sent: Saturday, December 9, 2017 11:30 PM
To: Sergey Bylokhov <[hidden email]>
Cc: Shashidhara Veerabhadraiah <[hidden email]>; [hidden email]
Subject: Re: <AWT Dev> [10] JDK-8190515: java.awt.Desktop.moveToTrash(File) prompts on Windows 7 but not on Mac

 

I expect I must be misunderstanding something.
The bug seems to be saying we should eliminate  confirmation dialogs but the fix reads
like it does the opposite since it removes flag bits which suppress the dialogs :

-            fop.fFlags = FOF_ALLOWUNDO;
+            fop.fFlags = FOF_ALLOWUNDO | FOF_NOCONFIRMATION | FOF_NOERRORUI;
 
Does not "NOCONFIRMATION" mean "no confirmation dialog" ?
[Shashi] FOF_NOCONFIRMATION means no confirmation dialog will be popped up.
 
The bug says "does not happen on windows 10". Maybe there was a windows 7 bug ?
So after this fix, what happens on windows 7 and 10 ? What versions was the fix tested on ?
[Shashi] Before the fix, there is a pop up dialog on windows 7 and NO dialog pops up in the case of windows 10 for the same test.
After this fix, windows 7 pop up dialog gets suppressed behaving same as windows 10 now. I think probable reason  is that the implementation looks different between windows 7 and windows 10 for the file operations(SHFileOperation). With this change effective behavior is normalized across the different windows flavors.
 
-phil.



On 12/8/17, 5:40 PM, Sergey Bylokhov wrote:

Looks fine.

On 05/12/2017 23:23, Shashidhara Veerabhadraiah wrote:

Hi All, Please review a fix for the below bug.

Bug: https://bugs.openjdk.java.net/browse/JDK-8190515

Webrev: http://cr.openjdk.java.net/~sveerabhadra/8190515/webrev.00/

Summary: The file delete operation generates pop up dialog in windows7 and not in other higher than windows 7 versions. To keep it consistent across the different flavors, any dialog UI is being suppressed.

Thanks and regards,

Shashi

 

Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> [10] JDK-8190515: java.awt.Desktop.moveToTrash(File) prompts on Windows 7 but not on Mac

Philip Race
Ok. I think I was reading things a bit backwards. Looks fine.

-phil.

On 12/11/2017 07:55 AM, Shashidhara Veerabhadraiah wrote:

Hi Phil, Below are my replies below:

 

shashi

 

From: Philip Race
Sent: Saturday, December 9, 2017 11:30 PM
To: Sergey Bylokhov [hidden email]
Cc: Shashidhara Veerabhadraiah [hidden email]; [hidden email]
Subject: Re: <AWT Dev> [10] JDK-8190515: java.awt.Desktop.moveToTrash(File) prompts on Windows 7 but not on Mac

 

I expect I must be misunderstanding something.
The bug seems to be saying we should eliminate  confirmation dialogs but the fix reads
like it does the opposite since it removes flag bits which suppress the dialogs :

-            fop.fFlags = FOF_ALLOWUNDO;
+            fop.fFlags = FOF_ALLOWUNDO | FOF_NOCONFIRMATION | FOF_NOERRORUI;
 
Does not "NOCONFIRMATION" mean "no confirmation dialog" ?
[Shashi] FOF_NOCONFIRMATION means no confirmation dialog will be popped up.
 
The bug says "does not happen on windows 10". Maybe there was a windows 7 bug ?
So after this fix, what happens on windows 7 and 10 ? What versions was the fix tested on ?
[Shashi] Before the fix, there is a pop up dialog on windows 7 and NO dialog pops up in the case of windows 10 for the same test.
After this fix, windows 7 pop up dialog gets suppressed behaving same as windows 10 now. I think probable reason  is that the implementation looks different between windows 7 and windows 10 for the file operations(SHFileOperation). With this change effective behavior is normalized across the different windows flavors.
 
-phil.



On 12/8/17, 5:40 PM, Sergey Bylokhov wrote:

Looks fine.

On 05/12/2017 23:23, Shashidhara Veerabhadraiah wrote:

Hi All, Please review a fix for the below bug.

Bug: https://bugs.openjdk.java.net/browse/JDK-8190515

Webrev: http://cr.openjdk.java.net/~sveerabhadra/8190515/webrev.00/

Summary: The file delete operation generates pop up dialog in windows7 and not in other higher than windows 7 versions. To keep it consistent across the different flavors, any dialog UI is being suppressed.

Thanks and regards,

Shashi

 


Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> [10] JDK-8190515: java.awt.Desktop.moveToTrash(File) prompts on Windows 7 but not on Mac

Shashidhara H V

Thank you Sergey and Phil for the review.

 

Thanks and regards,

Shashi

 

From: Phil Race
Sent: Monday, December 11, 2017 10:22 PM
To: Shashidhara Veerabhadraiah <[hidden email]>; Sergey Bylokhov <[hidden email]>
Cc: [hidden email]
Subject: Re: <AWT Dev> [10] JDK-8190515: java.awt.Desktop.moveToTrash(File) prompts on Windows 7 but not on Mac

 

Ok. I think I was reading things a bit backwards. Looks fine.

-phil.

On 12/11/2017 07:55 AM, Shashidhara Veerabhadraiah wrote:

Hi Phil, Below are my replies below:

 

shashi

 

From: Philip Race
Sent: Saturday, December 9, 2017 11:30 PM
To: Sergey Bylokhov [hidden email]
Cc: Shashidhara Veerabhadraiah [hidden email]; [hidden email]
Subject: Re: <AWT Dev> [10] JDK-8190515: java.awt.Desktop.moveToTrash(File) prompts on Windows 7 but not on Mac

 

I expect I must be misunderstanding something.
The bug seems to be saying we should eliminate  confirmation dialogs but the fix reads
like it does the opposite since it removes flag bits which suppress the dialogs :

-            fop.fFlags = FOF_ALLOWUNDO;
+            fop.fFlags = FOF_ALLOWUNDO | FOF_NOCONFIRMATION | FOF_NOERRORUI;
 
Does not "NOCONFIRMATION" mean "no confirmation dialog" ?
[Shashi] FOF_NOCONFIRMATION means no confirmation dialog will be popped up.
 
The bug says "does not happen on windows 10". Maybe there was a windows 7 bug ?
So after this fix, what happens on windows 7 and 10 ? What versions was the fix tested on ?
[Shashi] Before the fix, there is a pop up dialog on windows 7 and NO dialog pops up in the case of windows 10 for the same test.
After this fix, windows 7 pop up dialog gets suppressed behaving same as windows 10 now. I think probable reason  is that the implementation looks different between windows 7 and windows 10 for the file operations(SHFileOperation). With this change effective behavior is normalized across the different windows flavors.
 
-phil.



On 12/8/17, 5:40 PM, Sergey Bylokhov wrote:

Looks fine.

On 05/12/2017 23:23, Shashidhara Veerabhadraiah wrote:


Hi All, Please review a fix for the below bug.

Bug: https://bugs.openjdk.java.net/browse/JDK-8190515

Webrev: http://cr.openjdk.java.net/~sveerabhadra/8190515/webrev.00/

Summary: The file delete operation generates pop up dialog in windows7 and not in other higher than windows 7 versions. To keep it consistent across the different flavors, any dialog UI is being suppressed.

Thanks and regards,

Shashi