aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-accounts-dialog.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-03-28 16:26:39 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-04-05 21:03:33 +0800
commit0c787fdf8c043331b4857c6bf3ec08936467e42b (patch)
tree40b977009a7272f8b5b7424f8dcd1655cea52280 /src/empathy-accounts-dialog.c
parentca2423f0a3e6954ac551d5073fae7c5c944c828f (diff)
downloadgsoc2013-empathy-0c787fdf8c043331b4857c6bf3ec08936467e42b.tar
gsoc2013-empathy-0c787fdf8c043331b4857c6bf3ec08936467e42b.tar.gz
gsoc2013-empathy-0c787fdf8c043331b4857c6bf3ec08936467e42b.tar.bz2
gsoc2013-empathy-0c787fdf8c043331b4857c6bf3ec08936467e42b.tar.lz
gsoc2013-empathy-0c787fdf8c043331b4857c6bf3ec08936467e42b.tar.xz
gsoc2013-empathy-0c787fdf8c043331b4857c6bf3ec08936467e42b.tar.zst
gsoc2013-empathy-0c787fdf8c043331b4857c6bf3ec08936467e42b.zip
accounts-dialog: use GNetworkMonitor
Diffstat (limited to 'src/empathy-accounts-dialog.c')
-rw-r--r--src/empathy-accounts-dialog.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 9a07325f0..af85fd64f 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -40,7 +40,6 @@
#include <libempathy/empathy-utils.h>
#include <libempathy/empathy-connection-managers.h>
-#include <libempathy/empathy-connectivity.h>
#include <libempathy/empathy-pkg-kit.h>
#include <libempathy/empathy-tp-contact-factory.h>
@@ -134,7 +133,7 @@ typedef struct {
TpAccountManager *account_manager;
EmpathyConnectionManagers *cms;
- EmpathyConnectivity *connectivity;
+ GNetworkMonitor *connectivity;
GtkWindow *parent_window;
TpAccount *initial_selection;
@@ -464,7 +463,7 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog,
g_free (message);
}
- if (!empathy_connectivity_is_online (priv->connectivity))
+ if (!g_network_monitor_get_network_available (priv->connectivity))
accounts_dialog_status_infobar_set_message (dialog,
_("Offline — No Network Connection"));
@@ -2566,6 +2565,12 @@ do_dispose (GObject *obj)
priv->connecting_id = 0;
}
+ if (priv->connectivity)
+ {
+ g_object_unref (priv->connectivity);
+ priv->connectivity = NULL;
+ }
+
if (priv->account_manager != NULL)
{
g_object_unref (priv->account_manager);
@@ -2578,12 +2583,6 @@ do_dispose (GObject *obj)
priv->cms = NULL;
}
- if (priv->connectivity)
- {
- g_object_unref (priv->connectivity);
- priv->connectivity = NULL;
- }
-
if (priv->initial_selection != NULL)
{
g_object_unref (priv->initial_selection);
@@ -2651,7 +2650,8 @@ do_constructed (GObject *object)
tp_proxy_prepare_async (priv->account_manager, NULL,
accounts_dialog_manager_ready_cb, dialog);
- priv->connectivity = empathy_connectivity_dup_singleton ();
+ priv->connectivity = g_network_monitor_get_default ();
+ g_object_ref (priv->connectivity);
}
static void