]> git.0d.be Git - empathy.git/blobdiff - ubuntu-online-accounts/cc-plugins/account-plugins/empathy-accounts-plugin-widget.c
tp-account-widgets: rename all the files from empathy-* to tpaw-*
[empathy.git] / ubuntu-online-accounts / cc-plugins / account-plugins / empathy-accounts-plugin-widget.c
index d6713f2862974c2c127d5926faa2941988b7001a..c0f29e2c744824235523ef96dac93bf22f987ff5 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "config.h"
 
-#include "empathy-accounts-plugin-widget.h"
+#include "tpaw-accounts-plugin-widget.h"
 
 #include <glib/gi18n-lib.h>
 
@@ -30,7 +30,7 @@
 #include <libaccounts-glib/ag-service.h>
 #include <libaccounts-glib/ag-account-service.h>
 
-#include "empathy-account-widget.h"
+#include "tpaw-account-widget.h"
 
 G_DEFINE_TYPE (EmpathyAccountsPluginWidget, empathy_accounts_plugin_widget, GTK_TYPE_BOX)
 
@@ -147,6 +147,12 @@ response_cb (GtkWidget *widget,
     gint response,
     EmpathyAccountsPluginWidget *self)
 {
+  if (!self->priv->account_widget)
+    {
+      // widget might not be ready yet
+      g_signal_emit (self, signals[SIG_DONE], 0);
+      return;
+    }
   if (response == GTK_RESPONSE_OK)
     {
       empathy_account_widget_apply_and_log_in (self->priv->account_widget);
@@ -279,8 +285,8 @@ maybe_add_account_widget (EmpathyAccountsPluginWidget *self)
     }
   else
     {
-      g_signal_connect_swapped (self->priv->settings, "notify::ready",
-          G_CALLBACK (add_account_widget), self);
+      tp_g_signal_connect_object (self->priv->settings, "notify::ready",
+          G_CALLBACK (add_account_widget), self, G_CONNECT_SWAPPED);
     }
 }