diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2016-09-13 00:59:04 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2016-09-13 00:59:04 +0000 |
| commit | 2bb91d900c822bec757108627af04b82b619ff46 (patch) | |
| tree | 59d00fbf9a8dc2d89f4c07d56fb0959d94f1b112 /test/native-filechooser.cxx | |
| parent | de1af41923488ecfe2770a34d012c371d02a9287 (diff) | |
Fix native file chooser test program (STR #3326).
Fix compilation error under Windows with MS compiler (Visual Studio) only.
Also fix layout and resizing behavior.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11941 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test/native-filechooser.cxx')
| -rw-r--r-- | test/native-filechooser.cxx | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/test/native-filechooser.cxx b/test/native-filechooser.cxx index 349bb3bd8..360ee4c37 100644 --- a/test/native-filechooser.cxx +++ b/test/native-filechooser.cxx @@ -3,7 +3,7 @@ // // Simple test of the Fl_Native_File_Chooser. // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // Copyright 2004 Greg Ercolano. // // This library is free software. Distribution and use rights are outlined in @@ -37,7 +37,7 @@ void PickFile_CB(Fl_Widget*, void*) { Fl_Native_File_Chooser native; native.title("Pick a file"); native.type(Fl_Native_File_Chooser::BROWSE_FILE); - native.filter(G_filter->value()); // TODO: need to add kNavSupportPackages to non-cocoa <FNFC>_MAC.cxx + native.filter(G_filter->value()); native.preset_file(G_filename->value()); // Show native chooser switch ( native.show() ) { @@ -91,8 +91,8 @@ int main(int argc, char **argv) { argn++; #endif - Fl_Window *win = new Fl_Window(680, 400, "Native File Chooser Test"); - win->size_range(300, 100, 0, 100); + Fl_Window *win = new Fl_Window(600, 380, "Native File Chooser Test"); + win->size_range(600, 380, 0, 0); win->begin(); { int x = 80, y = 10; @@ -105,7 +105,7 @@ int main(int argc, char **argv) { G_filter->value("Text\t*.txt\n" "C Files\t*.{cxx,h,c,cpp}\n" "Tars\t*.{tar,tar.gz}\n" - "Apps\t*.app"); // TODO: need to add kNavSupportPackages to non-cocoa <FNFC>_MAC.cxx + "Apps\t*.app"); G_filter->tooltip("Filter to be used for browser.\n" "An empty string may be used.\n"); @@ -120,9 +120,9 @@ int main(int argc, char **argv) { "Patterns can be:<ul>\n" " <li>A single wildcard (e.g. <tt>\"*.txt\"</tt>)</li>\n" " <li>Multiple wildcards (e.g. <tt>\"*.{cxx,h,H}\"</tt>)</li>\n" - " <li>A descriptive name followed by a "TAB" and a wildcard (e.g. <tt>\"Text Files"TAB"*.txt\"</tt>)</li>\n" + " <li>A descriptive name followed by a " TAB " and a wildcard (e.g. <tt>\"Text Files" TAB "*.txt\"</tt>)</li>\n" "</ul>\n" - "In the above \"Filter\" field, you can use <b><font color=#55f face=Courier>Ctrl-I</font></b> to enter "TAB" characters as needed.<br>\n" + "In the above \"Filter\" field, you can use <b><font color=#55f face=Courier>Ctrl-I</font></b> to enter " TAB " characters as needed.<br>\n" "Example:<pre>\n" "\n" " Text<font color=#55f><Ctrl-I></font>*.txt\n" @@ -136,9 +136,7 @@ int main(int argc, char **argv) { Fl_Button *butdir = new Fl_Button(but->x()-x-10, win->h()-25-10, 80, 25, "Pick Dir"); butdir->callback(PickDir_CB); - Fl_Box *dummy = new Fl_Box(80, 0, 430, 100); - dummy->hide(); - win->resizable(dummy); + win->resizable(G_filter); } win->end(); win->show(argc, argv); |
