mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Reversion-related fixes.
To the settings window handling changes in
a189a4670f, so that the fix for #199 can
still function without the code refactoring.
This commit is contained in:
+2
-2
@@ -628,7 +628,7 @@ void Launcher::OnOpenSettings(wxCommandEvent& event) {
|
||||
GetWindowSizePos(_settings["windows"]["settings"], pos, size);
|
||||
}
|
||||
|
||||
SettingsFrame settings = SettingsFrame(this, translate("LOOT: Settings"), _settings, _games, _currentGame, pos, size);
|
||||
SettingsFrame settings = SettingsFrame(this, translate("LOOT: Settings"), _settings, _games, _game, pos, size);
|
||||
BOOST_LOG_TRIVIAL(debug) << "Settings window opened.";
|
||||
settings.ShowModal();
|
||||
|
||||
@@ -648,7 +648,7 @@ void Launcher::OnOpenSettings(wxCommandEvent& event) {
|
||||
// Fill games list again.
|
||||
for (size_t i = 0, max = _games.size(); i < max; ++i) {
|
||||
wxMenuItem * item = GameMenu->AppendRadioItem(MENU_LowestDynamicGameID + i, FromUTF8(_games[i].Name()));
|
||||
if (_games[_currentGame] == _games[i])
|
||||
if (*_game == _games[i])
|
||||
item->Check();
|
||||
|
||||
if (_games[i].IsInstalled())
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
SettingsFrame::SettingsFrame(wxWindow *parent, const wxString& title, YAML::Node& settings, std::vector<loot::Game>& games, size_t currentGameIndex, wxPoint pos, wxSize size) : wxDialog(parent, wxID_ANY, title, pos, size, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER), _settings(settings), _games(games), _currentGameIndex(currentGameIndex) {
|
||||
SettingsFrame::SettingsFrame(wxWindow *parent, const wxString& title, YAML::Node& settings, std::vector<loot::Game>& games, loot::Game * currentGame, wxPoint pos, wxSize size) : wxDialog(parent, wxID_ANY, title, pos, size, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER), _settings(settings), _games(games), _currentGame(currentGame) {
|
||||
|
||||
//Initialise drop-down list contents.
|
||||
wxString DebugVerbosity[] = {
|
||||
@@ -281,7 +281,7 @@ void SettingsFrame::OnGameSelect(wxListEvent& event) {
|
||||
|| name == loot::Game(loot::Game::tes5).Name()
|
||||
|| name == loot::Game(loot::Game::fo3).Name()
|
||||
|| name == loot::Game(loot::Game::fonv).Name()
|
||||
|| event.GetIndex() == _currentGameIndex) {
|
||||
|| name == _currentGame->Name()) {
|
||||
removeBtn->Enable(false);
|
||||
} else {
|
||||
removeBtn->Enable(true);
|
||||
|
||||
+2
-2
@@ -33,7 +33,7 @@
|
||||
|
||||
class SettingsFrame : public wxDialog {
|
||||
public:
|
||||
SettingsFrame(wxWindow *parent, const wxString& title, YAML::Node& settings, std::vector<loot::Game>& games, size_t currentGameIndex, wxPoint pos, wxSize size);
|
||||
SettingsFrame(wxWindow *parent, const wxString& title, YAML::Node& settings, std::vector<loot::Game>& games, loot::Game * currentGame, wxPoint pos, wxSize size);
|
||||
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnGameSelect(wxListEvent& event);
|
||||
@@ -55,7 +55,7 @@ private:
|
||||
|
||||
YAML::Node& _settings;
|
||||
std::vector<loot::Game>& _games;
|
||||
size_t _currentGameIndex;
|
||||
loot::Game * _currentGame;
|
||||
};
|
||||
|
||||
class GameEditDialog : public wxDialog {
|
||||
|
||||
Reference in New Issue
Block a user