diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2019-10-01 12:27:29 +1300 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2019-10-01 12:28:35 +1300 |
commit | 87f02de5b7f9df9689d602cba5eeb33cce199db2 (patch) | |
tree | fa5132e0e0ad2edfcfe867c85448fec2210ee6de | |
parent | 6691c4dfd3f0cba250a9bd65a8ad519e6564a618 (diff) | |
download | gnome-control-center-87f02de5b7f9df9689d602cba5eeb33cce199db2.tar.gz |
network: Remove unused functions
-rw-r--r-- | panels/network/panel-common.c | 149 | ||||
-rw-r--r-- | panels/network/panel-common.h | 5 |
2 files changed, 0 insertions, 154 deletions
diff --git a/panels/network/panel-common.c b/panels/network/panel-common.c index de447ef27..7759360db 100644 --- a/panels/network/panel-common.c +++ b/panels/network/panel-common.c @@ -31,113 +31,6 @@ #include "panel-common.h" -/** - * panel_device_to_icon_name: - **/ -const gchar * -panel_device_to_icon_name (NMDevice *device, gboolean symbolic) -{ - const gchar *value = NULL; - NMDeviceState state; - NMDeviceModemCapabilities caps; - switch (nm_device_get_device_type (device)) { - case NM_DEVICE_TYPE_ETHERNET: - state = nm_device_get_state (device); - if (state <= NM_DEVICE_STATE_DISCONNECTED) { - value = symbolic ? "network-wired-disconnected-symbolic" - : "network-wired-disconnected"; - } else { - value = symbolic ? "network-wired-symbolic" - : "network-wired"; - } - break; - case NM_DEVICE_TYPE_WIFI: - case NM_DEVICE_TYPE_BT: - case NM_DEVICE_TYPE_OLPC_MESH: - value = symbolic ? "network-wireless-signal-excellent-symbolic" - : "network-wireless"; - break; - case NM_DEVICE_TYPE_MODEM: - caps = nm_device_modem_get_current_capabilities (NM_DEVICE_MODEM (device)); - if ((caps & NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS) || - (caps & NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO)) { - value = symbolic ? "network-cellular-signal-excellent-symbolic" - : "network-cellular"; - break; - } - /* fall thru */ - default: - value = symbolic ? "network-idle-symbolic" - : "network-idle"; - break; - } - return value; -} - -/** - * panel_device_get_sort_category: - * - * Try to return order of approximate connection speed. - * But sort wifi first, since thats the common case. - **/ -gint -panel_device_get_sort_category (NMDevice *device) -{ - gint value; - NMDeviceModemCapabilities caps; - switch (nm_device_get_device_type (device)) { - case NM_DEVICE_TYPE_ETHERNET: - value = 2; - break; - case NM_DEVICE_TYPE_WIFI: - value = 1; - break; - case NM_DEVICE_TYPE_MODEM: - caps = nm_device_modem_get_current_capabilities (NM_DEVICE_MODEM (device)); - if ((caps & NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS) || - (caps & NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO)) { - value = 3; - } - break; - case NM_DEVICE_TYPE_BT: - value = 4; - break; - case NM_DEVICE_TYPE_OLPC_MESH: - value = 5; - break; - default: - value = 6; - break; - } - return value; -} - -/** - * panel_ap_mode_to_localized_string: - **/ -const gchar * -panel_ap_mode_to_localized_string (NM80211Mode mode) -{ - const gchar *value = NULL; - switch (mode) { - case NM_802_11_MODE_UNKNOWN: - /* TRANSLATORS: AP type */ - value = _("Unknown"); - break; - case NM_802_11_MODE_ADHOC: - /* TRANSLATORS: AP type */ - value = _("Ad-hoc"); - break; - case NM_802_11_MODE_INFRA: - /* TRANSLATORS: AP type */ - value = _("Infrastructure"); - break; - default: - break; - } - return value; -} - static const gchar * device_state_to_localized_string (NMDeviceState state) { @@ -190,48 +83,6 @@ device_state_to_localized_string (NMDeviceState state) return value; } -/** - * panel_vpn_state_to_localized_string: - **/ -const gchar * -panel_vpn_state_to_localized_string (NMVpnConnectionState type) -{ - const gchar *value = NULL; - switch (type) { - case NM_DEVICE_STATE_UNKNOWN: - /* TRANSLATORS: VPN status */ - value = _("Status unknown"); - break; - case NM_VPN_CONNECTION_STATE_PREPARE: - case NM_VPN_CONNECTION_STATE_CONNECT: - case NM_VPN_CONNECTION_STATE_IP_CONFIG_GET: - /* TRANSLATORS: VPN status */ - value = _("Connecting"); - break; - case NM_VPN_CONNECTION_STATE_NEED_AUTH: - /* TRANSLATORS: VPN status */ - value = _("Authentication required"); - break; - case NM_VPN_CONNECTION_STATE_ACTIVATED: - /* TRANSLATORS: VPN status */ - value = _("Connected"); - break; - case NM_VPN_CONNECTION_STATE_FAILED: - /* TRANSLATORS: VPN status */ - value = _("Connection failed"); - break; - case NM_VPN_CONNECTION_STATE_DISCONNECTED: - /* TRANSLATORS: VPN status */ - value = _("Not connected"); - break; - default: - /* TRANSLATORS: VPN status */ - value = _("Status unknown (missing)"); - break; - } - return value; -} - static const gchar * device_state_reason_to_localized_string (NMDevice *device) { diff --git a/panels/network/panel-common.h b/panels/network/panel-common.h index 633813ca8..0fa3411ac 100644 --- a/panels/network/panel-common.h +++ b/panels/network/panel-common.h @@ -27,11 +27,6 @@ G_BEGIN_DECLS -const gchar *panel_device_to_icon_name (NMDevice *device, - gboolean symbolic); -gint panel_device_get_sort_category (NMDevice *device); -const gchar *panel_ap_mode_to_localized_string (NM80211Mode mode); -const gchar *panel_vpn_state_to_localized_string (NMVpnConnectionState type); void panel_set_device_status (GtkBuilder *builder, const gchar *label_name, NMDevice *nm_device, |