network: Add status label and icon to wifi header

This is part of the design refresh for the network panel.
This commit is contained in:
Matthias Clasen 2012-12-09 02:17:49 -05:00 committed by Dan Winship
parent 9f86b03353
commit 96caacc136
2 changed files with 54 additions and 13 deletions

View file

@ -657,6 +657,10 @@ nm_device_wifi_refresh_ui (NetDeviceWifi *device_wifi)
else else
panel_set_device_widget_details (priv->builder, "last_used", NULL); panel_set_device_widget_details (priv->builder, "last_used", NULL);
widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder, "heading_status"));
gtk_label_set_label (GTK_LABEL (widget),
panel_device_state_to_localized_string (nm_device));
/* update list of APs */ /* update list of APs */
populate_ap_list (device_wifi); populate_ap_list (device_wifi);
} }

View file

@ -143,16 +143,11 @@
<property name="margin_top">12</property> <property name="margin_top">12</property>
<property name="margin_bottom">12</property> <property name="margin_bottom">12</property>
<child> <child>
<object class="GtkLabel" id="heading_list"> <object class="GtkImage" id="heading_image">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="halign">start</property> <property name="icon_name">network-wireless</property>
<property name="hexpand">True</property> <property name="icon-size">6</property>
<property name="label" translatable="yes">Wi-Fi</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="1.2"/>
</attributes>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -161,11 +156,40 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkSwitch" id="device_off_switch"> <object class="GtkBox" id="box4">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">False</property>
<property name="halign">end</property> <property name="orientation">vertical</property>
<property name="valign">start</property> <child>
<object class="GtkLabel" id="heading_list">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Wi-Fi</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="1.2"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="heading_status">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label">Connected</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -173,9 +197,22 @@
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkSwitch" id="device_off_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">True</property>
<property name="fill">False</property> <property name="fill">False</property>
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>