diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2006-03-28 15:24:14 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2006-03-28 15:24:14 +0000 |
| commit | 7e42a63aa6482c53e13582adf95c001f47886a52 (patch) | |
| tree | b01b6f9f27fc9e81c7f4940860a2c47dd676b25c /src/Fl_File_Chooser.fl | |
| parent | 37518df9b3a5634cb3e10b5a6e97acc0be209178 (diff) | |
ST 1148: a preselected filename will also be selected in the file chooser when popping up. I put a lot of effort into trying to make the chooser behave as it previously did in all other situations, e.g. to choose a directory
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4875 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_File_Chooser.fl')
| -rw-r--r-- | src/Fl_File_Chooser.fl | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/Fl_File_Chooser.fl b/src/Fl_File_Chooser.fl index 8cbd9f588..6dfaa315b 100644 --- a/src/Fl_File_Chooser.fl +++ b/src/Fl_File_Chooser.fl @@ -61,7 +61,7 @@ class FL_EXPORT Fl_File_Chooser {open fileList->deselect(); Fl::remove_timeout((Fl_Timeout_Handler)previewCB, this); window->hide();} - private xywh {387 242 490 380} type Double resizable + private xywh {368 285 490 380} type Double resizable code0 {if (title) window->label(title);} code1 {\#include <stdio.h>} code2 {\#include <stdlib.h>} @@ -138,7 +138,7 @@ window->hide();} if (callback_) (*callback_)(this, data_); -window->hide();} selected +window->hide();} private xywh {313 345 85 25} code0 {\#include <FL/fl_ask.H>} code1 {okButton->label(fl_ok);} @@ -160,7 +160,7 @@ window->hide();} } Fl_Window favWindow { label {Manage Favorites} - private xywh {437 187 355 150} type Double resizable + private xywh {421 56 355 150} type Double resizable code0 {favWindow->label(manage_favorites_label);} modal size_range {181 150 0 0} visible } { Fl_File_Browser favList { @@ -299,15 +299,18 @@ okButton->parent()->init_sizes();} {} } decl {void rescan();} {public } - Function {show()} {return_type void + decl {void rescan_keep_filename();} {public + } + Function {show()} {open return_type void } { code {window->hotspot(fileList); window->show(); Fl::flush(); fl_cursor(FL_CURSOR_WAIT); -rescan(); +rescan_keep_filename(); fl_cursor(FL_CURSOR_DEFAULT); -fileName->take_focus();} {} +fileName->take_focus();} {selected + } } Function {shown()} {return_type int } { |
