[network-manager-applet/th/wimax-remove] wimax: remove WiMAX support



commit d7dd84c44a7cce0fb57e19baa98dec0b630677b5
Author: Thomas Haller <thaller redhat com>
Date:   Wed Jul 15 18:03:40 2015 +0200

    wimax: remove WiMAX support
    
    WiMAX is deprecated in libnm 1.2 and removed from NetworkManager core.
    Remove it also from nm-applet.

 man/nm-connection-editor.1.in                |    2 +-
 po/POTFILES.in                               |    3 -
 src/Makefile.am                              |    2 -
 src/applet-device-wimax.c                    |  493 --------------------------
 src/applet-device-wimax.h                    |   32 --
 src/applet-dialogs.c                         |   73 +----
 src/applet.c                                 |   48 ---
 src/applet.h                                 |    3 -
 src/connection-editor/Makefile.am            |    3 -
 src/connection-editor/ce-page-wimax.ui       |   69 ----
 src/connection-editor/connection-helpers.c   |    2 -
 src/connection-editor/nm-connection-editor.c |    4 -
 src/connection-editor/page-wimax.c           |  227 ------------
 src/connection-editor/page-wimax.h           |   59 ---
 src/libnm-gtk/nm-ui-utils.c                  |    2 -
 src/mb-menu-item.c                           |   11 +-
 src/mobile-helpers.c                         |    1 -
 src/mobile-helpers.h                         |    1 -
 18 files changed, 5 insertions(+), 1030 deletions(-)
---
diff --git a/man/nm-connection-editor.1.in b/man/nm-connection-editor.1.in
index 9a971f5..50f697c 100644
--- a/man/nm-connection-editor.1.in
+++ b/man/nm-connection-editor.1.in
@@ -40,7 +40,7 @@ connections to be added, removed, or modified.
 .B \-t, \-\-type=<type>
 Type of connection to create or show.  Values are NetworkManager
 setting names, eg "802\-3\-ethernet", "802\-11\-wireless", "bridge", "bond",
-"wimax", "infiniband", "vlan", etc.  Does nothing if \-\-create or \-\-show
+"infiniband", "vlan", etc.  Does nothing if \-\-create or \-\-show
 is not given.
 .TP
 .B \-s, \-\-show
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 02b138b..9136128 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -16,7 +16,6 @@ src/applet-device-infiniband.c
 src/applet-device-team.c
 src/applet-device-vlan.c
 src/applet-device-wifi.c
-src/applet-device-wimax.c
 src/applet-dialogs.c
 src/applet.h
 [type: gettext/glade]src/connection-editor/ce-ip4-routes.ui
@@ -41,7 +40,6 @@ src/connection-editor/ce-page.c
 [type: gettext/glade]src/connection-editor/ce-page-vlan.ui
 [type: gettext/glade]src/connection-editor/ce-page-wifi-security.ui
 [type: gettext/glade]src/connection-editor/ce-page-wifi.ui
-[type: gettext/glade]src/connection-editor/ce-page-wimax.ui
 [type: gettext/glade]src/connection-editor/ce-ppp-auth-methods.ui
 src/connection-editor/connection-helpers.c
 src/connection-editor/ip4-routes-dialog.c
@@ -70,7 +68,6 @@ src/connection-editor/page-vlan.c
 src/connection-editor/page-vpn.c
 src/connection-editor/page-wifi.c
 src/connection-editor/page-wifi-security.c
-src/connection-editor/page-wimax.c
 src/connection-editor/vpn-helpers.c
 src/ethernet-dialog.c
 [type: gettext/glade]src/gsm-unlock.ui
diff --git a/src/Makefile.am b/src/Makefile.am
index 874892e..7803e63 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -55,8 +55,6 @@ nm_applet_SOURCES = \
        mobile-helpers.h \
        applet-device-bt.h \
        applet-device-bt.c \
-       applet-device-wimax.h \
-       applet-device-wimax.c \
        applet-device-vlan.h \
        applet-device-vlan.c \
        applet-device-bond.h \
diff --git a/src/applet-dialogs.c b/src/applet-dialogs.c
index 3122d0a..923c8c9 100644
--- a/src/applet-dialogs.c
+++ b/src/applet-dialogs.c
@@ -335,33 +335,6 @@ bitrate_changed_cb (GObject *device, GParamSpec *pspec, gpointer user_data)
        g_free (str);
 }
 
-static void
-wimax_cinr_changed_cb (NMDevice *device, GParamSpec *pspec, gpointer user_data)
-{
-       GtkWidget *label = GTK_WIDGET (user_data);
-       gint cinr;
-       char *str = NULL;
-
-       cinr = nm_device_wimax_get_cinr (NM_DEVICE_WIMAX (device));
-       if (cinr)
-               str = g_strdup_printf (_("%d dB"), cinr);
-
-       gtk_label_set_text (GTK_LABEL (label), str ? str : C_("WiMAX CINR", "unknown"));
-       g_free (str);
-}
-
-static void
-wimax_bsid_changed_cb (NMDevice *device, GParamSpec *pspec, gpointer user_data)
-{
-       GtkWidget *label = GTK_WIDGET (user_data);
-       const char *str = NULL;
-
-       str = nm_device_wimax_get_bsid (NM_DEVICE_WIMAX (device));
-       if (!str)
-               str = C_("WiMAX Base Station ID", "unknown");
-       gtk_label_set_text (GTK_LABEL (label), str);
-}
-
 
 static void
 display_ip4_info (NMIPAddress *def_addr, const GPtrArray *addresses, GtkGrid *grid, int *row)
@@ -534,9 +507,7 @@ info_dialog_add_page (GtkNotebook *notebook,
                        str = g_strdup_printf (_("CDMA (%s)"), iface);
                else
                        str = g_strdup_printf (_("Mobile Broadband (%s)"), iface);
-       } else if (NM_IS_DEVICE_WIMAX (device))
-               str = g_strdup_printf (_("WiMAX (%s)"), iface);
-       else
+       } else
                str = g_strdup (iface);
 
 
@@ -564,8 +535,6 @@ info_dialog_add_page (GtkNotebook *notebook,
                str = g_strdup (nm_device_ethernet_get_hw_address (NM_DEVICE_ETHERNET (device)));
        else if (NM_IS_DEVICE_WIFI (device))
                str = g_strdup (nm_device_wifi_get_hw_address (NM_DEVICE_WIFI (device)));
-       else if (NM_IS_DEVICE_WIMAX (device))
-               str = g_strdup (nm_device_wimax_get_hw_address (NM_DEVICE_WIMAX (device)));
 
        desc_widget = create_info_label (_("Hardware Address:"), FALSE);
        desc_object = gtk_widget_get_accessible (desc_widget);
@@ -644,46 +613,6 @@ info_dialog_add_page (GtkNotebook *notebook,
                }
        }
 
-       if (NM_IS_DEVICE_WIMAX (device)) {
-               GtkWidget *bsid_label, *cinr_label;
-
-               /* CINR */
-               cinr_label = create_info_label ("", TRUE);
-               desc_widget = create_info_label (_("CINR:"), FALSE);
-               desc_object = gtk_widget_get_accessible (desc_widget);
-               data_object = gtk_widget_get_accessible (cinr_label);
-               atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
-
-               gtk_grid_attach (grid, desc_widget,
-                                    0, row, 1, 1);
-               gtk_grid_attach (grid, cinr_label,
-                                    1, row, 1, 1);
-               label_info_new (device,
-                               cinr_label,
-                               "notify::" NM_DEVICE_WIMAX_CINR,
-                               G_CALLBACK (wimax_cinr_changed_cb));
-               wimax_cinr_changed_cb (device, NULL, cinr_label);
-               row++;
-
-               /* Base Station ID */
-               bsid_label = create_info_label ("", TRUE);
-               desc_widget = create_info_label (_("BSID:"), FALSE);
-               desc_object = gtk_widget_get_accessible (desc_widget);
-               data_object = gtk_widget_get_accessible (bsid_label);
-               atk_object_add_relationship (desc_object, ATK_RELATION_LABEL_FOR, data_object);
-
-               gtk_grid_attach (grid, desc_widget,
-                                    0, row, 1, 1);
-               gtk_grid_attach (grid, bsid_label,
-                                    1, row, 1, 1);
-               label_info_new (device,
-                               bsid_label,
-                               "notify::" NM_DEVICE_WIMAX_BSID,
-                               G_CALLBACK (wimax_bsid_changed_cb));
-               wimax_bsid_changed_cb (device, NULL, bsid_label);
-               row++;
-       }
-
        /* Empty line */
        gtk_grid_attach (grid, gtk_label_new (""), 0, row, 2, 1);
        row++;
diff --git a/src/applet.c b/src/applet.c
index f2dcca0..c38e890 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -55,7 +55,6 @@
 #include "applet-device-infiniband.h"
 #include "applet-device-vlan.h"
 #include "applet-device-wifi.h"
-#include "applet-device-wimax.h"
 #include "applet-dialogs.h"
 #include "nma-wifi-dialog.h"
 #include "applet-vpn-request.h"
@@ -216,8 +215,6 @@ get_device_class (NMDevice *device, NMApplet *applet)
 #endif
        } else if (NM_IS_DEVICE_BT (device))
                return applet->bt_class;
-       else if (NM_IS_DEVICE_WIMAX (device))
-               return applet->wimax_class;
        else if (NM_IS_DEVICE_VLAN (device))
                return applet->vlan_class;
        else if (NM_IS_DEVICE_BOND (device))
@@ -1818,17 +1815,6 @@ nma_set_wwan_enabled_cb (GtkWidget *widget, NMApplet *applet)
 }
 
 static void
-nma_set_wimax_enabled_cb (GtkWidget *widget, NMApplet *applet)
-{
-       gboolean state;
-
-       g_return_if_fail (applet != NULL);
-
-       state = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget));
-       nm_client_wimax_set_enabled (applet->nm_client, state);
-}
-
-static void
 nma_set_networking_enabled_cb (GtkWidget *widget, NMApplet *applet)
 {
        gboolean state;
@@ -1975,10 +1961,8 @@ nma_context_menu_update (NMApplet *applet)
        gboolean net_enabled = TRUE;
        gboolean have_wifi = FALSE;
        gboolean have_wwan = FALSE;
-       gboolean have_wimax = FALSE;
        gboolean wifi_hw_enabled;
        gboolean wwan_hw_enabled;
-       gboolean wimax_hw_enabled;
 #ifndef ENABLE_INDICATOR
        gboolean notifications_enabled = TRUE;
 #endif
@@ -2029,18 +2013,6 @@ nma_context_menu_update (NMApplet *applet)
        gtk_widget_set_sensitive (GTK_WIDGET (applet->wwan_enabled_item),
                                  wwan_hw_enabled && is_permission_yes (applet, 
NM_CLIENT_PERMISSION_ENABLE_DISABLE_WWAN));
 
-       /* Enable WiMAX */
-       g_signal_handler_block (G_OBJECT (applet->wimax_enabled_item),
-                               applet->wimax_enabled_toggled_id);
-       gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (applet->wimax_enabled_item),
-                                       nm_client_wimax_get_enabled (applet->nm_client));
-       g_signal_handler_unblock (G_OBJECT (applet->wimax_enabled_item),
-                                 applet->wimax_enabled_toggled_id);
-
-       wimax_hw_enabled = nm_client_wimax_hardware_get_enabled (applet->nm_client);
-       gtk_widget_set_sensitive (GTK_WIDGET (applet->wimax_enabled_item),
-                                 wimax_hw_enabled && is_permission_yes (applet, 
NM_CLIENT_PERMISSION_ENABLE_DISABLE_WIMAX));
-
 #ifndef ENABLE_INDICATOR
        /* Enabled notifications */
        g_signal_handler_block (G_OBJECT (applet->notifications_enabled_item),
@@ -2068,8 +2040,6 @@ nma_context_menu_update (NMApplet *applet)
                                have_wifi = TRUE;
                        else if (NM_IS_DEVICE_MODEM (candidate))
                                have_wwan = TRUE;
-                       else if (NM_IS_DEVICE_WIMAX (candidate))
-                               have_wimax = TRUE;
                }
        }
 
@@ -2082,11 +2052,6 @@ nma_context_menu_update (NMApplet *applet)
                gtk_widget_show_all (applet->wwan_enabled_item);
        else
                gtk_widget_hide (applet->wwan_enabled_item);
-
-       if (have_wimax)
-               gtk_widget_show_all (applet->wimax_enabled_item);
-       else
-               gtk_widget_hide (applet->wimax_enabled_item);
 }
 
 static void
@@ -2166,15 +2131,6 @@ static GtkWidget *nma_context_menu_create (NMApplet *applet)
        applet->wwan_enabled_toggled_id = id;
        gtk_menu_shell_append (menu, applet->wwan_enabled_item);
 
-       /* 'Enable WiMAX Mobile Broadband' item */
-       applet->wimax_enabled_item = gtk_check_menu_item_new_with_mnemonic (_("Enable WiMA_X Mobile 
Broadband"));
-       id = g_signal_connect (applet->wimax_enabled_item,
-                              "toggled",
-                              G_CALLBACK (nma_set_wimax_enabled_cb),
-                              applet);
-       applet->wimax_enabled_toggled_id = id;
-       gtk_menu_shell_append (menu, applet->wimax_enabled_item);
-
        nma_menu_add_separator_item (GTK_WIDGET (menu));
 
 #ifndef ENABLE_INDICATOR
@@ -3622,9 +3578,6 @@ initable_init (GInitable *initable, GCancellable *cancellable, GError **error)
        applet->bt_class = applet_device_bt_get_class (applet);
        g_assert (applet->bt_class);
 
-       applet->wimax_class = applet_device_wimax_get_class (applet);
-       g_assert (applet->wimax_class);
-
        applet->vlan_class = applet_device_vlan_get_class (applet);
        g_assert (applet->vlan_class);
 
@@ -3669,7 +3622,6 @@ static void finalize (GObject *object)
        g_slice_free (NMADeviceClass, applet->broadband_class);
 #endif
        g_slice_free (NMADeviceClass, applet->bt_class);
-       g_slice_free (NMADeviceClass, applet->wimax_class);
        g_slice_free (NMADeviceClass, applet->vlan_class);
        g_slice_free (NMADeviceClass, applet->bond_class);
        g_slice_free (NMADeviceClass, applet->team_class);
diff --git a/src/applet.h b/src/applet.h
index d654fab..66e2e5c 100644
--- a/src/applet.h
+++ b/src/applet.h
@@ -106,7 +106,6 @@ typedef struct
        NMADeviceClass *broadband_class;
 #endif
        NMADeviceClass *bt_class;
-       NMADeviceClass *wimax_class;
        NMADeviceClass *vlan_class;
        NMADeviceClass *bond_class;
        NMADeviceClass *team_class;
@@ -151,8 +150,6 @@ typedef struct
        guint           wifi_enabled_toggled_id;
        GtkWidget *             wwan_enabled_item;
        guint           wwan_enabled_toggled_id;
-       GtkWidget *             wimax_enabled_item;
-       guint           wimax_enabled_toggled_id;
 
        GtkWidget *             info_menu_item;
        GtkWidget *             connections_menu_item;
diff --git a/src/connection-editor/Makefile.am b/src/connection-editor/Makefile.am
index 576e3be..880074a 100644
--- a/src/connection-editor/Makefile.am
+++ b/src/connection-editor/Makefile.am
@@ -36,8 +36,6 @@ nm_connection_editor_SOURCES = \
        page-wifi.c \
        page-wifi-security.h \
        page-wifi-security.c \
-       page-wimax.h \
-       page-wimax.c \
        page-infiniband.h \
        page-infiniband.c \
        page-ip4.h \
@@ -103,7 +101,6 @@ ui_DATA = \
        ce-page-ethernet.ui \
        ce-page-wifi.ui \
        ce-page-wifi-security.ui \
-       ce-page-wimax.ui \
        ce-page-infiniband.ui \
        ce-page-bond.ui \
        ce-page-team.ui \
diff --git a/src/connection-editor/connection-helpers.c b/src/connection-editor/connection-helpers.c
index f298a50..27bca67 100644
--- a/src/connection-editor/connection-helpers.c
+++ b/src/connection-editor/connection-helpers.c
@@ -28,7 +28,6 @@
 #include "page-ethernet.h"
 #include "page-wifi.h"
 #include "page-mobile.h"
-#include "page-wimax.h"
 #include "page-bluetooth.h"
 #include "page-dsl.h"
 #include "page-infiniband.h"
@@ -130,7 +129,6 @@ get_connection_type_list (void)
                            NM_TYPE_SETTING_BLUETOOTH,
                            FALSE);
        add_type_data_real (array, _("Bluetooth"), bluetooth_connection_new, NM_TYPE_SETTING_BLUETOOTH);
-       add_type_data_real (array, _("WiMAX"), wimax_connection_new, NM_TYPE_SETTING_WIMAX);
        add_type_data_real (array, _("DSL"), dsl_connection_new, NM_TYPE_SETTING_PPPOE);
        add_type_data_real (array, _("InfiniBand"), infiniband_connection_new, NM_TYPE_SETTING_INFINIBAND);
        add_type_data_virtual (array, _("Bond"), bond_connection_new, NM_TYPE_SETTING_BOND);
diff --git a/src/connection-editor/nm-connection-editor.c b/src/connection-editor/nm-connection-editor.c
index 9e74e8c..fa918f9 100644
--- a/src/connection-editor/nm-connection-editor.c
+++ b/src/connection-editor/nm-connection-editor.c
@@ -48,7 +48,6 @@
 #include "page-bluetooth.h"
 #include "page-ppp.h"
 #include "page-vpn.h"
-#include "page-wimax.h"
 #include "page-infiniband.h"
 #include "page-bond.h"
 #include "page-team.h"
@@ -772,9 +771,6 @@ nm_connection_editor_set_connection (NMConnectionEditor *editor,
                        if (!add_page (editor, ce_page_ppp_new, editor->connection, error))
                                goto out;
                }
-       } else if (!strcmp (connection_type, NM_SETTING_WIMAX_SETTING_NAME)) {
-               if (!add_page (editor, ce_page_wimax_new, editor->connection, error))
-                       goto out;
        } else if (!strcmp (connection_type, NM_SETTING_INFINIBAND_SETTING_NAME)) {
                if (!add_page (editor, ce_page_infiniband_new, editor->connection, error))
                        goto out;
diff --git a/src/libnm-gtk/nm-ui-utils.c b/src/libnm-gtk/nm-ui-utils.c
index 9119deb..5987b21 100644
--- a/src/libnm-gtk/nm-ui-utils.c
+++ b/src/libnm-gtk/nm-ui-utils.c
@@ -328,8 +328,6 @@ nma_utils_get_device_type_name (NMDevice *device)
                return _("Bluetooth");
        case NM_DEVICE_TYPE_OLPC_MESH:
                return _("OLPC Mesh");
-       case NM_DEVICE_TYPE_WIMAX:
-               return _("WiMAX");
        case NM_DEVICE_TYPE_MODEM:
                return _("Mobile Broadband");
        case NM_DEVICE_TYPE_INFINIBAND:
diff --git a/src/mb-menu-item.c b/src/mb-menu-item.c
index 3561bf9..77ce716 100644
--- a/src/mb-menu-item.c
+++ b/src/mb-menu-item.c
@@ -71,14 +71,11 @@ get_tech_name (guint32 tech)
                return _("HSPA");
        case MB_TECH_HSPA_PLUS:
                return _("HSPA+");
-       case MB_TECH_WIMAX:
-               return _("WiMAX");
        case MB_TECH_LTE:
                return _("LTE");
        default:
-               break;
+               return NULL;
        }
-       return NULL;
 }
 
 static void
@@ -112,7 +109,7 @@ nm_mb_menu_item_new (const char *connection_name,
 {
        NMMbMenuItem *item;
        NMMbMenuItemPrivate *priv;
-       const char *tech_name = NULL;
+       const char *tech_name;
 
        item = g_object_new (NM_TYPE_MB_MENU_ITEM, NULL);
        g_assert (item);
@@ -120,9 +117,7 @@ nm_mb_menu_item_new (const char *connection_name,
        priv = NM_MB_MENU_ITEM_GET_PRIVATE (item);
        priv->int_strength = strength;
 
-       /* WiMAX doesn't show tech name */
-       if (technology != MB_TECH_WIMAX)
-               tech_name = get_tech_name (technology);
+       tech_name = get_tech_name (technology);
 
        /* Construct the description string */
        switch (state) {
diff --git a/src/mobile-helpers.c b/src/mobile-helpers.c
index 6166e81..963237b 100644
--- a/src/mobile-helpers.c
+++ b/src/mobile-helpers.c
@@ -135,7 +135,6 @@ mobile_helper_get_tech_icon_name (guint32 tech)
                return "nm-tech-hspa";
        case MB_TECH_LTE:
                return "nm-tech-lte";
-       case MB_TECH_WIMAX:
        default:
                return NULL;
        }
diff --git a/src/mobile-helpers.h b/src/mobile-helpers.h
index 770e1b9..006bd44 100644
--- a/src/mobile-helpers.h
+++ b/src/mobile-helpers.h
@@ -53,7 +53,6 @@ enum {
        MB_TECH_HSPA,
        MB_TECH_HSPA_PLUS,
        MB_TECH_LTE,
-       MB_TECH_WIMAX,
 };
 
 GdkPixbuf *mobile_helper_get_status_pixbuf (guint32 quality,


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