aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-22 00:37:48 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-22 00:37:48 +0800
commit84e30dab1428affe335ef904377d07f8b5fdeb66 (patch)
treefee9c8ec124a2b5804f6bb4ee31772db56a6e374 /src/empathy.c
parentfd8e9c5dc2584055177c7a79021cdd53ca431c22 (diff)
parent3803736b4326d4bc00d58ccd25f910907f0b4521 (diff)
downloadgsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.tar
gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.tar.gz
gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.tar.bz2
gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.tar.lz
gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.tar.xz
gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.tar.zst
gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.zip
Merge back from master
Diffstat (limited to 'src/empathy.c')
-rw-r--r--src/empathy.c41
1 files changed, 24 insertions, 17 deletions
diff --git a/src/empathy.c b/src/empathy.c
index 3cc494a94..718fe70bf 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -33,7 +33,7 @@
#include <unique/unique.h>
#if HAVE_LIBCHAMPLAIN
-#include <clutter-gtk/gtk-clutter-embed.h>
+#include <clutter-gtk/clutter-gtk.h>
#endif
#include <libebook/e-book.h>
@@ -49,6 +49,7 @@
#include <libempathy/empathy-call-factory.h>
#include <libempathy/empathy-chatroom-manager.h>
#include <libempathy/empathy-account-settings.h>
+#include <libempathy/empathy-connectivity.h>
#include <libempathy/empathy-account-manager.h>
#include <libempathy/empathy-connection-managers.h>
#include <libempathy/empathy-debugger.h>
@@ -148,19 +149,6 @@ dispatch_cb (EmpathyDispatcher *dispatcher,
}
}
-static void
-use_nm_notify_cb (EmpathyConf *conf,
- const gchar *key,
- gpointer user_data)
-{
- EmpathyIdle *idle = user_data;
- gboolean use_nm;
-
- if (empathy_conf_get_bool (conf, key, &use_nm)) {
- empathy_idle_set_use_nm (idle, use_nm);
- }
-}
-
/* Salut account creation */
static gboolean
should_create_salut_account (void)
@@ -229,6 +217,19 @@ salut_account_created (GObject *source,
}
static void
+use_conn_notify_cb (EmpathyConf *conf,
+ const gchar *key,
+ gpointer user_data)
+{
+ EmpathyConnectivity *connectivity = user_data;
+ gboolean use_conn;
+
+ if (empathy_conf_get_bool (conf, key, &use_conn)) {
+ empathy_connectivity_set_use_conn (connectivity, use_conn);
+ }
+}
+
+static void
create_salut_account_if_needed (EmpathyConnectionManagers *managers)
{
EmpathyAccountSettings *settings;
@@ -535,6 +536,7 @@ main (int argc, char *argv[])
EmpathyFTFactory *ft_factory;
GtkWidget *window;
EmpathyIdle *idle;
+ EmpathyConnectivity *connectivity;
gboolean autoconnect = TRUE;
gboolean no_connect = FALSE;
gboolean hide_contact_list = FALSE;
@@ -637,9 +639,13 @@ main (int argc, char *argv[])
/* Setting up Idle */
idle = empathy_idle_dup_singleton ();
empathy_idle_set_auto_away (idle, TRUE);
- use_nm_notify_cb (empathy_conf_get (), EMPATHY_PREFS_USE_NM, idle);
- empathy_conf_notify_add (empathy_conf_get (), EMPATHY_PREFS_USE_NM,
- use_nm_notify_cb, idle);
+
+ /* Setting up Connectivity */
+ connectivity = empathy_connectivity_dup_singleton ();
+ use_conn_notify_cb (empathy_conf_get (), EMPATHY_PREFS_USE_CONN,
+ connectivity);
+ empathy_conf_notify_add (empathy_conf_get (), EMPATHY_PREFS_USE_CONN,
+ use_conn_notify_cb, connectivity);
/* Autoconnect */
empathy_conf_get_bool (empathy_conf_get (),
@@ -699,6 +705,7 @@ main (int argc, char *argv[])
empathy_idle_set_state (idle, TP_CONNECTION_PRESENCE_TYPE_OFFLINE);
g_object_unref (idle);
+ g_object_unref (connectivity);
g_object_unref (icon);
g_object_unref (account_manager);
g_object_unref (log_manager);