From 7c054e041c9d0fe4b035fa2b4633a261ae1b36f6 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Wed, 26 Jan 2000 13:31:25 +0000 Subject: Il est possible d�sormais de passer des arguments de configuration � la commande clone comme c'est le cas pour add. --- generic/tkZinc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'generic/tkZinc.c') diff --git a/generic/tkZinc.c b/generic/tkZinc.c index 5a1a26c..f7d6622 100644 --- a/generic/tkZinc.c +++ b/generic/tkZinc.c @@ -1783,18 +1783,23 @@ WidgetCmd(ClientData client_data, /* Information about Radar widget. */ * clone */ else if ((c == 'c') && (strncmp(LangString(args[1]), "clone", length) == 0)) { - if (argc != 3) { + if (argc < 3) { Tcl_AppendResult(interp, "wrong # args: should be \"", LangString(args[0]), - "\" clone tagOrIg", NULL); + "\" clone tagOrId ?args?", NULL); goto error; } num = RadarItemsWithTagOrId(wi, LangString(args[2]), &item, &items); if (num == 0) { goto error; } + argc -= 3; + args += 3; for (i = 0; i < num; i++) { item = ITEM.CloneItem(items[i]); ITEM.InsertItem(item, items[i]->parent, RADAR_NO_ITEM, True); + if (ITEM.ConfigureItem(item, -1, argc, args, False) == RADAR_ERROR) { + goto error; + } sprintf(msg, "%d", item->id); Tcl_AppendElement(interp, msg); } -- cgit v1.1