Skip to content

Commit

Permalink
Removed the core file path from the preferences.
Browse files Browse the repository at this point in the history
The new implementation works with the id only.
  • Loading branch information
Fabian Müller committed Nov 7, 2014
1 parent 42c9475 commit d98240e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 15 deletions.
10 changes: 0 additions & 10 deletions src/preferences.cpp
Expand Up @@ -234,16 +234,6 @@ void set_allied_color(const std::string& color_id) {
prefs["ally_orb_color"] = color_id;
}

std::string wml_tree_root() {
std::string wml_tree_root = get("wml_tree_root");
if (wml_tree_root.empty())
return "_main.cfg";
return wml_tree_root;
}
void set_wml_tree_root(const std::string& wml_tree_root) {
prefs["wml_tree_root"] = wml_tree_root;
}

std::string core_id() {
std::string core_id = get("core");
if (core_id.empty())
Expand Down
3 changes: 0 additions & 3 deletions src/preferences.hpp
Expand Up @@ -55,9 +55,6 @@ namespace preferences {

config* get_prefs();

std::string wml_tree_root();
void set_wml_tree_root(const std::string& root);

std::string core_id();
void set_core_id(const std::string& root);

Expand Down
2 changes: 0 additions & 2 deletions src/wesnoth.cpp
Expand Up @@ -762,9 +762,7 @@ static int do_gameloop(const std::vector<std::string>& args)
gui2::tcore_selection core_dlg(cores, current);
if (core_dlg.show(game->disp().video())) {
int core_index = core_dlg.get_choice();
const std::string& wml_tree_root = cores[core_index]["path"];
const std::string& core_id = cores[core_index]["id"];
preferences::set_wml_tree_root(wml_tree_root);
preferences::set_core_id(core_id);
config_manager.reload_changed_game_config();
}
Expand Down

0 comments on commit d98240e

Please sign in to comment.