[empathy: 6/26] empathy: create a new EmpathyConnectivity object on startup
- From: Jonny Lamb <jonnylamb src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy: 6/26] empathy: create a new EmpathyConnectivity object on startup
- Date: Thu, 20 Aug 2009 13:44:55 +0000 (UTC)
commit c1d7093754507c971b61633f51b7a80f2dcb4c7d
Author: Jonny Lamb <jonny lamb collabora co uk>
Date: Tue Aug 18 18:25:13 2009 +0100
empathy: create a new EmpathyConnectivity object on startup
Signed-off-by: Jonny Lamb <jonny lamb collabora co uk>
src/empathy.c | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
---
diff --git a/src/empathy.c b/src/empathy.c
index 15155d2..ce706c9 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 (),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]