[gnome-control-center] Network: display more detailed status for unavailable devices



commit 23f239e46158c545df602a7b1211849fe6e11d7d
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Mar 31 10:38:31 2011 -0400

    Network: display more detailed status for unavailable devices
    
    If NetworkManager knows that firmware is missing, say so.
    This matches recent changes in the gnome-shell network menu.
    It adds one new string, "Firmware missing", for which I have
    pulled existing translations from the similar "firmware missing"
    string in gnome-shell.
    https://bugzilla.gnome.org/show_bug.cgi?id=646027

 panels/network/cc-network-panel.c |    2 +-
 panels/network/panel-common.c     |   14 ++++++++++++--
 panels/network/panel-common.h     |    3 +--
 po/ar.po                          |    4 ++++
 po/bg.po                          |    4 ++++
 po/ca.po                          |    4 ++++
 po/de.po                          |    4 ++++
 po/es.po                          |    4 ++++
 po/fr.po                          |    4 ++++
 po/gl.po                          |    4 ++++
 po/he.po                          |    4 ++++
 po/lv.po                          |    4 ++++
 po/mr.po                          |    4 ++++
 po/nl.po                          |    4 ++++
 po/pa.po                          |    4 ++++
 po/pl.po                          |    4 ++++
 po/pt_BR.po                       |    4 ++++
 po/ru.po                          |    4 ++++
 po/sl.po                          |    4 ++++
 po/sv.po                          |    4 ++++
 po/uk.po                          |    4 ++++
 po/vi.po                          |    4 ++++
 po/zh_CN.po                       |    4 ++++
 23 files changed, 94 insertions(+), 5 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 5f80b93..cb3c19f 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -1203,7 +1203,7 @@ refresh_header_ui (CcNetworkPanel *panel, NMDevice *device, const char *page_nam
         wid_name = g_strdup_printf ("label_%s_status", page_name);
         widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, wid_name));
         g_free (wid_name);
-        str = panel_device_state_to_localized_string (type, state);
+        str = panel_device_state_to_localized_string (device);
         gtk_label_set_label (GTK_LABEL (widget), str);
 
 
diff --git a/panels/network/panel-common.c b/panels/network/panel-common.c
index 9867eb8..50f86c8 100644
--- a/panels/network/panel-common.c
+++ b/panels/network/panel-common.c
@@ -26,6 +26,7 @@
 #include <gtk/gtk.h>
 
 #include "panel-common.h"
+#include "nm-device-ethernet.h"
 #include "nm-device-modem.h"
 
 /**
@@ -174,8 +175,14 @@ panel_ap_mode_to_localized_string (NM80211Mode mode)
  * panel_device_state_to_localized_string:
  **/
 const gchar *
-panel_device_state_to_localized_string (NMDeviceType type, NMDeviceState state)
+panel_device_state_to_localized_string (NMDevice *device)
 {
+        NMDeviceType type;
+        NMDeviceState state;
+
+        type = nm_device_get_device_type (device);
+        state = nm_device_get_state (device);
+
         const gchar *value = NULL;
         switch (state) {
         case NM_DEVICE_STATE_UNKNOWN:
@@ -188,7 +195,10 @@ panel_device_state_to_localized_string (NMDeviceType type, NMDeviceState state)
                 break;
         case NM_DEVICE_STATE_UNAVAILABLE:
                 /* TRANSLATORS: device status */
-                if (type == NM_DEVICE_TYPE_ETHERNET)
+                if (nm_device_get_firmware_missing (device))
+                        value = _("Firmware missing");
+                else if (type == NM_DEVICE_TYPE_ETHERNET &&
+                         !nm_device_ethernet_get_carrier (NM_DEVICE_ETHERNET (device)))
                         value = _("Cable unplugged");
                 else
                         value = _("Unavailable");
diff --git a/panels/network/panel-common.h b/panels/network/panel-common.h
index bbf8936..d8e3275 100644
--- a/panels/network/panel-common.h
+++ b/panels/network/panel-common.h
@@ -33,8 +33,7 @@ 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_device_state_to_localized_string (NMDevice *device);
 const gchar     *panel_vpn_state_to_localized_string    (NMVPNConnectionState type);
 
 G_END_DECLS
diff --git a/po/ar.po b/po/ar.po
index 39fe0a2..f105f86 100644
--- a/po/ar.po
+++ b/po/ar.po
@@ -3981,3 +3981,7 @@ msgstr "_Ù?Ù? اÙ?إعدادات"
 
 #~ msgid "aterm"
 #~ msgstr "aterm"
+
+msgid "Firmware missing"
+msgstr "اÙ?برÙ?جÙ?Ø© اÙ?Ù?غرÙ?سة غÙ?ر Ù?تاحة"
+
diff --git a/po/bg.po b/po/bg.po
index 1a39d49..63d5af5 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -3645,3 +3645,7 @@ msgstr ""
 
 #~ msgid "Remove from System Items"
 #~ msgstr "Ð?Ñ?емаÑ?ване оÑ? Ñ?иÑ?Ñ?емниÑ?е елеменÑ?и"
+
+msgid "Firmware missing"
+msgstr "липÑ?ва Ñ?Ñ?Ñ?мÑ?еÑ?"
+
diff --git a/po/ca.po b/po/ca.po
index 3de84d2..6cd74fa 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -3608,3 +3608,7 @@ msgstr "_Tots els paràmetres"
 
 #~ msgid "LowContrast"
 #~ msgstr "ContrastBaix"
+
+msgid "Firmware missing"
+msgstr "manca el microprogramari"
+
diff --git a/po/de.po b/po/de.po
index 60eba59..89cbd9c 100644
--- a/po/de.po
+++ b/po/de.po
@@ -3634,3 +3634,7 @@ msgstr "_Alle Einstellungen"
 
 #~ msgid "Failed"
 #~ msgstr "Fehlgeschlagen"
+
+msgid "Firmware missing"
+msgstr "Firmware fehlt"
+
diff --git a/po/es.po b/po/es.po
index d3e5d6c..09dafba 100644
--- a/po/es.po
+++ b/po/es.po
@@ -6321,3 +6321,7 @@ msgstr "_Todas las configuraciones"
 #~ msgid "No application with name '%s' registered a bookmark for '%s'"
 #~ msgstr ""
 #~ "Ninguna aplicación con el nombre «%s» registró un marcador para «%s»"
+
+msgid "Firmware missing"
+msgstr "falta el «firmware»"
+
diff --git a/po/fr.po b/po/fr.po
index 22a0fd9..0e4332f 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -3547,3 +3547,7 @@ msgstr "Centre de contrôle"
 msgid "_All Settings"
 msgstr "_Tous les paramètres"
 
+
+msgid "Firmware missing"
+msgstr "micrologiciel absent"
+
diff --git a/po/gl.po b/po/gl.po
index e440136..ca05fbd 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -4931,3 +4931,7 @@ msgstr "_Todas as configuracións"
 
 #~ msgid "FONT-FILE OUTPUT-FILE"
 #~ msgstr "FICHEIRO-FONTE FICHEIRO-DE-SAÃ?DA"
+
+msgid "Firmware missing"
+msgstr "falta o «firmware»"
+
diff --git a/po/he.po b/po/he.po
index b485313..11f4f31 100644
--- a/po/he.po
+++ b/po/he.po
@@ -5790,3 +5790,7 @@ msgstr "_×?×? ×?×?×?×?ר×?ת"
 
 #~ msgid "Unknown login ID, the user database might be corrupted"
 #~ msgstr "פר×?×? ×?×?×?ש×? ×?×? ×?×?×?×¢×?×?, ×?×?ת×?×? ש×?×?×?ר ×?×?שת×?ש×?×? ש×?×?ר."
+
+msgid "Firmware missing"
+msgstr "×?ק×?ש×?×? ×?סר×?"
+
diff --git a/po/lv.po b/po/lv.po
index 7c5b120..15bae10 100644
--- a/po/lv.po
+++ b/po/lv.po
@@ -3672,3 +3672,7 @@ msgstr "Visi iest_atījumi"
 
 #~ msgid "Disable _Fingerprint Login..."
 #~ msgstr "AtslÄ?gt pieteikÅ¡anos ar _pirkstu nospiedumu..."
+
+msgid "Firmware missing"
+msgstr "trÅ«kst aparÄ?tprogrammatÅ«ras"
+
diff --git a/po/mr.po b/po/mr.po
index 1a1173b..b537bf9 100644
--- a/po/mr.po
+++ b/po/mr.po
@@ -3528,3 +3528,7 @@ msgstr "<b>%s ��डा</b>"
 msgid "Remove from System Items"
 msgstr "प�रणाल� ��� पास�न �ाढ�ण �ा�ा"
 
+
+msgid "Firmware missing"
+msgstr "फर�मव��र �ढळल� नाह�"
+
diff --git a/po/nl.po b/po/nl.po
index 2685963..3eb2b60 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -5526,3 +5526,7 @@ msgstr ""
 
 #~ msgid "<b>Work</b>"
 #~ msgstr "<b>Werk</b>"
+
+msgid "Firmware missing"
+msgstr "firmware ontbreekt"
+
diff --git a/po/pa.po b/po/pa.po
index 25a0028..870721c 100644
--- a/po/pa.po
+++ b/po/pa.po
@@ -6895,3 +6895,7 @@ msgstr "ਸਭ ਸ��ਿੰ�(_A)"
 
 #~ msgid "Start screensaver"
 #~ msgstr "ਸ�ਰ�ਨ-ਸ�ਵਰ ਸ਼�ਰ� �ਰ�"
+
+msgid "Firmware missing"
+msgstr "ਫਿਰਮਵ��ਰ ਮ���ਦ ਨਹ�� ਹ�"
+
diff --git a/po/pl.po b/po/pl.po
index 04ef752..92d57c3 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -3524,3 +3524,7 @@ msgstr "Centrum sterowania"
 #: ../shell/shell.ui.h:2
 msgid "_All Settings"
 msgstr "_Wszystkie ustawienia"
+
+msgid "Firmware missing"
+msgstr "brak oprogramowania wbudowanego"
+
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 84f4a29..65588e0 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -3559,3 +3559,7 @@ msgstr "Tod_as as configurações"
 
 #~ msgid "Mouse Orientation"
 #~ msgstr "Orientação do mouse"
+
+msgid "Firmware missing"
+msgstr "firmware faltando"
+
diff --git a/po/ru.po b/po/ru.po
index 5ef0ab8..7e39dd1 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -3463,3 +3463,7 @@ msgstr "ЦенÑ?Ñ? Ñ?пÑ?авлениÑ?"
 msgid "_All Settings"
 msgstr "_Ð?Ñ?е паÑ?амеÑ?Ñ?Ñ?"
 
+
+msgid "Firmware missing"
+msgstr "оÑ?Ñ?Ñ?Ñ?Ñ?Ñ?вÑ?еÑ? пÑ?оÑ?ивка"
+
diff --git a/po/sl.po b/po/sl.po
index b08aa6c..922552a 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -4855,3 +4855,7 @@ msgstr "_Vse nastavitve"
 #~ msgid "Don't check whether the notification area exists"
 #~ msgstr "Brez preverjanja ali opozorilni pult obstaja"
 
+
+msgid "Firmware missing"
+msgstr "manjka strojna programska oprema"
+
diff --git a/po/sv.po b/po/sv.po
index 0067a2d..e63eb3a 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -5514,3 +5514,7 @@ msgstr "_Alla inställningar"
 #~ "Godtag endast tangenter då de har tryckts ned och hållits nedtryckta "
 #~ "under en användardefinierad tid."
 
+
+msgid "Firmware missing"
+msgstr "fast programvara saknas"
+
diff --git a/po/uk.po b/po/uk.po
index fe90231..7f01599 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -3852,3 +3852,7 @@ msgstr "_УÑ?Ñ? паÑ?амеÑ?Ñ?и"
 
 #~ msgid "Show password hints"
 #~ msgstr "Ð?оказÑ?ваÑ?и пÑ?дказки до паÑ?олÑ?в"
+
+msgid "Firmware missing"
+msgstr "Ð?Ñ?акÑ?Ñ? мÑ?кÑ?опÑ?огÑ?ами"
+
diff --git a/po/vi.po b/po/vi.po
index ac630c0..31fad07 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -5536,3 +5536,7 @@ msgstr "_Tất cả thiết lập"
 
 #~ msgid "FONT-FILE OUTPUT-FILE"
 #~ msgstr "TẬP-TIN-PH�NG TẬP-TIN-XUẤT"
+
+msgid "Firmware missing"
+msgstr "thiếu firmware"
+
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 6ea1397..3499354 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -3735,3 +3735,7 @@ msgstr "��设置(_A)"
 
 #~ msgid "Show password hints"
 #~ msgstr "æ?¾ç¤ºå¯?ç ?æ??示"
+
+msgid "Firmware missing"
+msgstr "�件缺失"
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]