diff options
| author | Manolo Gouy <Manolo> | 2011-01-16 18:26:51 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-01-16 18:26:51 +0000 |
| commit | e2ddb1715c659dac6b8e751c2b5a772e229ebf57 (patch) | |
| tree | f1e164ebef308e8b6f4bc81102c5c733a15a218d /src/Fl_File_Chooser2.cxx | |
| parent | 774880acc5baa5ad24857a184f225a351c637e23 (diff) | |
Fl_File_Chooser: added a "Show hidden files" button. Hidden files aren't shown
by default now. This removes a TODO clause.
Fl_Native_File_Chooser: removed the hack that added the "Show hidden files" button, and
made the "file already exists" warning message localizable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8282 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_File_Chooser2.cxx')
| -rw-r--r-- | src/Fl_File_Chooser2.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index d3d0d05cb..1237735ed 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -74,7 +74,11 @@ <TD>"My Computer" (WIN32)<BR> "File Systems" (all others)</TD> </TR> - <TR> + <TR> + <TD>hidden_label</TD> + <TD>"Show hidden files:"</TD> + </TR> + <TR> <TD>manage_favorites_label</TD> <TD>"Manage Favorites"</TD> </TR> @@ -98,7 +102,7 @@ <TD>show_label</TD> <TD>"Show:"</TD> </TR> - <TR> + <TR> <TD>sort</TD> <TD>fl_numericsort</TD> </TR> @@ -392,6 +396,7 @@ const char *Fl_File_Chooser::new_directory_tooltip = "Create a new directory."; const char *Fl_File_Chooser::preview_label = "Preview"; const char *Fl_File_Chooser::save_label = "Save"; const char *Fl_File_Chooser::show_label = "Show:"; +const char *Fl_File_Chooser::hidden_label = "Show hidden files"; Fl_File_Sort_F *Fl_File_Chooser::sort = fl_numericsort; @@ -1033,8 +1038,6 @@ Fl_File_Chooser::filter(const char *p) // I - Pattern(s) showChoice->add(custom_filter_label); - // TODO: add a menu item to switch hidden files on and off - showChoice->value(0); showChoiceCB(); } @@ -1147,6 +1150,7 @@ Fl_File_Chooser::rescan() // Build the file list... fileList->load(directory_, sort); + if (!show_hidden->value()) remove_hidden_files(); // Update the preview box... update_preview(); @@ -1172,6 +1176,7 @@ void Fl_File_Chooser::rescan_keep_filename() // Build the file list... fileList->load(directory_, sort); + if (!show_hidden->value()) remove_hidden_files(); // Update the preview box... update_preview(); @@ -1297,7 +1302,6 @@ Fl_File_Chooser::update_preview() int w, h; // Width and height of preview image int set = 0; // Set this flag as soon as a decent preview is found - if (!previewButton->value()) return; filename = value(); |
