diff options
author | lecoanet | 2000-01-26 13:31:25 +0000 |
---|---|---|
committer | lecoanet | 2000-01-26 13:31:25 +0000 |
commit | 7c054e041c9d0fe4b035fa2b4633a261ae1b36f6 (patch) | |
tree | d078dd77b49c3e4c4c1c795301be825d89a65ee8 /generic | |
parent | e98c6305e596385d4b796f35dd21bc771873907e (diff) | |
download | tkzinc-7c054e041c9d0fe4b035fa2b4633a261ae1b36f6.zip tkzinc-7c054e041c9d0fe4b035fa2b4633a261ae1b36f6.tar.gz tkzinc-7c054e041c9d0fe4b035fa2b4633a261ae1b36f6.tar.bz2 tkzinc-7c054e041c9d0fe4b035fa2b4633a261ae1b36f6.tar.xz |
Il est possible d�sormais de passer des arguments de configuration
� la commande clone comme c'est le cas pour add.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkZinc.c | 9 |
1 files changed, 7 insertions, 2 deletions
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); } |