[babl] create double format for every model
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] create double format for every model
- Date: Sun, 12 Sep 2010 16:25:00 +0000 (UTC)
commit 992874e1fc412b091733008e37a2cc32e82f3546
Author: Rupert Weber <gimp leguanease org>
Date: Sat Sep 11 21:17:34 2010 +0200
create double format for every model
Changes babl_model_new() to create a respective double format
for every new registered model.
That way applications and extensions can rely on the double
format to always exist.
babl/babl-model.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/babl/babl-model.c b/babl/babl-model.c
index eb7eee4..4766b3b 100644
--- a/babl/babl-model.c
+++ b/babl/babl-model.c
@@ -23,6 +23,8 @@
#include "babl-internal.h"
#include "babl-db.h"
+static Babl *construct_double_format (Babl *model);
+
static int
babl_model_destroy (void *data)
{
@@ -169,6 +171,7 @@ babl_model_new (void *first_argument,
{
babl = model_new (name, id, components, component);
babl_db_insert (db, babl);
+ construct_double_format (babl);
}
else
{
@@ -224,7 +227,7 @@ static Babl *construct_double_format (Babl *model)
int i;
argument[args++] = model;
- argument[args++] = babl_type ("double");
+ argument[args++] = babl_type_from_id (BABL_DOUBLE);
for (i = 0; i < model->model.components; i++)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]