summaryrefslogtreecommitdiffstats
path: root/gtk/src/values.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-02-11 00:34:03 +0000
committerjstebbins <[email protected]>2009-02-11 00:34:03 +0000
commite6fa09bc4f3b7b093454e34805ae491d3f5ab71d (patch)
treeda4518fbc26f7e2e27830d85f69455101f284472 /gtk/src/values.c
parentae6f965cd5438c9e9c09f3d6270ef811ecc94035 (diff)
LinGui: fix problem with writing null values to presets file
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2137 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/values.c')
-rw-r--r--gtk/src/values.c38
1 files changed, 37 insertions, 1 deletions
diff --git a/gtk/src/values.c b/gtk/src/values.c
index ad723ee68..a888d0a50 100644
--- a/gtk/src/values.c
+++ b/gtk/src/values.c
@@ -77,7 +77,43 @@ debug_show_type(GType tp)
{
str ="dict";
}
- g_debug("%s", str);
+ g_debug("Type %s", str);
+}
+
+void
+debug_show_value(GValue *gval)
+{
+ GType tp;
+
+ tp = G_VALUE_TYPE(gval);
+ if (tp == G_TYPE_STRING)
+ {
+ g_message("Type %s value %s", "string", g_value_get_string(gval));
+ }
+ else if (tp == G_TYPE_INT)
+ {
+ g_message("Type %s value %d", "int", g_value_get_int(gval));
+ }
+ else if (tp == G_TYPE_INT64)
+ {
+ g_message("Type %s value %ld", "int64", g_value_get_int64(gval));
+ }
+ else if (tp == G_TYPE_DOUBLE)
+ {
+ g_message("Type %s value %f", "double", g_value_get_double(gval));
+ }
+ else if (tp == G_TYPE_BOOLEAN)
+ {
+ g_message("Type %s value %d", "boolean", g_value_get_boolean(gval));
+ }
+ else if (tp == ghb_array_get_type())
+ {
+ g_message("Type %s", "boolean");
+ }
+ else if (tp == ghb_dict_get_type())
+ {
+ g_message("Type %s", "dict");
+ }
}
gint