From e2e312d4102fc8ce3c540d85b6a998d68f528cf6 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Thu, 30 Oct 2003 21:19:32 +0000 Subject: add boilerplate. 2003-10-30 Chris Toshok * gui/certificate-manager.h: add boilerplate. * gui/certificate-manager.c (certificate_manager_config_control_new): return NULL if the NSS_InitReadWrite fails - we should probably give better status though, or return a GtkLabel with an error message.... * gui/Makefile.am (INCLUDES): use CERT_UI_CFLAGS. (TEST_LIBS): use CERT_UI_LIBS. svn path=/trunk/; revision=23140 --- smime/gui/Makefile.am | 4 ++-- smime/gui/certificate-manager.c | 6 ++++-- smime/gui/certificate-manager.h | 21 +++++++++++++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) (limited to 'smime/gui') diff --git a/smime/gui/Makefile.am b/smime/gui/Makefile.am index 782e5191eb..dab6fcfff8 100644 --- a/smime/gui/Makefile.am +++ b/smime/gui/Makefile.am @@ -16,7 +16,7 @@ INCLUDES = \ -DLIBGNOME_DISABLE_DEPRECATED \ -DLIBGNOMEUI_DISABLE_DEPRECATED \ $(EVOLUTION_ADDRESSBOOK_CFLAGS) \ - $(CAMEL_CFLAGS) + $(CERT_UI_CFLAGS) noinst_LTLIBRARIES = libevolution-smime.la @@ -26,7 +26,7 @@ libevolution_smime_la_SOURCES = \ libevolution_smime_la_LIBADD = \ $(top_builddir)/smime/lib/libessmime.la \ - $(EVOLUTION_ADDRESSBOOK_LIBS) $(CAMEL_LIBS) + $(CERT_UI_LIBS) glade_DATA = smime-ui.glade diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c index 97d0a1d919..7e4e1b1e1d 100644 --- a/smime/gui/certificate-manager.c +++ b/smime/gui/certificate-manager.c @@ -318,13 +318,15 @@ populate_ui (CertificateManagerData *cfm) EvolutionConfigControl* certificate_manager_config_control_new (void) { - CertificateManagerData *cfm_data = g_new0 (CertificateManagerData, 1); + CertificateManagerData *cfm_data; GtkWidget *control_widget; /* XXX this should happen someplace else, and shouldn't reference my default mozilla profile :) */ - NSS_InitReadWrite ("/home/toshok/.mozilla/default/xuvq7jx3.slt"); + if (SECSuccess != NSS_InitReadWrite ("/home/toshok/.mozilla/default/xuvq7jx3.slt")) + return NULL; + cfm_data = g_new0 (CertificateManagerData, 1); cfm_data->gui = glade_xml_new (EVOLUTION_GLADEDIR "/" GLADE_FILE_NAME, NULL, NULL); cfm_data->yourcerts_treeview = glade_xml_get_widget (cfm_data->gui, "yourcerts-treeview"); diff --git a/smime/gui/certificate-manager.h b/smime/gui/certificate-manager.h index 0cd1bb1be5..ee2002b159 100644 --- a/smime/gui/certificate-manager.h +++ b/smime/gui/certificate-manager.h @@ -1,3 +1,24 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Authors: Chris Toshok + * + * Copyright (C) 2003 Ximian, Inc. (www.ximian.com) + * + * 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 + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * 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., 59 Temple Street #330, Boston, MA 02111-1307, USA. + * + */ #ifndef _CERTIFICATE_MANAGER_H_ #define _CERTIFICATE_MANAGER_H -- cgit v1.2.3