-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added UI for USB - Added rusb to the crates. - Added libusb to the manifest. Signed-off-by: Hubert Figuière <[email protected]>
- Loading branch information
Showing
11 changed files
with
544 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?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" /> | ||
</style> | ||
<child> | ||
<object class="GtkButton" id="acquire"> | ||
<property name="icon-name">preferences-system-sharing-symbolic</property> | ||
</object> | ||
</child> | ||
<child type="suffix"> | ||
<object class="GtkButton" id="release"> | ||
<property name="icon-name">process-stop-symbolic</property> | ||
</object> | ||
</child> | ||
</object> | ||
</child> | ||
</template> | ||
</interface> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.