Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split geany.conf into geany.conf (preferences) and session.conf (recent files and VTE session) #2776

Merged
merged 7 commits into from Apr 7, 2021
Merged
10 changes: 5 additions & 5 deletions src/keyfile.c
Expand Up @@ -646,12 +646,11 @@ void write_config_file(gchar const *filename, ConfigPayload payload)

g_key_file_load_from_file(config, configfile, G_KEY_FILE_NONE, NULL);

/* this signal can be used e.g. to prepare any settings before Stash code reads them below */
g_signal_emit_by_name(geany_object, "save-settings", config);

switch (payload)
{
case PREFERENCES:
/* this signal can be used e.g. to prepare any settings before Stash code reads them below */
g_signal_emit_by_name(geany_object, "save-settings", config);
save_dialog_prefs(config);
save_ui_prefs(config);
project_save_prefs(config); /* save project filename, etc. */
Expand Down Expand Up @@ -1201,13 +1200,13 @@ gboolean read_config_file(gchar const *filename, ConfigPayload payload)
load_dialog_prefs(config);
load_ui_prefs(config);
project_load_prefs(config);
/* this signal can be used e.g. to delay building UI elements until settings have been read */
g_signal_emit_by_name(geany_object, "load-settings", config);
break;
case SESSION:
configuration_load_session_files(config, TRUE);
break;
}
/* this signal can be used e.g. to delay building UI elements until settings have been read */
g_signal_emit_by_name(geany_object, "load-settings", config);

g_key_file_free(config);
return TRUE;
Expand All @@ -1225,6 +1224,7 @@ gboolean configuration_load(void)
geany_debug("No user session file found, trying to use configuration file.");
session_filename = PREFERENCES_FILE;
}
g_free(session_file);
gboolean sess_loaded = read_config_file(session_filename, SESSION);
return prefs_loaded && sess_loaded;
}
Expand Down