diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/src/empathy.c b/src/empathy.c index 15155d28d..660e47cea 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 (), @@ -747,6 +753,7 @@ main (int argc, char *argv[]) g_object_unref (mc); g_object_unref (idle); + g_object_unref (connectivity); g_object_unref (icon); g_object_unref (log_manager); g_object_unref (dispatcher); |