Skip to content
Snippets Groups Projects
Commit e0c88908 authored by Manolo Gouy's avatar Manolo Gouy
Browse files

Back to use of fl_file_chooser()

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7510 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
parent 590020a9
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <FL/Fl_Shared_Image.H> #include <FL/Fl_Shared_Image.H>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <FL/Fl_Native_File_Chooser.H> #include <FL/Fl_File_Chooser.H>
#include <FL/fl_message.H> #include <FL/fl_message.H>
Fl_Box *b; Fl_Box *b;
...@@ -87,12 +87,9 @@ void file_cb(const char *n) { ...@@ -87,12 +87,9 @@ void file_cb(const char *n) {
} }
void button_cb(Fl_Widget *,void *) { void button_cb(Fl_Widget *,void *) {
Fl_Native_File_Chooser fnfc; fl_file_chooser_callback(file_cb);
fnfc.title("Pick an image file"); fl_file_chooser("Image file?","*.{bm,bmp,gif,jpg,pbm,pgm,png,ppm,xbm,xpm}", name);
fnfc.type(Fl_Native_File_Chooser::BROWSE_FILE); fl_file_chooser_callback(0);
fnfc.filter("Image files\t*.{bm,bmp,gif,jpg,pbm,pgm,png,ppm,xbm,xpm}");
if ( fnfc.show() ) return;
file_cb(fnfc.filename());
} }
int dvisual = 0; int dvisual = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment