summaryrefslogtreecommitdiffstats
path: root/gtk/src/values.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2008-09-13 20:04:28 +0000
committerjstebbins <[email protected]>2008-09-13 20:04:28 +0000
commit91ca41626288377d6a7c24bc76677e8f90378460 (patch)
treefab0e4f122b3fd80a580bdb685e8e060a3640153 /gtk/src/values.c
parent3feae357a5d62add8c0bc32753b2b679bdb8aa9a (diff)
LinGui: Add queue drag n drop reordering
Also add option to add chapter numbers to auto-generated destination name git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1693 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/values.c')
-rw-r--r--gtk/src/values.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk/src/values.c b/gtk/src/values.c
index 0f6c43285..1d41d56a8 100644
--- a/gtk/src/values.c
+++ b/gtk/src/values.c
@@ -656,6 +656,19 @@ ghb_array_get_nth(const GValue *gval, gint ii)
}
void
+ghb_array_insert(GValue *gval, guint ii, GValue *val)
+{
+ GArray *arr = g_value_get_boxed(gval);
+ // A little nastyness here. The array pointer
+ // can change when the array changes size. So
+ // I must re-box it in the GValue each time.
+ arr = g_array_insert_val(arr, ii, val);
+ memset(gval, 0, sizeof(GValue));
+ g_value_init(gval, ghb_array_get_type());
+ g_value_take_boxed(gval, arr);
+}
+
+void
ghb_array_append(GValue *gval, GValue *val)
{
GArray *arr = g_value_get_boxed(gval);