27 #include <glibmm/miscutils.h> 30 #include <yaml-cpp/yaml.h> 53 m_current_filename(
""),
55 m_debug_log_filename(
"/tmp/kitlist.log") {
66 }
catch (std::exception) {
67 g_info(
"Current filename not found in config");
71 for (YAML::const_iterator it = files.begin(); it != files.end(); ++it) {
72 Glib::ustring filename = it->as<std::string>();
75 }
catch (std::exception) {
76 g_info(
"MRU file list not found in config");
80 }
catch (std::exception) {
81 g_info(
"Page title not found in config");
86 }
catch (std::exception) {
87 g_info(
"Max recent filename history count not found in config");
91 }
catch (std::exception) {
92 g_info(
"Debug log filename not found in config");
94 }
catch (std::exception ex) {
95 g_info(
"Error loading config file");
130 std::ostringstream os;
144 if (*it == filename) {
Glib::ustring m_debug_log_filename
The name of the log file to write debug information to.
Glib::ustring get_config_filename()
Glib::ustring m_current_filename
The current filename.
void add_recent_filename(Glib::ustring filename)
Adds a filename to the list of recently used filenames.
std::deque< Glib::ustring > m_mru_file_history
The history list of most recently used filenames.
gint m_max_recent_files
The list of recently used files for the recent files menu.
const std::string DEBUG_LOG_FILENAME_CONFIG_KEY
GConf entry for the page title.
const std::string DEFAULT_PAGE_TITLE
The default page title for printing.
const std::string CONFIG_FILENAME
The filename used to store the application's configuration.
const std::string CURRENT_FILENAME_CONFIG_KEY
The key used to store the value of the current filename in the configuration file.
const std::string MAX_RECENT_FILES_CONFIG_KEY
The key for the maximum number of files to maintain in the recent files menu.
const std::string RECENT_FILES_CONFIG_KEY
The key used to store the value of the current filename in the configuration file.
const std::string PAGE_TITLE_CONFIG_KEY
The key used to store the value of the page title in the configuration file.
const gint DEFAULT_MAX_RECENT_FILES
The maximum number of recent files to maintain.
void load()
Loads the configuration file.
Glib::ustring m_page_title
The title to use when printing a page or creating a PDF.
void save()
Saves the current configuration.