Tk Source Code

View Ticket
EuroTcl/OpenACS 11 - 12 JULY 2024, VIENNA
Ticket UUID: 1156388
Title: TIP#242: add -initialtype option
Type: Patch Version: TIP Implementation
Submitter: bgriffin Created on: 2005-03-04 02:03:13
Subsystem: 37. [tk_get*File] Assigned To: hobbs
Priority: 9 Immediate Severity:
Status: Closed Last Modified: 2007-10-26 04:44:08
Resolution: Fixed Closed By: hobbs
    Closed on: 2007-10-25 21:44:08
Here's the *nix and Win implementation for the
-initialtype tip. I'm assuming the macosx impl. will be
just as trivial.

User Comments: hobbs added on 2007-10-26 04:44:08:

File Added - 251347: tip242.diff

Logged In: YES 
Originator: NO

Attached is 8.5 patch contributed by Brian, massaged by me and integrated into head for 8.5b2.
File Added: tip242.diff

hobbs added on 2007-10-16 06:32:40:
Logged In: YES 
Originator: NO

I was trying to implement this, but it turns out that changes in tkfbox.tcl since the patch have affected it's applicability.  Please review - if we can get it done in the next week, it can go in.  If you diff against 8.5a3 you get the relevant actual changes.  That works for xmfbox.tcl, but not tkfbox.tcl (didn't check the .c as I was stymied by tkfbox.tcl).

bgriffin added on 2005-06-06 08:10:55:

File Added - 137338: tkfbox.tcl

Logged In: YES 

Updated tkfbox.tcl to clear filter menubutton when filetypes is empty.

bgriffin added on 2005-06-06 08:08:33:

File Added - 137337: filebox.test

bgriffin added on 2005-06-06 08:08:32:
Logged In: YES 

Updated filebox.test to reflect changes and add test for new option.

The new test uncovered a quirk (bug?) in the tkfbox that I've also fixed 
(new tkfbox.tcl to follow).

quirk: call tk_getOpenFile with a filetypes list. On the next call, use an 
empty filetypes list. The filter menu is disabled, but the grayed text still 
displays the last filter setting, even though this call contains no filters.

bgriffin added on 2005-06-06 02:11:44:

File Deleted - 137239: 

Logged In: YES 

Removing previous mac implementation.

bgriffin added on 2005-06-06 02:10:34:

File Added - 137318: tkMacOSXDialog.c

bgriffin added on 2005-06-06 02:10:33:
Logged In: YES 

I fixed a coding problem pointed out by Jim Ingham.  I also cleaned up 
warnings and two spots, lines 1013, 1037 where the warnings look like 
coding errors.  Someone should look at these and verify.

bgriffin added on 2005-06-06 01:02:26:

File Added - 137309: xmfbox.tcl

bgriffin added on 2005-06-06 01:02:25:
Logged In: YES 

Here's the Strict Motif version for this TIP.

bgriffin added on 2005-06-05 01:33:53:

File Added - 137239: tkMacOSXDialog.c

bgriffin added on 2005-06-05 01:33:52:
Logged In: YES 

Here's the macosx flavor. Later I'll try to add filetypes filtering to 
tk_getSaveFile (currently disabled). It now makes sense now since users 
can read the selected format.

hobbs added on 2005-06-02 00:32:30:
Logged In: YES 

I think that would be useful, but not a requirement to finish.

bgriffin added on 2005-06-02 00:29:05:

File Added - 136831: getOpenFile.n

bgriffin added on 2005-06-02 00:29:04:
Logged In: YES 

Here's the man page.

The Mac changes are in progress.  I should have those
tonight, hopefully. Question: currently tk_getSaveFile
ignores the filtertypes on Mac, but this enhancement makes
filtertypes useful on a Mac. Should I try and get this in also?

hobbs added on 2005-06-02 00:04:55:
Logged In: YES 

Is OS X far behind?  I'd like to not add them to 8.5a3
unless there are symmetric implementations

bgriffin added on 2005-06-01 14:02:13:

File Added - 136769: tkWinDialog.c

bgriffin added on 2005-06-01 14:02:11:
Logged In: YES 

Here's the Windows implementation.

bgriffin added on 2005-06-01 11:37:07:

File Added - 136761: tkfbox.tcl

Logged In: YES 

Here's the modified tkfbox.tcl for Unix as per the approved TIP.  I'm still 
working on Windows and Mac OS X, and the documentation.

bgriffin added on 2005-03-04 09:03:13:

File Added - 124080: initialtype.tgz