2011-10-07 [colin] 3.7.10cvs21
[claws.git] / src / ssl_manager.c
index af901614fccd365e0e7a5c33e1842aa685793644..ebbc313abf34d390bf154096c3677327352d3124 100644 (file)
@@ -1,11 +1,11 @@
 /*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Claws Mail team
- * This file Copyright (C) 2002-2005 Colin Leroy <colin@colino.net>
+ * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2011 Colin Leroy <colin@colino.net> 
+ * and the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 
  */
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
 #endif
 
-#ifdef USE_OPENSSL
-#include <gtk/gtkwidget.h>
+#ifdef USE_GNUTLS
+#include <gtk/gtk.h>
 #include <glib.h>
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
@@ -34,7 +34,6 @@
 #include "manage_window.h"
 #include "utils.h"
 #include "mainwindow.h"
-#include "gtksctree.h"
 #include "alertpanel.h"
 #include "sslcertwindow.h"
 #include "prefs_common.h"
@@ -152,7 +151,7 @@ void ssl_manager_create(void)
        GtkWidget *delete_btn;
        GtkWidget *close_btn;
 
-       window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+       window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "ssl_manager");
        gtk_window_set_title (GTK_WINDOW(window),
                              _("Saved SSL Certificates"));
 
@@ -348,7 +347,7 @@ static void ssl_manager_load_certs (void)
                port = get_port(d->d_name);
                fp = get_fingerprint(d->d_name);
                
-               cert = ssl_certificate_find_lookup(server, atoi(port), fp, FALSE);
+               cert = ssl_certificate_find(server, atoi(port), fp);
 
                ssl_manager_list_view_insert_cert(manager.certlist, NULL, 
                                                  server, port, cert);
@@ -362,7 +361,7 @@ static void ssl_manager_load_certs (void)
        g_free(path);
 }
 
-void ssl_manager_close(void) 
+static void ssl_manager_close(void) 
 {
        gtk_widget_hide(manager.window);
 }
@@ -375,7 +374,7 @@ static void ssl_manager_close_cb(GtkWidget *widget,
 
 static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
-       if (event && event->keyval == GDK_Escape)
+       if (event && event->keyval == GDK_KEY_Escape)
                ssl_manager_close();
        return FALSE;
 }