diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-03-25 18:58:18 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-03-25 18:58:18 +0000 |
| commit | f5ed012b28231526a56e302a923d24f82a7fad2d (patch) | |
| tree | d02d88f5b5584d735d8e27be36dbda1949d2a191 /fluid | |
| parent | 2ccbfdccc91c9fd139ae5a6dcb48226323381a17 (diff) | |
Updated Fl_File_Chooser to correctly deselect other items when
the user picks a file or directory in multiple selection mode
(only files or directories, not both at once...)
Use the fl_file_chooser_ok_label() function in FLUID.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4191 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/Fl_Function_Type.cxx | 2 | ||||
| -rw-r--r-- | fluid/Fluid_Image.cxx | 2 | ||||
| -rw-r--r-- | fluid/fluid.cxx | 12 |
3 files changed, 10 insertions, 6 deletions
diff --git a/fluid/Fl_Function_Type.cxx b/fluid/Fl_Function_Type.cxx index 67ba7fae1..9b6b06b8c 100644 --- a/fluid/Fl_Function_Type.cxx +++ b/fluid/Fl_Function_Type.cxx @@ -780,7 +780,9 @@ void Fl_Comment_Type::open() { } else if (w == comment_load) { // load a comment from disk + fl_file_chooser_ok_label("Use File"); const char *fname = fl_file_chooser("Pick a comment", 0L, 0L); + fl_file_chooser_ok_label(NULL); if (fname) { if (comment_input->buffer()->loadfile(fname)) { fl_alert("Error loading file\n%s", fname); diff --git a/fluid/Fluid_Image.cxx b/fluid/Fluid_Image.cxx index 8bf90450b..dfcd74325 100644 --- a/fluid/Fluid_Image.cxx +++ b/fluid/Fluid_Image.cxx @@ -212,7 +212,9 @@ Fluid_Image::~Fluid_Image() { const char *ui_find_image_name; Fluid_Image *ui_find_image(const char *oldname) { goto_source_dir(); + fl_file_chooser_ok_label("Use Image"); const char *name = fl_file_chooser("Image?","Image Files (*.{bm,bmp,gif,jpg,pbm,pgm,png,ppm,xbm,xpm})",oldname,1); + fl_file_chooser_ok_label(NULL); ui_find_image_name = name; Fluid_Image *ret = (name && *name) ? Fluid_Image::find(name) : 0; leave_source_dir(); diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index 3c5f1c63d..095711a78 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -176,9 +176,9 @@ static char* cutfname(int which = 0) { void save_cb(Fl_Widget *, void *v) { const char *c = filename; if (v || !c || !*c) { - fl_ok = "Save"; + fl_file_chooser_ok_label("Save"); c=fl_file_chooser("Save To:", "FLUID Files (*.f[ld])", c); - fl_ok = "OK"; + fl_file_chooser_ok_label(NULL); if (!c) return; if (!access(c, 0)) { @@ -436,9 +436,9 @@ void open_cb(Fl_Widget *, void *v) { } const char *c; const char *oldfilename; - fl_ok = "Open"; + fl_file_chooser_ok_label("Open"); c = fl_file_chooser("Open:", "FLUID Files (*.f[ld])", filename); - fl_ok = "OK"; + fl_file_chooser_ok_label(NULL); if (!c) return; oldfilename = filename; filename = NULL; @@ -964,9 +964,9 @@ void print_cb(Fl_Return_Button *, void *) { outfile = popen(command, "w"); } else { // Print to file... - fl_ok = "Print"; + fl_file_chooser_ok_label("Print"); const char *outname = fl_file_chooser("Print To", "PostScript (*.ps)", NULL, 1); - fl_ok = "OK"; + fl_file_chooser_ok_label(NULL); if (outname && !access(outname, 0)) { if (fl_choice("The file \"%s\" already exists.\n" |
