aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy.c
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2009-08-19 01:25:13 +0800
committerJonny Lamb <jonny.lamb@collabora.co.uk>2009-08-19 01:25:13 +0800
commitc1d7093754507c971b61633f51b7a80f2dcb4c7d (patch)
tree57c0d62c2e05c109a962a6d30b179325953f9520 /src/empathy.c
parent21eba5b7a86ad221efd3738d415cd56eb0ee98b8 (diff)
downloadgsoc2013-empathy-c1d7093754507c971b61633f51b7a80f2dcb4c7d.tar
gsoc2013-empathy-c1d7093754507c971b61633f51b7a80f2dcb4c7d.tar.gz
gsoc2013-empathy-c1d7093754507c971b61633f51b7a80f2dcb4c7d.tar.bz2
gsoc2013-empathy-c1d7093754507c971b61633f51b7a80f2dcb4c7d.tar.lz
gsoc2013-empathy-c1d7093754507c971b61633f51b7a80f2dcb4c7d.tar.xz
gsoc2013-empathy-c1d7093754507c971b61633f51b7a80f2dcb4c7d.tar.zst
gsoc2013-empathy-c1d7093754507c971b61633f51b7a80f2dcb4c7d.zip
empathy: create a new EmpathyConnectivity object on startup
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'src/empathy.c')
-rw-r--r--src/empathy.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/empathy.c b/src/empathy.c
index 15155d28d..ce706c9e9 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -46,6 +46,7 @@
#include <libempathy/empathy-utils.h>
#include <libempathy/empathy-call-factory.h>
#include <libempathy/empathy-chatroom-manager.h>
+#include <libempathy/empathy-connectivity.h>
#include <libempathy/empathy-account-manager.h>
#include <libempathy/empathy-debugger.h>
#include <libempathy/empathy-dispatcher.h>
@@ -208,15 +209,15 @@ operation_error_cb (MissionControl *mc,
}
static void
-use_nm_notify_cb (EmpathyConf *conf,
- const gchar *key,
- gpointer user_data)
+use_conn_notify_cb (EmpathyConf *conf,
+ const gchar *key,
+ gpointer user_data)
{
- EmpathyIdle *idle = user_data;
- gboolean use_nm;
+ EmpathyConnectivity *connectivity = user_data;
+ gboolean use_conn;
- if (empathy_conf_get_bool (conf, key, &use_nm)) {
- empathy_idle_set_use_nm (idle, use_nm);
+ if (empathy_conf_get_bool (conf, key, &use_conn)) {
+ empathy_connectivity_set_use_conn (connectivity, use_conn);
}
}
@@ -555,6 +556,7 @@ main (int argc, char *argv[])
GtkWidget *window;
MissionControl *mc;
EmpathyIdle *idle;
+ EmpathyConnectivity *connectivity;
gboolean autoconnect = TRUE;
gboolean no_connect = FALSE;
gboolean hide_contact_list = FALSE;
@@ -684,9 +686,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 (),