The spinner was already present in the UI file! It just needs minor cleanups (such as moving the bottom margin from the label to the parent box) and binding the widget to the structure. We need to monitor which device is visible since the Wi-Fi panel deals with multiple Wi-Fi devices as well. Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/issues/551
359 lines
18 KiB
XML
359 lines
18 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<interface>
|
|
<requires lib="gtk+" version="3.20"/>
|
|
<template class="CcWifiPanel" parent="CcPanel">
|
|
<property name="visible">True</property>
|
|
<property name="can-focus">False</property>
|
|
|
|
<child>
|
|
<object class="GtkScrolledWindow">
|
|
<property name="visible">True</property>
|
|
<property name="can-focus">False</property>
|
|
<property name="hscrollbar-policy">never</property>
|
|
<child>
|
|
<object class="HdyColumn">
|
|
<property name="visible">True</property>
|
|
<property name="maximum_width">600</property>
|
|
<property name="linear_growth_width">400</property>
|
|
<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="visible">True</property>
|
|
<property name="hexpand">True</property>
|
|
<property name="orientation">vertical</property>
|
|
|
|
<!-- Airplane Mode -->
|
|
<child>
|
|
<object class="GtkFrame" id="rfkill_widget">
|
|
<property name="visible">True</property>
|
|
<property name="vexpand">False</property>
|
|
<property name="margin_bottom">32</property>
|
|
<child>
|
|
<object class="GtkListBox">
|
|
<property name="visible">True</property>
|
|
<property name="selection-mode">none</property>
|
|
<child>
|
|
<object class="GtkListBoxRow">
|
|
<property name="visible">True</property>
|
|
<property name="can-focus">False</property>
|
|
<property name="activatable">False</property>
|
|
<child>
|
|
<object class="GtkGrid">
|
|
<property name="visible">True</property>
|
|
<property name="border-width">12</property>
|
|
<property name="margin_left">6</property>
|
|
<property name="margin_right">6</property>
|
|
<property name="column-spacing">12</property>
|
|
<property name="row-spacing">2</property>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="visible">True</property>
|
|
<property name="hexpand">True</property>
|
|
<property name="label" translatable="yes">Airplane Mode</property>
|
|
<property name="xalign">0.0</property>
|
|
<attributes>
|
|
<attribute name="weight" value="bold"/>
|
|
</attributes>
|
|
</object>
|
|
<packing>
|
|
<property name="left-attach">0</property>
|
|
<property name="top-attach">0</property>
|
|
</packing>
|
|
</child>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="visible">True</property>
|
|
<property name="hexpand">True</property>
|
|
<property name="wrap">True</property>
|
|
<property name="label" translatable="yes">Disables Wi-Fi, Bluetooth and mobile broadband</property>
|
|
<property name="xalign">0.0</property>
|
|
<attributes>
|
|
<attribute name="scale" value="0.88"/>
|
|
</attributes>
|
|
<style>
|
|
<class name="dim-label"/>
|
|
</style>
|
|
</object>
|
|
<packing>
|
|
<property name="left-attach">0</property>
|
|
<property name="top-attach">1</property>
|
|
</packing>
|
|
</child>
|
|
<child>
|
|
<object class="GtkSwitch" id="rfkill_switch">
|
|
<property name="visible">True</property>
|
|
<property name="can-focus">True</property>
|
|
<property name="valign">center</property>
|
|
<signal name="notify::active" handler="rfkill_switch_notify_activate_cb" object="CcWifiPanel" swapped="no" />
|
|
</object>
|
|
<packing>
|
|
<property name="left-attach">1</property>
|
|
<property name="top-attach">0</property>
|
|
<property name="height">2</property>
|
|
</packing>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkStack" id="main_stack">
|
|
<property name="visible">True</property>
|
|
<property name="can-focus">False</property>
|
|
<property name="homogeneous">False</property>
|
|
<property name="transition_type">crossfade</property>
|
|
|
|
<!-- "No Wi-Fi Adapter" page -->
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<property name="expand">True</property>
|
|
<property name="halign">center</property>
|
|
<property name="valign">center</property>
|
|
<property name="orientation">vertical</property>
|
|
<child>
|
|
<object class="GtkImage">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<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="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<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="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<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>
|
|
<packing>
|
|
<property name="name">no-wifi-devices</property>
|
|
</packing>
|
|
</child>
|
|
|
|
<!-- "Airplane Mode" page -->
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<property name="expand">True</property>
|
|
<property name="halign">center</property>
|
|
<property name="valign">center</property>
|
|
<property name="orientation">vertical</property>
|
|
<child>
|
|
<object class="GtkImage">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<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="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<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="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<property name="wrap">True</property>
|
|
<property name="label" translatable="yes">Turn off to use Wi-Fi</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
<packing>
|
|
<property name="name">airplane-mode</property>
|
|
</packing>
|
|
</child>
|
|
|
|
<!-- Wi-Fi connections and devices -->
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="visible">True</property>
|
|
<property name="can-focus">False</property>
|
|
<property name="orientation">vertical</property>
|
|
|
|
<!-- Visible Networks label & spinner -->
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="visible">True</property>
|
|
<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">
|
|
<property name="visible">True</property>
|
|
<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="visible">True</property>
|
|
<property name="hexpand">True</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Stack with a listbox for each Wi-Fi device -->
|
|
<child>
|
|
<object class="GtkFrame">
|
|
<property name="visible">True</property>
|
|
<property name="valign">start</property>
|
|
<style>
|
|
<class name="view" />
|
|
</style>
|
|
<child>
|
|
<object class="GtkStack" id="stack">
|
|
<property name="visible">True</property>
|
|
<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>
|
|
</child>
|
|
</object>
|
|
<packing>
|
|
<property name="name">wifi-connections</property>
|
|
</packing>
|
|
</child>
|
|
|
|
<!-- "NetworkManager Not Running" page -->
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<property name="expand">True</property>
|
|
<property name="halign">center</property>
|
|
<property name="valign">center</property>
|
|
<property name="orientation">vertical</property>
|
|
<property name="margin">18</property>
|
|
<property name="spacing">18</property>
|
|
<child type="center">
|
|
<object class="GtkImage">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<property name="icon_name">face-sad-symbolic</property>
|
|
<property name="pixel_size">128</property>
|
|
<style>
|
|
<class name="dim-label" />
|
|
</style>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<property name="wrap">True</property>
|
|
<property name="label" translatable="yes">NetworkManager needs to be running</property>
|
|
</object>
|
|
<packing>
|
|
<property name="pack-type">end</property>
|
|
</packing>
|
|
</child>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<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>
|
|
<packing>
|
|
<property name="pack-type">end</property>
|
|
</packing>
|
|
</child>
|
|
</object>
|
|
<packing>
|
|
<property name="name">nm-not-running</property>
|
|
</packing>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
|
|
</object>
|
|
</child>
|
|
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</template>
|
|
|
|
<!-- End Stack -->
|
|
<object class="GtkStack" id="header_stack">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<property name="halign">end</property>
|
|
</object>
|
|
|
|
<!-- Center Widget -->
|
|
<object class="GtkStack" id="center_stack">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<property name="halign">center</property>
|
|
<property name="hhomogeneous">False</property>
|
|
<child>
|
|
<object class="GtkStackSwitcher">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<property name="stack">stack</property>
|
|
</object>
|
|
<packing>
|
|
<property name="name">many</property>
|
|
</packing>
|
|
</child>
|
|
</object>
|
|
|
|
<object class="GtkSizeGroup" id="sizegroup" />
|
|
</interface>
|