summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-08-19 00:57:50 +0000
committerjstebbins <[email protected]>2011-08-19 00:57:50 +0000
commit893e12c0dfec55c245ac0af8c2fabcdcfa0f53ed (patch)
tree166b7a1decf5f7d6a5ca6d7f2aa267684589c2c7 /gtk
parentebc41002e0a8eef6e1dbf3f1c962a9c630b54179 (diff)
lingui: fix issues with preset values
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4187 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/hb-backend.c24
-rw-r--r--gtk/src/presets.c3
2 files changed, 20 insertions, 7 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index f5c3b1046..ef7db6866 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -968,7 +968,7 @@ static const gchar*
lookup_mix_string(const GValue *mix)
{
gint ii;
- gchar *result = "None";
+ gchar *result = "none";
if (G_VALUE_TYPE(mix) == G_TYPE_STRING)
@@ -1082,10 +1082,10 @@ lookup_audio_rate_int(const GValue *rate)
}
static const gchar*
-lookup_audio_rate_option(const GValue *rate)
+lookup_audio_rate(const GValue *rate, const char *def)
{
gint ii;
- const gchar *result = "Same as source";
+ const gchar *result = def;
if (G_VALUE_TYPE(rate) == G_TYPE_STRING)
{
@@ -1119,6 +1119,18 @@ lookup_audio_rate_option(const GValue *rate)
return result;
}
+static const gchar*
+lookup_audio_rate_option(const GValue *rate)
+{
+ return lookup_audio_rate(rate, "Same as Source");
+}
+
+static const gchar*
+lookup_audio_rate_string(const GValue *rate)
+{
+ return lookup_audio_rate(rate, "source");
+}
+
gint
ghb_find_closest_audio_rate(gint rate)
{
@@ -1144,7 +1156,7 @@ static gint
lookup_audio_bitrate_int(const GValue *rate)
{
gint ii;
- gint result = 0;
+ gint result = 160;
if (G_VALUE_TYPE(rate) == G_TYPE_STRING)
{
@@ -1182,7 +1194,7 @@ static const gchar*
lookup_audio_bitrate_option(const GValue *rate)
{
gint ii;
- const gchar *result = "Same as source";
+ const gchar *result = "160";
if (G_VALUE_TYPE(rate) == G_TYPE_STRING)
{
@@ -2743,7 +2755,7 @@ ghb_lookup_combo_string(const gchar *name, const GValue *gval)
if (strcmp(name, "AudioBitrate") == 0)
return lookup_audio_bitrate_option(gval);
else if (strcmp(name, "AudioSamplerate") == 0)
- return lookup_audio_rate_option(gval);
+ return lookup_audio_rate_string(gval);
else if (strcmp(name, "VideoFramerate") == 0)
return lookup_video_rate_option(gval);
else if (strcmp(name, "AudioMixdown") == 0)
diff --git a/gtk/src/presets.c b/gtk/src/presets.c
index 0a4d46745..241fa2b3a 100644
--- a/gtk/src/presets.c
+++ b/gtk/src/presets.c
@@ -820,7 +820,7 @@ init_settings_from_dict(
GHashTableIter iter;
gchar *key;
GValue *gval, *val;
-
+
ghb_dict_iter_init(&iter, internal);
// middle (void*) cast prevents gcc warning "defreferencing type-punned
// pointer will break strict-aliasing rules"
@@ -2411,6 +2411,7 @@ import_value_xlat2(
}
}
g_free(str);
+ return ghb_value_dup(def_val);
}
else
{