This should significantly simplify these panels, by not forcing them to override GObject.constructed all the time. Most panels were quite straightfoward.
514 lines
28 KiB
XML
514 lines
28 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<interface>
|
|
<template class="CcBoltPanel" parent="CcPanel">
|
|
|
|
<!-- Headerbar entries -->
|
|
<child type="titlebar-end">
|
|
<object class="GtkBox" id="headerbar_box">
|
|
<property name="visible">False</property>
|
|
<property name="spacing">6</property>
|
|
<property name="halign">end</property>
|
|
<child>
|
|
<object class="GtkLockButton" id="lock_button">
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<child type="content">
|
|
<object class="GtkOverlay">
|
|
<child type="overlay">
|
|
<object class="GtkRevealer" id="notification_revealer">
|
|
<property name="halign">center</property>
|
|
<property name="valign">start</property>
|
|
<property name="transition_type">slide-down</property>
|
|
<child>
|
|
<object class="GtkFrame">
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="spacing">12</property>
|
|
<child>
|
|
<object class="GtkLabel" id="notification_label">
|
|
<property name="use_markup">True</property>
|
|
<property name="wrap">True</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkButton">
|
|
<property name="can_focus">True</property>
|
|
<style>
|
|
<class name="flat" />
|
|
</style>
|
|
<signal name="clicked"
|
|
handler="on_notification_button_clicked_cb"
|
|
object="CcBoltPanel"
|
|
swapped="no" />
|
|
<child>
|
|
<object class="GtkImage">
|
|
<property name="icon-name">window-close-symbolic</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
<style>
|
|
<class name="app-notification" />
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkStack" id="container">
|
|
<property name="hhomogeneous">False</property>
|
|
<property name="vhomogeneous">False</property>
|
|
<property name="transition_type">crossfade</property>
|
|
|
|
<!-- Spinner for when we are creating -->
|
|
<child>
|
|
<object class="GtkStackPage">
|
|
<property name="name">loading</property>
|
|
<property name="child">
|
|
<object class="GtkCenterBox">
|
|
<property name="hexpand">True</property>
|
|
<property name="vexpand">True</property>
|
|
<property name="halign">center</property>
|
|
<property name="valign">center</property>
|
|
<property name="orientation">vertical</property>
|
|
<property name="margin-top">18</property>
|
|
<property name="margin-bottom">18</property>
|
|
<property name="margin-start">18</property>
|
|
<property name="margin-end">18</property>
|
|
<child type="center">
|
|
<object class="GtkSpinner" id="loading-spinner">
|
|
<property name="spinning">True</property>
|
|
<property name="hexpand">True</property>
|
|
<property name="vexpand">True</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- No tunderbolt -->
|
|
|
|
<child>
|
|
<object class="GtkStackPage">
|
|
<property name="name">no-thunderbolt</property>
|
|
<property name="child">
|
|
<object class="GtkCenterBox">
|
|
<property name="hexpand">True</property>
|
|
<property name="vexpand">True</property>
|
|
<property name="halign">center</property>
|
|
<property name="valign">center</property>
|
|
<property name="orientation">vertical</property>
|
|
<property name="margin-top">18</property>
|
|
<property name="margin-bottom">18</property>
|
|
<property name="margin-start">18</property>
|
|
<property name="margin-end">18</property>
|
|
<child type="center" >
|
|
<object class="GtkGrid">
|
|
<property name="margin_start">12</property>
|
|
<property name="margin_end">6</property>
|
|
<property name="margin_top">12</property>
|
|
<property name="margin_bottom">12</property>
|
|
<property name="row_spacing">12</property>
|
|
<property name="column_spacing">24</property>
|
|
|
|
<child>
|
|
<object class="GtkImage">
|
|
<property name="icon_name">thunderbolt-symbolic</property>
|
|
<property name="pixel_size">96</property>
|
|
<layout>
|
|
<property name="column">0</property>
|
|
<property name="row">0</property>
|
|
<property name="row-span">2</property>
|
|
</layout>
|
|
<style>
|
|
<class name="dim-label" />
|
|
</style>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkLabel" id="notb_caption">
|
|
<property name="wrap">True</property>
|
|
<property name="xalign">0</property>
|
|
<property name="label" translatable="yes">No Thunderbolt support</property>
|
|
<layout>
|
|
<property name="column">1</property>
|
|
<property name="row">0</property>
|
|
</layout>
|
|
<attributes>
|
|
<attribute name="scale" value="1.2" />
|
|
</attributes>
|
|
<style>
|
|
<class name="dim-label" />
|
|
</style>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkLabel" id="notb_details">
|
|
<property name="hexpand">True</property>
|
|
<property name="max-width-chars">40</property>
|
|
<property name="use_markup">True</property>
|
|
<property name="xalign">0</property>
|
|
<property name="yalign">0</property>
|
|
<property name="wrap">True</property>
|
|
<property name="label" translatable="no">Could not connect to the thunderbolt subsystem.</property>
|
|
<layout>
|
|
<property name="column">1</property>
|
|
<property name="row">1</property>
|
|
</layout>
|
|
</object>
|
|
</child>
|
|
|
|
</object>
|
|
</child>
|
|
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Normal operation mode (show list of devices) -->
|
|
|
|
<child>
|
|
<object class="GtkStackPage">
|
|
<property name="name">devices-listing</property>
|
|
<property name="child">
|
|
<object class="GtkScrolledWindow">
|
|
<property name="hscrollbar-policy">never</property>
|
|
|
|
<child>
|
|
<object class="GtkViewport">
|
|
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="orientation">horizontal</property>
|
|
<property name="valign">start</property>
|
|
|
|
<!-- Stub box -->
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="hexpand">True</property>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- center/content box -->
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="hexpand">True</property>
|
|
<property name="spacing">32</property>
|
|
<property name="margin_top">32</property>
|
|
<property name="margin_bottom">32</property>
|
|
<property name="margin-start">18</property>
|
|
<property name="margin-end">18</property>
|
|
<property name="orientation">vertical</property>
|
|
|
|
<!-- Auth Mode -->
|
|
<child>
|
|
<object class="GtkBox" id="authmode_box">
|
|
<property name="orientation">horizontal</property>
|
|
<property name="spacing">12</property>
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="hexpand">True</property>
|
|
<property name="vexpand">True</property>
|
|
<property name="orientation">vertical</property>
|
|
<property name="spacing">6</property>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="hexpand">False</property>
|
|
<property name="halign">start</property>
|
|
<property name="xalign">0.0</property>
|
|
<property name="label" translatable="yes">Direct Access</property>
|
|
<property name="mnemonic_widget">authmode_switch</property>
|
|
<attributes>
|
|
<attribute name="weight" value="bold" />
|
|
</attributes>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkStack" id="authmode_mode">
|
|
<property name="transition-type">crossfade</property>
|
|
<property name="hhomogeneous">False</property>
|
|
<property name="vhomogeneous">False</property>
|
|
|
|
<child>
|
|
<object class="GtkStackPage">
|
|
<property name="name">enabled</property>
|
|
<property name="child">
|
|
<object class="GtkLabel">
|
|
<property name="halign">start</property>
|
|
<property name="margin-start">0</property>
|
|
<property name="hexpand">False</property>
|
|
<property name="vexpand">False</property>
|
|
<property name="label" translatable="yes" >Allow direct access to devices such as docks and external GPUs.</property>
|
|
<property name="use_markup">True</property>
|
|
<property name="wrap">True</property>
|
|
<property name="xalign">0.0</property>
|
|
<property name="yalign">0.0</property>
|
|
<property name="max-width-chars">45</property>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkStackPage">
|
|
<property name="name">disabled</property>
|
|
<property name="child">
|
|
<object class="GtkLabel">
|
|
<property name="halign">start</property>
|
|
<property name="margin-start">0</property>
|
|
<property name="hexpand">False</property>
|
|
<property name="vexpand">False</property>
|
|
<property name="label" translatable="yes" >Only USB and Display Port devices can attach.</property>
|
|
<property name="use_markup">True</property>
|
|
<property name="wrap">True</property>
|
|
<property name="xalign">0.0</property>
|
|
<property name="yalign">0.0</property>
|
|
<property name="max-width-chars">45</property>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="hexpand">True</property>
|
|
<property name="vexpand">True</property>
|
|
<property name="orientation">horizontal</property>
|
|
<property name="spacing">6</property>
|
|
<property name="halign">center</property>
|
|
<property name="valign">start</property>
|
|
|
|
<child>
|
|
<object class="GtkSpinner" id="authmode_spinner">
|
|
<property name="spinning">False</property>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkSwitch" id="authmode_switch">
|
|
<property name="can_focus">True</property>
|
|
<property name="halign">end</property>
|
|
<property name="valign">start</property>
|
|
<property name="active">True</property>
|
|
<signal name="state-set"
|
|
handler="on_authmode_state_set_cb"
|
|
object="CcBoltPanel"
|
|
swapped="yes" />
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Stack: devices/no-devices -->
|
|
<child>
|
|
<object class="GtkStack" id="devices_stack">
|
|
<property name="transition-type">crossfade</property>
|
|
|
|
<child>
|
|
<object class="GtkStackPage">
|
|
<property name="name">have-devices</property>
|
|
<property name="child">
|
|
<object class="GtkBox">
|
|
<property name="orientation">vertical</property>
|
|
<property name="spacing">32</property>
|
|
|
|
<!-- Pending Device List -->
|
|
<child>
|
|
<object class="GtkBox" id="pending_box">
|
|
<property name="visible">False</property>
|
|
<property name="orientation">vertical</property>
|
|
<property name="spacing">12</property>
|
|
|
|
<!-- Pending Device List: Header -->
|
|
<child>
|
|
<object class="GtkBox" id="pending_header">
|
|
<property name="hexpand">True</property>
|
|
<property name="halign">start</property>
|
|
<property name="spacing">6</property>
|
|
<child>
|
|
<object class="GtkImage">
|
|
<property name="icon_name">dialog-warning-symbolic</property>
|
|
<property name="icon_size">1</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="label" translatable="yes">Pending Devices</property>
|
|
<property name="xalign">0.0</property>
|
|
<attributes>
|
|
<attribute name="weight" value="bold"/>
|
|
</attributes>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkSpinner" id="pending_spinner">
|
|
<property name="hexpand">True</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Pending List: Devices -->
|
|
<child>
|
|
<object class="GtkFrame">
|
|
<property name="valign">start</property>
|
|
<property name="vexpand">False</property>
|
|
<style>
|
|
<class name="view" />
|
|
</style>
|
|
<child>
|
|
<object class="GtkListBox" id="pending_list">
|
|
<property name="selection-mode">none</property>
|
|
<property name="can_focus">True</property>
|
|
<signal name="row-activated"
|
|
handler="on_device_entry_row_activated_cb"
|
|
object="CcBoltPanel"
|
|
swapped="yes" />
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Device List -->
|
|
<child>
|
|
<object class="GtkBox" id="devices_box">
|
|
<property name="visible">False</property>
|
|
<property name="orientation">vertical</property>
|
|
<property name="spacing">12</property>
|
|
|
|
<!-- Device List: Header -->
|
|
<child>
|
|
<object class="GtkBox" id="devices_header">
|
|
<property name="hexpand">True</property>
|
|
<property name="halign">start</property>
|
|
<property name="spacing">6</property>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="label" translatable="yes">Devices</property>
|
|
<property name="xalign">0.0</property>
|
|
<attributes>
|
|
<attribute name="weight" value="bold"/>
|
|
</attributes>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkSpinner" id="probing_spinner">
|
|
<property name="hexpand">True</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Device List: Devices -->
|
|
<child>
|
|
<object class="GtkFrame">
|
|
<property name="valign">start</property>
|
|
<property name="vexpand">False</property>
|
|
<style>
|
|
<class name="view" />
|
|
</style>
|
|
<child>
|
|
<object class="GtkListBox" id="devices_list">
|
|
<property name="selection-mode">none</property>
|
|
<property name="can_focus">True</property>
|
|
<signal name="row-activated"
|
|
handler="on_device_entry_row_activated_cb"
|
|
object="CcBoltPanel"
|
|
swapped="yes" />
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
</object>
|
|
</child>
|
|
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- No Devices -->
|
|
<child>
|
|
<object class="GtkStackPage">
|
|
<property name="name">no-devices</property>
|
|
<property name="child">
|
|
<object class="GtkBox">
|
|
<property name="hexpand">True</property>
|
|
<property name="halign">start</property>
|
|
<property name="orientation">vertical</property>
|
|
<property name="spacing">6</property>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="label" translatable="yes">Devices</property>
|
|
<property name="xalign">0.0</property>
|
|
<attributes>
|
|
<attribute name="weight" value="bold"/>
|
|
</attributes>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="label" translatable="yes">No devices attached</property>
|
|
<property name="xalign">0.0</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child> <!-- End of: No Devices -->
|
|
|
|
</object>
|
|
</child> <!-- End of Stack: devices/no-devices -->
|
|
|
|
</object>
|
|
</child> <!-- End of enter/content box -->
|
|
|
|
|
|
<!-- Stub box -->
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="hexpand">True</property>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- End of content -->
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
|
|
</property>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- End of 'container' -->
|
|
</object>
|
|
</child>
|
|
|
|
<!-- End of overlay -->
|
|
</object>
|
|
</child>
|
|
</template>
|
|
|
|
</interface>
|