summaryrefslogtreecommitdiffstats
path: root/gtk/src/settings.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-02-12 22:15:31 +0000
committerjstebbins <[email protected]>2009-02-12 22:15:31 +0000
commit1eaad61b3dca9500b547f5dad29708e18e3da3dc (patch)
tree08b86d6df5ebce844a34ae34546e9dcc47d7c2f9 /gtk/src/settings.c
parent2f66af83fe5b58ce2771f7c6a1e3a19dc24fbfa9 (diff)
LinGui: add video quality slider granularity preference.
I didn't have an easy way to stash doubles in a combo box, so this was more invasive that planned. But now I have some additional flexibitlity. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2154 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/settings.c')
-rw-r--r--gtk/src/settings.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/gtk/src/settings.c b/gtk/src/settings.c
index 20c1416a6..5912fba52 100644
--- a/gtk/src/settings.c
+++ b/gtk/src/settings.c
@@ -158,6 +158,12 @@ ghb_settings_combo_int(const GValue *settings, const gchar *key)
return ghb_lookup_combo_int(key, ghb_settings_get_value(settings, key));
}
+gdouble
+ghb_settings_combo_double(const GValue *settings, const gchar *key)
+{
+ return ghb_lookup_combo_double(key, ghb_settings_get_value(settings, key));
+}
+
const gchar*
ghb_settings_combo_option(const GValue *settings, const gchar *key)
{
@@ -465,7 +471,7 @@ update_widget(GtkWidget *widget, const GValue *value)
GtkTreeModel *store;
GtkTreeIter iter;
gchar *shortOpt;
- gint ivalue;
+ gdouble ivalue;
gboolean foundit = FALSE;
g_debug("combo (%s)", str);
@@ -491,7 +497,7 @@ update_widget(GtkWidget *widget, const GValue *value)
do
{
gtk_tree_model_get(store, &iter, 3, &ivalue, -1);
- if (ivalue == ival)
+ if ((gint)ivalue == ival || ivalue == dval)
{
gtk_combo_box_set_active_iter (
GTK_COMBO_BOX(widget), &iter);
@@ -510,7 +516,7 @@ update_widget(GtkWidget *widget, const GValue *value)
GtkTreeModel *store;
GtkTreeIter iter;
gchar *shortOpt;
- gint ivalue;
+ gdouble ivalue;
gboolean foundit = FALSE;
g_debug("GTK_COMBO_BOX_ENTRY");
@@ -536,7 +542,7 @@ update_widget(GtkWidget *widget, const GValue *value)
do
{
gtk_tree_model_get(store, &iter, 3, &ivalue, -1);
- if (ivalue == ival)
+ if ((gint)ivalue == ival || ivalue == dval)
{
gtk_combo_box_set_active_iter (
GTK_COMBO_BOX(widget), &iter);