Skip to content

Commit

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

Allow using the chooser for initiating sharing from the main window, as
well as handling `GApplication::open` events.
  • Loading branch information
andyholmes committed Apr 14, 2024
1 parent 40260ef commit 4fc4a30
Show file tree
Hide file tree
Showing 21 changed files with 1,693 additions and 609 deletions.
5 changes: 4 additions & 1 deletion po/POTFILES.in
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,13 @@ src/plugins/sftp/sftp.plugin.desktop.in
src/plugins/sftp/valent-sftp-plugin.c
src/plugins/sftp/valent-sftp-preferences.ui
src/plugins/share/share.plugin.desktop.in
src/plugins/share/valent-share-dialog.c
src/plugins/share/valent-share-dialog.ui
src/plugins/share/valent-share-dialog-row.c
src/plugins/share/valent-share-dialog-row.ui
src/plugins/share/valent-share-plugin.c
src/plugins/share/valent-share-preferences.c
src/plugins/share/valent-share-preferences.ui
src/plugins/share/valent-share-target-chooser.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
5 changes: 5 additions & 0 deletions src/libvalent/ui/valent-window.ui
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@
<attribute name="label" translatable="yes">Media Remote</attribute>
<attribute name="action">app.media-remote</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Share…</attribute>
<attribute name="action">app.share-dialog</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
</section>
<section>
<item>
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/share/data/share-file-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/plugins/share/data/share-link-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/plugins/share/data/share-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/plugins/share/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ plugin_share_deps = [
# Sources
plugin_share_sources = files([
'share-plugin.c',
'valent-share-dialog.c',
'valent-share-dialog-row.c',
'valent-share-download.c',
'valent-share-plugin.c',
'valent-share-preferences.c',
'valent-share-target.c',
'valent-share-target-chooser.c',
'valent-share-text-dialog.c',
'valent-share-upload.c',
])
Expand Down
6 changes: 5 additions & 1 deletion src/plugins/share/share.gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@
<gresources>
<gresource prefix="/plugins/share">
<file>share.plugin</file>
<file preprocess="xml-stripblanks">valent-share-dialog.ui</file>
<file preprocess="xml-stripblanks">valent-share-dialog-row.ui</file>
<file preprocess="xml-stripblanks">valent-share-preferences.ui</file>
<file preprocess="xml-stripblanks">valent-share-target-chooser.ui</file>
<file preprocess="xml-stripblanks">valent-share-text-dialog.ui</file>
</gresource>
<gresource prefix="/ca/andyholmes/Valent/icons">
<file preprocess="xml-stripblanks" alias="scalable/actions/document-send-symbolic.svg">data/document-send-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="scalable/actions/share-file-symbolic.svg">data/share-file-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="scalable/actions/share-link-symbolic.svg">data/share-link-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="scalable/actions/share-symbolic.svg">data/share-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="scalable/apps/valent-share-plugin-symbolic.svg">data/valent-share-plugin-symbolic.svg</file>
</gresource>
</gresources>
Expand Down
Loading

0 comments on commit 4fc4a30

Please sign in to comment.