Skip to content

Commit

Permalink
refactor(share): remake the share chooser
Browse files Browse the repository at this point in the history
Port `ValentShareTargetChooser` to `AdwToolbarView` and other
toolkit updates.

Allow using the chooser for initiating sharing, as well as
handling `GApplication::open` events.
  • Loading branch information
andyholmes committed Oct 1, 2023
1 parent 5e3730a commit 685ae12
Show file tree
Hide file tree
Showing 17 changed files with 1,390 additions and 264 deletions.
2 changes: 2 additions & 0 deletions po/POTFILES.in
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ src/plugins/share/valent-share-preferences.c
src/plugins/share/valent-share-preferences.ui
src/plugins/share/valent-share-target-chooser.c
src/plugins/share/valent-share-target-chooser.ui
src/plugins/share/valent-share-target-row.c
src/plugins/share/valent-share-target-row.ui
src/plugins/share/valent-share-text-dialog.c
src/plugins/share/valent-share-text-dialog.ui
src/plugins/sms/sms.plugin.desktop.in
Expand Down
53 changes: 42 additions & 11 deletions po/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: valent\n"
"Report-Msgid-Bugs-To: https://github.com/andyholmes/valent/issues\n"
"POT-Creation-Date: 2023-09-29 20:31-0700\n"
"POT-Creation-Date: 2023-09-30 20:16-0700\n"
"PO-Revision-Date: 2022-03-28 11:21-0700\n"
"Last-Translator: Andy Holmes <[email protected]>\n"
"Language-Team: English <[email protected]>\n"
Expand Down Expand Up @@ -464,7 +464,8 @@ msgid "Main Menu"
msgstr ""

#: src/libvalent/ui/valent-window.ui:85 src/libvalent/ui/valent-window.ui:100
#: src/plugins/share/valent-share-target-chooser.ui:68
#: src/plugins/share/valent-share-target-chooser.ui:161
#: src/plugins/share/valent-share-target-chooser.ui:178
msgid "Devices"
msgstr ""

Expand Down Expand Up @@ -736,7 +737,6 @@ msgstr ""

#: src/plugins/notification/valent-notification-dialog.ui:19
#: src/plugins/runcommand/valent-runcommand-editor.ui:17
#: src/plugins/share/valent-share-target-chooser.ui:22
msgid "_Cancel"
msgstr ""

Expand Down Expand Up @@ -1034,11 +1034,14 @@ msgstr[0] ""
msgstr[1] ""

#: src/plugins/share/valent-share-plugin.c:671
#: src/plugins/share/valent-share-target-chooser.ui:8
msgid "Share Files"
msgstr ""

#: src/plugins/share/valent-share-plugin.c:672
#: src/plugins/share/valent-share-target-chooser.ui:8
#: src/plugins/share/valent-share-target-chooser.ui:29
#: src/plugins/share/valent-share-target-chooser.ui:40
#: src/plugins/share/valent-share-target-chooser.ui:112
msgid "Share"
msgstr ""

Expand All @@ -1058,20 +1061,48 @@ msgstr ""
msgid "Where received files are stored"
msgstr ""

#: src/plugins/share/valent-share-target-chooser.ui:29
msgid "_Share"
#: src/plugins/share/valent-share-target-chooser.c:261
#, c-format
msgid "Size: %s"
msgstr ""

#: src/plugins/share/valent-share-target-chooser.c:294
#, c-format
msgid "%u files and links"
msgstr ""

#: src/plugins/share/valent-share-target-chooser.c:305
#, c-format
msgid "%u files"
msgstr ""

#: src/plugins/share/valent-share-target-chooser.c:315
#, c-format
msgid "%u links"
msgstr ""

#: src/plugins/share/valent-share-target-chooser.ui:41
msgid "Select files, enter a link or paste text"
msgstr ""

#: src/plugins/share/valent-share-target-chooser.ui:58
msgid "Choose a device to share the selected files with."
#: src/plugins/share/valent-share-target-chooser.ui:50
msgid "Pick Files"
msgstr ""

#: src/plugins/share/valent-share-target-chooser.ui:86
#: src/plugins/share/valent-share-target-chooser.ui:75
msgid "Enter URL"
msgstr ""

#: src/plugins/share/valent-share-target-chooser.ui:165
msgid "Share with multiple devices"
msgstr ""

#: src/plugins/share/valent-share-target-chooser.ui:192
msgid "Searching…"
msgstr ""

#: src/plugins/share/valent-share-target-chooser.ui:128
msgid "Always use this device"
#: src/plugins/share/valent-share-target-chooser.ui:215
msgid "_Share"
msgstr ""

#: src/plugins/share/valent-share-text-dialog.c:98
Expand Down
68 changes: 54 additions & 14 deletions po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: valent\n"
"Report-Msgid-Bugs-To: https://github.com/andyholmes/valent/issues\n"
"POT-Creation-Date: 2023-09-29 20:31-0700\n"
"POT-Creation-Date: 2023-09-30 20:16-0700\n"
"PO-Revision-Date: 2023-03-04 17:28+0100\n"
"Last-Translator: Valérie Roux <[email protected]>\n"
"Language-Team: French <[email protected]>\n"
Expand Down Expand Up @@ -483,7 +483,8 @@ msgid "Main Menu"
msgstr "Nom de l'appareil"

#: src/libvalent/ui/valent-window.ui:85 src/libvalent/ui/valent-window.ui:100
#: src/plugins/share/valent-share-target-chooser.ui:68
#: src/plugins/share/valent-share-target-chooser.ui:161
#: src/plugins/share/valent-share-target-chooser.ui:178
msgid "Devices"
msgstr "Appareils"

Expand Down Expand Up @@ -770,7 +771,6 @@ msgstr "Notification"

#: src/plugins/notification/valent-notification-dialog.ui:19
#: src/plugins/runcommand/valent-runcommand-editor.ui:17
#: src/plugins/share/valent-share-target-chooser.ui:22
msgid "_Cancel"
msgstr "Annuler"

Expand Down Expand Up @@ -1090,11 +1090,14 @@ msgstr[0] "Un fichier envoyé vers %1$s"
msgstr[1] "%2$d fichiers envoyés vers %1$s"

#: src/plugins/share/valent-share-plugin.c:671
#: src/plugins/share/valent-share-target-chooser.ui:8
msgid "Share Files"
msgstr "Partager des fichiers"

#: src/plugins/share/valent-share-plugin.c:672
#: src/plugins/share/valent-share-target-chooser.ui:8
#: src/plugins/share/valent-share-target-chooser.ui:29
#: src/plugins/share/valent-share-target-chooser.ui:40
#: src/plugins/share/valent-share-target-chooser.ui:112
msgid "Share"
msgstr "Partager"

Expand All @@ -1114,21 +1117,52 @@ msgstr "Dossier de téléchargement"
msgid "Where received files are stored"
msgstr "Où les fichiers entrants sont stockés"

#: src/plugins/share/valent-share-target-chooser.ui:29
msgid "_Share"
msgstr "Partager"
#: src/plugins/share/valent-share-target-chooser.c:261
#, c-format
msgid "Size: %s"
msgstr ""

#: src/plugins/share/valent-share-target-chooser.c:294
#, c-format
msgid "%u files and links"
msgstr ""

#: src/plugins/share/valent-share-target-chooser.c:305
#, fuzzy, c-format
msgid "%u files"
msgstr "Tous les fichiers"

#: src/plugins/share/valent-share-target-chooser.c:315
#, c-format
msgid "%u links"
msgstr ""

#: src/plugins/share/valent-share-target-chooser.ui:41
#, fuzzy
msgid "Select files, enter a link or paste text"
msgstr "Partagez des fichiers, des liens et du texte"

#: src/plugins/share/valent-share-target-chooser.ui:58
msgid "Choose a device to share the selected files with."
msgstr "Choisissez un appareil auquel partager les fichiers seléctionnés."
#: src/plugins/share/valent-share-target-chooser.ui:50
#, fuzzy
msgid "Pick Files"
msgstr "Système de fichiers local"

#: src/plugins/share/valent-share-target-chooser.ui:75
msgid "Enter URL"
msgstr ""

#: src/plugins/share/valent-share-target-chooser.ui:86
#: src/plugins/share/valent-share-target-chooser.ui:165
#, fuzzy
msgid "Share with multiple devices"
msgstr "Prendre une photo avec l'appareil distant"

#: src/plugins/share/valent-share-target-chooser.ui:192
msgid "Searching…"
msgstr "Recherche..."

#: src/plugins/share/valent-share-target-chooser.ui:128
msgid "Always use this device"
msgstr "Toujours utiliser cet appareil"
#: src/plugins/share/valent-share-target-chooser.ui:215
msgid "_Share"
msgstr "Partager"

#: src/plugins/share/valent-share-text-dialog.c:98
#: src/plugins/share/valent-share-text-dialog.ui:54
Expand Down Expand Up @@ -1363,5 +1397,11 @@ msgstr "Portails"
msgid "Integration with desktop portals"
msgstr "Intégration avec les portails de bureau"

#~ msgid "Always use this device"
#~ msgstr "Toujours utiliser cet appareil"

#~ msgid "Choose a device to share the selected files with."
#~ msgstr "Choisissez un appareil auquel partager les fichiers seléctionnés."

#~ msgid "Applications"
#~ msgstr "Applications"
60 changes: 47 additions & 13 deletions po/nl.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: valent\n"
"Report-Msgid-Bugs-To: https://github.com/andyholmes/valent/issues\n"
"POT-Creation-Date: 2023-09-29 20:31-0700\n"
"POT-Creation-Date: 2023-09-30 20:16-0700\n"
"PO-Revision-Date: 2022-09-12 19:59+0200\n"
"Last-Translator: Heimen Stoffels <[email protected]>\n"
"Language-Team: Dutch\n"
Expand Down Expand Up @@ -477,7 +477,8 @@ msgid "Main Menu"
msgstr "Apparaatnaam"

#: src/libvalent/ui/valent-window.ui:85 src/libvalent/ui/valent-window.ui:100
#: src/plugins/share/valent-share-target-chooser.ui:68
#: src/plugins/share/valent-share-target-chooser.ui:161
#: src/plugins/share/valent-share-target-chooser.ui:178
msgid "Devices"
msgstr "Apparaten"

Expand Down Expand Up @@ -764,7 +765,6 @@ msgstr "Melding"

#: src/plugins/notification/valent-notification-dialog.ui:19
#: src/plugins/runcommand/valent-runcommand-editor.ui:17
#: src/plugins/share/valent-share-target-chooser.ui:22
msgid "_Cancel"
msgstr "_Annuleren"

Expand Down Expand Up @@ -1085,11 +1085,14 @@ msgstr[0] "Eén bestand verstuurd naar %1$s"
msgstr[1] "%2$d bestanden verstuurd naar %1$s"

#: src/plugins/share/valent-share-plugin.c:671
#: src/plugins/share/valent-share-target-chooser.ui:8
msgid "Share Files"
msgstr "Bestanden delen"

#: src/plugins/share/valent-share-plugin.c:672
#: src/plugins/share/valent-share-target-chooser.ui:8
#: src/plugins/share/valent-share-target-chooser.ui:29
#: src/plugins/share/valent-share-target-chooser.ui:40
#: src/plugins/share/valent-share-target-chooser.ui:112
msgid "Share"
msgstr "Delen"

Expand All @@ -1109,23 +1112,54 @@ msgstr "Downloadmap"
msgid "Where received files are stored"
msgstr "Waar ontvangen bestanden dienen te worden opgeslagen"

#: src/plugins/share/valent-share-target-chooser.ui:29
#: src/plugins/share/valent-share-target-chooser.c:261
#, c-format
msgid "Size: %s"
msgstr ""

#: src/plugins/share/valent-share-target-chooser.c:294
#, c-format
msgid "%u files and links"
msgstr ""

#: src/plugins/share/valent-share-target-chooser.c:305
#, fuzzy, c-format
msgid "%u files"
msgstr "Alle bestanden"

#: src/plugins/share/valent-share-target-chooser.c:315
#, c-format
msgid "%u links"
msgstr ""

#: src/plugins/share/valent-share-target-chooser.ui:41
#, fuzzy
msgid "_Share"
msgstr "Delen"
msgid "Select files, enter a link or paste text"
msgstr "Deel bestanden, links en tekst"

#: src/plugins/share/valent-share-target-chooser.ui:50
#, fuzzy
msgid "Pick Files"
msgstr "Lokaal bestandssysteem"

#: src/plugins/share/valent-share-target-chooser.ui:58
msgid "Choose a device to share the selected files with."
#: src/plugins/share/valent-share-target-chooser.ui:75
msgid "Enter URL"
msgstr ""

#: src/plugins/share/valent-share-target-chooser.ui:86
#: src/plugins/share/valent-share-target-chooser.ui:165
#, fuzzy
msgid "Share with multiple devices"
msgstr "Maak een foto met het externe apparaat"

#: src/plugins/share/valent-share-target-chooser.ui:192
#, fuzzy
msgid "Searching…"
msgstr "Bezig met zoeken naar apparaten…"

#: src/plugins/share/valent-share-target-chooser.ui:128
msgid "Always use this device"
msgstr ""
#: src/plugins/share/valent-share-target-chooser.ui:215
#, fuzzy
msgid "_Share"
msgstr "Delen"

#: src/plugins/share/valent-share-text-dialog.c:98
#: src/plugins/share/valent-share-text-dialog.ui:54
Expand Down
Loading

0 comments on commit 685ae12

Please sign in to comment.