54 size_t editor_mru_limit()
56 return std::max(
size_t(1), lexical_cast_default<size_t>(
66 std::vector<std::string> do_read_editor_mru()
70 std::vector<std::string> mru;
83 mru.resize(std::min(editor_mru_limit(), mru.size()));
88 void do_commit_editor_mru(
const std::vector<std::string>& mru)
100 child[
"path"] = entry;
102 if(++n >= editor_mru_limit()) {
113 return do_read_editor_mru();
122 std::vector<std::string> mru = do_read_editor_mru();
128 mru.insert(mru.begin(),
path);
129 mru.resize(std::min(editor_mru_limit(), mru.size()));
131 do_commit_editor_mru(mru);
140 std::vector<std::string> mru = do_read_editor_mru();
144 do_commit_editor_mru(mru);
int auto_update_transitions()
child_itors child_range(const std::string &key)
std::vector< std::string > recent_files()
Retrieves the list of recently opened files.
void set(const std::string &key, bool value)
bool draw_terrain_codes()
Definitions for the interface to Wesnoth Markup Language (WML).
std::string default_dir()
std::string get(const std::string &key)
GLsizei const char ** path
GLsizei const GLfloat * value
void set_auto_update_transitions(int value)
config & add_child(const std::string &key)
Modify, read and display user preferences.
bool draw_hex_coordinates()
Manage the empty-palette in the editor.
Templates and utility-routines for strings and numbers.
void set_child(const std::string &key, const config &val)
void remove_recent_files_entry(const std::string &path)
Removes a single entry from the recent files list.
const config & get_child(const std::string &key)
void set_draw_terrain_codes(bool value)
const std::string remove
remove directive
void set_draw_hex_coordinates(bool value)
void add_recent_files_entry(const std::string &path)
Adds an entry to the recent files list.
A config object defines a single node in a WML file, with access to child nodes.
GLsizei const GLcharARB ** string