Kaydet (Commit) 8d2b2622 authored tarafından Nick Treleaven's avatar Nick Treleaven

Group prefs in order for save_dialog_prefs().

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1829 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 8e12775c
......@@ -7,6 +7,8 @@
Rename Misc., Behaviour -> Miscellaneous.
* src/plugindata.h:
Clear PluginInfo fields in PLUGIN_INFO macro for future extensions.
* src/keyfile.c:
Group prefs in order for save_dialog_prefs().
2007-08-25 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
......
......@@ -141,6 +141,8 @@ static void save_session_files(GKeyFile *config)
static void save_dialog_prefs(GKeyFile *config)
{
/* Some of the key names are not consistent, but this is for backwards compatibility */
// general
g_key_file_set_boolean(config, PACKAGE, "pref_main_load_session", prefs.load_session);
g_key_file_set_boolean(config, PACKAGE, "load_plugins", prefs.load_plugins);
......@@ -148,59 +150,61 @@ static void save_dialog_prefs(GKeyFile *config)
g_key_file_set_boolean(config, PACKAGE, "pref_main_confirm_exit", prefs.confirm_exit);
g_key_file_set_boolean(config, PACKAGE, "pref_main_suppress_search_dialogs", prefs.suppress_search_dialogs);
g_key_file_set_boolean(config, PACKAGE, "pref_main_suppress_status_messages", prefs.suppress_status_messages);
g_key_file_set_boolean(config, PACKAGE, "switch_msgwin_pages", prefs.switch_msgwin_pages);
g_key_file_set_boolean(config, PACKAGE, "beep_on_errors", prefs.beep_on_errors);
g_key_file_set_boolean(config, PACKAGE, "auto_focus", prefs.auto_focus);
g_key_file_set_string(config, PACKAGE, "default_open_path", prefs.default_open_path);
// interface
g_key_file_set_integer(config, PACKAGE, "tab_pos_editor", prefs.tab_pos_editor);
g_key_file_set_integer(config, PACKAGE, "tab_pos_msgwin", prefs.tab_pos_msgwin);
g_key_file_set_integer(config, PACKAGE, "tab_pos_sidebar", prefs.tab_pos_sidebar);
g_key_file_set_boolean(config, PACKAGE, "sidebar_symbol_visible", prefs.sidebar_symbol_visible);
g_key_file_set_boolean(config, PACKAGE, "sidebar_openfiles_visible", prefs.sidebar_openfiles_visible);
g_key_file_set_boolean(config, PACKAGE, "show_notebook_tabs", prefs.show_notebook_tabs);
g_key_file_set_boolean(config, PACKAGE, "switch_msgwin_pages", prefs.switch_msgwin_pages);
g_key_file_set_string(config, PACKAGE, "editor_font", prefs.editor_font);
g_key_file_set_string(config, PACKAGE, "tagbar_font", prefs.tagbar_font);
g_key_file_set_string(config, PACKAGE, "msgwin_font", prefs.msgwin_font);
g_key_file_set_boolean(config, PACKAGE, "show_notebook_tabs", prefs.show_notebook_tabs);
g_key_file_set_boolean(config, PACKAGE, "show_tab_cross", prefs.show_tab_cross);
g_key_file_set_boolean(config, PACKAGE, "tab_order_ltr", prefs.tab_order_ltr);
g_key_file_set_integer(config, PACKAGE, "tab_pos_editor", prefs.tab_pos_editor);
g_key_file_set_integer(config, PACKAGE, "tab_pos_msgwin", prefs.tab_pos_msgwin);
g_key_file_set_integer(config, PACKAGE, "tab_pos_sidebar", prefs.tab_pos_sidebar);
/* editor_prefs */
// display
g_key_file_set_boolean(config, PACKAGE, "show_indent_guide", editor_prefs.show_indent_guide);
g_key_file_set_boolean(config, PACKAGE, "show_white_space", editor_prefs.show_white_space);
g_key_file_set_boolean(config, PACKAGE, "show_line_endings", editor_prefs.show_line_endings);
g_key_file_set_boolean(config, PACKAGE, "show_markers_margin", editor_prefs.show_markers_margin);
g_key_file_set_boolean(config, PACKAGE, "show_linenumber_margin", editor_prefs.show_linenumber_margin);
g_key_file_set_boolean(config, PACKAGE, "show_editor_scrollbars", editor_prefs.show_scrollbars);
g_key_file_set_integer(config, PACKAGE, "long_line_type", editor_prefs.long_line_type);
g_key_file_set_integer(config, PACKAGE, "autocompletion_max_height", editor_prefs.autocompletion_max_height);
g_key_file_set_integer(config, PACKAGE, "long_line_column", editor_prefs.long_line_column);
g_key_file_set_string(config, PACKAGE, "long_line_color", editor_prefs.long_line_color);
// editor
g_key_file_set_integer(config, PACKAGE, "autocompletion_max_height", editor_prefs.autocompletion_max_height);
g_key_file_set_boolean(config, PACKAGE, "use_folding", editor_prefs.folding);
g_key_file_set_boolean(config, PACKAGE, "unfold_all_children", editor_prefs.unfold_all_children);
g_key_file_set_boolean(config, PACKAGE, "show_editor_scrollbars", editor_prefs.show_scrollbars);
g_key_file_set_integer(config, PACKAGE, "indent_mode", editor_prefs.indent_mode);
g_key_file_set_boolean(config, PACKAGE, "use_tab_to_indent", editor_prefs.use_tab_to_indent);
g_key_file_set_boolean(config, PACKAGE, "use_indicators", editor_prefs.use_indicators);
g_key_file_set_boolean(config, PACKAGE, "show_indent_guide", editor_prefs.show_indent_guide);
g_key_file_set_boolean(config, PACKAGE, "show_white_space", editor_prefs.show_white_space);
g_key_file_set_boolean(config, PACKAGE, "show_markers_margin", editor_prefs.show_markers_margin);
g_key_file_set_boolean(config, PACKAGE, "show_linenumber_margin", editor_prefs.show_linenumber_margin);
g_key_file_set_boolean(config, PACKAGE, "line_breaking", editor_prefs.line_wrapping);
g_key_file_set_boolean(config, PACKAGE, "show_line_endings", editor_prefs.show_line_endings);
g_key_file_set_boolean(config, PACKAGE, "show_tab_cross", prefs.show_tab_cross);
g_key_file_set_boolean(config, PACKAGE, "brace_match_ltgt", editor_prefs.brace_match_ltgt);
g_key_file_set_boolean(config, PACKAGE, "auto_close_xml_tags", editor_prefs.auto_close_xml_tags);
g_key_file_set_boolean(config, PACKAGE, "auto_complete_constructs", editor_prefs.auto_complete_constructs);
g_key_file_set_boolean(config, PACKAGE, "auto_complete_symbols", editor_prefs.auto_complete_symbols);
g_key_file_set_integer(config, PACKAGE, "pref_editor_tab_width", editor_prefs.tab_width);
g_key_file_set_boolean(config, PACKAGE, "pref_editor_use_tabs", editor_prefs.use_tabs);
g_key_file_set_boolean(config, PACKAGE, "pref_editor_new_line", prefs.final_new_line);
g_key_file_set_boolean(config, PACKAGE, "pref_editor_replace_tabs", prefs.replace_tabs);
g_key_file_set_boolean(config, PACKAGE, "pref_editor_trail_space", prefs.strip_trailing_spaces);
g_key_file_set_boolean(config, PACKAGE, "pref_editor_disable_dnd", editor_prefs.disable_dnd);
g_key_file_set_boolean(config, PACKAGE, "pref_editor_smart_home_key", editor_prefs.smart_home_key);
// files
g_key_file_set_string(config, PACKAGE, "pref_editor_default_new_encoding", encodings[prefs.default_new_encoding].charset);
if (prefs.default_open_encoding == -1)
g_key_file_set_string(config, PACKAGE, "pref_editor_default_open_encoding", "none");
else
g_key_file_set_string(config, PACKAGE, "pref_editor_default_open_encoding", encodings[prefs.default_open_encoding].charset);
// files
g_key_file_set_boolean(config, PACKAGE, "tab_order_ltr", prefs.tab_order_ltr);
g_key_file_set_boolean(config, PACKAGE, "pref_editor_new_line", prefs.final_new_line);
g_key_file_set_boolean(config, PACKAGE, "pref_editor_replace_tabs", prefs.replace_tabs);
g_key_file_set_boolean(config, PACKAGE, "pref_editor_trail_space", prefs.strip_trailing_spaces);
g_key_file_set_integer(config, PACKAGE, "mru_length", prefs.mru_length);
// toolbar
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment