gnome-control-center/panels/network/cc-network-panel.ui
Athul Iddya 43b61571c1 network: Show VPN empty state by default
The network panel used to show an empty box under the VPN header at
start up if no VPNs were present instead of the empty state. This was
because the GtkListBox containing VPN connections was visible by
default instead of the empty state widget.

To fix this, the empty state widget has been moved to the top in the
GtkStack to show it by default. If any VPN connections are found during
initialization, `cc-network-panel` already handles setting the
visibility of the appropriate widget correctly.

Fixes: #1634
2022-08-12 01:32:15 +00:00

94 lines
3.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="CcNetworkPanel" parent="CcPanel">
<child type="content">
<object class="AdwPreferencesPage">
<!-- Each group below will contain GtkStacks from the NetDevices -->
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="GtkBox" id="box_wired">
<property name="orientation">vertical</property>
<property name="spacing">24</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup" id="container_bluetooth">
<property name="visible">False</property>
<property name="title" translatable="yes">Other Devices</property>
<child>
<object class="GtkListBox" id="box_bluetooth">
<property name="selection_mode">none</property>
<accessibility>
<property name="label" translatable="yes">Other Devices</property>
</accessibility>
<style>
<class name="boxed-list" />
</style>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGRoup">
<property name="title" translatable="yes">VPN</property>
<property name="header-suffix">
<object class="GtkButton">
<property name="icon_name">list-add-symbolic</property>
<accessibility>
<property name="label" translatable="yes">Add connection</property>
</accessibility>
<style>
<class name="flat" />
</style>
<signal name="clicked" handler="create_connection_cb" object="CcNetworkPanel" swapped="no" />
</object>
</property>
<child>
<object class="GtkStack" id="vpn_stack">
<child>
<!-- "Not set up" row -->
<object class="GtkListBox" id="empty_listbox">
<property name="selection_mode">none</property>
<style>
<class name="boxed-list" />
</style>
<child>
<object class="AdwActionRow">
<property name="activatable">False</property>
<property name="title" translatable="yes">Not set up</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBox" id="box_vpn">
<property name="selection_mode">none</property>
<accessibility>
<property name="label" translatable="yes">VPN</property>
</accessibility>
<style>
<class name="boxed-list" />
</style>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="GtkBox" id="box_proxy">
<property name="orientation">vertical</property>
</object>
</child>
</object>
</child>
</object>
</child>
</template>
</interface>