summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gtk/src/callbacks.c7
-rw-r--r--gtk/src/settings.c2
2 files changed, 6 insertions, 3 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index 192ee0e6e..9a68e4715 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -1995,11 +1995,9 @@ presets_save_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
const gchar *preset = "";
g_debug("presets_save_clicked_cb ()\n");
- // Construct the audio settings presets from the current audio list
preset = ghb_settings_get_string (ud->settings, "preset");
// Clear the description
desc = GTK_TEXT_VIEW(GHB_WIDGET(ud->builder, "preset_description"));
- //gtk_entry_set_text(desc, "");
dialog = GHB_WIDGET(ud->builder, "preset_save_dialog");
entry = GTK_ENTRY(GHB_WIDGET(ud->builder, "preset_name"));
gtk_entry_set_text(entry, preset);
@@ -2011,6 +2009,7 @@ presets_save_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
const gchar *name = gtk_entry_get_text(entry);
g_debug("description to settings\n");
ghb_widget_to_setting(ud->settings, GTK_WIDGET(desc));
+ // Construct the audio settings presets from the current audio list
update_audio_presets(ud);
ghb_settings_save(ud, name);
ghb_presets_list_update(ud);
@@ -2026,6 +2025,10 @@ presets_restore_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
// Reload only the standard presets
ghb_presets_reload(ud);
ghb_presets_list_update(ud);
+ // Updating the presets list shuffles things around
+ // need to make sure the proper preset is selected
+ const gchar *preset = ghb_settings_get_string (ud->settings, "preset");
+ ghb_select_preset(ud->builder, preset);
}
void
diff --git a/gtk/src/settings.c b/gtk/src/settings.c
index 989d1d3db..2f1604c54 100644
--- a/gtk/src/settings.c
+++ b/gtk/src/settings.c
@@ -1482,7 +1482,6 @@ void
ghb_presets_reload(signal_user_data_t *ud)
{
GKeyFile *keyFile;
- gboolean res;
g_debug("ghb_presets_reload()\n");
keyFile = g_key_file_new();
@@ -1519,6 +1518,7 @@ ghb_presets_reload(signal_user_data_t *ud)
}
g_strfreev(groups);
g_key_file_free(keyFile);
+ store_key_file(presetsKeyFile, "presets");
build_presets_list(ud->settings);
}