[gnome-control-center] Network: adjust status strings
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] Network: adjust status strings
- Date: Thu, 17 Mar 2011 00:14:25 +0000 (UTC)
commit 67241cc1027f0a368e354bef1ab74404a271935e
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Mar 16 19:13:45 2011 -0400
Network: adjust status strings
Make the strings match what the shell network menu shows
more closely.
https://bugzilla.gnome.org/show_bug.cgi?id=644962
panels/network/cc-network-panel.c | 7 +------
panels/network/panel-common.c | 28 +++++++++++-----------------
panels/network/panel-common.h | 13 +++++++------
3 files changed, 19 insertions(+), 29 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index cd1ddcb..7d110eb 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -1028,12 +1028,7 @@ nm_device_refresh_device_ui (CcNetworkPanel *panel, NetDevice *device)
state = nm_device_get_state (nm_device);
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder,
"label_status"));
- str = panel_device_state_to_localized_string (state);
- if (type == NM_DEVICE_TYPE_ETHERNET &&
- (state == NM_DEVICE_STATE_UNAVAILABLE)) {
- /* TRANSLATORS: this is a wired connection that is disconnected */
- str = _("Unplugged");
- }
+ str = panel_device_state_to_localized_string (type, state);
gtk_label_set_label (GTK_LABEL (widget), str);
/* set up the options button */
diff --git a/panels/network/panel-common.c b/panels/network/panel-common.c
index 30a92af..8bebbcd 100644
--- a/panels/network/panel-common.c
+++ b/panels/network/panel-common.c
@@ -174,10 +174,10 @@ panel_ap_mode_to_localized_string (NM80211Mode mode)
* panel_device_state_to_localized_string:
**/
const gchar *
-panel_device_state_to_localized_string (NMDeviceState type)
+panel_device_state_to_localized_string (NMDeviceType type, NMDeviceState state)
{
const gchar *value = NULL;
- switch (type) {
+ switch (state) {
case NM_DEVICE_STATE_UNKNOWN:
/* TRANSLATORS: device status */
value = _("Status unknown");
@@ -188,31 +188,25 @@ panel_device_state_to_localized_string (NMDeviceState type)
break;
case NM_DEVICE_STATE_UNAVAILABLE:
/* TRANSLATORS: device status */
- value = _("Unavailable");
+ if (type == NM_DEVICE_TYPE_ETHERNET)
+ value = _("Cable unplugged");
+ else
+ value = _("Unavailable");
break;
case NM_DEVICE_STATE_DISCONNECTED:
/* TRANSLATORS: device status */
value = _("Disconnected");
break;
case NM_DEVICE_STATE_PREPARE:
- /* TRANSLATORS: device status */
- value = _("Preparing connection");
- break;
case NM_DEVICE_STATE_CONFIG:
- /* TRANSLATORS: device status */
- value = _("Configuring connection");
- break;
- case NM_DEVICE_STATE_NEED_AUTH:
- /* TRANSLATORS: device status */
- value = _("Authenticating");
- break;
case NM_DEVICE_STATE_IP_CONFIG:
+ case NM_DEVICE_STATE_IP_CHECK:
/* TRANSLATORS: device status */
- value = _("Getting network address");
+ value = _("Connecting");
break;
- case NM_DEVICE_STATE_IP_CHECK:
+ case NM_DEVICE_STATE_NEED_AUTH:
/* TRANSLATORS: device status */
- value = _("Checking network address");
+ value = _("Authentication required");
break;
case NM_DEVICE_STATE_ACTIVATED:
/* TRANSLATORS: device status */
@@ -224,7 +218,7 @@ panel_device_state_to_localized_string (NMDeviceState type)
break;
case NM_DEVICE_STATE_FAILED:
/* TRANSLATORS: device status */
- value = _("Failed to connect");
+ value = _("Connection failed");
break;
default:
/* TRANSLATORS: device status */
diff --git a/panels/network/panel-common.h b/panels/network/panel-common.h
index b2ee678..bbf8936 100644
--- a/panels/network/panel-common.h
+++ b/panels/network/panel-common.h
@@ -29,12 +29,13 @@
G_BEGIN_DECLS
-const gchar *panel_device_to_icon_name (NMDevice *device);
-const gchar *panel_device_to_localized_string (NMDevice *device);
-const gchar *panel_device_to_sortable_string (NMDevice *device);
-const gchar *panel_ap_mode_to_localized_string (NM80211Mode mode);
-const gchar *panel_device_state_to_localized_string (NMDeviceState type);
-const gchar *panel_vpn_state_to_localized_string (NMVPNConnectionState type);
+const gchar *panel_device_to_icon_name (NMDevice *device);
+const gchar *panel_device_to_localized_string (NMDevice *device);
+const gchar *panel_device_to_sortable_string (NMDevice *device);
+const gchar *panel_ap_mode_to_localized_string (NM80211Mode mode);
+const gchar *panel_device_state_to_localized_string (NMDeviceType type,
+ NMDeviceState state);
+const gchar *panel_vpn_state_to_localized_string (NMVPNConnectionState type);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]