summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@redhat.com>2015-08-07 16:29:03 -0400
committerDan Winship <danw@redhat.com>2015-08-14 09:36:08 -0400
commit4b8eade73dbfce2090fd09de1048adf4782d547a (patch)
tree70fe01a167cfa28b189b3992c247cce45d0a90dd
parent1cf6ac4877e9ae8da4d8444d8663c82da142b281 (diff)
downloadnetwork-manager-applet-4b8eade73dbfce2090fd09de1048adf4782d547a.tar.gz
applet: drop bond, bridge, infiniband, team, and vlan support
At one point we thought people would want/need to control their "enterprisey" devices via nm-applet, but nmcli (or static autoconnect=true configuration) turns out to be a better answer generally. Additionally, probably the most common case of bridges currently is when you are using virtualization or containers, and in that case the bridge is handled entirely by the virt/container system, and showing it in nm-applet just clutters things up, pushing Wi-Fi and VPN down to the bottom of the menu. So drop support for those devices. https://bugzilla.gnome.org/show_bug.cgi?id=753369
-rw-r--r--po/POTFILES.in5
-rw-r--r--src/Makefile.am10
-rw-r--r--src/applet-device-bond.c158
-rw-r--r--src/applet-device-bond.h31
-rw-r--r--src/applet-device-bridge.c157
-rw-r--r--src/applet-device-bridge.h31
-rw-r--r--src/applet-device-infiniband.c205
-rw-r--r--src/applet-device-infiniband.h30
-rw-r--r--src/applet-device-team.c155
-rw-r--r--src/applet-device-team.h27
-rw-r--r--src/applet-device-vlan.c271
-rw-r--r--src/applet-device-vlan.h31
-rw-r--r--src/applet.c167
-rw-r--r--src/applet.h5
14 files changed, 0 insertions, 1283 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c817307a..f3f9ddf3 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -8,14 +8,9 @@ org.gnome.nm-connection-editor.appdata.xml.in
[type: gettext/glade]src/8021x.ui
src/ap-menu-item.c
src/applet.c
-src/applet-device-bond.c
-src/applet-device-bridge.c
src/applet-device-broadband.c
src/applet-device-bt.c
src/applet-device-ethernet.c
-src/applet-device-infiniband.c
-src/applet-device-team.c
-src/applet-device-vlan.c
src/applet-device-wifi.c
src/applet-dialogs.c
src/applet.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 7803e636..6b912593 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -55,16 +55,6 @@ nm_applet_SOURCES = \
mobile-helpers.h \
applet-device-bt.h \
applet-device-bt.c \
- applet-device-vlan.h \
- applet-device-vlan.c \
- applet-device-bond.h \
- applet-device-bond.c \
- applet-device-team.h \
- applet-device-team.c \
- applet-device-bridge.h \
- applet-device-bridge.c \
- applet-device-infiniband.h \
- applet-device-infiniband.c \
fallback-icon.h
if WITH_WWAN
diff --git a/src/applet-device-bond.c b/src/applet-device-bond.c
deleted file mode 100644
index e85f41f8..00000000
--- a/src/applet-device-bond.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright 2008 - 2014 Red Hat, Inc.
- * Copyright 2008 Novell, Inc.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib/gi18n.h>
-#include <gtk/gtk.h>
-
-#include "applet.h"
-#include "applet-device-bond.h"
-#include "utils.h"
-
-static void
-bond_add_menu_item (NMDevice *device,
- gboolean multiple_devices,
- const GPtrArray *connections,
- NMConnection *active,
- GtkWidget *menu,
- NMApplet *applet)
-{
- char *text;
- GtkWidget *item;
-
- text = nm_connection_get_virtual_device_description (connections->pdata[0]);
- item = applet_menu_item_create_device_item_helper (device, applet, text);
- g_free (text);
-
- gtk_widget_set_sensitive (item, FALSE);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_widget_show (item);
-
- applet_add_connection_items (device, connections, TRUE, active, NMA_ADD_ACTIVE, menu, applet);
-
- /* Notify user of unmanaged or unavailable device */
- if (device) {
- item = nma_menu_device_get_menu_item (device, applet, NULL);
- if (item) {
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_widget_show (item);
- }
- }
-
- if (!device || !nma_menu_device_check_unusable (device)) {
- if (!active || connections->len > 1)
- applet_menu_item_add_complex_separator_helper (menu, applet, _("Available"));
-
- applet_add_connection_items (device, connections, TRUE, active, NMA_ADD_INACTIVE, menu, applet);
- }
-}
-
-static void
-bond_notify_connected (NMDevice *device,
- const char *msg,
- NMApplet *applet)
-{
- applet_do_notify_with_pref (applet,
- _("Connection Established"),
- msg ? msg : _("You are now connected to the bonded network."),
- "nm-device-wired",
- PREF_DISABLE_CONNECTED_NOTIFICATIONS);
-}
-
-static void
-bond_get_icon (NMDevice *device,
- NMDeviceState state,
- NMConnection *connection,
- GdkPixbuf **out_pixbuf,
- const char **out_icon_name,
- char **tip,
- NMApplet *applet)
-{
- NMSettingConnection *s_con;
- const char *id;
-
- id = nm_device_get_iface (NM_DEVICE (device));
- if (connection) {
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
- id = nm_setting_connection_get_id (s_con);
- }
-
- switch (state) {
- case NM_DEVICE_STATE_PREPARE:
- *tip = g_strdup_printf (_("Preparing bond connection '%s'..."), id);
- break;
- case NM_DEVICE_STATE_CONFIG:
- *tip = g_strdup_printf (_("Configuring bond connection '%s'..."), id);
- break;
- case NM_DEVICE_STATE_NEED_AUTH:
- *tip = g_strdup_printf (_("User authentication required for bond connection '%s'..."), id);
- break;
- case NM_DEVICE_STATE_IP_CONFIG:
- *tip = g_strdup_printf (_("Requesting address for '%s'..."), id);
- break;
- case NM_DEVICE_STATE_ACTIVATED:
- *out_icon_name = "nm-device-wired";
- *tip = g_strdup_printf (_("Bond connection '%s' active"), id);
- break;
- default:
- break;
- }
-}
-
-static gboolean
-bond_new_auto_connection (NMDevice *device,
- gpointer dclass_data,
- AppletNewAutoConnectionCallback callback,
- gpointer callback_data)
-{
- return FALSE;
-}
-
-
-static gboolean
-bond_get_secrets (SecretsRequest *req, GError **error)
-{
- /* No 802.1x or PPPoE possible yet on bonds */
- return FALSE;
-}
-
-NMADeviceClass *
-applet_device_bond_get_class (NMApplet *applet)
-{
- NMADeviceClass *dclass;
-
- dclass = g_slice_new0 (NMADeviceClass);
- if (!dclass)
- return NULL;
-
- dclass->new_auto_connection = bond_new_auto_connection;
- dclass->add_menu_item = bond_add_menu_item;
- dclass->notify_connected = bond_notify_connected;
- dclass->get_icon = bond_get_icon;
- dclass->get_secrets = bond_get_secrets;
-
- return dclass;
-}
diff --git a/src/applet-device-bond.h b/src/applet-device-bond.h
deleted file mode 100644
index 227c9511..00000000
--- a/src/applet-device-bond.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * (C) Copyright 2008 Red Hat, Inc.
- * (C) Copyright 2008 Novell, Inc.
- */
-
-#ifndef __APPLET_DEVICE_BOND_H__
-#define __APPLET_DEVICE_BOND_H__
-
-#include "applet.h"
-
-NMADeviceClass *applet_device_bond_get_class (NMApplet *applet);
-
-#endif /* __APPLET_DEVICE_BOND_H__ */
diff --git a/src/applet-device-bridge.c b/src/applet-device-bridge.c
deleted file mode 100644
index ebae9ec9..00000000
--- a/src/applet-device-bridge.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright 2008 - 2014 Red Hat, Inc.
- * Copyright 2008 Novell, Inc.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib/gi18n.h>
-#include <gtk/gtk.h>
-
-#include "applet.h"
-#include "applet-device-bridge.h"
-#include "utils.h"
-
-static void
-bridge_add_menu_item (NMDevice *device,
- gboolean multiple_devices,
- const GPtrArray *connections,
- NMConnection *active,
- GtkWidget *menu,
- NMApplet *applet)
-{
- char *text;
- GtkWidget *item;
-
- text = nm_connection_get_virtual_device_description (connections->pdata[0]);
- item = applet_menu_item_create_device_item_helper (device, applet, text);
- g_free (text);
-
- gtk_widget_set_sensitive (item, FALSE);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_widget_show (item);
-
- applet_add_connection_items (device, connections, TRUE, active, NMA_ADD_ACTIVE, menu, applet);
-
- /* Notify user of unmanaged or unavailable device */
- if (device) {
- item = nma_menu_device_get_menu_item (device, applet, NULL);
- if (item) {
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_widget_show (item);
- }
- }
-
- if (!device || !nma_menu_device_check_unusable (device)) {
- if (!active || connections->len > 1)
- applet_menu_item_add_complex_separator_helper (menu, applet, _("Available"));
-
- applet_add_connection_items (device, connections, TRUE, active, NMA_ADD_INACTIVE, menu, applet);
- }
-}
-
-static void
-bridge_notify_connected (NMDevice *device,
- const char *msg,
- NMApplet *applet)
-{
- applet_do_notify_with_pref (applet,
- _("Connection Established"),
- msg ? msg : _("You are now connected to the bridged network."),
- "nm-device-wired",
- PREF_DISABLE_CONNECTED_NOTIFICATIONS);
-}
-
-static void
-bridge_get_icon (NMDevice *device,
- NMDeviceState state,
- NMConnection *connection,
- GdkPixbuf **out_pixbuf,
- const char **out_icon_name,
- char **tip,
- NMApplet *applet)
-{
- NMSettingConnection *s_con;
- const char *id;
-
- id = nm_device_get_iface (NM_DEVICE (device));
- if (connection) {
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
- id = nm_setting_connection_get_id (s_con);
- }
-
- switch (state) {
- case NM_DEVICE_STATE_PREPARE:
- *tip = g_strdup_printf (_("Preparing bridge connection '%s'..."), id);
- break;
- case NM_DEVICE_STATE_CONFIG:
- *tip = g_strdup_printf (_("Configuring bridge connection '%s'..."), id);
- break;
- case NM_DEVICE_STATE_NEED_AUTH:
- *tip = g_strdup_printf (_("User authentication required for bridge connection '%s'..."), id);
- break;
- case NM_DEVICE_STATE_IP_CONFIG:
- *tip = g_strdup_printf (_("Requesting address for '%s'..."), id);
- break;
- case NM_DEVICE_STATE_ACTIVATED:
- *out_icon_name = "nm-device-wired";
- *tip = g_strdup_printf (_("Bridge connection '%s' active"), id);
- break;
- default:
- break;
- }
-}
-
-static gboolean
-bridge_new_auto_connection (NMDevice *device,
- gpointer dclass_data,
- AppletNewAutoConnectionCallback callback,
- gpointer callback_data)
-{
- return FALSE;
-}
-
-static gboolean
-bridge_get_secrets (SecretsRequest *req, GError **error)
-{
- /* No 802.1x or PPPoE possible yet on bridges */
- return FALSE;
-}
-
-NMADeviceClass *
-applet_device_bridge_get_class (NMApplet *applet)
-{
- NMADeviceClass *dclass;
-
- dclass = g_slice_new0 (NMADeviceClass);
- if (!dclass)
- return NULL;
-
- dclass->new_auto_connection = bridge_new_auto_connection;
- dclass->add_menu_item = bridge_add_menu_item;
- dclass->notify_connected = bridge_notify_connected;
- dclass->get_icon = bridge_get_icon;
- dclass->get_secrets = bridge_get_secrets;
-
- return dclass;
-}
diff --git a/src/applet-device-bridge.h b/src/applet-device-bridge.h
deleted file mode 100644
index 33dc49ac..00000000
--- a/src/applet-device-bridge.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * (C) Copyright 2008 Red Hat, Inc.
- * (C) Copyright 2008 Novell, Inc.
- */
-
-#ifndef __APPLET_DEVICE_BRIDGE_H__
-#define __APPLET_DEVICE_BRIDGE_H__
-
-#include "applet.h"
-
-NMADeviceClass *applet_device_bridge_get_class (NMApplet *applet);
-
-#endif /* __APPLET_DEVICE_BRIDGE_H__ */
diff --git a/src/applet-device-infiniband.c b/src/applet-device-infiniband.c
deleted file mode 100644
index 43536a30..00000000
--- a/src/applet-device-infiniband.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager Applet -- allow user control over networking
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright 2013 - 2014 Red Hat, Inc.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib/gi18n.h>
-#include <gtk/gtk.h>
-
-#include "applet.h"
-#include "applet-device-infiniband.h"
-
-#define DEFAULT_INFINIBAND_NAME _("Auto InfiniBand")
-
-static gboolean
-infiniband_new_auto_connection (NMDevice *device,
- gpointer dclass_data,
- AppletNewAutoConnectionCallback callback,
- gpointer callback_data)
-{
- NMConnection *connection;
- NMSettingInfiniband *s_infiniband = NULL;
- NMSettingConnection *s_con;
- char *uuid;
-
- connection = nm_simple_connection_new ();
-
- s_infiniband = NM_SETTING_INFINIBAND (nm_setting_infiniband_new ());
- nm_connection_add_setting (connection, NM_SETTING (s_infiniband));
-
- s_con = NM_SETTING_CONNECTION (nm_setting_connection_new ());
- uuid = nm_utils_uuid_generate ();
- g_object_set (s_con,
- NM_SETTING_CONNECTION_ID, DEFAULT_INFINIBAND_NAME,
- NM_SETTING_CONNECTION_TYPE, NM_SETTING_INFINIBAND_SETTING_NAME,
- NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
- NM_SETTING_CONNECTION_UUID, uuid,
- NULL);
- g_free (uuid);
-
- nm_connection_add_setting (connection, NM_SETTING (s_con));
-
- (*callback) (connection, TRUE, FALSE, callback_data);
- return TRUE;
-}
-
-static void
-infiniband_add_menu_item (NMDevice *device,
- gboolean multiple_devices,
- const GPtrArray *connections,
- NMConnection *active,
- GtkWidget *menu,
- NMApplet *applet)
-{
- char *text;
- GtkWidget *item;
- gboolean carrier = TRUE;
-
- if (multiple_devices) {
- const char *desc;
-
- desc = nm_device_get_description (device);
-
- if (connections->len > 1)
- text = g_strdup_printf (_("InfiniBand Networks (%s)"), desc);
- else
- text = g_strdup_printf (_("InfiniBand Network (%s)"), desc);
- } else {
- if (connections->len > 1)
- text = g_strdup (_("InfiniBand Networks"));
- else
- text = g_strdup (_("InfiniBand Network"));
- }
-
- item = applet_menu_item_create_device_item_helper (device, applet, text);
- g_free (text);
-
- /* Only dim the item if the device supports carrier detection AND
- * we know it doesn't have a link.
- */
- if (nm_device_get_capabilities (device) & NM_DEVICE_CAP_CARRIER_DETECT)
- carrier = nm_device_infiniband_get_carrier (NM_DEVICE_INFINIBAND (device));
-
- gtk_widget_set_sensitive (item, FALSE);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_widget_show (item);
-
- if (connections->len)
- applet_add_connection_items (device, connections, carrier, active, NMA_ADD_ACTIVE, menu, applet);
-
- /* Notify user of unmanaged or unavailable device */
- item = nma_menu_device_get_menu_item (device, applet, carrier ? NULL : _("disconnected"));
- if (item) {
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_widget_show (item);
- }
-
- if (!nma_menu_device_check_unusable (device)) {
- if ((!active && connections->len) || (active && connections->len > 1))
- applet_menu_item_add_complex_separator_helper (menu, applet, _("Available"));
-
- if (connections->len)
- applet_add_connection_items (device, connections, carrier, active, NMA_ADD_INACTIVE, menu, applet);
- else
- applet_add_default_connection_item (device, DEFAULT_INFINIBAND_NAME, carrier, menu, applet);
- }
-}
-
-static void
-infiniband_notify_connected (NMDevice *device,
- const char *msg,
- NMApplet *applet)
-{
- applet_do_notify_with_pref (applet,
- _("Connection Established"),
- msg ? msg : _("You are now connected to the InfiniBand network."),
- "nm-device-wired",
- PREF_DISABLE_CONNECTED_NOTIFICATIONS);
-}
-
-static void
-infiniband_get_icon (NMDevice *device,
- NMDeviceState state,
- NMConnection *connection,
- GdkPixbuf **out_pixbuf,
- const char **out_icon_name,
- char **tip,
- NMApplet *applet)
-{
- NMSettingConnection *s_con;
- const char *id;
-
- id = nm_device_get_iface (NM_DEVICE (device));
- if (connection) {
- s_con = nm_connection_get_setting_connection (connection);
- id = nm_setting_connection_get_id (s_con);
- }
-
- switch (state) {
- case NM_DEVICE_STATE_PREPARE:
- *tip = g_strdup_printf (_("Preparing InfiniBand connection '%s'..."), id);
- break;
- case NM_DEVICE_STATE_CONFIG:
- *tip = g_strdup_printf (_("Configuring InfiniBand connection '%s'..."), id);
- break;
- case NM_DEVICE_STATE_NEED_AUTH:
- *tip = g_strdup_printf (_("User authentication required for InfiniBand connection '%s'..."), id);
- break;
- case NM_DEVICE_STATE_IP_CONFIG:
- *tip = g_strdup_printf (_("Requesting address for '%s'..."), id);
- break;
- case NM_DEVICE_STATE_ACTIVATED:
- *out_icon_name = "nm-device-wired";
- *tip = g_strdup_printf (_("InfiniBand connection '%s' active"), id);
- break;
- default:
- break;
- }
-}
-
-
-static gboolean
-infiniband_get_secrets (SecretsRequest *req, GError **error)
-{
- /* No 802.1X possible yet on InfiniBand */
- return FALSE;
-}
-
-NMADeviceClass *
-applet_device_infiniband_get_class (NMApplet *applet)
-{
- NMADeviceClass *dclass;
-
- dclass = g_slice_new0 (NMADeviceClass);
- if (!dclass)
- return NULL;
-
- dclass->new_auto_connection = infiniband_new_auto_connection;
- dclass->add_menu_item = infiniband_add_menu_item;
- dclass->notify_connected = infiniband_notify_connected;
- dclass->get_icon = infiniband_get_icon;
- dclass->get_secrets = infiniband_get_secrets;
-
- return dclass;
-}
diff --git a/src/applet-device-infiniband.h b/src/applet-device-infiniband.h
deleted file mode 100644
index 46229554..00000000
--- a/src/applet-device-infiniband.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * (C) Copyright 2013 Red Hat, Inc.
- */
-
-#ifndef __APPLET_DEVICE_INFINIBAND_H__
-#define __APPLET_DEVICE_INFINIBAND_H__
-
-#include "applet.h"
-
-NMADeviceClass *applet_device_infiniband_get_class (NMApplet *applet);
-
-#endif /* __APPLET_DEVICE_INFINIBAND_H__ */
diff --git a/src/applet-device-team.c b/src/applet-device-team.c
deleted file mode 100644
index 61341f5d..00000000
--- a/src/applet-device-team.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright 2013 Jiri Pirko <jiri@resnulli.us>
- * Copyright 2013 - 2014 Red Hat, Inc.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib/gi18n.h>
-#include <gtk/gtk.h>
-
-#include "applet.h"
-#include "applet-device-team.h"
-#include "utils.h"
-
-static void
-team_add_menu_item (NMDevice *device,
- gboolean multiple_devices,
- const GPtrArray *connections,
- NMConnection *active,
- GtkWidget *menu,
- NMApplet *applet)
-{
- char *text;
- GtkWidget *item;
-
- text = nm_connection_get_virtual_device_description (connections->pdata[0]);
- item = applet_menu_item_create_device_item_helper (device, applet, text);
- g_free (text);
-
- gtk_widget_set_sensitive (item, FALSE);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_widget_show (item);
-
- applet_add_connection_items (device, connections, TRUE, active, NMA_ADD_ACTIVE, menu, applet);
-
- /* Notify user of unmanaged or unavailable device */
- if (device) {
- item = nma_menu_device_get_menu_item (device, applet, NULL);
- if (item) {
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_widget_show (item);
- }
- }
-
- if (!device || !nma_menu_device_check_unusable (device)) {
- if (!active || connections->len > 1)
- applet_menu_item_add_complex_separator_helper (menu, applet, _("Available"));
-
- applet_add_connection_items (device, connections, TRUE, active, NMA_ADD_INACTIVE, menu, applet);
- }
-}
-
-static void
-team_notify_connected (NMDevice *device,
- const char *msg,
- NMApplet *applet)
-{
- applet_do_notify_with_pref (applet,
- _("Connection Established"),
- msg ? msg : _("You are now connected to the teamed network."),
- "nm-device-wired",
- PREF_DISABLE_CONNECTED_NOTIFICATIONS);
-}
-
-static void
-team_get_icon (NMDevice *device,
- NMDeviceState state,
- NMConnection *connection,
- GdkPixbuf **out_pixbuf,
- const char **out_icon_name,
- char **tip,
- NMApplet *applet)
-{
- NMSettingConnection *s_con;
- const char *id;
-
- id = nm_device_get_iface (NM_DEVICE (device));
- if (connection) {
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
- id = nm_setting_connection_get_id (s_con);
- }
-
- switch (state) {
- case NM_DEVICE_STATE_PREPARE:
- *tip = g_strdup_printf (_("Preparing team connection '%s'..."), id);
- break;
- case NM_DEVICE_STATE_CONFIG:
- *tip = g_strdup_printf (_("Configuring team connection '%s'..."), id);
- break;
- case NM_DEVICE_STATE_NEED_AUTH:
- *tip = g_strdup_printf (_("User authentication required for team connection '%s'..."), id);
- break;
- case NM_DEVICE_STATE_IP_CONFIG:
- *tip = g_strdup_printf (_("Requesting address for '%s'..."), id);
- break;
- case NM_DEVICE_STATE_ACTIVATED:
- *out_icon_name = "nm-device-wired";
- *tip = g_strdup_printf (_("Team connection '%s' active"), id);
- break;
- default:
- break;
- }
-}
-
-static gboolean
-team_new_auto_connection (NMDevice *device,
- gpointer dclass_data,
- AppletNewAutoConnectionCallback callback,
- gpointer callback_data)
-{
- return FALSE;
-}
-
-
-static gboolean
-team_get_secrets (SecretsRequest *req, GError **error)
-{
- /* No 802.1x or PPPoE possible yet on teams */
- return FALSE;
-}
-
-NMADeviceClass *
-applet_device_team_get_class (NMApplet *applet)
-{
- NMADeviceClass *dclass;
-
- dclass = g_slice_new0 (NMADeviceClass);
- if (!dclass)
- return NULL;
-
- dclass->new_auto_connection = team_new_auto_connection;
- dclass->add_menu_item = team_add_menu_item;
- dclass->notify_connected = team_notify_connected;
- dclass->get_icon = team_get_icon;
- dclass->get_secrets = team_get_secrets;
-
- return dclass;
-}
diff --git a/src/applet-device-team.h b/src/applet-device-team.h
deleted file mode 100644
index 76ef2eb1..00000000
--- a/src/applet-device-team.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/*
- * Copyright (C) 2013 Jiri Pirko <jiri@resnulli.us>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef __APPLET_DEVICE_TEAM_H__
-#define __APPLET_DEVICE_TEAM_H__
-
-#include "applet.h"
-
-NMADeviceClass *applet_device_team_get_class (NMApplet *applet);
-
-#endif /* __APPLET_DEVICE_TEAM_H__ */
diff --git a/src/applet-device-vlan.c b/src/applet-device-vlan.c
deleted file mode 100644
index 0d7a2ff9..00000000
--- a/src/applet-device-vlan.c
+++ /dev/null
@@ -1,271 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright 2008 - 2014 Red Hat, Inc.
- * Copyright 2008 Novell, Inc.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib/gi18n.h>
-#include <gtk/gtk.h>
-
-#include "applet.h"
-#include "applet-device-vlan.h"
-
-static NMDevice *
-find_device_by_iface (const char *iface, const GPtrArray *devices)
-{
- NMDevice *candidate;
- int i;
-
- for (i = 0; i < devices->len; i++) {
- candidate = devices->pdata[i];
-
- if (!g_strcmp0 (iface, nm_device_get_iface (candidate)))
- return candidate;
- }
- return NULL;
-}
-
-static NMDevice *
-find_device_by_mac (const GByteArray *mac, const GPtrArray *devices)
-{
- NMDevice *candidate, *device = NULL;
- char *vlan_hw_address, *candidate_hw_address;
- int i;
-
- vlan_hw_address = nm_utils_hwaddr_ntoa (mac->data, mac->len);
-
- for (i = 0; i < devices->len && device == NULL; i++) {
- candidate = devices->pdata[i];
-
- if (!g_object_class_find_property (G_OBJECT_GET_CLASS (candidate),
- "hw-address"))
- continue;
-
- g_object_get (G_OBJECT (candidate),
- "hw-address", &candidate_hw_address,
- NULL);
- if (!g_strcmp0 (vlan_hw_address, candidate_hw_address))
- device = candidate;
- g_free (candidate_hw_address);
- }
- g_free (vlan_hw_address);
-
- return device;
-}
-
-static NMDevice *
-find_vlan_parent (const GPtrArray *connections, NMApplet *applet)
-{
- const GPtrArray *devices;
- NMDevice *parent_device;
- int i;
-
- devices = nm_client_get_devices (applet->nm_client);
- if (!devices)
- return NULL;
-
- for (i = 0; i < connections->len; i++) {
- NMConnection *connection = connections->pdata[i];
- NMSettingVlan *s_vlan;
- const char *parent;
-
- s_vlan = nm_connection_get_setting_vlan (connection);
- g_return_val_if_fail (s_vlan != NULL, NULL);
-
- parent = nm_setting_vlan_get_parent (s_vlan);
- if (parent && nm_utils_iface_valid_name (parent)) {
- parent_device = find_device_by_iface (parent, devices);
- } else {
- NMSettingConnection *s_con;
- NMSetting *s_hw;
- const char *type;
- GByteArray *mac;
-
- s_con = nm_connection_get_setting_connection (connection);
- type = nm_setting_connection_get_connection_type (s_con);
- s_hw = nm_connection_get_setting_by_name (connection, type);
- if (!s_hw) {
- g_warn_if_reached ();
- continue;
- }
-
- if (!g_object_class_find_property (G_OBJECT_GET_CLASS (s_hw),
- "mac-address"))
- continue;
-
- g_object_get (G_OBJECT (s_hw),
- "mac-address", &mac,
- NULL);
- if (mac) {
- parent_device = find_device_by_mac (mac, devices);
- g_byte_array_unref (mac);
- } else
- parent_device = NULL;
- }
-
- if (parent_device)
- return parent_device;
- }
-
- return NULL;
-}
-
-static void
-vlan_add_menu_item (NMDevice *device,
- gboolean multiple_devices,
- const GPtrArray *connections,
- NMConnection *active,
- GtkWidget *menu,
- NMApplet *applet)
-{
- char *text;
- GtkWidget *item;
- gboolean carrier = TRUE;
-
- text = nm_connection_get_virtual_device_description (connections->pdata[0]);
- item = applet_menu_item_create_device_item_helper (device, applet, text);
- g_free (text);
-
- /* If the VLAN device exists, check its carrier */
- if (device && nm_device_get_capabilities (device) & NM_DEVICE_CAP_CARRIER_DETECT)
- carrier = nm_device_vlan_get_carrier (NM_DEVICE_VLAN (device));
- else {
- NMDevice *parent;
-
- /* If we can find its parent, check the parent's carrier */
- parent = find_vlan_parent (connections, applet);
-
- if (parent && nm_device_get_capabilities (parent) & NM_DEVICE_CAP_CARRIER_DETECT)
- g_object_get (G_OBJECT (parent), "carrier", &carrier, NULL);
- } /* else fall back to assuming carrier is present */
-
- gtk_widget_set_sensitive (item, FALSE);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_widget_show (item);
-
- applet_add_connection_items (device, connections, carrier, active, NMA_ADD_ACTIVE, menu, applet);
-
- /* Notify user of unmanaged or unavailable device */
- if (device) {
- item = nma_menu_device_get_menu_item (device, applet, carrier ? NULL : _("disconnected"));
- if (item) {
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_widget_show (item);
- }
- }
-
- if (!device || !nma_menu_device_check_unusable (device)) {
- if (!active || connections->len > 1)
- applet_menu_item_add_complex_separator_helper (menu, applet, _("Available"));
-
- if (connections->len)
- applet_add_connection_items (device, connections, carrier, active, NMA_ADD_INACTIVE, menu, applet);
- }
-}
-
-static void
-vlan_notify_connected (NMDevice *device,
- const char *msg,
- NMApplet *applet)
-{
- applet_do_notify_with_pref (applet,
- _("Connection Established"),
- msg ? msg : _("You are now connected to the VLAN."),
- "nm-device-wired",
- PREF_DISABLE_CONNECTED_NOTIFICATIONS);
-}
-
-static void
-vlan_get_icon (NMDevice *device,
- NMDeviceState state,
- NMConnection *connection,
- GdkPixbuf **out_pixbuf,
- const char **out_icon_name,
- char **tip,
- NMApplet *applet)
-{
- NMSettingConnection *s_con;
- const char *id;
-
- id = nm_device_get_iface (NM_DEVICE (device));
- if (connection) {
- s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
- id = nm_setting_connection_get_id (s_con);
- }
-
- switch (state) {
- case NM_DEVICE_STATE_PREPARE:
- *tip = g_strdup_printf (_("Preparing VLAN connection '%s'..."), id);
- break;
- case NM_DEVICE_STATE_CONFIG:
- *tip = g_strdup_printf (_("Configuring VLAN connection '%s'..."), id);
- break;
- case NM_DEVICE_STATE_NEED_AUTH:
- *tip = g_strdup_printf (_("User authentication required for VLAN connection '%s'..."), id);
- break;
- case NM_DEVICE_STATE_IP_CONFIG:
- *tip = g_strdup_printf (_("Requesting address for '%s'..."), id);
- break;
- case NM_DEVICE_STATE_ACTIVATED:
- *out_icon_name = "nm-device-wired";
- *tip = g_strdup_printf (_("VLAN connection '%s' active"), id);
- break;
- default:
- break;
- }
-}
-
-static gboolean
-vlan_new_auto_connection (NMDevice *device,
- gpointer dclass_data,
- AppletNewAutoConnectionCallback callback,
- gpointer callback_data)
-{
- return FALSE;
-}
-
-static gboolean
-vlan_get_secrets (SecretsRequest *req, GError **error)
-{
- /* No 802.1x or PPPoE possible yet on VLANs */
- return FALSE;
-}
-
-NMADeviceClass *
-applet_device_vlan_get_class (NMApplet *applet)
-{
- NMADeviceClass *dclass;
-
- dclass = g_slice_new0 (NMADeviceClass);
- if (!dclass)
- return NULL;
-
- dclass->new_auto_connection = vlan_new_auto_connection;
- dclass->add_menu_item = vlan_add_menu_item;
- dclass->notify_connected = vlan_notify_connected;
- dclass->get_icon = vlan_get_icon;
- dclass->get_secrets = vlan_get_secrets;
-
- return dclass;
-}
diff --git a/src/applet-device-vlan.h b/src/applet-device-vlan.h
deleted file mode 100644
index e905f426..00000000
--- a/src/applet-device-vlan.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * (C) Copyright 2008 Red Hat, Inc.
- * (C) Copyright 2008 Novell, Inc.
- */
-
-#ifndef __APPLET_DEVICE_VLAN_H__
-#define __APPLET_DEVICE_VLAN_H__
-
-#include "applet.h"
-
-NMADeviceClass *applet_device_vlan_get_class (NMApplet *applet);
-
-#endif /* __APPLET_DEVICE_VLAN_H__ */
diff --git a/src/applet.c b/src/applet.c
index c38e8904..d65e6121 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -47,13 +47,8 @@
#include <libnotify/notify.h>
#include "applet.h"
-#include "applet-device-bond.h"
-#include "applet-device-team.h"
-#include "applet-device-bridge.h"
#include "applet-device-bt.h"
#include "applet-device-ethernet.h"
-#include "applet-device-infiniband.h"
-#include "applet-device-vlan.h"
#include "applet-device-wifi.h"
#include "applet-dialogs.h"
#include "nma-wifi-dialog.h"
@@ -215,16 +210,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_VLAN (device))
- return applet->vlan_class;
- else if (NM_IS_DEVICE_BOND (device))
- return applet->bond_class;
- else if (NM_IS_DEVICE_TEAM (device))
- return applet->team_class;
- else if (NM_IS_DEVICE_BRIDGE (device))
- return applet->bridge_class;
- else if (NM_IS_DEVICE_INFINIBAND (device))
- return applet->infiniband_class;
else
g_debug ("%s: Unknown device type '%s'", __func__, G_OBJECT_TYPE_NAME (device));
return NULL;
@@ -255,14 +240,6 @@ get_device_class_from_connection (NMConnection *connection, NMApplet *applet)
#endif
else if (!strcmp (ctype, NM_SETTING_BLUETOOTH_SETTING_NAME))
return applet->bt_class;
- else if (!strcmp (ctype, NM_SETTING_BOND_SETTING_NAME))
- return applet->bond_class;
- else if (!strcmp (ctype, NM_SETTING_TEAM_SETTING_NAME))
- return applet->team_class;
- else if (!strcmp (ctype, NM_SETTING_BRIDGE_SETTING_NAME))
- return applet->bridge_class;
- else if (!strcmp (ctype, NM_SETTING_VLAN_SETTING_NAME))
- return applet->vlan_class;
else
g_warning ("%s: unhandled connection type '%s'", __func__, ctype);
return NULL;
@@ -1382,40 +1359,6 @@ applet_find_active_connection_for_device (NMDevice *device,
return NULL;
}
-static NMConnection *
-applet_find_active_connection_for_virtual_device (const char *iface,
- NMApplet *applet,
- NMActiveConnection **out_active)
-{
- const GPtrArray *active_connections;
- int i;
-
- g_return_val_if_fail (iface != NULL, NULL);
- g_return_val_if_fail (NM_IS_APPLET (applet), NULL);
- if (out_active)
- g_return_val_if_fail (*out_active == NULL, NULL);
-
- active_connections = nm_client_get_active_connections (applet->nm_client);
- for (i = 0; i < active_connections->len; i++) {
- NMRemoteConnection *conn;
- NMActiveConnection *active;
-
- active = NM_ACTIVE_CONNECTION (g_ptr_array_index (active_connections, i));
- conn = nm_active_connection_get_connection (active);
-
- if (!conn)
- continue;
-
- if (!g_strcmp0 (nm_connection_get_interface_name (NM_CONNECTION (conn)), iface)) {
- if (out_active)
- *out_active = active;
- return NM_CONNECTION (conn);
- }
- }
-
- return NULL;
-}
-
gboolean
nma_menu_device_check_unusable (NMDevice *device)
{
@@ -1555,86 +1498,6 @@ add_device_items (NMDeviceType type, const GPtrArray *all_devices,
return n_devices;
}
-static gint
-sort_connections_by_ifname (gconstpointer a, gconstpointer b)
-{
- NMConnection *aa = *(NMConnection **)a;
- NMConnection *bb = *(NMConnection **)b;
-
- return strcmp (nm_connection_get_interface_name (aa),
- nm_connection_get_interface_name (bb));
-}
-
-static int
-add_virtual_items (const char *type, const GPtrArray *all_devices,
- const GPtrArray *all_connections, GtkWidget *menu, NMApplet *applet)
-{
- GPtrArray *connections;
- int i, n_devices = 0;
-
- connections = g_ptr_array_sized_new (5);
- for (i = 0; i < all_connections->len; i++) {
- NMConnection *connection = all_connections->pdata[i];
-
- if (!nm_connection_get_interface_name (connection))
- continue;
-
- if (nm_connection_is_type (connection, type))
- g_ptr_array_add (connections, connection);
- }
-
- g_ptr_array_sort (connections, sort_connections_by_ifname);
- /* Count the number of unique interface names */
- for (i = 0; i < connections->len; i++) {
- NMConnection *connection = connections->pdata[i];
-
- n_devices++;
-
- /* Skip ahead until we find a connection with a different ifname
- * (or reach the end of the list).
- */
- while ( i < connections->len
- && sort_connections_by_ifname (&connection, &connections->pdata[i]) == 0)
- i++;
- }
-
- for (i = 0; i < connections->len; i++) {
- NMConnection *connection = connections->pdata[i];
- NMDevice *device = NULL;
- const char *iface = nm_connection_get_interface_name (connection);
- GPtrArray *iface_connections;
- NMADeviceClass *dclass;
- NMConnection *active;
- int d;
-
- for (d = 0; d < all_devices->len; d++) {
- NMDevice *candidate = all_devices->pdata[d];
-
- if (!strcmp (nm_device_get_iface (candidate), iface)) {
- device = candidate;
- break;
- }
- }
-
- iface_connections = g_ptr_array_sized_new (5);
- while ( i < connections->len
- && sort_connections_by_ifname (&connection, &connections->pdata[i]) == 0) {
- g_ptr_array_add (iface_connections, connections->pdata[i]);
- i++;
- }
-
- active = applet_find_active_connection_for_virtual_device (iface, applet, NULL);
-
- dclass = get_device_class_from_connection (connection, applet);
- dclass->add_menu_item (device, n_devices > 1, iface_connections, active, menu, applet);
-
- g_ptr_array_unref (iface_connections);
- }
-
- g_ptr_array_unref (connections);
- return n_devices;
-}
-
static void
nma_menu_add_devices (GtkWidget *menu, NMApplet *applet)
{
@@ -1646,18 +1509,8 @@ nma_menu_add_devices (GtkWidget *menu, NMApplet *applet)
all_devices = nm_client_get_devices (applet->nm_client);
n_items = 0;
- n_items += add_virtual_items (NM_SETTING_BRIDGE_SETTING_NAME,
- all_devices, all_connections, menu, applet);
- n_items += add_virtual_items (NM_SETTING_BOND_SETTING_NAME,
- all_devices, all_connections, menu, applet);
- n_items += add_virtual_items (NM_SETTING_TEAM_SETTING_NAME,
- all_devices, all_connections, menu, applet);
n_items += add_device_items (NM_DEVICE_TYPE_ETHERNET,
all_devices, all_connections, menu, applet);
- n_items += add_device_items (NM_DEVICE_TYPE_INFINIBAND,
- all_devices, all_connections, menu, applet);
- n_items += add_virtual_items (NM_SETTING_VLAN_SETTING_NAME,
- all_devices, all_connections, menu, applet);
n_items += add_device_items (NM_DEVICE_TYPE_WIFI,
all_devices, all_connections, menu, applet);
n_items += add_device_items (NM_DEVICE_TYPE_MODEM,
@@ -3578,21 +3431,6 @@ initable_init (GInitable *initable, GCancellable *cancellable, GError **error)
applet->bt_class = applet_device_bt_get_class (applet);
g_assert (applet->bt_class);
- applet->vlan_class = applet_device_vlan_get_class (applet);
- g_assert (applet->vlan_class);
-
- applet->bond_class = applet_device_bond_get_class (applet);
- g_assert (applet->bond_class);
-
- applet->team_class = applet_device_team_get_class (applet);
- g_assert (applet->team_class);
-
- applet->bridge_class = applet_device_bridge_get_class (applet);
- g_assert (applet->bridge_class);
-
- applet->infiniband_class = applet_device_infiniband_get_class (applet);
- g_assert (applet->infiniband_class);
-
#if WITH_WWAN
mm1_client_setup (applet);
#endif
@@ -3622,11 +3460,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->vlan_class);
- g_slice_free (NMADeviceClass, applet->bond_class);
- g_slice_free (NMADeviceClass, applet->team_class);
- g_slice_free (NMADeviceClass, applet->bridge_class);
- g_slice_free (NMADeviceClass, applet->infiniband_class);
if (applet->update_icon_id)
g_source_remove (applet->update_icon_id);
diff --git a/src/applet.h b/src/applet.h
index 66e2e5cc..f4e58e19 100644
--- a/src/applet.h
+++ b/src/applet.h
@@ -106,11 +106,6 @@ typedef struct
NMADeviceClass *broadband_class;
#endif
NMADeviceClass *bt_class;
- NMADeviceClass *vlan_class;
- NMADeviceClass *bond_class;
- NMADeviceClass *team_class;
- NMADeviceClass *bridge_class;
- NMADeviceClass *infiniband_class;
/* Data model elements */
guint update_icon_id;