From 2ca51132d5a9dd891de6fde9be20fc75e416f1e6 Mon Sep 17 00:00:00 2001 From: mkljczk Date: Fri, 3 Jan 2025 13:14:05 +0100 Subject: [PATCH 01/35] Only display 'Connect anonymously' when available Signed-off-by: mkljczk --- src/app.rs | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/src/app.rs b/src/app.rs index 2d34b30..f05a56e 100644 --- a/src/app.rs +++ b/src/app.rs @@ -899,7 +899,7 @@ impl App { self.search_set(entity, term_opt) } - fn search_set(&mut self,tab: Entity, term_opt: Option) -> Task { + fn search_set(&mut self, tab: Entity, term_opt: Option) -> Task { let mut title_location_opt = None; if let Some(tab) = self.tab_model.data_mut::(tab) { let location_opt = match term_opt { @@ -3744,7 +3744,8 @@ impl Application for App { let mut parts = auth.message.splitn(2, '\n'); let title = parts.next().unwrap_or_default(); let body = parts.next().unwrap_or_default(); - widget::dialog() + + let mut widget = widget::dialog() .title(title) .body(body) .control(widget::column::with_children(controls).spacing(space_s)) @@ -3753,18 +3754,25 @@ impl Application for App { ) .secondary_action( widget::button::standard(fl!("cancel")).on_press(Message::DialogCancel), - ) - .tertiary_action(widget::button::text(fl!("connect-anonymously")).on_press( - Message::DialogUpdateComplete(DialogPage::NetworkAuth { - mounter_key: *mounter_key, - uri: uri.clone(), - auth: MounterAuth { - anonymous_opt: Some(true), - ..auth.clone() - }, - auth_tx: auth_tx.clone(), - }), - )) + ); + + if let Some(_anonymous) = &auth.anonymous_opt { + widget = widget.tertiary_action( + widget::button::text(fl!("connect-anonymously")).on_press( + Message::DialogUpdateComplete(DialogPage::NetworkAuth { + mounter_key: *mounter_key, + uri: uri.clone(), + auth: MounterAuth { + anonymous_opt: Some(true), + ..auth.clone() + }, + auth_tx: auth_tx.clone(), + }), + ), + ); + } + + widget } DialogPage::NetworkError { mounter_key: _, From 38e8aac62266901c20ae8bc76ac08ab37966f873 Mon Sep 17 00:00:00 2001 From: Jason Rodney Hansen Date: Sat, 4 Jan 2025 16:35:05 -0700 Subject: [PATCH 02/35] Enable `Open item location` for Recents --- src/menu.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/menu.rs b/src/menu.rs index 4f355d5..abd602a 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -163,7 +163,7 @@ pub fn context_menu<'a>( .push(menu_item(fl!("open-in-terminal"), Action::OpenTerminal).into()); } } - if matches!(tab.location, Location::Search(..)) { + if matches!(tab.location, Location::Search(..) | Location::Recents) { children.push( menu_item(fl!("open-item-location"), Action::OpenItemLocation).into(), ); @@ -260,7 +260,7 @@ pub fn context_menu<'a>( if selected_dir == 1 && selected == 1 || selected_dir == 0 { children.push(menu_item(fl!("open"), Action::Open).into()); } - if matches!(tab.location, Location::Search(..)) { + if matches!(tab.location, Location::Search(..) | Location::Recents) { children.push( menu_item(fl!("open-item-location"), Action::OpenItemLocation).into(), ); From 7a49c40050668352533be6be819b086b6843c484 Mon Sep 17 00:00:00 2001 From: Jason Rodney Hansen Date: Sun, 5 Jan 2025 12:08:00 -0700 Subject: [PATCH 03/35] Fix 'New folder...' context menu item in save dialog --- src/dialog.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dialog.rs b/src/dialog.rs index 4b06aef..35ab020 100644 --- a/src/dialog.rs +++ b/src/dialog.rs @@ -344,6 +344,7 @@ impl From for Message { AppMessage::ZoomDefault(_entity_opt) => Message::ZoomDefault, AppMessage::ZoomIn(_entity_opt) => Message::ZoomIn, AppMessage::ZoomOut(_entity_opt) => Message::ZoomOut, + AppMessage::NewItem(_entity_opt, true) => Message::NewFolder, unsupported => { log::warn!("{unsupported:?} not supported in dialog mode"); Message::None From 76a3dd62793aa950a4f8261c2a9b0908c6ff6525 Mon Sep 17 00:00:00 2001 From: Jason Rodney Hansen Date: Sun, 5 Jan 2025 13:50:08 -0700 Subject: [PATCH 04/35] Fix crash for dialog in debug mode `Subscription::map` must be provided a non-capturing closure. A couple places were passing capturing closures, which caused a debug assert failure. These have been fixed. --- src/dialog.rs | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/dialog.rs b/src/dialog.rs index 35ab020..a5a792a 100644 --- a/src/dialog.rs +++ b/src/dialog.rs @@ -251,7 +251,8 @@ impl Dialog { self.cosmic .subscription() .map(DialogMessage) - .map(self.mapper) + .with(self.mapper) + .map(|(mapper, message)| mapper(message)) } pub fn update(&mut self, message: DialogMessage) -> Task { @@ -1709,16 +1710,17 @@ impl Application for App { ]; for (key, mounter) in MOUNTERS.iter() { - let key = *key; - subscriptions.push(mounter.subscription().map(move |mounter_message| { - match mounter_message { - MounterMessage::Items(items) => Message::MounterItems(key, items), - _ => { - log::warn!("{:?} not supported in dialog mode", mounter_message); - Message::None - } - } - })); + subscriptions.push( + mounter.subscription().with(*key).map( + |(key, mounter_message)| match mounter_message { + MounterMessage::Items(items) => Message::MounterItems(key, items), + _ => { + log::warn!("{:?} not supported in dialog mode", mounter_message); + Message::None + } + }, + ), + ); } Subscription::batch(subscriptions) From a91d5c27cb380d00ad20a27c494427259dc1e57c Mon Sep 17 00:00:00 2001 From: Feike Donia Date: Tue, 7 Jan 2025 21:56:50 +0100 Subject: [PATCH 05/35] Add Dutch translation (#724) * add translation * Update cosmic_files.ftl * Update cosmic_files.ftl * Update cosmic_files.ftl * Update cosmic_files.ftl * Update cosmic_files.ftl * Spell checked with Libreoffice * improve * Minor spell fix --- i18n/nl/cosmic_files.ftl | 275 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 275 insertions(+) create mode 100644 i18n/nl/cosmic_files.ftl diff --git a/i18n/nl/cosmic_files.ftl b/i18n/nl/cosmic_files.ftl new file mode 100644 index 0000000..dfd0a43 --- /dev/null +++ b/i18n/nl/cosmic_files.ftl @@ -0,0 +1,275 @@ +cosmic-files = COSMIC-bestandsbeheerder +empty-folder = Lege map +empty-folder-hidden = Lege map (met verborgen bestanden) +no-results = Geen resultaten gevonden +filesystem = Bestandssysteem +home = Gebruikersmap +networks = Netwerken +notification-in-progress = Bestanden worden momenteel bewerkt. +trash = Prullenbak +recents = Recente bestanden +undo = Ongedaan maken +today = Vandaag + +# Desktop view options +desktop-view-options = Opties voor bureaubladweergave +show-on-desktop = Op bureaublad weergeven +desktop-folder-content = Bestanden in Bureaublad +mounted-drives = Gekoppelde schijven +trash-folder-icon = Prullenbakicoon +icon-size-and-spacing = Grootte en ruimte tussen iconen +icon-size = Icoon grootte + +# List view +name = Naam +modified = Bewerkt +trashed-on = Tijd van verwijderen +size = Grootte + +# Progress footer +details = Details +dismiss = Bericht negeren +operations-running = {$running} bewerkingen worden uitgevoerd ({$percent}%)... +operations-running-finished = {$running} bewerkingen worden uitgevoerd ({$percent}%), {$finished} voltooid... +pause = Pauze +resume = Hervatten + +# Dialogs + +## Compress Dialog +create-archive = Maak een archiefbestand + +## Empty Trash Dialog +empty-trash = Prullenbak legen? +empty-trash-warning = Weet u zeker dat u alles in de prullenbak permanent wilt verwijderen? + +## Mount Error Dialog +mount-error = Toegang tot schijf niet mogelijk + +## New File/Folder Dialog +create-new-file = Nieuw bestand aanmaken +create-new-folder = Nieuwe map aanmaken +file-name = Bestandsnaam +folder-name = Mapnaam +file-already-exists = Er bestaat al een bestand met deze naam. +folder-already-exists = Er bestaat al een map met deze naam. +name-hidden = Namen die met '.' beginnen worden verborgen. +name-invalid = De naam '{$filename}' is niet geldig. +name-no-slashes = De naam mag geen schuine strepen bevatten. + +## Open/Save Dialog +cancel = Annuleren +create = Aanmaken +open = Openen +open-file = Bestand openen +open-folder = Map openen +open-in-new-tab = Open in nieuw tabblad +open-in-new-window = Open in nieuw venster +open-item-location = Open locatie van item +open-multiple-files = Meerdere bestanden openen +open-multiple-folders = Meerdere mappen openen +save = Opslaan +save-file = Bestand opslaan + +## Open With Dialog +open-with-title = Hoe wilt u '{$name}' openen? +browse-store = Verken {$store} + +## Rename Dialog +rename-file = Bestand hernoemen +rename-folder = Map hernoemen + +## Replace Dialog +replace = Vervangen +replace-title = '{$filename}' bestaat al op deze locatie. +replace-warning = Wilt u het bestand vervangen door de nieuwe versie? Dit zal de bestaande inhoud overschrijven. +replace-warning-operation = Wilt u het bestand vervangen? Bestaande inhoud wordt overschreven! +original-file = Oorspronkelijk bestand +replace-with = Vervangen door +apply-to-all = Op alles toepassen +keep-both = Beide behouden +skip = Overslaan + +## Set as Executable and Launch Dialog +set-executable-and-launch = Bestand uitvoerbaar maken en dan openen +set-executable-and-launch-description = Wilt u '{$name}' uitvoerbaar maken en dan openen? +set-and-launch = Maak uitvoerbaar en open + +## Metadata Dialog +owner = Eigenaar +group = Groep +other = Anderen +read = Lezen +write = Schrijven +execute = Uitvoeren + +# Context Pages + +## About +git-description = Git commit {$hash} op {$date} + +## Add Network Drive +add-network-drive = Netwerkschijf toevoegen +connect = Verbinden +connect-anonymously = Anoniem verbinden +connecting = Verbinding maken... +domain = Domein +enter-server-address = Serveradres invoeren +network-drive-description = + Serveradressen bestaan uit protocolvoorvoegsel en netwerkadres. + Voorbeelden: ssh://192.168.0.1, ftp://[2001:db8::1] +### Make sure to keep the comma which separates the columns +network-drive-schemes = + Beschikbare protocollen,Voorvoegsel + AppleTalk,afp:// + File Transfer Protocol,ftp:// of ftps:// + Network File System,nfs:// + Server Message Block,smb:// + SSH File Transfer Protocol,sftp:// of ssh:// + WebDav,dav:// of davs:// +network-drive-error = Geen toegang tot de netwerkschijf +password = Wachtwoord +remember-password = Wachtwoord onthouden +try-again = Opnieuw proberen +username = Gebruikersnaam + +## Operations +cancelled = Geannuleerd +edit-history = Geschiedenis bewerken +history = Geschiedenis +no-history = Geen items in de geschiedenis. +pending = In afwachting +progress = {$percent}% +progress-cancelled = {$percent}%, geannuleerd +progress-paused = {$percent}%, gepauzeerd +failed = Mislukt +complete = Voltooid +compressing = { $items} {$items -> + [one] bestand wordt + *[other] bestanden worden + } van '{$from}' naar '{$to}' gecomprimeerd ({$progress})... +compressed = { $items} {$items -> + [one] bestand + *[other] bestanden + } gecomprimeerd van '{$from}' naar '{$to}' +copy_noun = Kopie +creating = '{$name}' in '{$parent}' aanmaken +created = '{$name}' in '{$parent}' aangemaakt +copying = {$items} {$items -> + [one] bestand wordt + *[other] bestanden worden + } van '{$from}' naar '{$to}' gekopieerd ({$progress})... +emptying-trash = {trash} wordt geleegd ({$progress})... +emptied-trash = {trash} geleegd +extracting = {$items} {$items -> + [one] bestand wordt + *[other] bestanden worden + } van '{$from}' naar '{$to}' uitgepakt ({$progress})... +extracted = {$items} {$items -> + [one] bestand + *[other] bestanden + } uitgepakt van '{$from}' naar '{$to}' +setting-executable-and-launching = '{$name}' wordt uitvoerbaar gemaakt en geopend +set-executable-and-launched = '{$name}' uitvoerbaar maken en openen +moving = {$items} {$items -> + [one] bestand wordt + *[other] bestanden worden + } van '{$from}' naar '{$to}' verplaatst ({$progress})... +moved = {$items} {$items -> + [one] bestand + *[other] bestanden + } verplaatst van '{$form}' naar '{$to}' +renaming = '{$from}' als '{$to}' hernoemen +renamed = '{$form}' als '{$to}' hernoemd +restoring = {$items} {$items -> + [one] bestand wordt + *[other] bestanden worden + } uit {trash} teruggezet ({$progress})... +restored = {$items} {$items -> + [one] bestand + *[other] bestanden + } uit {trash} teruggezet +unknown-folder = Onbekende map + +## Open with +open-with = Openen met... +default-app = {$name} (standaard) + +## Show details +show-details = Details weergeven +type = Type: {$mime} +items = Bestanden: {$items} +item-size = Grootte: {$size} +item-created = Aangemaakt op: {$created} +item-modified = Bewerkt op: {$modified} +item-accessed = Geopend op: {$accessed} +calculating = Wordt berekend... + +## Settings +settings = Instellingen + +### Appearance +appearance = Uiterlijk +theme = Thema +match-desktop = Systeemstandaard +dark = Donker +light = Licht + +# Context menu +add-to-sidebar = Aan de zijbalk toevoegen +compress = Comprimeren +extract-here = Uitpakken +new-file = Nieuw bestand... +new-folder = Nieuwe map... +open-in-terminal = Openen in terminal +move-to-trash = Naar prullenbak verplaatsen +restore-from-trash = Uit prullenbak terugzetten +remove-from-sidebar = Uit de zijbalk verwijderen +sort-by-name = Sorteren op naam +sort-by-modified = Sorteren op laatst bewerkt +sort-by-size = Sorteren op grootte +sort-by-trashed = Sorteren op tijdstip van verwijderen + +## Desktop +change-wallpaper = Schermachtergrond wijzigen... +desktop-appearance = Bureaublad uiterlijk... +display-settings = Beeldschermbeheer... + +# Menu + +## File +file = Bestand +new-tab = Nieuw tabblad +new-window = Nieuw venster +rename = Hernoemen... +close-tab = Tabblad sluiten +quit = Sluiten + +## Edit +edit = Bewerken +cut = Knippen +copy = Kopiëren +paste = Plakken +select-all = Alles selecteren + +## View +zoom-in = Inzoomen +default-size = Zoomniveau terugzetten +zoom-out = Uitzoomen +view = Aanzicht +grid-view = Rasterweergave +list-view = Lijstweergave +show-hidden-files = Verborgen bestanden tonen +list-directories-first = Mappen bovenaan weergeven +gallery-preview = Galerijweergave +menu-settings = Instellingen... +menu-about = Over COSMIC-bestandsbeheerder... + +## Sort +sort = Sorteren +sort-a-z = A-Z +sort-z-a = Z-A +sort-newest-first = Nieuwste bovenaan +sort-oldest-first = Oudste bovenaan +sort-smallest-to-largest = Van klein naar groot +sort-largest-to-smallest = Van groot naar klein From d11cfbbee29b5b3f77623a26e5679ee764f76638 Mon Sep 17 00:00:00 2001 From: Luna Jernberg Date: Wed, 8 Jan 2025 14:53:58 +0100 Subject: [PATCH 06/35] Update cosmic_files.ftl (#727) Update Swedish translation --- i18n/sv/cosmic_files.ftl | 328 ++++++++++++++++++++++++++++++--------- 1 file changed, 251 insertions(+), 77 deletions(-) diff --git a/i18n/sv/cosmic_files.ftl b/i18n/sv/cosmic_files.ftl index 71d91ef..948283d 100644 --- a/i18n/sv/cosmic_files.ftl +++ b/i18n/sv/cosmic_files.ftl @@ -1,90 +1,129 @@ +cosmic-files = COSMIC Files empty-folder = Tom katalog empty-folder-hidden = Tom katalog (har dolda objekt) +no-results = Inga resultat hittades filesystem = Filsystem home = Hem networks = Nätverk +notification-in-progress = Filoperationer pågår. trash = Papperskorg recents = Senaste undo = Ångra today = Idag -# Dialog +# Skrivbordsvyalternativ +desktop-view-options = Skrivbordsvyalternativ... +show-on-desktop = Visa på skrivbord +desktop-folder-content = Skrivbordsmappinnehåll +mounted-drives = Monterade enheter +trash-folder-icon = Ikon för papperskorgen +icon-size-and-spacing = Ikonstorlek och mellanrum +icon-size = Ikonstorlek + +# Dialogruta cancel = Avbryt open = Öppna -# List view +# Dialogrutor + +## Komprimera dialogruta +create-archive = Skapa arkiv + +## Töm papperskorgen dialogruta +empty-trash = Töm papperskorgen +empty-trash-warning = Är du säker på att du vill ta bort alla objekt i papperskorgen permanent? + +## Monteringsfel dialogruta +mount-error = Kan inte komma åt enheten + +## Ny Fil/katalog dialogruta +create-new-file = Skapa ny fil +create-new-folder = Skapa ny katalog +file-name = Filnamn +folder-name = Katalognamn +file-already-exists = En fil med det namnet finns redan. +folder-already-exists = En katalog med det namnet finns redan. +name-hidden = Namn som börjar med "." kommer att vara dolda. +name-invalid = Namnet kan inte vara "{$filename}". +name-no-slashes = Namnet får inte innehålla snedstreck. + +## Öppna/Spara dialogruta +cancel = Avbryt +create = Skapa +open = Öppna +open-file = Öppna fil +open-folder = Öppna katalog +open-in-new-tab = Öppna i en ny flik +open-in-new-window = Öppna i nytt fönster +open-item-location = Öppna objektets plats +open-multiple-files = Öppna flera filer +open-multiple-folders = Öppna flera kataloger +save = Spara +save-file = Spara fil + +## Öppna med dialogruta +open-with-title = Hur vill du öppna "{$name}"? +browse-store = Bläddra i {$store} + +## Byt namn dialogruta +rename-file = Byt namn på fil +rename-folder = Byt namn på katalog + +## Ersätt dialogruta +replace = Ersätt +replace-title = "{$filename}" existerar redan på den här platsen. +replace-warning = Vill du ersätta den med den du sparar? Om du ersätter den kommer dess innehåll att skrivas över. +replace-warning-operation = Vill du ersätta den? Om du ersätter den kommer dess innehåll att skrivas över. +original-file = Originalfil +replace-with = Ersätt med +apply-to-all = Verkställ för alla +keep-both = Behåll båda +skip = Hoppa över + +## Ställ in som körbar och starta dialogruta +set-executable-and-launch = Ställ in som körbar och starta +set-executable-and-launch-description = Vill du ställa in "{$name}" som körbar och starta den? +set-and-launch = Ställ in och starta + +## Metadata dialogruta +owner = Ägare +group = Grupp +other = Andra +read = Läs +write = Skriv +execute = Exekvera + + + + +# Listvy name = Namn modified = Modifierad +trashed-on = Kastad size = Storlek -# Context Pages +# Framstegssidfot +details = Detaljer +dismiss = Stäng meddelande +operations-running = {$running} operationer körs ({$percent}%)... +operations-running-finished = {$running} operationer körs ({$percent}%), {$finished} färdig... +pause = Paus +resume = Återuppta -## Operations -operations = Operationer -pending = Väntar -failed = Misslyckades -complete = Slutförd -history = Historik - -## Properties -properties = Egenskaper - -## Settings -settings = Inställningar - -### Appearance -appearance = Utseende -theme = Tema -match-desktop = Matcha skrivbordet -dark = Mörkt -light = Ljust - -# Context menu -new-file = Ny fil -new-folder = Ny katalog -add-to-sidebar = Lägg till i sidofält -move-to-trash = Flytta till papperskorg -restore-from-trash = Återställ från papperskorgen - -# Menu - -## File -file = Fil -new-tab = Ny flik -new-window = Nytt fönster -rename = Byt namn... -menu-show-details = Visa detaljer... -close-tab = Stäng flik -quit = Avsluta - -## Edit -edit = Redigera -cut = Klipp ut -copy = Kopiera -paste = Klistra in -select-all = Välj alla - -## View -zoom-in = Zooma in -default-size = Standardstorlek -zoom-out = Zooma ut -view = Visa -grid-view = Rutnätsvy -list-view = Listvy -show-hidden-files = Visa dolda filer -list-directories-first = Lista kataloger först -gallery-preview = Galleri förhandsvisning -menu-settings = Inställningar... -menu-about = Om COSMIC Files... - -## Open with -open-with = Öppna med... -default-app = {$name} (standard) - -## Show details -show-details = Visa detaljer +# Kontextsidor +## Om +git-description = Git commit {$hash} på {$date} +## Lägg till en Nätverksenhet +add-network-drive = Lägg till en Nätverksenhet +connect = Anslut +connect-anonymously = Anslut anonymt +connecting = Ansluter... +domain = Domän +enter-server-address = Ange server address +try-again = Försök igen +username = Användarnamn network-drive-description = Serveradresser inkluderar ett protokollprefix och en adress. Exempel: ssh://192.168.0.1, ftp://[2001:db8::1] @@ -101,17 +140,148 @@ network-drive-error = Kan inte komma åt nätverksenheten password = Lösenord remember-password = Kom ihåg lösenord -## Lägg till en Nätverksenhet -add-network-drive = Lägg till en Nätverksenhet -connect = Anslut -connect-anonymously = Anslut anonymt -connecting = Ansluter... -domain = Domän -enter-server-address = Ange server address -try-again = Försök igen -username = Användarnamn +## Operationer +cancelled = Avbruten +edit-history = Redigera historik +history = Historik +no-history = Inga objekt i historiken. +pending = Väntar +progress = {$percent}% +progress-cancelled = {$percent}%, avbruten +progress-paused = {$percent}%, pausad +failed = Misslyckades +complete = Färdig +compressing = Komprimerar {$items} {$items -> + [one] item + *[other] items + } from "{$from}" to "{$to}" ({$progress})... +compressed = Komprimerade {$items} {$items -> + [one] item + *[other] items + } from "{$from}" to "{$to}" +copy_noun = Koperia +creating = Skapar "{$name}" i "{$parent}" +created = Skapade "{$name}" i "{$parent}" +copying = Kopierar {$items} {$items -> + [one] objekt + *[other] flera objekt + } från "{$from}" till "{$to}" ({$progress})... +copied = Kopierade {$items} {$items -> + [one] objekt + *[other] flera objekt + } från "{$from}" till "{$to}" +emptying-trash = Tömmer {trash} ({$progress})... +emptied-trash = Tömde {trash} +extracting = Packar upp {$items} {$items -> + [one] objekt + *[other] flera objekt + } från "{$from}" till "{$to}" ({$progress})... +extracted = Packade upp {$items} {$items -> + [one] objekt + *[other] flera objekt + } från "{$from}" till "{$to}" +setting-executable-and-launching = Ställer in "{$name}" som exekverbar och startar +set-executable-and-launched = Ställ in "{$name}" som exekverbar och startar +moving = Flyttar {$items} {$items -> + [one] objekt + *[other] flera objekt + } från "{$from}" till "{$to}" ({$progress})... +moved = Flyttade {$items} {$items -> + [one] objekt + *[other] flera objekt + } från "{$from}" till "{$to}" +renaming = Byter namn "{$from}" till "{$to}" +renamed = Bytt namn "{$from}" till "{$to}" +restoring = Återställer {$items} {$items -> + [one] objekt + *[other] flera objekt + } från {trash} ({$progress})... +restored = Återställt {$items} {$items -> + [one] objekt + *[other] flera objekt + } från {trash} +unknown-folder = okänd katalog -## Sort +## Öppna med +open-with = Öppna med... +default-app = {$name} (default) + +## Visa detaljer +show-details = Visa detaljer +type = Type: {$mime} +items = Items: {$items} +item-size = Size: {$size} +item-created = Created: {$created} +item-modified = Modified: {$modified} +item-accessed = Accessed: {$accessed} +calculating = Beräknar... + +## Egenskaper +properties = Egenskaper + +## Inställningar +settings = Inställningar + +### Utseende +appearance = Utseende +theme = Tema +match-desktop = Matcha skrivbordet +dark = Mörkt +light = Ljust + +# Kontext meny +add-to-sidebar = Lägg till i sidofält +compress = Komprimera +extract-here = Packa upp +new-file = Ny fil +new-folder = Ny katalog +open-in-terminal = Öppna i terminal +move-to-trash = Flytta till papperskorg +restore-from-trash = Återställ från papperskorgen +remove-from-sidebar = Ta bort från sidofält +sort-by-name = Sortera efter namn +sort-by-modified = Sortera efter modifierad +sort-by-size = Sortera efter storlek +sort-by-trashed = Sortera efter borttagningstid + +## Skrivbord +change-wallpaper = Byt bakgrund... +desktop-appearance = Skrivbordsutseende... +display-settings = Skärminställningar... + + +# Meny + +## Fil +file = Fil +new-tab = Ny flik +new-window = Nytt fönster +rename = Byt namn... +menu-show-details = Visa detaljer... +close-tab = Stäng flik +quit = Avsluta + +## Redigera +edit = Redigera +cut = Klipp ut +copy = Kopiera +paste = Klistra in +select-all = Välj alla + +## Visa +zoom-in = Zooma in +default-size = Standardstorlek +zoom-out = Zooma ut +view = Visa +grid-view = Rutnätsvy +list-view = Listvy +show-hidden-files = Visa dolda filer +list-directories-first = Lista kataloger först +gallery-preview = Galleri förhandsvisning +menu-settings = Inställningar... +menu-about = Om COSMIC Files... + +## Sortera sort = Sortera sort-a-z = A-Z sort-z-a = Z-A @@ -119,3 +289,7 @@ sort-newest-first = Nyaste först sort-oldest-first = Äldst först sort-smallest-to-largest = Minsta till största sort-largest-to-smallest = Största till minsta + + +## Visa detaljer +show-details = Visa detaljer From fce981ee8f95fe59a0c5d213c2314edfcfb0a681 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 10 Jan 2025 09:55:04 -0700 Subject: [PATCH 07/35] Update dependencies --- Cargo.lock | 802 ++++++++++++++++++++++++++++------------------------- 1 file changed, 422 insertions(+), 380 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 84c9cb0..15d3a6d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -158,12 +158,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1" -[[package]] -name = "allocator-api2" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" - [[package]] name = "almost" version = "0.2.0" @@ -177,7 +171,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" dependencies = [ "android-properties", - "bitflags 2.6.0", + "bitflags 2.7.0", "cc", "cesu8", "jni", @@ -263,9 +257,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.93" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "apply" @@ -305,7 +299,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -392,11 +386,11 @@ dependencies = [ [[package]] name = "async-broadcast" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" dependencies = [ - "event-listener 5.3.1", + "event-listener 5.4.0", "event-listener-strategy", "futures-core", "pin-project-lite", @@ -422,7 +416,7 @@ checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" dependencies = [ "async-task", "concurrent-queue", - "fastrand 2.2.0", + "fastrand 2.3.0", "futures-lite 2.5.0", "slab", ] @@ -452,7 +446,7 @@ dependencies = [ "log", "parking", "polling 2.8.0", - "rustix 0.37.27", + "rustix 0.37.28", "slab", "socket2 0.4.10", "waker-fn", @@ -471,7 +465,7 @@ dependencies = [ "futures-lite 2.5.0", "parking", "polling 3.7.4", - "rustix 0.38.41", + "rustix 0.38.43", "slab", "tracing", "windows-sys 0.59.0", @@ -492,7 +486,7 @@ version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 5.3.1", + "event-listener 5.4.0", "event-listener-strategy", "pin-project-lite", ] @@ -521,7 +515,7 @@ dependencies = [ "cfg-if", "event-listener 3.1.0", "futures-lite 1.13.0", - "rustix 0.38.41", + "rustix 0.38.43", "windows-sys 0.48.0", ] @@ -538,9 +532,9 @@ dependencies = [ "async-task", "blocking", "cfg-if", - "event-listener 5.3.1", + "event-listener 5.4.0", "futures-lite 2.5.0", - "rustix 0.38.41", + "rustix 0.38.43", "tracing", ] @@ -552,7 +546,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -567,7 +561,7 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 0.38.41", + "rustix 0.38.43", "signal-hook-registry", "slab", "windows-sys 0.59.0", @@ -581,13 +575,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -601,7 +595,7 @@ name = "atomicwrites" version = "0.4.2" source = "git+https://github.com/jackpot51/rust-atomicwrites#043ab4859d53ffd3d55334685303d8df39c9f768" dependencies = [ - "rustix 0.38.41", + "rustix 0.38.43", "tempfile", "windows-sys 0.48.0", ] @@ -748,9 +742,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be" dependencies = [ "serde", ] @@ -800,9 +794,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.11.0" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22" +checksum = "531a9155a481e2ee699d4f98f43c0ca4ff8ee1bfd55c31e9e98fb29d2b176fe0" dependencies = [ "memchr", "serde", @@ -828,22 +822,22 @@ checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" [[package]] name = "bytemuck" -version = "1.20.0" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" +checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -891,10 +885,10 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "log", "polling 3.7.4", - "rustix 0.38.41", + "rustix 0.38.43", "slab", "thiserror 1.0.69", ] @@ -906,16 +900,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" dependencies = [ "calloop", - "rustix 0.38.41", + "rustix 0.38.43", "wayland-backend", "wayland-client", ] [[package]] name = "cc" -version = "1.2.2" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" +checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7" dependencies = [ "jobserver", "libc", @@ -979,9 +973,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1223,7 +1217,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#b524ccb0a46b1ca585db09638c33e39e79829716" +source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1242,7 +1236,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#b524ccb0a46b1ca585db09638c33e39e79829716" +source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" dependencies = [ "quote", "syn 1.0.109", @@ -1256,7 +1250,7 @@ dependencies = [ "chrono", "dirs 5.0.1", "env_logger", - "fastrand 2.2.0", + "fastrand 2.3.0", "flate2", "fork", "freedesktop_entry_parser", @@ -1309,12 +1303,25 @@ dependencies = [ "cosmic-files", ] +[[package]] +name = "cosmic-freedesktop-icons" +version = "0.2.6" +source = "git+https://github.com/pop-os/freedesktop-icons#5a3b4163148a9600a54cc846aa863f4e6389635d" +dependencies = [ + "dirs 5.0.1", + "once_cell", + "rust-ini", + "thiserror 1.0.69", + "tracing", + "xdg", +] + [[package]] name = "cosmic-protocols" version = "0.1.0" source = "git+https://github.com/pop-os/cosmic-protocols?rev=d218c76#d218c76b58c7a3b20dd5e7943f93fc306a1b81b8" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -1326,16 +1333,15 @@ dependencies = [ [[package]] name = "cosmic-text" version = "0.12.1" -source = "git+https://github.com/pop-os/cosmic-text.git#1f4065c1c3399efad58841082212f7c039b58480" +source = "git+https://github.com/pop-os/cosmic-text.git#166b59f560c551dab391a864f7c1f503c1e18446" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "fontdb 0.16.2", "log", "rangemap", - "rayon", "rustc-hash 1.1.0", "rustybuzz", - "self_cell 1.0.4", + "self_cell 1.1.0", "smol_str", "swash", "sys-locale", @@ -1349,7 +1355,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#b524ccb0a46b1ca585db09638c33e39e79829716" +source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" dependencies = [ "almost", "cosmic-config", @@ -1398,18 +1404,18 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -1426,9 +1432,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" @@ -1480,7 +1486,7 @@ version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdbd1f579714e3c809ebd822c81ef148b1ceaeb3d535352afc73fd0c4c6a0017" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "libloading", "winapi", ] @@ -1506,7 +1512,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -1517,7 +1523,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -1573,7 +1579,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -1585,7 +1591,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -1675,7 +1681,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -1701,7 +1707,7 @@ name = "dnd" version = "0.1.0" source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13#a83bf83784276aaa882ef13555295a2ad9edd265" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "mime 0.1.0", "raw-window-handle", "smithay-client-toolkit", @@ -1734,11 +1740,11 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0f8a69e60d75ae7dab4ef26a59ca99f2a89d4c142089b537775ae0c198bdcde" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "bytemuck", "drm-ffi", "drm-fourcc", - "rustix 0.38.41", + "rustix 0.38.43", ] [[package]] @@ -1748,7 +1754,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41334f8405792483e32ad05fbb9c5680ff4e84491883d2947a4757dc54cb2ac6" dependencies = [ "drm-sys", - "rustix 0.38.41", + "rustix 0.38.43", ] [[package]] @@ -1797,14 +1803,14 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "env_filter" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" dependencies = [ "log", "regex", @@ -1812,9 +1818,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" +checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" dependencies = [ "anstream", "anstyle", @@ -1883,9 +1889,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.3.1" +version = "5.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" dependencies = [ "concurrent-queue", "parking", @@ -1898,7 +1904,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2" dependencies = [ - "event-listener 5.3.1", + "event-listener 5.4.0", "pin-project-lite", ] @@ -1934,15 +1940,15 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "fdeflate" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07c6f4c64c1d33a3111c4466f7365ebdcc37c5bd1ea0d62aae2e3d722aacbedb" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" dependencies = [ "simd-adler32", ] @@ -2049,10 +2055,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] -name = "font-types" -version = "0.7.3" +name = "foldhash" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3971f9a5ca983419cdc386941ba3b9e1feba01a0ab888adf78739feb2798492" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" + +[[package]] +name = "font-types" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11c3a23a5a151afb1f74ea797f8c300dee41eff9ee3cb1bf94ed316d860c46b3" dependencies = [ "bytemuck", ] @@ -2112,7 +2124,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -2152,19 +2164,6 @@ dependencies = [ "xdg", ] -[[package]] -name = "freedesktop-icons" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8ef34245e0540c9a3ce7a28340b98d2c12b75da0d446da4e8224923fcaa0c16" -dependencies = [ - "dirs 5.0.1", - "once_cell", - "rust-ini", - "thiserror 1.0.69", - "xdg", -] - [[package]] name = "freedesktop_entry_parser" version = "1.3.0" @@ -2254,7 +2253,7 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1" dependencies = [ - "fastrand 2.2.0", + "fastrand 2.3.0", "futures-core", "futures-io", "parking", @@ -2269,7 +2268,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -2371,9 +2370,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "gio" -version = "0.20.6" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8826d2a9ad56ce3de1f04bea0bea0daff6f5f1c913cc834996cfea1f9401361c" +checksum = "a517657589a174be9f60c667f1fec8b7ac82ed5db4ebf56cf073a3b5955d8e2e" dependencies = [ "futures-channel", "futures-core", @@ -2388,15 +2387,15 @@ dependencies = [ [[package]] name = "gio-sys" -version = "0.20.6" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b965df6f3534c84816b5c1a7d9efcb5671ae790822de5abe8e299797039529bc" +checksum = "8446d9b475730ebef81802c1738d972db42fde1c5a36a627ebc4d665fc87db04" dependencies = [ "glib-sys", "gobject-sys", "libc", "system-deps 7.0.3", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2418,11 +2417,11 @@ checksum = "151665d9be52f9bb40fc7966565d39666f2d1e69233571b71b87791c7e0528b3" [[package]] name = "glib" -version = "0.20.6" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86bd3e4ee7998ab5a135d900db56930cc19ad16681adf245daff54f618b9d5e1" +checksum = "f969edf089188d821a30cde713b6f9eb08b20c63fc2e584aba2892a7984a8cc0" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "futures-channel", "futures-core", "futures-executor", @@ -2439,22 +2438,22 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.20.5" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d21ca27acfc3e91da70456edde144b4ac7c36f78ee77b10189b3eb4901c156" +checksum = "715601f8f02e71baef9c1f94a657a9a77c192aea6097cf9ae7e5e177cd8cde68" dependencies = [ "heck 0.5.0", "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "glib-sys" -version = "0.20.6" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d0b1827e8621fc42c0dfb228e5d57ff6a71f9699e666ece8113f979ad87c2de" +checksum = "b360ff0f90d71de99095f79c526a5888c9c92fc9ee1b19da06c6f5e75f0c2a53" dependencies = [ "libc", "system-deps 7.0.3", @@ -2462,9 +2461,9 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "globset" @@ -2502,9 +2501,9 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.20.4" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c674d2ff8478cf0ec29d2be730ed779fef54415a2fb4b565c52def62696462" +checksum = "67a56235e971a63bfd75abb13ef70064e1346388723422a68580d8a6fbac6423" dependencies = [ "glib-sys", "libc", @@ -2517,7 +2516,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "gpu-alloc-types", ] @@ -2527,7 +2526,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", ] [[package]] @@ -2545,13 +2544,13 @@ dependencies = [ [[package]] name = "gpu-descriptor" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c08c1f623a8d0b722b8b99f821eb0ba672a1618f0d3b16ddbee1cedd2dd8557" +checksum = "dcf29e94d6d243368b7a56caa16bc213e4f9f8ed38c4d9557069527b5d5281ca" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "gpu-descriptor-types", - "hashbrown 0.14.5", + "hashbrown 0.15.2", ] [[package]] @@ -2560,7 +2559,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", ] [[package]] @@ -2594,16 +2593,15 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "allocator-api2", -] [[package]] name = "hashbrown" version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "foldhash", +] [[package]] name = "hassle-rs" @@ -2611,7 +2609,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "com", "libc", "libloading", @@ -2724,7 +2722,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.90", + "syn 2.0.96", "unic-langid", ] @@ -2738,7 +2736,7 @@ dependencies = [ "i18n-config", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -2767,7 +2765,7 @@ dependencies = [ [[package]] name = "iced" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#b524ccb0a46b1ca585db09638c33e39e79829716" +source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" dependencies = [ "dnd", "iced_accessibility", @@ -2785,7 +2783,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#b524ccb0a46b1ca585db09638c33e39e79829716" +source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" dependencies = [ "accesskit", "accesskit_winit", @@ -2794,9 +2792,9 @@ dependencies = [ [[package]] name = "iced_core" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#b524ccb0a46b1ca585db09638c33e39e79829716" +source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "bytes", "cosmic-client-toolkit", "dnd", @@ -2818,7 +2816,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#b524ccb0a46b1ca585db09638c33e39e79829716" +source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" dependencies = [ "futures", "iced_core", @@ -2844,9 +2842,9 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#b524ccb0a46b1ca585db09638c33e39e79829716" +source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "bytemuck", "cosmic-text", "half", @@ -2866,7 +2864,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#b524ccb0a46b1ca585db09638c33e39e79829716" +source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2878,7 +2876,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#b524ccb0a46b1ca585db09638c33e39e79829716" +source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" dependencies = [ "bytes", "cosmic-client-toolkit", @@ -2893,7 +2891,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#b524ccb0a46b1ca585db09638c33e39e79829716" +source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" dependencies = [ "bytemuck", "cosmic-text", @@ -2909,10 +2907,10 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#b524ccb0a46b1ca585db09638c33e39e79829716" +source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" dependencies = [ "as-raw-xcb-connection", - "bitflags 2.6.0", + "bitflags 2.7.0", "bytemuck", "cosmic-client-toolkit", "futures", @@ -2926,7 +2924,7 @@ dependencies = [ "raw-window-handle", "resvg", "rustc-hash 2.1.0", - "rustix 0.38.41", + "rustix 0.38.43", "thiserror 1.0.69", "tiny-xlib", "wayland-backend", @@ -2940,7 +2938,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#b524ccb0a46b1ca585db09638c33e39e79829716" +source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" dependencies = [ "cosmic-client-toolkit", "dnd", @@ -2958,7 +2956,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#b524ccb0a46b1ca585db09638c33e39e79829716" +source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" dependencies = [ "cosmic-client-toolkit", "dnd", @@ -3122,7 +3120,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -3305,7 +3303,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -3340,9 +3338,9 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a611371471e98973dbcab4e0ec66c31a10bc356eeb4d54a0e05eac8158fe38c" +checksum = "06432fb54d3be7964ecd3649233cddf80db2832f47fec34c01f65b3d9d774983" [[package]] name = "is-docker" @@ -3426,9 +3424,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.74" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" dependencies = [ "once_cell", "wasm-bindgen", @@ -3536,25 +3534,25 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.167" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#b524ccb0a46b1ca585db09638c33e39e79829716" +source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" dependencies = [ "apply", "ashpd 0.9.2", "chrono", "cosmic-client-toolkit", "cosmic-config", + "cosmic-freedesktop-icons", "cosmic-theme", "css-color", "derive_setters", "freedesktop-desktop-entry", - "freedesktop-icons", "iced", "iced_core", "iced_futures", @@ -3569,7 +3567,7 @@ dependencies = [ "mime 0.3.17", "palette", "rfd", - "rustix 0.38.41", + "rustix 0.38.43", "serde", "shlex", "slotmap", @@ -3579,7 +3577,6 @@ dependencies = [ "tracing", "unicode-segmentation", "url", - "ustr", "zbus 4.4.0", ] @@ -3614,9 +3611,9 @@ dependencies = [ [[package]] name = "liblzma-sys" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6630cb23edeb2e563cd6c30d4117554c69646871455843c33ddcb1d9aef82ecf" +checksum = "41e2171ce6827cbab9bc97238a58361bf9a526080475f21dbc470e1842258b2d" dependencies = [ "cc", "libc", @@ -3635,9 +3632,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "libc", - "redox_syscall 0.5.7", + "redox_syscall 0.5.8", ] [[package]] @@ -3648,9 +3645,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "linux-raw-sys" @@ -3732,9 +3729,9 @@ dependencies = [ [[package]] name = "lyon_algorithms" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3bca95f9a4955b3e4a821fbbcd5edfbd9be2a9a50bb5758173e5358bfb4c623" +checksum = "f13c9be19d257c7d37e70608ed858e8eab4b2afcea2e3c9a622e892acbf43c08" dependencies = [ "lyon_path", "num-traits", @@ -3871,7 +3868,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "block", "core-graphics-types", "foreign-types", @@ -3912,9 +3909,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" dependencies = [ "adler2", "simd-adler32", @@ -3957,7 +3954,7 @@ checksum = "8bd5a652b6faf21496f2cfd88fc49989c8db0825d1f6746b1a71a6ede24a63ad" dependencies = [ "arrayvec 0.7.6", "bit-set", - "bitflags 2.6.0", + "bitflags 2.7.0", "cfg_aliases 0.1.1", "codespan-reporting", "hexf-parse", @@ -3976,7 +3973,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "jni-sys", "log", "ndk-sys 0.6.0+11769913", @@ -4033,7 +4030,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "cfg-if", "cfg_aliases 0.2.1", "libc", @@ -4073,7 +4070,7 @@ version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "crossbeam-channel", "filetime", "fsevent-sys", @@ -4147,7 +4144,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -4208,7 +4205,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -4262,7 +4259,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "block2", "libc", "objc2", @@ -4278,7 +4275,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "block2", "objc2", "objc2-core-location", @@ -4302,7 +4299,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "block2", "objc2", "objc2-foundation", @@ -4344,7 +4341,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "block2", "dispatch", "libc", @@ -4369,7 +4366,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "block2", "objc2", "objc2-foundation", @@ -4381,7 +4378,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "block2", "objc2", "objc2-foundation", @@ -4404,7 +4401,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "block2", "objc2", "objc2-cloud-kit", @@ -4436,7 +4433,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "block2", "objc2", "objc2-core-location", @@ -4454,9 +4451,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.5" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] @@ -4469,9 +4466,9 @@ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "open" -version = "5.3.1" +version = "5.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ecd52f0b8d15c40ce4820aa251ed5de032e5d91fab27f7db2f40d42a8bdf69c" +checksum = "e2483562e62ea94312f3576a7aca397306df7990b8d89033e18766744377ef95" dependencies = [ "is-wsl", "libc", @@ -4535,7 +4532,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -4575,7 +4572,7 @@ dependencies = [ "by_address", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -4627,7 +4624,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.7", + "redox_syscall 0.5.8", "smallvec", "windows-targets 0.52.6", ] @@ -4662,9 +4659,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "phf" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" dependencies = [ "phf_macros", "phf_shared", @@ -4672,9 +4669,9 @@ dependencies = [ [[package]] name = "phf_generator" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ "phf_shared", "rand", @@ -4682,24 +4679,24 @@ dependencies = [ [[package]] name = "phf_macros" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" dependencies = [ "phf_generator", "phf_shared", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "phf_shared" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" dependencies = [ - "siphasher 0.3.11", + "siphasher", ] [[package]] @@ -4710,29 +4707,29 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" [[package]] name = "pin-project" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" +checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" +checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "pin-project-lite" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -4747,7 +4744,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", - "fastrand 2.2.0", + "fastrand 2.3.0", "futures-io", ] @@ -4759,9 +4756,9 @@ checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "png" -version = "0.17.14" +version = "0.17.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52f9d46a34a05a6a57566bc2bfae066ef07585a6e3fa30fbbdff5936380623f0" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" dependencies = [ "bitflags 1.3.2", "crc32fast", @@ -4796,7 +4793,7 @@ dependencies = [ "concurrent-queue", "hermit-abi 0.4.0", "pin-project-lite", - "rustix 0.38.41", + "rustix 0.38.43", "tracing", "windows-sys 0.59.0", ] @@ -4888,7 +4885,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", "version_check", "yansi", ] @@ -4909,7 +4906,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a65f2e60fbf1063868558d69c6beacf412dc755f9fc020f514b7955fc914fe30" dependencies = [ "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -4954,9 +4951,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -5081,9 +5078,9 @@ dependencies = [ [[package]] name = "read-fonts" -version = "0.22.5" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a04b892cb6f91951f144c33321843790c8574c825aafdb16d815fd7183b5229" +checksum = "f6f9e8a4f503e5c8750e4cd3b32a4e090035c46374b305a15c70bad833dca05f" dependencies = [ "bytemuck", "font-types", @@ -5125,11 +5122,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", ] [[package]] @@ -5248,7 +5245,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64 0.21.7", - "bitflags 2.6.0", + "bitflags 2.7.0", "serde", "serde_derive", ] @@ -5279,7 +5276,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.90", + "syn 2.0.96", "walkdir", ] @@ -5323,9 +5320,9 @@ checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" [[package]] name = "rustix" -version = "0.37.27" +version = "0.37.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +checksum = "519165d378b97752ca44bbe15047d5d3409e875f39327546b42ac81d7e18c1b6" dependencies = [ "bitflags 1.3.2", "errno", @@ -5337,22 +5334,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.41" +version = "0.38.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" +checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "errno", "libc", - "linux-raw-sys 0.4.14", - "windows-sys 0.52.0", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", ] [[package]] name = "rustversion" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "rustybuzz" @@ -5360,7 +5357,7 @@ version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfb9cf8877777222e4a3bc7eb247e398b56baba500c38c1c46842431adc8b55c" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "bytemuck", "libm", "smallvec", @@ -5417,40 +5414,40 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e14e4d63b804dc0c7ec4a1e52bcb63f02c7ac94476755aa579edac21e01f915d" dependencies = [ - "self_cell 1.0.4", + "self_cell 1.1.0", ] [[package]] name = "self_cell" -version = "1.0.4" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a" +checksum = "c2fdfc24bc566f839a2da4c4295b82db7d25a24253867d5c64355abb5799bdbe" [[package]] name = "serde" -version = "1.0.215" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "serde_json" -version = "1.0.133" +version = "1.0.135" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9" dependencies = [ "indexmap", "itoa", @@ -5467,7 +5464,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -5542,19 +5539,13 @@ dependencies = [ [[package]] name = "simplecss" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a11be7c62927d9427e9f40f3444d5499d868648e2edbc4e2116de69e7ec0e89d" +checksum = "7a9c6883ca9c3c7c90e888de77b7a5c849c779d25d74a1269b0218b14e8b136c" dependencies = [ "log", ] -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - [[package]] name = "siphasher" version = "1.0.1" @@ -5563,9 +5554,9 @@ checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "skrifa" -version = "0.22.3" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1c44ad1f6c5bdd4eefed8326711b7dbda9ea45dfd36068c427d332aa382cbe" +checksum = "6667e349abb2e6e850b31bc638a11f7fadd7e4cf113b71947c46bf6d5fe0dbc9" dependencies = [ "bytemuck", "read-fonts", @@ -5601,7 +5592,7 @@ version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "bytemuck", "calloop", "calloop-wayland-source", @@ -5610,7 +5601,7 @@ dependencies = [ "log", "memmap2 0.9.5", "pkg-config", - "rustix 0.38.41", + "rustix 0.38.43", "thiserror 1.0.69", "wayland-backend", "wayland-client", @@ -5674,7 +5665,7 @@ dependencies = [ "cocoa", "core-graphics", "drm", - "fastrand 2.2.0", + "fastrand 2.3.0", "foreign-types", "js-sys", "log", @@ -5682,7 +5673,7 @@ dependencies = [ "objc", "raw-window-handle", "redox_syscall 0.4.1", - "rustix 0.38.41", + "rustix 0.38.43", "tiny-xlib", "wasm-bindgen", "wayland-backend", @@ -5699,7 +5690,7 @@ version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", ] [[package]] @@ -5754,14 +5745,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "794de53cc48eaabeed0ab6a3404a65f40b3e38c067e4435883a65d2aa4ca000e" dependencies = [ "kurbo 0.11.1", - "siphasher 1.0.1", + "siphasher", ] [[package]] name = "swash" -version = "0.1.19" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbd59f3f359ddd2c95af4758c18270eddd9c730dde98598023cdabff472c2ca2" +checksum = "f0e25b48fd1c222c9fdb61148e2203b750f9840c07922fd61b87c6015560b8f6" dependencies = [ "skrifa", "yazi", @@ -5781,9 +5772,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.90" +version = "2.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" dependencies = [ "proc-macro2", "quote", @@ -5798,7 +5789,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -5883,14 +5874,15 @@ checksum = "bc1ee6eef34f12f765cb94725905c6312b6610ab2b0940889cfe58dae7bc3c72" [[package]] name = "tempfile" -version = "3.14.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" dependencies = [ "cfg-if", - "fastrand 2.2.0", + "fastrand 2.3.0", + "getrandom", "once_cell", - "rustix 0.38.41", + "rustix 0.38.43", "windows-sys 0.59.0", ] @@ -5922,7 +5914,7 @@ checksum = "5999e24eaa32083191ba4e425deb75cdf25efefabe5aaccb7446dd0d4122a3f5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -5936,11 +5928,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.3" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +checksum = "a3ac7f54ca534db81081ef1c1e7f6ea8a3ef428d2fc069097c079443d24124d3" dependencies = [ - "thiserror-impl 2.0.3", + "thiserror-impl 2.0.10", ] [[package]] @@ -5951,18 +5943,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "thiserror-impl" -version = "2.0.3" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" +checksum = "9e9465d30713b56a37ede7185763c3492a91be2f5fa68d958c44e41ab9248beb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -6008,9 +6000,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", @@ -6031,9 +6023,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", @@ -6099,9 +6091,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -6114,9 +6106,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.41.1" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", @@ -6132,20 +6124,20 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "tokio-stream" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", @@ -6203,7 +6195,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.20", + "winnow 0.6.22", ] [[package]] @@ -6225,7 +6217,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -6347,15 +6339,15 @@ dependencies = [ [[package]] name = "unicase" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-bidi" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-bidi-mirroring" @@ -6441,19 +6433,6 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" -[[package]] -name = "ustr" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18b19e258aa08450f93369cf56dd78063586adf19e92a75b338a800f799a0208" -dependencies = [ - "ahash", - "byteorder", - "lazy_static", - "parking_lot 0.12.3", - "serde", -] - [[package]] name = "usvg" version = "0.42.0" @@ -6471,7 +6450,7 @@ dependencies = [ "roxmltree", "rustybuzz", "simplecss", - "siphasher 1.0.1", + "siphasher", "strict-num", "svgtypes", "tiny-skia-path", @@ -6501,9 +6480,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +checksum = "b913a3b5fe84142e269d63cc62b64319ccaf89b748fc31fe025177f767a756c4" [[package]] name = "uzers" @@ -6580,9 +6559,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ "cfg-if", "once_cell", @@ -6591,24 +6570,23 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.47" +version = "0.4.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" dependencies = [ "cfg-if", "js-sys", @@ -6619,9 +6597,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6629,22 +6607,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] name = "wasm-timer" @@ -6669,7 +6647,7 @@ checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6" dependencies = [ "cc", "downcast-rs", - "rustix 0.38.41", + "rustix 0.38.43", "scoped-tls", "smallvec", "wayland-sys", @@ -6681,8 +6659,8 @@ version = "0.31.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b66249d3fc69f76fd74c82cc319300faa554e9d865dab1f7cd66cc20db10b280" dependencies = [ - "bitflags 2.6.0", - "rustix 0.38.41", + "bitflags 2.7.0", + "rustix 0.38.43", "wayland-backend", "wayland-scanner", ] @@ -6693,7 +6671,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "cursor-icon", "wayland-backend", ] @@ -6704,7 +6682,7 @@ version = "0.31.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32b08bc3aafdb0035e7fe0fdf17ba0c09c268732707dca4ae098f60cb28c9e4c" dependencies = [ - "rustix 0.38.41", + "rustix 0.38.43", "wayland-client", "xcursor", ] @@ -6715,7 +6693,7 @@ version = "0.32.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cd0ade57c4e6e9a8952741325c30bf82f4246885dca8bf561898b86d0c1f58e" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "wayland-backend", "wayland-client", "wayland-scanner", @@ -6728,7 +6706,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b31cab548ee68c7eb155517f2212049dc151f7cd7910c2b66abfd31c3ee12bd" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -6741,7 +6719,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "782e12f6cd923c3c316130d56205ebab53f55d6666b7faddfad36cecaeeb4022" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -6766,10 +6744,10 @@ version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c89532cc712a2adb119eb4d09694b402576052254d0bb284f82ac1c47fb786ad" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "downcast-rs", - "io-lifetimes 2.0.3", - "rustix 0.38.41", + "io-lifetimes 2.0.4", + "rustix 0.38.43", "wayland-backend", "wayland-scanner", ] @@ -6788,9 +6766,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.74" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" dependencies = [ "js-sys", "wasm-bindgen", @@ -6845,7 +6823,7 @@ checksum = "0348c840d1051b8e86c3bcd31206080c5e71e5933dabd79be1ce732b0b2f089a" dependencies = [ "arrayvec 0.7.6", "bit-vec", - "bitflags 2.6.0", + "bitflags 2.7.0", "cfg_aliases 0.1.1", "document-features", "indexmap", @@ -6872,7 +6850,7 @@ dependencies = [ "arrayvec 0.7.6", "ash", "bit-set", - "bitflags 2.6.0", + "bitflags 2.7.0", "block", "cfg_aliases 0.1.1", "core-graphics-types", @@ -6913,7 +6891,7 @@ version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc9d91f0e2c4b51434dfa6db77846f2793149d8e73f800fa2e41f52b8eac3c5d" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "js-sys", "web-sys", ] @@ -7041,7 +7019,7 @@ checksum = "942ac266be9249c84ca862f0a164a39533dc2f6f33dc98ec89c8da99b82ea0bd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -7052,7 +7030,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -7063,7 +7041,7 @@ checksum = "da33557140a288fae4e1d5f8873aaf9eb6613a9cf82c3e070223ff177f598b60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -7074,7 +7052,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -7161,7 +7139,7 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", @@ -7169,12 +7147,28 @@ dependencies = [ ] [[package]] -name = "windows-version" -version = "0.1.1" +name = "windows-targets" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6998aa457c9ba8ff2fb9f13e9d2a930dabcea28f1d0ab94d687d8b3654844515" +checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" dependencies = [ - "windows-targets 0.52.6", + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + +[[package]] +name = "windows-version" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c12476c23a74725c539b24eae8bfc0dac4029c39cdb561d9f23616accd4ae26d" +dependencies = [ + "windows-targets 0.53.0", ] [[package]] @@ -7195,6 +7189,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -7213,6 +7213,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -7231,12 +7237,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -7255,6 +7273,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -7273,6 +7297,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -7291,6 +7321,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -7309,6 +7345,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "winit" version = "0.30.5" @@ -7317,7 +7359,7 @@ dependencies = [ "ahash", "android-activity", "atomic-waker", - "bitflags 2.6.0", + "bitflags 2.7.0", "block2", "bytemuck", "calloop", @@ -7340,7 +7382,7 @@ dependencies = [ "pin-project", "raw-window-handle", "redox_syscall 0.4.1", - "rustix 0.38.41", + "rustix 0.38.43", "sctk-adwaita", "smithay-client-toolkit", "smol_str", @@ -7371,9 +7413,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.20" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +checksum = "39281189af81c07ec09db316b302a3e67bf9bd7cbf6c820b50e35fee9c2fa980" dependencies = [ "memchr", ] @@ -7412,7 +7454,7 @@ dependencies = [ "libc", "libloading", "once_cell", - "rustix 0.38.41", + "rustix 0.38.43", "x11rb-protocol", ] @@ -7424,13 +7466,13 @@ checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" [[package]] name = "xattr" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" +checksum = "e105d177a3871454f754b33bb0ee637ecaaac997446375fd3e5d43a2ed00c909" dependencies = [ "libc", - "linux-raw-sys 0.4.14", - "rustix 0.38.41", + "linux-raw-sys 0.4.15", + "rustix 0.38.43", ] [[package]] @@ -7485,7 +7527,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "dlib", "log", "once_cell", @@ -7503,9 +7545,9 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.8.23" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af310deaae937e48a26602b730250b4949e125f468f11e6990be3e5304ddd96f" +checksum = "c5b940ebc25896e71dd073bad2dbaa2abfe97b0a391415e22ad1326d9c54e3c4" [[package]] name = "xmlwriter" @@ -7521,9 +7563,9 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "yazi" -version = "0.1.6" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c94451ac9513335b5e23d7a8a2b61a7102398b8cca5160829d313e84c9d98be1" +checksum = "e01738255b5a16e78bbb83e7fbba0a1e7dd506905cfc53f4622d89015a03fbb5" [[package]] name = "yoke" @@ -7545,7 +7587,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", "synstructure", ] @@ -7591,7 +7633,7 @@ version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" dependencies = [ - "async-broadcast 0.7.1", + "async-broadcast 0.7.2", "async-executor", "async-fs", "async-io 2.4.0", @@ -7602,7 +7644,7 @@ dependencies = [ "async-trait", "blocking", "enumflags2", - "event-listener 5.3.1", + "event-listener 5.4.0", "futures-core", "futures-sink", "futures-util", @@ -7647,7 +7689,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", "zvariant_utils 2.1.0", ] @@ -7675,9 +7717,9 @@ dependencies = [ [[package]] name = "zeno" -version = "0.2.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697" +checksum = "cc0de2315dc13d00e5df3cd6b8d2124a6eaec6a2d4b6a1c5f37b7efad17fcc17" [[package]] name = "zerocopy" @@ -7697,7 +7739,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -7717,7 +7759,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", "synstructure", ] @@ -7738,7 +7780,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -7760,14 +7802,14 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "zip" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d52293fc86ea7cf13971b3bb81eb21683636e7ae24c729cdaf1b7c4157a352" +checksum = "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45" dependencies = [ "aes", "arbitrary", @@ -7785,7 +7827,7 @@ dependencies = [ "pbkdf2", "rand", "sha1", - "thiserror 2.0.3", + "thiserror 2.0.10", "time", "zeroize", "zopfli", @@ -7851,9 +7893,9 @@ dependencies = [ [[package]] name = "zune-jpeg" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16099418600b4d8f028622f73ff6e3deaabdff330fb9a2a131dea781ee8b0768" +checksum = "99a5bab8d7dedf81405c4bb1f2b83ea057643d9cb28778cea9eecddeedd2e028" dependencies = [ "zune-core", ] @@ -7908,7 +7950,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", "zvariant_utils 2.1.0", ] @@ -7931,5 +7973,5 @@ checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] From e69e84567bcba341ba321e25cb18c78db23cc142 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 13 Jan 2025 09:03:23 -0700 Subject: [PATCH 08/35] Update dependencies --- Cargo.lock | 277 ++++++++++++++++++++++++++++++++--------------------- src/app.rs | 2 +- 2 files changed, 169 insertions(+), 110 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 15d3a6d..a9c95f7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -417,7 +417,7 @@ dependencies = [ "async-task", "concurrent-queue", "fastrand 2.3.0", - "futures-lite 2.5.0", + "futures-lite 2.6.0", "slab", ] @@ -429,7 +429,7 @@ checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" dependencies = [ "async-lock 3.4.0", "blocking", - "futures-lite 2.5.0", + "futures-lite 2.6.0", ] [[package]] @@ -462,7 +462,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.5.0", + "futures-lite 2.6.0", "parking", "polling 3.7.4", "rustix 0.38.43", @@ -499,7 +499,7 @@ checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" dependencies = [ "async-io 2.4.0", "blocking", - "futures-lite 2.5.0", + "futures-lite 2.6.0", ] [[package]] @@ -533,7 +533,7 @@ dependencies = [ "blocking", "cfg-if", "event-listener 5.4.0", - "futures-lite 2.5.0", + "futures-lite 2.6.0", "rustix 0.38.43", "tracing", ] @@ -788,7 +788,7 @@ dependencies = [ "async-channel", "async-task", "futures-io", - "futures-lite 2.5.0", + "futures-lite 2.6.0", "piper", ] @@ -907,9 +907,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.7" +version = "1.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7" +checksum = "c8293772165d9345bdaaa39b45b2109591e63fe5e6fbc23c6ff930a048aa310b" dependencies = [ "jobserver", "libc", @@ -1136,26 +1136,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "const-random" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" -dependencies = [ - "const-random-macro", -] - -[[package]] -name = "const-random-macro" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" -dependencies = [ - "getrandom", - "once_cell", - "tiny-keccak", -] - [[package]] name = "constant_time_eq" version = "0.3.1" @@ -1306,11 +1286,11 @@ dependencies = [ [[package]] name = "cosmic-freedesktop-icons" version = "0.2.6" -source = "git+https://github.com/pop-os/freedesktop-icons#5a3b4163148a9600a54cc846aa863f4e6389635d" +source = "git+https://github.com/pop-os/freedesktop-icons#27aa0e5a3cf2db20cef7b60d3f68b0628929293f" dependencies = [ "dirs 5.0.1", + "ini_core", "once_cell", - "rust-ini", "thiserror 1.0.69", "tracing", "xdg", @@ -1693,15 +1673,6 @@ dependencies = [ "libloading", ] -[[package]] -name = "dlv-list" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f" -dependencies = [ - "const-random", -] - [[package]] name = "dnd" version = "0.1.0" @@ -2249,9 +2220,9 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1" +checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532" dependencies = [ "fastrand 2.3.0", "futures-core", @@ -2492,9 +2463,9 @@ dependencies = [ [[package]] name = "glutin_wgl_sys" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e1951bbd9434a81aa496fe59ccc2235af3820d27b85f9314e279609211e2c" +checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" dependencies = [ "gl_generator", ] @@ -3209,9 +3180,9 @@ dependencies = [ [[package]] name = "image-webp" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e031e8e3d94711a9ccb5d6ea357439ef3dcbed361798bd4071dc4d9793fbe22f" +checksum = "b77d01e822461baa8409e156015a1d91735549f0f2c17691bd2d996bef238f7f" dependencies = [ "byteorder-lite", "quick-error", @@ -3257,6 +3228,15 @@ dependencies = [ "cfb", ] +[[package]] +name = "ini_core" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a467a31a9f439b5262fa99c17084537bff57f24703d5a09a2b5c9657ec73a61" +dependencies = [ + "cfg-if", +] + [[package]] name = "inotify" version = "0.9.6" @@ -3424,9 +3404,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.76" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ "once_cell", "wasm-bindgen", @@ -4099,15 +4079,15 @@ dependencies = [ [[package]] name = "notify-rust" -version = "4.11.3" +version = "4.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5134a72dc570b178bff81b01e81ab14a6fcc015391ed4b3b14853090658cd3a3" +checksum = "96ae13fb6065b0865d2310dfa55ce319245052ed95fbbe2bc87c99962c58d73f" dependencies = [ "log", "mac-notification-sys", "serde", "tauri-winrt-notification", - "zbus 4.4.0", + "zbus 5.3.0", ] [[package]] @@ -4490,16 +4470,6 @@ dependencies = [ "libredox", ] -[[package]] -name = "ordered-multimap" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79" -dependencies = [ - "dlv-list", - "hashbrown 0.14.5", -] - [[package]] name = "ordered-stream" version = "0.2.0" @@ -4512,9 +4482,9 @@ dependencies = [ [[package]] name = "ouroboros" -version = "0.18.4" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "944fa20996a25aded6b4795c6d63f10014a7a83f8be9828a11860b08c5fc4a67" +checksum = "1e0f050db9c44b97a94723127e6be766ac5c340c48f2c4bb3ffa11713744be59" dependencies = [ "aliasable", "ouroboros_macro", @@ -4523,12 +4493,11 @@ dependencies = [ [[package]] name = "ouroboros_macro" -version = "0.18.4" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b0deead1528fd0e5947a8546a9642a9777c25f6e1e26f34c97b204bbb465bd" +checksum = "3c7028bdd3d43083f6d8d4d5187680d0d3560d54df4cc9d752005268b41e64d0" dependencies = [ "heck 0.4.1", - "itertools", "proc-macro2", "proc-macro2-diagnostics", "quote", @@ -4870,9 +4839,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] @@ -5290,16 +5259,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "rust-ini" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0698206bcb8882bf2a9ecb4c1e7785db57ff052297085a6efd4fe42302068a" -dependencies = [ - "cfg-if", - "ordered-multimap", -] - [[package]] name = "rustc-demangle" version = "0.1.24" @@ -5928,11 +5887,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.10" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3ac7f54ca534db81081ef1c1e7f6ea8a3ef428d2fc069097c079443d24124d3" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" dependencies = [ - "thiserror-impl 2.0.10", + "thiserror-impl 2.0.11", ] [[package]] @@ -5948,9 +5907,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.10" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e9465d30713b56a37ede7185763c3492a91be2f5fa68d958c44e41ab9248beb" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", @@ -6031,15 +5990,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - [[package]] name = "tiny-skia" version = "0.11.4" @@ -6195,7 +6145,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.22", + "winnow 0.6.24", ] [[package]] @@ -6559,20 +6509,21 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", @@ -6584,9 +6535,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.49" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", @@ -6597,9 +6548,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6607,9 +6558,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -6620,9 +6571,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasm-timer" @@ -6766,9 +6720,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.76" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", @@ -7413,9 +7367,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.22" +version = "0.6.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39281189af81c07ec09db316b302a3e67bf9bd7cbf6c820b50e35fee9c2fa980" +checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a" dependencies = [ "memchr", ] @@ -7666,6 +7620,42 @@ dependencies = [ "zvariant 4.2.0", ] +[[package]] +name = "zbus" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "192a0d989036cd60a1e91a54c9851fb9ad5bd96125d41803eed79d2e2ef74bd7" +dependencies = [ + "async-broadcast 0.7.2", + "async-executor", + "async-fs", + "async-io 2.4.0", + "async-lock 3.4.0", + "async-process 2.3.0", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "enumflags2", + "event-listener 5.4.0", + "futures-core", + "futures-util", + "hex", + "nix 0.29.0", + "ordered-stream", + "serde", + "serde_repr", + "static_assertions", + "tracing", + "uds_windows", + "windows-sys 0.59.0", + "winnow 0.6.24", + "xdg-home", + "zbus_macros 5.3.0", + "zbus_names 4.1.1", + "zvariant 5.2.0", +] + [[package]] name = "zbus_macros" version = "3.15.2" @@ -7693,6 +7683,21 @@ dependencies = [ "zvariant_utils 2.1.0", ] +[[package]] +name = "zbus_macros" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3685b5c81fce630efc3e143a4ded235b107f1b1cdf186c3f115529e5e5ae4265" +dependencies = [ + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 2.0.96", + "zbus_names 4.1.1", + "zvariant 5.2.0", + "zvariant_utils 3.1.0", +] + [[package]] name = "zbus_names" version = "2.6.1" @@ -7715,6 +7720,18 @@ dependencies = [ "zvariant 4.2.0", ] +[[package]] +name = "zbus_names" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "519629a3f80976d89c575895b05677cbc45eaf9f70d62a364d819ba646409cc8" +dependencies = [ + "serde", + "static_assertions", + "winnow 0.6.24", + "zvariant 5.2.0", +] + [[package]] name = "zeno" version = "0.3.2" @@ -7827,7 +7844,7 @@ dependencies = [ "pbkdf2", "rand", "sha1", - "thiserror 2.0.10", + "thiserror 2.0.11", "time", "zeroize", "zopfli", @@ -7928,6 +7945,21 @@ dependencies = [ "zvariant_derive 4.2.0", ] +[[package]] +name = "zvariant" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55e6b9b5f1361de2d5e7d9fd1ee5f6f7fcb6060618a1f82f3472f58f2b8d4be9" +dependencies = [ + "endi", + "enumflags2", + "serde", + "static_assertions", + "winnow 0.6.24", + "zvariant_derive 5.2.0", + "zvariant_utils 3.1.0", +] + [[package]] name = "zvariant_derive" version = "3.15.2" @@ -7954,6 +7986,19 @@ dependencies = [ "zvariant_utils 2.1.0", ] +[[package]] +name = "zvariant_derive" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "573a8dd76961957108b10f7a45bac6ab1ea3e9b7fe01aff88325dc57bb8f5c8b" +dependencies = [ + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 2.0.96", + "zvariant_utils 3.1.0", +] + [[package]] name = "zvariant_utils" version = "1.0.1" @@ -7975,3 +8020,17 @@ dependencies = [ "quote", "syn 2.0.96", ] + +[[package]] +name = "zvariant_utils" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd46446ea2a1f353bfda53e35f17633afa79f4fe290a611c94645c69fe96a50" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "static_assertions", + "syn 2.0.96", + "winnow 0.6.24", +] diff --git a/src/app.rs b/src/app.rs index 2d34b30..2dc679f 100644 --- a/src/app.rs +++ b/src/app.rs @@ -899,7 +899,7 @@ impl App { self.search_set(entity, term_opt) } - fn search_set(&mut self,tab: Entity, term_opt: Option) -> Task { + fn search_set(&mut self, tab: Entity, term_opt: Option) -> Task { let mut title_location_opt = None; if let Some(tab) = self.tab_model.data_mut::(tab) { let location_opt = match term_opt { From 87fa4ac47842ce52f33c6347486a083038e58eb8 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Tue, 14 Jan 2025 09:28:29 +0100 Subject: [PATCH 09/35] perf: optimized cosmic-freedesktop-icons --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index a9c95f7..c3c68da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1286,7 +1286,7 @@ dependencies = [ [[package]] name = "cosmic-freedesktop-icons" version = "0.2.6" -source = "git+https://github.com/pop-os/freedesktop-icons#27aa0e5a3cf2db20cef7b60d3f68b0628929293f" +source = "git+https://github.com/pop-os/freedesktop-icons#bfc22d531596b57646dc47bcd70b2eb6f3152cd4" dependencies = [ "dirs 5.0.1", "ini_core", From 0f5163acc67b2be046f620d647a13dcaf818e41c Mon Sep 17 00:00:00 2001 From: Josh Megnauth Date: Thu, 2 Jan 2025 23:57:39 -0500 Subject: [PATCH 10/35] fix: Strip more file names in extractor Closes: #698 I ended up fixing a few Clippy lints while tracking down this problem. It turns out that the issue was way simpler than I assumed: ".tar.xz" needed to be added to a slice of extensions to strip. --- src/app.rs | 17 +++++++++-------- src/operation/mod.rs | 27 +++++++++++++++++---------- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/app.rs b/src/app.rs index 2dc679f..e348122 100644 --- a/src/app.rs +++ b/src/app.rs @@ -2053,14 +2053,15 @@ impl Application for App { } Message::ExtractHere(entity_opt) => { let paths = self.selected_paths(entity_opt); - if let Some(current_path) = paths.get(0) { - if let Some(destination) = current_path.parent().zip(current_path.file_stem()) { - let destination_path = destination.0.to_path_buf(); - self.operation(Operation::Extract { - paths, - to: destination_path, - }); - } + if let Some(destination) = paths + .first() + .and_then(|first| first.parent()) + .map(|parent| parent.to_path_buf()) + { + self.operation(Operation::Extract { + paths, + to: destination, + }); } } Message::Key(modifiers, key) => { diff --git a/src/operation/mod.rs b/src/operation/mod.rs index dceefb2..7bbc54c 100644 --- a/src/operation/mod.rs +++ b/src/operation/mod.rs @@ -67,11 +67,20 @@ fn handle_replace( } fn get_directory_name(file_name: &str) -> &str { - const SUPPORTED_EXTENSIONS: [&str; 4] = [".tar.gz", ".tgz", ".tar", ".zip"]; + // TODO: Chain with COMPOUND_EXTENSIONS once more formats are supported + const SUPPORTED_EXTENSIONS: &[&str] = &[ + ".tar.bz2", + ".tar.gz", + ".tar.lzma", + ".tar.xz", + ".tgz", + ".tar", + ".zip", + ]; - for ext in &SUPPORTED_EXTENSIONS { - if file_name.ends_with(ext) { - return &file_name[..file_name.len() - ext.len()]; + for ext in SUPPORTED_EXTENSIONS { + if let Some(stripped) = file_name.strip_suffix(ext) { + return stripped; } } file_name @@ -245,7 +254,7 @@ async fn copy_or_move( if matches!(from.parent(), Some(parent) if parent == to) && !moving { // `from`'s parent is equal to `to` which means we're copying to the same // directory (duplicating files) - let to = copy_unique_path(&from, &to); + let to = copy_unique_path(&from, to); Some((from, to)) } else if let Some(name) = from.file_name() { let to = to.join(name); @@ -361,12 +370,12 @@ fn copy_unique_path(from: &Path, to: &Path) -> PathBuf { to } -fn file_name<'a>(path: &'a Path) -> Cow<'a, str> { +fn file_name(path: &Path) -> Cow<'_, str> { path.file_name() .map_or_else(|| fl!("unknown-folder").into(), |x| x.to_string_lossy()) } -fn parent_name<'a>(path: &'a Path) -> Cow<'a, str> { +fn parent_name(path: &Path) -> Cow<'_, str> { let Some(parent) = path.parent() else { return fl!("unknown-folder").into(); }; @@ -374,7 +383,7 @@ fn parent_name<'a>(path: &'a Path) -> Cow<'a, str> { file_name(parent) } -fn paths_parent_name<'a>(paths: &'a Vec) -> Cow<'a, str> { +fn paths_parent_name(paths: &[PathBuf]) -> Cow<'_, str> { let Some(first_path) = paths.first() else { return fl!("unknown-folder").into(); }; @@ -777,8 +786,6 @@ impl Operation { controller.set_progress((i as f32) / total_paths as f32); - let to = to.to_owned(); - if let Some(file_name) = path.file_name().and_then(|f| f.to_str()) { let dir_name = get_directory_name(file_name); let mut new_dir = to.join(dir_name); From 70313f6271bba50bc8dca6dcddd0bdff4e7ec6bc Mon Sep 17 00:00:00 2001 From: mkljczk Date: Wed, 8 Jan 2025 18:21:27 +0100 Subject: [PATCH 11/35] Minor Polish translation improvements Signed-off-by: mkljczk --- i18n/pl/cosmic_files.ftl | 54 ++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/i18n/pl/cosmic_files.ftl b/i18n/pl/cosmic_files.ftl index 7968909..16b622d 100644 --- a/i18n/pl/cosmic_files.ftl +++ b/i18n/pl/cosmic_files.ftl @@ -3,7 +3,7 @@ empty-folder = Pusty katalog empty-folder-hidden = Pusty katalog (z ukrytymi plikami) no-results = Brak wyników filesystem = System plików -home = Katalog Domowy +home = Katalog domowy networks = Sieci notification-in-progress = Operacje na plikach w toku. trash = Kosz @@ -12,7 +12,7 @@ undo = Cofnij today = Dzisiaj # Desktop view options -desktop-view-options = Opcje widoku pulpitu... +desktop-view-options = Opcje widoku pulpitu… show-on-desktop = Pokaż na Pulpicie desktop-folder-content = Zawartość katalogu Pulpit mounted-drives = Podpięte dyski @@ -29,8 +29,8 @@ size = Rozmiar # Progress footer details = Detale dismiss = Odrzuć wiadomość -operations-running = {$running} bieżące działania ({$percent}%)... -operations-running-finished = {$running} bieżące działania ({$percent}%), {$finished} ukończone... +operations-running = {$running} bieżące działania ({$percent}%)… +operations-running-finished = {$running} bieżące działania ({$percent}%), {$finished} ukończone… pause = Wstrzymaj resume = Wznów @@ -53,8 +53,8 @@ file-name = Nazwa pliku folder-name = Nazwa katalogu file-already-exists = Plik z taką nazwą już istnieje. folder-already-exists = Katalog z taką nazwą już istnieje. -name-hidden = Nazwy zaczynające się na "." będą ukryte. -name-invalid = Musisz zmienić nazwę na inną z "{$filename}". +name-hidden = Nazwy zaczynające się od „.” będą ukryte. +name-invalid = Musisz zmienić nazwę na inną z „{$filename}”. name-no-slashes = Nazwa nie może zawierać ukośników. # Open/Save Dialog @@ -72,7 +72,7 @@ save = Zapisz save-file = Zapisz plik ## Open With Dialog -open-with-title = Czym chcesz otworzyć "{$name}"? +open-with-title = Czym chcesz otworzyć „{$name}”? browse-store = Przeglądaj {$store} # Rename Dialog @@ -92,7 +92,7 @@ skip = Pomiń ## Set as Executable and Launch Dialog set-executable-and-launch = Ustaw jako wykonywalny i uruchom -set-executable-and-launch-description = Czu chcesz ustawić "{$name}" jako wykonywalny i uruchomić? +set-executable-and-launch-description = Czy chcesz ustawić plik „{$name}” jako wykonywalny i uruchomić go? set-and-launch = Ustaw i uruchom ## Metadata Dialog @@ -112,7 +112,7 @@ git-description = Git commit {$hash} z {$date} add-network-drive = Dodaj dysk sieciowy connect = Połącz connect-anonymously = Połącz anonimowo -connecting = Łączenie... +connecting = Łączenie… domain = Domena enter-server-address = Wprowadź adres serwera network-drive-description = @@ -148,50 +148,50 @@ compressing = Spakuj {$items} {$items -> [one] element [few] elementy *[other] elementów - } z "{$from}" do "{$to}" ({$progress})... + } z „{$from}” do „{$to}” ({$progress})… compressed = Spakowano {$items} {$items -> [one] element [few] elementy *[other] elementów - } z "{$from}" do "{$to}" + } z „{$from}” do „{$to}” copy_noun = Kopiuj creating = Tworzy {$name} w {$parent} created = Stworzono {$name} w {$parent} copying = Kopiowanie {$items} {$items -> [one] elementu *[other] elementów - } z "{$from}" do "{$to}" ({$progress})... + } z „{$from}” do „{$to}” ({$progress})… copied = Skopiowano {$items} {$items -> [one] element [few] elementy *[other] elementów - } z "{$from}" do "{$to}" -emptying-trash = Opróżnianie {trash} ({$progress})... + } z „{$from}” do „{$to}” +emptying-trash = Opróżnianie {trash} ({$progress})… emptied-trash = Opróżniono {trash} extracting = Wypakowywanie {$items} {$items -> [one] elementu *[other] elementów - } z "{$from}" do "{$to}" ({$progress})... + } z „{$from}” do „{$to}” ({$progress})… extracted = Wypakowano {$items} {$items -> [one] element [few] elementy *[other] elementów - } z "{$from}" do "{$to}" + } z „{$from}” do „{$to}” moving = Przenoszenie {$items} {$items -> [one] elementu *[other] elementów - } z "{$from}" do "{$to}" ({$progress})... + } z „{$from}” do „{$to}” ({$progress})… moved = Przeniesiono {$items} {$items -> [one] element [few] elementy *[other] elementów - } z "{$from}" do "{$to}" + } z „{$from}” do „{$to}” renaming = Zmieniana nazwa {$from} na {$to} renamed = Zmieniono nazwę {$from} na {$to} restoring = Przywracanie {$items} {$items -> [one] elementu *[other] elementów - } z {trash} ({$progress})... + } z {trash} ({$progress})… restored = Przywrócono {$items} {$items -> [one] element [few] elementy @@ -200,7 +200,7 @@ restored = Przywrócono {$items} {$items -> unknown-folder = nieznany katalog ## Open with -open-with = Otwórz za pomocą... +open-with = Otwórz za pomocą… default-app = {$name} (domyślnie) ## Show details @@ -211,7 +211,7 @@ item-size = Rozmiar: {$size} item-created = Utworzono: {$created} item-modified = Zmodyfikowano: {$modified} item-accessed = Otwarto: {$accessed} -calculating = Obliczanie... +calculating = Obliczanie… ## Settings settings = Ustawienia @@ -239,9 +239,9 @@ sort-by-size = Uszereguj według rozmiaru sort-by-trashed = Uszereguj według czasu usunięcia ## Desktop -change-wallpaper = Zmień tapetę... -desktop-appearance = Wygląd pulpitu... -display-settings = Ustawienia wyświetlacza... +change-wallpaper = Zmień tapetę… +desktop-appearance = Wygląd pulpitu… +display-settings = Ustawienia wyświetlacza… # Menu @@ -249,7 +249,7 @@ display-settings = Ustawienia wyświetlacza... file = Plik new-tab = Nowa karta new-window = Nowe okno -rename = Zmień nazwę... +rename = Zmień nazwę… close-tab = Zamknij kartę quit = Zamknij @@ -270,8 +270,8 @@ list-view = Widok listy show-hidden-files = Pokaż ukryte pliki list-directories-first = Najpierw wyświetlaj katalogi gallery-preview = Podgąd galerii -menu-settings = Ustawienia... -menu-about = O Plikach COSMIC... +menu-settings = Ustawienia… +menu-about = O Plikach COSMIC… ## Sort sort = Uszereguj From 4c522b0eeea3f0b583688bdf2f738445f012dfcd Mon Sep 17 00:00:00 2001 From: Jason Rodney Hansen Date: Sat, 11 Jan 2025 14:01:29 -0700 Subject: [PATCH 12/35] Close context menu when window loses focus --- src/app.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app.rs b/src/app.rs index e348122..0606d90 100644 --- a/src/app.rs +++ b/src/app.rs @@ -352,6 +352,7 @@ pub enum Message { WindowClose, WindowCloseRequested(window::Id), WindowNew, + WindowUnfocus, ZoomDefault(Option), ZoomIn(Option), ZoomOut(Option), @@ -3025,6 +3026,12 @@ impl Application for App { ]); } } + Message::WindowUnfocus => { + let tab_entity = self.tab_model.active(); + if let Some(tab) = self.tab_model.data_mut::(tab_entity) { + tab.context_menu = None; + } + } Message::WindowCloseRequested(id) => { self.remove_window(&id); } @@ -4370,6 +4377,7 @@ impl Application for App { Event::Keyboard(KeyEvent::ModifiersChanged(modifiers)) => { Some(Message::Modifiers(modifiers)) } + Event::Window(WindowEvent::Unfocused) => Some(Message::WindowUnfocus), Event::Window(WindowEvent::CloseRequested) => Some(Message::WindowClose), Event::Window(WindowEvent::Opened { position: _, size }) => { Some(Message::Size(size)) From f252db74150541cf145d85bae652a789cc1f649b Mon Sep 17 00:00:00 2001 From: Jason Rodney Hansen Date: Sat, 11 Jan 2025 15:00:56 -0700 Subject: [PATCH 13/35] Fix left clicking in empty folder to clear context menu --- src/tab.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tab.rs b/src/tab.rs index a5e3f5d..75b62d8 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -3581,8 +3581,7 @@ impl Tab { pub fn empty_view(&self, has_hidden: bool) -> Element { let cosmic_theme::Spacing { space_xxs, .. } = theme::active().cosmic().spacing; - //TODO: left clicking on an empty folder does not clear context menu - widget::column::with_children(vec![widget::container( + mouse_area::MouseArea::new(widget::column::with_children(vec![widget::container( widget::column::with_children(match self.mode { Mode::App | Mode::Dialog(_) => vec![ widget::icon::from_name("folder-symbolic") @@ -3604,7 +3603,8 @@ impl Tab { .spacing(space_xxs), ) .center(Length::Fill) - .into()]) + .into()])) + .on_press(|_| Message::Click(None)) .into() } From 9e3e65e721fe506ef0462b72d3d7c6373bb61fa7 Mon Sep 17 00:00:00 2001 From: Jason Rodney Hansen Date: Sat, 11 Jan 2025 17:26:16 -0700 Subject: [PATCH 14/35] Add more plain text mime types when copying files This allows the full path of the copied file to be pasted as text into more applications. --- src/clipboard.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/clipboard.rs b/src/clipboard.rs index 3290948..9fda588 100644 --- a/src/clipboard.rs +++ b/src/clipboard.rs @@ -28,6 +28,8 @@ impl ClipboardCopy { pub fn new>(kind: ClipboardKind, paths: &[P]) -> Self { let available = vec![ "text/plain".to_string(), + "text/plain;charset=utf-8".to_string(), + "UTF8_STRING".to_string(), "text/uri-list".to_string(), "x-special/gnome-copied-files".to_string(), ]; @@ -94,7 +96,9 @@ impl AsMimeTypes for ClipboardCopy { fn as_bytes(&self, mime_type: &str) -> Option> { match mime_type { - "text/plain" => Some(self.text_plain.clone()), + "text/plain" | "text/plain;charset=utf-8" | "UTF8_STRING" => { + Some(self.text_plain.clone()) + } "text/uri-list" => Some(self.text_uri_list.clone()), "x-special/gnome-copied-files" => Some(self.x_special_gnome_copied_files.clone()), _ => None, From 199632580c430e0d2147a3a3e260f7edaf7fec1b Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 14 Jan 2025 08:54:43 -0700 Subject: [PATCH 15/35] Update dependencies --- Cargo.lock | 61 ++++++++++++++++++++++++++++-------------------------- src/tab.rs | 4 ++-- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c3c68da..6556559 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -247,11 +247,12 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "3.0.6" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" dependencies = [ "anstyle", + "once_cell", "windows-sys 0.59.0", ] @@ -1008,7 +1009,7 @@ dependencies = [ [[package]] name = "clipboard_macos" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13#a83bf83784276aaa882ef13555295a2ad9edd265" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" dependencies = [ "objc", "objc-foundation", @@ -1018,7 +1019,7 @@ dependencies = [ [[package]] name = "clipboard_wayland" version = "0.2.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13#a83bf83784276aaa882ef13555295a2ad9edd265" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" dependencies = [ "dnd", "mime 0.1.0", @@ -1028,7 +1029,7 @@ dependencies = [ [[package]] name = "clipboard_x11" version = "0.4.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13#a83bf83784276aaa882ef13555295a2ad9edd265" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" dependencies = [ "thiserror 1.0.69", "x11rb", @@ -1197,7 +1198,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" +source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1216,7 +1217,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" +source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6" dependencies = [ "quote", "syn 1.0.109", @@ -1335,7 +1336,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" +source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6" dependencies = [ "almost", "cosmic-config", @@ -1676,7 +1677,7 @@ dependencies = [ [[package]] name = "dnd" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13#a83bf83784276aaa882ef13555295a2ad9edd265" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" dependencies = [ "bitflags 2.7.0", "mime 0.1.0", @@ -2736,7 +2737,7 @@ dependencies = [ [[package]] name = "iced" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" +source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6" dependencies = [ "dnd", "iced_accessibility", @@ -2754,7 +2755,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" +source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6" dependencies = [ "accesskit", "accesskit_winit", @@ -2763,7 +2764,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" +source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6" dependencies = [ "bitflags 2.7.0", "bytes", @@ -2787,7 +2788,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" +source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6" dependencies = [ "futures", "iced_core", @@ -2813,7 +2814,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" +source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6" dependencies = [ "bitflags 2.7.0", "bytemuck", @@ -2835,7 +2836,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" +source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2847,7 +2848,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" +source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6" dependencies = [ "bytes", "cosmic-client-toolkit", @@ -2862,7 +2863,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" +source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6" dependencies = [ "bytemuck", "cosmic-text", @@ -2878,7 +2879,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" +source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6" dependencies = [ "as-raw-xcb-connection", "bitflags 2.7.0", @@ -2909,7 +2910,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" +source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6" dependencies = [ "cosmic-client-toolkit", "dnd", @@ -2927,7 +2928,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" +source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6" dependencies = [ "cosmic-client-toolkit", "dnd", @@ -2937,10 +2938,12 @@ dependencies = [ "log", "raw-window-handle", "rustc-hash 2.1.0", + "rustix 0.38.43", "thiserror 1.0.69", "tracing", "wasm-bindgen-futures", "wayland-backend", + "wayland-client", "wayland-protocols", "web-sys", "winapi", @@ -3521,7 +3524,7 @@ checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da" +source = "git+https://github.com/pop-os/libcosmic.git#bd8347f7fcb8acad3bfd90cb0bc0891330db12e6" dependencies = [ "apply", "ashpd 0.9.2", @@ -3678,9 +3681,9 @@ checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" [[package]] name = "log" -version = "0.4.22" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" [[package]] name = "loop9" @@ -3860,7 +3863,7 @@ dependencies = [ [[package]] name = "mime" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13#a83bf83784276aaa882ef13555295a2ad9edd265" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" dependencies = [ "smithay-clipboard", ] @@ -3889,9 +3892,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" +checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" dependencies = [ "adler2", "simd-adler32", @@ -6430,9 +6433,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.11.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b913a3b5fe84142e269d63cc62b64319ccaf89b748fc31fe025177f767a756c4" +checksum = "744018581f9a3454a9e15beb8a33b017183f1e7c0cd170232a2d1453b23a51c4" [[package]] name = "uzers" @@ -6890,7 +6893,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window_clipboard" version = "0.4.1" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13#a83bf83784276aaa882ef13555295a2ad9edd265" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" dependencies = [ "clipboard-win", "clipboard_macos", diff --git a/src/tab.rs b/src/tab.rs index 75b62d8..8891529 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -4285,9 +4285,9 @@ impl Tab { .drag_content(move || { ClipboardCopy::new(crate::clipboard::ClipboardKind::Copy, &files) }) - .drag_icon(move || { + .drag_icon(move |v| { let state: tree::State = Widget::::state(&drag_list); - (Element::from(drag_list.clone()).map(|_m| ()), state) + (Element::from(drag_list.clone()).map(|_m| ()), state, v) }) } _ => item_view, From 59ea01fc0ccbd0d775ff3d89a1fc223a7adaddd1 Mon Sep 17 00:00:00 2001 From: ToBinio Date: Tue, 14 Jan 2025 17:09:41 +0100 Subject: [PATCH 16/35] always check if a search is active when rescanning (#712) --- src/app.rs | 54 +++++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/src/app.rs b/src/app.rs index 0606d90..f222f0b 100644 --- a/src/app.rs +++ b/src/app.rs @@ -773,7 +773,7 @@ impl App { Task::batch([ self.update_title(), self.update_watcher(), - self.rescan_tab(entity, location, selection_paths), + self.update_tab(entity, location, selection_paths), ]), ) } @@ -829,7 +829,20 @@ impl App { return Task::none(); } } - self.rescan_tab(entity, tab.location.clone(), Some(op_sel.selected)) + self.update_tab(entity, tab.location.clone(), Some(op_sel.selected)) + } + + fn update_tab( + &mut self, + entity: Entity, + location: Location, + selection_paths: Option>, + ) -> Task { + if let Location::Search(_, term, ..) = location { + self.search_set(entity, Some(term), selection_paths) + } else { + self.rescan_tab(entity, location, selection_paths) + } } fn rescan_tab( @@ -873,19 +886,11 @@ impl App { let mut commands = Vec::with_capacity(needs_reload.len()); for (entity, location) in needs_reload { - commands.push(self.rescan_tab(entity, location, None)); + commands.push(self.update_tab(entity, location, None)); } Task::batch(commands) } - fn search(&mut self) -> Task { - if let Some(term) = self.search_get() { - self.search_set_active(Some(term.to_string())) - } else { - Task::none() - } - } - fn search_get(&self) -> Option<&str> { let entity = self.tab_model.active(); let tab = self.tab_model.data::(entity)?; @@ -897,10 +902,15 @@ impl App { fn search_set_active(&mut self, term_opt: Option) -> Task { let entity = self.tab_model.active(); - self.search_set(entity, term_opt) + self.search_set(entity, term_opt, None) } - fn search_set(&mut self, tab: Entity, term_opt: Option) -> Task { + fn search_set( + &mut self, + tab: Entity, + term_opt: Option, + selection_paths: Option>, + ) -> Task { let mut title_location_opt = None; if let Some(tab) = self.tab_model.data_mut::(tab) { let location_opt = match term_opt { @@ -931,7 +941,7 @@ impl App { return Task::batch([ self.update_title(), self.update_watcher(), - self.rescan_tab(tab, location, None), + self.rescan_tab(tab, location, selection_paths), if focus_search { widget::text_input::focus(self.search_id.clone()) } else { @@ -990,7 +1000,7 @@ impl App { if let Some(tab) = self.tab_model.data_mut::(entity) { tab.location = location.clone(); } - commands.push(self.rescan_tab(entity, location, None)); + commands.push(self.update_tab(entity, location, None)); } Task::batch(commands) } @@ -2139,7 +2149,7 @@ impl Application for App { }; if let Some(title) = title_opt { self.tab_model.text_set(entity, title); - commands.push(self.rescan_tab(entity, home_location.clone(), None)); + commands.push(self.update_tab(entity, home_location.clone(), None)); } } if !commands.is_empty() { @@ -2304,11 +2314,7 @@ impl Application for App { let mut commands = Vec::with_capacity(needs_reload.len()); for (entity, location) in needs_reload { - if let Location::Search(_, term, ..) = location { - commands.push(self.search_set(entity, Some(term))); - } else { - commands.push(self.rescan_tab(entity, location, None)); - } + commands.push(self.update_tab(entity, location, None)); } return Task::batch(commands); } @@ -2547,8 +2553,6 @@ impl Application for App { commands.push(self.rescan_operation_selection(op_sel)); // Manually rescan any trash tabs after any operation is completed commands.push(self.rescan_trash()); - // if search is active, update "search" tab view - commands.push(self.search()); return Task::batch(commands); } Message::PendingDismiss => { @@ -2871,7 +2875,7 @@ impl Application for App { commands.push(Task::batch([ self.update_title(), self.update_watcher(), - self.rescan_tab(entity, tab_path, selection_paths), + self.update_tab(entity, tab_path, selection_paths), ])); } tab::Command::DropFiles(to, from) => { @@ -3164,7 +3168,7 @@ impl Application for App { return Task::batch([ self.update_title(), self.update_watcher(), - self.rescan_tab(entity, location, None), + self.update_tab(entity, location, None), ]); } } From 85929c44ce9a42cf2606486fa6253213bc2b07f4 Mon Sep 17 00:00:00 2001 From: Jason Rodney Hansen Date: Tue, 14 Jan 2025 17:09:44 -0700 Subject: [PATCH 17/35] Add move to first/last item with home/end keys --- src/app.rs | 4 ++++ src/key_bind.rs | 4 ++++ src/tab.rs | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/src/app.rs b/src/app.rs index f222f0b..c5c2a5e 100644 --- a/src/app.rs +++ b/src/app.rs @@ -125,6 +125,8 @@ pub enum Action { Rename, RestoreFromTrash, SearchActivate, + SelectFirst, + SelectLast, SelectAll, SetSort(HeadingOptions, bool), Settings, @@ -190,6 +192,8 @@ impl Action { Action::RestoreFromTrash => Message::RestoreFromTrash(entity_opt), Action::SearchActivate => Message::SearchActivate, Action::SelectAll => Message::TabMessage(entity_opt, tab::Message::SelectAll), + Action::SelectFirst => Message::TabMessage(entity_opt, tab::Message::SelectFirst), + Action::SelectLast => Message::TabMessage(entity_opt, tab::Message::SelectLast), Action::SetSort(sort, dir) => { Message::TabMessage(entity_opt, tab::Message::SetSort(*sort, *dir)) } diff --git a/src/key_bind.rs b/src/key_bind.rs index a364b9f..164a8c1 100644 --- a/src/key_bind.rs +++ b/src/key_bind.rs @@ -29,10 +29,14 @@ pub fn key_binds(mode: &tab::Mode) -> HashMap { bind!([], Key::Named(Named::ArrowLeft), ItemLeft); bind!([], Key::Named(Named::ArrowRight), ItemRight); bind!([], Key::Named(Named::ArrowUp), ItemUp); + bind!([], Key::Named(Named::Home), SelectFirst); + bind!([], Key::Named(Named::End), SelectLast); bind!([Shift], Key::Named(Named::ArrowDown), ItemDown); bind!([Shift], Key::Named(Named::ArrowLeft), ItemLeft); bind!([Shift], Key::Named(Named::ArrowRight), ItemRight); bind!([Shift], Key::Named(Named::ArrowUp), ItemUp); + bind!([Shift], Key::Named(Named::Home), SelectFirst); + bind!([Shift], Key::Named(Named::End), SelectLast); bind!([Ctrl, Shift], Key::Character("n".into()), NewFolder); bind!([], Key::Named(Named::Enter), Open); bind!([Ctrl], Key::Named(Named::Space), Preview); diff --git a/src/tab.rs b/src/tab.rs index 8891529..abfb46f 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -1071,6 +1071,8 @@ pub enum Message { SearchContext(Location, SearchContextWrapper), SearchReady(bool), SelectAll, + SelectFirst, + SelectLast, SetSort(HeadingOptions, bool), Thumbnail(PathBuf, ItemThumbnail), ToggleShowHidden, @@ -2801,6 +2803,36 @@ impl Tab { )); } } + Message::SelectFirst => { + if self.select_position(0, 0, mod_shift) { + if let Some(offset) = self.select_focus_scroll() { + commands.push(Command::Iced( + scrollable::scroll_to(self.scrollable_id.clone(), offset).into(), + )); + } + if let Some(id) = self.select_focus_id() { + commands.push(Command::Iced(widget::button::focus(id).into())); + } + } + } + Message::SelectLast => { + if let Some(ref items) = self.items_opt { + if let Some(last_pos) = items.iter().filter_map(|item| item.pos_opt.get()).max() + { + if self.select_position(last_pos.0, last_pos.1, mod_shift) { + if let Some(offset) = self.select_focus_scroll() { + commands.push(Command::Iced( + scrollable::scroll_to(self.scrollable_id.clone(), offset) + .into(), + )); + } + if let Some(id) = self.select_focus_id() { + commands.push(Command::Iced(widget::button::focus(id).into())); + } + } + } + } + } Message::SetSort(heading_option, dir) => { if !matches!(self.location, Location::Search(..)) { self.sort_name = heading_option; From 5e65ca6d0bb414e60ce40f6a8f9418cb18d6c86f Mon Sep 17 00:00:00 2001 From: Jason Rodney Hansen Date: Tue, 14 Jan 2025 18:42:57 -0700 Subject: [PATCH 18/35] Fix resetting shift select range Before this fix the following steps would not work correctly: 1. Select a range with shift click. 2. Select a single item that's in the currently selected range, without holding shift. 3. Hold shift and click another item to select a new range. Instead of the item selected in step 2 being the start or end of the range, the original range from step one is used to get the start or end of the new range. This fix makes sure the range gets reset when selecting an item in step 2. --- src/tab.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tab.rs b/src/tab.rs index abfb46f..550b153 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -2245,8 +2245,8 @@ impl Tab { if !item.selected { self.clicked = click_i_opt; item.selected = true; - self.select_range = Some((i, i)); } + self.select_range = Some((i, i)); self.select_focus = click_i_opt; self.selected_clicked = true; } else if !dont_unset && item.selected { From f8830814c10cdca3c294310124d5a66cd0ddfdcd Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 16 Jan 2025 17:56:13 -0700 Subject: [PATCH 19/35] Replace use of blocking function on search results channel, fixes #601 --- src/tab.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/tab.rs b/src/tab.rs index 550b153..125c8ce 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -2754,9 +2754,7 @@ impl Tab { if let Some(items) = &mut self.items_opt { if finished || context.ready.swap(false, atomic::Ordering::SeqCst) { let duration = Instant::now(); - while let Some((path, name, metadata)) = - context.results_rx.blocking_recv() - { + while let Ok((path, name, metadata)) = context.results_rx.try_recv() { //TODO: combine this with column_sort logic, they must match! let item_modified = metadata.modified().ok(); let index = match items.binary_search_by(|other| { From 3460c2c106c7386ded559b6d6f7a5958e192a8ff Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sun, 19 Jan 2025 10:54:30 -0700 Subject: [PATCH 20/35] Allow drop to Desktop, fixes #597 --- src/tab.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tab.rs b/src/tab.rs index 125c8ce..459f8e9 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -2895,7 +2895,7 @@ impl Tab { Message::Drop(Some((to, mut from))) => { self.dnd_hovered = None; match to { - Location::Path(to) => { + Location::Desktop(to, ..) | Location::Path(to) => { if let Ok(entries) = fs::read_dir(&to) { for i in entries.into_iter().filter_map(|e| e.ok()) { let i = i.path(); From df2d01e9ba0da5a44e81eda8c42a95a51f170465 Mon Sep 17 00:00:00 2001 From: Josh Megnauth Date: Fri, 17 Jan 2025 22:29:57 -0500 Subject: [PATCH 21/35] chore(clippy): `thumbnailer.rs`, two files in operation Fixes Clippy lints for: * src/thumbnailer.rs * src/operation/mod.rs * src/operation/recursive.rs One of the Clippy lints also involved fixing a TODO to replace a deprecated function that malfunctioned under Windows. --- src/operation/mod.rs | 10 ++++----- src/operation/recursive.rs | 44 +++++++++++++++++++++++++------------- src/thumbnailer.rs | 4 +--- 3 files changed, 35 insertions(+), 23 deletions(-) diff --git a/src/operation/mod.rs b/src/operation/mod.rs index 7bbc54c..d48b72b 100644 --- a/src/operation/mod.rs +++ b/src/operation/mod.rs @@ -683,7 +683,7 @@ impl Operation { path.strip_prefix(relative_root).map_err(err_str)?.to_str() { if path.is_file() { - let mut file = fs::File::open(&path).map_err(err_str)?; + let mut file = fs::File::open(path).map_err(err_str)?; let metadata = file.metadata().map_err(err_str)?; let total = metadata.len(); if total >= 4 * 1024 * 1024 * 1024 { @@ -800,7 +800,7 @@ impl Operation { op_sel.selected.push(new_dir.clone()); let controller = controller.clone(); - let mime = mime_for_path(&path); + let mime = mime_for_path(path); match mime.essence_str() { "application/gzip" | "application/x-compressed-tar" => { OpReader::new(path, controller) @@ -960,7 +960,7 @@ mod tests { }; use cosmic::iced::futures::{channel::mpsc, StreamExt}; - use log::{debug, trace}; + use log::debug; use test_log::test; use tokio::sync; @@ -968,8 +968,8 @@ mod tests { use crate::{ app::{ test_utils::{ - empty_fs, filter_dirs, filter_files, read_dir_sorted, simple_fs, NAME_LEN, - NUM_DIRS, NUM_FILES, NUM_HIDDEN, NUM_NESTED, + empty_fs, filter_dirs, filter_files, simple_fs, NAME_LEN, NUM_DIRS, NUM_FILES, + NUM_HIDDEN, NUM_NESTED, }, DialogPage, Message, }, diff --git a/src/operation/recursive.rs b/src/operation/recursive.rs index b6f64a4..4a1a28e 100644 --- a/src/operation/recursive.rs +++ b/src/operation/recursive.rs @@ -12,12 +12,18 @@ use super::{copy_unique_path, Controller, OperationSelection, ReplaceResult}; pub struct Context { buf: Vec, controller: Controller, - on_progress: Box, - on_replace: Box ReplaceResult + 'static>, + on_progress: Box, + on_replace: Box, pub(crate) op_sel: OperationSelection, replace_result_opt: Option, } +pub trait OnProgress: Fn(&Op, &Progress) + 'static {} +impl OnProgress for F where F: Fn(&Op, &Progress) + 'static {} + +pub trait OnReplace: Fn(&Op) -> ReplaceResult + 'static {} +impl OnReplace for F where F: Fn(&Op) -> ReplaceResult + 'static {} + impl Context { pub fn new(controller: Controller) -> Self { Self { @@ -67,7 +73,7 @@ impl Context { OpKind::Symlink { target } } else { //TODO: present dialog and allow continue - return Err(format!("{} is not a known file type", from.display()).into()); + return Err(format!("{} is not a known file type", from.display())); }; let to = if from == from_parent { // When copying a file, from matches from_parent, and to_parent must be used @@ -130,12 +136,12 @@ impl Context { Ok(true) } - pub fn on_progress(mut self, f: F) -> Self { + pub fn on_progress(mut self, f: F) -> Self { self.on_progress = Box::new(f); self } - pub fn on_replace ReplaceResult + 'static>(mut self, f: F) -> Self { + pub fn on_replace(mut self, f: F) -> Self { self.on_replace = Box::new(f); self } @@ -153,9 +159,7 @@ impl Context { Ok(ControlFlow::Continue(op.to.clone())) } ReplaceResult::KeepBoth => match op.to.parent() { - Some(to_parent) => Ok(ControlFlow::Continue(copy_unique_path( - &op.from, &to_parent, - ))), + Some(to_parent) => Ok(ControlFlow::Continue(copy_unique_path(&op.from, to_parent))), None => Err(format!("failed to get parent of {:?}", op.to).into()), }, ReplaceResult::Skip(apply_to_all) => { @@ -216,7 +220,7 @@ impl Op { let metadata = from_file.metadata()?; // Remove `to` if overwriting and it is an existing file if self.to.is_file() { - match ctx.replace(&self)? { + match ctx.replace(self)? { ControlFlow::Continue(to) => { self.to = to; } @@ -226,7 +230,7 @@ impl Op { } } progress.total_bytes = Some(metadata.len()); - (ctx.on_progress)(&self, &progress); + (ctx.on_progress)(self, &progress); // This is atomic and ensures `to` is not created by any other process let mut to_file = fs::OpenOptions::new() .create_new(true) @@ -242,14 +246,14 @@ impl Op { } to_file.write_all(&ctx.buf[..count])?; progress.current_bytes += count as u64; - (ctx.on_progress)(&self, &progress); + (ctx.on_progress)(self, &progress); } to_file.sync_all()?; } OpKind::Move => { // Remove `to` if overwriting and it is an existing file if self.to.is_file() { - match ctx.replace(&self)? { + match ctx.replace(self)? { ControlFlow::Continue(to) => { self.to = to; } @@ -289,7 +293,7 @@ impl Op { OpKind::Symlink { ref target } => { // Remove `to` if overwriting and it is an existing file if self.to.is_file() { - match ctx.replace(&self)? { + match ctx.replace(self)? { ControlFlow::Continue(to) => { self.to = to; } @@ -298,8 +302,18 @@ impl Op { } } } - //TODO: use OS-specific function - fs::soft_link(&target, &self.to)?; + #[cfg(unix)] + { + std::os::unix::fs::symlink(target, &self.to)?; + } + #[cfg(windows)] + { + if target.is_dir() { + std::os::windows::fs::symlink_dir(target, &self.to)?; + } else { + std::os::windows::fs::symlink_file(target, &self.to)?; + } + } } } Ok(true) diff --git a/src/thumbnailer.rs b/src/thumbnailer.rs index ac2df57..36dbd0a 100644 --- a/src/thumbnailer.rs +++ b/src/thumbnailer.rs @@ -144,9 +144,7 @@ impl ThumbnailerCache { } pub fn get(&self, key: &Mime) -> Vec { - self.cache - .get(&key) - .map_or_else(|| Vec::new(), |x| x.clone()) + self.cache.get(key).map_or_else(Vec::new, |x| x.clone()) } } From 6a6a494012a222c2ab882418078c850a3c26b83e Mon Sep 17 00:00:00 2001 From: Josh Megnauth Date: Sun, 19 Jan 2025 01:05:02 -0500 Subject: [PATCH 22/35] chore(clippy): `mouse_area`, `controller` & more Fixes lints for: * src/operation/controller.rs * src/mouse_area.rs * src/mounter/mod.rs --- examples/copy.rs | 2 +- src/app.rs | 2 +- src/mounter/mod.rs | 2 +- src/mouse_area.rs | 98 +++++++++++++++++++++---------------- src/operation/controller.rs | 6 ++- src/tab.rs | 2 +- 6 files changed, 63 insertions(+), 49 deletions(-) diff --git a/examples/copy.rs b/examples/copy.rs index 2015848..bc117bc 100644 --- a/examples/copy.rs +++ b/examples/copy.rs @@ -2,7 +2,7 @@ use cosmic_files::operation::{recursive::Context, Controller, ReplaceResult}; use std::{error::Error, io, path::PathBuf}; fn main() -> Result<(), Box> { - let mut context = Context::new(Controller::new()) + let mut context = Context::new(Controller::default()) .on_progress(|op, progress| { println!("{:?}: {:?}", op.to, progress); }) diff --git a/src/app.rs b/src/app.rs index c5c2a5e..5ff55ba 100644 --- a/src/app.rs +++ b/src/app.rs @@ -798,7 +798,7 @@ impl App { self.progress_operations.insert(id); } self.pending_operations - .insert(id, (operation, Controller::new())); + .insert(id, (operation, Controller::default())); } fn remove_window(&mut self, id: &window::Id) { diff --git a/src/mounter/mod.rs b/src/mounter/mod.rs index 7258df7..8b13392 100644 --- a/src/mounter/mod.rs +++ b/src/mounter/mod.rs @@ -117,4 +117,4 @@ pub fn mounters() -> Mounters { Mounters::new(mounters) } -pub static MOUNTERS: Lazy = Lazy::new(|| mounters()); +pub static MOUNTERS: Lazy = Lazy::new(mounters); diff --git a/src/mouse_area.rs b/src/mouse_area.rs index 33291eb..e4de7f2 100644 --- a/src/mouse_area.rs +++ b/src/mouse_area.rs @@ -31,156 +31,150 @@ use crate::tab::DOUBLE_CLICK_DURATION; pub struct MouseArea<'a, Message> { id: Id, content: Element<'a, Message>, - on_drag: Option) -> Message + 'a>>, - on_double_click: Option) -> Message + 'a>>, - on_press: Option) -> Message + 'a>>, - on_drag_end: Option) -> Message + 'a>>, - on_release: Option) -> Message + 'a>>, - on_resize: Option Message + 'a>>, - on_right_press: Option) -> Message + 'a>>, - on_right_press_no_capture: Option) -> Message + 'a>>, - on_right_release: Option) -> Message + 'a>>, - on_middle_press: Option) -> Message + 'a>>, - on_middle_release: Option) -> Message + 'a>>, - on_back_press: Option) -> Message + 'a>>, - on_back_release: Option) -> Message + 'a>>, - on_forward_press: Option) -> Message + 'a>>, - on_forward_release: Option) -> Message + 'a>>, - on_scroll: Option Option + 'a>>, - on_enter: Option Message + 'a>>, - on_exit: Option Message + 'a>>, + on_drag: Option>>, + on_double_click: Option>>, + on_press: Option>>, + on_drag_end: Option>>, + on_release: Option>>, + on_resize: Option>>, + on_right_press: Option>>, + on_right_press_no_capture: Option>>, + on_right_release: Option>>, + on_middle_press: Option>>, + on_middle_release: Option>>, + on_back_press: Option>>, + on_back_release: Option>>, + on_forward_press: Option>>, + on_forward_release: Option>>, + on_scroll: Option>>, + on_enter: Option>>, + on_exit: Option>>, show_drag_rect: bool, } impl<'a, Message> MouseArea<'a, Message> { /// The message to emit when a drag is initiated. #[must_use] - pub fn on_drag(mut self, message: impl Fn(Option) -> Message + 'a) -> Self { + pub fn on_drag(mut self, message: impl OnDrag<'a, Message>) -> Self { self.on_drag = Some(Box::new(message)); self } /// The message to emit when a drag ends. #[must_use] - pub fn on_drag_end(mut self, message: impl Fn(Option) -> Message + 'a) -> Self { + pub fn on_drag_end(mut self, message: impl OnMouseButton<'a, Message>) -> Self { self.on_drag_end = Some(Box::new(message)); self } /// The message to emit on a double click. #[must_use] - pub fn on_double_click(mut self, message: impl Fn(Option) -> Message + 'a) -> Self { + pub fn on_double_click(mut self, message: impl OnMouseButton<'a, Message>) -> Self { self.on_double_click = Some(Box::new(message)); self } /// The message to emit on a left button press. #[must_use] - pub fn on_press(mut self, message: impl Fn(Option) -> Message + 'a) -> Self { + pub fn on_press(mut self, message: impl OnMouseButton<'a, Message>) -> Self { self.on_press = Some(Box::new(message)); self } /// The message to emit on a left button release. #[must_use] - pub fn on_release(mut self, message: impl Fn(Option) -> Message + 'a) -> Self { + pub fn on_release(mut self, message: impl OnMouseButton<'a, Message>) -> Self { self.on_release = Some(Box::new(message)); self } /// The message to emit on resizing. #[must_use] - pub fn on_resize(mut self, message: impl Fn(Size) -> Message + 'a) -> Self { + pub fn on_resize(mut self, message: impl OnResize<'a, Message>) -> Self { self.on_resize = Some(Box::new(message)); self } /// The message to emit on a right button press. #[must_use] - pub fn on_right_press(mut self, message: impl Fn(Option) -> Message + 'a) -> Self { + pub fn on_right_press(mut self, message: impl OnMouseButton<'a, Message>) -> Self { self.on_right_press = Some(Box::new(message)); self } /// The message to emit on a right button press without capturing. #[must_use] - pub fn on_right_press_no_capture( - mut self, - message: impl Fn(Option) -> Message + 'a, - ) -> Self { + pub fn on_right_press_no_capture(mut self, message: impl OnMouseButton<'a, Message>) -> Self { self.on_right_press_no_capture = Some(Box::new(message)); self } /// The message to emit on a right button release. #[must_use] - pub fn on_right_release(mut self, message: impl Fn(Option) -> Message + 'a) -> Self { + pub fn on_right_release(mut self, message: impl OnMouseButton<'a, Message>) -> Self { self.on_right_release = Some(Box::new(message)); self } /// The message to emit on a middle button press. #[must_use] - pub fn on_middle_press(mut self, message: impl Fn(Option) -> Message + 'a) -> Self { + pub fn on_middle_press(mut self, message: impl OnMouseButton<'a, Message>) -> Self { self.on_middle_press = Some(Box::new(message)); self } /// The message to emit on a middle button release. #[must_use] - pub fn on_middle_release(mut self, message: impl Fn(Option) -> Message + 'a) -> Self { + pub fn on_middle_release(mut self, message: impl OnMouseButton<'a, Message>) -> Self { self.on_middle_release = Some(Box::new(message)); self } /// The message to emit on a back button press. #[must_use] - pub fn on_back_press(mut self, message: impl Fn(Option) -> Message + 'a) -> Self { + pub fn on_back_press(mut self, message: impl OnMouseButton<'a, Message>) -> Self { self.on_back_press = Some(Box::new(message)); self } /// The message to emit on a back button release. #[must_use] - pub fn on_back_release(mut self, message: impl Fn(Option) -> Message + 'a) -> Self { + pub fn on_back_release(mut self, message: impl OnMouseButton<'a, Message>) -> Self { self.on_back_release = Some(Box::new(message)); self } /// The message to emit on a forward button press. #[must_use] - pub fn on_forward_press(mut self, message: impl Fn(Option) -> Message + 'a) -> Self { + pub fn on_forward_press(mut self, message: impl OnMouseButton<'a, Message>) -> Self { self.on_forward_press = Some(Box::new(message)); self } /// The message to emit on a forward button release. #[must_use] - pub fn on_forward_release(mut self, message: impl Fn(Option) -> Message + 'a) -> Self { + pub fn on_forward_release(mut self, message: impl OnMouseButton<'a, Message>) -> Self { self.on_forward_release = Some(Box::new(message)); self } /// The message to emit on a scroll. #[must_use] - pub fn on_scroll( - mut self, - message: impl Fn(mouse::ScrollDelta, Modifiers) -> Option + 'a, - ) -> Self { + pub fn on_scroll(mut self, message: impl OnScroll<'a, Message>) -> Self { self.on_scroll = Some(Box::new(message)); self } /// The message to emit when a mouse enters the area. #[must_use] - pub fn on_enter(mut self, message: impl Fn() -> Message + 'a) -> Self { + pub fn on_enter(mut self, message: impl OnEnterExit<'a, Message>) -> Self { self.on_enter = Some(Box::new(message)); self } /// The message to emit when a mouse exits the area. #[must_use] - pub fn on_exit(mut self, message: impl Fn() -> Message + 'a) -> Self { + pub fn on_exit(mut self, message: impl OnEnterExit<'a, Message>) -> Self { self.on_exit = Some(Box::new(message)); self } @@ -199,6 +193,24 @@ impl<'a, Message> MouseArea<'a, Message> { } } +pub trait OnMouseButton<'a, Message>: Fn(Option) -> Message + 'a {} +impl<'a, Message, F> OnMouseButton<'a, Message> for F where F: Fn(Option) -> Message + 'a {} + +pub trait OnDrag<'a, Message>: Fn(Option) -> Message + 'a {} +impl<'a, Message, F> OnDrag<'a, Message> for F where F: Fn(Option) -> Message + 'a {} + +pub trait OnResize<'a, Message>: Fn(Size) -> Message + 'a {} +impl<'a, Message, F> OnResize<'a, Message> for F where F: Fn(Size) -> Message + 'a {} + +pub trait OnScroll<'a, Message>: Fn(mouse::ScrollDelta, Modifiers) -> Option + 'a {} +impl<'a, Message, F> OnScroll<'a, Message> for F where + F: Fn(mouse::ScrollDelta, Modifiers) -> Option + 'a +{ +} + +pub trait OnEnterExit<'a, Message>: Fn() -> Message + 'a {} +impl<'a, Message, F> OnEnterExit<'a, Message> for F where F: Fn() -> Message + 'a {} + /// Local state of the [`MouseArea`]. #[derive(Default)] struct State { @@ -250,7 +262,7 @@ impl State { } else { mouse::Click::new(pos, mouse::Button::Left, None) }; - self.prev_click = Some((new.clone(), now)); + self.prev_click = Some((new, now)); new } } diff --git a/src/operation/controller.rs b/src/operation/controller.rs index 4b33b42..1154b32 100644 --- a/src/operation/controller.rs +++ b/src/operation/controller.rs @@ -22,8 +22,8 @@ pub struct Controller { inner: Arc, } -impl Controller { - pub fn new() -> Self { +impl Default for Controller { + fn default() -> Self { Self { primary: true, inner: Arc::new(ControllerInner { @@ -33,7 +33,9 @@ impl Controller { }), } } +} +impl Controller { pub fn check(&self) -> Result<(), String> { let mut state = self.inner.state.lock().unwrap(); loop { diff --git a/src/tab.rs b/src/tab.rs index 459f8e9..d4fadb3 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -475,7 +475,7 @@ pub fn item_from_entry( }; let dir_size = if metadata.is_dir() { - DirSize::Calculating(Controller::new()) + DirSize::Calculating(Controller::default()) } else { DirSize::NotDirectory }; From 8ff54d152229f5c5f13d26d5e2965479c78815f5 Mon Sep 17 00:00:00 2001 From: Josh Megnauth Date: Mon, 20 Jan 2025 01:48:41 -0500 Subject: [PATCH 23/35] chore(clippy): mime_app, operation, mounter Fixes Clippy lints for: * src/mounter/ * src/operation/ * src/mime_app.rs * src/mouse_area.rs (I missed two of them last time) --- src/mime_app.rs | 14 ++++---------- src/mounter/gvfs.rs | 10 ++-------- src/mouse_area.rs | 4 ++-- src/operation/mod.rs | 2 +- 4 files changed, 9 insertions(+), 21 deletions(-) diff --git a/src/mime_app.rs b/src/mime_app.rs index 9e11011..3dfa1c3 100644 --- a/src/mime_app.rs +++ b/src/mime_app.rs @@ -120,7 +120,7 @@ impl MimeAppCache { .cache .entry(mime.clone()) .or_insert_with(|| Vec::with_capacity(1)); - if apps.iter().find(|x| x.id == app.id).is_none() { + if !apps.iter().any(|x| x.id == app.id) { apps.push(MimeApp::from(app)); } } @@ -191,11 +191,7 @@ impl MimeAppCache { .cache .entry(mime.clone()) .or_insert_with(|| Vec::with_capacity(1)); - if apps - .iter() - .find(|x| filename_eq(&x.path, filename)) - .is_none() - { + if !apps.iter().any(|x| filename_eq(&x.path, filename)) { if let Some(app) = all_apps.iter().find(|x| filename_eq(&x.path, filename)) { @@ -263,9 +259,7 @@ impl MimeAppCache { } pub fn get(&self, key: &Mime) -> Vec { - self.cache - .get(&key) - .map_or_else(|| Vec::new(), |x| x.clone()) + self.cache.get(key).map_or_else(Vec::new, |x| x.clone()) } } @@ -292,5 +286,5 @@ pub fn terminal() -> Option { } // Return whatever was the first terminal found - mime_app_cache.terminals.first().map(|x| x.clone()) + mime_app_cache.terminals.first().cloned() } diff --git a/src/mounter/gvfs.rs b/src/mounter/gvfs.rs index e5b046c..c24fd92 100644 --- a/src/mounter/gvfs.rs +++ b/src/mounter/gvfs.rs @@ -97,7 +97,7 @@ fn network_scan(uri: &str, sizes: IconSizes) -> Result, String> { info.icon() .as_ref() .and_then(|icon| gio_icon_to_path(icon, size)) - .map(|path| widget::icon::from_path(path)) + .map(widget::icon::from_path) .unwrap_or( widget::icon::from_name(if metadata.is_dir() { "folder" @@ -388,10 +388,7 @@ impl Gvfs { let file = gio::File::for_uri(&uri); let needs_mount = match file.find_enclosing_mount(gio::Cancellable::NONE) { Ok(_) => false, - Err(err) => match err.kind::() { - Some(gio::IOErrorEnum::NotMounted) => true, - _ => false - } + Err(err) => matches!(err.kind::(), Some(gio::IOErrorEnum::NotMounted)) }; if needs_mount { let mount_op = mount_op(uri.clone(), event_tx.clone()); @@ -468,7 +465,6 @@ impl Mounter for Gvfs { Task::perform( async move { command_tx.send(Cmd::Mount(item)).unwrap(); - () }, |x| x, ) @@ -479,7 +475,6 @@ impl Mounter for Gvfs { Task::perform( async move { command_tx.send(Cmd::NetworkDrive(uri)).unwrap(); - () }, |x| x, ) @@ -498,7 +493,6 @@ impl Mounter for Gvfs { Task::perform( async move { command_tx.send(Cmd::Unmount(item)).unwrap(); - () }, |x| x, ) diff --git a/src/mouse_area.rs b/src/mouse_area.rs index e4de7f2..164cac7 100644 --- a/src/mouse_area.rs +++ b/src/mouse_area.rs @@ -296,7 +296,7 @@ impl<'a, Message> MouseArea<'a, Message> { } } -impl<'a, Message> Widget for MouseArea<'a, Message> +impl Widget for MouseArea<'_, Message> where Message: Clone, { @@ -671,7 +671,7 @@ fn update( if let Some(on_scroll) = widget.on_scroll.as_ref() { if let Event::Mouse(mouse::Event::WheelScrolled { delta }) = event { - if let Some(message) = on_scroll(delta.clone(), state.modifiers) { + if let Some(message) = on_scroll(*delta, state.modifiers) { shell.publish(message); return event::Status::Captured; } diff --git a/src/operation/mod.rs b/src/operation/mod.rs index d48b72b..0fe2d39 100644 --- a/src/operation/mod.rs +++ b/src/operation/mod.rs @@ -993,7 +993,7 @@ mod tests { paths: paths_clone, to: to_clone, } - .perform(&sync::Mutex::new(tx).into(), Controller::new()) + .perform(&sync::Mutex::new(tx).into(), Controller::default()) .await }); From dddfc8a673c4efe1c2400f0006e50fe0dc6674fd Mon Sep 17 00:00:00 2001 From: Josh Megnauth Date: Mon, 20 Jan 2025 02:48:55 -0500 Subject: [PATCH 24/35] chore(clippy): config, dialog, menu Fixes Clippy lints for: * src/config.rs * src/dialog.rs * src/menu.rs --- src/config.rs | 2 +- src/dialog.rs | 70 +++++++++++++++++++++++---------------------------- src/menu.rs | 20 +++++++-------- 3 files changed, 41 insertions(+), 51 deletions(-) diff --git a/src/config.rs b/src/config.rs index 36153da..50dfcba 100644 --- a/src/config.rs +++ b/src/config.rs @@ -68,7 +68,7 @@ impl Favorite { Self::Videos, ] { if let Some(favorite_path) = favorite.path_opt() { - if &favorite_path == &path { + if favorite_path == path { return favorite.clone(); } } diff --git a/src/dialog.rs b/src/dialog.rs index a5a792a..586a0c0 100644 --- a/src/dialog.rs +++ b/src/dialog.rs @@ -157,13 +157,15 @@ impl Dialog { let (config_handler, config) = Config::load(); - let mut settings = window::Settings::default(); - settings.decorations = false; - settings.exit_on_close_request = false; - settings.min_size = Some(Size::new(360.0, 180.0)); - settings.resizable = true; - settings.size = Size::new(1024.0, 640.0); - settings.transparent = true; + let mut settings = window::Settings { + decorations: false, + exit_on_close_request: false, + min_size: Some(Size::new(360.0, 180.0)), + resizable: true, + size: Size::new(1024.0, 640.0), + transparent: true, + ..Default::default() + }; #[cfg(target_os = "linux")] { @@ -296,6 +298,7 @@ struct Flags { kind: DialogKind, path_opt: Option, window_id: window::Id, + #[expect(dead_code)] config_handler: Option, config: Config, } @@ -324,6 +327,7 @@ enum Message { SearchActivate, SearchClear, SearchInput(String), + #[allow(clippy::enum_variant_names)] TabMessage(tab::Message), TabRescan(Location, Option, Vec), TabView(tab::View), @@ -598,7 +602,7 @@ impl App { .data(Location::Recents) }); - for (_favorite_i, favorite) in self.flags.config.favorites.iter().enumerate() { + for favorite in self.flags.config.favorites.iter() { if let Some(path) = favorite.path_opt() { let name = if matches!(favorite, Favorite::Home) { fl!("home") @@ -974,11 +978,8 @@ impl Application for App { ContextPage::Preview(..) => self.core.window.show_context, _ => false, }; - elements.push( - menu::dialog_menu(&self.tab, &self.key_binds, show_details) - .map(Message::from) - .into(), - ); + elements + .push(menu::dialog_menu(&self.tab, &self.key_binds, show_details).map(Message::from)); elements } @@ -1027,7 +1028,7 @@ impl Application for App { return self.update(message); } - if let Some(data) = self.nav_model.data::(entity).clone() { + if let Some(data) = self.nav_model.data::(entity) { if let Some(mounter) = MOUNTERS.get(&data.0) { return mounter.mount(data.1.clone()).map(|_| message::none()); } @@ -1169,11 +1170,9 @@ impl Application for App { let mut still_mounted = false; for item in mounter_items.iter() { if let Some(path) = item.path() { - if path == old_path { - if item.is_mounted() { - still_mounted = true; - break; - } + if path == old_path && item.is_mounted() { + still_mounted = true; + break; } } } @@ -1221,7 +1220,7 @@ impl Application for App { let mut contains_change = false; for event in events.iter() { for event_path in event.paths.iter() { - if event_path.starts_with(&path) { + if event_path.starts_with(path) { match event.kind { notify::EventKind::Modify( notify::event::ModifyKind::Metadata(_), @@ -1235,14 +1234,14 @@ impl Application for App { for item in items.iter_mut() { if item.path_opt() == Some(event_path) { //TODO: reload more, like mime types? - match fs::metadata(&event_path) { + match fs::metadata(event_path) { Ok(new_metadata) => { - match &mut item.metadata { - ItemMetadata::Path { - metadata, - .. - } => *metadata = new_metadata, - _ => {} + if let ItemMetadata::Path { + metadata, + .. + } = &mut item.metadata + { + *metadata = new_metadata; } } Err(err) => { @@ -1322,12 +1321,9 @@ impl Application for App { // If we are in directory mode, return the current directory if self.flags.kind.is_dir() { - match &self.tab.location { - Location::Path(tab_path) => { - self.result_opt = Some(DialogResult::Open(vec![tab_path.clone()])); - return window::close(self.flags.window_id); - } - _ => {} + if let Location::Path(tab_path) = &self.tab.location { + self.result_opt = Some(DialogResult::Open(vec![tab_path.clone()])); + return window::close(self.flags.window_id); } } } @@ -1344,7 +1340,7 @@ impl Application for App { if let DialogKind::SaveFile { filename } = &self.flags.kind { if !filename.is_empty() { if let Some(tab_path) = self.tab.location.path_opt() { - let path = tab_path.join(&filename); + let path = tab_path.join(filename); if path.is_dir() { // cd to directory let message = Message::TabMessage(tab::Message::Location( @@ -1592,11 +1588,7 @@ impl Application for App { } } - col = col.push( - self.tab - .view(&self.key_binds) - .map(move |message| Message::TabMessage(message)), - ); + col = col.push(self.tab.view(&self.key_binds).map(Message::TabMessage)); col.into() } diff --git a/src/menu.rs b/src/menu.rs index abd602a..219a463 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -89,7 +89,7 @@ pub fn context_menu<'a>( let mut selected_trash_only = false; let mut selected_desktop_entry = None; let mut selected_types: Vec = vec![]; - tab.items_opt().map(|items| { + if let Some(items) = tab.items_opt() { for item in items.iter() { if item.selected { selected += 1; @@ -110,7 +110,7 @@ pub fn context_menu<'a>( selected_types.push(item.mime.clone()); } } - }); + }; selected_types.sort_unstable(); selected_types.dedup(); selected_trash_only = selected_trash_only && selected == 1; @@ -342,7 +342,7 @@ pub fn context_menu<'a>( .into() } -pub fn dialog_menu<'a>( +pub fn dialog_menu( tab: &Tab, key_binds: &HashMap, show_details: bool, @@ -359,15 +359,13 @@ pub fn dialog_menu<'a>( let in_trash = tab.location == Location::Trash; let mut selected_gallery = 0; - tab.items_opt().map(|items| { + if let Some(items) = tab.items_opt() { for item in items.iter() { - if item.selected { - if item.can_gallery() { - selected_gallery += 1; - } + if item.selected && item.can_gallery() { + selected_gallery += 1; } } - }); + }; MenuBar::new(vec![ menu::Tree::with_children( @@ -504,7 +502,7 @@ pub fn menu_bar<'a>( let mut selected_dir = 0; let mut selected = 0; let mut selected_gallery = 0; - tab_opt.and_then(|tab| tab.items_opt()).map(|items| { + if let Some(items) = tab_opt.and_then(|tab| tab.items_opt()) { for item in items.iter() { if item.selected { selected += 1; @@ -516,7 +514,7 @@ pub fn menu_bar<'a>( } } } - }); + }; MenuBar::new(vec![ menu::Tree::with_children( From 2095d3c7f27e46ac27b17ce2737b39c719f99059 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 22 Jan 2025 09:06:41 -0700 Subject: [PATCH 25/35] If file is passed on command line, show parent folder and select it --- src/app.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/app.rs b/src/app.rs index c5c2a5e..88f35d9 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1604,6 +1604,18 @@ impl Application for App { let mut commands = vec![app.update_config()]; for location in flags.locations { + if let Some(path) = location.path_opt() { + if path.is_file() { + if let Some(parent) = path.parent() { + commands.push(app.open_tab( + Location::Path(parent.to_path_buf()), + true, + Some(vec![path.to_path_buf()]), + )); + continue; + } + } + } commands.push(app.open_tab(location, true, None)); } From d322017e096dd96247b57fd811ef69db8a8baa00 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 23 Jan 2025 13:02:51 -0700 Subject: [PATCH 26/35] Support URL arguments --- res/com.system76.CosmicFiles.desktop | 2 +- src/lib.rs | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/res/com.system76.CosmicFiles.desktop b/res/com.system76.CosmicFiles.desktop index 5d3f0a6..f25060d 100644 --- a/res/com.system76.CosmicFiles.desktop +++ b/res/com.system76.CosmicFiles.desktop @@ -3,7 +3,7 @@ Name=COSMIC Files Name[pl]=Pliki COSMIC Name[pt-BR]=Arquivos do COSMIC -Exec=cosmic-files %F +Exec=cosmic-files %U Terminal=false Type=Application StartupNotify=true diff --git a/src/lib.rs b/src/lib.rs index c6ca345..e0c1e47 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -98,10 +98,21 @@ pub fn main() -> Result<(), Box> { } else if &arg == "--trash" { Location::Trash } else { - match fs::canonicalize(&arg) { + //TODO: support more URLs + let path = match url::Url::parse(&arg) { + Ok(url) => match url.to_file_path() { + Ok(path) => path, + Err(()) => { + log::warn!("invalid argument {:?}", arg); + continue; + } + }, + Err(_) => PathBuf::from(arg), + }; + match fs::canonicalize(&path) { Ok(absolute) => Location::Path(absolute), Err(err) => { - log::warn!("failed to canonicalize {:?}: {}", arg, err); + log::warn!("failed to canonicalize {:?}: {}", path, err); continue; } } From b9f43cb53ef2733e85fc4abd1331d20227ef6331 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 23 Jan 2025 14:01:59 -0700 Subject: [PATCH 27/35] Handle org.freedesktop.FileManager1 in cosmic-files-applet --- Cargo.lock | 2 + cosmic-files-applet/Cargo.toml | 4 ++ cosmic-files-applet/src/file_manager.rs | 53 +++++++++++++++++++++++++ cosmic-files-applet/src/main.rs | 8 ++++ 4 files changed, 67 insertions(+) create mode 100644 cosmic-files-applet/src/file_manager.rs diff --git a/Cargo.lock b/Cargo.lock index 6556559..ed0611c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1282,6 +1282,8 @@ name = "cosmic-files-applet" version = "0.1.0" dependencies = [ "cosmic-files", + "log", + "zbus 4.4.0", ] [[package]] diff --git a/cosmic-files-applet/Cargo.toml b/cosmic-files-applet/Cargo.toml index b2a64e6..96a81ce 100644 --- a/cosmic-files-applet/Cargo.toml +++ b/cosmic-files-applet/Cargo.toml @@ -3,6 +3,10 @@ name = "cosmic-files-applet" version = "0.1.0" edition = "2021" +[dependencies] +log = "0.4" +zbus = "4" + [dependencies.cosmic-files] path = ".." default-features = false diff --git a/cosmic-files-applet/src/file_manager.rs b/cosmic-files-applet/src/file_manager.rs new file mode 100644 index 0000000..2be75da --- /dev/null +++ b/cosmic-files-applet/src/file_manager.rs @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: GPL-3.0-only +// Implementation of https://www.freedesktop.org/wiki/Specifications/file-manager-interface/ + +#![allow(dead_code, non_snake_case)] + +use std::process; + +pub struct FileManager; + +impl FileManager { + //TODO: return error? + fn open(&self, uris: &[&str], _startup_id: &str) { + match process::Command::new("cosmic-files").args(uris).spawn() { + Ok(mut child) => { + log::info!("spawned cosmic-files with id {:?}", child.id()); + match child.wait() { + Ok(status) => { + if status.success() { + log::info!("cosmic-files exited with {status}"); + } else { + log::warn!("failed to run cosmic-files: exited with {status}"); + } + } + Err(err) => { + log::warn!("failed to run cosmic-files: {err}"); + } + } + } + Err(err) => { + log::warn!("failed to spawn cosmic-files: {err}"); + } + } + } +} + +//TODO: why does &[&str] not implement Deserialize? +#[zbus::interface(name = "org.freedesktop.FileManager1")] +impl FileManager { + fn ShowFolders(&self, URIs: Vec<&str>, StartupId: &str) { + log::warn!("ShowFolders {:?} {:?}", URIs, StartupId); + self.open(&URIs, StartupId) + } + + fn ShowItems(&self, URIs: Vec<&str>, StartupId: &str) { + log::warn!("ShowItems {:?} {:?}", URIs, StartupId); + self.open(&URIs, StartupId) + } + + fn ShowItemProperties(&self, URIs: Vec<&str>, StartupId: &str) { + log::warn!("ShowItemProperties {:?} {:?}", URIs, StartupId); + self.open(&URIs, StartupId) + } +} diff --git a/cosmic-files-applet/src/main.rs b/cosmic-files-applet/src/main.rs index 8ac8491..a724601 100644 --- a/cosmic-files-applet/src/main.rs +++ b/cosmic-files-applet/src/main.rs @@ -1,3 +1,11 @@ +mod file_manager; + fn main() -> Result<(), Box> { + //TODO: move file manager service to its own daemon? + let _conn_res = zbus::blocking::connection::Builder::session()? + .name("org.freedesktop.FileManager1")? + .serve_at("/org/freedesktop/FileManager1", file_manager::FileManager)? + .build(); + cosmic_files::desktop() } From 691719ade7f3c8642a736dded01eb5eb6e197eec Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 23 Jan 2025 14:45:03 -0700 Subject: [PATCH 28/35] Remove use of expect to fix minimum rust version --- src/dialog.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dialog.rs b/src/dialog.rs index 586a0c0..c57c966 100644 --- a/src/dialog.rs +++ b/src/dialog.rs @@ -298,7 +298,7 @@ struct Flags { kind: DialogKind, path_opt: Option, window_id: window::Id, - #[expect(dead_code)] + #[allow(dead_code)] config_handler: Option, config: Config, } From ceab7835adeb4d34889fdb78294a5d1e84206f46 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 24 Jan 2025 11:55:56 -0700 Subject: [PATCH 29/35] Clean up mime app handling and make it possible to set default application, part of #325 --- Cargo.lock | 89 +++++++++++++++++++++++++++++- Cargo.toml | 3 +- i18n/ar/cosmic_files.ftl | 2 +- i18n/be/cosmic_files.ftl | 2 +- i18n/cs/cosmic_files.ftl | 2 +- i18n/da/cosmic_files.ftl | 2 +- i18n/de/cosmic_files.ftl | 2 +- i18n/en/cosmic_files.ftl | 3 +- i18n/es-419/cosmic_files.ftl | 2 +- i18n/es/cosmic_files.ftl | 2 +- i18n/fi/cosmic_files.ftl | 2 +- i18n/fr/cosmic_files.ftl | 2 +- i18n/hi/cosmic_files.ftl | 2 +- i18n/hu/cosmic_files.ftl | 2 +- i18n/it/cosmic_files.ftl | 2 +- i18n/ja/cosmic_files.ftl | 2 +- i18n/kn/cosmic_fiiles.ftl | 2 +- i18n/ko/cosmic_files.ftl | 2 +- i18n/nl/cosmic_files.ftl | 2 +- i18n/pl/cosmic_files.ftl | 2 +- i18n/pt-BR/cosmic_files.ftl | 2 +- i18n/pt/cosmic_files.ftl | 2 +- i18n/ro/cosmic_files.ftl | 2 +- i18n/ru/cosmic_files.ftl | 2 +- i18n/sk/cosmic_files.ftl | 2 +- i18n/sv/cosmic_files.ftl | 2 +- i18n/th/cosmic_files.ftl | 2 +- i18n/tr/cosmic_files.ftl | 2 +- i18n/uk/cosmic_files.ftl | 2 +- i18n/zh-CN/cosmic_files.ftl | 2 +- i18n/zh-TW/cosmic_files.ftl | 2 +- src/app.rs | 81 ++++++++++++++++++--------- src/dialog.rs | 14 ++--- src/menu.rs | 4 +- src/mime_app.rs | 104 +++++++++++++++++++++++++++-------- src/mounter/gvfs.rs | 1 - src/tab.rs | 65 ++++++++++++++-------- 37 files changed, 306 insertions(+), 114 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ed0611c..e6bd2a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -158,6 +158,12 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1" +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + [[package]] name = "almost" version = "0.2.0" @@ -880,6 +886,39 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "cached" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9718806c4a2fe9e8a56fd736f97b340dd10ed1be8ed733ed50449f351dc33cae" +dependencies = [ + "ahash", + "cached_proc_macro", + "cached_proc_macro_types", + "hashbrown 0.14.5", + "once_cell", + "thiserror 1.0.69", + "web-time", +] + +[[package]] +name = "cached_proc_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f42a145ed2d10dce2191e1dcf30cfccfea9026660e143662ba5eec4017d5daa" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.96", +] + +[[package]] +name = "cached_proc_macro_types" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" + [[package]] name = "calloop" version = "0.13.0" @@ -1229,6 +1268,7 @@ version = "0.1.0" dependencies = [ "bzip2", "chrono", + "cosmic-mime-apps", "dirs 5.0.1", "env_logger", "fastrand 2.3.0", @@ -1299,6 +1339,17 @@ dependencies = [ "xdg", ] +[[package]] +name = "cosmic-mime-apps" +version = "0.1.0" +source = "git+https://github.com/pop-os/cosmic-mime-apps.git#a5aefbd2e914682c151f3b8054dd711e7f57941d" +dependencies = [ + "freedesktop-desktop-entry 0.7.7", + "mime 0.3.17", + "quick-xml 0.37.2", + "xdg", +] + [[package]] name = "cosmic-protocols" version = "0.1.0" @@ -2138,6 +2189,23 @@ dependencies = [ "xdg", ] +[[package]] +name = "freedesktop-desktop-entry" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "016f6ee9509f11c985aa402451f4ee900d1fafeb501a4c3d734ebecfc1130e05" +dependencies = [ + "cached", + "dirs 5.0.1", + "gettext-rs", + "log", + "memchr", + "strsim 0.11.1", + "textdistance", + "thiserror 2.0.11", + "xdg", +] + [[package]] name = "freedesktop_entry_parser" version = "1.3.0" @@ -2567,6 +2635,10 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] [[package]] name = "hashbrown" @@ -3537,7 +3609,7 @@ dependencies = [ "cosmic-theme", "css-color", "derive_setters", - "freedesktop-desktop-entry", + "freedesktop-desktop-entry 0.5.2", "iced", "iced_core", "iced_futures", @@ -4923,6 +4995,15 @@ dependencies = [ "serde", ] +[[package]] +name = "quick-xml" +version = "0.37.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "165859e9e55f79d67b96c5d96f4e88b6f2695a1972849c15a6a3f5c59fc2c003" +dependencies = [ + "memchr", +] + [[package]] name = "quote" version = "1.0.38" @@ -5881,6 +5962,12 @@ dependencies = [ "syn 2.0.96", ] +[[package]] +name = "textdistance" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa672c55ab69f787dbc9126cc387dbe57fdd595f585e4524cf89018fa44ab819" + [[package]] name = "thiserror" version = "1.0.69" diff --git a/Cargo.toml b/Cargo.toml index 52b6721..bbe76f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ vergen = { version = "8", features = ["git", "gitcl"] } [dependencies] chrono = { version = "0.4", features = ["unstable-locales"] } +cosmic-mime-apps = { git = "https://github.com/pop-os/cosmic-mime-apps.git", optional = true } dirs = "5.0.1" env_logger = "0.11" freedesktop_entry_parser = "1.3" @@ -67,7 +68,7 @@ features = ["multi-window", "tokio", "winit"] [features] default = ["bzip2", "desktop", "gvfs", "liblzma", "notify", "wgpu"] -desktop = ["libcosmic/desktop", "dep:xdg"] +desktop = ["libcosmic/desktop", "dep:cosmic-mime-apps", "dep:xdg"] gvfs = ["dep:gio", "dep:glib"] jemalloc = ["dep:tikv-jemallocator"] notify = ["dep:notify-rust"] diff --git a/i18n/ar/cosmic_files.ftl b/i18n/ar/cosmic_files.ftl index 3e5e906..9282444 100644 --- a/i18n/ar/cosmic_files.ftl +++ b/i18n/ar/cosmic_files.ftl @@ -62,7 +62,7 @@ complete = انتهى copy_noun = ينسخ ## Open with -open-with = افتح ب‍استخدام +menu-open-with = افتح ب‍استخدام default-app = {$name} (المبدئي) ## Properties diff --git a/i18n/be/cosmic_files.ftl b/i18n/be/cosmic_files.ftl index 646ba1d..48bcdca 100644 --- a/i18n/be/cosmic_files.ftl +++ b/i18n/be/cosmic_files.ftl @@ -159,7 +159,7 @@ restored = Адноўлена {$items} {$items -> unknown-folder = невядомая папка ## Open with -open-with = Адкрыць з дапамогай +menu-open-with = Адкрыць з дапамогай default-app = {$name} (па змаўчанні) ## Properties diff --git a/i18n/cs/cosmic_files.ftl b/i18n/cs/cosmic_files.ftl index 6021795..335d008 100644 --- a/i18n/cs/cosmic_files.ftl +++ b/i18n/cs/cosmic_files.ftl @@ -62,7 +62,7 @@ complete = Hotovo copy_noun = Kopírovat ## Open with -open-with = Otevřít v +menu-open-with = Otevřít v default-app = {$name} (výchozí) ## Properties diff --git a/i18n/da/cosmic_files.ftl b/i18n/da/cosmic_files.ftl index 949366c..cd2c6d3 100644 --- a/i18n/da/cosmic_files.ftl +++ b/i18n/da/cosmic_files.ftl @@ -196,7 +196,7 @@ restored = Genoprettet {$items} {$items -> unknown-folder = ukendt mappe ## Open with -open-with = Åbn med... +menu-open-with = Åbn med... default-app = {$name} (standardindstilling) ## Show details diff --git a/i18n/de/cosmic_files.ftl b/i18n/de/cosmic_files.ftl index b329cc9..ea61c30 100644 --- a/i18n/de/cosmic_files.ftl +++ b/i18n/de/cosmic_files.ftl @@ -196,7 +196,7 @@ restored = {$items} {$items -> unknown-folder = unbekannter Ordner ## Öffnen mit -open-with = Öffnen mit +menu-open-with = Öffnen mit default-app = {$name} (Standard) ## Details anzeigen diff --git a/i18n/en/cosmic_files.ftl b/i18n/en/cosmic_files.ftl index a05cd2d..c7179ac 100644 --- a/i18n/en/cosmic_files.ftl +++ b/i18n/en/cosmic_files.ftl @@ -96,6 +96,7 @@ set-executable-and-launch-description = Do you want to set "{$name}" as executab set-and-launch = Set and launch ## Metadata Dialog +open-with = Open with owner = Owner group = Group other = Other @@ -196,7 +197,7 @@ restored = Restored {$items} {$items -> unknown-folder = unknown folder ## Open with -open-with = Open with... +menu-open-with = Open with... default-app = {$name} (default) ## Show details diff --git a/i18n/es-419/cosmic_files.ftl b/i18n/es-419/cosmic_files.ftl index 5cea7d2..4653132 100644 --- a/i18n/es-419/cosmic_files.ftl +++ b/i18n/es-419/cosmic_files.ftl @@ -181,7 +181,7 @@ restored = Se ha restaurado {$items} {$items -> unknown-folder = carpeta desconocida ## Open with -open-with = Abrir con +menu-open-with = Abrir con default-app = {$name} (predeterminado) ## Show details diff --git a/i18n/es/cosmic_files.ftl b/i18n/es/cosmic_files.ftl index 3b9a3ac..f2e567d 100644 --- a/i18n/es/cosmic_files.ftl +++ b/i18n/es/cosmic_files.ftl @@ -62,7 +62,7 @@ complete = Completadas copy_noun = Copia ## Open with -open-with = Abrir con +menu-open-with = Abrir con default-app = {$name} (por defecto) ## Properties diff --git a/i18n/fi/cosmic_files.ftl b/i18n/fi/cosmic_files.ftl index 0c455af..cecca7d 100644 --- a/i18n/fi/cosmic_files.ftl +++ b/i18n/fi/cosmic_files.ftl @@ -201,7 +201,7 @@ restored = Palautettu {$items} {$items -> unknown-folder = Tuntematon kansio ## Open with -open-with = Avaa ohjelmalla… +menu-open-with = Avaa ohjelmalla… default-app = {$name} (oletus) ## Show details diff --git a/i18n/fr/cosmic_files.ftl b/i18n/fr/cosmic_files.ftl index e735d57..076429e 100644 --- a/i18n/fr/cosmic_files.ftl +++ b/i18n/fr/cosmic_files.ftl @@ -184,7 +184,7 @@ restored = {$items} {$items -> unknown-folder = Dossier inconnu ## Open with -open-with = Ouvrir avec +menu-open-with = Ouvrir avec default-app = {$name} (défaut) ## Show details diff --git a/i18n/hi/cosmic_files.ftl b/i18n/hi/cosmic_files.ftl index 0f696b9..f897144 100644 --- a/i18n/hi/cosmic_files.ftl +++ b/i18n/hi/cosmic_files.ftl @@ -181,7 +181,7 @@ restored = {$items} {$items -> unknown-folder = अज्ञात फ़ोल्डर ## Open with -open-with = इसके साथ खोलें +menu-open-with = इसके साथ खोलें default-app = {$name} (डिफ़ॉल्ट) ## Show details diff --git a/i18n/hu/cosmic_files.ftl b/i18n/hu/cosmic_files.ftl index c352cf8..56d4d7e 100644 --- a/i18n/hu/cosmic_files.ftl +++ b/i18n/hu/cosmic_files.ftl @@ -102,7 +102,7 @@ undo = Visszavonás unknown-folder = ismeretlen mappa ## Open with -open-with = Megnyitás ezzel +menu-open-with = Megnyitás ezzel default-app = {$name} (alapértelmezett) ## Properties diff --git a/i18n/it/cosmic_files.ftl b/i18n/it/cosmic_files.ftl index 9849a9a..9815127 100644 --- a/i18n/it/cosmic_files.ftl +++ b/i18n/it/cosmic_files.ftl @@ -192,7 +192,7 @@ restored = Ripristinato {$items} {$items -> unknown-folder = cartella sconosciuta ## Open with -open-with = Apri con +menu-open-with = Apri con default-app = {$name} (default) ## Show details diff --git a/i18n/ja/cosmic_files.ftl b/i18n/ja/cosmic_files.ftl index c7e1e0c..3444ea5 100644 --- a/i18n/ja/cosmic_files.ftl +++ b/i18n/ja/cosmic_files.ftl @@ -128,7 +128,7 @@ undo = 元に戻す unknown-folder = 不明なフォルダー ## Open with -open-with = 別のアプリケーションで開く +menu-open-with = 別のアプリケーションで開く default-app = {$name} (デフォルト) ## Properties diff --git a/i18n/kn/cosmic_fiiles.ftl b/i18n/kn/cosmic_fiiles.ftl index 663faa2..c69bb3b 100644 --- a/i18n/kn/cosmic_fiiles.ftl +++ b/i18n/kn/cosmic_fiiles.ftl @@ -181,7 +181,7 @@ restored = {$items} {$items -> unknown-folder = ಅಜ್ಞಾತ ಫೋಲ್ಡರ್ ## Open with -open-with = ಇದರೊಂದಿಗೆ ತೆರೆಯಿರಿ +menu-open-with = ಇದರೊಂದಿಗೆ ತೆರೆಯಿರಿ default-app = {$name} (ಸ್ಥೂಲ) ## Show details diff --git a/i18n/ko/cosmic_files.ftl b/i18n/ko/cosmic_files.ftl index c41b8fb..847d1cd 100644 --- a/i18n/ko/cosmic_files.ftl +++ b/i18n/ko/cosmic_files.ftl @@ -52,7 +52,7 @@ failed = 실패 complete = 완료 ## Open with -open-with = 다른 앱으로 열기 +menu-open-with = 다른 앱으로 열기 default-app = {$name} (기본) ## Properties diff --git a/i18n/nl/cosmic_files.ftl b/i18n/nl/cosmic_files.ftl index dfd0a43..e1e1814 100644 --- a/i18n/nl/cosmic_files.ftl +++ b/i18n/nl/cosmic_files.ftl @@ -192,7 +192,7 @@ restored = {$items} {$items -> unknown-folder = Onbekende map ## Open with -open-with = Openen met... +menu-open-with = Openen met... default-app = {$name} (standaard) ## Show details diff --git a/i18n/pl/cosmic_files.ftl b/i18n/pl/cosmic_files.ftl index 16b622d..918acc0 100644 --- a/i18n/pl/cosmic_files.ftl +++ b/i18n/pl/cosmic_files.ftl @@ -200,7 +200,7 @@ restored = Przywrócono {$items} {$items -> unknown-folder = nieznany katalog ## Open with -open-with = Otwórz za pomocą… +menu-open-with = Otwórz za pomocą… default-app = {$name} (domyślnie) ## Show details diff --git a/i18n/pt-BR/cosmic_files.ftl b/i18n/pt-BR/cosmic_files.ftl index ec9690c..1d0be7c 100644 --- a/i18n/pt-BR/cosmic_files.ftl +++ b/i18n/pt-BR/cosmic_files.ftl @@ -196,7 +196,7 @@ restored = Restaurado {$items} {$items -> unknown-folder = pasta desconhecida ## Open with -open-with = Abrir com... +menu-open-with = Abrir com... default-app = {$name} (padrão) ## Show details diff --git a/i18n/pt/cosmic_files.ftl b/i18n/pt/cosmic_files.ftl index e8d0f1d..22703bd 100644 --- a/i18n/pt/cosmic_files.ftl +++ b/i18n/pt/cosmic_files.ftl @@ -122,7 +122,7 @@ undo = Desfazer unknown-folder = pasta desconhecida ## Open with -open-with = Abrir com... +menu-open-with = Abrir com... default-app = {$name} (predefinição) ## Show details diff --git a/i18n/ro/cosmic_files.ftl b/i18n/ro/cosmic_files.ftl index 45a2f2d..00a6f6e 100644 --- a/i18n/ro/cosmic_files.ftl +++ b/i18n/ro/cosmic_files.ftl @@ -181,7 +181,7 @@ restored = Restaurat {$items} {$items -> unknown-folder = dosar necunoscut ## Open with -open-with = Deschide cu... +menu-open-with = Deschide cu... default-app = {$name} (implicit) ## Show details diff --git a/i18n/ru/cosmic_files.ftl b/i18n/ru/cosmic_files.ftl index c7d257a..0e7947d 100644 --- a/i18n/ru/cosmic_files.ftl +++ b/i18n/ru/cosmic_files.ftl @@ -161,7 +161,7 @@ restored = Восстановлено {$items} {$items -> unknown-folder = неизвестная папка ## Open with -open-with = Открыть с помощью +menu-open-with = Открыть с помощью default-app = {$name} (по умолчанию) ## Show details diff --git a/i18n/sk/cosmic_files.ftl b/i18n/sk/cosmic_files.ftl index 8de22ba..c54ac35 100644 --- a/i18n/sk/cosmic_files.ftl +++ b/i18n/sk/cosmic_files.ftl @@ -195,7 +195,7 @@ undo = Späť unknown-folder = neznámy priečinok ## Open with -open-with = Otvoriť s +menu-open-with = Otvoriť s default-app = {$name} (Predvolené) ## Show details diff --git a/i18n/sv/cosmic_files.ftl b/i18n/sv/cosmic_files.ftl index 948283d..f357780 100644 --- a/i18n/sv/cosmic_files.ftl +++ b/i18n/sv/cosmic_files.ftl @@ -203,7 +203,7 @@ restored = Återställt {$items} {$items -> unknown-folder = okänd katalog ## Öppna med -open-with = Öppna med... +menu-open-with = Öppna med... default-app = {$name} (default) ## Visa detaljer diff --git a/i18n/th/cosmic_files.ftl b/i18n/th/cosmic_files.ftl index f00c4c4..7485e6d 100644 --- a/i18n/th/cosmic_files.ftl +++ b/i18n/th/cosmic_files.ftl @@ -196,7 +196,7 @@ restored = Restored {$items} {$items -> unknown-folder = แฟ้มที่ไม่รู้จัก ## Open with -open-with = เปิดด้วย... +menu-open-with = เปิดด้วย... default-app = {$name} (ค่าเริ่มต้น) ## Show details diff --git a/i18n/tr/cosmic_files.ftl b/i18n/tr/cosmic_files.ftl index 24e40c2..cd789a6 100644 --- a/i18n/tr/cosmic_files.ftl +++ b/i18n/tr/cosmic_files.ftl @@ -166,7 +166,7 @@ restored = {$items} öge "{$trash}"ten "{$to}" dizinine geri yüklenildi ({$prog unknown-folder = bilinmeyen klasör ## Open with -open-with = Birlikte aç... +menu-open-with = Birlikte aç... default-app = {$name} (varsayılan) ## Show details diff --git a/i18n/uk/cosmic_files.ftl b/i18n/uk/cosmic_files.ftl index 3359e9e..3a07b9f 100644 --- a/i18n/uk/cosmic_files.ftl +++ b/i18n/uk/cosmic_files.ftl @@ -106,7 +106,7 @@ undo = Скасувати unknown-folder = невідома тека ## Open with -open-with = Відкрити за допомогою +menu-open-with = Відкрити за допомогою default-app = {$name} (типово) ## Properties diff --git a/i18n/zh-CN/cosmic_files.ftl b/i18n/zh-CN/cosmic_files.ftl index 4dc0c9a..dee9d31 100644 --- a/i18n/zh-CN/cosmic_files.ftl +++ b/i18n/zh-CN/cosmic_files.ftl @@ -166,7 +166,7 @@ restored = 已从 {trash} 还原 {$items} 个项目 unknown-folder = 未知文件夹 ## Open with -open-with = 打开方式... +menu-open-with = 打开方式... default-app = {$name} (默认) ## Show details diff --git a/i18n/zh-TW/cosmic_files.ftl b/i18n/zh-TW/cosmic_files.ftl index a87b9f7..f21417f 100644 --- a/i18n/zh-TW/cosmic_files.ftl +++ b/i18n/zh-TW/cosmic_files.ftl @@ -159,7 +159,7 @@ restored = 已還原 {$items} 項目 {$items -> unknown-folder = 未知資料夾 ## Open with -open-with = 開啟方式... +menu-open-with = 開啟方式... default-app = {$name} (預設) ## Show details diff --git a/src/app.rs b/src/app.rs index d9e667b..e18977e 100644 --- a/src/app.rs +++ b/src/app.rs @@ -444,7 +444,6 @@ pub enum DialogPage { OpenWith { path: PathBuf, mime: mime_guess::Mime, - apps: Vec, selected: usize, store_opt: Option, }, @@ -514,6 +513,7 @@ pub struct App { dialog_text_input: widget::Id, key_binds: HashMap, margin: HashMap, + mime_app_cache: mime_app::MimeAppCache, modifiers: Modifiers, mounter_items: HashMap, network_drive_connecting: Option<(MounterKey, String)>, @@ -592,7 +592,7 @@ impl App { } // Try mime apps, which should be faster than xdg-open - for app in mime_app::mime_apps(&mime) { + for app in self.mime_app_cache.get(&mime) { let Some(mut command) = app.command(Some(path.clone().into())) else { continue; }; @@ -1431,21 +1431,24 @@ impl App { entity_opt: &Option, kind: &'a PreviewKind, context_drawer: bool, - ) -> Element<'a, Message> { + ) -> Element<'a, tab::Message> { let cosmic_theme::Spacing { space_l, .. } = theme::active().cosmic().spacing; let mut children = Vec::with_capacity(1); let entity = entity_opt.unwrap_or_else(|| self.tab_model.active()); match kind { PreviewKind::Custom(PreviewItem(item)) => { - children.push(item.preview_view(IconSizes::default())); + children.push(item.preview_view(Some(&self.mime_app_cache), IconSizes::default())); } PreviewKind::Location(location) => { if let Some(tab) = self.tab_model.data::(entity) { if let Some(items) = tab.items_opt() { for item in items.iter() { if item.location_opt.as_ref() == Some(location) { - children.push(item.preview_view(tab.config.icon_sizes)); + children.push(item.preview_view( + Some(&self.mime_app_cache), + tab.config.icon_sizes, + )); // Only show one property view to avoid issues like hangs when generating // preview images on thousands of files break; @@ -1459,7 +1462,10 @@ impl App { if let Some(items) = tab.items_opt() { for item in items.iter() { if item.selected { - children.push(item.preview_view(tab.config.icon_sizes)); + children.push(item.preview_view( + Some(&self.mime_app_cache), + tab.config.icon_sizes, + )); // Only show one property view to avoid issues like hangs when generating // preview images on thousands of files break; @@ -1467,7 +1473,10 @@ impl App { } if children.is_empty() { if let Some(item) = &tab.parent_item_opt { - children.push(item.preview_view(tab.config.icon_sizes)); + children.push(item.preview_view( + Some(&self.mime_app_cache), + tab.config.icon_sizes, + )); } } } @@ -1573,6 +1582,7 @@ impl Application for App { dialog_text_input: widget::Id::unique(), key_binds, margin: HashMap::new(), + mime_app_cache: mime_app::MimeAppCache::new(), modifiers: Modifiers::empty(), mounter_items: HashMap::new(), network_drive_connecting: None, @@ -1688,7 +1698,7 @@ impl Application for App { NavMenuAction::Open(entity), )); items.push(cosmic::widget::menu::Item::Button( - fl!("open-with"), + fl!("menu-open-with"), None, NavMenuAction::OpenWith(entity), )); @@ -2016,11 +2026,11 @@ impl Application for App { } DialogPage::OpenWith { path, - apps, + mime, selected, .. } => { - if let Some(app) = apps.get(selected) { + if let Some(app) = self.mime_app_cache.get(&mime).get(selected) { if let Some(mut command) = app.command(Some(path.clone().into())) { match spawn_detached(&mut command) { Ok(()) => { @@ -2345,7 +2355,7 @@ impl Application for App { } }, Message::OpenTerminal(entity_opt) => { - if let Some(terminal) = mime_app::terminal() { + if let Some(terminal) = self.mime_app_cache.terminal() { let mut paths = Vec::new(); let entity = entity_opt.unwrap_or_else(|| self.tab_model.active()); if let Some(tab) = self.tab_model.data_mut::(entity) { @@ -2471,12 +2481,13 @@ impl Application for App { return self.update(Message::DialogPush(DialogPage::OpenWith { path: path.to_path_buf(), mime: item.mime.clone(), - apps: item.open_with.clone(), selected: 0, store_opt: "x-scheme-handler/mime" .parse::() .ok() - .and_then(|mime| mime_app::mime_apps(&mime).first().cloned()), + .and_then(|mime| { + self.mime_app_cache.get(&mime).first().cloned() + }), })); } } @@ -2905,9 +2916,11 @@ impl Application for App { App::exec_entry_action(entry, action); } tab::Command::Iced(iced_command) => { - commands.push(iced_command.0.map(move |tab_message| { - message::app(Message::TabMessage(Some(entity), tab_message)) - })); + commands.push( + iced_command.0.map(move |x| { + message::app(Message::TabMessage(Some(entity), x)) + }), + ); } tab::Command::MoveToTrash(paths) => { self.operation(Operation::Delete { paths }); @@ -2942,6 +2955,10 @@ impl Application for App { self.context_page = ContextPage::Preview(Some(entity), kind); self.set_show_context(true); } + tab::Command::SetOpenWith(mime, id) => { + //TODO: this will block for a few ms, run in background? + self.mime_app_cache.set_default(mime, id); + } tab::Command::WindowDrag => { if let Some(window_id) = &self.window_id_opt { commands.push(window::drag(*window_id)); @@ -3282,13 +3299,12 @@ impl Application for App { return self.update(Message::DialogPush(DialogPage::OpenWith { path: path.to_path_buf(), mime: item.mime.clone(), - apps: item.open_with.clone(), selected: 0, store_opt: "x-scheme-handler/mime" .parse::() .ok() .and_then(|mime| { - mime_app::mime_apps(&mime).first().cloned() + self.mime_app_cache.get(&mime).first().cloned() }), })); } @@ -3530,14 +3546,17 @@ impl Application for App { if let Some(items) = tab.items_opt() { for item in items.iter() { if item.selected { - actions.extend(item.preview_header()) + actions.extend(item.preview_header().into_iter().map(|element| { + element.map(move |x| Message::TabMessage(Some(entity), x)) + })); } } } }; context_drawer::context_drawer( - self.preview(entity_opt, kind, true), - Message::ToggleContextPage(ContextPage::Preview(*entity_opt, kind.clone())), + self.preview(entity_opt, kind, true) + .map(move |x| Message::TabMessage(Some(entity), x)), + Message::ToggleContextPage(ContextPage::Preview(Some(entity), kind.clone())), ) .header_actions(actions) } @@ -3556,7 +3575,7 @@ impl Application for App { if tab.gallery { return Some( tab.gallery_view() - .map(move |tab_message| Message::TabMessage(Some(entity), tab_message)), + .map(move |x| Message::TabMessage(Some(entity), x)), ); } } @@ -3878,7 +3897,7 @@ impl Application for App { } DialogPage::OpenWith { path, - apps, + mime, selected, store_opt, .. @@ -3889,7 +3908,7 @@ impl Application for App { }; let mut column = widget::list_column(); - for (i, app) in apps.iter().enumerate() { + for (i, app) in self.mime_app_cache.get(mime).iter().enumerate() { column = column.add( widget::button::custom( widget::row::with_children(vec![ @@ -4026,8 +4045,14 @@ impl Application for App { let dialog = widget::dialog() .title(fl!("replace-title", filename = to.name.as_str())) .body(fl!("replace-warning-operation")) - .control(to.replace_view(fl!("original-file"), IconSizes::default())) - .control(from.replace_view(fl!("replace-with"), IconSizes::default())) + .control( + to.replace_view(fl!("original-file"), IconSizes::default()) + .map(|x| Message::TabMessage(None, x)), + ) + .control( + from.replace_view(fl!("replace-with"), IconSizes::default()) + .map(|x| Message::TabMessage(None, x)), + ) .primary_action(widget::button::suggested(fl!("replace")).on_press( Message::ReplaceResult(ReplaceResult::Replace(*apply_to_all)), )); @@ -4365,7 +4390,9 @@ impl Application for App { }; } Some(WindowKind::DesktopViewOptions) => self.desktop_view_options(), - Some(WindowKind::Preview(entity_opt, kind)) => self.preview(entity_opt, kind, false), + Some(WindowKind::Preview(entity_opt, kind)) => self + .preview(entity_opt, kind, false) + .map(|x| Message::TabMessage(*entity_opt, x)), None => { //TODO: distinct views per monitor in desktop mode return self.view_main().map(|message| match message { diff --git a/src/dialog.rs b/src/dialog.rs index c57c966..dc10905 100644 --- a/src/dialog.rs +++ b/src/dialog.rs @@ -471,17 +471,17 @@ impl App { .into() } - fn preview<'a>(&'a self, kind: &'a PreviewKind) -> Element<'a, AppMessage> { + fn preview<'a>(&'a self, kind: &'a PreviewKind) -> Element<'a, tab::Message> { let mut children = Vec::with_capacity(1); match kind { PreviewKind::Custom(PreviewItem(item)) => { - children.push(item.preview_view(IconSizes::default())); + children.push(item.preview_view(None, IconSizes::default())); } PreviewKind::Location(location) => { if let Some(items) = self.tab.items_opt() { for item in items.iter() { if item.location_opt.as_ref() == Some(location) { - children.push(item.preview_view(self.tab.config.icon_sizes)); + children.push(item.preview_view(None, self.tab.config.icon_sizes)); // Only show one property view to avoid issues like hangs when generating // preview images on thousands of files break; @@ -493,7 +493,7 @@ impl App { if let Some(items) = self.tab.items_opt() { for item in items.iter() { if item.selected { - children.push(item.preview_view(self.tab.config.icon_sizes)); + children.push(item.preview_view(None, self.tab.config.icon_sizes)); // Only show one property view to avoid issues like hangs when generating // preview images on thousands of files break; @@ -501,7 +501,7 @@ impl App { } if children.is_empty() { if let Some(item) = &self.tab.parent_item_opt { - children.push(item.preview_view(self.tab.config.icon_sizes)); + children.push(item.preview_view(None, self.tab.config.icon_sizes)); } } } @@ -814,14 +814,14 @@ impl Application for App { actions.extend( item.preview_header() .into_iter() - .map(|element| element.map(Message::from)), + .map(|element| element.map(Message::TabMessage)), ) } } }; Some( context_drawer::context_drawer( - self.preview(kind).map(Message::from), + self.preview(kind).map(Message::TabMessage), Message::Preview, ) .header_actions(actions), diff --git a/src/menu.rs b/src/menu.rs index 219a463..c65b26e 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -157,7 +157,7 @@ pub fn context_menu<'a>( children.push(menu_item(fl!("open"), Action::Open).into()); } if selected == 1 { - children.push(menu_item(fl!("open-with"), Action::OpenWith).into()); + children.push(menu_item(fl!("menu-open-with"), Action::OpenWith).into()); if selected_dir == 1 { children .push(menu_item(fl!("open-in-terminal"), Action::OpenTerminal).into()); @@ -531,7 +531,7 @@ pub fn menu_bar<'a>( Action::Open, (selected > 0 && selected_dir == 0) || (selected_dir == 1 && selected == 1), ), - menu_button_optional(fl!("open-with"), Action::OpenWith, selected == 1), + menu_button_optional(fl!("menu-open-with"), Action::OpenWith, selected == 1), menu::Item::Divider, menu_button_optional(fl!("rename"), Action::Rename, selected > 0), menu::Item::Divider, diff --git a/src/mime_app.rs b/src/mime_app.rs index 3dfa1c3..5e2556b 100644 --- a/src/mime_app.rs +++ b/src/mime_app.rs @@ -5,9 +5,8 @@ use cosmic::desktop; use cosmic::widget; pub use mime_guess::Mime; -use once_cell::sync::Lazy; use std::{ - cmp::Ordering, collections::HashMap, env, ffi::OsString, path::PathBuf, process, sync::Mutex, + cmp::Ordering, collections::HashMap, env, ffi::OsString, fs, io, path::PathBuf, process, time::Instant, }; @@ -52,6 +51,13 @@ impl MimeApp { } } +// This allows usage of MimeApp in a dropdown +impl AsRef for MimeApp { + fn as_ref(&self) -> &str { + &self.name + } +} + #[cfg(feature = "desktop")] impl From<&desktop::DesktopEntryData> for MimeApp { fn from(app: &desktop::DesktopEntryData) -> Self { @@ -82,6 +88,7 @@ fn filename_eq(path_opt: &Option, filename: &str) -> bool { pub struct MimeAppCache { cache: HashMap>, + icons: HashMap>, terminals: Vec, } @@ -89,6 +96,7 @@ impl MimeAppCache { pub fn new() -> Self { let mut mime_app_cache = Self { cache: HashMap::new(), + icons: HashMap::new(), terminals: Vec::new(), }; mime_app_cache.reload(); @@ -106,6 +114,7 @@ impl MimeAppCache { let start = Instant::now(); self.cache.clear(); + self.icons.clear(); self.terminals.clear(); //TODO: get proper locale? @@ -254,37 +263,88 @@ impl MimeAppCache { }); } + // Copy icons to special cache + //TODO: adjust dropdown API so this is no longer needed + for (mime, apps) in self.cache.iter() { + self.icons.insert( + mime.clone(), + apps.iter().map(|app| app.icon.clone()).collect(), + ); + } + let elapsed = start.elapsed(); log::info!("loaded mime app cache in {:?}", elapsed); } - pub fn get(&self, key: &Mime) -> Vec { - self.cache.get(key).map_or_else(Vec::new, |x| x.clone()) + pub fn get(&self, key: &Mime) -> &[MimeApp] { + static EMPTY: Vec = Vec::new(); + self.cache.get(key).unwrap_or_else(|| &EMPTY) } -} -static MIME_APP_CACHE: Lazy> = Lazy::new(|| Mutex::new(MimeAppCache::new())); + pub fn icons(&self, key: &Mime) -> &[widget::icon::Handle] { + static EMPTY: Vec = Vec::new(); + self.icons.get(key).unwrap_or_else(|| &EMPTY) + } -pub fn mime_apps(mime: &Mime) -> Vec { - let mime_app_cache = MIME_APP_CACHE.lock().unwrap(); - mime_app_cache.get(mime) -} + pub fn terminal(&self) -> Option<&MimeApp> { + //TODO: consider rules in https://github.com/Vladimir-csp/xdg-terminal-exec -pub fn terminal() -> Option { - let mime_app_cache = MIME_APP_CACHE.lock().unwrap(); + // Look for and return preferred terminals + //TODO: fallback order beyond cosmic-term? + for id in &["com.system76.CosmicTerm"] { + for terminal in self.terminals.iter() { + if &terminal.id == id { + return Some(terminal); + } + } + } - //TODO: consider rules in https://github.com/Vladimir-csp/xdg-terminal-exec + // Return whatever was the first terminal found + self.terminals.first() + } - // Look for and return preferred terminals - //TODO: fallback order beyond cosmic-term? - for id in &["com.system76.CosmicTerm"] { - for terminal in mime_app_cache.terminals.iter() { - if &terminal.id == id { - return Some(terminal.clone()); + #[cfg(not(feature = "desktop"))] + pub fn set_default(&mut self, mime: Mime, id: String) { + log::warn!( + "failed to set default handler for {mime:?} to {id:?}: desktop feature not enabled" + ); + } + + #[cfg(feature = "desktop")] + pub fn set_default(&mut self, mime: Mime, mut id: String) { + let Some(path) = cosmic_mime_apps::local_list_path() else { + log::warn!("failed to find mimeapps.list path"); + return; + }; + + let mut list = cosmic_mime_apps::List::default(); + match fs::read_to_string(&path) { + Ok(string) => { + list.load_from(&string); + } + Err(err) => { + if err.kind() != io::ErrorKind::NotFound { + log::warn!("failed to read {path:?}: {err}"); + return; + } + } + } + + let suffix = ".desktop"; + if !id.ends_with(suffix) { + id.push_str(suffix); + } + list.set_default_app(mime, id); + + let mut string = list.to_string(); + string.push('\n'); + match fs::write(&path, string) { + Ok(()) => { + self.reload(); + } + Err(err) => { + log::warn!("failed to write {path:?}: {err}"); } } } - - // Return whatever was the first terminal found - mime_app_cache.terminals.first().cloned() } diff --git a/src/mounter/gvfs.rs b/src/mounter/gvfs.rs index c24fd92..78df185 100644 --- a/src/mounter/gvfs.rs +++ b/src/mounter/gvfs.rs @@ -127,7 +127,6 @@ fn network_scan(uri: &str, sizes: IconSizes) -> Result, String> { icon_handle_grid, icon_handle_list, icon_handle_list_condensed, - open_with: Vec::new(), thumbnail_opt: Some(ItemThumbnail::NotImage), button_id: widget::Id::unique(), pos_opt: Cell::new(None), diff --git a/src/tab.rs b/src/tab.rs index d4fadb3..63d734c 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -58,14 +58,13 @@ use tokio::sync::mpsc; use walkdir::WalkDir; use crate::{ - app::{self, Action, PreviewItem, PreviewKind}, + app::{Action, PreviewItem, PreviewKind}, clipboard::{ClipboardCopy, ClipboardKind, ClipboardPaste}, config::{DesktopConfig, IconSizes, TabConfig, ICON_SCALE_MAX, ICON_SIZE_GRID}, dialog::DialogKind, fl, localize::{LANGUAGE_CHRONO, LANGUAGE_SORTER}, - menu, - mime_app::{mime_apps, MimeApp}, + menu, mime_app, mime_icon::{mime_for_path, mime_icon}, mounter::MOUNTERS, mouse_area, @@ -459,8 +458,6 @@ pub fn item_from_entry( } }; - let open_with = mime_apps(&mime); - let children = if metadata.is_dir() { //TODO: calculate children in the background (and make it cancellable?) match fs::read_dir(&path) { @@ -490,7 +487,6 @@ pub fn item_from_entry( icon_handle_grid, icon_handle_list, icon_handle_list_condensed, - open_with, thumbnail_opt: None, button_id: widget::Id::unique(), pos_opt: Cell::new(None), @@ -720,7 +716,6 @@ pub fn scan_trash(sizes: IconSizes) -> Vec { icon_handle_grid, icon_handle_list, icon_handle_list_condensed, - open_with: Vec::new(), thumbnail_opt: Some(ItemThumbnail::NotImage), button_id: widget::Id::unique(), pos_opt: Cell::new(None), @@ -904,7 +899,6 @@ pub fn scan_desktop( icon_handle_grid, icon_handle_list, icon_handle_list_condensed, - open_with: Vec::new(), thumbnail_opt: Some(ItemThumbnail::NotImage), button_id: widget::Id::unique(), pos_opt: Cell::new(None), @@ -1027,6 +1021,7 @@ pub enum Command { OpenInNewWindow(PathBuf), OpenTrash, Preview(PreviewKind), + SetOpenWith(Mime, String), WindowDrag, WindowToggleMaximize, } @@ -1073,6 +1068,7 @@ pub enum Message { SelectAll, SelectFirst, SelectLast, + SetOpenWith(Mime, String), SetSort(HeadingOptions, bool), Thumbnail(PathBuf, ItemThumbnail), ToggleShowHidden, @@ -1318,7 +1314,6 @@ pub struct Item { pub icon_handle_grid: widget::icon::Handle, pub icon_handle_list: widget::icon::Handle, pub icon_handle_list_condensed: widget::icon::Handle, - pub open_with: Vec, pub thumbnail_opt: Option, pub button_id: widget::Id, pub pos_opt: Cell>, @@ -1343,7 +1338,7 @@ impl Item { self.mime.type_() == mime::IMAGE || self.mime.type_() == mime::TEXT } - fn preview<'a>(&'a self, sizes: IconSizes) -> Element<'a, app::Message> { + fn preview<'a>(&'a self, sizes: IconSizes) -> Element<'a, Message> { let spacing = cosmic::theme::active().cosmic().spacing; // This loads the image only if thumbnailing worked let icon = widget::icon::icon(self.icon_handle_grid.clone()) @@ -1376,23 +1371,23 @@ impl Item { } } - pub fn preview_header(&self) -> Vec> { + pub fn preview_header(&self) -> Vec> { let mut row = Vec::with_capacity(3); row.push( widget::button::icon(widget::icon::from_name("go-previous-symbolic")) - .on_press(app::Message::TabMessage(None, Message::ItemLeft)) + .on_press(Message::ItemLeft) .into(), ); row.push( widget::button::icon(widget::icon::from_name("go-next-symbolic")) - .on_press(app::Message::TabMessage(None, Message::ItemRight)) + .on_press(Message::ItemRight) .into(), ); if self.can_gallery() { if let Some(_path) = self.path_opt() { row.push( widget::button::icon(widget::icon::from_name("view-fullscreen-symbolic")) - .on_press(app::Message::TabMessage(None, Message::Gallery(true))) + .on_press(Message::Gallery(true)) .into(), ); } @@ -1400,7 +1395,11 @@ impl Item { row } - pub fn preview_view<'a>(&'a self, sizes: IconSizes) -> Element<'a, app::Message> { + pub fn preview_view<'a>( + &'a self, + mime_app_cache_opt: Option<&'a mime_app::MimeAppCache>, + sizes: IconSizes, + ) -> Element<'a, Message> { let cosmic_theme::Spacing { space_xxxs, space_m, @@ -1422,6 +1421,24 @@ impl Item { mime = self.mime.to_string() ))); let mut settings = Vec::new(); + if let Some(mime_app_cache) = mime_app_cache_opt { + let mime_apps = mime_app_cache.get(&self.mime); + if !mime_apps.is_empty() { + settings.push( + widget::settings::item::builder(fl!("open-with")).control( + widget::dropdown( + mime_apps, + mime_apps.iter().position(|x| x.is_default), + |index| { + let mime_app = &mime_apps[index]; + Message::SetOpenWith(self.mime.clone(), mime_app.id.clone()) + }, + ) + .icons(mime_app_cache.icons(&self.mime)), + ), + ); + } + } match &self.metadata { ItemMetadata::Path { metadata, children } => { if metadata.is_dir() { @@ -1509,9 +1526,10 @@ impl Item { column = column.push(details); if let Some(path) = self.path_opt() { - column = column.push(widget::button::standard(fl!("open")).on_press( - app::Message::TabMessage(None, Message::Open(Some(path.to_path_buf()))), - )); + column = column.push( + widget::button::standard(fl!("open")) + .on_press(Message::Open(Some(path.to_path_buf()))), + ); } if !settings.is_empty() { @@ -1525,11 +1543,7 @@ impl Item { column.into() } - pub fn replace_view<'a>( - &'a self, - heading: String, - sizes: IconSizes, - ) -> Element<'a, app::Message> { + pub fn replace_view<'a>(&'a self, heading: String, sizes: IconSizes) -> Element<'a, Message> { let cosmic_theme::Spacing { space_xxxs, .. } = theme::active().cosmic().spacing; let mut row = widget::row().spacing(space_xxxs); @@ -2831,6 +2845,9 @@ impl Tab { } } } + Message::SetOpenWith(mime, id) => { + commands.push(Command::SetOpenWith(mime, id)); + } Message::SetSort(heading_option, dir) => { if !matches!(self.location, Location::Search(..)) { self.sort_name = heading_option; @@ -4432,7 +4449,7 @@ impl Tab { dnd_dest.into() } - pub fn view<'a>(&'a self, key_binds: &'a HashMap) -> Element { + pub fn view<'a>(&'a self, key_binds: &'a HashMap) -> Element<'a, Message> { widget::responsive(|size| self.view_responsive(key_binds, size)).into() } From 3ab4f49631d7a9b03396b2e3abc5d861300bf6ef Mon Sep 17 00:00:00 2001 From: Luna Jernberg Date: Sun, 26 Jan 2025 06:31:58 +0100 Subject: [PATCH 30/35] Update cosmic_files.ftl Update Swedish translation --- i18n/sv/cosmic_files.ftl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/i18n/sv/cosmic_files.ftl b/i18n/sv/cosmic_files.ftl index f357780..ca276b9 100644 --- a/i18n/sv/cosmic_files.ftl +++ b/i18n/sv/cosmic_files.ftl @@ -86,6 +86,7 @@ set-executable-and-launch-description = Vill du ställa in "{$name}" som körbar set-and-launch = Ställ in och starta ## Metadata dialogruta +open-with = Öppna med owner = Ägare group = Grupp other = Andra @@ -208,12 +209,12 @@ default-app = {$name} (default) ## Visa detaljer show-details = Visa detaljer -type = Type: {$mime} -items = Items: {$items} -item-size = Size: {$size} -item-created = Created: {$created} -item-modified = Modified: {$modified} -item-accessed = Accessed: {$accessed} +type = Typ: {$mime} +items = Objekt: {$items} +item-size = Storlek: {$size} +item-created = Skapad: {$created} +item-modified = Modifierad: {$modified} +item-accessed = Åtkomst: {$accessed} calculating = Beräknar... ## Egenskaper From 5cca324ac96de25d3bc82da8a71defea76530216 Mon Sep 17 00:00:00 2001 From: therealmate <61843503+therealmate@users.noreply.github.com> Date: Sat, 25 Jan 2025 22:18:37 +0100 Subject: [PATCH 31/35] Update Hungarian translations --- i18n/hu/cosmic_files.ftl | 236 +++++++++++++++++++++++++++++---------- 1 file changed, 178 insertions(+), 58 deletions(-) diff --git a/i18n/hu/cosmic_files.ftl b/i18n/hu/cosmic_files.ftl index 56d4d7e..1609eef 100644 --- a/i18n/hu/cosmic_files.ftl +++ b/i18n/hu/cosmic_files.ftl @@ -1,118 +1,220 @@ -cosmic-files = COSMIC Files +cosmic-files = COSMIC Fájlok empty-folder = Üres mappa -empty-folder-hidden = Üres mappa (rejtett elemek vannak benne) +empty-folder-hidden = Üres mappa (Rejtett elemek vannak benne) +no-results = Nincs találat filesystem = Fájlrendszer -home = Otthon +home = Saját mappa +networks = Hálózatok +notification-in-progress = Fájlműveletek folyamatban vannak. trash = Kuka +recents = Legutóbbiak undo = Visszavonás +today = Ma + +# Desktop view options +desktop-view-options = Asztali nézet beállításai... +show-on-desktop = Megjelenítés az asztalon +desktop-folder-content = Asztal mappa tartalma +mounted-drives = Csatolt meghajtók +trash-folder-icon = Kuka ikon +icon-size-and-spacing = Ikonméret és távolság +icon-size = Ikonméret # List view name = Név modified = Szerkesztve +trashed-on = Kukába helyezve size = Méret +# Progress footer +details = Részletek +dismiss = Üzenet elvetése +operations-running = {$running} művelet fut ({$percent}%)... +operations-running-finished = {$running} művelet fut ({$percent}%), {$finished} befejezve... +pause = Szünet +resume = Folytatás + # Dialogs +## Compress Dialog +create-archive = Tömörített fájl létrehozása + ## Empty Trash Dialog -empty-trash = Kuka kiürítése +empty-trash = Kuka ürítése empty-trash-warning = Biztosan véglegesen törölni szeretnéd a kukában lévő összes elemet? +## Mount Error Dialog +mount-error = A meghajtó nem elérhető + ## New File/Folder Dialog create-new-file = Új fájl létrehozása create-new-folder = Új mappa létrehozása -file-name = Fájl név -folder-name = Mappa neve +file-name = Fájlnév +folder-name = Mappanév file-already-exists = Már létezik ilyen nevű fájl. folder-already-exists = Már létezik ilyen nevű mappa. -name-hidden = "." karakterrel kezdődő nevek rejtve lesz. +name-hidden = A ponttal kezdődő nevek rejtve lesznek. name-invalid = A név nem lehet "{$filename}". name-no-slashes = A név nem tartalmazhat perjelet. ## Open/Save Dialog cancel = Mégse +create = Létrehozás open = Megnyitás open-file = Fájl megnyitása open-folder = Mappa megnyitása open-in-new-tab = Megnyitás új lapon open-in-new-window = Megnyitás új ablakban +open-item-location = Útvonal megnyitása open-multiple-files = Több fájl megnyitása open-multiple-folders = Több mappa megnyitása save = Mentés save-file = Fájl mentése +## Open With Dialog +open-with-title = Hogyan szeretnéd megnyitni "{$name}"-t? +browse-store = {$store} böngészése + ## Rename Dialog rename-file = Fájl átnevezése rename-folder = Mappa átnevezése ## Replace Dialog -replace = Kicserélés -replace-title = A(z) {$filename} már létezik ezen a helyen. -replace-warning = Le szeretné cserélni a mentettre? A cseréje felülírja a tartalmát. -replace-warning-operation = Ki akarod cserélni? A cseréje felülírja a tartalmát. +replace = Csere +replace-title = "{$filename}" már létezik. +replace-warning = Le szeretnéd cserélni a mentett fájlra? A cseréje felülírja annak tartalmát. +replace-warning-operation = Ki szeretnéd cserélni? A csere felülírja annak tartalmát. original-file = Eredeti fájl -replace-with = Kicserélés vele -apply-to-all = Mindenkire vonatkozzon +replace-with = Csere erre +apply-to-all = Alkalmazás mindegyikre keep-both = Mindkettő megtartása skip = Kihagyás +## Set as Executable and Launch Dialog +set-executable-and-launch = Futtathatóvá tétele, majd indítása +set-executable-and-launch-description = Szeretnéd futtathatóvá tenni a "{$name}" fájlt és elindítani? +set-and-launch = Alkalmazás és indítás + +## Metadata Dialog +open-with = Megnyitás ezzel +owner = Tulajdonos +group = Csoport +other = Többi +read = Olvasás +write = Írás +execute = Futtatás + # Context Pages ## About git-description = Git commit {$hash} {$date}-kor +## Add Network Drive +add-network-drive = Hálózati meghajtó hozzáadása +connect = Csatlakozás +connect-anonymously = Csatlakozás névtelenül +connecting = Csatlakozás... +domain = Tartomány +enter-server-address = Add meg a szerver címét +network-drive-description = + A szerver címek tartalmazzák a protokoll előtagot és a címet. + Példák: ssh://192.168.0.1, ftp://[2001:db8::1] +### Make sure to keep the comma which separates the columns +network-drive-schemes = + Elérhető protokollok,Előtag + AppleTalk,afp:// + File Transfer Protocol,ftp:// vagy ftps:// + Network File System,nfs:// + Server Message Block,smb:// + SSH File Transfer Protocol,sftp:// vagy ssh:// + WebDav,dav:// vagy davs:// +network-drive-error = A hálózati meghajtó nem elérhető +password = Jelszó +remember-password = Jelszó megjegyzése +try-again = Újra +username = Felhasználónév + ## Operations -edit-history = Előzmények szerkesztése +cancelled = Megszakítva +edit-history = Szerkesztési előzmények history = Előzmények -no-history = Nincsenek tételek a előzményekben. -pending = Függőben levő -failed = Nem sikerült -complete = Kész +no-history = Nem találhatók elemek az előzményekben. +pending = Függőben +progress = {$percent}% +progress-cancelled = {$percent}%, megszakítva +progress-paused = {$percent}%, szüneteltetve +failed = Sikertelen +complete = Befejeződött +compressing = {$items} {$items -> + [one] elem + *[other] elem + } tömörítése innen: "{$from}" ide: "{$to}" ({$progress})... +compressed = {$items} {$items -> + [one] elem + *[other] elem + } tömörítve innen: "{$from}" ide: "{$to}" copy_noun = Másolás -creating = {$name} létrehozása itt: {$parent} -created = {name} létrehozva itt: {$parent} -copying = {$items} másolása {$items -> +creating = "{$name}" létrehozása itt: "{$parent}" +created = "{$name}" létrehozva itt: "{$parent}" +copying = {$items} {$items -> [one] elem - *[other] elemek - } {$from} és {$to} között -copied = {$items} másolva {$items -> + *[other] elem + } másolása innen: "{$from}" ide: "{$to}" ({$progress})... +copied = {$items} {$items -> [one] elem - *[other] elemek - } {$from} és {$to} között -emptying-trash = {trash} ürítése + *[other] elem + } másolva innen: "{$from}" ide: "{$to}" +emptying-trash = {trash} kiürítése ({$progress})... emptied-trash = {trash} kiürítve -moving = {$items} mozgatása {$items -> +extracting = {$items} {$items -> [one] elem - *[other] elemek - } from {$from} to {$to} -moved = Moved {$items} {$items -> + *[other] elem + } kicsomagolása innen: "{$from}" ide: "{$to}" ({$progress})... +extracted = {$items} {$items -> [one] elem - *[other] elemek - } {$from} és {$to} között -renaming = {$from} átnevezése {$to} névre -renamed = {$from} átnevezve {$to} névre -restoring = {$items} visszaállítása {$items -> + *[other] elem + } kicsomagolva innen: "{$from}" ide: "{$to}" +setting-executable-and-launching = Setting "{$name}" as executable and launching +set-executable-and-launched = Set "{$name}" as executable and launched +moving = {$items} {$items -> [one] elem - *[other] elemek - } {trash}-ból -restored = {$items} visszaállítva {$items -> + *[other] elem + } áthelyezése innen: "{$from}" ide: "{$to}" ({$progress})... +moved = {$items} {$items -> [one] elem - *[other] elemek - } {trash}-ból -undo = Visszavonás + *[other] elem + } áthelyezve innen: "{$from}" ide: "{$to}" +renaming = Átnevezés "{$from}"-ról "{$to}"-ra +renamed = Átnevezve "{$from}"-ról "{$to}"-ra +restoring = {$items} {$items -> + [one] elem + *[other] elem + } visszaállítása a {trash}ból ({$progress})... +restored = {$items} {$items -> + [one] elem + *[other] elem + } visszaállítva a {trash}ból unknown-folder = ismeretlen mappa ## Open with -menu-open-with = Megnyitás ezzel +menu-open-with = Megnyitás mással... default-app = {$name} (alapértelmezett) -## Properties -properties = Tulajdonságok +## Show details +show-details = Részletek mutatása +type = Típus: {$mime} +items = Elemek: {$items} +item-size = Méret: {$size} +item-created = Létrehozva: {$created} +item-modified = Módosítva: {$modified} +item-accessed = Hozzáférve: {$accessed} +calculating = Számítás... ## Settings settings = Beállítások ### Appearance -appearance = Kinézet +appearance = Megjelenés theme = Téma match-desktop = Asztallal egyező dark = Sötét @@ -120,23 +222,31 @@ light = Világos # Context menu add-to-sidebar = Hozzáadás az oldalsávhoz -new-file = Új fájl -new-folder = Új mappa +compress = Tömörítés +extract-here = Kicsomagolás itt +new-file = Új fájl... +new-folder = Új mappa... open-in-terminal = Megnyitás a terminálban -move-to-trash = A kukába mozgatás +move-to-trash = Kukába helyezés restore-from-trash = Visszaállítás a kukából remove-from-sidebar = Eltávolítás az oldalsávról sort-by-name = Név szerinti rendezés sort-by-modified = Módosítás szerinti rendezés sort-by-size = Méret szerinti rendezés +sort-by-trashed = Törlés ideje szerinti rendezés + +## Desktop +change-wallpaper = Háttérkép cseréje... +desktop-appearance = Asztali megjelenés... +display-settings = Képernyő beállításai... # Menu ## File file = Fájl -new-tab = Új lap +new-tab = Új fül new-window = Új ablak -rename = Átnevezés +rename = Átnevezés... close-tab = Ablak bezárása quit = Kilépés @@ -145,16 +255,26 @@ edit = Szerkesztés cut = Kivágás copy = Másolás paste = Beillesztés -select-all = Összes kiválasztása +select-all = Mind kijelölése ## View -zoom-in = Benagyítás +zoom-in = Nagyítás default-size = Alapértelmezett méret -zoom-out = Kinagyítás +zoom-out = Kicsinyítés view = Nézet grid-view = Rácsnézet -list-view = Lista nézet -show-hidden-files = Rejtett fájlok mutatása -list-directories-first = Könyvtárak listázások először +list-view = Listanézet +show-hidden-files = Rejtett fájlok megjelenítése +list-directories-first = Könyvtárak listázása először +gallery-preview = Galéria előnézet menu-settings = Beállítások... -menu-about = A COSMIC Files-ról... +menu-about = A COSMIC Fájlokról... + +## Sort +sort = Rendezés +sort-a-z = A-Z +sort-z-a = Z-A +sort-newest-first = Legújabb előre +sort-oldest-first = Legrégibb előre +sort-smallest-to-largest = Legkisebbtől a legnagyobbig +sort-largest-to-smallest = Legnagyobbtól a legkisebbig From 2e378ab261286074753090f152d504167614ad9d Mon Sep 17 00:00:00 2001 From: therealmate <61843503+therealmate@users.noreply.github.com> Date: Mon, 27 Jan 2025 15:17:29 +0100 Subject: [PATCH 32/35] Update the Hungarian translation with the desktop files --- res/com.system76.CosmicFiles.desktop | 2 ++ 1 file changed, 2 insertions(+) diff --git a/res/com.system76.CosmicFiles.desktop b/res/com.system76.CosmicFiles.desktop index f25060d..d98ddbb 100644 --- a/res/com.system76.CosmicFiles.desktop +++ b/res/com.system76.CosmicFiles.desktop @@ -3,6 +3,7 @@ Name=COSMIC Files Name[pl]=Pliki COSMIC Name[pt-BR]=Arquivos do COSMIC +Name[hu]=COSMIC Fájlok Exec=cosmic-files %U Terminal=false Type=Application @@ -12,4 +13,5 @@ Categories=COSMIC;Utility;FileManager; Keywords=Folder;Manager; Keywords[pl]=Katalogi;Pliki;Menedżer; Keywords[pt-BR]=Pastas;Gerenciador; +Keywords[hu]=mappa;fájl;kezelő MimeType=inode/directory; From cfe045827d453eb72acec0c26740c9fd960105e8 Mon Sep 17 00:00:00 2001 From: Josh Megnauth Date: Mon, 27 Jan 2025 02:17:50 -0500 Subject: [PATCH 33/35] chore(clippy): `app.rs`, `mime_app.rs` --- src/app.rs | 204 +++++++++++++++++++++--------------------------- src/mime_app.rs | 10 ++- 2 files changed, 97 insertions(+), 117 deletions(-) diff --git a/src/app.rs b/src/app.rs index e18977e..e97b2d8 100644 --- a/src/app.rs +++ b/src/app.rs @@ -49,7 +49,7 @@ use std::{ collections::{BTreeMap, BTreeSet, HashMap, HashSet, VecDeque}, env, fmt, fs, io, num::NonZeroU16, - path::PathBuf, + path::{Path, PathBuf}, process, sync::{Arc, Mutex}, time::{self, Instant}, @@ -678,7 +678,6 @@ impl App { let mut overlaps: HashMap<_, _> = self .windows .keys() - .into_iter() .map(|k| (*k, (0., 0., 0., 0.))) .collect(); let mut sorted_overlaps: Vec<_> = self.overlap.values().collect(); @@ -690,7 +689,7 @@ impl App { let tr = tr.intersects(overlap); let bl = bl.intersects(overlap); let br = br.intersects(overlap); - let Some((top, left, bottom, right)) = overlaps.get_mut(&w_id) else { + let Some((top, left, bottom, right)) = overlaps.get_mut(w_id) else { continue; }; if tl && tr { @@ -802,12 +801,9 @@ impl App { } fn remove_window(&mut self, id: &window::Id) { - match self.windows.remove(id) { - Some(WindowKind::Desktop(entity)) => { - // Remove the tab from the tab model - self.tab_model.remove(entity); - } - _ => {} + if let Some(WindowKind::Desktop(entity)) = self.windows.remove(id) { + // Remove the tab from the tab model + self.tab_model.remove(entity); } } @@ -817,7 +813,7 @@ impl App { let Some(tab) = self.tab_model.data::(entity) else { return Task::none(); }; - let Some(ref items) = tab.items_opt() else { + let Some(items) = tab.items_opt() else { return Task::none(); }; for item in items.iter() { @@ -1753,7 +1749,7 @@ impl Application for App { return self.update(message); } - if let Some(data) = self.nav_model.data::(entity).clone() { + if let Some(data) = self.nav_model.data::(entity) { if let Some(mounter) = MOUNTERS.get(&data.0) { return mounter.mount(data.1.clone()).map(|_| message::none()); } @@ -1770,14 +1766,11 @@ impl Application for App { } fn on_context_drawer(&mut self) -> Task { - match self.context_page { - ContextPage::Preview(..) => { - // Persist state of preview page - if self.core.window.show_context != self.config.show_details { - return self.update(Message::Preview(None)); - } + if let ContextPage::Preview(..) = self.context_page { + // Persist state of preview page + if self.core.window.show_context != self.config.show_details { + return self.update(Message::Preview(None)); } - _ => {} } Task::none() } @@ -1937,12 +1930,14 @@ impl Application for App { } } Message::DesktopViewOptions => { - let mut settings = window::Settings::default(); - settings.decorations = true; - settings.min_size = Some(Size::new(360.0, 180.0)); - settings.resizable = true; - settings.size = Size::new(480.0, 444.0); - settings.transparent = true; + let mut settings = window::Settings { + decorations: true, + min_size: Some(Size::new(360.0, 180.0)), + resizable: true, + size: Size::new(480.0, 444.0), + transparent: true, + ..Default::default() + }; #[cfg(target_os = "linux")] { @@ -2140,11 +2135,9 @@ impl Application for App { let mut still_mounted = false; for item in mounter_items.iter() { if let Some(path) = item.path() { - if path == old_path { - if item.is_mounted() { - still_mounted = true; - break; - } + if path == old_path && item.is_mounted() { + still_mounted = true; + break; } } } @@ -2289,7 +2282,7 @@ impl Application for App { let mut contains_change = false; for event in events.iter() { for event_path in event.paths.iter() { - if event_path.starts_with(&path) { + if event_path.starts_with(path) { match event.kind { notify::EventKind::Modify( notify::event::ModifyKind::Metadata(_), @@ -2303,16 +2296,17 @@ impl Application for App { for item in items.iter_mut() { if item.path_opt() == Some(event_path) { //TODO: reload more, like mime types? - match fs::metadata(&event_path) { - Ok(new_metadata) => match &mut item - .metadata - { - ItemMetadata::Path { + match fs::metadata(event_path) { + Ok(new_metadata) => { + if let ItemMetadata::Path { metadata, .. - } => *metadata = new_metadata, - _ => {} - }, + } = &mut item.metadata + { + *metadata = new_metadata + } + } + Err(err) => { log::warn!("failed to reload metadata for {:?}: {}", path, err); } @@ -2423,43 +2417,32 @@ impl Application for App { Message::OpenItemLocation(entity_opt) => { return Task::batch(self.selected_paths(entity_opt).into_iter().filter_map( |path| { - if let Some(parent) = path.parent() { - Some(self.open_tab( - Location::Path(parent.to_path_buf()), - true, - Some(vec![path]), - )) - } else { - None - } + path.parent().map(Path::to_path_buf).map(|parent| { + self.open_tab(Location::Path(parent), true, Some(vec![path])) + }) }, )) } Message::OpenWithBrowse => match self.dialog_pages.pop_front() { Some(DialogPage::OpenWith { - mime, store_opt, .. + mime, + store_opt: Some(app), + .. }) => { - if let Some(app) = store_opt { - let url = format!("mime:///{mime}"); - if let Some(mut command) = app.command(Some(url.clone().into())) { - match spawn_detached(&mut command) { - Ok(()) => {} - Err(err) => { - log::warn!( - "failed to open {:?} with {:?}: {}", - url, - app.id, - err - ) - } + let url = format!("mime:///{mime}"); + if let Some(mut command) = app.command(Some(url.clone().into())) { + match spawn_detached(&mut command) { + Ok(()) => {} + Err(err) => { + log::warn!("failed to open {:?} with {:?}: {}", url, app.id, err) } - } else { - log::warn!( - "failed to open {:?} with {:?}: failed to get command", - url, - app.id - ); } + } else { + log::warn!( + "failed to open {:?} with {:?}: failed to get command", + url, + app.id + ); } } Some(dialog_page) => { @@ -2542,7 +2525,7 @@ impl Application for App { Message::PendingCancelAll => { for (id, (_, controller)) in self.pending_operations.iter() { controller.cancel(); - self.progress_operations.remove(&id); + self.progress_operations.remove(id); } } Message::PendingComplete(id, op_sel) => { @@ -2636,12 +2619,14 @@ impl Application for App { let selected_paths = self.selected_paths(entity_opt); let mut commands = Vec::with_capacity(selected_paths.len()); for path in selected_paths { - let mut settings = window::Settings::default(); - settings.decorations = true; - settings.min_size = Some(Size::new(360.0, 180.0)); - settings.resizable = true; - settings.size = Size::new(480.0, 600.0); - settings.transparent = true; + let mut settings = window::Settings { + decorations: true, + min_size: Some(Size::new(360.0, 180.0)), + resizable: true, + size: Size::new(480.0, 600.0), + transparent: true, + ..Default::default() + }; #[cfg(target_os = "linux")] { @@ -2982,17 +2967,14 @@ impl Application for App { return self.open_tab(location, true, None); } Message::TabRescan(entity, location, parent_item_opt, items, selection_paths) => { - match self.tab_model.data_mut::(entity) { - Some(tab) => { - if location == tab.location { - tab.parent_item_opt = parent_item_opt; - tab.set_items(items); - if let Some(selection_paths) = selection_paths { - tab.select_paths(selection_paths); - } + if let Some(tab) = self.tab_model.data_mut::(entity) { + if location == tab.location { + tab.parent_item_opt = parent_item_opt; + tab.set_items(items); + if let Some(selection_paths) = selection_paths { + tab.select_paths(selection_paths); } } - _ => (), } } Message::TabView(entity_opt, view) => { @@ -3275,26 +3257,23 @@ impl Application for App { // Applies selected nav bar context menu operation. Message::NavMenuAction(action) => match action { NavMenuAction::Open(entity) => { - match self + if let Some(path) = self .nav_model .data::(entity) .and_then(|x| x.path_opt()) .map(|x| x.to_path_buf()) { - Some(path) => { - self.open_file(&path); - } - None => {} + self.open_file(&path); } } NavMenuAction::OpenWith(entity) => { - match self + if let Some(path) = self .nav_model .data::(entity) .and_then(|x| x.path_opt()) .map(|x| x.to_path_buf()) { - Some(path) => match tab::item_from_path(&path, IconSizes::default()) { + match tab::item_from_path(&path, IconSizes::default()) { Ok(item) => { return self.update(Message::DialogPush(DialogPage::OpenWith { path: path.to_path_buf(), @@ -3311,8 +3290,7 @@ impl Application for App { Err(err) => { log::warn!("failed to get item for path {:?}: {}", path, err); } - }, - None => {} + } } } NavMenuAction::OpenInNewTab(entity) => { @@ -3329,8 +3307,7 @@ impl Application for App { // Open the selected path in a new cosmic-files window. NavMenuAction::OpenInNewWindow(entity) => { - if let Some(&Location::Path(ref path)) = self.nav_model.data::(entity) - { + if let Some(Location::Path(path)) = self.nav_model.data::(entity) { match env::current_exe() { Ok(exe) => match process::Command::new(&exe).arg(path).spawn() { Ok(_child) => {} @@ -3391,16 +3368,15 @@ impl Application for App { log::info!("output {}: created", output.id()); let surface_id = WindowId::unique(); - match self.surface_ids.insert(output.clone(), surface_id) { - Some(old_surface_id) => { - //TODO: remove old surface? - log::warn!( - "output {}: already had surface ID {:?}", - output.id(), - old_surface_id - ); - } - None => {} + if let Some(old_surface_id) = + self.surface_ids.insert(output.clone(), surface_id) + { + //TODO: remove old surface? + log::warn!( + "output {}: already had surface ID {:?}", + output.id(), + old_surface_id + ); } let display = match output_info_opt { @@ -3470,7 +3446,7 @@ impl Application for App { } Message::Cosmic(cosmic) => { // Forward cosmic messages - return Task::perform(async move { cosmic }, |cosmic| message::cosmic(cosmic)); + return Task::perform(async move { cosmic }, message::cosmic); } Message::None => {} #[cfg(all(feature = "desktop", feature = "wayland"))] @@ -4148,7 +4124,7 @@ impl Application for App { let running = count; // Adjust the progress bar so it does not jump around when operations finish for id in self.progress_operations.iter() { - if self.complete_operations.contains_key(&id) { + if self.complete_operations.contains_key(id) { total_progress += 1.0; count += 1; } @@ -4241,8 +4217,7 @@ impl Application for App { self.tab_model.active_data::(), &self.config, &self.key_binds, - ) - .into()] + )] } fn header_end(&self) -> Vec> { @@ -4371,16 +4346,16 @@ impl Application for App { return if let Some(margin) = self.margin.get(&id) { if margin.0 >= 0. || margin.2 >= 0. { tab_column = widget::column::with_children(vec![ - vertical_space().height(margin.0 as f32).into(), + vertical_space().height(margin.0).into(), tab_column.into(), - vertical_space().height(margin.2 as f32).into(), + vertical_space().height(margin.2).into(), ]) } if margin.1 >= 0. || margin.3 >= 0. { Element::from(widget::row::with_children(vec![ - horizontal_space().width(margin.1 as f32).into(), + horizontal_space().width(margin.1).into(), tab_column.into(), - horizontal_space().width(margin.3 as f32).into(), + horizontal_space().width(margin.3).into(), ])) } else { tab_column.into() @@ -4748,7 +4723,6 @@ pub(crate) mod test_utils { use crate::{ config::{IconSizes, TabConfig}, - mounter::MounterMap, tab::Item, }; @@ -4986,8 +4960,8 @@ pub(crate) mod test_utils { assert!( entries .into_iter() - .zip(tab.items_opt().clone().unwrap_or(&empty)) - .all(|(a, b)| eq_path_item(&a, &b)), + .zip(tab.items_opt().unwrap_or(&empty)) + .all(|(a, b)| eq_path_item(&a, b)), "Path ({}) and Tab path ({}) don't have equal contents", path.display(), tab_path.display() diff --git a/src/mime_app.rs b/src/mime_app.rs index 5e2556b..ca6588f 100644 --- a/src/mime_app.rs +++ b/src/mime_app.rs @@ -278,12 +278,12 @@ impl MimeAppCache { pub fn get(&self, key: &Mime) -> &[MimeApp] { static EMPTY: Vec = Vec::new(); - self.cache.get(key).unwrap_or_else(|| &EMPTY) + self.cache.get(key).unwrap_or(&EMPTY) } pub fn icons(&self, key: &Mime) -> &[widget::icon::Handle] { static EMPTY: Vec = Vec::new(); - self.icons.get(key).unwrap_or_else(|| &EMPTY) + self.icons.get(key).unwrap_or(&EMPTY) } pub fn terminal(&self) -> Option<&MimeApp> { @@ -348,3 +348,9 @@ impl MimeAppCache { } } } + +impl Default for MimeAppCache { + fn default() -> Self { + Self::new() + } +} From f43f500302537c9558d7bd29f1d2ba1ca9b0452e Mon Sep 17 00:00:00 2001 From: mkljczk Date: Fri, 24 Jan 2025 17:28:53 +0100 Subject: [PATCH 34/35] Do not display already-exists message when name isn't changed Signed-off-by: mkljczk --- src/app.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index e97b2d8..fc53e09 100644 --- a/src/app.rs +++ b/src/app.rs @@ -3962,7 +3962,7 @@ impl Application for App { None } else { let path = parent.join(name); - if path.exists() { + if from != &path && path.exists() { if path.is_dir() { dialog = dialog .tertiary_action(widget::text::body(fl!("folder-already-exists"))); From c89d877b526bca1a0d7530df996cd31bc76bc7ac Mon Sep 17 00:00:00 2001 From: mkljczk Date: Fri, 3 Jan 2025 12:10:17 +0100 Subject: [PATCH 35/35] Focus text input when in NetworkAuth modal Signed-off-by: mkljczk --- src/app.rs | 95 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 53 insertions(+), 42 deletions(-) diff --git a/src/app.rs b/src/app.rs index fc53e09..0da8707 100644 --- a/src/app.rs +++ b/src/app.rs @@ -2212,6 +2212,7 @@ impl Application for App { auth, auth_tx, }); + return widget::text_input::focus(self.dialog_text_input.clone()); } Message::NetworkDriveInput(input) => { self.network_drive_input = input; @@ -3689,61 +3690,71 @@ impl Application for App { } => { //TODO: use URI! let mut controls = Vec::with_capacity(4); + let mut id_assigned = false; + if let Some(username) = &auth.username_opt { //TODO: what should submit do? - controls.push( - widget::text_input(fl!("username"), username) - .on_input(move |value| { - Message::DialogUpdate(DialogPage::NetworkAuth { - mounter_key: *mounter_key, - uri: uri.clone(), - auth: MounterAuth { - username_opt: Some(value), - ..auth.clone() - }, - auth_tx: auth_tx.clone(), - }) + let mut input = widget::text_input(fl!("username"), username) + .on_input(move |value| { + Message::DialogUpdate(DialogPage::NetworkAuth { + mounter_key: *mounter_key, + uri: uri.clone(), + auth: MounterAuth { + username_opt: Some(value), + ..auth.clone() + }, + auth_tx: auth_tx.clone(), }) - .into(), - ); + }); + if !id_assigned { + input = input.id(self.dialog_text_input.clone()); + id_assigned = true; + } + controls.push(input.into()); } + if let Some(domain) = &auth.domain_opt { //TODO: what should submit do? - controls.push( - widget::text_input(fl!("domain"), domain) - .on_input(move |value| { - Message::DialogUpdate(DialogPage::NetworkAuth { - mounter_key: *mounter_key, - uri: uri.clone(), - auth: MounterAuth { - domain_opt: Some(value), - ..auth.clone() - }, - auth_tx: auth_tx.clone(), - }) + let mut input = widget::text_input(fl!("domain"), domain) + .on_input(move |value| { + Message::DialogUpdate(DialogPage::NetworkAuth { + mounter_key: *mounter_key, + uri: uri.clone(), + auth: MounterAuth { + domain_opt: Some(value), + ..auth.clone() + }, + auth_tx: auth_tx.clone(), }) - .into(), - ); + }); + if !id_assigned { + input = input.id(self.dialog_text_input.clone()); + id_assigned = true; + } + controls.push(input.into()); } + if let Some(password) = &auth.password_opt { //TODO: what should submit do? //TODO: button for showing password - controls.push( - widget::secure_input(fl!("password"), password, None, true) - .on_input(move |value| { - Message::DialogUpdate(DialogPage::NetworkAuth { - mounter_key: *mounter_key, - uri: uri.clone(), - auth: MounterAuth { - password_opt: Some(value), - ..auth.clone() - }, - auth_tx: auth_tx.clone(), - }) + let mut input = widget::secure_input(fl!("password"), password, None, true) + .on_input(move |value| { + Message::DialogUpdate(DialogPage::NetworkAuth { + mounter_key: *mounter_key, + uri: uri.clone(), + auth: MounterAuth { + password_opt: Some(value), + ..auth.clone() + }, + auth_tx: auth_tx.clone(), }) - .into(), - ); + }); + if !id_assigned { + input = input.id(self.dialog_text_input.clone()); + } + controls.push(input.into()); } + if let Some(remember) = &auth.remember_opt { //TODO: what should submit do? //TODO: button for showing password