summaryrefslogtreecommitdiffstats
path: root/gtk/src/resources.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2015-04-03 17:44:19 +0000
committerjstebbins <[email protected]>2015-04-03 17:44:19 +0000
commita80e6ccc6eea8bae648e5a6cf1573361335296f2 (patch)
tree1f7f3745f7ed1251a53f7b9ffbec668317a9ebcf /gtk/src/resources.c
parent5efc8273df8372d36819391a1700314bd052ce2c (diff)
LinGui: refactor dict values
makes most dict methods a simple passthru to hb_dict git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7046 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/resources.c')
-rw-r--r--gtk/src/resources.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gtk/src/resources.c b/gtk/src/resources.c
index c0caddf72..6683f1cd7 100644
--- a/gtk/src/resources.c
+++ b/gtk/src/resources.c
@@ -31,7 +31,7 @@ ghb_resource_init()
GBytes *gbytes;
gconstpointer data;
- resources = ghb_dict_value_new();
+ resources = ghb_dict_new();
ghb_data_register_resource();
GResource *data_res = ghb_data_get_resource();
@@ -39,42 +39,42 @@ ghb_resource_init()
gbytes = g_resource_lookup_data(data_res,
"/org/handbrake/data/internal_defaults.json", 0, NULL);
data = g_bytes_get_data(gbytes, &data_size);
- val = ghb_json_parse(data, data_size);
+ val = ghb_json_parse(data);
g_bytes_unref(gbytes);
- ghb_dict_insert(resources, "internal-defaults", val);
+ ghb_dict_set(resources, "internal-defaults", val);
gbytes = g_resource_lookup_data(data_res,
"/org/handbrake/data/standard_presets.json", 0, NULL);
data = g_bytes_get_data(gbytes, &data_size);
- val = ghb_json_parse(data, data_size);
+ val = ghb_json_parse(data);
g_bytes_unref(gbytes);
- ghb_dict_insert(resources, "standard-presets", val);
+ ghb_dict_set(resources, "standard-presets", val);
gbytes = g_resource_lookup_data(data_res,
"/org/handbrake/data/widget.deps", 0, NULL);
data = g_bytes_get_data(gbytes, &data_size);
- val = ghb_json_parse(data, data_size);
+ val = ghb_json_parse(data);
g_bytes_unref(gbytes);
- ghb_dict_insert(resources, "widget-deps", val);
+ ghb_dict_set(resources, "widget-deps", val);
gbytes = g_resource_lookup_data(data_res,
"/org/handbrake/data/widget_reverse.deps", 0, NULL);
data = g_bytes_get_data(gbytes, &data_size);
- val = ghb_json_parse(data, data_size);
+ val = ghb_json_parse(data);
g_bytes_unref(gbytes);
- ghb_dict_insert(resources, "widget-reverse-deps", val);
+ ghb_dict_set(resources, "widget-reverse-deps", val);
}
GhbValue*
ghb_resource_get(const gchar *name)
{
GhbValue *result;
- result = ghb_dict_lookup(resources, name);
+ result = ghb_dict_get(resources, name);
return result;
}
void
ghb_resource_free()
{
- ghb_value_free(resources);
+ ghb_value_free(&resources);
}