Tk Source Code

View Ticket
Login
Ticket UUID: 441c526c0db25bf40389b74b7e7821f13efe472
Title: MS-Win: remove Windows XP dialog variants for tk_chooseDirectory and tk_getOpenFile
Type: Bug Version: 9.1
Submitter: oehhar Created on: 2025-03-10 09:29:48
Subsystem: 63. Tk_Win Functions Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2025-03-26 18:14:20
Resolution: Fixed Closed By: oehhar
    Closed on: 2025-03-26 18:14:20
Description:

On the WIndows platform, there are still the XP style dialogs. Those may be seen by the undocumented option "-xpstyle 1".

Try those:

tk_chooseDirectory -xpstyle 0
tk_chooseDirectory -xpstyle 1
tk_getOpenFile -xpstyle 1
tk_getOpenFile -xpstyle 0

Proposal is to remove them for Tk 9.1 without a TIP. The use of the option "-xpstyle" will cause an error message.

Rationale is, that this is a left-over of the transition time around 20 years ago. If there is any doubt about the TIP requirement, I am ready to manage this, no problem.

Any comments appreciated, Harald

User Comments: oehhar added on 2025-03-26 18:14:20:

Merged to main by commit [03ce8fe9]. Ticket closed.

Thanks for all support, Harald


oehhar added on 2025-03-26 08:15:01:

Franois, no problem, you are always welcome.

If there are no objections, I will merge this to Tk 9.1 (main) branch and no other branch. I will add a note in the changed.md

Thanks for all, Harald


fvogel added on 2025-03-25 22:05:40:
Sorry, let me pass my turn on this one.

oehhar added on 2025-03-25 07:27:46:

Commit [efc82e11] removes:

  • the deprecation warning
  • the noop option "-xpstyle"

In the Monday telco, Ashok accepted those steps.

Francois, may I ask for your valuable review for this ticket ?

Thanks for all, Harald


oehhar added on 2025-03-12 09:44:11:

Thanks, Jan, I appreciate.

May I delay the final merge by one week to:

  • Eventually get Francois opinion
  • Get feed-back on the documentation change

Thanks for all, Harald


jan.nijtmans added on 2025-03-12 09:14:18:

> Any comment appreciated, Harald

Some more dead code could be removed, I removed that in the branch.

I now split off "core-9-0-branch" and re-versioned Tk trunk to 9.1. And started a GITHUB build for this branch, which is OK. So all is fine to merge this to trunk.

+1


oehhar added on 2025-03-11 12:54:15:

The current patch accepts the option "-xpstyle" as a no operation. This code is included if preprocessor variable TK_NO_DEPRECATED is not defined.

In the man page, it is documented as a no-op and its removal in 9.2 is announced.

Any comment appreciated, Harald


oehhar added on 2025-03-11 12:00:28:

Patch now in commit [683c4bb9] in branch [441c526c-mswin-xpstyle-dialogs-removal].

Also, compatibility to old compilers are removed. This may be put in again, if Mingw and frieds may require it.

Tested with MS-VS 2022 on 64 bit.

Thanks for any comments ! Harald


apnadkarni added on 2025-03-10 11:15:05:

My preference is to silently ignore the option if present instead of raising an error. There is no significant functional difference other than the UI so simply ignoring the option is less disruptive on the off-chance someone uses it.

Since the option was always undocumented (even in 8.6), I don't see the need for a TIP.

/Ashok