diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-12-05 00:39:57 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-12-05 00:39:57 (GMT) |
commit | 1e3fa9b79ebe55698e2aa7d5484baec7e8400a8f (patch) | |
tree | c3581ceb7f8586f2f6822de563927a1246dd33a5 /src/glibext | |
parent | 6122bb7f34b178d4c07285adae16afcc55294b1f (diff) |
Rewritten the whole API dealing with panels.
Diffstat (limited to 'src/glibext')
-rw-r--r-- | src/glibext/configuration.c | 2 | ||||
-rw-r--r-- | src/glibext/configuration.h | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/glibext/configuration.c b/src/glibext/configuration.c index 256513a..c19f7ef 100644 --- a/src/glibext/configuration.c +++ b/src/glibext/configuration.c @@ -1541,7 +1541,7 @@ GCfgParam *_g_generic_config_add_param(GGenConfig *config, GCfgParam *param, boo if (old != NULL) { g_clear_object(¶m); - goto exit; + goto exit; } config->params = g_list_append(config->params, param); diff --git a/src/glibext/configuration.h b/src/glibext/configuration.h index 13bc1da..49a289b 100644 --- a/src/glibext/configuration.h +++ b/src/glibext/configuration.h @@ -234,6 +234,19 @@ GCfgParam *_g_generic_config_add_param(GGenConfig *, GCfgParam *, bool); }) +#define g_generic_config_create_param_if_not_exist(c, p, t, d) \ + ({ \ + GCfgParam *__result; \ + __result = g_generic_config_search(c, p); \ + if (__result == NULL) \ + { \ + __result = g_config_param_new(p, t, d); \ + __result = g_generic_config_add_param(c, __result); \ + } \ + __result; \ + }) + + #define g_generic_config_create_or_udpdate_param(c, p, t, d, v) \ ({ \ GCfgParam *__param; \ |