]> git.0d.be Git - empathy.git/blobdiff - src/empathy-auth-client.c
Updated Spanish translation
[empathy.git] / src / empathy-auth-client.c
index 4f7712d9b7ea6de115a1296d4fc873f8d5cf6780..be5b13a0b437dfd89d054afb923850fc343af069 100644 (file)
  * Authors: Cosimo Cecchi <cosimo.cecchi@collabora.co.uk>
  */
 
-#include <config.h>
+#include "config.h"
 
-#include <stdlib.h>
-#include <glib.h>
 #include <glib/gi18n.h>
-#include <gtk/gtk.h>
-
-#include <telepathy-glib/debug-sender.h>
-
-#define DEBUG_FLAG EMPATHY_DEBUG_TLS
-#include <libempathy/empathy-debug.h>
-#include <libempathy/empathy-auth-factory.h>
-#include <libempathy/empathy-server-sasl-handler.h>
-#include <libempathy/empathy-server-tls-handler.h>
-#include <libempathy/empathy-tls-verifier.h>
-#include <libempathy/empathy-utils.h>
-
-#include <libempathy-gtk/empathy-bad-password-dialog.h>
-#include <libempathy-gtk/empathy-password-dialog.h>
-#include <libempathy-gtk/empathy-tls-dialog.h>
-#include <libempathy-gtk/empathy-ui-utils.h>
+#include <gnutls/gnutls.h>
 
+#include "empathy-auth-factory.h"
+#include "empathy-bad-password-dialog.h"
+#include "empathy-password-dialog.h"
 #include "empathy-sanity-cleaning.h"
+#include "empathy-server-tls-handler.h"
+#include "empathy-tls-dialog.h"
+#include "empathy-tls-verifier.h"
+#include "empathy-ui-utils.h"
 
-#include <gnutls/gnutls.h>
-
-#include <extensions/extensions.h>
+#define DEBUG_FLAG EMPATHY_DEBUG_TLS
+#include "empathy-debug.h"
 
 #define TIMEOUT 60
 
@@ -100,8 +89,6 @@ tls_dialog_response_cb (GtkDialog *dialog,
   gboolean remember = FALSE;
   EmpathyTLSVerifier *verifier = EMPATHY_TLS_VERIFIER (user_data);
 
-  DEBUG ("Response %d", response_id);
-
   g_object_get (tls_dialog,
       "certificate", &certificate,
       "reason", &reason,
@@ -109,6 +96,8 @@ tls_dialog_response_cb (GtkDialog *dialog,
       "details", &details,
       NULL);
 
+  DEBUG ("Response %d (remember: %d)", response_id, remember);
+
   gtk_widget_destroy (GTK_WIDGET (dialog));
 
   if (response_id == GTK_RESPONSE_YES)
@@ -263,7 +252,7 @@ auth_factory_auth_passsword_failed (EmpathyAuthFactory *factory,
 {
   GtkWidget *dialog;
 
-  DEBUG ("Authentification on %s failed, popup password dialog",
+  DEBUG ("Authentication on %s failed, popup password dialog",
       tp_account_get_path_suffix (account));
 
   dialog = empathy_bad_password_dialog_new (account, password);
@@ -274,6 +263,14 @@ auth_factory_auth_passsword_failed (EmpathyAuthFactory *factory,
   gtk_widget_show (dialog);
 }
 
+static void
+sanity_cb (GObject *source,
+    GAsyncResult *result,
+    gpointer user_data)
+{
+  start_timer ();
+}
+
 int
 main (int argc,
     char **argv)
@@ -309,6 +306,9 @@ main (int argc,
   gtk_window_set_default_icon_name ("empathy");
   textdomain (GETTEXT_PACKAGE);
 
+  /* There is no 'main' UI window so just use the default GdkScreen */
+  empathy_set_css_provider (NULL);
+
 #ifdef ENABLE_DEBUG
   /* Set up debug sender */
   debug_sender = tp_debug_sender_dup ();
@@ -352,8 +352,8 @@ main (int argc,
       use_timer = FALSE;
     }
 
-  start_timer ();
-  empathy_sanity_checking_run_if_needed ();
+  /* Wait for the migration code to be done before starting the timer */
+  empathy_sanity_checking_run_async (sanity_cb, NULL);
 
   gtk_main ();