Fix which icon is shown in FLUID (had it backwards)

Set pattern, type, etc. before setting value in file chooser.  Otherwise
the filename wouldn't get highlighted the second time it was shown.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2120 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2002-04-28 08:42:33 +00:00
parent 9f5d6a0ecb
commit 11fccec026
3 changed files with 12 additions and 10 deletions
+2
View File
@@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.0rc1 CHANGES IN FLTK 1.1.0rc1
- fl_file_chooser() didn't highlight the requested file
the second time the file chooser dialog was shown.
- Fixed rendering of Fl_Light_Button with the plastic - Fixed rendering of Fl_Light_Button with the plastic
scheme. scheme.
- Fixed a bug in the MacOS font enumeration code. - Fixed a bug in the MacOS font enumeration code.
+4 -4
View File
@@ -1,5 +1,5 @@
// //
// "$Id: Fl_Type.cxx,v 1.6.2.6.2.6 2002/04/27 18:34:11 easysw Exp $" // "$Id: Fl_Type.cxx,v 1.6.2.6.2.7 2002/04/28 08:42:32 easysw Exp $"
// //
// Widget type code for the Fast Light Tool Kit (FLTK). // Widget type code for the Fast Light Tool Kit (FLTK).
// //
@@ -139,8 +139,8 @@ void Widget_Browser::item_draw(void *v, int x, int y, int, int) const {
x += 3 + 16 + l->level * 10; x += 3 + 16 + l->level * 10;
if (l->new_selected) fl_color(fl_contrast(FL_BLACK,FL_SELECTION_COLOR)); if (l->new_selected) fl_color(fl_contrast(FL_BLACK,FL_SELECTION_COLOR));
else fl_color(FL_BLACK); else fl_color(FL_BLACK);
if (l->is_public() == 0) unlock_pixmap.draw(x - 16, y); if (l->is_public() == 0) lock_pixmap.draw(x - 16, y);
else if (l->is_public() > 0) lock_pixmap.draw(x - 16, y); else if (l->is_public() > 0) unlock_pixmap.draw(x - 16, y);
if (l->is_parent()) { if (l->is_parent()) {
if (!l->next || l->next->level <= l->level) { if (!l->next || l->next->level <= l->level) {
if (l->open_!=(l==pushedtitle)) { if (l->open_!=(l==pushedtitle)) {
@@ -682,5 +682,5 @@ void Fl_Type::read_property(const char *c) {
int Fl_Type::read_fdesign(const char*, const char*) {return 0;} int Fl_Type::read_fdesign(const char*, const char*) {return 0;}
// //
// End of "$Id: Fl_Type.cxx,v 1.6.2.6.2.6 2002/04/27 18:34:11 easysw Exp $". // End of "$Id: Fl_Type.cxx,v 1.6.2.6.2.7 2002/04/28 08:42:32 easysw Exp $".
// //
+6 -6
View File
@@ -1,5 +1,5 @@
// //
// "$Id: fl_file_dir.cxx,v 1.1.2.8 2002/04/24 12:14:57 easysw Exp $" // "$Id: fl_file_dir.cxx,v 1.1.2.9 2002/04/28 08:42:33 easysw Exp $"
// //
// File chooser widget for the Fast Light Tool Kit (FLTK). // File chooser widget for the Fast Light Tool Kit (FLTK).
// //
@@ -53,6 +53,10 @@ char* fl_file_chooser(const char* message, const char* pat, const char* fname)
fc = new Fl_File_Chooser(fname, pat, Fl_File_Chooser::CREATE, message); fc = new Fl_File_Chooser(fname, pat, Fl_File_Chooser::CREATE, message);
fc->callback(callback, 0); fc->callback(callback, 0);
} else { } else {
fc->type(Fl_File_Chooser::CREATE);
fc->filter(pat);
fc->label(message);
if (!fname || !*fname) { if (!fname || !*fname) {
if (fc->filter() != pat && (!pat || !fc->filter() || if (fc->filter() != pat && (!pat || !fc->filter() ||
strcmp(pat, fc->filter())) && fc->value()) { strcmp(pat, fc->filter())) && fc->value()) {
@@ -77,10 +81,6 @@ char* fl_file_chooser(const char* message, const char* pat, const char* fname)
} }
else else
fc->value(fname); fc->value(fname);
fc->type(Fl_File_Chooser::CREATE);
fc->filter(pat);
fc->label(message);
} }
fc->show(); fc->show();
@@ -127,5 +127,5 @@ char* fl_dir_chooser(const char* message, const char* fname)
// //
// End of "$Id: fl_file_dir.cxx,v 1.1.2.8 2002/04/24 12:14:57 easysw Exp $". // End of "$Id: fl_file_dir.cxx,v 1.1.2.9 2002/04/28 08:42:33 easysw Exp $".
// //