Branch: refs/heads/master Author: Enrico Tröger enrico.troeger@uvena.de Committer: Enrico Tröger enrico.troeger@uvena.de Date: Thu, 03 Oct 2019 08:01:10 UTC Commit: ffae809a6c85ebd23db3edccfc8298e4d7a5ae27 https://github.com/geany/geany/commit/ffae809a6c85ebd23db3edccfc8298e4d7a5ae...
Log Message: ----------- Add setting, defaulting to TRUE, to disable automatic configuration save
Modified Paths: -------------- doc/geany.txt src/document.h src/keyfile.c
Modified: doc/geany.txt 14 lines changed, 12 insertions(+), 2 deletions(-) =================================================================== @@ -2636,6 +2636,16 @@ reload_clean_doc_on_file_change Whether to automatically reload documents f on disk. If unsaved changes exist then the user is prompted to reload manually. +save_config_on_file_change Automatically save Geany's configuration true immediately + to disk once the document list changes + (i.e. new documents are opened, saved or + closed). This helps to prevent accidentally + losing the session file list or other + changed settings when Geany is not shut + down cleanly. Disable this option if your + configuration directory is on a slow drive, + network share or similar and you experience + problems. extract_filetype_regex Regex to extract filetype name from file See link immediately via capture group one. See `ft_regex`_ for default. @@ -4714,8 +4724,8 @@ The key names cannot be configured. Group membership is only read at startup.
.. tip:: - You can make commonly used filetypes appear in the top-level of the - filetype menu by adding them to the `None` group, e.g. + You can make commonly used filetypes appear in the top-level of the + filetype menu by adding them to the `None` group, e.g. `None=C;Python`.
Preferences file format
Modified: src/document.h 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -66,6 +66,7 @@ typedef struct GeanyFilePrefs gboolean keep_edit_history_on_reload; /* Keep undo stack upon, and allow undoing of, document reloading. */ gboolean show_keep_edit_history_on_reload_msg; /* whether to show the message introducing the above feature */ gboolean reload_clean_doc_on_file_change; + gboolean save_config_on_file_change; } GeanyFilePrefs;
Modified: src/keyfile.c 7 lines changed, 5 insertions(+), 2 deletions(-) =================================================================== @@ -259,6 +259,8 @@ static void init_pref_groups(void) "show_keep_edit_history_on_reload_msg", TRUE); stash_group_add_boolean(group, &file_prefs.reload_clean_doc_on_file_change, "reload_clean_doc_on_file_change", FALSE); + stash_group_add_boolean(group, &file_prefs.save_config_on_file_change, + "save_config_on_file_change", TRUE); stash_group_add_string(group, &file_prefs.extract_filetype_regex, "extract_filetype_regex", GEANY_DEFAULT_FILETYPE_REGEX); stash_group_add_boolean(group, &ui_prefs.allow_always_save, @@ -275,7 +277,7 @@ static void init_pref_groups(void) /* Note: Interface-related various prefs are in ui_init_prefs() */
/* various build-menu prefs */ - // Warning: don't move PACKAGE group name items here + // Warning: don't move PACKAGE group name items here group = stash_group_new("build-menu"); configuration_add_various_pref_group(group, "build");
@@ -1346,7 +1348,8 @@ static void document_list_changed_cb(GObject *obj, GeanyDocument *doc, gpointer
/* save configuration, especially session file list, but only if we are not just starting * and not about to quit */ - if (main_status.main_window_realized && + if (file_prefs.save_config_on_file_change && + main_status.main_window_realized && !main_status.opening_session_files && !main_status.quitting) {
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).