removed unneccessary code from previous commit

This commit is contained in:
pknepps 2024-06-14 00:57:50 -04:00
commit 5b1d549dca
30 changed files with 601 additions and 163 deletions

482
Cargo.lock generated
View file

@ -508,9 +508,9 @@ dependencies = [
[[package]]
name = "async-signal"
version = "0.2.7"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "329972aa325176e89114919f2a80fdae4f4c040f66a370b1a1159c6c0f94e7aa"
checksum = "794f185324c2f00e771cd9f1ae8b5ac68be2ca7abb129a87afd6e86d228bc54d"
dependencies = [
"async-io 2.3.3",
"async-lock 3.4.0",
@ -613,9 +613,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
[[package]]
name = "backtrace"
version = "0.3.72"
version = "0.3.73"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11"
checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a"
dependencies = [
"addr2line",
"cc",
@ -833,9 +833,9 @@ dependencies = [
[[package]]
name = "cc"
version = "1.0.98"
version = "1.0.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f"
checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695"
dependencies = [
"jobserver",
"libc",
@ -903,7 +903,7 @@ dependencies = [
[[package]]
name = "clipboard_macos"
version = "0.1.0"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-6#8a816d8f218e290041bb5ef6d3b695c38e0a53b7"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7#a5be70405574e98c292537fd3b01a1352550b9bf"
dependencies = [
"objc",
"objc-foundation",
@ -913,7 +913,7 @@ dependencies = [
[[package]]
name = "clipboard_wayland"
version = "0.2.2"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-6#8a816d8f218e290041bb5ef6d3b695c38e0a53b7"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7#a5be70405574e98c292537fd3b01a1352550b9bf"
dependencies = [
"dnd",
"mime 0.1.0",
@ -923,7 +923,7 @@ dependencies = [
[[package]]
name = "clipboard_x11"
version = "0.4.2"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-6#8a816d8f218e290041bb5ef6d3b695c38e0a53b7"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7#a5be70405574e98c292537fd3b01a1352550b9bf"
dependencies = [
"thiserror",
"x11rb",
@ -1094,7 +1094,7 @@ dependencies = [
[[package]]
name = "cosmic-config"
version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic.git#173ddca60fdb26cf5b1784edfc1a78594acf7002"
source = "git+https://github.com/pop-os/libcosmic.git#d2b35319842869bfa89b1fd2fa0d3a6f7b5e8dd9"
dependencies = [
"atomicwrites",
"cosmic-config-derive",
@ -1113,7 +1113,7 @@ dependencies = [
[[package]]
name = "cosmic-config-derive"
version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic.git#173ddca60fdb26cf5b1784edfc1a78594acf7002"
source = "git+https://github.com/pop-os/libcosmic.git#d2b35319842869bfa89b1fd2fa0d3a6f7b5e8dd9"
dependencies = [
"quote",
"syn 1.0.109",
@ -1164,13 +1164,13 @@ dependencies = [
[[package]]
name = "cosmic-text"
version = "0.11.2"
source = "git+https://github.com/pop-os/cosmic-text.git#5e82de11cf5c977ee82a5d631c05382f4acc7314"
source = "git+https://github.com/pop-os/cosmic-text.git#8bb45d7aca5b4a109924f3162d670297b6bd4a19"
dependencies = [
"bitflags 2.5.0",
"fontdb",
"libm",
"log",
"rangemap",
"rayon",
"rustc-hash",
"rustybuzz",
"self_cell 1.0.4",
@ -1186,7 +1186,7 @@ dependencies = [
[[package]]
name = "cosmic-theme"
version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic.git#173ddca60fdb26cf5b1784edfc1a78594acf7002"
source = "git+https://github.com/pop-os/libcosmic.git#d2b35319842869bfa89b1fd2fa0d3a6f7b5e8dd9"
dependencies = [
"almost",
"cosmic-config",
@ -1502,12 +1502,12 @@ dependencies = [
[[package]]
name = "dnd"
version = "0.1.0"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-6#8a816d8f218e290041bb5ef6d3b695c38e0a53b7"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7#a5be70405574e98c292537fd3b01a1352550b9bf"
dependencies = [
"bitflags 2.5.0",
"mime 0.1.0",
"raw-window-handle",
"smithay-client-toolkit 0.18.0",
"smithay-client-toolkit 0.19.1",
"smithay-clipboard",
]
@ -1570,9 +1570,9 @@ checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf"
[[package]]
name = "enumflags2"
version = "0.7.9"
version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d"
checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d"
dependencies = [
"enumflags2_derive",
"serde",
@ -1580,9 +1580,9 @@ dependencies = [
[[package]]
name = "enumflags2_derive"
version = "0.7.9"
version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4"
checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8"
dependencies = [
"proc-macro2",
"quote",
@ -1636,9 +1636,9 @@ checksum = "a0474425d51df81997e2f90a21591180b38eccf27292d755f3e30750225c175b"
[[package]]
name = "etagere"
version = "0.2.11"
version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4460bc8c5caa3360e4221a5a2930c654a141dd3fe067a00c5355c488e711ae79"
checksum = "dff377452246a4a2e0ef3a7e85ce78ed77c7f93c3a4771e1c93d0cc0c69eb411"
dependencies = [
"euclid",
"svg_fmt",
@ -2289,8 +2289,8 @@ dependencies = [
"aho-corasick",
"bstr",
"log",
"regex-automata 0.4.6",
"regex-syntax 0.8.3",
"regex-automata 0.4.7",
"regex-syntax 0.8.4",
]
[[package]]
@ -2571,7 +2571,7 @@ dependencies = [
[[package]]
name = "iced"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#173ddca60fdb26cf5b1784edfc1a78594acf7002"
source = "git+https://github.com/pop-os/libcosmic.git#d2b35319842869bfa89b1fd2fa0d3a6f7b5e8dd9"
dependencies = [
"dnd",
"iced_accessibility",
@ -2589,7 +2589,7 @@ dependencies = [
[[package]]
name = "iced_accessibility"
version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic.git#173ddca60fdb26cf5b1784edfc1a78594acf7002"
source = "git+https://github.com/pop-os/libcosmic.git#d2b35319842869bfa89b1fd2fa0d3a6f7b5e8dd9"
dependencies = [
"accesskit",
"accesskit_winit",
@ -2598,7 +2598,7 @@ dependencies = [
[[package]]
name = "iced_core"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#173ddca60fdb26cf5b1784edfc1a78594acf7002"
source = "git+https://github.com/pop-os/libcosmic.git#d2b35319842869bfa89b1fd2fa0d3a6f7b5e8dd9"
dependencies = [
"bitflags 2.5.0",
"dnd",
@ -2618,7 +2618,7 @@ dependencies = [
[[package]]
name = "iced_futures"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#173ddca60fdb26cf5b1784edfc1a78594acf7002"
source = "git+https://github.com/pop-os/libcosmic.git#d2b35319842869bfa89b1fd2fa0d3a6f7b5e8dd9"
dependencies = [
"futures",
"iced_core",
@ -2631,7 +2631,7 @@ dependencies = [
[[package]]
name = "iced_graphics"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#173ddca60fdb26cf5b1784edfc1a78594acf7002"
source = "git+https://github.com/pop-os/libcosmic.git#d2b35319842869bfa89b1fd2fa0d3a6f7b5e8dd9"
dependencies = [
"bitflags 2.5.0",
"bytemuck",
@ -2655,7 +2655,7 @@ dependencies = [
[[package]]
name = "iced_renderer"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#173ddca60fdb26cf5b1784edfc1a78594acf7002"
source = "git+https://github.com/pop-os/libcosmic.git#d2b35319842869bfa89b1fd2fa0d3a6f7b5e8dd9"
dependencies = [
"iced_graphics",
"iced_tiny_skia",
@ -2667,7 +2667,7 @@ dependencies = [
[[package]]
name = "iced_runtime"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#173ddca60fdb26cf5b1784edfc1a78594acf7002"
source = "git+https://github.com/pop-os/libcosmic.git#d2b35319842869bfa89b1fd2fa0d3a6f7b5e8dd9"
dependencies = [
"dnd",
"iced_core",
@ -2679,7 +2679,7 @@ dependencies = [
[[package]]
name = "iced_style"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#173ddca60fdb26cf5b1784edfc1a78594acf7002"
source = "git+https://github.com/pop-os/libcosmic.git#d2b35319842869bfa89b1fd2fa0d3a6f7b5e8dd9"
dependencies = [
"iced_core",
"once_cell",
@ -2689,7 +2689,7 @@ dependencies = [
[[package]]
name = "iced_tiny_skia"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#173ddca60fdb26cf5b1784edfc1a78594acf7002"
source = "git+https://github.com/pop-os/libcosmic.git#d2b35319842869bfa89b1fd2fa0d3a6f7b5e8dd9"
dependencies = [
"bytemuck",
"cosmic-text",
@ -2706,7 +2706,7 @@ dependencies = [
[[package]]
name = "iced_wgpu"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#173ddca60fdb26cf5b1784edfc1a78594acf7002"
source = "git+https://github.com/pop-os/libcosmic.git#d2b35319842869bfa89b1fd2fa0d3a6f7b5e8dd9"
dependencies = [
"bitflags 2.5.0",
"bytemuck",
@ -2721,10 +2721,10 @@ dependencies = [
"raw-window-handle",
"resvg",
"rustix 0.38.34",
"smithay-client-toolkit 0.18.0",
"smithay-client-toolkit 0.19.1",
"wayland-backend",
"wayland-client",
"wayland-protocols",
"wayland-protocols 0.32.1",
"wayland-sys",
"wgpu",
]
@ -2732,7 +2732,7 @@ dependencies = [
[[package]]
name = "iced_widget"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#173ddca60fdb26cf5b1784edfc1a78594acf7002"
source = "git+https://github.com/pop-os/libcosmic.git#d2b35319842869bfa89b1fd2fa0d3a6f7b5e8dd9"
dependencies = [
"dnd",
"iced_renderer",
@ -2748,7 +2748,7 @@ dependencies = [
[[package]]
name = "iced_winit"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#173ddca60fdb26cf5b1784edfc1a78594acf7002"
source = "git+https://github.com/pop-os/libcosmic.git#d2b35319842869bfa89b1fd2fa0d3a6f7b5e8dd9"
dependencies = [
"dnd",
"iced_graphics",
@ -2784,6 +2784,124 @@ dependencies = [
"objc2 0.5.2",
]
[[package]]
name = "icu_collections"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526"
dependencies = [
"displaydoc",
"yoke",
"zerofrom",
"zerovec",
]
[[package]]
name = "icu_locid"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637"
dependencies = [
"displaydoc",
"litemap",
"tinystr",
"writeable",
"zerovec",
]
[[package]]
name = "icu_locid_transform"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e"
dependencies = [
"displaydoc",
"icu_locid",
"icu_locid_transform_data",
"icu_provider",
"tinystr",
"zerovec",
]
[[package]]
name = "icu_locid_transform_data"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e"
[[package]]
name = "icu_normalizer"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f"
dependencies = [
"displaydoc",
"icu_collections",
"icu_normalizer_data",
"icu_properties",
"icu_provider",
"smallvec",
"utf16_iter",
"utf8_iter",
"write16",
"zerovec",
]
[[package]]
name = "icu_normalizer_data"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516"
[[package]]
name = "icu_properties"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f8ac670d7422d7f76b32e17a5db556510825b29ec9154f235977c9caba61036"
dependencies = [
"displaydoc",
"icu_collections",
"icu_locid_transform",
"icu_properties_data",
"icu_provider",
"tinystr",
"zerovec",
]
[[package]]
name = "icu_properties_data"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569"
[[package]]
name = "icu_provider"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9"
dependencies = [
"displaydoc",
"icu_locid",
"icu_provider_macros",
"stable_deref_trait",
"tinystr",
"writeable",
"yoke",
"zerofrom",
"zerovec",
]
[[package]]
name = "icu_provider_macros"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
]
[[package]]
name = "ident_case"
version = "1.0.1"
@ -2792,12 +2910,14 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]]
name = "idna"
version = "0.5.0"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
checksum = "4716a3a0933a1d01c2f72450e89596eb51dd34ef3c211ccd875acdf1f8fe47ed"
dependencies = [
"unicode-bidi",
"unicode-normalization",
"icu_normalizer",
"icu_properties",
"smallvec",
"utf8_iter",
]
[[package]]
@ -2810,7 +2930,7 @@ dependencies = [
"globset",
"log",
"memchr",
"regex-automata 0.4.6",
"regex-automata 0.4.7",
"same-file",
"walkdir",
"winapi-util",
@ -3096,7 +3216,7 @@ checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
[[package]]
name = "libcosmic"
version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic.git#173ddca60fdb26cf5b1784edfc1a78594acf7002"
source = "git+https://github.com/pop-os/libcosmic.git#d2b35319842869bfa89b1fd2fa0d3a6f7b5e8dd9"
dependencies = [
"apply",
"ashpd",
@ -3201,6 +3321,12 @@ version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0b5399f6804fbab912acbd8878ed3532d506b7c951b8f9f164ef90fef39e3f4"
[[package]]
name = "litemap"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704"
[[package]]
name = "locale_config"
version = "0.3.0"
@ -3369,7 +3495,7 @@ dependencies = [
[[package]]
name = "mime"
version = "0.1.0"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-6#8a816d8f218e290041bb5ef6d3b695c38e0a53b7"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7#a5be70405574e98c292537fd3b01a1352550b9bf"
dependencies = [
"smithay-clipboard",
]
@ -3773,9 +3899,9 @@ dependencies = [
[[package]]
name = "object"
version = "0.35.0"
version = "0.36.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e"
checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434"
dependencies = [
"memchr",
]
@ -4337,14 +4463,14 @@ dependencies = [
[[package]]
name = "regex"
version = "1.10.4"
version = "1.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c"
checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata 0.4.6",
"regex-syntax 0.8.3",
"regex-automata 0.4.7",
"regex-syntax 0.8.4",
]
[[package]]
@ -4358,13 +4484,13 @@ dependencies = [
[[package]]
name = "regex-automata"
version = "0.4.6"
version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea"
checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax 0.8.3",
"regex-syntax 0.8.4",
]
[[package]]
@ -4375,9 +4501,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
[[package]]
name = "regex-syntax"
version = "0.8.3"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56"
checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
[[package]]
name = "renderdoc-sys"
@ -4756,33 +4882,6 @@ version = "1.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
[[package]]
name = "smithay-client-toolkit"
version = "0.18.0"
source = "git+https://github.com/smithay/client-toolkit?rev=3bed072#3bed072b966022f5f929d12f3aff089b1ace980b"
dependencies = [
"bitflags 2.5.0",
"bytemuck",
"calloop 0.13.0",
"calloop-wayland-source 0.3.0",
"cursor-icon",
"libc",
"log",
"memmap2 0.9.4",
"pkg-config",
"rustix 0.38.34",
"thiserror",
"wayland-backend",
"wayland-client",
"wayland-csd-frame",
"wayland-cursor",
"wayland-protocols",
"wayland-protocols-wlr",
"wayland-scanner",
"xkbcommon",
"xkeysym",
]
[[package]]
name = "smithay-client-toolkit"
version = "0.18.1"
@ -4802,20 +4901,48 @@ dependencies = [
"wayland-client",
"wayland-csd-frame",
"wayland-cursor",
"wayland-protocols",
"wayland-protocols-wlr",
"wayland-protocols 0.31.2",
"wayland-protocols-wlr 0.2.0",
"wayland-scanner",
"xkeysym",
]
[[package]]
name = "smithay-client-toolkit"
version = "0.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "837d3067369e24aeda699a5d9fc5aa14ca14a84dd70aeed7156bfa04a5605b32"
dependencies = [
"bitflags 2.5.0",
"bytemuck",
"calloop 0.13.0",
"calloop-wayland-source 0.3.0",
"cursor-icon",
"libc",
"log",
"memmap2 0.9.4",
"pkg-config",
"rustix 0.38.34",
"thiserror",
"wayland-backend",
"wayland-client",
"wayland-csd-frame",
"wayland-cursor",
"wayland-protocols 0.32.1",
"wayland-protocols-wlr 0.3.1",
"wayland-scanner",
"xkbcommon",
"xkeysym",
]
[[package]]
name = "smithay-clipboard"
version = "0.8.0"
source = "git+https://github.com/pop-os/smithay-clipboard?tag=pop-dnd-4#ab422ddcc95a9a1717df094f9c8fe69e2fdb2a27"
source = "git+https://github.com/pop-os/smithay-clipboard?tag=pop-dnd-5#d099e82a4c1e7d3e88dc34b7333de21928b1b22c"
dependencies = [
"libc",
"raw-window-handle",
"smithay-client-toolkit 0.18.0",
"smithay-client-toolkit 0.19.1",
"wayland-backend",
]
@ -4896,6 +5023,12 @@ dependencies = [
"bitflags 2.5.0",
]
[[package]]
name = "stable_deref_trait"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
[[package]]
name = "static_assertions"
version = "1.1.0"
@ -4972,6 +5105,17 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "synstructure"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
]
[[package]]
name = "sys-locale"
version = "0.3.1"
@ -5195,6 +5339,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f"
dependencies = [
"displaydoc",
"zerovec",
]
[[package]]
@ -5304,7 +5449,7 @@ dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
"winnow 0.6.11",
"winnow 0.6.13",
]
[[package]]
@ -5479,15 +5624,6 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f"
[[package]]
name = "unicode-normalization"
version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5"
dependencies = [
"tinyvec",
]
[[package]]
name = "unicode-properties"
version = "0.1.1"
@ -5526,9 +5662,9 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
[[package]]
name = "url"
version = "2.5.0"
version = "2.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633"
checksum = "f7c25da092f0a868cdf09e8674cd3b7ef3a7d92a24253e663a2fb85e2496de56"
dependencies = [
"form_urlencoded",
"idna",
@ -5604,10 +5740,22 @@ dependencies = [
]
[[package]]
name = "utf8parse"
version = "0.2.1"
name = "utf16_iter"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246"
[[package]]
name = "utf8_iter"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
[[package]]
name = "utf8parse"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "valuable"
@ -5802,6 +5950,18 @@ dependencies = [
"wayland-scanner",
]
[[package]]
name = "wayland-protocols"
version = "0.32.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83d0f1056570486e26a3773ec633885124d79ae03827de05ba6c85f79904026c"
dependencies = [
"bitflags 2.5.0",
"wayland-backend",
"wayland-client",
"wayland-scanner",
]
[[package]]
name = "wayland-protocols-plasma"
version = "0.2.0"
@ -5811,7 +5971,7 @@ dependencies = [
"bitflags 2.5.0",
"wayland-backend",
"wayland-client",
"wayland-protocols",
"wayland-protocols 0.31.2",
"wayland-scanner",
]
@ -5824,7 +5984,20 @@ dependencies = [
"bitflags 2.5.0",
"wayland-backend",
"wayland-client",
"wayland-protocols",
"wayland-protocols 0.31.2",
"wayland-scanner",
]
[[package]]
name = "wayland-protocols-wlr"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7dab47671043d9f5397035975fe1cac639e5bca5cc0b3c32d09f01612e34d24"
dependencies = [
"bitflags 2.5.0",
"wayland-backend",
"wayland-client",
"wayland-protocols 0.32.1",
"wayland-scanner",
]
@ -6019,7 +6192,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "window_clipboard"
version = "0.4.1"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-6#8a816d8f218e290041bb5ef6d3b695c38e0a53b7"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7#a5be70405574e98c292537fd3b01a1352550b9bf"
dependencies = [
"clipboard-win",
"clipboard_macos",
@ -6129,9 +6302,9 @@ dependencies = [
[[package]]
name = "windows-result"
version = "0.1.1"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "749f0da9cc72d82e600d8d2e44cadd0b9eedb9038f71a1c58556ac1c5791813b"
checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8"
dependencies = [
"windows-targets 0.52.5",
]
@ -6378,7 +6551,7 @@ dependencies = [
"wasm-bindgen-futures",
"wayland-backend",
"wayland-client",
"wayland-protocols",
"wayland-protocols 0.31.2",
"wayland-protocols-plasma",
"web-sys",
"web-time",
@ -6399,13 +6572,25 @@ dependencies = [
[[package]]
name = "winnow"
version = "0.6.11"
version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56c52728401e1dc672a56e81e593e912aa54c78f40246869f78359a2bf24d29d"
checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1"
dependencies = [
"memchr",
]
[[package]]
name = "write16"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936"
[[package]]
name = "writeable"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
[[package]]
name = "x11-dl"
version = "2.21.0"
@ -6452,12 +6637,12 @@ checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546"
[[package]]
name = "xdg-home"
version = "1.1.0"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21e5a325c3cb8398ad6cf859c1135b25dd29e186679cf2da7581d9679f63b38e"
checksum = "ca91dcf8f93db085f3a0a29358cd0b9d670915468f4290e8b85d118a34211ab8"
dependencies = [
"libc",
"winapi",
"windows-sys 0.52.0",
]
[[package]]
@ -6499,9 +6684,9 @@ dependencies = [
[[package]]
name = "xkeysym"
version = "0.2.0"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "054a8e68b76250b253f671d1268cb7f1ae089ec35e195b2efb2a4e9a836d0621"
checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56"
dependencies = [
"bytemuck",
]
@ -6530,6 +6715,30 @@ version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c94451ac9513335b5e23d7a8a2b61a7102398b8cca5160829d313e84c9d98be1"
[[package]]
name = "yoke"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5"
dependencies = [
"serde",
"stable_deref_trait",
"yoke-derive",
"zerofrom",
]
[[package]]
name = "yoke-derive"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"synstructure",
]
[[package]]
name = "zbus"
version = "3.15.2"
@ -6685,6 +6894,49 @@ dependencies = [
"syn 2.0.66",
]
[[package]]
name = "zerofrom"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55"
dependencies = [
"zerofrom-derive",
]
[[package]]
name = "zerofrom-derive"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"synstructure",
]
[[package]]
name = "zerovec"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb2cc8827d6c0994478a15c53f374f46fbd41bea663d809b14744bc42e6b109c"
dependencies = [
"yoke",
"zerofrom",
"zerovec-derive",
]
[[package]]
name = "zerovec-derive"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97cf56601ee5052b4417d90c8755c6683473c926039908196cf35d99f893ebe7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
]
[[package]]
name = "zune-inflate"
version = "0.2.54"

View file

@ -1,14 +1,83 @@
empty-folder = Prázdný adresář
empty-folder-hidden = Prázdný adresář (obsahuje skryté položky)
cosmic-files = Soubory COSMIC
empty-folder = Složka je prázdná
empty-folder-hidden = Složka je prázdná (obsahuje skryté položky)
filesystem = Souborový systém
home = Domů
trash = Koš
# List view
name = Název
modified = Datum změny
size = Velikost
# Dialogs
## Empty Trash Dialog
empty-trash = Vysypat koš
empty-trash-warning = Opravdu chcete všechny položky z Koše trvale odstranit?
## New File/Folder Dialog
create-new-file = Vytvořit nový soubor
create-new-folder = Vytvořit novou složku
file-name = Název souboru
folder-name = Název složky
file-already-exists = Soubor s daným názvem již existuje.
folder-already-exists = Složka s daným názvem již existuje.
name-hidden = Položky s názvem začínající "." budou skryty.
name-invalid = Název nemůže být "{$filename}".
name-no-slashes = Název nesmí obsahovat lomítka.
## Open/Save Dialog
cancel = Zrušit
open = Otevřít
open-file = Otevřít soubor
open-folder = Otevřít složku
open-in-new-tab = Otevřít na nové kartě
open-in-new-window = Ovevřít v novém okně
open-multiple-files = Otevřít více souborů
open-multiple-folders = Ovevřít více složek
save = Uložit
save-file = Uložit soubor
## Rename Dialog
rename-file = Přejmenovat soubor
rename-folder = Přejmenovat složku
## Replace Dialog
replace = Nahradit
replace-title = {$filename} již na daném místě existuje.
replace-warning = Chcete nahradit soubor tím, který ukládáte? Nahrazení přepíše veškerý obsah.
# Context Pages
## About
git-description = Git commit {$hash} dne {$date}
## Operations
operations = Operace
pending = Čeká
failed = Nezdařilo se
complete = Hotovo
copy_noun = Kopírovat
## Open with
open-with = Otevřít v
default-app = {$name} (výchozí)
## Properties
properties = Vlastnosti
## Settings
settings = Nastavení
settings-tab = Karta
settings-show-hidden = Zobrazit skryté soubory
default-view = Výchozí zobrazení
icon-size-list = Velikost ikon (seznam)
icon-size-grid = Velikost ikon (mřížka)
sorting-name = Třídit podle
direction = Směr
ascending = Vzestupně
descending = Sestupně
### Appearance
appearance = Vzhled
@ -18,9 +87,41 @@ dark = Tmavý
light = Světlý
# Context menu
add-to-sidebar = Přidat do postranního panelu
new-file = Nový soubor
new-folder = Nová složka
copy = Kopírovat
paste = Vyjmout
select-all = Vybrat vše
open-in-terminal = Otevřít v terminálu
move-to-trash = Přesunout do koše
restore-from-trash = Obnovit z koše
remove-from-sidebar = Odebrat z postranního panelu
sort-by-name = Seřadit podle jména
sort-by-modified = Seřadit podle data změny
sort-by-size = Seřadit podle velikosti
# Menu
## File
file = Soubor
new-tab = Nová karta
new-window = Nové okno
rename = Přejmenovat
close-tab = Zavřít kartu
quit = Zavřít
## Edit
edit = Upravit
cut = Vyjmout
copy = Kopírovat
paste = Vložit
select-all = Vybrat vše
## View
zoom-in = Přiblížit
default-size = Výchozí velikost
zoom-out = Oddálit
view = Zobrazit
grid-view = Zobrazit jako mřížku
list-view = Zobrazit jako seznam
show-hidden-files = Zobrazit skryté soubory
list-directories-first = Řadit nejprve složky
menu-settings = Nastavení...
menu-about = O aplikaci Soubory COSMIC...

View file

@ -14,7 +14,7 @@ size = Tamaño
## Empty Trash Dialog
empty-trash = Vaciar papelera
empty-trash-warning = Seguro quieres borrar permanentemente todos los elementos de la Papelera?
empty-trash-warning = ¿Seguro quiere borrar permanentemente todos los elementos de la Papelera?
## New File/Folder Dialog
create-new-file = Crear nuevo archivo
@ -46,7 +46,7 @@ rename-folder = Renombrar carpeta
## Replace Dialog
replace = Reemplazar
replace-title = {$filename} ya existe en esta ruta.
replace-warning = Quieres remplazarlo con el que estas guardando? Reemplazarlo sobre-escribirá su contenido.
replace-warning = ¿Quiere remplazarlo con el que está guardando? Reemplazarlo sobre-escribirá su contenido.
# Context Pages
@ -58,10 +58,11 @@ operations = Operaciones
pending = Pendiente
failed = Fallidas
complete = Completadas
copy_noun = Copia
## Open with
open-with = Abrir con
default-app = {$name} (default)
default-app = {$name} (por defecto)
## Properties
properties = Propiedades
@ -69,6 +70,7 @@ properties = Propiedades
## Settings
settings = Configuración
settings-tab = Tab
default-view = Vista por defecto
settings-show-hidden = Mostrar archivos escondidos
icon-size-list = Tamaño de iconos (lista)
icon-size-grid = Tamaño de iconos (grilla)
@ -111,11 +113,16 @@ edit = Editar
cut = Cortar
copy = Copiar
paste = Pegar
select-all = Seleccionar Todo
select-all = Seleccionar todo
## View
zoom-in = Aumentar
default-size = Tamaño por defecto
zoom-out = Diminuir
view = Vista
grid-view = Vista de grilla
list-view = Vista de lista
show-hidden-files = Mostrar archivos escondidos
list-directories-first = Enumerar los directorios primero
menu-settings = Configuración...
menu-about = Acerca de Archivos COSMIC...

View file

@ -5,6 +5,17 @@ filesystem = Système de fichiers
home = Dossier personnel
trash = Corbeille
# List view
name = Nom
modified = Modifié
size = Taille
# Dialogs
## Empty Trash Dialog
empty-trash = Vider la Corbeille
empty-trash-warning = Voulez-vous vraiement effacer definitivement tous les éléments dans la Corbeille ?
# New File/Folder Dialog
create-new-file = Créer un nouveau fichier
create-new-folder = Créer un nouveau dossier
@ -21,6 +32,7 @@ cancel = Annuler
open = Ouvrir
open-file = Ouvrir fichier
open-folder = Ouvrir dossier
open-in-new-tab = Ouvrir dans un nouveau onglet
open-multiple-files = Ouvrir plusieurs fichiers
open-multiple-folders = Ouvrir plusieurs dossiers
save = Enregistrer
@ -104,8 +116,13 @@ paste = Coller
select-all = Sélectionner tout
## View
zoom-in = Zoomer
default-size = Taille par défaut
zoom-out = Dézoomer
view = Vue
grid-view = Vue en grille
list-view = Vue en liste
show-hidden-files = Montrer fichiers cachés
list-directories-first = Montrer répertoires en premier
menu-settings = Paramètres...
menu-about = À propos de Fichiers COSMIC...

View file

@ -3,7 +3,18 @@ empty-folder = 空のフォルダ
empty-folder-hidden = 空のフォルダ(隠しファイルあり)
filesystem = ファイルシステム
home = ホーム
trash = ゴミ
trash = ゴミ箱
# List view
name = 名前
modified = 更新日
size = サイズ
# Dialogs
## Empty Trash Dialog
empty-trash = ゴミ箱を空にする
empty-trash-warning = ゴミ箱のアイテムをすべて完全に削除してもよろしいですか?
# New File/Folder Dialog
create-new-file = 新しいファイルを作成
@ -43,7 +54,7 @@ size = サイズ
# Context Pages
## About
git-description = {$date}に{$hash}といGitコミット
git-description = {$date}に{$hash}といGitコミット
## Operations
operations = 操作
@ -52,7 +63,7 @@ failed = 失敗
complete = 完了
## Open with
open-with = で開く
open-with = 別のアプリケーションで開く
default-app = {$name} (デフォルト)
## Properties
@ -62,6 +73,7 @@ properties = プロパティ
settings = 設定
settings-tab = タブ
settings-show-hidden = 隠しファイルを表示
default-view = デフォルトの表示
icon-size-list = アイコンサイズ(リスト)
icon-size-grid = アイコンサイズ(グリッド)
sorting-name = 並べ替え
@ -104,8 +116,13 @@ paste = 貼り付け
select-all = すべてを選択
## View
zoom-in = ズームイン
default-size = デフォルトサイズ
zoom-out = ズームアウト
view = 表示
grid-view = グリッドの表示
list-view = リストの表示
show-hidden-files = 隠しファイルを表示
list-directories-first = ダイレクトリーを最初に表示
menu-settings = 設定...
menu-about = COSMICファイルについて...

View file

@ -71,6 +71,7 @@ properties = Propriedades
settings = Configurações
settings-tab = Aba
settings-show-hidden = Mostrar arquivos ocultos
default-view = Visualização padrão
icon-size-list = Tamanho do ícone (lista)
icon-size-grid = Tamanho do ícone (grade)
sorting-name = Ordenar por

0
samples/i18n/منزل Normal file
View file

0
samples/i18n/主目錄 Normal file
View file

View file

@ -0,0 +1 @@
key: value

View file

Before

Width:  |  Height:  |  Size: 256 KiB

After

Width:  |  Height:  |  Size: 256 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Before After
Before After

View file

@ -37,7 +37,7 @@ use std::{
num::NonZeroU16,
path::PathBuf,
process,
sync::{Arc, Mutex},
sync::Arc,
time::{self, Instant},
};
@ -181,7 +181,7 @@ pub enum NavMenuAction {
OpenInNewWindow(segmented_button::Entity),
Properties(segmented_button::Entity),
RemoveFromSidebar(segmented_button::Entity),
EmptyTrash(segmented_button::Entity),
EmptyTrash,
}
impl MenuAction for NavMenuAction {
@ -237,7 +237,7 @@ pub enum Message {
TabConfig(TabConfig),
TabMessage(Option<Entity>, tab::Message),
TabNew,
TabRescan(Entity, Vec<tab::Item>),
TabRescan(Entity, Location, Vec<tab::Item>),
ToggleContextPage(ContextPage),
WindowClose,
WindowNew,
@ -376,8 +376,9 @@ impl App {
let icon_sizes = self.config.tab.icon_sizes;
Command::perform(
async move {
match tokio::task::spawn_blocking(move || location.scan(icon_sizes)).await {
Ok(items) => message::app(Message::TabRescan(entity, items)),
let location2 = location.clone();
match tokio::task::spawn_blocking(move || location2.scan(icon_sizes)).await {
Ok(items) => message::app(Message::TabRescan(entity, location, items)),
Err(err) => {
log::warn!("failed to rescan: {}", err);
message::none()
@ -406,7 +407,29 @@ impl App {
}
fn search(&mut self) -> Command<Message> {
self.open_tab(Location::Search(home_dir(), self.search_input.clone()))
let entity = self.tab_model.active();
let mut title_location_opt = None;
if let Some(tab) = self.tab_model.data_mut::<Tab>(entity) {
match &tab.location {
Location::Path(path) | Location::Search(path, ..) => {
tab.change_location(
&Location::Search(path.clone(), self.search_input.clone()),
None,
);
title_location_opt = Some((tab.title(), tab.location.clone()));
}
_ => {}
}
}
if let Some((title, location)) = title_location_opt {
self.tab_model.text_set(entity, title);
return Command::batch([
self.update_title(),
self.update_watcher(),
self.rescan_tab(entity, location),
]);
}
Command::none()
}
fn selected_paths(&self, entity_opt: Option<Entity>) -> Vec<PathBuf> {
@ -977,10 +1000,10 @@ impl Application for App {
NavMenuAction::Properties(id),
),
cosmic::widget::menu::Item::Divider,
if is_context_trash {
cosmic ::widget::menu::Item::Button(
if is_context_trash {
cosmic::widget::menu::Item::Button(
fl!("empty-trash"),
NavMenuAction::EmptyTrash(id),
NavMenuAction::EmptyTrash,
)
} else {
cosmic::widget::menu::Item::Button(
@ -1717,12 +1740,16 @@ impl Application for App {
};
return self.open_tab(location);
}
Message::TabRescan(entity, items) => match self.tab_model.data_mut::<Tab>(entity) {
Some(tab) => {
tab.set_items(items);
Message::TabRescan(entity, location, items) => {
match self.tab_model.data_mut::<Tab>(entity) {
Some(tab) => {
if location == tab.location {
tab.set_items(items);
}
}
_ => (),
}
_ => (),
},
}
//TODO: TABRELOAD
Message::ToggleContextPage(context_page) => {
//TODO: ensure context menus are closed
@ -1918,9 +1945,8 @@ impl Application for App {
}
}
NavMenuAction::EmptyTrash(_) => {
NavMenuAction::EmptyTrash => {
self.dialog_pages.push_front(DialogPage::EmptyTrash);
self.dialog();
}
},
}

View file

@ -36,11 +36,11 @@ impl MimeIconCache {
}
let icon_name = icon_names.remove(0);
let mut named = icon::from_name(icon_name).size(key.size);
let mut fallback_names = Vec::new();
for fallback_name in icon_names {
fallback_names.push(fallback_name.into());
}
if fallback_names.is_empty() {
if !icon_names.is_empty() {
let mut fallback_names = Vec::with_capacity(icon_names.len());
for fallback_name in icon_names {
fallback_names.push(fallback_name.into());
}
named = named.fallback(Some(icon::IconFallback::Names(fallback_names)));
}
Some(named.handle())

View file

@ -376,10 +376,11 @@ pub fn scan_search(tab_path: &PathBuf, term: &str, sizes: IconSizes) -> Vec<Item
let mut items = Arc::into_inner(items_arc).unwrap().into_inner().unwrap();
let duration = start.elapsed();
log::info!(
"searched for {:?} in {:?}, found {} items",
"searched for {:?} inside {:?} in {:?}, found {} items",
term,
tab_path,
duration,
items.len()
items.len(),
);
let start = Instant::now();
@ -1417,7 +1418,7 @@ impl Tab {
commands.push(Command::OpenFile(path.clone()));
}
}
Location::Search(path, term) => {
Location::Search(_path, _term) => {
cd = Some(location);
}
Location::Trash => {
@ -1701,7 +1702,7 @@ impl Tab {
Some(items)
}
pub fn location_view(&self) -> Option<Element<Message>> {
pub fn location_view(&self) -> Element<Message> {
let cosmic_theme::Spacing {
space_xxxs,
space_xxs,
@ -1747,7 +1748,7 @@ impl Tab {
})
.on_submit(Message::Location(location.clone())),
);
return Some(row.into());
return row.into();
}
_ => {
//TODO: allow editing other locations
@ -1760,11 +1761,25 @@ impl Tab {
.padding(space_xxs)
.style(theme::Button::Icon),
);
} else if let Location::Search(_, term) = &self.location {
row = row.push(
widget::button(
widget::row::with_children(vec![
widget::icon::from_name("system-search-symbolic")
.size(16)
.into(),
widget::text(term).into(),
])
.spacing(space_xxs),
)
.padding(space_xxs)
.style(theme::Button::Icon),
);
}
let mut children: Vec<Element<_>> = Vec::new();
match &self.location {
Location::Path(path) => {
Location::Path(path) | Location::Search(path, ..) => {
let home_dir = crate::home_dir();
for ancestor in path.ancestors() {
let ancestor = ancestor.to_path_buf();
@ -1811,7 +1826,13 @@ impl Tab {
children.push(
widget::button(row)
.padding(space_xxxs)
.on_press(Message::Location(Location::Path(ancestor)))
.on_press(Message::Location(match &self.location {
Location::Path(_) => Location::Path(ancestor),
Location::Search(_, term) => {
Location::Search(ancestor, term.clone())
}
other => other.clone(),
}))
.style(theme::Button::Link)
.into(),
);
@ -1822,9 +1843,6 @@ impl Tab {
}
children.reverse();
}
Location::Search(path, term) => {
return None;
}
Location::Trash => {
let mut row = widget::row::with_capacity(2)
.align_items(Alignment::Center)
@ -1845,7 +1863,7 @@ impl Tab {
for child in children {
row = row.push(child);
}
Some(row.into())
row.into()
}
pub fn empty_view(&self, has_hidden: bool) -> Element<Message> {
@ -2485,7 +2503,7 @@ impl Tab {
// Update cached size
self.size_opt.set(Some(size));
let location_view_opt = self.location_view();
let location_view = self.location_view();
let (drag_list, mut item_view, can_scroll) = match self.config.view {
View::Grid => self.grid_view(),
View::List => self.list_view(),
@ -2545,9 +2563,7 @@ impl Tab {
.position(widget::popover::Position::Point(point));
}
let mut tab_column = widget::column::with_capacity(3);
if let Some(location_view) = location_view_opt {
tab_column = tab_column.push(location_view);
}
tab_column = tab_column.push(location_view);
if can_scroll {
tab_column = tab_column.push(
widget::scrollable(popover)