diff --git a/crates/mcp/src/ui_catalog.rs b/crates/mcp/src/ui_catalog.rs index 265c1eb0d1..88f60fd6c8 100644 --- a/crates/mcp/src/ui_catalog.rs +++ b/crates/mcp/src/ui_catalog.rs @@ -1788,6 +1788,12 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ "", "{mode?: \"replace\" | \"append\"} Reset Actions. replace (the default) replaces every set in the Actions panel with a new copy of the built-in Default Actions set, makes it current and selected, clears the panel's selected action and step and its expanded actions, and closes an open Set Options, New Action, Batch or step dialog that names a set; when the panel already shows only the built-in set as it comes in that state, nothing changes, the sets keep their ids and changed is false. append adds a new copy of the built-in set after the sets there are, with the next free number when its name is in use (Default Actions 2), and keeps the current set and the selection. Omitted params count as {}. Params of another type, another key, another mode, or a reset while an action records or plays (also while it waits at a stop) is an error and changes nothing. No undo step is recorded. The panel menu's Reset Actions asks first (dialog `resetActions`): OK runs this with replace, Append with append → {changed, mode, set: the first built-in set's index}", ), + ( + "ui.actionSet.clear", + "Clear Actions", + "", + "{ids?: [id]} Clear Actions: delete every set in the Actions panel with its actions, the built-in Default Actions set included, so no set is current or selected; the panel's selected action and step and its expanded actions are cleared, and an open Set Options, New Action, Batch or step dialog that names a set closes. ids holds the panel's own set ids in panel order, which the menu's question passes: when the sets are no longer exactly those, nothing is deleted. With no sets, nothing changes and cleared is 0. Omitted params count as {}. Params of another type, another key, ids that is not a list of ids, or a clear while an action records or plays (also while it waits at a stop) is an error and changes nothing. No undo step is recorded. The panel menu's Clear Actions (disabled with no sets and while an action records or plays) asks first, and OK runs this → {cleared: the number of sets deleted}", + ), ("file.showPackage", "Show Package", "", "{folder} show a package folder (file.package's folder) in the file manager → {folder}"), ( "docInfo.save", diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index cb5e3798bb..d371a5f1e4 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -842,6 +842,7 @@ font-technology Variable Променливи Duplicate Action or Action Set Дублиране на действие или набор от действия Delete the action set “{name}” and its actions? Изтриване на набора от действия „{name}“ и неговите действия? Delete the selected action sets and their actions? Изтриване на избраните набори от действия и техните действия? + Delete all action sets and their actions? Изтриване на всички набори от действия и техните действия? Delete Theme Изтриване на тема Delete theme Изтриване на тема Delete these {n} graphic styles? Изтриване на тези {n} графични стила? @@ -2649,6 +2650,7 @@ font-technology Variable Променливи Save Actions… Запазване на действия… Load Actions… Зареждане на действия… Replace Actions… Замяна на действия… + Clear Actions Изчистване на действия Reset Actions Нулиране на действия Replace the current actions with the default set? Да се заменят ли текущите действия с набора по подразбиране? Append adds the default set after the current sets instead. С „Добавяне“ наборът по подразбиране се добавя след текущите набори. diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index 48e96acc29..00d07d469d 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -1564,6 +1564,7 @@ lighting Light Svjetlo Save Actions… Sačuvaj akcije… Load Actions… Učitaj akcije… Replace Actions… Zamijeni akcije… + Clear Actions Očisti akcije Reset Actions Vrati akcije na početno Replace the current actions with the default set? Zamijeniti trenutne akcije zadanim skupom? Append adds the default set after the current sets instead. Dugme Dodaj umjesto toga dodaje zadani skup iza trenutnih skupova. @@ -1868,6 +1869,7 @@ digits Malayalam Malajalam Duplicate Action or Action Set Dupliciraj akciju ili skup akcija Delete the action set “{name}” and its actions? Izbrisati skup akcija „{name}” i njegove akcije? Delete the selected action sets and their actions? Izbrisati odabrane skupove akcija i njihove akcije? + Delete all action sets and their actions? Izbrisati sve skupove akcija i njihove akcije? Delete these {n} graphic styles? Izbrisati ove grafičke stilove ({n})? Delete this {n} graphic style? Izbrisati ovaj grafički stil ({n})? Graphic Style Libraries Menu Meni biblioteka grafičkih stilova diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index a92adb15eb..78e5a77c9e 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -1227,6 +1227,7 @@ antiAlias Sharp Nítid Duplicate Action or Action Set Duplica l’acció o el conjunt d’accions Delete the action set “{name}” and its actions? Voleu suprimir el conjunt d’accions “{name}” i les seves accions? Delete the selected action sets and their actions? Voleu suprimir els conjunts d’accions seleccionats i les seves accions? + Delete all action sets and their actions? Voleu suprimir tots els conjunts d’accions i les seves accions? Delete the library “{name}”? Voleu suprimir la biblioteca “{name}”? Delete Theme Suprimeix el tema Delete theme Suprimeix el tema @@ -3427,6 +3428,7 @@ digits Malayalam Malaiàlam Save Actions… Desa les accions… Load Actions… Carrega accions… Replace Actions… Reemplaça les accions… + Clear Actions Esborra les accions Reset Actions Restableix les accions Replace the current actions with the default set? Voleu reemplaçar les accions actuals pel conjunt predeterminat? Append adds the default set after the current sets instead. Amb Afegeix, el conjunt predeterminat s’afegeix després dels conjunts actuals. diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 02edbb7fa6..bd3e76ec50 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -1593,6 +1593,7 @@ lighting Light Světlo Save Actions… Uložit akce… Load Actions… Načíst akce… Replace Actions… Nahradit akce… + Clear Actions Vymazat akce Reset Actions Obnovit akce Replace the current actions with the default set? Nahradit aktuální akce výchozí sadou? Append adds the default set after the current sets instead. Tlačítko Připojit místo toho přidá výchozí sadu za aktuální sady. @@ -1940,6 +1941,7 @@ digits Malayalam Malajálamské Duplicate Action or Action Set Duplikovat akci nebo sadu akcí Delete the action set “{name}” and its actions? Odstranit sadu akcí „{name}“ a její akce? Delete the selected action sets and their actions? Odstranit vybrané sady akcí a jejich akce? + Delete all action sets and their actions? Odstranit všechny sady akcí a jejich akce? Delete these {n} graphic styles? Odstranit tyto grafické styly ({n})? Delete this {n} graphic style? Odstranit tento grafický styl ({n})? Graphic Style Libraries Menu Nabídka knihoven grafických stylů diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index 76ef50c8b2..3fb128a27a 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -4222,6 +4222,7 @@ lighting Light Lys Save Actions… Gem handlinger… Load Actions… Indlæs handlinger… Replace Actions… Erstat handlinger… + Clear Actions Ryd handlinger Reset Actions Nulstil handlinger Replace the current actions with the default set? Vil du erstatte de aktuelle handlinger med standardsættet? Append adds the default set after the current sets instead. Tilføj tilføjer i stedet standardsættet efter de aktuelle sæt. @@ -4566,6 +4567,7 @@ digits Malayalam Malayalam Duplicate Action or Action Set Duplikér handling eller handlingssæt Delete the action set “{name}” and its actions? Slet handlingssættet »{name}« og dets handlinger? Delete the selected action sets and their actions? Slet de markerede handlingssæt og deres handlinger? + Delete all action sets and their actions? Slet alle handlingssæt og deres handlinger? Delete these {n} graphic styles? Slet disse {n} grafiske typografier? Delete this {n} graphic style? Slet denne {n} grafiske typografi? Graphic Style Libraries Menu Menu med biblioteker af grafiske typografier diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 2e0469f29b..6ad4e3850b 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -854,6 +854,7 @@ font-technology Variable Variabel Duplicate Action or Action Set Aktion oder Aktionssatz duplizieren Delete the action set “{name}” and its actions? Aktionssatz „{name}“ und seine Aktionen löschen? Delete the selected action sets and their actions? Ausgewählte Aktionssätze und ihre Aktionen löschen? + Delete all action sets and their actions? Alle Aktionssätze und ihre Aktionen löschen? Delete Theme Thema löschen Delete theme Thema löschen Delete these {n} graphic styles? Diese {n} Grafikstile löschen? @@ -2715,6 +2716,7 @@ diagnostics ui Oberfläche Save Actions… Aktionen speichern… Load Actions… Aktionen laden… Replace Actions… Aktionen ersetzen… + Clear Actions Aktionen löschen Reset Actions Aktionen zurücksetzen Replace the current actions with the default set? Aktuelle Aktionen durch den Standardsatz ersetzen? Append adds the default set after the current sets instead. Mit „Anhängen“ wird der Standardsatz stattdessen nach den aktuellen Sätzen hinzugefügt. diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 220e82af73..7d2e5b6363 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -827,6 +827,7 @@ font-technology Variable Μεταβλητές Duplicate Action or Action Set Δημιουργία αντιγράφου ενέργειας ή συνόλου ενεργειών Delete the action set “{name}” and its actions? Να διαγραφεί το σύνολο ενεργειών «{name}» και οι ενέργειές του; Delete the selected action sets and their actions? Να διαγραφούν τα επιλεγμένα σύνολα ενεργειών και οι ενέργειές τους; + Delete all action sets and their actions? Να διαγραφούν όλα τα σύνολα ενεργειών και οι ενέργειές τους; Delete Theme Διαγραφή θέματος Delete theme Διαγραφή θέματος Delete these {n} graphic styles? Να διαγραφούν αυτά τα {n} στυλ γραφικών; @@ -3660,6 +3661,7 @@ theme Appearance Εμφάνιση Save Actions… Αποθήκευση ενεργειών… Load Actions… Φόρτωση ενεργειών… Replace Actions… Αντικατάσταση ενεργειών… + Clear Actions Απαλοιφή ενεργειών Reset Actions Επαναφορά ενεργειών Replace the current actions with the default set? Να αντικατασταθούν οι τρέχουσες ενέργειες με το προεπιλεγμένο σύνολο; Append adds the default set after the current sets instead. Η Προσάρτηση προσθέτει αντί γι’ αυτό το προεπιλεγμένο σύνολο μετά τα τρέχοντα σύνολα. diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 0a26f838e7..06f80b565e 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -873,6 +873,7 @@ font-technology Variable Variables Duplicate Action or Action Set Duplicar acción o conjunto de acciones Delete the action set “{name}” and its actions? ¿Eliminar el conjunto de acciones “{name}” y sus acciones? Delete the selected action sets and their actions? ¿Eliminar los conjuntos de acciones seleccionados y sus acciones? + Delete all action sets and their actions? ¿Eliminar todos los conjuntos de acciones y sus acciones? Delete Theme Eliminar tema Delete theme Eliminar tema Delete these {n} graphic styles? ¿Eliminar estos {n} estilos gráficos? @@ -2755,6 +2756,7 @@ font-technology Variable Variables Save Actions… Guardar acciones… Load Actions… Cargar acciones… Replace Actions… Reemplazar acciones… + Clear Actions Borrar acciones Reset Actions Restablecer acciones Replace the current actions with the default set? ¿Reemplazar las acciones actuales por el conjunto predeterminado? Append adds the default set after the current sets instead. Añadir agrega en su lugar el conjunto predeterminado después de los conjuntos actuales. diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 75ce0963af..873d339833 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -1562,6 +1562,7 @@ lighting Light Valo Save Actions… Tallenna toiminnot… Load Actions… Lataa toiminnot… Replace Actions… Korvaa toiminnot… + Clear Actions Tyhjennä toiminnot Reset Actions Palauta toiminnot Replace the current actions with the default set? Korvataanko nykyiset toiminnot oletussarjalla? Append adds the default set after the current sets instead. Lisää-painike lisää sen sijaan oletussarjan nykyisten sarjojen perään. @@ -1911,6 +1912,7 @@ digits Malayalam Malajalam Duplicate Action or Action Set Monista toiminto tai toimintosarja Delete the action set “{name}” and its actions? Poistetaanko toimintosarja ”{name}” ja sen toiminnot? Delete the selected action sets and their actions? Poistetaanko valitut toimintosarjat ja niiden toiminnot? + Delete all action sets and their actions? Poistetaanko kaikki toimintosarjat ja niiden toiminnot? Delete these {n} graphic styles? Poistetaanko nämä {n} grafiikkatyyliä? Delete this {n} graphic style? Poistetaanko tämä {n} grafiikkatyyli? Graphic Style Libraries Menu Grafiikkatyylikirjastojen valikko diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index d8ed2eee05..68bcc455b2 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -859,6 +859,7 @@ font-technology Variable Variables Duplicate Action or Action Set Dupliquer le script ou le jeu de scripts Delete the action set “{name}” and its actions? Supprimer le jeu de scripts « {name} » et ses scripts ? Delete the selected action sets and their actions? Supprimer les jeux de scripts sélectionnés et leurs scripts ? + Delete all action sets and their actions? Supprimer tous les jeux de scripts et leurs scripts ? Delete Slices Supprimer les tranches Delete Spine Point Supprimer le point de la dorsale Delete Stop Supprimer l’étape de dégradé @@ -2743,6 +2744,7 @@ font-technology Variable Variables Save Actions… Enregistrer les scripts… Load Actions… Charger des scripts… Replace Actions… Remplacer les scripts… + Clear Actions Effacer les scripts Reset Actions Réinitialiser les scripts Replace the current actions with the default set? Remplacer les scripts actuels par le jeu par défaut ? Append adds the default set after the current sets instead. Le bouton Ajouter ajoute plutôt le jeu par défaut après les jeux actuels. diff --git a/crates/ui-egui/src/i18n/gu.tsv b/crates/ui-egui/src/i18n/gu.tsv index c6641dbda3..241f914c35 100644 --- a/crates/ui-egui/src/i18n/gu.tsv +++ b/crates/ui-egui/src/i18n/gu.tsv @@ -2120,6 +2120,8 @@ Live preview લાઇવ પૂર્વાવલોકન Load Actions… ઍક્શન લોડ કરો… Replace Actions… ઍક્શન બદલો… + Clear Actions ઍક્શન સાફ કરો + Delete all action sets and their actions? બધા ઍક્શન સેટ અને તેમની ઍક્શન કાઢી નાખવી છે? Reset Actions ઍક્શન રીસેટ કરો Replace the current actions with the default set? વર્તમાન ઍક્શનને ડિફૉલ્ટ સેટથી બદલવા છે? Append adds the default set after the current sets instead. ઉમેરો તેના બદલે ડિફૉલ્ટ સેટને વર્તમાન સેટ પછી ઉમેરે છે. diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index e284cb4f3e..2837a15b67 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -1635,6 +1635,7 @@ antiAlias Sharp शार्प Delete the graphic style “{name}”? ग्राफिक स्टाइल "{name}" को हटा दें? Delete the library “{name}”? लाइब्रेरी "{name}" को हटा दें? Delete the selected action sets and their actions? सिलेक्टेड कार्रवाई सेट और उनके कार्यों को हटा दें? + Delete all action sets and their actions? सभी कार्रवाई सेट और उनके कार्यों को हटा दें? Delete the selected brushes? सिलेक्टेड ब्रश को हटा दें? Delete the selected symbol? सिलेक्टेड सिंबल हटाएँ? Delete the selected symbols? सिलेक्टेड सिंबल्स हटाएँ? @@ -3093,6 +3094,7 @@ antiAlias Sharp शार्प Live Shape Properties लाइव शेप प्रॉपर्टीज़ Load Actions… एक्शन्स लोड करें… Replace Actions… एक्शन्स रिप्लेस करें… + Clear Actions एक्शन्स क्लियर करें Reset Actions एक्शन्स रीसेट करें Replace the current actions with the default set? मौजूदा एक्शन्स को डिफ़ॉल्ट सेट से बदलें? Append adds the default set after the current sets instead. जोड़ें इसके बजाय डिफ़ॉल्ट सेट को मौजूदा सेट के बाद जोड़ता है। diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 075b54daa4..fbc2e30bd1 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -1107,6 +1107,7 @@ font-technology Variable Változó Duplicate Action or Action Set Művelet vagy műveletkészlet kettőzése Delete the action set “{name}” and its actions? Törlöd ezt a műveletkészletet és a műveleteit: „{name}”? Delete the selected action sets and their actions? Törlöd a kijelölt műveletkészleteket és a műveleteiket? + Delete all action sets and their actions? Törlöd az összes műveletkészletet és a műveleteiket? Delete the library “{name}”? Törlöd ezt a könyvtárat: „{name}”? Delete Theme Téma törlése Delete theme Téma törlése @@ -3300,6 +3301,7 @@ diagnostics ui felület Save Actions… Műveletek mentése… Load Actions… Műveletek betöltése… Replace Actions… Műveletek cseréje… + Clear Actions Műveletek törlése Reset Actions Műveletek visszaállítása Replace the current actions with the default set? Lecseréled az aktuális műveleteket az alapértelmezett készletre? Append adds the default set after the current sets instead. A Hozzáfűzés ehelyett az aktuális készletek után adja hozzá az alapértelmezett készletet. diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index b3edf57c35..ab48475d3d 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -1486,6 +1486,7 @@ lighting Light Cahaya Save Actions… Simpan tindakan… Load Actions… Muat tindakan… Replace Actions… Ganti tindakan… + Clear Actions Bersihkan tindakan Reset Actions Atur ulang tindakan Replace the current actions with the default set? Ganti tindakan saat ini dengan set default? Append adds the default set after the current sets instead. Tambahkan justru menambahkan set default setelah set saat ini. @@ -1790,6 +1791,7 @@ digits Malayalam Malayalam Duplicate Action or Action Set Duplikatkan tindakan atau set tindakan Delete the action set “{name}” and its actions? Hapus set tindakan “{name}” beserta tindakannya? Delete the selected action sets and their actions? Hapus set tindakan yang dipilih beserta tindakannya? + Delete all action sets and their actions? Hapus semua set tindakan beserta tindakannya? Delete these {n} graphic styles? Hapus {n} gaya grafis ini? Delete this {n} graphic style? Hapus {n} gaya grafis ini? Graphic Style Libraries Menu Menu pustaka gaya grafis diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 497d73dfdf..a3b493cd1d 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -875,6 +875,7 @@ font-technology Variable Variabili Duplicate Action or Action Set Duplica azione o set di azioni Delete the action set “{name}” and its actions? Eliminare il set di azioni “{name}” e le sue azioni? Delete the selected action sets and their actions? Eliminare i set di azioni selezionati e le loro azioni? + Delete all action sets and their actions? Eliminare tutti i set di azioni e le loro azioni? Delete Theme Elimina tema Delete theme Elimina tema Delete these {n} graphic styles? Eliminare questi {n} stili grafici? @@ -2800,6 +2801,7 @@ diagnostics ui interfaccia Save Actions… Salva azioni… Load Actions… Carica azioni… Replace Actions… Sostituisci azioni… + Clear Actions Cancella azioni Reset Actions Ripristina azioni Replace the current actions with the default set? Sostituire le azioni correnti con il set predefinito? Append adds the default set after the current sets instead. Aggiungi aggiunge invece il set predefinito dopo i set correnti. diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 86dadc58b4..5de0cae50c 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -1596,6 +1596,7 @@ antiAlias Sharp シャープ Duplicate Action or Action Set アクションまたはアクションセットを複製 Delete the action set “{name}” and its actions? アクションセット「{name}」とそのアクションを削除しますか? Delete the selected action sets and their actions? 選択したアクションセットとそのアクションを削除しますか? + Delete all action sets and their actions? すべてのアクションセットとそのアクションを削除しますか? Delete theme テーマを削除 Delete this saved preset この保存済みプリセットを削除 Delete {kind} Style {kind}スタイルを削除 @@ -2896,6 +2897,7 @@ diagnostics ui UI Save Actions… アクションを保存… Load Actions… アクションを読み込み… Replace Actions… アクションを置き換え… + Clear Actions アクションを消去 Reset Actions アクションをリセット Replace the current actions with the default set? 現在のアクションを初期設定のセットで置き換えますか? Append adds the default set after the current sets instead. 「追加」を選ぶと、初期設定のセットを現在のセットの後に追加します。 diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index d3ba11bca2..81fc06870d 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -3629,6 +3629,7 @@ lighting Light სინათლე Save Actions… მოქმედებების შენახვა… Load Actions… მოქმედებების ჩატვირთვა… Replace Actions… მოქმედებების ჩანაცვლება… + Clear Actions მოქმედებების გასუფთავება Reset Actions მოქმედებების ჩამოყრა Replace the current actions with the default set? ჩანაცვლდეს მიმდინარე მოქმედებები ნაგულისხმევი ნაკრებით? Append adds the default set after the current sets instead. „დამატება“ ამის ნაცვლად ნაგულისხმევ ნაკრებს მიმდინარე ნაკრებების შემდეგ ამატებს. @@ -3979,6 +3980,7 @@ digits Malayalam მალაიალამური Duplicate Action or Action Set მოქმედების ან მოქმედებების ნაკრების დუბლირება Delete the action set “{name}” and its actions? წაიშალოს მოქმედებების ნაკრები „{name}“ და მისი მოქმედებები? Delete the selected action sets and their actions? წაიშალოს მონიშნული მოქმედებების ნაკრებები და მათი მოქმედებები? + Delete all action sets and their actions? წაიშალოს ყველა მოქმედებების ნაკრები და მათი მოქმედებები? Delete these {n} graphic styles? წაიშალოს ეს გრაფიკული სტილები ({n})? Delete this {n} graphic style? წაიშალოს ეს გრაფიკული სტილი ({n})? Graphic Style Libraries Menu გრაფიკული სტილების ბიბლიოთეკების მენიუ diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 82721a6b2a..4a6963bbd2 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -1586,6 +1586,7 @@ antiAlias Sharp 날카롭게 Duplicate Action or Action Set 액션 또는 액션 세트 복제 Delete the action set “{name}” and its actions? 액션 세트 “{name}”과(와) 해당 액션을 삭제하시겠습니까? Delete the selected action sets and their actions? 선택한 액션 세트와 해당 액션을 삭제하시겠습니까? + Delete all action sets and their actions? 모든 액션 세트와 해당 액션을 삭제하시겠습니까? Delete theme 테마 삭제 Delete this saved preset 저장된 이 프리셋 삭제 Delete {kind} Style {kind} 스타일 삭제 @@ -2886,6 +2887,7 @@ diagnostics ui UI Save Actions… 액션 저장… Load Actions… 액션 불러오기… Replace Actions… 액션 바꾸기… + Clear Actions 액션 지우기 Reset Actions 액션 재설정 Replace the current actions with the default set? 현재 액션을 기본 세트로 바꾸시겠습니까? Append adds the default set after the current sets instead. 추가를 누르면 대신 기본 세트를 현재 세트 뒤에 추가합니다. diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index aa10ae73f3..894c7096f6 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -2091,6 +2091,7 @@ lighting Light Licht Save Actions… Acties opslaan… Load Actions… Acties laden… Replace Actions… Acties vervangen… + Clear Actions Acties wissen Reset Actions Acties opnieuw instellen Replace the current actions with the default set? De huidige acties vervangen door de standaardset? Append adds the default set after the current sets instead. Toevoegen voegt in plaats daarvan de standaardset toe na de huidige sets. @@ -2437,6 +2438,7 @@ digits Malayalam Malayalam Duplicate Action or Action Set Actie of actieset dupliceren Delete the action set “{name}” and its actions? De actieset „{name}” en de acties erin verwijderen? Delete the selected action sets and their actions? De geselecteerde actiesets en de acties erin verwijderen? + Delete all action sets and their actions? Alle actiesets en de acties erin verwijderen? Delete these {n} graphic styles? Deze {n} grafische stijlen verwijderen? Delete this {n} graphic style? Deze {n} grafische stijl verwijderen? Graphic Style Libraries Menu Menu grafische stijlbibliotheken diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index dc0afffcae..c69ed2cf28 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -1506,6 +1506,7 @@ lighting Light Światło Save Actions… Zapisz operacje… Load Actions… Wczytaj operacje… Replace Actions… Zastąp operacje… + Clear Actions Wyczyść operacje Reset Actions Resetuj operacje Replace the current actions with the default set? Zastąpić bieżące operacje zestawem domyślnym? Append adds the default set after the current sets instead. Dołącz dodaje zamiast tego zestaw domyślny po bieżących zestawach. @@ -1852,6 +1853,7 @@ digits Malayalam Malajalam Duplicate Action or Action Set Powiel operację lub zestaw operacji Delete the action set “{name}” and its actions? Usunąć zestaw operacji „{name}” i jego operacje? Delete the selected action sets and their actions? Usunąć zaznaczone zestawy operacji i ich operacje? + Delete all action sets and their actions? Usunąć wszystkie zestawy operacji i ich operacje? Delete these {n} graphic styles? Usunąć te style graficzne ({n})? Delete this {n} graphic style? Usunąć ten styl graficzny ({n})? Graphic Style Libraries Menu Menu bibliotek stylów graficznych diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 65dba93110..6bae5e26f1 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -790,6 +790,7 @@ antiAlias Sharp Nítido Duplicate Action or Action Set Duplicar Ação ou Conjunto de Ações Delete the action set “{name}” and its actions? Excluir o conjunto de ações “{name}” e suas ações? Delete the selected action sets and their actions? Excluir os conjuntos de ações selecionados e suas ações? + Delete all action sets and their actions? Excluir todos os conjuntos de ações e suas ações? Delete theme Excluir tema Delete this saved preset Excluir este predefinido salvo Delete {kind} Style Excluir Estilo de {kind} @@ -2283,6 +2284,7 @@ antiAlias Sharp Nítido Save Actions… Salvar Ações… Load Actions… Carregar Ações… Replace Actions… Substituir Ações… + Clear Actions Limpar Ações Reset Actions Redefinir Ações Replace the current actions with the default set? Substituir as ações atuais pelo conjunto padrão? Append adds the default set after the current sets instead. Anexar adiciona o conjunto padrão depois dos conjuntos atuais. diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index d17186fb20..74156da429 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -871,6 +871,7 @@ font-technology Variable Вариативные Duplicate Action or Action Set Дублировать действие или набор действий Delete the action set “{name}” and its actions? Удалить набор действий «{name}» и его действия? Delete the selected action sets and their actions? Удалить выбранные наборы действий и их действия? + Delete all action sets and their actions? Удалить все наборы действий и их действия? Delete Theme Удалить тему Delete theme Удалить тему Delete these {n} graphic styles? Удалить эти графические стили ({n})? @@ -2782,6 +2783,7 @@ diagnostics ui интерфейс Save Actions… Сохранить действия… Load Actions… Загрузить действия… Replace Actions… Заменить действия… + Clear Actions Очистить действия Reset Actions Сбросить действия Replace the current actions with the default set? Заменить текущие действия набором по умолчанию? Append adds the default set after the current sets instead. Кнопка «Добавить» вместо этого добавляет набор по умолчанию после текущих наборов. diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 5448d3d626..4d683cb1ea 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -856,6 +856,7 @@ font-technology Variable Variabla Duplicate Action or Action Set Duplicera åtgärd eller åtgärdsuppsättning Delete the action set “{name}” and its actions? Radera åtgärdsuppsättningen ”{name}” och dess åtgärder? Delete the selected action sets and their actions? Radera de markerade åtgärdsuppsättningarna och deras åtgärder? + Delete all action sets and their actions? Radera alla åtgärdsuppsättningar och deras åtgärder? Delete Theme Radera tema Delete theme Radera tema Delete these {n} graphic styles? Radera dessa {n} grafikstilar? @@ -2675,6 +2676,7 @@ font-technology Variable Variabla Save Actions… Spara åtgärder… Load Actions… Läs in åtgärder… Replace Actions… Ersätt åtgärder… + Clear Actions Rensa åtgärder Reset Actions Återställ åtgärder Replace the current actions with the default set? Vill du ersätta de aktuella åtgärderna med standarduppsättningen? Append adds the default set after the current sets instead. Lägg till lägger i stället till standarduppsättningen efter de aktuella uppsättningarna. diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 10b2cbfa5c..d0e30b8fdc 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -852,6 +852,7 @@ font-technology Variable Değişken Duplicate Action or Action Set Eylemi veya Eylem Setini Çoğalt Delete the action set “{name}” and its actions? “{name}” eylem seti ve eylemleri silinsin mi? Delete the selected action sets and their actions? Seçili eylem setleri ve eylemleri silinsin mi? + Delete all action sets and their actions? Tüm eylem setleri ve eylemleri silinsin mi? Delete Theme Temayı Sil Delete theme Temayı sil Delete these {n} graphic styles? Bu {n} grafik stilleri silinsin mi? @@ -2527,6 +2528,7 @@ shape Open Açık Save Actions… Eylemleri Kaydet… Load Actions… Eylemleri Yükle… Replace Actions… Eylemleri Değiştir… + Clear Actions Eylemleri Temizle Reset Actions Eylemleri Sıfırla Replace the current actions with the default set? Geçerli eylemler varsayılan setle değiştirilsin mi? Append adds the default set after the current sets instead. Ekle bunun yerine varsayılan seti geçerli setlerin sonuna ekler. diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 0fb6fa6cd4..82ba9af243 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -869,6 +869,7 @@ font-technology Variable Варіативні Duplicate Action or Action Set Дублювати дію або набір дій Delete the action set “{name}” and its actions? Видалити набір дій «{name}» і його дії? Delete the selected action sets and their actions? Видалити вибрані набори дій і їхні дії? + Delete all action sets and their actions? Видалити всі набори дій і їхні дії? Delete Theme Видалити тему Delete theme Видалити тему Delete these {n} graphic styles? Видалити ці графічні стилі ({n})? @@ -2792,6 +2793,7 @@ diagnostics ui інтерфейс Save Actions… Зберегти дії… Load Actions… Завантажити дії… Replace Actions… Замінити дії… + Clear Actions Очистити дії Reset Actions Скинути дії Replace the current actions with the default set? Замінити поточні дії набором за умовчанням? Append adds the default set after the current sets instead. Кнопка «Додати» натомість додає набір за умовчанням після поточних наборів. diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 6c14d92abe..04ebd9992d 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -1005,6 +1005,7 @@ font-technology Variable Biến thiên Duplicate Action or Action Set Nhân bản hành động hoặc bộ hành động Delete the action set “{name}” and its actions? Xóa bộ hành động “{name}” và các hành động của nó? Delete the selected action sets and their actions? Xóa các bộ hành động đã chọn và các hành động của chúng? + Delete all action sets and their actions? Xóa tất cả các bộ hành động và các hành động của chúng? Delete the library “{name}”? Xóa thư viện “{name}”? Delete Theme Xóa bộ màu Delete theme Xóa bộ màu @@ -3108,6 +3109,7 @@ diagnostics ui giao diện Save Actions… Lưu hành động… Load Actions… Tải hành động… Replace Actions… Thay thế hành động… + Clear Actions Xóa hết hành động Reset Actions Đặt lại hành động Replace the current actions with the default set? Thay thế các hành động hiện tại bằng bộ mặc định? Append adds the default set after the current sets instead. Nối thêm sẽ thêm bộ mặc định vào sau các bộ hiện tại. diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index db965569e2..d20ae8d9e8 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -817,6 +817,7 @@ antiAlias Sharp 锐利 Duplicate Action or Action Set 复制动作或动作组 Delete the action set “{name}” and its actions? 要删除动作组“{name}”及其中的动作吗? Delete the selected action sets and their actions? 要删除所选动作组及其中的动作吗? + Delete all action sets and their actions? 要删除所有动作组及其中的动作吗? Delete Theme 删除主题 Delete theme 删除主题 Delete these {n} graphic styles? 要删除这 {n} 个图形样式吗? @@ -2653,6 +2654,7 @@ diagnostics ui 界面 Save Actions… 存储动作… Load Actions… 载入动作… Replace Actions… 替换动作… + Clear Actions 清除动作 Reset Actions 重置动作 Replace the current actions with the default set? 要用默认动作组替换当前动作吗? Append adds the default set after the current sets instead. “追加”会改为将默认动作组添加到当前动作组之后。 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index b9bd3c4441..d5fde762f9 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -837,6 +837,7 @@ font-technology Variable 可變 Duplicate Action or Action Set 製作動作或動作組複本 Delete the action set “{name}” and its actions? 要刪除動作組「{name}」及其中的動作嗎? Delete the selected action sets and their actions? 要刪除所選動作組及其中的動作嗎? + Delete all action sets and their actions? 要刪除所有動作組及其中的動作嗎? Delete Theme 刪除主題 Delete theme 刪除主題 Delete these {n} graphic styles? 要刪除這 {n} 個繪圖樣式嗎? @@ -4001,6 +4002,7 @@ diagnostics ui 介面 Save Actions… 儲存動作… Load Actions… 載入動作… Replace Actions… 取代動作… + Clear Actions 清除動作 Reset Actions 重設動作 Replace the current actions with the default set? 要用預設動作組取代目前的動作嗎? Append adds the default set after the current sets instead. 「附加」會改為將預設動作組加到目前動作組之後。 diff --git a/crates/ui-egui/src/menus/run.rs b/crates/ui-egui/src/menus/run.rs index 2bed4ccd26..909d03b3d2 100644 --- a/crates/ui-egui/src/menus/run.rs +++ b/crates/ui-egui/src/menus/run.rs @@ -1049,6 +1049,7 @@ fn run_ui_part11(app: &mut VectorcraftApp, id: &str, p: &Value) -> Option crate::panels::actions::delete_sets(app, p), crate::panels::actions::DUPLICATE => crate::panels::actions::duplicate(app, p), crate::panels::actions::RESET => crate::panels::actions::reset(app, p), + crate::panels::actions::CLEAR => crate::panels::actions::clear(app, p), "ui.shortcutImportDialog" => crate::dialogs::shortcut_import::command(app, p), _ => return None, }; diff --git a/crates/ui-egui/src/menus/ui_commands.rs b/crates/ui-egui/src/menus/ui_commands.rs index c9faef6f05..fbfd12b24e 100644 --- a/crates/ui-egui/src/menus/ui_commands.rs +++ b/crates/ui-egui/src/menus/ui_commands.rs @@ -1789,6 +1789,12 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ "", "{mode?: \"replace\" | \"append\"} Reset Actions. replace (the default) replaces every set in the Actions panel with a new copy of the built-in Default Actions set, makes it current and selected, clears the panel's selected action and step and its expanded actions, and closes an open Set Options, New Action, Batch or step dialog that names a set; when the panel already shows only the built-in set as it comes in that state, nothing changes, the sets keep their ids and changed is false. append adds a new copy of the built-in set after the sets there are, with the next free number when its name is in use (Default Actions 2), and keeps the current set and the selection. Omitted params count as {}. Params of another type, another key, another mode, or a reset while an action records or plays (also while it waits at a stop) is an error and changes nothing. No undo step is recorded. The panel menu's Reset Actions asks first (dialog `resetActions`): OK runs this with replace, Append with append → {changed, mode, set: the first built-in set's index}", ), + ( + crate::panels::actions::CLEAR, + "Clear Actions", + "", + "{ids?: [id]} Clear Actions: delete every set in the Actions panel with its actions, the built-in Default Actions set included, so no set is current or selected; the panel's selected action and step and its expanded actions are cleared, and an open Set Options, New Action, Batch or step dialog that names a set closes. ids holds the panel's own set ids in panel order, which the menu's question passes: when the sets are no longer exactly those, nothing is deleted. With no sets, nothing changes and cleared is 0. Omitted params count as {}. Params of another type, another key, ids that is not a list of ids, or a clear while an action records or plays (also while it waits at a stop) is an error and changes nothing. No undo step is recorded. The panel menu's Clear Actions (disabled with no sets and while an action records or plays) asks first, and OK runs this → {cleared: the number of sets deleted}", + ), ("file.showPackage", "Show Package", "", "{folder} show a package folder (file.package's folder) in the file manager → {folder}"), ( "docInfo.save", diff --git a/crates/ui-egui/src/panels/actions.rs b/crates/ui-egui/src/panels/actions.rs index c979d46fd5..a350a0e842 100644 --- a/crates/ui-egui/src/panels/actions.rs +++ b/crates/ui-egui/src/panels/actions.rs @@ -2281,6 +2281,76 @@ fn replace_sets(app: &mut VectorcraftApp, sets: Vec) -> bool { true } +/// The command that deletes every action set in the panel ([`clear`]). +pub const CLEAR: &str = "ui.actionSet.clear"; + +/// The panel menu's Clear Actions: asks whether to delete every set, naming them by their ids +/// ([`ActionSet::id`]), so OK deletes only the sets that were there when the question opened. +fn ask_clear(app: &mut VectorcraftApp) { + let ids: Vec = app.ui.action_sets.iter().map(|s| s.id).collect(); + crate::dialogs::confirm::ask(app, tl!("Delete all action sets and their actions?"), "", CLEAR, json!({ "ids": ids })); +} + +/// `ui.actionSet.clear {ids?: [id]}`: Clear Actions. Deletes every set in the panel with its +/// actions, the built-in Default Actions set included, so no set is current or selected; the +/// panel's selected action and step, its expanded actions and a step being dragged are cleared, and +/// an open Set Options, New Action, Batch or step dialog that names a set closes. `ids` holds the +/// panel's own set ids in panel order, which the menu's question passes: when the sets are no +/// longer exactly those, nothing is deleted. With no sets, nothing changes. Omitted params (`null`) +/// count as `{}`. Params of another type, another key, `ids` that is not a list of ids, or a clear +/// while an action records or plays (also while it waits at a stop) is an error, and then nothing +/// changes. No undo step is recorded. → {cleared: the number of sets deleted} +pub fn clear(app: &mut VectorcraftApp, p: &Value) -> Result { + const SELECTED: &str = "actions-selected"; + const EXPANDED: &str = "actions-expanded"; + let ids = match p { + Value::Null => None, + Value::Object(m) => { + if let Some(key) = m.keys().find(|k| *k != "ids") { + let keys = "ids"; + return Err(format!("unknown parameter `{key}`; the command takes: {keys}")); + } + match m.get("ids") { + None => None, + Some(v) => Some( + v.as_array() + .ok_or("the action set ids are not a list")? + .iter() + .map(|id| id.as_u64().ok_or("the action set ids are not a list")) + .collect::, _>>()?, + ), + } + } + got => return Err(format!("the params must be an object, not {got}")), + }; + if app.ui.recording.is_some() { + return Err("an action is already recording".into()); + } + if app.ui.action_playing.is_some() { + return Err("an action is already playing".into()); + } + if ids.is_some_and(|ids| !ids.iter().copied().eq(app.ui.action_sets.iter().map(|s| s.id))) { + return Err("the action sets changed; nothing was deleted".into()); + } + let cleared = app.ui.action_sets.len(); + if cleared == 0 { + return Ok(json!({ "cleared": 0 })); + } + app.ui.action_sets.clear(); + app.ui.action_set = None; + app.ui.action_sets_selected.clear(); + if app.ui.dialog.as_ref().is_some_and(holds_set) { + app.ui.dialog = None; + } + if let Some(ctx) = app.ui_ctx.clone() { + set_pstate::>(&ctx, SELECTED, None); + set_pstate::>(&ctx, SELECTED_STEP, None); + set_pstate::>(&ctx, DRAGGED_STEP, None); + set_pstate(&ctx, EXPANDED, BTreeSet::::new()); + } + Ok(json!({ "cleared": cleared })) +} + /// The panel's (≡) menu. pub fn menu(app: &mut VectorcraftApp, ui: &mut egui::Ui) { // Button Mode is off while an action records, so the Stop button the list shows stays in reach. @@ -2379,6 +2449,10 @@ pub fn menu(app: &mut VectorcraftApp, ui: &mut egui::Ui) { app.status(e); } } + // Asks first: OK deletes every set. Off with no sets and while an action records or plays. + if widgets::menu_item(ui, tl!("Clear Actions"), idle && !app.ui.action_sets.is_empty(), false) { + ask_clear(app); + } // Asks first: OK replaces the sets with the built-in set, Append adds it after them. if widgets::menu_item(ui, tl!("Reset Actions"), idle, false) { crate::dialogs::confirm::ask_reset_actions(app); @@ -4052,6 +4126,168 @@ mod tests { assert_eq!(saved_sets(&app.ui.action_sets), before, "the playing set stays"); } + /// The panel menu's Clear Actions asks before it deletes anything, naming the sets by their ids: + /// Cancel keeps every set, and OK deletes every set, the built-in one included, and the selected + /// action with them, so Batch… and Play Current Selection are off afterwards. The item is off + /// with no sets and while an action records or plays, waiting at a stop included. + #[test] + fn the_panel_menus_clear_actions_asks_first_and_ok_deletes_every_set() { + let ctx = egui::Context::default(); + let mut app = app_with_sets(); + app.ui.action_set = Some(1); + let before = saved_sets(&app.ui.action_sets); + let ids: Vec = app.ui.action_sets.iter().map(|s| s.id).collect(); + menu_click(&ctx, &mut app, "Clear Actions"); + let d = app.ui.dialog.as_ref().expect("Clear Actions asks first"); + assert_eq!((d.kind.as_str(), d.str("__command")), (crate::dialogs::confirm::KIND, CLEAR.to_string())); + assert_eq!(d.str("message"), "Delete all action sets and their actions?"); + assert_eq!(d.fields["__params"], json!({ "ids": ids })); + assert_eq!(saved_sets(&app.ui.action_sets), before, "asking changes no set"); + crate::dialogs::cancel(&mut app); + assert!(app.ui.dialog.is_none()); + assert_eq!(saved_sets(&app.ui.action_sets), before, "Cancel keeps every set"); + assert_eq!(app.ui.action_set, Some(1)); + + app.ui_ctx = Some(ctx.clone()); + set_pstate::>(&ctx, "actions-selected", Some((1, 0))); + menu_click(&ctx, &mut app, "Clear Actions"); + crate::dialogs::confirm(&mut app).unwrap(); + assert!(app.ui.action_sets.is_empty(), "OK deletes every set, the built-in one included"); + assert_eq!(app.ui.action_set, None); + assert!(app.ui.dialog.is_none()); + for label in ["Clear Actions", "Batch…", "Play Current Selection", "Duplicate", "Set Options…"] { + menu_click(&ctx, &mut app, label); + let idle = app.ui.dialog.is_none() && app.ui.action_playing.is_none() && app.ui.action_sets.is_empty(); + assert!(idle, "{label} is off with no sets"); + } + + let mut app = app_with_sets(); + app.run("file.new", json!({"width": 200, "height": 100})).unwrap(); + app.run(START_RECORDING, json!({})).unwrap(); + menu_click(&ctx, &mut app, "Clear Actions"); + assert!(app.ui.dialog.is_none(), "off while an action records"); + app.run(STOP_RECORDING, json!({})).unwrap(); + + let (mut app, _) = app_with_a_stop(true); + play(&mut app, 0, 0).unwrap(); + assert!(waiting_at_stop(&app)); + app.ui.dialog = None; + menu_click(&ctx, &mut app, "Clear Actions"); + assert!(app.ui.dialog.is_none(), "off while playback waits at a stop"); + } + + /// `ui.actionSet.clear` deletes every set (the built-in one edited, the others and a loaded + /// one), leaves no set current or selected, clears the panel's selected action and step, + /// expanded actions and a dragged step, closes a dialog that holds a set index and records no + /// undo step. A clear with no sets changes nothing, the empty list stays empty after a save + /// and a restart, a dialog that names no set stays open, and Load Actions… and Reset Actions + /// add sets again. Thousands of sets go in one clear. + #[test] + fn clear_deletes_every_set_and_clears_what_named_them() { + let mut app = app_with_sets(); + app.run("file.new", json!({"width": 200, "height": 100})).unwrap(); + app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 20, "height": 20})).unwrap(); + let undo = undo_steps(&app); + app.ui.action_sets[0].name = "Renamed".into(); + let loaded = files::write_set(&app.ui.action_sets[1]); + app.run(LOAD_SET, json!({ "data": loaded })).unwrap(); + assert_eq!(app.ui.action_sets.len(), 4); + app.ui.action_set = Some(2); + app.ui.action_sets_selected = vec![1, 2]; + let ctx = egui::Context::default(); + app.ui_ctx = Some(ctx.clone()); + let nudge = app.ui.action_sets[1].actions[1].id; + set_pstate::>(&ctx, "actions-selected", Some((1, 1))); + set_pstate::>(&ctx, SELECTED_STEP, Some((nudge, 0))); + set_pstate(&ctx, "actions-expanded", BTreeSet::from([nudge])); + let dragged: DraggedStep = (nudge, 0, std::sync::Arc::new((vec![], BTreeSet::new()))); + set_pstate::>(&ctx, DRAGGED_STEP, Some(dragged)); + crate::dialogs::action_batch::open(&mut app, 1, 1).unwrap(); + + assert_eq!(app.run(CLEAR, json!({})).unwrap(), json!({"cleared": 4})); + assert!(app.ui.action_sets.is_empty()); + assert_eq!((app.ui.action_set, app.ui.action_sets_selected.clone()), (None, vec![]), "no set is current or selected"); + assert_eq!(pstate::>(&ctx, "actions-selected"), None); + assert_eq!(pstate::>(&ctx, SELECTED_STEP), None); + assert!(pstate::>(&ctx, "actions-expanded").is_empty()); + assert!(pstate::>(&ctx, DRAGGED_STEP).is_none()); + assert!(app.ui.dialog.is_none(), "the Batch dialog of a deleted set closes"); + assert_eq!(undo_steps(&app), undo, "no undo step"); + + assert_eq!(app.run(CLEAR, Value::Null).unwrap(), json!({"cleared": 0}), "nothing left to clear"); + assert_eq!(app.run(CLEAR, json!({"ids": []})).unwrap(), json!({"cleared": 0})); + assert!(app.ui.action_sets.is_empty()); + let restarted: crate::UiState = serde_json::from_value(serde_json::to_value(&app.ui).unwrap()).unwrap(); + assert!(restarted.action_sets.is_empty(), "no sets after a restart either"); + assert_eq!(restarted.action_set, None); + + app.run(LOAD_SET, json!({ "data": loaded })).unwrap(); + assert_eq!(set_names(&app), ["Mine"], "Load Actions… adds a set again"); + crate::dialogs::action_set_options::open_new(&mut app); + assert_eq!(app.run(CLEAR, json!({})).unwrap(), json!({"cleared": 1})); + assert!(app.ui.dialog.is_some(), "a New Set dialog names no set and stays open"); + app.ui.dialog = None; + assert_eq!(app.run(RESET, json!({"mode": "append"})).unwrap()["set"], 0); + assert_eq!(saved_sets(&app.ui.action_sets), saved_sets(&default_sets()), "Reset Actions adds the built-in set again"); + + app.ui.action_sets.extend((0..5000).map(|i| ActionSet::new(format!("Set {i}"), vec![]))); + assert_eq!(app.run(CLEAR, json!({})).unwrap(), json!({"cleared": 5001})); + assert!(app.ui.action_sets.is_empty()); + } + + /// `ui.actionSet.clear` refuses params that are not an object, another key, `ids` that is not a + /// list of ids (`null` included), `ids` that are not exactly the panel's sets in order (a set added after the + /// question opened included), and a clear while an action records or plays, waiting at a stop + /// included, and then deletes no set and keeps the current set. + #[test] + fn clear_refuses_bad_params_changed_sets_and_a_running_action() { + let mut app = app_with_sets(); + app.ui.action_set = Some(1); + let ids: Vec = app.ui.action_sets.iter().map(|s| s.id).collect(); + let before = saved_sets(&app.ui.action_sets); + let changed = "the action sets changed; nothing was deleted"; + let not_ids = "the action set ids are not a list"; + for (p, error) in [ + (json!(1), "the params must be an object, not 1"), + (json!("all"), "the params must be an object, not \"all\""), + (json!([]), "the params must be an object, not []"), + (json!({"sets": [0]}), "unknown parameter `sets`; the command takes: ids"), + (json!({"ids": 5}), not_ids), + (json!({"ids": null}), not_ids), + (json!({"ids": [ids[0], "x"]}), not_ids), + (json!({"ids": [-1]}), not_ids), + (json!({"ids": []}), changed), + (json!({"ids": [ids[0], ids[1]]}), changed), + (json!({"ids": [ids[2], ids[1], ids[0]]}), changed), + (json!({"ids": [ids[0], ids[1], ids[2], ids[2]]}), changed), + ] { + assert_eq!(app.run(CLEAR, p.clone()).unwrap_err(), error, "{p}"); + assert_eq!(saved_sets(&app.ui.action_sets), before, "{p} changes nothing"); + assert_eq!(app.ui.action_set, Some(1)); + } + let asked = json!({ "ids": ids }); + app.ui.action_sets.push(ActionSet::new("Later", vec![])); + assert_eq!(app.run(CLEAR, asked.clone()).unwrap_err(), changed); + assert_eq!(set_names(&app), ["Default Actions", "Mine", "Other", "Later"], "a set added after the question keeps every set"); + app.ui.action_sets.pop(); + assert_eq!(app.run(CLEAR, asked).unwrap(), json!({"cleared": 3}), "the sets the question named"); + + let mut app = app_with_sets(); + let before = saved_sets(&app.ui.action_sets); + app.run("file.new", json!({"width": 200, "height": 100})).unwrap(); + app.run(START_RECORDING, json!({})).unwrap(); + assert_eq!(app.run(CLEAR, json!({})).unwrap_err(), "an action is already recording"); + assert_eq!(saved_sets(&app.ui.action_sets), before, "a recording keeps its set"); + app.run(STOP_RECORDING, json!({})).unwrap(); + + let (mut app, _) = app_with_a_stop(true); + let before = saved_sets(&app.ui.action_sets); + play(&mut app, 0, 0).unwrap(); + assert!(waiting_at_stop(&app)); + assert_eq!(app.run(CLEAR, json!({})).unwrap_err(), "an action is already playing"); + assert_eq!(saved_sets(&app.ui.action_sets), before, "the playing set stays"); + } + /// A click on the panel menu's item `label`; an item that is off takes no click. fn menu_click(ctx: &egui::Context, app: &mut VectorcraftApp, label: &str) { use super::super::tests_appearance::{click, frame_events}; diff --git a/docs/mcp.md b/docs/mcp.md index 74e1261225..5bc273289c 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -4395,6 +4395,16 @@ already walks Image Trace. Short agent entry points: records or plays (also while it waits at a stop) is an error and changes nothing. Reset records no undo step. The panel menu's Reset Actions is disabled while an action records or plays; it opens a `resetActions` question (fields `message`, `detail`, `append`): OK runs this with `replace`, Append with `append`, and `ui.dialog.cancel` changes nothing. + `ui.actionSet.clear {ids?: [id]}` is Clear Actions, and returns `{cleared}`, the number of sets deleted. It deletes + every set in the panel with its actions, the built-in Default Actions set included, so no set is current or + selected; the panel's selected action and step and its expanded actions are cleared, and an open Set Options, New + Action, Batch or step dialog that names a set closes. `ids` holds the panel's own set ids in panel order, which the + menu's question passes: when the sets are no longer exactly those, the command returns an error and deletes no set. + With no sets, nothing changes and `cleared` is 0. Omitted params count as `{}`. Params of another type, another key, + `ids` that is not a list of ids, or a clear while an action records or plays (also while it waits at a stop) is an + error and changes nothing. Clear records no undo step, and an empty panel stays empty after a restart. The panel + menu's Clear Actions is disabled with no sets and while an action records or plays; it opens a `confirm` question, + OK runs this, and `ui.dialog.cancel` changes nothing. These are VectorCraft's own rules. - Image Trace: `imageTrace.presets`, `imageTrace.make {id?, preset?, params?, view?}` (or `imageTrace.makeAndExpand`), `imageTrace.setView`, `imageTrace.expand`, `imageTrace.release`. A key inside `params` that is not one of the trace settings, such as `colours`, is an error that names it and the nearest setting (`colors`), as for a command's own keys. diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 4de55f5e58..641d87bdcc 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -923,6 +923,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - Actions panel: the panel menu's Duplicate copies the selected action, else the current action set with all its actions ([Actions panel overview](https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/actions-panel-overview.html); `ui.actionSet.duplicate`). VectorCraft's own rules, which the overview does not cover: the copy goes right after the original, is named after it with " copy" added and is selected. - Actions panel: the panel menu's Reset Actions asks first; OK replaces the sets in the panel with the default set, and Append adds the default set after them ([the help page](https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/manage-a-set-of-actions.html); `ui.actionSet.reset`). VectorCraft's own rules, which the page does not cover: the default set is VectorCraft's own Default Actions set; after OK it is current and selected, and no action or step is selected; Append names its copy with the next free number (`Default Actions 2`) and keeps the current set; Cancel changes nothing; the item is off while an action records or plays, waiting at a stop included; Undo does not bring the old sets back. Tests `panels::actions::tests::{the_panel_menus_reset_actions_asks_first_and_is_off_while_an_action_runs, reset_replaces_every_set_with_the_built_in_set_and_clears_what_named_the_old_ones, reset_on_the_built_in_set_makes_it_current_then_changes_nothing, reset_append_adds_the_built_in_set_with_a_free_number_and_keeps_the_rest, reset_refuses_bad_params_and_a_running_action_and_changes_nothing}`, `dialogs::tests::reset_actions_ok_replaces_append_adds_and_cancel_keeps_the_sets`. - Actions panel: the panel menu's Replace Actions… opens a file and puts the set it holds in place of every set in the panel ([the help page](https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/actions-panel-overview.html); `ui.actionSet.replace`). VectorCraft's own rules, which the page does not cover: the file is read as Load Actions… reads it (`.vcactions` and `.aia`, with the same limits and reports); the built-in Default Actions set goes too; the file's set keeps its name and becomes current and selected, and no action or step is selected; a canceled pick, a file that can't be read or is refused (an empty one too) changes nothing; the item asks no question first and is off while an action records or plays, waiting at a stop included; Undo does not bring the old sets back. Tests `panels::actions::tests::{the_panel_menus_replace_actions_puts_the_files_set_in_place_of_every_set, replace_actions_clears_what_named_the_old_sets_and_reads_aia_files, replace_actions_refuses_bad_params_bad_files_and_a_running_action}`. + - Actions panel: the panel menu's Clear Actions deletes every set loaded in the panel with its actions ([the help page](https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/actions-panel-overview.html); `ui.actionSet.clear`). VectorCraft's own rules, which the page does not cover: the item asks first, and Cancel changes nothing; the built-in Default Actions set goes too, and no set, action or step is selected afterward; OK deletes nothing when sets were added, removed or reordered after the question opened, and a set whose actions changed still goes; the item is off with no sets and while an action records or plays, waiting at a stop included; an empty panel stays empty after a restart; Undo does not bring the sets back, and Reset Actions, Load Actions… or New Set… adds sets again. Tests `panels::actions::tests::{the_panel_menus_clear_actions_asks_first_and_ok_deletes_every_set, clear_deletes_every_set_and_clears_what_named_them, clear_refuses_bad_params_changed_sets_and_a_running_action}`. - Batch… over data sets names each file after the document and the data set (`action.batch`). It writes `/`, `\`, `:`, `<`, `>`, `"`, `|`, `?`, `*` and control characters in the data set's name as `-`, and adds `-2`, `-3`… to a name an earlier data set used. - Batch… offers File + Number, File + Data Set Name, and Data Set Name for a Data Sets source. The dialog defaults to File + Number; `action.batch` without `datasetFileNaming` keeps File + Data Set Name. An output already in a destination folder the batch may read and write gets the next free `-2`, `-3` suffix. [Batch options](https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/batch-options.html). - The Batch dialog shows its data set File Name row only when Destination is Folder, and keeps the choice while another destination is picked. With None or Save and Close it does not send `datasetFileNaming`. diff --git a/docs/ui-parity.md b/docs/ui-parity.md index a13876c294..bef9c7ee4e 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -446,8 +446,9 @@ next unit in the order a right-click on a ruler lists them, from Feet back to Po | Live trace result bounds and selection highlights exclude the retained bitmap; source-image views retain it | done | All TraceView modes and rotated result bounds regression-covered; ordinary hidden group behavior retained | | Image Trace panel: the Preview checkbox before Trace chooses whether a setting change traces the selected Image Trace object again at once | done | Per the public documentation, Preview shows the result of the current settings and Trace traces with them (). Preview is on by default and kept with the UI preferences; Reset to Default leaves it. Off, changes wait in the panel until Trace applies them as one undo step, or until Preview is turned on again. Changes stay with the object they were made for while another object is selected, and come back when it is selected again. `imageTrace.preview {on?}`, `ui.set {imageTracePreview}`; `panels/image_trace.rs` headless tests (`with_preview_off_a_slider_change_waits_for_trace`, `turning_preview_on_traces_the_changes_that_waited`, `preview_turned_on_with_nothing_selected_traces_when_the_object_is_selected_again`, `settings_that_wait_stay_with_their_object`, `settings_that_wait_come_back_when_their_object_is_selected_again`, `settings_that_wait_are_dropped_when_their_object_changed_since`, `preview_is_kept_with_the_preferences_and_reset_to_default_leaves_it`) | | Toolbar without group labels by default, one or two columns; All Tools drawer by flyout group with shortcuts, its menu (Reset, Basic, Advanced) and Show section | done | #1751; a preference brings the labels back; `toolbar.show` sets the Fill/Stroke, Coloring, Draw Mode and Screen Mode controls | -| Actions panel: ≡ › Save Actions… saves the current set with all its actions to a file and ≡ › Load Actions… adds a saved set ([Manage a set of actions](https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/manage-a-set-of-actions.html)) | partial | `ui.actionSet.save`, `ui.actionSet.load`; `panels/actions.rs` tests. The file is VectorCraft's own `.vcactions` JSON; Clear Actions remains | +| Actions panel: ≡ › Save Actions… saves the current set with all its actions to a file and ≡ › Load Actions… adds a saved set ([Manage a set of actions](https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/manage-a-set-of-actions.html)) | done | `ui.actionSet.save`, `ui.actionSet.load`; `panels/actions.rs` tests. The file is VectorCraft's own `.vcactions` JSON | | Actions panel: ≡ › Replace Actions… puts the set of a saved file in place of every set in the panel ([the help page](https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/actions-panel-overview.html)) | done | `ui.actionSet.replace`; `panels/actions.rs` tests. The file is read as Load Actions… reads it; the item asks no question first | +| Actions panel: ≡ › Clear Actions deletes every set loaded in the panel ([the help page](https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/actions-panel-overview.html)) | done | `ui.actionSet.clear`; `panels/actions.rs` tests. The item asks first, and the built-in Default Actions set goes too | | Actions panel: ≡ › Reset Actions asks first; OK replaces the sets in the panel with the default set and Append adds the default set after them ([the help page](https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/manage-a-set-of-actions.html)) | done | `ui.actionSet.reset`; `panels/actions.rs` and `dialogs/tests.rs` tests. The default set is VectorCraft's own Default Actions set | | Actions panel: ≡ › Load Actions… also reads action sets saved as `.aia` files ([Actions panel overview](https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/actions-panel-overview.html)) | partial | `actionSet.read`, `ui.actionSet.load`; `tests/actionset.rs`, `panels/actions.rs` tests, `import_fuzz`. Steps with a label and no recorded values come in as menu commands that run with no values and open no dialog, matched by label, and Set Selection steps come in as Select Object steps; the other steps, recorded menu items included, are left out and counted | | Actions panel: ≡ › Action Options… renames the selected action and sets its function key and color ([Actions panel overview](https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/actions-panel-overview.html)) | partial | `ui.action.options`; `panels/actions.rs` tests (part of #1629). Button Mode shows the color |