summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--src/Fl_File_Chooser.cxx2
-rw-r--r--src/Fl_File_Chooser.fl14
3 files changed, 13 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index dc7ce2822..00ffda107 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,8 @@ CHANGES IN FLTK 1.1.8
STR #1457, STR #1458, STR #1460, STR #1481, STR #1578)
- Flushing file chooser preferences after every change
to avoid data loss (STR #1609)
+ - Fixed file chooser to behave transparently to the current
+ group setting (STR #1611)
- Fixed clipping in OS X Quartz offscreen buffers
(STR 1595)
- Added Fl::set_awake_cb() to set a handler for thread
diff --git a/src/Fl_File_Chooser.cxx b/src/Fl_File_Chooser.cxx
index 5522d4f75..01dd78fd7 100644
--- a/src/Fl_File_Chooser.cxx
+++ b/src/Fl_File_Chooser.cxx
@@ -159,6 +159,7 @@ void Fl_File_Chooser::cb_favOkButton(Fl_Return_Button* o, void* v) {
}
Fl_File_Chooser::Fl_File_Chooser(const char *d, const char *p, int t, const char *title) {
+ Fl_Group *prev_current = Fl_Group::current();
{ window = new Fl_Double_Window(490, 380, "Choose File");
window->callback((Fl_Callback*)cb_window, (void*)(this));
{ Fl_Group* o = new Fl_Group(10, 10, 470, 25);
@@ -296,6 +297,7 @@ type(t);
int e;
prefs_.get("preview", e, 1);
preview(e);
+Fl_Group::current(prev_current);
}
Fl_File_Chooser::~Fl_File_Chooser() {
diff --git a/src/Fl_File_Chooser.fl b/src/Fl_File_Chooser.fl
index d45e63b55..22b529483 100644
--- a/src/Fl_File_Chooser.fl
+++ b/src/Fl_File_Chooser.fl
@@ -33,7 +33,7 @@ comment {//
decl {\#include <FL/fl_draw.H>} {}
-class FL_EXPORT Fl_File_Chooser {open selected
+class FL_EXPORT Fl_File_Chooser {open
} {
decl {enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };} {public
}
@@ -53,14 +53,16 @@ class FL_EXPORT Fl_File_Chooser {open selected
decl {void showChoiceCB();} {}
decl {void update_favorites();} {}
decl {void update_preview();} {}
- Function {Fl_File_Chooser(const char *d, const char *p, int t, const char *title)} {} {
+ Function {Fl_File_Chooser(const char *d, const char *p, int t, const char *title)} {open
+ } {
+ code {Fl_Group *prev_current = Fl_Group::current();} {}
Fl_Window window {
label {Choose File}
callback {fileName->value("");
fileList->deselect();
Fl::remove_timeout((Fl_Timeout_Handler)previewCB, this);
window->hide();}
- private xywh {403 284 490 380} type Double resizable
+ private xywh {388 284 490 380} type Double resizable
code0 {if (title) window->label(title);}
code1 {\#include <stdio.h>}
code2 {\#include <stdlib.h>}
@@ -159,7 +161,7 @@ window->hide();}
}
Fl_Window favWindow {
label {Manage Favorites}
- private xywh {421 56 355 150} type Double resizable
+ private xywh {413 100 355 150} type Double resizable
code0 {favWindow->label(manage_favorites_label);} modal size_range {181 150 0 0} visible
} {
Fl_File_Browser favList {
@@ -217,7 +219,9 @@ value(d);
type(t);
int e;
prefs_.get("preview", e, 1);
-preview(e);} {}
+preview(e);
+Fl_Group::current(prev_current);} {selected
+ }
}
Function {~Fl_File_Chooser()} {} {
code {Fl::remove_timeout((Fl_Timeout_Handler)previewCB, this);