-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
USB Portal #210
base: master
Are you sure you want to change the base?
USB Portal #210
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,8 @@ | |
"--share=ipc", | ||
"--socket=wayland", | ||
"--device=dri", | ||
"--own-name=com.belmoussaoui.ashpd.demo", | ||
"--usb=all", | ||
"--env=RUST_LOG=ashpd_demo=debug,ashpd=debug", | ||
"--env=G_MESSAGES_DEBUG=none", | ||
"--env=RUST_BACKTRACE=1" | ||
|
@@ -30,6 +32,16 @@ | |
] | ||
}, | ||
"modules": [ | ||
{ | ||
"name": "libusb", | ||
bilelmoussaoui marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"sources": [ | ||
{ | ||
"type": "archive", | ||
"url": "https://github.com/libusb/libusb/releases/download/v1.0.27/libusb-1.0.27.tar.bz2", | ||
"sha256": "ffaa41d741a8a3bee244ac8e54a72ea05bf2879663c098c82fc5757853441575" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "libshumate", | ||
"buildsystem": "meson", | ||
|
@@ -50,14 +62,15 @@ | |
{ | ||
"name": "ashpd-demo", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I rather have a change that puts the manifest in ./ and see if that helps? :) |
||
"buildsystem": "meson", | ||
"subdir": "ashpd-demo", | ||
"run-tests": true, | ||
"config-opts": [ | ||
"-Dprofile=development" | ||
], | ||
"sources": [ | ||
{ | ||
"type": "dir", | ||
"path": "../" | ||
"path": "../.." | ||
} | ||
] | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<interface> | ||
<template class="UsbPage" parent="PortalPage"> | ||
<child> | ||
<object class="AdwClamp"> | ||
<child> | ||
<object class="GtkBox"> | ||
<property name="hexpand">True</property> | ||
<property name="spacing">12</property> | ||
<property name="orientation">vertical</property> | ||
<child> | ||
<object class="AdwPreferencesGroup" id="usb_devices"> | ||
<property name="title" translatable="yes">Device Access</property> | ||
<property name="description" translatable="yes">Calls AcquireDevices or ReleaseDevices on org.freedesktop.portal.Usb.</property> | ||
<property name="header-suffix"> | ||
<object class="GtkButton"> | ||
<property name="label" translatable="yes">Refresh</property> | ||
<property name="icon-name">view-refresh-symbolic</property> | ||
<property name="action-name">usb.refresh</property> | ||
</object> | ||
</property> | ||
</object> | ||
</child> | ||
<child> | ||
<object class="GtkBox"> | ||
<property name="orientation">horizontal</property> | ||
<child> | ||
<object class="GtkButton"> | ||
<property name="label">_Start Session</property> | ||
<property name="use-underline">True</property> | ||
<property name="halign">start</property> | ||
<property name="action-name">usb.start_session</property> | ||
<style> | ||
<class name="pill" /> | ||
<class name="suggested-action" /> | ||
</style> | ||
</object> | ||
</child> | ||
<child> | ||
<object class="GtkButton"> | ||
<property name="label">_Stop Session</property> | ||
<property name="use-underline">True</property> | ||
<property name="sensitive">false</property> | ||
<property name="halign">end</property> | ||
<property name="hexpand">true</property> | ||
<property name="action-name">usb.stop_session</property> | ||
<style> | ||
<class name="pill" /> | ||
<class name="destructive-action" /> | ||
</style> | ||
</object> | ||
</child> | ||
</object> | ||
</child> | ||
</object> | ||
</child> | ||
<style> | ||
<class name="page-content" /> | ||
</style> | ||
</object> | ||
</child> | ||
</template> | ||
</interface> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<interface> | ||
<template class="UsbDeviceRow" parent="AdwActionRow"> | ||
<child type="prefix"> | ||
<object class="GtkCheckButton" id="checkbox"> | ||
<property name="sensitive">false</property> | ||
</object> | ||
</child> | ||
<child type="suffix"> | ||
<object class="GtkBox" id="box1"> | ||
<property name="margin-top">6</property> | ||
<property name="margin-bottom">6</property> | ||
<style> | ||
<class name="linked" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In think the consensus is that we want to avoid linked buttons whenever possible. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. link (to the documentation) ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is none, ask in the #design:gnome.org room if you would like more context. |
||
</style> | ||
<child> | ||
<object class="GtkButton" id="acquire"> | ||
<signal name="clicked" handler="handle_acquire_clicked" swapped="true" /> | ||
<property name="icon-name">preferences-system-sharing-symbolic</property> | ||
</object> | ||
</child> | ||
<child type="suffix"> | ||
<object class="GtkButton" id="release"> | ||
<signal name="clicked" handler="handle_release_clicked" swapped="true"/> | ||
<property name="icon-name">process-stop-symbolic</property> | ||
</object> | ||
</child> | ||
</object> | ||
</child> | ||
</template> | ||
</interface> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this needed? Isn't this only to own names for app ids which don't match the app id?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use this build using
fenv
, and that allow to build and run the non "Devel" version. It's not required for this PR per see (hint it's still in draft).