summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac11
-rw-r--r--data/Makefile.am13
-rw-r--r--src/kludge-transport.c8
3 files changed, 29 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index b2d01395..c5dc9b17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -376,6 +376,16 @@ fi
AM_CONDITIONAL(HAVE_NM, test "x$have_nm" = "xyes")
AM_CONDITIONAL(HAVE_CONNMAN, test "x$have_connman" = "xyes")
+AC_ARG_ENABLE([conn-setting],
+ [AS_HELP_STRING([--enable-conn-setting],
+ [use a GSetting to control automatic connectivity @<:@default=yes@:>@])],
+ [],
+ [enable_conn_setting=yes])
+if test x"$enable_conn_setting" = xyes; then
+ AC_DEFINE([ENABLE_CONN_SETTING], [1], [Define to use the "use-conn" GSetting])
+fi
+AM_CONDITIONAL([ENABLE_CONN_SETTING], [test x"$enable_conn_setting" = xyes])
+
# -----------------------------------------------------------
# Suspend/resume tracking goop
# -----------------------------------------------------------
@@ -460,6 +470,7 @@ Configure summary:
Gnome Keyring................: ${keyring_enabled}
Network Manager integration..: ${have_nm}
ConnMan integration..........: ${have_connman}
+ Connectivity GSetting........: ${enable_conn_setting}
Suspend tracking with UPower.: ${have_upower}
Aegis........................: ${aegis_enabled}
libaccounts-glib backend.....: ${libaccounts_sso_enabled}
diff --git a/data/Makefile.am b/data/Makefile.am
index 3d293bd8..a83709e1 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,15 +1,22 @@
-gsettings_SCHEMAS = \
+mc_schemas = \
im.telepathy.MissionControl.FromEmpathy.gschema.xml \
$(NULL)
-@GSETTINGS_RULES@
+
+gsettings_SCHEMAS =
+
+if ENABLE_CONN_SETTING
+gsettings_SCHEMAS += $(mc_schemas)
# We build our own schema cache here for the benefit of the test suite
noinst_DATA = gschemas.compiled
gschemas.compiled: $(gsettings_SCHEMAS)
$(AM_V_GEN)$(GLIB_COMPILE_SCHEMAS) --targetdir=$(builddir) $(srcdir)
+endif
+
+@GSETTINGS_RULES@
EXTRA_DIST = \
- $(gsettings_SCHEMAS) \
+ $(mc_schemas) \
$(NULL)
CLEANFILES = $(noinst_DATA)
diff --git a/src/kludge-transport.c b/src/kludge-transport.c
index bdd80b81..636f9cfa 100644
--- a/src/kludge-transport.c
+++ b/src/kludge-transport.c
@@ -17,6 +17,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "config.h"
+
#include "kludge-transport.h"
#include <telepathy-glib/util.h>
@@ -42,8 +44,10 @@ struct _McdKludgeTransportPrivate {
/* Hold a set of McdAccounts which would like to go online. */
GHashTable *pending_accounts;
+#ifdef ENABLE_CONN_SETTING
/* Application settings we steal from under Empathy's nose. */
GSettings *settings;
+#endif
};
static void transport_iface_init (
@@ -86,9 +90,11 @@ mcd_kludge_transport_constructed (GObject *object)
priv->pending_accounts = g_hash_table_new_full (NULL, NULL,
g_object_unref, NULL);
+#ifdef ENABLE_CONN_SETTING
priv->settings = g_settings_new ("im.telepathy.MissionControl.FromEmpathy");
g_settings_bind (priv->settings, "use-conn", priv->minotaur, "use-conn",
G_SETTINGS_BIND_GET);
+#endif
}
static void
@@ -99,7 +105,9 @@ mcd_kludge_transport_dispose (GObject *object)
GObjectClass *parent_class = mcd_kludge_transport_parent_class;
tp_clear_object (&priv->minotaur);
+#ifdef ENABLE_CONN_SETTING
tp_clear_object (&priv->settings);
+#endif
g_list_free (priv->transports);
priv->transports = NULL;