diff options
author | jstebbins <[email protected]> | 2008-08-24 03:14:56 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2008-08-24 03:14:56 +0000 |
commit | b4553cd70fde71ac12974aa83dec4508f8f690ab (patch) | |
tree | bdd9fda9398c975b5c634faf1bf129a79cf8f782 /gtk/src | |
parent | 4cf0fa742fbb476ccd92372c72db6c245c11e497 (diff) |
LinGui: oops. presets weren't saved after refreshing standard presets, so the
refresh got lost after restarting the app
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1652 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src')
-rw-r--r-- | gtk/src/callbacks.c | 7 | ||||
-rw-r--r-- | gtk/src/settings.c | 2 |
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); } |