mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-21 09:26:43 +00:00
fix(ui-egui): File Handling preference to not append "copy" when saving a copy, as in Photoshop (#8080)
This commit is contained in:
1 parent
68348dcafc
commit
5f4c636b09
24 files changed
+41
-3
No files matched your search
@@ -444,6 +444,8 @@ impl Default for HistoryLog {
|
||||
pub struct FileHandling {
|
||||
pub image_previews: Ask,
|
||||
pub lowercase_extension: bool,
|
||||
/// File › Save a Copy suggests the document's own name rather than "<name> copy" (#8080).
|
||||
pub do_not_append_copy: bool,
|
||||
/// Saves run in the background while you keep working (on), or in the foreground under a
|
||||
/// modal progress dialog that blocks the app until the file is written (off).
|
||||
pub save_in_background: bool,
|
||||
@@ -467,11 +469,20 @@ pub struct FileHandling {
|
||||
pub recent_files: Vec<String>,
|
||||
}
|
||||
|
||||
impl FileHandling {
|
||||
/// What File › Save a Copy appends to the document's name: " copy", or nothing with Do not
|
||||
/// append "copy" to filename when saving a copy (#8080).
|
||||
pub fn copy_suffix(&self) -> &'static str {
|
||||
if self.do_not_append_copy { "" } else { " copy" }
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for FileHandling {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
image_previews: Ask::Always,
|
||||
lowercase_extension: true,
|
||||
do_not_append_copy: false,
|
||||
save_in_background: true,
|
||||
autosave: true,
|
||||
autosave_minutes: 10,
|
||||
|
||||
@@ -3808,6 +3808,7 @@ navigator Zoom Zvětšení
|
||||
Chisel Hard Tvrdé tesání
|
||||
Chisel Soft Měkké tesání
|
||||
Open color-less EXR as ACEScg Otevřít EXR bez údaje o barevném prostoru jako ACEScg
|
||||
Do not append "copy" to filename when saving a copy Nepřidávat „copy“ k názvu souboru při ukládání kopie
|
||||
|
||||
# View › Guides › right-click a guide
|
||||
Edit Selected Guides Upravit vybraná vodítka
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -3203,6 +3203,7 @@ curves Smooth Glätten
|
||||
Chisel Hard Meißeln hart
|
||||
Chisel Soft Meißeln weich
|
||||
Open color-less EXR as ACEScg Farbangabenloses EXR als ACEScg öffnen
|
||||
Do not append "copy" to filename when saving a copy Beim Speichern einer Kopie „copy“ nicht an den Dateinamen anhängen
|
||||
# Export As metadata and profile options
|
||||
Color Profile Farbprofil
|
||||
EXIF EXIF
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -3896,6 +3896,7 @@ curves Smooth Εξομάλυνση
|
||||
Chisel Hard Σκληρή σμίλευση
|
||||
Chisel Soft Μαλακή σμίλευση
|
||||
Open color-less EXR as ACEScg Άνοιγμα EXR χωρίς χρωματική δήλωση ως ACEScg
|
||||
Do not append "copy" to filename when saving a copy Να μην προστίθεται «copy» στο όνομα αρχείου κατά την αποθήκευση αντιγράφου
|
||||
# Export As metadata and profile options
|
||||
EXIF EXIF
|
||||
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 1030 and column 18.
|
@@ -4159,6 +4159,7 @@ navigator Zoom Zoom
|
||||
Chisel Hard Cincelar duro
|
||||
Chisel Soft Cincelar suave
|
||||
Open color-less EXR as ACEScg Abrir EXR sin espacio de color como ACEScg
|
||||
Do not append "copy" to filename when saving a copy No añadir «copy» al nombre de archivo al guardar una copia
|
||||
# Export As metadata and profile options
|
||||
|
||||
# View › Guides › right-click a guide
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 4 and column 47.
|
@@ -3204,6 +3204,7 @@ curves Smooth Lisser
|
||||
Chisel Hard Ciselage dur
|
||||
Chisel Soft Ciselage doux
|
||||
Open color-less EXR as ACEScg Ouvrir les EXR sans espace colorimétrique en ACEScg
|
||||
Do not append "copy" to filename when saving a copy Ne pas ajouter « copy » au nom de fichier lors de l’enregistrement d’une copie
|
||||
|
||||
# View › Guides › right-click a guide
|
||||
Edit Selected Guides Modifier les repères sélectionnés
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -4114,6 +4114,7 @@ cameraRaw Yellow Sárga
|
||||
Chisel Hard Kemény vésés
|
||||
Chisel Soft Lágy vésés
|
||||
Open color-less EXR as ACEScg Színinformáció nélküli EXR megnyitása ACEScg-ként
|
||||
Do not append "copy" to filename when saving a copy Ne fűzze a „copy” szót a fájlnévhez másolat mentésekor
|
||||
|
||||
# View › Guides › right-click a guide
|
||||
Edit Selected Guides Kijelölt segédvonalak szerkesztése
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -3191,6 +3191,7 @@ curves Smooth Haluskan
|
||||
Chisel Hard Pahat Keras
|
||||
Chisel Soft Pahat Lembut
|
||||
Open color-less EXR as ACEScg Buka EXR tanpa informasi warna sebagai ACEScg
|
||||
Do not append "copy" to filename when saving a copy Jangan tambahkan "copy" ke nama file saat menyimpan salinan
|
||||
|
||||
# View › Guides › right-click a guide
|
||||
Edit Selected Guides Edit Panduan Terpilih
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 4 and column 47.
|
@@ -4161,6 +4161,7 @@ navigator Zoom Zoom
|
||||
Chisel Hard Cesello duro
|
||||
Chisel Soft Cesello morbido
|
||||
Open color-less EXR as ACEScg Apri gli EXR senza spazio colore come ACEScg
|
||||
Do not append "copy" to filename when saving a copy Non aggiungere "copy" al nome del file quando si salva una copia
|
||||
|
||||
# Color management, Liquify, glyph group, warp and Camera Raw labels the Serbian, Vietnamese and Japanese catalogs added
|
||||
Adobe-rgb-compat Adobe RGB (compatibile)
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2658 and column 53.
|
@@ -3875,6 +3875,7 @@ curves Smooth スムーズ
|
||||
Chisel Hard チゼルハード
|
||||
Chisel Soft チゼルソフト
|
||||
Open color-less EXR as ACEScg 色空間のないEXRをACEScgとして開く
|
||||
Do not append "copy" to filename when saving a copy コピーを保存するときにファイル名に「copy」を付けない
|
||||
# View › Guides › right-click a guide
|
||||
Edit Selected Guides 選択したガイドを編集
|
||||
Clear Selected Guides 選択したガイドを消去
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -3379,6 +3379,7 @@ curves Smooth 매끄럽게
|
||||
Chisel Hard 단단하게 조각
|
||||
Chisel Soft 부드럽게 조각
|
||||
Open color-less EXR as ACEScg 색 공간 정보 없는 EXR을 ACEScg로 열기
|
||||
Do not append "copy" to filename when saving a copy 사본 저장 시 파일 이름에 "copy"를 붙이지 않음
|
||||
# Export As metadata and profile options
|
||||
Color Profile 색상 프로필
|
||||
EXIF EXIF
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 3172 and column 53.
|
@@ -3958,6 +3958,7 @@ curves Smooth Vloeiend maken
|
||||
Chisel Hard Beitel hard
|
||||
Chisel Soft Beitel zacht
|
||||
Open color-less EXR as ACEScg EXR zonder kleurruimte als ACEScg openen
|
||||
Do not append "copy" to filename when saving a copy Geen "copy" aan de bestandsnaam toevoegen bij het opslaan van een kopie
|
||||
|
||||
# View › Guides › right-click a guide
|
||||
Edit Selected Guides Geselecteerde hulplijnen bewerken
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 8 and column 34.
|
@@ -3796,6 +3796,7 @@ curves Smooth Wygładź
|
||||
Chisel Hard Dłuto twarde
|
||||
Chisel Soft Dłuto miękkie
|
||||
Open color-less EXR as ACEScg Otwieraj EXR bez profilu koloru jako ACEScg
|
||||
Do not append "copy" to filename when saving a copy Nie dodawaj „copy” do nazwy pliku przy zapisywaniu kopii
|
||||
|
||||
# View › Guides › right-click a guide
|
||||
Edit Selected Guides Edytuj zaznaczone prowadnice
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -3988,6 +3988,7 @@ layerLabel No Color Sem cor
|
||||
Chisel Hard Cinzel duro
|
||||
Chisel Soft Cinzel suave
|
||||
Open color-less EXR as ACEScg Abrir EXR sem espaço de cor como ACEScg
|
||||
Do not append "copy" to filename when saving a copy Não acrescentar "copy" ao nome do arquivo ao salvar uma cópia
|
||||
|
||||
# View › Guides › right-click a guide
|
||||
Edit Selected Guides Editar guias selecionadas
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -3169,6 +3169,7 @@ curves Smooth Сгладить
|
||||
Chisel Hard Жесткая огранка
|
||||
Chisel Soft Мягкая огранка
|
||||
Open color-less EXR as ACEScg Открывать EXR без цветового профиля как ACEScg
|
||||
Do not append "copy" to filename when saving a copy Не добавлять «copy» к имени файла при сохранении копии
|
||||
|
||||
# View › Guides › right-click a guide
|
||||
Edit Selected Guides Изменить выбранные направляющие
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -4267,6 +4267,7 @@ shape Appearance Izgled
|
||||
Chisel Hard Tvrdo klesanje
|
||||
Chisel Soft Meko klesanje
|
||||
Open color-less EXR as ACEScg Otvori EXR bez podatka o bojama kao ACEScg
|
||||
Do not append "copy" to filename when saving a copy Ne dodaji „copy“ u ime fajla pri čuvanju kopije
|
||||
Show home recent files Prikaži nedavne datoteke na početnom ekranu
|
||||
|
||||
# View › Guides › right-click a guide
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -3925,6 +3925,7 @@ cameraData Lens Lens
|
||||
Chisel Hard Sert Keski
|
||||
Chisel Soft Yumuşak Keski
|
||||
Open color-less EXR as ACEScg Renk bilgisi olmayan EXR'yi ACEScg olarak aç
|
||||
Do not append "copy" to filename when saving a copy Kopya kaydederken dosya adına "copy" ekleme
|
||||
|
||||
# View › Guides › right-click a guide
|
||||
Edit Selected Guides Seçili Kılavuzları Düzenle
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 8 and column 34.
|
@@ -3897,6 +3897,7 @@ curves Smooth Згладити
|
||||
Chisel Hard Жорстке різьблення
|
||||
Chisel Soft М'яке різьблення
|
||||
Open color-less EXR as ACEScg Відкривати EXR без колірного профілю як ACEScg
|
||||
Do not append "copy" to filename when saving a copy Не додавати «copy» до імені файлу під час збереження копії
|
||||
|
||||
# View › Guides › right-click a guide
|
||||
Edit Selected Guides Редагувати вибрані напрямні
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 1393 and column 18.
|
@@ -3685,6 +3685,7 @@ curves Smooth Làm mượt
|
||||
Chisel Hard Đục cứng
|
||||
Chisel Soft Đục mềm
|
||||
Open color-less EXR as ACEScg Mở EXR không khai báo màu sắc dưới dạng ACEScg
|
||||
Do not append "copy" to filename when saving a copy Không thêm "copy" vào tên tệp khi lưu bản sao
|
||||
|
||||
# View › Guides › right-click a guide
|
||||
Edit Selected Guides Sửa đường căn đã chọn
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -2820,6 +2820,7 @@ curves Smooth 平滑
|
||||
Chisel Hard 雕刻清晰
|
||||
Chisel Soft 雕刻柔和
|
||||
Open color-less EXR as ACEScg 将无色彩空间信息的 EXR 以 ACEScg 打开
|
||||
Do not append "copy" to filename when saving a copy 存储副本时不在文件名后添加“copy”
|
||||
# Export As metadata and profile options
|
||||
Color Profile 颜色配置文件
|
||||
EXIF EXIF
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2606 and column 53.
|
@@ -2805,6 +2805,7 @@ curves Smooth 平滑
|
||||
Chisel Hard 雕刻清晰
|
||||
Chisel Soft 雕刻柔和
|
||||
Open color-less EXR as ACEScg 將無色彩空間資訊的 EXR 以 ACEScg 開啟
|
||||
Do not append "copy" to filename when saving a copy 儲存副本時不在檔名後加上「copy」
|
||||
# Export As metadata and profile options
|
||||
Color Profile 色彩描述檔
|
||||
EXIF EXIF
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -1159,6 +1159,10 @@ fn humanize(key: &str) -> String {
|
||||
}
|
||||
// Performance: presentation without vsync (#1343); like the other graphics settings, it
|
||||
// takes effect when the window next opens.
|
||||
// File Handling: Photoshop's wording (#8080).
|
||||
if key == "doNotAppendCopy" {
|
||||
return "Do not append \"copy\" to filename when saving a copy".into();
|
||||
}
|
||||
if key == "lowLatencyDrawing" {
|
||||
return "Low-Latency Drawing (vsync off, applies at next launch)".into();
|
||||
}
|
||||
|
||||
@@ -1471,7 +1471,10 @@ fn front(app: &mut PhotocraftApp, ctx: &egui::Context, id: &str, params: &Value)
|
||||
fn save_a_copy(app: &mut PhotocraftApp) -> Result<Value, String> {
|
||||
let doc = app.session.active().ok_or("no document")?.doc.clone();
|
||||
let stem = doc.name.rsplit_once('.').map_or(doc.name.as_str(), |(a, _)| a);
|
||||
let suggested = format!("{stem} copy.psd");
|
||||
// "<name> copy.psd", or with Preferences › File Handling › Do not append "copy" to filename
|
||||
// when saving a copy the document's own name (only the extension may change), as in
|
||||
// Photoshop (#8080).
|
||||
let suggested = format!("{stem}{}.psd", app.session.prefs().file_handling.copy_suffix());
|
||||
// The copy is of the document as it was when asked.
|
||||
app.pick_save(&suggested, move |app, path| {
|
||||
// An RGB Targa asks for its bits per pixel first, and a DDS texture for its compression;
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@ Generated by `cargo xtask scorecard` from `perf/budgets.toml`, `perf/baseline.js
|
||||
| [Performance](#performance) | 3 | 22 | 26 | 60 scenarios: 3 within budget, 22 over budget or failing, 9 tracked only, 22 not run, 4 not measurable yet (baseline 2026-10-05) |
|
||||
| [File compatibility](#file-compatibility) | 9 | 12 | 6 | io corpus: oracle ≥ 148/170, round trip ≥ 169/170; psd-tools corpus: oracle ≥ 249/309, round trip ≥ 308/309; photoshop oracles: oracle ≥ 188/256, round trip ≥ 258/256 |
|
||||
| [Tools](#tools) | 36 | 8 | 0 | |
|
||||
| [Workspace and UI](#workspace-and-ui) | 13 | 7 | 3 | settings that do nothing: 24 of 171 (target 0) |
|
||||
| [Workspace and UI](#workspace-and-ui) | 13 | 7 | 3 | settings that do nothing: 24 of 172 (target 0) |
|
||||
| [Type](#type) | 5 | 3 | 1 | |
|
||||
| [Automation](#automation) | 5 | 2 | 4 | 631 of 631 menu items live (100.0%) |
|
||||
| [Reliability](#reliability) | 5 | 2 | 0 | never-crash lints on 30 of 30 crates; panic_hunt present |
|
||||
@@ -181,7 +181,7 @@ Corpus floors (`crates/io/tests/corpus.rs`): the enforced minimums; the corpus t
|
||||
|
||||
## Workspace and UI
|
||||
|
||||
**Settings that do nothing: 24 of 171** (target 0, #204). Counted by the prefs audit (`xtask/src/scorecard.rs`): a `Preferences` field counts as read when code outside the prefs model (`prefs.rs` except its `impl Session` blocks; tests excluded; the schema-driven dialog never names a field) accesses `section.field`, or `.section` and `.field` in the same file, or calls a section method that reads `self.field`. It is a heuristic lower bound: a generic name can look read when it isn't.
|
||||
**Settings that do nothing: 24 of 172** (target 0, #204). Counted by the prefs audit (`xtask/src/scorecard.rs`): a `Preferences` field counts as read when code outside the prefs model (`prefs.rs` except its `impl Session` blocks; tests excluded; the schema-driven dialog never names a field) accesses `section.field`, or `.section` and `.field` in the same file, or calls a section method that reads `self.field`. It is a heuristic lower bound: a generic name can look read when it isn't.
|
||||
|
||||
Unread: `general.color_picker`, `general.zoom_resizes_windows`, `workspace.auto_show_hidden_panels`, `workspace.enable_floating_document_window_docking`, `performance.cache_levels`, `performance.gpu_adapter`, `performance.legacy_compositing`, `scratch_disks.disks`, `units_and_rulers.column_width`, `units_and_rulers.gutter`, `plug_ins.show_extension_panels`, `plug_ins.allow_scripts_to_connect`, `plug_ins.generator_enabled`, `type_.text_engine`, `type_.recent_fonts`, `enhanced_controls.scrubby_slider_acceleration`, `raw_defaults.color_space`, `raw_defaults.bit_depth`, `raw_defaults.resolution`, `raw_defaults.sharpen_for`, `raw_defaults.open_as_smart_object`, `raw_defaults.apply_auto_tone`, `integrations.allow_agent_control`, `integrations.control_port`.
|
||||
|
||||
|
||||
Reference in new issue
Block a user