diff --git a/src/gui/BrowserDialog.cxx b/src/gui/BrowserDialog.cxx index 0fa688d08..fa129f79b 100644 --- a/src/gui/BrowserDialog.cxx +++ b/src/gui/BrowserDialog.cxx @@ -111,7 +111,7 @@ BrowserDialog::BrowserDialog(GuiObject* boss, const GUI::Font& font, // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // static -void BrowserDialog::show(GuiObject* parent, const GUI::Font& font, +void BrowserDialog::show(Dialog* parent, const GUI::Font& font, string_view title, string_view startpath, BrowserDialog::Mode mode, const Command& command, @@ -119,9 +119,8 @@ void BrowserDialog::show(GuiObject* parent, const GUI::Font& font, { uInt32 w = 0, h = 0; - const auto* parentDialog = static_cast(parent); - if (parentDialog) { - parentDialog->getDynamicBounds(w, h); + if (parent) { + parent->getDynamicBounds(w, h); } else { w = FBMinimum::Width; h = FBMinimum::Height; @@ -141,7 +140,7 @@ void BrowserDialog::show(GuiObject* parent, const GUI::Font& font, // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // static -void BrowserDialog::show(GuiObject* parent, +void BrowserDialog::show(Dialog* parent, string_view title, string_view startpath, BrowserDialog::Mode mode, const Command& command, diff --git a/src/gui/BrowserDialog.hxx b/src/gui/BrowserDialog.hxx index e9e4c025d..f8d375f65 100644 --- a/src/gui/BrowserDialog.hxx +++ b/src/gui/BrowserDialog.hxx @@ -63,7 +63,7 @@ class BrowserDialog : public Dialog @param command The command to run when 'OK' or 'Cancel' is clicked @param namefilter Filter files/directories in browser display */ - static void show(GuiObject* parent, const GUI::Font& font, + static void show(Dialog* parent, const GUI::Font& font, string_view title,string_view startpath, BrowserDialog::Mode mode, const Command& command, @@ -80,7 +80,7 @@ class BrowserDialog : public Dialog @param command The command to run when 'OK' or 'Cancel' is clicked @param namefilter Filter files/directories in browser display */ - static void show(GuiObject* parent, + static void show(Dialog* parent, string_view title, string_view startpath, BrowserDialog::Mode mode, const Command& command,