Commit f094cc0e authored by Aleksander Morgado's avatar Aleksander Morgado

Revert "network: Allow compiling against NM 0.9.6"

This reverts commit ec704ab6.

This will effectively bump again the NM requirement to 0.9.7.995.
parent d5bcf412
......@@ -99,10 +99,8 @@ CANBERRA_REQUIRED_VERSION=0.13
GDKPIXBUF_REQUIRED_VERSION=2.23.0
POLKIT_REQUIRED_VERSION=0.103
GSD_REQUIRED_VERSION=3.7.3
NETWORK_MANAGER_REQUIRED_VERSION=0.9.6.4
NETWORK_MANAGER_DESIRED_VERSION=0.9.7.995
NETWORK_MANAGER_APPLET_REQUIRED_VERSION=0.9.6
NETWORK_MANAGER_APPLET_DESIRED_VERSION=0.9.7.995
NETWORK_MANAGER_REQUIRED_VERSION=0.9.7.995
NETWORK_MANAGER_APPLET_REQUIRED_VERSION=0.9.7.995
LIBNOTIFY_REQUIRED_VERSION=0.7.3
GNOME_DESKTOP_REQUIRED_VERSION=3.7.5
SCHEMAS_REQUIRED_VERSION=3.7.2.2
......@@ -185,7 +183,7 @@ PKG_CHECK_MODULES(NETWORK_MANAGER, NetworkManager >= $NETWORK_MANAGER_REQUIRED_V
libnm-glib >= $NETWORK_MANAGER_REQUIRED_VERSION
libnm-glib-vpn >= $NETWORK_MANAGER_REQUIRED_VERSION
libnm-util >= $NETWORK_MANAGER_REQUIRED_VERSION
libnm-gtk >= $NETWORK_MANAGER_APPLET_REQUIRED_VERSION,
libnm-gtk >= $NETWORK_MANAGER_APPLET_REQUIRED_VERSION,
[have_networkmanager=yes], have_networkmanager=no)
if test "x$have_networkmanager" = xno ; then
AC_MSG_WARN(*** Network panel will not be built (NetworkManager $NETWORK_MANAGER_REQUIRED_VERSION or newer not found) ***)
......@@ -199,11 +197,6 @@ if test x${have_networkmanager} = xyes; then
NM_VPN_MODULE_DIR=`$PKG_CONFIG --variable plugindir NetworkManager`
AC_SUBST(NM_VPN_CONFIG_DIR)
AC_SUBST(NM_VPN_MODULE_DIR)
PKG_CHECK_MODULES(NM_UNSTABLE, NetworkManager >= $NETWORK_MANAGER_DESIRED_VERSION
libnm-gtk >= $NETWORK_MANAGER_APPLET_DESIRED_VERSION,
[AC_DEFINE(HAVE_NM_UNSTABLE, 1, [Define if using NetworkManager and network-manager-applet from git master])],
[:])
fi
# Check for gnome-bluetooth
......
......@@ -30,9 +30,7 @@
#include "nm-client.h"
#include "nm-device.h"
#include "nm-device-modem.h"
#ifdef HAVE_NM_UNSTABLE
#include "nm-ui-utils.h"
#endif
#include "net-device.h"
#include "net-device-mobile.h"
......@@ -486,7 +484,6 @@ cc_network_panel_get_devices (CcNetworkPanel *panel)
static void
panel_refresh_device_titles (CcNetworkPanel *panel)
{
#ifdef HAVE_NM_UNSTABLE
GPtrArray *ndarray, *nmdarray;
NetDevice **devices;
NMDevice **nm_devices, *nm_device;
......@@ -520,10 +517,8 @@ panel_refresh_device_titles (CcNetworkPanel *panel)
g_free (titles);
g_ptr_array_free (ndarray, TRUE);
g_ptr_array_free (nmdarray, TRUE);
#endif
}
static gboolean
handle_argv_for_device (CcNetworkPanel *panel,
NMDevice *device,
......@@ -637,7 +632,6 @@ state_changed_cb (NMDevice *device,
static gboolean
panel_add_device (CcNetworkPanel *panel, NMDevice *device)
{
const gchar *title;
GtkListStore *liststore_devices;
GtkTreeIter iter;
NMDeviceType type;
......@@ -668,9 +662,7 @@ panel_add_device (CcNetworkPanel *panel, NMDevice *device)
device_g_type = NET_TYPE_DEVICE_WIFI;
break;
case NM_DEVICE_TYPE_BOND:
#ifdef HAVE_NM_UNSTABLE
case NM_DEVICE_TYPE_BRIDGE:
#endif
case NM_DEVICE_TYPE_VLAN:
goto out;
default:
......@@ -679,7 +671,6 @@ panel_add_device (CcNetworkPanel *panel, NMDevice *device)
}
/* create device */
title = panel_device_to_localized_string (device);
net_device = g_object_new (device_g_type,
"panel", panel,
"removable", FALSE,
......@@ -688,7 +679,6 @@ panel_add_device (CcNetworkPanel *panel, NMDevice *device)
"remote-settings", panel->priv->remote_settings,
"nm-device", device,
"id", nm_device_get_udi (device),
"title", title,
NULL);
/* add as a panel */
......@@ -1097,10 +1087,8 @@ panel_add_virtual_device (CcNetworkPanel *panel, NMConnection *connection)
connection_type = nm_setting_connection_get_connection_type (s_con);
if (!strcmp (connection_type, NM_SETTING_BOND_SETTING_NAME))
device_g_type = NET_TYPE_DEVICE_BOND;
#ifdef HAVE_NM_UNSTABLE
else if (!strcmp (connection_type, NM_SETTING_BRIDGE_SETTING_NAME))
device_g_type = NET_TYPE_DEVICE_BRIDGE;
#endif
else
device_g_type = NET_TYPE_VIRTUAL_DEVICE;
......@@ -1126,16 +1114,7 @@ panel_add_virtual_device (CcNetworkPanel *panel, NMConnection *connection)
liststore_devices = GTK_LIST_STORE (gtk_builder_get_object (panel->priv->builder,
"liststore_devices"));
#ifdef HAVE_NM_UNSTABLE
title = nma_utils_get_connection_device_name (connection);
#else
if (!strcmp (connection_type, NM_SETTING_BOND_SETTING_NAME))
title = g_strdup (_("Bond"));
else if (!strcmp (connection_type, NM_SETTING_VLAN_SETTING_NAME))
title = g_strdup (_("VLAN"));
else
title = g_strdup (_("Unknown"));
#endif
net_object_set_title (NET_OBJECT (net_virt), title);
gtk_list_store_append (liststore_devices, &iter);
......
......@@ -584,9 +584,7 @@ typedef struct {
static const NetConnectionType connection_types[] = {
{ N_("VPN"), nm_setting_vpn_get_type },
{ N_("Bond"), nm_setting_bond_get_type },
#ifdef HAVE_NM_UNSTABLE
{ N_("Bridge"), nm_setting_bridge_get_type },
#endif
{ N_("VLAN"), nm_setting_vlan_get_type }
};
static const NetConnectionType *vpn_connection_type = &connection_types[0];
......
......@@ -21,8 +21,6 @@
#include "config.h"
#ifdef HAVE_NM_UNSTABLE
#include <glib-object.h>
#include <glib/gi18n.h>
......@@ -190,5 +188,3 @@ net_device_bridge_init (NetDeviceBridge *device_bridge)
{
device_bridge->priv = NET_DEVICE_BRIDGE_GET_PRIVATE (device_bridge);
}
#endif /* HAVE_NM_UNSTABLE */
......@@ -1015,12 +1015,10 @@ start_shared_connection (NetDeviceWifi *device_wifi)
sw = (NMSettingWireless *)nm_setting_wireless_new ();
#ifdef HAVE_NM_UNSTABLE
/* Use real AP mode if the device supports it */
if (nm_device_wifi_get_capabilities (NM_DEVICE_WIFI (device)) & NM_WIFI_DEVICE_CAP_AP)
mode = NM_SETTING_WIRELESS_MODE_AP;
else
#endif
mode = NM_SETTING_WIRELESS_MODE_ADHOC;
g_object_set (sw,
......
......@@ -76,47 +76,6 @@ panel_device_to_icon_name (NMDevice *device, gboolean symbolic)
return value;
}
/**
* panel_device_to_localized_string:
**/
const gchar *
panel_device_to_localized_string (NMDevice *device)
{
const gchar *value = NULL;
NMDeviceModemCapabilities caps;
switch (nm_device_get_device_type (device)) {
case NM_DEVICE_TYPE_ETHERNET:
/* TRANSLATORS: device type */
value = _("Wired");
break;
case NM_DEVICE_TYPE_WIFI:
/* TRANSLATORS: device type */
value = _("Wi-Fi");
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)) {
/* TRANSLATORS: device type */
value = _("Mobile broadband");
}
break;
case NM_DEVICE_TYPE_BT:
/* TRANSLATORS: device type */
value = _("Bluetooth");
break;
case NM_DEVICE_TYPE_OLPC_MESH:
/* TRANSLATORS: device type */
value = _("Mesh");
break;
default:
/* TRANSLATORS: device type */
value = _("Unknown");
break;
}
return value;
}
/**
* panel_device_to_sortable_string:
*
......
......@@ -32,7 +32,6 @@ G_BEGIN_DECLS
const gchar *panel_device_to_icon_name (NMDevice *device,
gboolean symbolic);
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_vpn_state_to_localized_string (NMVPNConnectionState type);
......@@ -56,4 +55,3 @@ gchar *panel_get_ip6_address_as_string (NMIP6Config *con
G_END_DECLS
#endif /* PANEL_COMMON_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment