summaryrefslogtreecommitdiffstats
path: root/gtk/src/values.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2008-10-15 18:39:45 +0000
committerjstebbins <[email protected]>2008-10-15 18:39:45 +0000
commit8079d10b0c22f7a7270828829286cb9947b8a99d (patch)
treee03881798433f18d5903bc102c13d48102d7eafa /gtk/src/values.c
parent5aab68603cb6b50a0a08c48497174f53ad771caf (diff)
LinGui: nested presets
new nested builtins. user can create custom folders and drag n drop custom presets. updated mac to linux presets plist translation tool to handle new format git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1835 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/values.c')
-rw-r--r--gtk/src/values.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/gtk/src/values.c b/gtk/src/values.c
index 4f6c40769..4124b0a26 100644
--- a/gtk/src/values.c
+++ b/gtk/src/values.c
@@ -45,7 +45,7 @@ ghb_value_dup(const GValue *val)
return copy;
}
-static void
+void
debug_show_type(GType tp)
{
const gchar *str = "unknown";
@@ -61,6 +61,10 @@ debug_show_type(GType tp)
{
str ="int64";
}
+ else if (tp == G_TYPE_DOUBLE)
+ {
+ str ="double";
+ }
else if (tp == G_TYPE_BOOLEAN)
{
str ="bool";
@@ -652,6 +656,22 @@ ghb_array_replace(GValue *gval, guint ii, GValue *val)
((GValue**)arr->data)[ii] = val;
}
+void
+ghb_array_copy(GValue *arr1, GValue *arr2, gint count)
+{
+ gint len, ii;
+
+ // empty the first array if it is not already empty
+ len = ghb_array_len(arr1);
+ for (ii = 0; ii < len; ii++)
+ ghb_array_remove(arr1, 0);
+
+ len = ghb_array_len(arr2);
+ count = MIN(count, len);
+ for (ii = 0; ii < count; ii++)
+ ghb_array_append(arr1, ghb_value_dup(ghb_array_get_nth(arr2, ii)));
+}
+
gint
ghb_array_len(const GValue *gval)
{