Skip to content

Commit

Permalink
Remove FileChooser from main UI class
Browse files Browse the repository at this point in the history
Was just used for initial testing.
  • Loading branch information
kblaschke committed Mar 20, 2024
1 parent ab65aeb commit 52405a0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
20 changes: 0 additions & 20 deletions src/gui/ProjectMGUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 0 additions & 2 deletions src/gui/ProjectMGUI.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once

#include "FileChooser.h"
#include "HelpWindow.h"
#include "MainMenu.h"
#include "ToastMessage.h"
Expand Down Expand Up @@ -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<ToastMessage> _toast; //!< Current toast to be displayed.
Expand Down

0 comments on commit 52405a0

Please sign in to comment.