[gegl] bin: show id, and make it settable with id= prefix on commandline
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] bin: show id, and make it settable with id= prefix on commandline
- Date: Mon, 21 Jan 2019 15:13:57 +0000 (UTC)
commit 4c10c480c4278c8f947d9695a7a9f078f4623998
Author: Øyvind Kolås <pippin gimp org>
Date: Mon Jan 21 16:13:20 2019 +0100
bin: show id, and make it settable with id= prefix on commandline
bin/ui.c | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
---
diff --git a/bin/ui.c b/bin/ui.c
index 8109e573d..0e25fd477 100644
--- a/bin/ui.c
+++ b/bin/ui.c
@@ -1273,6 +1273,7 @@ cmd_todo (COMMAND_ARGS)
printf ("units in commandline\n");
printf ("crop mode\n");
printf ("polyline/bezier on screen editing\n");
+ printf ("display/setting of id\n");
printf ("interpret GUM\n");
printf ("rewrite in lua\n");
printf ("animation of properties\n");
@@ -1978,6 +1979,19 @@ static void list_node_props (State *o, GeglNode *node, int indent)
mrg_end (mrg);
mrg_text_listen_done (mrg);
+ mrg_start (mrg, "div.property", NULL);
+ mrg_start (mrg, "div.propname", NULL);
+ mrg_printf (mrg, "id");
+ mrg_end (mrg);
+ mrg_start (mrg, "div.propvalue", NULL);
+ {
+ const char *id = g_object_get_data (G_OBJECT (node), "refname");
+ if (!id) id = "";
+ mrg_printf (mrg, "%s", id);
+ }
+ mrg_end (mrg);
+ mrg_end (mrg);
+
if (pspecs)
{
for (gint i = 0; i < n_props; i++)
@@ -3290,7 +3304,16 @@ run_command (MrgEvent *event, void *data1, void *data_2)
}
else
{
- if (!strcmp (key, "op"))
+ if (!strcmp (key, "id"))
+ {
+ if (o->active)
+ {
+ /* XXX : ensure this is a unique id */
+ g_object_set_data (G_OBJECT (o->active), "refname",
+ (void*)g_intern_string (value));
+ }
+ }
+ else if (!strcmp (key, "op"))
{
char temp_op_name[1024];
if (strchr (*arg, ':'))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]