From 52405a0d80d689e29d86578dad7641bee1eb0c6c Mon Sep 17 00:00:00 2001 From: Kai Blaschke Date: Wed, 20 Mar 2024 01:19:15 +0100 Subject: [PATCH] Remove FileChooser from main UI class Was just used for initial testing. --- src/gui/ProjectMGUI.cpp | 20 -------------------- src/gui/ProjectMGUI.h | 2 -- 2 files changed, 22 deletions(-) diff --git a/src/gui/ProjectMGUI.cpp b/src/gui/ProjectMGUI.cpp index 3b94562..6851751 100644 --- a/src/gui/ProjectMGUI.cpp +++ b/src/gui/ProjectMGUI.cpp @@ -178,26 +178,6 @@ void ProjectMGUI::Draw() _mainMenu.Draw(); _settingsWindow.Draw(); _helpWindow.Draw(); - - try - { - - if (_fileChooser.Draw()) - { - // Preset selected, load & switch. - std::string presetName = Poco::Path(_fileChooser.SelectedFile().path()).getFileName(); - - int ratingList[2]{}; - projectm_playlist_add_preset(_projectMWrapper->Playlist(), - _fileChooser.SelectedFile().path().c_str(), - false); - projectm_playlist_set_position(_projectMWrapper->Playlist(), projectm_playlist_size(_projectMWrapper->Playlist()) - 1, true); - } - } - catch (Poco::Exception& ex) - { - poco_error_f1(_logger, "Exception in file chooser: %s", ex.message()); - } } ImGui::Render(); diff --git a/src/gui/ProjectMGUI.h b/src/gui/ProjectMGUI.h index 336bd94..95bb085 100644 --- a/src/gui/ProjectMGUI.h +++ b/src/gui/ProjectMGUI.h @@ -1,6 +1,5 @@ #pragma once -#include "FileChooser.h" #include "HelpWindow.h" #include "MainMenu.h" #include "ToastMessage.h" @@ -147,7 +146,6 @@ class ProjectMGUI : public Poco::Util::Subsystem MainMenu _mainMenu{*this}; SettingsWindow _settingsWindow{*this}; //!< The settings window. - FileChooser _fileChooser{"Load Preset", {"milk"}}; //!< File chooser dialog. HelpWindow _helpWindow; //!< Help window with shortcuts and tips. std::unique_ptr _toast; //!< Current toast to be displayed.