From 34b03f910bd8b889f0f71edfa9668b74d8ad8ba6 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Fri, 21 Oct 2011 22:42:45 +0100 Subject: .gitignore: remove obsolete libmcclient references libmcclient is gone forever, so let's not ignore detritus from it. --- .gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7435c965..b0fe30ef 100644 --- a/.gitignore +++ b/.gitignore @@ -51,8 +51,6 @@ install-sh /lcov.html /lcov.info /lcov.info.tmp -libmcclient.pc -libmcclient/diff libtool ltmain.sh /m4/gtk-doc.m4 -- cgit v1.2.1 From db2ac21ee35f785cb21d7b1e782eb34c9753c4f4 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Thu, 3 Nov 2011 15:33:02 +0000 Subject: Add a GSettings schema with use-conn key When the NM/ConnMan code lived in Empathy, there was a GSettings key which could be flipped to false to make Empathy always assume it had a network connection. This schema provides one GSettings key, im.telepathy.MissionControl.FromEmpathy use-conn, which happens to use the same dconf path as the Empathy key uses. This should make the two GSettings keys aliases for the same underlying value in dconf; we get a migration path for free. --- .gitignore | 1 + Makefile.am | 1 + configure.ac | 2 ++ data/Makefile.am | 9 +++++++++ ...im.telepathy.MissionControl.FromEmpathy.gschema.xml | 18 ++++++++++++++++++ 5 files changed, 31 insertions(+) create mode 100644 data/Makefile.am create mode 100644 data/im.telepathy.MissionControl.FromEmpathy.gschema.xml diff --git a/.gitignore b/.gitignore index b0fe30ef..6ba0aeeb 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ *.gcda *.gcno *.gcov +/data/*.valid /doc/reference/*/html /doc/reference/*/xml /doc/reference/*/*-decl-list.txt diff --git a/Makefile.am b/Makefile.am index 34e12451..d5af95c3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,6 +7,7 @@ CHECK_FOR_UNRELEASED := \ $(NULL) SUBDIRS = \ + data \ m4 \ tools \ xml \ diff --git a/configure.ac b/configure.ac index 42a2c843..562ca9d4 100644 --- a/configure.ac +++ b/configure.ac @@ -399,12 +399,14 @@ GLIB_MKENUMS="`$PKG_CONFIG --variable=glib_mkenums glib-2.0`" AC_SUBST(GLIB_MKENUMS) GTK_DOC_CHECK([1.17],[--flavour no-tmpl]) +GLIB_GSETTINGS pluginlibdir=$libdir/mission-control AC_SUBST(pluginlibdir) AC_OUTPUT([ Makefile \ +data/Makefile \ doc/Makefile \ doc/reference/Makefile \ doc/reference/mission-control-plugins/Makefile \ diff --git a/data/Makefile.am b/data/Makefile.am new file mode 100644 index 00000000..48c778d5 --- /dev/null +++ b/data/Makefile.am @@ -0,0 +1,9 @@ +gsettings_SCHEMAS = \ + im.telepathy.MissionControl.FromEmpathy.gschema.xml \ + $(NULL) +@GSETTINGS_RULES@ + +EXTRA_DIST = \ + $(gsettings_SCHEMAS) \ + $(NULL) + diff --git a/data/im.telepathy.MissionControl.FromEmpathy.gschema.xml b/data/im.telepathy.MissionControl.FromEmpathy.gschema.xml new file mode 100644 index 00000000..ad5f595a --- /dev/null +++ b/data/im.telepathy.MissionControl.FromEmpathy.gschema.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + true + Connectivity managers should be used + Whether connectivity managers should be used to automatically disconnect/reconnect. + + + -- cgit v1.2.1 From a4bb333ef99e7c64a6b4b63a080c57c5beb1aac7 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Thu, 3 Nov 2011 16:52:10 +0000 Subject: Bind use-conn GSettings key to ConnectivityMonitor This GSettings key does the same thing as the Empathy one it's an alias for does: if use-conn is False, the network state from NM/ConnMan is ignored, and MC will allow you to try to sign in even if there is supposedly no network connection! It's pretty great. (When I first committed this, it didn't work. Now it does. I don't know why.) --- .gitignore | 1 + data/Makefile.am | 6 ++++++ src/kludge-transport.c | 8 ++++++++ tests/twisted/tools/exec-with-log.sh.in | 2 ++ 4 files changed, 17 insertions(+) diff --git a/.gitignore b/.gitignore index 6ba0aeeb..a5884dd2 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ *.gcno *.gcov /data/*.valid +/data/gschemas.compiled /doc/reference/*/html /doc/reference/*/xml /doc/reference/*/*-decl-list.txt diff --git a/data/Makefile.am b/data/Makefile.am index 48c778d5..3d293bd8 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -3,7 +3,13 @@ gsettings_SCHEMAS = \ $(NULL) @GSETTINGS_RULES@ +# 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) + EXTRA_DIST = \ $(gsettings_SCHEMAS) \ $(NULL) +CLEANFILES = $(noinst_DATA) diff --git a/src/kludge-transport.c b/src/kludge-transport.c index 67d5b234..bdd80b81 100644 --- a/src/kludge-transport.c +++ b/src/kludge-transport.c @@ -41,6 +41,9 @@ struct _McdKludgeTransportPrivate { /* Hold a set of McdAccounts which would like to go online. */ GHashTable *pending_accounts; + + /* Application settings we steal from under Empathy's nose. */ + GSettings *settings; }; static void transport_iface_init ( @@ -82,6 +85,10 @@ mcd_kludge_transport_constructed (GObject *object) priv->pending_accounts = g_hash_table_new_full (NULL, NULL, g_object_unref, NULL); + + priv->settings = g_settings_new ("im.telepathy.MissionControl.FromEmpathy"); + g_settings_bind (priv->settings, "use-conn", priv->minotaur, "use-conn", + G_SETTINGS_BIND_GET); } static void @@ -92,6 +99,7 @@ mcd_kludge_transport_dispose (GObject *object) GObjectClass *parent_class = mcd_kludge_transport_parent_class; tp_clear_object (&priv->minotaur); + tp_clear_object (&priv->settings); g_list_free (priv->transports); priv->transports = NULL; diff --git a/tests/twisted/tools/exec-with-log.sh.in b/tests/twisted/tools/exec-with-log.sh.in index 84b13ea2..a90af148 100644 --- a/tests/twisted/tools/exec-with-log.sh.in +++ b/tests/twisted/tools/exec-with-log.sh.in @@ -63,6 +63,8 @@ if test -f "$MC_ACCOUNT_DIR/gnome-keyring-env"; then export GNOME_KEYRING_CONTROL GNOME_KEYRING_PID MC_KEYRING_NAME SSH_AUTH_SOCK fi +export GSETTINGS_SCHEMA_DIR=@abs_top_builddir@/data + exec @abs_top_builddir@/libtool --mode=execute \ $MISSIONCONTROL_WRAPPER \ $MC_EXECUTABLE -- cgit v1.2.1 From dbeb5860f634ed6ebaa2a76ca7e37be7623ea4a1 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Thu, 3 Nov 2011 16:54:20 +0000 Subject: .gitignore: ignore connectivity monitor test tool --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a5884dd2..48a5e4e7 100644 --- a/.gitignore +++ b/.gitignore @@ -76,6 +76,7 @@ TAGS /telepathy-mission-control-5* /tests/account-store /tests/keyring-command +/tests/tease-the-minotaur /tests/test-* tests/mc-client tests/twisted/with-session-bus-*.dbus-monitor-logs -- cgit v1.2.1 From 52f223eb1740fe1dd3059a9c71c90de7785180c0 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Thu, 3 Nov 2011 17:14:27 +0000 Subject: ConnectivityMonitor: fix debug message --- src/connectivity-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connectivity-monitor.c b/src/connectivity-monitor.c index 2c94e3f6..0ab8272e 100644 --- a/src/connectivity-monitor.c +++ b/src/connectivity-monitor.c @@ -485,7 +485,7 @@ mcd_connectivity_monitor_set_use_conn (McdConnectivityMonitor *connectivity_moni if (use_conn == priv->use_conn) return; - DEBUG ("use_conn GSetting key changed; new value = %s", + DEBUG ("use-conn GSettings key changed; new value = %s", use_conn ? "true" : "false"); priv->use_conn = use_conn; -- cgit v1.2.1 From 6ea034ad022068c581cdbf675a5be54e30d2e2f0 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Fri, 4 Nov 2011 18:20:34 +0000 Subject: exec-with-log.sh.in: export POSIX_ME_HARDER=1 --- tests/twisted/tools/exec-with-log.sh.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/twisted/tools/exec-with-log.sh.in b/tests/twisted/tools/exec-with-log.sh.in index a90af148..a7abbf91 100644 --- a/tests/twisted/tools/exec-with-log.sh.in +++ b/tests/twisted/tools/exec-with-log.sh.in @@ -51,7 +51,8 @@ elif test -n "$MISSIONCONTROL_TEST_REFDBG"; then fi # The bus-daemon that is activating us doesn't know it's also the system bus -export DBUS_SYSTEM_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS" +DBUS_SYSTEM_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS" +export DBUS_SYSTEM_BUS_ADDRESS if test "z$MC_EXECUTABLE" = z; then MC_EXECUTABLE=@abs_top_builddir@/tests/twisted/mc-debug-server @@ -63,7 +64,8 @@ if test -f "$MC_ACCOUNT_DIR/gnome-keyring-env"; then export GNOME_KEYRING_CONTROL GNOME_KEYRING_PID MC_KEYRING_NAME SSH_AUTH_SOCK fi -export GSETTINGS_SCHEMA_DIR=@abs_top_builddir@/data +GSETTINGS_SCHEMA_DIR=@abs_top_builddir@/data +export GSETTINGS_SCHEMA_DIR exec @abs_top_builddir@/libtool --mode=execute \ $MISSIONCONTROL_WRAPPER \ -- cgit v1.2.1