From 15208b5875fbfc53480941750bc8afae7b5f90a7 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Fri, 19 Sep 2008 00:19:46 +0000 Subject: LinGui: tidy up how combobox values are handled internally and stored in plists fix a problem with storing max picture dims to presets plist git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1719 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- gtk/src/presets.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'gtk/src/presets.c') diff --git a/gtk/src/presets.c b/gtk/src/presets.c index 8f8a0cd65..e3ec46591 100644 --- a/gtk/src/presets.c +++ b/gtk/src/presets.c @@ -745,19 +745,22 @@ ghb_settings_save(signal_user_data_t *ud, const gchar *name) while (g_hash_table_iter_next( &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&value)) { + const GValue *gval; + gchar *key2; + + key2 = key; if (!autoscale) { - if (strcmp(key, "scale_width")) + if (strcmp(key, "max_width") == 0) { - key = "max_width"; + key2 = "scale_width"; } - if (strcmp(key, "scale_height")) + else if (strcmp(key, "max_height") == 0) { - key = "max_height"; + key2 = "scale_height"; } } - const GValue *gval; - gval = ghb_settings_get_value(ud->settings, key); + gval = ghb_settings_get_value(ud->settings, key2); if (gval == NULL) { g_debug("Setting (%s) is not in defaults\n", (gchar*)key); -- cgit v1.2.3