]> git.0d.be Git - empathy.git/commitdiff
Merge branch 'gnome-3-4'
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 5 Jun 2012 07:31:04 +0000 (09:31 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 5 Jun 2012 07:31:04 +0000 (09:31 +0200)
1  2 
src/empathy-auth-client.c

index 8de7b5c529ab8d43ea41b9d430d789ba84f7ed4f,0797952c3a4be22a06cefa32e680fae866f3daff..ec433ca97156c47ef40d6195c24bbb21cd0c31a8
@@@ -93,15 -93,13 +93,13 @@@ tls_dialog_response_cb (GtkDialog *dial
      gint response_id,
      gpointer user_data)
  {
 -  EmpathyTLSCertificate *certificate = NULL;
 -  EmpTLSCertificateRejectReason reason = 0;
 +  TpTLSCertificate *certificate = NULL;
 +  TpTLSCertificateRejectReason reason = 0;
    GHashTable *details = NULL;
    EmpathyTLSDialog *tls_dialog = EMPATHY_TLS_DIALOG (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,
        "details", &details,
        NULL);
  
+   DEBUG ("Response %d (remember: %d)", response_id, remember);
    gtk_widget_destroy (GTK_WIDGET (dialog));
  
    if (response_id == GTK_RESPONSE_YES)
      {
 -      empathy_tls_certificate_accept_async (certificate, NULL, NULL);
 +      tp_tls_certificate_accept_async (certificate, NULL, NULL);
      }
    else
      {
        tp_asv_set_boolean (details, "user-requested", TRUE);
 -      empathy_tls_certificate_reject_async (certificate, reason, details,
 -          NULL, NULL);
 +      tp_tls_certificate_add_rejection (certificate, reason, NULL,
 +          g_variant_new_parsed ("{ 'user-requested': <%b> }", TRUE));
 +
 +      tp_tls_certificate_reject_async (certificate, NULL, NULL);
      }
  
    if (remember)
  }
  
  static void
 -display_interactive_dialog (EmpathyTLSCertificate *certificate,
 +display_interactive_dialog (TpTLSCertificate *certificate,
      EmpathyTLSVerifier *verifier,
 -    EmpTLSCertificateRejectReason reason,
 +    TpTLSCertificateRejectReason reason,
      GHashTable *details)
  {
    GtkWidget *tls_dialog;
@@@ -164,9 -162,9 +164,9 @@@ verifier_verify_cb (GObject *source
      GAsyncResult *result,
      gpointer user_data)
  {
 -  EmpTLSCertificateRejectReason reason;
 +  TpTLSCertificateRejectReason reason;
    GError *error = NULL;
 -  EmpathyTLSCertificate *certificate = NULL;
 +  TpTLSCertificate *certificate = NULL;
    GHashTable *details = NULL;
    gchar *hostname = NULL;
  
      }
    else
      {
 -      empathy_tls_certificate_accept_async (certificate, NULL, NULL);
 +      tp_tls_certificate_accept_async (certificate, NULL, NULL);
      }
  
    g_free (hostname);
@@@ -199,7 -197,7 +199,7 @@@ auth_factory_new_tls_handler_cb (Empath
      EmpathyServerTLSHandler *handler,
      gpointer user_data)
  {
 -  EmpathyTLSCertificate *certificate = NULL;
 +  TpTLSCertificate *certificate = NULL;
    gchar *hostname = NULL;
    gchar **reference_identities = NULL;
    EmpathyTLSVerifier *verifier;
@@@ -263,7 -261,7 +263,7 @@@ auth_factory_auth_passsword_failed (Emp
  {
    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);
@@@ -285,6 -283,8 +285,6 @@@ main (int argc
    TpSimpleClientFactory *tp_factory;
    TpDBusDaemon *dbus;
  
 -  g_thread_init (NULL);
 -
    context = g_option_context_new (N_(" - Empathy authentication client"));
    g_option_context_add_group (context, gtk_get_option_group (TRUE));
    g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
    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 ();