Menu

#143 File-selection dialogs for the macro language

development
closed-accepted
Program (79)
5
2006-04-11
2005-11-20
Nathan Gray
No

This patch adds two functions to the macro language:

new_file_dialog(title[, path[, defaultName]])
Pops up a file selection dialog for choosing a new file. path is the initial
directory to start in - default is used if you specify "", default is location of
window running the macro. defaultName is the filename that should
appear pre-entered in the dialog.

exist_file_dialog(title[, path[, filter]])
Pops up a file selection dialog for choosing an existing file. path is
handled as above. filter is the filter to use for choosing which files to
display (e.g. "*.h").

BUGS: defaultName doesn't work. I'm not sure why, because I know that
the filename makes it to util/getfiles.c:HandleCustomNewFileSB.

Other than that I think it all works. Please test it out and comment on
what you like or dislike.

Discussion

  • Nathan Gray

    Nathan Gray - 2005-11-20

    Diff against HEAD as of 11/20/2005

     
  • Nathan Gray

    Nathan Gray - 2006-04-11
    • status: open --> closed-accepted
     
  • Nathan Gray

    Nathan Gray - 2006-04-11

    Logged In: YES
    user_id=121553

    Committed.

     

Log in to post a comment.