From 7feb5a9dfeeae416cb86e7019ffda697c94c8f90 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Mon, 6 Jun 2011 16:11:22 +0000 Subject: Added "Show hidden files" check button to the file chooser panel. This had been previously done in r.8282 and r.8286 without accounting for the existence of the Fl_File_Chooser.fl file. With this commit, files Fl_File_Chooser.{cxx, H} are properly generated by Fl_File_Chooser.fl git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8785 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_File_Chooser.fl | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'src/Fl_File_Chooser.fl') diff --git a/src/Fl_File_Chooser.fl b/src/Fl_File_Chooser.fl index bf1980dd2..c0d14fe3f 100644 --- a/src/Fl_File_Chooser.fl +++ b/src/Fl_File_Chooser.fl @@ -40,8 +40,8 @@ class FL_EXPORT Fl_File_Chooser {open decl {static Fl_Preferences prefs_;} {} decl {void (*callback_)(Fl_File_Chooser*, void *);} {} decl {void *data_;} {} - decl {char directory_[1024];} {} - decl {char pattern_[1024];} {} + decl {char directory_[FL_PATH_MAX];} {} + decl {char pattern_[FL_PATH_MAX];} {} decl {char preview_text_[2048];} {} decl {int type_;} {} decl {void favoritesButtonCB();} {} @@ -115,6 +115,12 @@ window->hide();} open xywh {10 275 73 20} down_box DOWN_BOX shortcut 0x80070 value 1 code0 {previewButton->label(preview_label);} } + Fl_Check_Button showHiddenButton { + label {Show hidden files} + callback {showHidden(showHiddenButton->value());} + xywh {115 275 165 20} down_box DOWN_BOX + code0 {showHiddenButton->label(hidden_label);} + } Fl_Box {} { private xywh {115 275 365 20} resizable } @@ -301,19 +307,15 @@ okButton->parent()->init_sizes();} {} } decl {int preview() const { return previewButton->value(); }} {public } + decl {void showHidden(int e);} {private + } + decl {void remove_hidden_files();} {private + } decl {void rescan();} {public } 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_keep_filename(); -fl_cursor(FL_CURSOR_DEFAULT); -fileName->take_focus();} {} + decl {void show();} {public } Function {shown()} {return_type int } { @@ -418,6 +420,9 @@ else decl {static const char *show_label;} { comment {[standard text may be customized at run-time]} public } + decl {static const char *hidden_label;} { + comment {[standard text may be customized at run-time]} public + } decl {static Fl_File_Sort_F *sort;} { comment {the sort function that is used when loading the contents of a directory.} public -- cgit v1.2.3