diff options
author | jstebbins <[email protected]> | 2008-10-05 22:03:09 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2008-10-05 22:03:09 +0000 |
commit | c1fa8a9521bb2401ffd9a1d09afaed7f436216af (patch) | |
tree | ad99226bb818abf2993e09b482a365f9c3f5ad30 /gtk/src/values.c | |
parent | 621d71fdc4bce76ad561968f15fc205698bd6f40 (diff) |
LinGui: nested presets and drag n drop re-ordering of presets
adding a preset always places it at the top level. drag it to where
you want it.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1816 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/values.c')
-rw-r--r-- | gtk/src/values.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/src/values.c b/gtk/src/values.c index 6013db8d8..4f6c40769 100644 --- a/gtk/src/values.c +++ b/gtk/src/values.c @@ -640,6 +640,18 @@ ghb_array_remove(GValue *gval, guint ii) g_value_take_boxed(gval, arr); } +void +ghb_array_replace(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. + if (ii >= arr->len) return; + ghb_value_free(((GValue**)arr->data)[ii]); + ((GValue**)arr->data)[ii] = val; +} + gint ghb_array_len(const GValue *gval) { |