From 2571f2011147379d8c21795b86dcaf62f3a96ee6 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Wed, 6 Dec 2023 12:14:45 -0800 Subject: [PATCH] Solve issue 856: manolo's parameter names --- FL/Fl_File_Chooser.H | 2 +- src/Fl_File_Chooser.cxx | 10 +++++----- src/Fl_File_Chooser.fl | 16 ++++++++-------- src/Fl_File_Chooser2.cxx | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/FL/Fl_File_Chooser.H b/FL/Fl_File_Chooser.H index 57af5b438..5c1276a12 100644 --- a/FL/Fl_File_Chooser.H +++ b/FL/Fl_File_Chooser.H @@ -72,7 +72,7 @@ private: void update_favorites(); void update_preview(); public: - Fl_File_Chooser(const char *d, const char *p, int t, const char *title); + Fl_File_Chooser(const char *pathname, const char *pattern, int type_val, const char *title); private: Fl_Double_Window *window; inline void cb_window_i(Fl_Double_Window*, void*); diff --git a/src/Fl_File_Chooser.cxx b/src/Fl_File_Chooser.cxx index 5cdb422f1..e726a50da 100644 --- a/src/Fl_File_Chooser.cxx +++ b/src/Fl_File_Chooser.cxx @@ -167,7 +167,7 @@ void Fl_File_Chooser::cb_favOkButton(Fl_Return_Button* o, void* v) { ((Fl_File_Chooser*)(o->parent()->parent()->user_data()))->cb_favOkButton_i(o,v); } -Fl_File_Chooser::Fl_File_Chooser(const char *d, const char *p, int t, const char *title) { +Fl_File_Chooser::Fl_File_Chooser(const char *pathname, const char *pattern, int type_val, const char *title) { if (!prefs_) { prefs_ = new Fl_Preferences(Fl_Preferences::CORE_USER, "fltk.org", "filechooser"); } @@ -315,11 +315,11 @@ Fl_File_Chooser::Fl_File_Chooser(const char *d, const char *p, int t, const char data_ = 0; directory_[0] = 0; window->size_range(window->w(), window->h(), Fl::w(), Fl::h()); - type(t); - filter(p); + type(type_val); + filter(pattern); update_favorites(); - value(d); - type(t); + value(pathname); + type(type_val); int e; prefs_->get("preview", e, 1); preview(e); diff --git a/src/Fl_File_Chooser.fl b/src/Fl_File_Chooser.fl index c7488ec84..0d5e7db0f 100644 --- a/src/Fl_File_Chooser.fl +++ b/src/Fl_File_Chooser.fl @@ -42,7 +42,7 @@ class FL_EXPORT Fl_File_Chooser {open };} { comment {\\enum Type Determines the type of file chooser presented to the user. -} selected public local +} public local } decl {static Fl_Preferences *prefs_;} {private local } @@ -76,7 +76,7 @@ Determines the type of file chooser presented to the user. } decl {void update_preview();} {private local } - Function {Fl_File_Chooser(const char *d, const char *p, int t, const char *title)} {open + Function {Fl_File_Chooser(const char *pathname, const char *pattern, int type_val, const char *title)} {open selected } { code {if (!prefs_) { prefs_ = new Fl_Preferences(Fl_Preferences::CORE_USER, "fltk.org", "filechooser"); @@ -88,7 +88,7 @@ Determines the type of file chooser presented to the user. fileList->deselect(); Fl::remove_timeout((Fl_Timeout_Handler)previewCB, this); window->hide();} open - private xywh {1171 438 490 380} type Double hide resizable + private xywh {0 0 490 380} type Double hide resizable code0 {if (title) window->label(title);} modal } { Fl_Group {} {open @@ -194,7 +194,7 @@ window->hide();} } Fl_Window favWindow { label {Manage Favorites} - private xywh {413 100 355 150} type Double hide resizable + private xywh {0 0 355 150} type Double hide resizable code0 {favWindow->label(manage_favorites_label);} modal size_range {181 150 0 0} } { Fl_File_Browser favList { @@ -245,11 +245,11 @@ window->hide();} data_ = 0; directory_[0] = 0; window->size_range(window->w(), window->h(), Fl::w(), Fl::h()); -type(t); -filter(p); +type(type_val); +filter(pattern); update_favorites(); -value(d); -type(t); +value(pathname); +type(type_val); int e; prefs_->get("preview", e, 1); preview(e); diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index 5175f61d8..94aed5f79 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -148,7 +148,7 @@ */ /** @} */ -/** \fn Fl_File_Chooser::Fl_File_Chooser(const char *pathname, const char *pattern, int type, const char *title) +/** \fn Fl_File_Chooser::Fl_File_Chooser(const char *pathname, const char *pattern, int type_val, const char *title) The constructor creates the Fl_File_Chooser dialog shown. - The \p pathname argument can be a directory name or a @@ -171,7 +171,7 @@ See the FLTK documentation on fl_filename_match() for the kinds of pattern strings that are supported. - - The \p type argument can be one of the Fl_File_Chooser::Type values. + - The \p type_val argument can be one of the Fl_File_Chooser::Type values. - The \p title argument is used to set the title bar text for the Fl_File_Chooser window.