From 94a9fb879f3bb31785ddca44c6bbaba5283da136 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Wed, 1 May 2002 12:41:21 +0000 Subject: Fix backspace "bug" in file chooser - now treat delete and backspace the same, eliminating any filename completion value. Added relative argument to fl_file_chooser() and fl_dir_chooser(); both default to 0 (return absolute paths) Give focus to the filename field in the chooser when show() is called. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2157 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_File_Chooser.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Fl_File_Chooser.cxx') diff --git a/src/Fl_File_Chooser.cxx b/src/Fl_File_Chooser.cxx index ca734ae1e..932690caf 100644 --- a/src/Fl_File_Chooser.cxx +++ b/src/Fl_File_Chooser.cxx @@ -211,6 +211,7 @@ const char * Fl_File_Chooser::label() { void Fl_File_Chooser::show() { window->hotspot(fileList); window->show(); +fileName->take_focus(); } int Fl_File_Chooser::shown() { @@ -264,6 +265,6 @@ int Fl_File_Chooser::type() { int Fl_File_Chooser::visible() { return window->visible(); } -FL_EXPORT char *fl_dir_chooser(const char *message,const char *fname); -FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname); +FL_EXPORT char *fl_dir_chooser(const char *message,const char *fname,int relative=0); +FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname,int relative=0); FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*)); -- cgit v1.2.3