AdwActionRow handles many of the properties we use CcListRow for. We can re-use it instead of re-creating it. CcListRow is now an AdwActionRow with three suffixes. The `activatable-widget` is set when the switch is visible. Since our `icon-name` property was only used for the arrow icon, it has been replaced with a `show-arrow` property. The `bold` property has been removed - it was only used in one place, and it's not a pattern used in other apps. I decided to go this route because replacing all the instances of CcListRow with AdwActionRow directly would end up being more code.
302 lines
15 KiB
XML
302 lines
15 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<interface>
|
|
<requires lib="gtk+" version="3.20"/>
|
|
<template class="CcWifiPanel" parent="CcPanel">
|
|
|
|
<child>
|
|
<object class="GtkScrolledWindow">
|
|
<property name="hscrollbar-policy">never</property>
|
|
<child>
|
|
<object class="AdwClamp">
|
|
<property name="margin_top">32</property>
|
|
<property name="margin_bottom">32</property>
|
|
<property name="margin_start">12</property>
|
|
<property name="margin_end">12</property>
|
|
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="hexpand">True</property>
|
|
<property name="orientation">vertical</property>
|
|
|
|
<!-- Airplane Mode -->
|
|
<child>
|
|
<object class="GtkListBox" id="rfkill_widget">
|
|
<property name="margin_bottom">32</property>
|
|
<property name="selection-mode">none</property>
|
|
<style>
|
|
<class name="boxed-list"/>
|
|
</style>
|
|
<child>
|
|
<object class="CcListRow" id="rfkill_row">
|
|
<property name="show-switch">True</property>
|
|
<property name="title" translatable="yes">Airplane Mode</property>
|
|
<property name="subtitle" translatable="yes">Disables Wi-Fi, Bluetooth and mobile broadband</property>
|
|
<signal name="notify::active" handler="rfkill_switch_notify_activate_cb" object="CcWifiPanel" swapped="no" />
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkStack" id="main_stack">
|
|
<property name="hhomogeneous">False</property>
|
|
<property name="vhomogeneous">False</property>
|
|
<property name="transition_type">crossfade</property>
|
|
|
|
<!-- "No Wi-Fi Adapter" page -->
|
|
<child>
|
|
<object class="GtkStackPage">
|
|
<property name="name">no-wifi-devices</property>
|
|
<property name="child">
|
|
<object class="GtkBox">
|
|
<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>
|
|
<child>
|
|
<object class="GtkImage">
|
|
<property name="icon_name">network-wireless-no-route-symbolic</property>
|
|
<property name="pixel_size">256</property>
|
|
<property name="margin-bottom">18</property>
|
|
<style>
|
|
<class name="dim-label" />
|
|
</style>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="wrap">True</property>
|
|
<property name="label" translatable="yes">No Wi-Fi Adapter Found</property>
|
|
<attributes>
|
|
<attribute name="weight" value="bold" />
|
|
<attribute name="scale" value="1.2" />
|
|
</attributes>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="wrap">True</property>
|
|
<property name="label" translatable="yes">Make sure you have a Wi-Fi adapter plugged and turned on</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- "Airplane Mode" page -->
|
|
<child>
|
|
<object class="GtkStackPage">
|
|
<property name="name">airplane-mode</property>
|
|
<property name="child">
|
|
<object class="GtkBox">
|
|
<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>
|
|
<child>
|
|
<object class="GtkImage">
|
|
<property name="icon_name">airplane-mode-symbolic</property>
|
|
<property name="pixel_size">256</property>
|
|
<property name="margin-bottom">18</property>
|
|
<style>
|
|
<class name="dim-label" />
|
|
</style>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="wrap">True</property>
|
|
<property name="label" translatable="yes">Airplane Mode On</property>
|
|
<attributes>
|
|
<attribute name="weight" value="bold" />
|
|
<attribute name="scale" value="1.2" />
|
|
</attributes>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="wrap">True</property>
|
|
<property name="label" translatable="yes">Turn off to use Wi-Fi</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Wi-Fi connections and devices -->
|
|
<child>
|
|
<object class="GtkStackPage">
|
|
<property name="name">wifi-connections</property>
|
|
<property name="child">
|
|
<object class="GtkBox">
|
|
<property name="orientation">vertical</property>
|
|
|
|
<child>
|
|
<object class="GtkBox" id="hotspot_box">
|
|
<property name="orientation">vertical</property>
|
|
|
|
<!-- Hotspot QR code -->
|
|
<child>
|
|
<object class="GtkImage" id="wifi_qr_image">
|
|
<property name="halign">center</property>
|
|
<property name="width-request">180</property>
|
|
<property name="height-request">180</property>
|
|
<style>
|
|
<class name="frame"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="margin-top">12</property>
|
|
<property name="label" translatable="yes">Wi-Fi Hotspot Active</property>
|
|
<attributes>
|
|
<attribute name="weight" value="bold" />
|
|
<attribute name="scale" value="1.8" />
|
|
</attributes>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="label" translatable="yes">Mobile devices can scan the QR code to connect.</property>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkButton">
|
|
<property name="halign">center</property>
|
|
<property name="margin-top">12</property>
|
|
<property name="label" translatable="yes">Turn Off Hotspot…</property>
|
|
<signal name="clicked" handler="hotspot_stop_clicked_cb" swapped="yes"/>
|
|
<style>
|
|
<class name="destructive-action"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Visible Networks label & spinner -->
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="hexpand">True</property>
|
|
<property name="halign">start</property>
|
|
<property name="spacing">6</property>
|
|
<property name="margin_bottom">12</property>
|
|
<child>
|
|
<object class="GtkLabel" id="list_label">
|
|
<property name="label" translatable="yes">Visible Networks</property>
|
|
<property name="xalign">0.0</property>
|
|
<attributes>
|
|
<attribute name="weight" value="bold"/>
|
|
</attributes>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkSpinner" id="spinner">
|
|
<property name="hexpand">True</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Stack with a listbox for each Wi-Fi device -->
|
|
<child>
|
|
<object class="GtkStack" id="stack">
|
|
<property name="hexpand">True</property>
|
|
<property name="vexpand">True</property>
|
|
<property name="transition_type">crossfade</property>
|
|
<signal name="notify::visible-child-name" handler="on_stack_visible_child_changed_cb" object="CcWifiPanel" swapped="no" />
|
|
</object>
|
|
</child>
|
|
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- "NetworkManager Not Running" page -->
|
|
<child>
|
|
<object class="GtkStackPage">
|
|
<property name="name">nm-not-running</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="GtkImage">
|
|
<property name="icon_name">face-sad-symbolic</property>
|
|
<property name="pixel_size">128</property>
|
|
<style>
|
|
<class name="dim-label" />
|
|
</style>
|
|
</object>
|
|
</child>
|
|
<child type="end">
|
|
<object class="GtkLabel">
|
|
<property name="wrap">True</property>
|
|
<property name="label" translatable="yes">NetworkManager needs to be running</property>
|
|
</object>
|
|
</child>
|
|
<child type="end">
|
|
<object class="GtkLabel">
|
|
<property name="wrap">True</property>
|
|
<property name="label" translatable="yes">Oops, something has gone wrong. Please contact your software vendor.</property>
|
|
<attributes>
|
|
<attribute name="scale" value="1.42" />
|
|
</attributes>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
|
|
</object>
|
|
</child>
|
|
|
|
|
|
</object>
|
|
</child>
|
|
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</template>
|
|
|
|
<!-- End Stack -->
|
|
<object class="GtkStack" id="header_stack">
|
|
<property name="halign">end</property>
|
|
</object>
|
|
|
|
<!-- Center Widget -->
|
|
<object class="GtkStack" id="center_stack">
|
|
<property name="halign">center</property>
|
|
<property name="hhomogeneous">False</property>
|
|
<child>
|
|
<object class="GtkStackPage">
|
|
<property name="name">many</property>
|
|
<property name="child">
|
|
<object class="GtkStackSwitcher">
|
|
<property name="stack">stack</property>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</interface>
|