diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2005-07-23 11:40:55 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2005-07-23 11:40:55 +0000 |
| commit | a84f6826475f491045d79198db94d2efb7ad8cee (patch) | |
| tree | f6d955aa36eeba44b00e59b5ba4a2d42fef2fa0b /src/Fl_File_Chooser.fl | |
| parent | 35b28fafd1a9b4d9bf67d3b01cfc1da9fad59f8c (diff) | |
In order to make the rescan effect of Fl_File_Chooser::show() more intuitive, I added a Fl::flush() to show the dialog immediatly, and changed the mouse cursor to a WAIT cursor while the rescan happens. On local Harddrives, the difference is almost invisible, but on remote connections, it should become clearer to the user what the file chooser is currently doing. (STR #827)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4447 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_File_Chooser.fl')
| -rw-r--r-- | src/Fl_File_Chooser.fl | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/Fl_File_Chooser.fl b/src/Fl_File_Chooser.fl index cccbbd3e4..f605ae0de 100644 --- a/src/Fl_File_Chooser.fl +++ b/src/Fl_File_Chooser.fl @@ -31,6 +31,9 @@ comment {// } {in_source in_header } +decl {\#include <FL/fl_draw.h>} {selected +} + class FL_EXPORT Fl_File_Chooser {open } { decl {enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };} {public @@ -51,15 +54,14 @@ class FL_EXPORT Fl_File_Chooser {open 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)} {open - } { + Function {Fl_File_Chooser(const char *d, const char *p, int t, const char *title)} {} { Fl_Window window { label {Choose File} callback {fileName->value(""); fileList->deselect(); Fl::remove_timeout((Fl_Timeout_Handler)previewCB, this); window->hide();} open - private xywh {153 80 490 380} type Double resizable + private xywh {387 242 490 380} type Double resizable code0 {if (title) window->label(title);} code1 {\#include <stdio.h>} code2 {\#include <stdlib.h>} @@ -158,7 +160,7 @@ window->hide();} } Fl_Window favWindow { label {Manage Favorites} - private xywh {580 44 355 150} type Double resizable + private xywh {580 50 355 150} type Double resizable code0 {favWindow->label(manage_favorites_label);} modal visible } { Fl_File_Browser favList { @@ -218,8 +220,7 @@ int e; prefs_.get("preview", e, 1); preview(e);} {} } - Function {~Fl_File_Chooser()} {open - } { + Function {~Fl_File_Chooser()} {} { code {Fl::remove_timeout((Fl_Timeout_Handler)previewCB, this); delete window; delete favWindow;} {} @@ -279,7 +280,7 @@ showChoiceCB();} {} } { code {return (window->label());} {} } - Function {ok_label(const char *l)} {open return_type void + Function {ok_label(const char *l)} {return_type void } { code {okButton->label(l); int w, h; @@ -301,7 +302,10 @@ okButton->resize(cancelButton->x() - 50 - w, cancelButton->y(), } { code {window->hotspot(fileList); window->show(); +Fl::flush(); +fl_cursor(FL_CURSOR_WAIT); rescan(); +fl_cursor(FL_CURSOR_DEFAULT); fileName->take_focus();} {} } Function {shown()} {return_type int @@ -399,7 +403,7 @@ decl {FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const decl {FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*));} {public } -decl {FL_EXPORT void fl_file_chooser_ok_label(const char*l);} {selected public +decl {FL_EXPORT void fl_file_chooser_ok_label(const char*l);} {public } comment { |
