summaryrefslogtreecommitdiffstats
path: root/gtk/src
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-08-24 06:26:09 +0000
committerjstebbins <[email protected]>2011-08-24 06:26:09 +0000
commit3ec16036e88c9f795631f44be2e2ee1042feeca3 (patch)
treeb8b365c69a9cae9ca2f627b3197eb2db6b2f7f38 /gtk/src
parent29bda628a50afb63d649afbe090888d0d9d10269 (diff)
LinGui: fix problem with preset updates
When presets update due to new hb version, custom presets were being stepped on badly. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4192 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src')
-rw-r--r--gtk/src/presets.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/gtk/src/presets.c b/gtk/src/presets.c
index 2ee26fe6d..bc87e9a14 100644
--- a/gtk/src/presets.c
+++ b/gtk/src/presets.c
@@ -2571,7 +2571,7 @@ import_value_xlat(GValue *dict)
key = "AudioEncoderFallback";
mac_val = ghb_dict_lookup(dict, key);
- gval = import_value_xlat2(adefaults, acodec_xlat, key, mac_val);
+ gval = import_value_xlat2(defaults, acodec_xlat, key, mac_val);
if (gval)
ghb_dict_insert(dict, g_strdup(key), gval);
@@ -3062,7 +3062,7 @@ replace_standard_presets()
store_presets();
}
-static void
+static int
update_standard_presets(signal_user_data_t *ud)
{
gint count, ii;
@@ -3081,7 +3081,7 @@ update_standard_presets(signal_user_data_t *ud)
{
// Old preset that doesn't have a Type
replace_standard_presets();
- return;
+ return 1;
}
type = ghb_value_int(gval);
@@ -3092,7 +3092,7 @@ update_standard_presets(signal_user_data_t *ud)
{
// Old preset that doesn't have a build number
replace_standard_presets();
- return;
+ return 1;
}
build = ghb_value_int64(gval);
@@ -3100,11 +3100,11 @@ update_standard_presets(signal_user_data_t *ud)
{
// Build number does not match
replace_standard_presets();
- return;
+ return 1;
}
}
}
- return;
+ return 0;
}
void
@@ -3131,8 +3131,12 @@ ghb_presets_load(signal_user_data_t *ud)
import_xlat_presets(presetsPlist);
store_presets();
}
- update_standard_presets(ud);
- import_xlat_presets(presetsPlist);
+ else
+ {
+ if (!update_standard_presets(ud))
+ import_xlat_presets(presetsPlist);
+ }
+
}
static void