diff options
author | Bastien Nocera <hadess@hadess.net> | 2013-02-21 07:30:46 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2013-02-21 07:30:46 +0100 |
commit | d5cf19be14ec8b2619aaa307730fed9663dd2565 (patch) | |
tree | 7912b42db27f1db97e3bbf5d37af212ac6524f78 /panels/network/net-device-mobile.c | |
parent | fd04dbef8c1f025c3d7e88d1a3c1e4421fe3dd4b (diff) | |
download | gnome-control-center-d5cf19be14ec8b2619aaa307730fed9663dd2565.tar.gz |
Revert "network: make ModemManager dependency optional"
This reverts commit 4ef8ae4017a6a2bebf0b83da99dcaf0dad7d6fc0.
Diffstat (limited to 'panels/network/net-device-mobile.c')
-rw-r--r-- | panels/network/net-device-mobile.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/panels/network/net-device-mobile.c b/panels/network/net-device-mobile.c index c7c4bb9b4..aafdc79e7 100644 --- a/panels/network/net-device-mobile.c +++ b/panels/network/net-device-mobile.c @@ -34,9 +34,7 @@ #include "panel-common.h" #include "network-dialogs.h" -#if HAVE_MM_GLIB #include <libmm-glib.h> -#endif /* HAVE_MM_GLIB */ #include "net-device-mobile.h" @@ -54,7 +52,7 @@ struct _NetDeviceMobilePrivate GDBusProxy *cdma_proxy; /* New MM >= 0.7 support */ - gpointer mm_object; + MMObject *mm_object; guint operator_name_updated; NMAMobileProvidersDatabase *mpd; @@ -249,7 +247,6 @@ device_mobile_refresh_equipment_id (NetDeviceMobile *device_mobile) { const gchar *equipment_id = NULL; -#if HAVE_MM_GLIB if (device_mobile->priv->mm_object != NULL) { MMModem *modem; @@ -264,13 +261,10 @@ device_mobile_refresh_equipment_id (NetDeviceMobile *device_mobile) equipment_id); } } else { -#endif /* HAVE_MM_GLIB */ /* Assume old MM handling */ equipment_id = g_object_get_data (G_OBJECT (device_mobile), "ControlCenter::EquipmentIdentifier"); -#if HAVE_MM_GLIB } -#endif /* HAVE_MM_GLIB */ panel_set_device_widget_details (device_mobile->priv->builder, "imei", equipment_id); } @@ -318,7 +312,6 @@ device_mobile_find_provider (NetDeviceMobile *device_mobile, static void device_mobile_refresh_operator_name (NetDeviceMobile *device_mobile) { -#if HAVE_MM_GLIB if (device_mobile->priv->mm_object != NULL) { gchar *operator_name = NULL; MMModem3gpp *modem_3gpp; @@ -358,7 +351,6 @@ device_mobile_refresh_operator_name (NetDeviceMobile *device_mobile) panel_set_device_widget_details (device_mobile->priv->builder, "provider", operator_name); g_free (operator_name); } else { -#endif /* HAVE_MM_GLIB */ const gchar *gsm; const gchar *cdma; @@ -381,9 +373,7 @@ device_mobile_refresh_operator_name (NetDeviceMobile *device_mobile) } else { panel_set_device_widget_details (device_mobile->priv->builder, "provider", NULL); } -#if HAVE_MM_GLIB } -#endif /* HAVE_MM_GLIB */ } static void @@ -790,8 +780,6 @@ net_device_mobile_constructed (GObject *object) nm_device_mobile_refresh_ui (device_mobile); } -#if HAVE_MM_GLIB - static void operator_name_updated (MMModem3gpp *modem_3gpp_iface, GParamSpec *pspec, @@ -823,7 +811,6 @@ net_device_mobile_setup_modem_object (NetDeviceMobile *self) } } -#endif /* HAVE_MM_GLIB */ static void net_device_mobile_get_property (GObject *device_, @@ -854,9 +841,7 @@ net_device_mobile_set_property (GObject *device_, switch (prop_id) { case PROP_MODEM_OBJECT: self->priv->mm_object = g_value_dup_object (value); -#if HAVE_MM_GLIB net_device_mobile_setup_modem_object (self); -#endif /* HAVE_MM_GLIB */ break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (self, prop_id, pspec); @@ -874,16 +859,12 @@ net_device_mobile_dispose (GObject *object) g_clear_object (&priv->gsm_proxy); g_clear_object (&priv->cdma_proxy); -#if HAVE_MM_GLIB if (priv->operator_name_updated) { g_assert (priv->mm_object != NULL); g_signal_handler_disconnect (mm_object_peek_modem_3gpp (priv->mm_object), priv->operator_name_updated); priv->operator_name_updated = 0; } -#endif /* HAVE_MM_GLIB */ - g_clear_object (&priv->mm_object); - g_clear_object (&priv->mpd); G_OBJECT_CLASS (net_device_mobile_parent_class)->dispose (object); @@ -909,7 +890,7 @@ net_device_mobile_class_init (NetDeviceMobileClass *klass) g_param_spec_object ("mm-object", NULL, NULL, - G_TYPE_OBJECT, + MM_TYPE_OBJECT, G_PARAM_READWRITE)); } |