Hi All,

Please review a fix for an issue where "Properties" button in ServiceUI.printDialog is enabled in windows but clicking it doesn't show any dialog.

According to JDK-4673406 <https://bugs.openjdk.java.net/browse/JDK-4673406>, the properties dialog isn't supported for direct uses with javax.print.ServiceUI.printDialog, so it makes sense to disable this properies button for this usecase.

This button is disabled in linux,mac already. This is because, as per

http://hg.openjdk.java.net/jdk/client/annotate/754ec520eb4a/src/java.desktop/share/classes/sun/print/ServiceDialog.java#l964

the button is disabled if ServiceUIFactory is null and for linux/mac, it is null

http://hg.openjdk.java.net/jdk/client/file/754ec520eb4a/src/java.desktop/unix/classes/sun/print/IPPPrintService.java#l1637
http://hg.openjdk.java.net/jdk/client/file/754ec520eb4a/src/java.desktop/share/classes/sun/print/PSStreamPrintService.java#l490

but for windows, it created "Win32ServiceUIFactory" but it does not handle the properties dialog if "role" requested to be performed by ServiceUI is <= ServiceUIFactory.MAIN_UIROLE

[http://hg.openjdk.java.net/jdk/client/file/754ec520eb4a/src/java.desktop/windows/classes/sun/print/Win32PrintService.java#l1688]

Proposed fix is to make sure this role is accounted for in the buttonProperties enabling check.

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

webrev: http://cr.openjdk.java.net/~psadhukhan/8246742/webrev.0/

Regards
Prasanta

Reply via email to