--- orjinal.c	2012-12-01 11:13:31.000000000 +0200
+++ cc-online-accounts-panel.c	2012-12-01 12:28:36.000000000 +0200
@@ -21,7 +21,7 @@
  */
 
 #include "config.h"
-
+#include <gio/gio.h>
 #include <string.h>
 #include <glib/gi18n-lib.h>
 
@@ -141,6 +141,7 @@
   GtkCellRenderer *renderer;
   GtkTreeIter iter;
 
+
   panel->builder = gtk_builder_new ();
   error = NULL;
   if (gtk_builder_add_from_file (panel->builder,
@@ -177,6 +178,13 @@
                     panel);
 
   button = GTK_WIDGET (gtk_builder_get_object (panel->builder, "accounts-button-add"));
+  GNetworkMonitor *monitor;
+  monitor=g_network_monitor_get_default();
+
+g_object_bind_property (monitor, "network-available",
+                          button, "sensitive",
+                          G_BINDING_SYNC_CREATE);
+
   g_signal_connect (button,
                     "clicked",
                     G_CALLBACK (on_add_button_clicked),
@@ -767,4 +775,3 @@
   GoaPanel *panel = GOA_PANEL (user_data);
   add_account (panel);
 }
-
