summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorIan MacArthur <imacarthur@gmail.com>2010-01-14 18:42:13 +0000
committerIan MacArthur <imacarthur@gmail.com>2010-01-14 18:42:13 +0000
commit7c3ae1559b15b73387c00e9c6dfa3b032144b60e (patch)
treed2935297a6c000e372ee05ea9122a48ce3b5cc91 /test
parentfa7ce4cb92fff8bcccd5dc93950a0087e9137046 (diff)
I've tweaked the demo.menu to include Greg's new native file chooser test alongside the
existing fltk file chooser test. Also, I've taken the liberty of making the native file chooser load the system icons by default (Greg had them not loaded by default, but I think it looks better with them...) and I have adjusted the Makefile accordingly to make the linked libraries match. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7000 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test')
-rw-r--r--test/Makefile4
-rw-r--r--test/demo.menu1
-rw-r--r--test/native-filechooser.cxx16
3 files changed, 16 insertions, 5 deletions
diff --git a/test/Makefile b/test/Makefile
index 6479e2c61..89aea556c 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -379,7 +379,9 @@ message$(EXEEXT): message.o
minimum$(EXEEXT): minimum.o
-native-filechooser$(EXEEXT): native-filechooser.o
+native-filechooser$(EXEEXT): native-filechooser.o $(IMGLIBNAME)
+ echo Linking $@...
+ $(CXX) $(ARCHFLAGS) $(LDFLAGS) native-filechooser.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
navigation$(EXEEXT): navigation.o
diff --git a/test/demo.menu b/test/demo.menu
index 6ac3b78de..f3f0ebb90 100644
--- a/test/demo.menu
+++ b/test/demo.menu
@@ -68,6 +68,7 @@
@main:Other\nTests:@o
@o:Color Choosers:color_chooser r
@o:File Chooser:file_chooser
+ @o:Native File Chooser:native-filechooser
@o:Font Tests:@of
@of:Fonts:fonts
@of:UTF-8:utf8
diff --git a/test/native-filechooser.cxx b/test/native-filechooser.cxx
index e4655e6e6..57522ec96 100644
--- a/test/native-filechooser.cxx
+++ b/test/native-filechooser.cxx
@@ -60,12 +60,15 @@ void Butt_CB(Fl_Widget*, void*) {
}
int main(int argc, char **argv) {
- //// For a nicer looking browser under linux, uncomment the following line.
+ //// For a nicer looking browser under linux, call Fl_File_Icon::load_system_icons();
//// (If you do this, you'll need to link with fltk_images)
- ////
- //// Fl_File_Icon::load_system_icons();
+ //// NOTE: If you do not load the system icons, the file chooser will still work, but
+ //// no icons will be shown. However, this means you do not need to link in the
+ //// fltk_images library, potentially reducing the size of your executable.
+ //// Loading the system icons is not required by the OSX or Windows native file choosers.
+ Fl_File_Icon::load_system_icons();
- Fl_Window *win = new Fl_Window(600, 100, "FLTK Window");
+ Fl_Window *win = new Fl_Window(600, 100, "Native File Chooser Test");
win->begin();
{
int y = 10;
@@ -81,3 +84,8 @@ int main(int argc, char **argv) {
win->show();
return(Fl::run());
}
+
+//
+// End of "$Id$".
+//
+