From 7e42a63aa6482c53e13582adf95c001f47886a52 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 28 Mar 2006 15:24:14 +0000 Subject: 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 --- src/Fl_File_Chooser.fl | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/Fl_File_Chooser.fl') 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 } code2 {\#include } @@ -138,7 +138,7 @@ window->hide();} if (callback_) (*callback_)(this, data_); -window->hide();} selected +window->hide();} private xywh {313 345 85 25} code0 {\#include } 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 } { -- cgit v1.2.3