[gnome-control-center/wip/wireless-list] Make wireless details match the redesign more closely
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/wireless-list] Make wireless details match the redesign more closely
- Date: Wed, 4 Jul 2012 06:51:38 +0000 (UTC)
commit 6cdf99232832f6fde45f0a9045d88b61dfd62027
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jul 4 01:54:11 2012 -0400
Make wireless details match the redesign more closely
panels/network/cc-network-panel.c | 28 ++----
panels/network/network.ui | 184 +++++++++++++++----------------------
2 files changed, 83 insertions(+), 129 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index e653e51..8fd78dc 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -1799,13 +1799,15 @@ refresh_header_ui (CcNetworkPanel *panel, NMDevice *device, const char *page_nam
} else {
str = g_string_new (panel_device_state_to_localized_string (device));
}
- if (speed > 0) {
- g_string_append (str, " - ");
+ gtk_label_set_label (GTK_LABEL (widget), str->str);
+ gtk_widget_set_tooltip_text (widget, panel_device_state_reason_to_localized_string (device));
+
+ if (speed > 0) {
+ g_string_set_size (str, 0);
/* Translators: network device speed */
g_string_append_printf (str, _("%d Mb/s"), speed);
+ panel_set_widget_data (panel, page_name, "speed", str->str);
}
- gtk_label_set_label (GTK_LABEL (widget), str->str);
- gtk_widget_set_tooltip_text (widget, panel_device_state_reason_to_localized_string (device));
/* The options button is always enabled for wired connections,
* and is sensitive for other connection types if the device
@@ -1839,10 +1841,7 @@ device_refresh_ethernet_ui (CcNetworkPanel *panel, NetDevice *device)
/* device MAC */
str = nm_device_ethernet_get_hw_address (NM_DEVICE_ETHERNET (nm_device));
- panel_set_widget_data (panel,
- "wired",
- "mac",
- str);
+ panel_set_widget_data (panel, "wired", "mac", str);
}
@@ -1895,18 +1894,12 @@ device_refresh_wifi_ui (CcNetworkPanel *panel, NetDevice *device)
(perm == NM_CLIENT_PERMISSION_RESULT_YES ||
perm == NM_CLIENT_PERMISSION_RESULT_AUTH);
- panel_set_widget_data (panel, "hotspot", "network_name", hotspot_ssid);
g_free (hotspot_ssid);
-
- panel_set_widget_data (panel, "hotspot", "security_key", hotspot_secret);
g_free (hotspot_secret);
/* device MAC */
str = nm_device_wifi_get_hw_address (NM_DEVICE_WIFI (nm_device));
- panel_set_widget_data (panel,
- "wireless",
- "mac",
- str);
+ panel_set_widget_data (panel, "wireless", "mac", str);
/* security */
active_ap = nm_device_wifi_get_active_access_point (NM_DEVICE_WIFI (nm_device));
if (state == NM_DEVICE_STATE_UNAVAILABLE)
@@ -1917,10 +1910,7 @@ device_refresh_wifi_ui (CcNetworkPanel *panel, NetDevice *device)
str_tmp = get_ap_security_string (active_ap);
else
str_tmp = g_strdup ("");
- panel_set_widget_data (panel,
- "wireless",
- "security",
- str_tmp);
+ panel_set_widget_data (panel, "wireless", "security", str_tmp);
g_free (str_tmp);
/* populate wireless network list */
diff --git a/panels/network/network.ui b/panels/network/network.ui
index 20f9dc3..d3bc679 100644
--- a/panels/network/network.ui
+++ b/panels/network/network.ui
@@ -880,10 +880,47 @@
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">center</property>
<property name="valign">start</property>
<property name="row_spacing">10</property>
<property name="column_spacing">6</property>
<child>
+ <object class="GtkLabel" id="heading_wireless_strength">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Signal Strength</property>
+ <property name="mnemonic_widget">label_wireless_strength</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="heading_wireless_speed">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Link Speed</property>
+ <property name="mnemonic_widget">label_wireless_speed</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkLabel" id="heading_wireless_mac">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -896,7 +933,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">6</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
@@ -914,7 +951,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">5</property>
+ <property name="top_attach">4</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
@@ -932,7 +969,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">6</property>
+ <property name="top_attach">5</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
@@ -975,6 +1012,36 @@
</packing>
</child>
<child>
+ <object class="GtkLabel" id="label_wireless_strength">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">Good</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_wireless_speed">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">1 MB/s</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkLabel" id="label_wireless_mac">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -984,7 +1051,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">6</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
@@ -999,7 +1066,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">5</property>
+ <property name="top_attach">4</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
@@ -1014,7 +1081,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">6</property>
+ <property name="top_attach">5</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
@@ -1078,65 +1145,12 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="heading_wireless_network_name">
- <property name="visible">False</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">_Network Name</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">combobox_wireless_network_name</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="heading_hotspot_network_name">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Network Name</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">9</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="heading_hotspot_security_key">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Security Key</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">10</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
<object class="GtkLabel" id="label_wireless_security">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -1146,61 +1160,11 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">2</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_wireless_network_name">
- <property name="visible">False</property>
- <property name="can_focus">False</property>
- <property name="model">liststore_wireless_network</property>
- <property name="has_entry">True</property>
- <property name="entry_text_column">1</property>
- <child internal-child="entry">
- <object class="GtkEntry" id="comboboxentry-entry">
- <property name="can_focus">False</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
<property name="top_attach">3</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="label_hotspot_network_name">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">My Hot Spot</property>
- <property name="selectable">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">9</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_hotspot_security_key">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">My Secret</property>
- <property name="selectable">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">10</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">True</property>
@@ -1232,7 +1196,7 @@
</child>
<child>
<object class="GtkButton" id="button_wireless_options">
- <property name="label" translatable="yes">_Options...</property>
+ <property name="label" translatable="yes">_Settings</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]