Compare commits

...

10 commits

Author SHA1 Message Date
Votre Nom
8f906d1762 Cargo.toml: patch libcosmic via local path for dev builds
Activates the [patch.'https://github.com/pop-os/libcosmic'] override
pointing at ../libcosmic, enabling local development against a
patched libcosmic checkout (e.g. to pick up
WindowControlsPosition / macOS-style window controls).

This branch is intentionally dev-local: do NOT merge upstream.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 15:13:55 +02:00
Jeremy Soller
5f96f6191b Epoch 1.0.11 version update
Generated by cosmic-epoch scripts/version-update.sh
2026-04-14 15:44:08 -06:00
Jeremy Soller
5e0392be04
Merge pull request #545 from weblate/weblate-pop-os-cosmic-edit
i18n: translation update from Hosted Weblate
2026-04-14 09:52:22 -06:00
Hosted Weblate
6fa2cb09cc
i18n: translation updates from weblate
Co-authored-by: Amadɣas <massiin@proton.me>
Co-authored-by: Asier Saratsua Garmendia <asier.sarasua@gmail.com>
Co-authored-by: ButterflyOfFire <boffire@users.noreply.hosted.weblate.org>
Co-authored-by: Ettore Atalan <atalanttore@googlemail.com>
Co-authored-by: Geeson Wan <wang14240@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jiri Grönroos <jiri.gronroos@iki.fi>
Co-authored-by: Joonas Tuomi <joonastapanituomi@gmail.com>
Co-authored-by: Tommi Nieminen <translator@legisign.org>
Co-authored-by: Urocissa Caerulea.Tw <urocissa.tw@proton.me>
Co-authored-by: Walter William Beckerleg Bruckman <spayk.99@protonmail.com>
Co-authored-by: defaultUser822 <defaultuser822@users.noreply.hosted.weblate.org>
Co-authored-by: jonnysemon <jonnysemon@users.noreply.hosted.weblate.org>
Co-authored-by: taijuin Lee <taijuin@gmail.com>
Co-authored-by: 麋麓 BigELK176 <BigELK176@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-edit/ar/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-edit/de/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-edit/fi/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-edit/kab/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-edit/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-edit/zh_Hant/
Translation: Pop OS/COSMIC Edit
2026-04-12 18:49:36 +02:00
Rishi Yadav
ffb2c46d6e fix: allow editor focus when project search drawer is open 2026-04-10 13:39:13 -06:00
Hojjat
2735e3f2c3 chore: update cosmic-text
fixes a crash after pressing ctrl+x on a selection
2026-04-10 12:44:30 -06:00
olekawaii
48b648500e Close application upon closing last tab 2026-04-10 11:38:20 -06:00
Ashley Wulber
a95a1c1691 chore: update libcosmic after reexports were removed 2026-04-09 15:59:16 -06:00
Jeremy Soller
25019d3647
Merge pull request #543 from pop-os/epoch-update
Epoch 1.0.9 version update
2026-04-07 10:19:29 -06:00
Jeremy Soller
e72723fabb Epoch 1.0.9 version update
Generated by cosmic-epoch scripts/version-update.sh
2026-04-07 07:58:32 -06:00
14 changed files with 577 additions and 340 deletions

621
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
[package] [package]
name = "cosmic-edit" name = "cosmic-edit"
version = "1.0.8" version = "1.0.11"
authors = ["Jeremy Soller <jeremy@system76.com>"] authors = ["Jeremy Soller <jeremy@system76.com>"]
edition = "2024" edition = "2024"
license = "GPL-3.0-only" license = "GPL-3.0-only"
@ -70,7 +70,9 @@ debug = true
onig = { git = "https://github.com/rust-onig/rust-onig.git", branch = "main" } onig = { git = "https://github.com/rust-onig/rust-onig.git", branch = "main" }
onig_sys = { git = "https://github.com/rust-onig/rust-onig.git", branch = "main" } onig_sys = { git = "https://github.com/rust-onig/rust-onig.git", branch = "main" }
# [patch.'https://github.com/pop-os/libcosmic'] [patch.'https://github.com/pop-os/libcosmic']
# libcosmic = { git = "https://github.com/pop-os/libcosmic//" } libcosmic = { path = "../libcosmic" }
# cosmic-config = { git = "https://github.com/pop-os/libcosmic//" } cosmic-config = { path = "../libcosmic/cosmic-config" }
# cosmic-theme = { git = "https://github.com/pop-os/libcosmic//" } cosmic-theme = { path = "../libcosmic/cosmic-theme" }
iced_futures = { path = "../libcosmic/iced/futures" }
iced_winit = { path = "../libcosmic/iced/winit" }

12
debian/changelog vendored
View file

@ -1,3 +1,15 @@
cosmic-edit (1.0.11) noble; urgency=medium
* Epoch 1.0.11 version update
-- Jeremy Soller <jeremy@system76.com> Tue, 14 Apr 2026 11:09:17 -0600
cosmic-edit (1.0.9) noble; urgency=medium
* Epoch 1.0.9 version update
-- Jeremy Soller <jeremy@system76.com> Mon, 06 Apr 2026 15:09:58 -0600
cosmic-edit (1.0.8) noble; urgency=medium cosmic-edit (1.0.8) noble; urgency=medium
* Epoch 1.0.8 version update * Epoch 1.0.8 version update

View file

@ -89,7 +89,7 @@ menu-open-project = افتح مشروعًا...
open-recent-project = افتح مشروعًا حديثًا open-recent-project = افتح مشروعًا حديثًا
close-project = أغلِق المشروع close-project = أغلِق المشروع
save = احفظ save = احفظ
save-as = إحفظ كـ... save-as = احفظ باسم...
revert-all-changes = تراجع عن جميع التغييرات revert-all-changes = تراجع عن جميع التغييرات
menu-document-statistics = إحصائيات المستند... menu-document-statistics = إحصائيات المستند...
document-type = نوع المستند... document-type = نوع المستند...

View file

@ -20,7 +20,7 @@ line-count = Zeilen
## Git-Verwaltung ## Git-Verwaltung
git-management = Git-Verwaltung git-management = Git-Verwaltung
git-management-description = Git-Verwaltung ist ein Entwicklerwerkzeug für die Versionskontrolle. git-management-description = Git-Verwaltung ist ein Entwicklerwerkzeug, das für die Versionskontrolle eingesetzt wird.
git-management-loading = Git-Verwaltung wird geladen... git-management-loading = Git-Verwaltung wird geladen...
stage = Vormerken stage = Vormerken
staged-changes = Vorgemerkte Änderungen staged-changes = Vorgemerkte Änderungen
@ -34,7 +34,7 @@ project-search = Projektsuche
## Aufforderung zum Speichern von Änderungen ## Aufforderung zum Speichern von Änderungen
prompt-save-changes-title = Änderungen vor dem Schließen speichern? prompt-save-changes-title = Änderungen vor dem Schließen speichern?
prompt-unsaved-changes = Es existieren ungespeicherte Änderungen. Speichern? prompt-unsaved-changes = Du hast ungespeicherte Änderungen. Wenn du ohne zu speichern fortfährst, gehen diese Änderungen verloren.
cancel = Abbrechen cancel = Abbrechen
discard = Änderungen verwerfen discard = Änderungen verwerfen
save-all = Alles speichern save-all = Alles speichern
@ -131,3 +131,4 @@ menu-keyboard-shortcuts = Tastenkombinationen...
menu-about = Über COSMIC Texteditor... menu-about = Über COSMIC Texteditor...
repository = Repository repository = Repository
support = Unterstützung support = Unterstützung
comment = Texteditor für den COSMIC Desktop

0
i18n/eu/cosmic_edit.ftl Normal file
View file

View file

@ -10,18 +10,18 @@ todo = TODO
document-statistics = Asiakirjan tilastot document-statistics = Asiakirjan tilastot
word-count = Sanoja word-count = Sanoja
character-count = Merkkejä character-count = Merkkejä
character-count-no-spaces = Merkit (ilman välilyöntejä) character-count-no-spaces = Merkkejä (ilman välilyöntejä)
line-count = Rivejä line-count = Rivejä
## Git management ## Git management
git-management = Git-hallinta git-management = Git-hallinta
unstaged-changes = Vaiheistamattomat muutokset unstaged-changes = Valmistelemattomat muutokset
staged-changes = Vaiheistetut muutokset staged-changes = Valmistellut muutokset
## Project search ## Project search
project-search = Projektin haku project-search = Projektihaku
## Settings ## Settings
@ -31,7 +31,7 @@ settings = Asetukset
appearance = Ulkoasu appearance = Ulkoasu
theme = Teema theme = Teema
match-desktop = Sovita työpöydän kanssa match-desktop = Sovita työpöytään
dark = Tumma dark = Tumma
light = Vaalea light = Vaalea
syntax-dark = Tumma syntaksi syntax-dark = Tumma syntaksi
@ -42,7 +42,7 @@ default-font-size = Fontin oletuskoko
### Keyboard shortcuts ### Keyboard shortcuts
keyboard-shortcuts = Pikanäppäimet keyboard-shortcuts = Pikanäppäimet
enable-vim-bindings = Ota käyttöön Vim-komennot enable-vim-bindings = Ota käyttöön Vim-näppäinsidokset
# Menu # Menu
@ -52,19 +52,19 @@ enable-vim-bindings = Ota käyttöön Vim-komennot
file = Tiedosto file = Tiedosto
new-file = Uusi tiedosto new-file = Uusi tiedosto
new-window = Uusi ikkuna new-window = Uusi ikkuna
open-file = Avaa tiedosto... open-file = Avaa tiedosto…
open-recent-file = Avaa viimeaikainen tiedosto open-recent-file = Avaa viimeaikainen tiedosto
close-file = Sulje tiedosto close-file = Sulje tiedosto
menu-open-project = Avaa projekti... menu-open-project = Avaa projekti…
open-recent-project = Avaa viimeisin projekti open-recent-project = Avaa viimeaikainen projekti
close-project = Sulje projekti close-project = Sulje projekti
save = Tallenna save = Tallenna
save-as = Tallenna nimellä... save-as = Tallenna nimellä…
revert-all-changes = Peru kaiki muutokset revert-all-changes = Kumoa kaikki muutokset
menu-document-statistics = Dokumentin tilastot... menu-document-statistics = Asiakirjan tilastot…
document-type = Dokumentin tyyppi... document-type = Asiakirjan tyyppi…
encoding = Koodataan... encoding = Merkkikoodaus…
menu-git-management = Git-hallinta... menu-git-management = Git-hallinta…
print = Tulosta print = Tulosta
quit = Lopeta quit = Lopeta
@ -79,8 +79,8 @@ paste = Liitä
select-all = Valitse kaikki select-all = Valitse kaikki
find = Etsi find = Etsi
replace = Korvaa replace = Korvaa
find-in-project = Etsi projektista... find-in-project = Etsi projektista…
spell-check = Tarkista oikeinkirjoitus... spell-check = Tarkista oikeinkirjoitus…
## View ## View
@ -96,10 +96,10 @@ convert-indentation-to-tabs = Muunna sisennykset sarkaimiksi
word-wrap = Rivitys word-wrap = Rivitys
show-line-numbers = Näytä rivinumerot show-line-numbers = Näytä rivinumerot
highlight-current-line = Korosta nykyinen rivi highlight-current-line = Korosta nykyinen rivi
syntax-highlighting = Syntaksi korostus... syntax-highlighting = Syntaksikorostus…
menu-settings = Asetukset… menu-settings = Asetukset…
menu-keyboard-shortcuts = Pikanäppäimet… menu-keyboard-shortcuts = Pikanäppäimet…
menu-about = Tietoa COSMIC-tekstieditorista menu-about = Tietoa COSMICin tekstimuokkaimesta…
cosmic-text-editor = COSMICin tekstimuokkain cosmic-text-editor = COSMICin tekstimuokkain
cancel = Peru cancel = Peru
repository = Tietovarasto repository = Tietovarasto
@ -121,3 +121,7 @@ default-size = Oletuskoko
zoom-out = Loitonna zoom-out = Loitonna
comment = Tekstimuokkain COSMIC-työpöydälle comment = Tekstimuokkain COSMIC-työpöydälle
find-placeholder = Etsi… find-placeholder = Etsi…
stage = Valmistele muutokset
unstage = Poista valmistelu
replace-placeholder = Korvaa…
default-zoom-step = Zoomauksen askeleet

View file

@ -0,0 +1,89 @@
cancel = Sefsex
undo = Ssemmet
save = Sekles
quit = Tuffɣa
replace = Semselsi
support = Tallalt
settings = Iɣewwaṛen
appearance = Timeẓri
theme = Asentel
dark = Aɣmayan
light = Aceɛlal
paste = Senteḍ
select-all = Fren akk
zoom-in = Asemɣeṛ
default-size = Tiddi tamezwert
zoom-out = Asemẓi
view = Wali
menu-settings = Iɣewwaṛen…
match-desktop = Amṣada d tnarit
file = Afaylu
new-window = Asfaylu amaynut
edit = Ẓreg
cut = Gzem
copy = Nɣel
repository = Asarsay
cosmic-text-editor = Amaẓrag n uḍris COSMIC
new-document = Isemli amaynut
open-project = Ldi asenfaṛ
document-statistics = Tiddadanin n isemli
word-count = Amḍan n wawalen
character-count = Isekkilen
character-count-no-spaces = Isekkilen (war tallunin)
line-count = Izirigen
git-management = Asefrek n Git
git-management-description = Asefrek Git d afecku n uneflay i yettwasqedcen i tmehlin n usenqed n ileqman.
git-management-loading = Asali n usefrek n Git…
project-search = Anadi n usenfaṛ
prompt-save-changes-title = Sekles ibeddilen send ad tmedleḍ?
prompt-unsaved-changes = Ɣuṛ-k·m ibeddilen ur nettwasekles ara. Ma tkemmeleḍ war asekles, ibeddilen-agi ad ṛuḥen.
discard = Sefsex ibeddilen
save-all = Sekles akk
syntax-dark = Taseddast taɣmayant
syntax-light = Taseddast taceɛlalt
default-font = Tasefsit tamezwert
default-font-size = Tiddi n tsefsit tamezwert
default-zoom-step = Isurifen n usemɣer
keyboard-shortcuts = Inegzumen n unasiw
find = Af-d
find-in-project = Af-d deg usenfaṛ…
tab-width = Tehri n yiccer: { $tab_width }
show-line-numbers = Sken imḍanen n izirig
highlight-current-line = Sebrureq izirig amiran
syntax-highlighting = Asebrureq n tseddast…
menu-keyboard-shortcuts = Inegzumen n unasiw…
menu-about = Ɣef umaẓrag n uḍris COSMIC…
open-file = Ldi afaylu…
todo = Ad Yettwaxdem
stage = Smiter
unstage = Kkes seg usmiter
staged-changes = Ibeddilen yettusmitren
unstaged-changes = Ibeddilen ur nettusmitren ara
find-placeholder = Af-d…
find-previous = Af-d uzwir
find-next = Af-d uḍfir
replace-placeholder = Semselsi…
replace-all = Semselsi akk
use-regex = Seqdec Tinfaliyin tiluganin
case-sensitive = Yettḥulfu i tejṛut n usekkil
wrap-around = Uɣal ɣer izirig
new-file = Afaylu amaynut
open-recent-file = Ldi afaylu n melmi kan
close-file = Mdel afaylu
menu-open-project = Ldi asenfaṛ…
open-recent-project = Ldi asenfaṛ n melmi kan
close-project = Mdel asenfaṛ
save-as = Sekles am…
document-type = Anaw n yisemli…
encoding = Asettengel…
menu-git-management = Asefrek n Git…
print = Siggez
redo = Err-d
spell-check = Asenqed n tira…
word-wrap = Tuɣalin s ajerriḍ
revert-all-changes = Sefsex ibeddilen akk
indentation = Asiẓi
automatic-indentation = Asiẓi awurman
convert-indentation-to-spaces = Selket asiẓi ɣer tallunin
convert-indentation-to-tabs = Selket asiẓi ɣer yiccer
comment = Amaẓrag n uḍris i tnarit COSMIC

View file

@ -21,7 +21,7 @@ line-count = 行数
git-management = Git 管理 git-management = Git 管理
git-management-description = Git 管理是个用于版本控制的开发工具。 git-management-description = Git 管理是个用于版本控制的开发工具。
git-management-loading = 正在加载 Git 管理... git-management-loading = 正在加载 Git 管理…
stage = 暂存 stage = 暂存
staged-changes = 已暂存的更改 staged-changes = 已暂存的更改
unstage = 取消暂存 unstage = 取消暂存
@ -61,10 +61,10 @@ default-zoom-step = 缩放步长
keyboard-shortcuts = 键盘快捷键 keyboard-shortcuts = 键盘快捷键
enable-vim-bindings = 启用 Vim 快捷键 enable-vim-bindings = 启用 Vim 快捷键
# Find # Find
find-placeholder = 查找... find-placeholder = 查找…
find-previous = 查找上一个 find-previous = 查找上一个
find-next = 查找下一个 find-next = 查找下一个
replace-placeholder = 替换... replace-placeholder = 替换…
replace = 替换 replace = 替换
replace-all = 全部替换 replace-all = 全部替换
case-sensitive = 区分大小写 case-sensitive = 区分大小写
@ -79,18 +79,18 @@ wrap-around = 循环搜索
file = 文件 file = 文件
new-file = 新建文件 new-file = 新建文件
new-window = 新建窗口 new-window = 新建窗口
open-file = 打开文件... open-file = 打开文件…
open-recent-file = 打开最近文件 open-recent-file = 打开最近文件
close-file = 关闭文件 close-file = 关闭文件
menu-open-project = 打开项目... menu-open-project = 打开项目…
open-recent-project = 打开最近项目 open-recent-project = 打开最近项目
close-project = 关闭项目 close-project = 关闭项目
save = 保存 save = 保存
save-as = 另存为... save-as = 另存为…
revert-all-changes = 撤销所有更改 revert-all-changes = 撤销所有更改
menu-document-statistics = 文档统计... menu-document-statistics = 文档统计…
document-type = 文档类型... document-type = 文档类型…
encoding = 编码... encoding = 编码…
menu-git-management = Git 管理… menu-git-management = Git 管理…
print = 打印 print = 打印
quit = 退出 quit = 退出
@ -105,8 +105,8 @@ copy = 复制
paste = 粘贴 paste = 粘贴
select-all = 全选 select-all = 全选
find = 查找 find = 查找
find-in-project = 在项目中查找... find-in-project = 在项目中查找…
spell-check = 拼写检查... spell-check = 拼写检查…
## View ## View
@ -125,8 +125,8 @@ convert-indentation-to-tabs = 将缩进转换为 Tab
word-wrap = 自动换行 word-wrap = 自动换行
show-line-numbers = 显示行号 show-line-numbers = 显示行号
highlight-current-line = 高亮当前行 highlight-current-line = 高亮当前行
syntax-highlighting = 语法高亮... syntax-highlighting = 语法高亮…
menu-settings = 设置... menu-settings = 设置…
menu-keyboard-shortcuts = 键盘快捷键… menu-keyboard-shortcuts = 键盘快捷键…
menu-about = 关于 COSMIC 文本编辑器… menu-about = 关于 COSMIC 文本编辑器…
repository = 仓库 repository = 仓库

View file

@ -1,5 +1,5 @@
cosmic-text-editor = COSMIC 編輯器 cosmic-text-editor = COSMIC 文字編輯器
new-document = 新文件 new-document = 新建文件
open-project = 開啟專案 open-project = 開啟專案
todo = 待辦事項 todo = 待辦事項
@ -11,7 +11,7 @@ todo = 待辦事項
## Document statistics ## Document statistics
document-statistics = 文件統計 document-statistics = 文件統計資料
word-count = 字數 word-count = 字數
character-count = 字元數 character-count = 字元數
character-count-no-spaces = 字元數(不含空格) character-count-no-spaces = 字元數(不含空格)
@ -31,8 +31,8 @@ project-search = 專案搜尋
## Prompt save changes ## Prompt save changes
prompt-save-changes-title = 未儲存的變更 prompt-save-changes-title = 關閉之前儲存變更?
prompt-unsaved-changes = 您有未儲存的變更。是否儲存? prompt-unsaved-changes = 您有變更尚未儲存。如果您繼續而無儲存,這些變更將會遺失。
discard = 放棄變更 discard = 放棄變更
## Settings ## Settings
@ -43,27 +43,27 @@ settings = 設定
appearance = 外觀 appearance = 外觀
theme = 主題 theme = 主題
match-desktop = 與桌面一致 match-desktop = 符合桌面
dark = 深色模式 dark = 深色
light = 亮色模式 light = 淺色
syntax-dark = 語法深色 syntax-dark = 暗色語法
syntax-light = 語法亮色 syntax-light = 亮色語法
default-font = 預設字型 default-font = 預設字型
default-font-size = 預設字型大小 default-font-size = 預設字體大小
### Keyboard shortcuts ### Keyboard shortcuts
keyboard-shortcuts = 鍵盤快捷鍵 keyboard-shortcuts = 鍵盤快速鍵
enable-vim-bindings = 啟用 Vim 綁定 enable-vim-bindings = 啟用 Vim 按鍵綁定
# Find # Find
find-placeholder = 尋找... find-placeholder = 尋找...
find-previous = 上一個 find-previous = 上一個
find-next = 下一個 find-next = 下一個
replace-placeholder = 替換... replace-placeholder = 取代...
replace = 替換 replace = 取代
replace-all = 全部替換 replace-all = 取代全部
case-sensitive = 區分大小寫 case-sensitive = 區分大小寫
use-regex = 使用正規表達式 use-regex = 使用正規表示式
# Menu # Menu
@ -71,36 +71,36 @@ use-regex = 使用正規表達式
## File ## File
file = 檔案 file = 檔案
new-file = 新檔案 new-file = 新建檔案
new-window = 新視窗 new-window = 新建視窗
open-file = 開啟檔案... open-file = 開啟檔案...
open-recent-file = 開啟最近檔案 open-recent-file = 開啟最近使用的檔案
close-file = 關閉檔案 close-file = 關閉檔案
menu-open-project = 開啟專案... menu-open-project = 開啟專案...
open-recent-project = 開啟最近專案 open-recent-project = 開啟最近使用的專案
close-project = 關閉專案 close-project = 關閉專案
save = 儲存 save = 儲存
save-as = 另存為... save-as = 另存新檔...
revert-all-changes = 復原所有變更 revert-all-changes = 還原所有變更
menu-document-statistics = 文件統計... menu-document-statistics = 文件統計資料...
document-type = 文件類型... document-type = 文件類型...
encoding = 編碼... encoding = 編碼...
menu-git-management = Git 管理... menu-git-management = Git 管理...
print = 列印 print = 列印
quit = 結束 quit = 退出
## Edit ## Edit
edit = 編輯 edit = 編輯
undo = 復原 undo = 復原
redo = 重做 redo = 取消復原
cut = 剪下 cut = 剪下
copy = 複製 copy = 複製
paste = 貼上 paste = 貼上
select-all = 全選 select-all = 全選
find = 尋找 find = 尋找
find-in-project = 在專案中尋找... find-in-project = 在專案中尋找...
spell-check = 拼寫檢查... spell-check = 拼字檢查...
## View ## View
@ -110,17 +110,25 @@ indentation = 縮排
### Indentation ### Indentation
automatic-indentation = 自動縮排 automatic-indentation = 自動縮排
tab-width = Tab 寬度: { $tab_width } tab-width = Tab 寬度:{ $tab_width }
convert-indentation-to-spaces = 將縮排轉換為空格 convert-indentation-to-spaces = 將縮排轉換為空格
convert-indentation-to-tabs = 將縮排轉換為 Tabs convert-indentation-to-tabs = 將縮排轉換為 Tabs
word-wrap = 自動換行 word-wrap = 自動換行
show-line-numbers = 顯示行號 show-line-numbers = 顯示行號
highlight-current-line = 突顯當前行 highlight-current-line = 突顯目前行
syntax-highlighting = 語法突顯... syntax-highlighting = 語法突顯...
menu-settings = 設定... menu-settings = 設定...
menu-keyboard-shortcuts = 鍵盤快捷鍵... menu-keyboard-shortcuts = 鍵盤快速鍵...
menu-about = 關於 COSMIC 編輯器... menu-about = 關於 COSMIC 文字編輯器...
stage = 暫存 stage = 暫存
unstage = 取消暫存 unstage = 取消暫存
cancel = 取消 cancel = 取消
save-all = 全部儲存 save-all = 全部儲存
repository = 軟體庫源
support = 支援
default-zoom-step = 縮放步進
zoom-in = 放大
default-size = 預設大小
zoom-out = 縮小
wrap-around = 循環搜尋
comment = COSMIC 桌面文字編輯器

View file

@ -1,5 +1,5 @@
use cosmic::widget::menu::key_bind::{KeyBind, Modifier}; use cosmic::widget::menu::key_bind::{KeyBind, Modifier};
use cosmic::{iced::keyboard::Key, iced_core::keyboard::key::Named}; use cosmic::{iced::core::keyboard::key::Named, iced::keyboard::Key};
use std::collections::HashMap; use std::collections::HashMap;
use crate::Action; use crate::Action;

View file

@ -480,6 +480,7 @@ pub struct App {
project_search_id: widget::Id, project_search_id: widget::Id,
project_search_value: String, project_search_value: String,
project_search_result: Option<ProjectSearchResult>, project_search_result: Option<ProjectSearchResult>,
project_search_has_focus: bool,
watcher_opt: Option<( watcher_opt: Option<(
notify::RecommendedWatcher, notify::RecommendedWatcher,
HashSet<(PathBuf, RecursiveMode)>, HashSet<(PathBuf, RecursiveMode)>,
@ -792,7 +793,7 @@ impl App {
fn update_focus(&self) -> Task<Message> { fn update_focus(&self) -> Task<Message> {
if self.core.window.show_context { if self.core.window.show_context {
match self.context_page { match self.context_page {
ContextPage::ProjectSearch => { ContextPage::ProjectSearch if self.project_search_has_focus => {
widget::text_input::focus(self.project_search_id.clone()) widget::text_input::focus(self.project_search_id.clone())
} }
_ => Task::none(), _ => Task::none(),
@ -1495,6 +1496,7 @@ impl Application for App {
project_search_id: widget::Id::unique(), project_search_id: widget::Id::unique(),
project_search_value: String::new(), project_search_value: String::new(),
project_search_result: None, project_search_result: None,
project_search_has_focus: false,
watcher_opt: None, watcher_opt: None,
modifiers: Modifiers::empty(), modifiers: Modifiers::empty(),
}; };
@ -2053,6 +2055,7 @@ impl Application for App {
}; };
} }
if !has_focus { if !has_focus {
self.project_search_has_focus = false;
return self.update_focus(); return self.update_focus();
} }
} }
@ -2440,6 +2443,7 @@ impl Application for App {
}; };
if let Some((path, cursor)) = path_cursor_opt { if let Some((path, cursor)) = path_cursor_opt {
self.project_search_has_focus = false;
if let Some(entity) = self.open_tab(Some(path)) { if let Some(entity) = self.open_tab(Some(path)) {
return Task::batch([ return Task::batch([
//TODO: why must this be done in a command? //TODO: why must this be done in a command?
@ -2502,6 +2506,7 @@ impl Application for App {
} }
Message::ProjectSearchResult(project_search_result) => { Message::ProjectSearchResult(project_search_result) => {
self.project_search_result = Some(project_search_result); self.project_search_result = Some(project_search_result);
self.project_search_has_focus = true;
// Focus correct input // Focus correct input
return self.update_focus(); return self.update_focus();
@ -2537,6 +2542,7 @@ impl Application for App {
} }
} }
Message::ProjectSearchValue(value) => { Message::ProjectSearchValue(value) => {
self.project_search_has_focus = true;
self.project_search_value = value; self.project_search_value = value;
} }
Message::PromptSaveChanges(entity) => { Message::PromptSaveChanges(entity) => {
@ -2771,9 +2777,9 @@ impl Application for App {
self.tab_model.remove(entity); self.tab_model.remove(entity);
self.update_watcher(); self.update_watcher();
// If that was the last tab, make a new empty one // If that was the last tab, exit the application
if self.tab_model.iter().next().is_none() { if self.tab_model.iter().next().is_none() {
self.open_tab(None); return self.update(Message::QuitForce)
} }
// Close PromptSaveClose dialog if open for this entity // Close PromptSaveClose dialog if open for this entity
@ -2854,6 +2860,9 @@ impl Application for App {
self.core.window.show_context = true; self.core.window.show_context = true;
} }
self.project_search_has_focus = self.core.window.show_context
&& self.context_page == ContextPage::ProjectSearch;
// Execute commands for specific pages // Execute commands for specific pages
if self.core.window.show_context && self.context_page == ContextPage::GitManagement if self.core.window.show_context && self.context_page == ContextPage::GitManagement
{ {

View file

@ -5,8 +5,9 @@ use cosmic::widget::menu::key_bind::KeyBind;
use cosmic::{ use cosmic::{
Element, Element,
app::Core, app::Core,
iced::{Background, Length, advanced::widget::text::Style as TextStyle, widget::column}, iced::{
iced_core::Border, Background, Border, Length, advanced::widget::text::Style as TextStyle, widget::column,
},
theme, theme,
widget::{ widget::{
self, divider, self, divider,

View file

@ -3,14 +3,7 @@
use cosmic::{ use cosmic::{
Renderer, Renderer,
cosmic_theme::palette::{WithAlpha, blend::Compose}, cosmic_theme::palette::{WithAlpha, blend::Compose},
iced::{ iced::core::{
Color, Element, Length, Padding, Point, Rectangle, Size, Vector,
advanced::graphics::text::{Raw, font_system},
event::{Event, Status},
keyboard::{Event as KeyEvent, Modifiers},
mouse::{self, Button, Event as MouseEvent, ScrollDelta},
},
iced_core::{
Border, Radians, Shell, Transformation, Border, Radians, Shell, Transformation,
clipboard::Clipboard, clipboard::Clipboard,
image, image,
@ -24,6 +17,13 @@ use cosmic::{
tree, tree,
}, },
}, },
iced::{
Color, Element, Length, Padding, Point, Rectangle, Size, Vector,
advanced::graphics::text::{Raw, font_system},
event::Event,
keyboard::{Event as KeyEvent, Modifiers},
mouse::{self, Button, Event as MouseEvent, ScrollDelta},
},
theme::Theme, theme::Theme,
}; };
use cosmic_text::{ use cosmic_text::{