seahorse r2711 - in trunk: . libcryptui libcryptui/template libcryptui/tests pkcs11



Author: nnielsen
Date: Thu Jan 29 02:36:59 2009
New Revision: 2711
URL: http://svn.gnome.org/viewvc/seahorse?rev=2711&view=rev

Log:
	* libcryptui/crui-*: (removed)
	* libcryptui/Makefile.am:
	* libcryptui/template/*: (removed)
	* libcryptui/tests/*: (removed)
	* libcryptui/tests/files/*: (removed) Remove bits of libcryptui
	that are now handled by the gcr library from gnome-keyring.
	
	* pkcs11/Makefile.am:
	* pkcs11/seahorse-pkcs11-certificate.c:
	* pkcs11/seahorse-pkcs11-certificate-props.c: (added)
	* pkcs11/seahorse-pkcs11-certificate-props.h: (added)
	* pkcs11/seahorse-pkcs11-commands.c: 
	* configure.in: Depend on and use the gcr library from gnome-keyring
	for displaying certificate properties.

Added:
   trunk/pkcs11/seahorse-pkcs11-certificate-props.c   (contents, props changed)
      - copied, changed from r2694, /trunk/libcryptui/crui-x509-cert-dialog.c
   trunk/pkcs11/seahorse-pkcs11-certificate-props.h   (contents, props changed)
      - copied, changed from r2694, /trunk/libcryptui/crui-x509-cert-dialog.h
Removed:
   trunk/libcryptui/crui-asn1.c
   trunk/libcryptui/crui-asn1.h
   trunk/libcryptui/crui-util.c
   trunk/libcryptui/crui-util.h
   trunk/libcryptui/crui-x509-cert-basics.c
   trunk/libcryptui/crui-x509-cert-basics.glade
   trunk/libcryptui/crui-x509-cert-basics.h
   trunk/libcryptui/crui-x509-cert-basics.ui
   trunk/libcryptui/crui-x509-cert-dialog.c
   trunk/libcryptui/crui-x509-cert-dialog.h
   trunk/libcryptui/crui-x509-cert-simple.c
   trunk/libcryptui/crui-x509-cert-simple.h
   trunk/libcryptui/crui-x509-cert.c
   trunk/libcryptui/crui-x509-cert.h
   trunk/libcryptui/pk.asn
   trunk/libcryptui/pkix.asn
   trunk/libcryptui/template/
   trunk/libcryptui/tests/
Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/libcryptui/Makefile.am
   trunk/pkcs11/Makefile.am
   trunk/pkcs11/seahorse-pkcs11-certificate.c
   trunk/pkcs11/seahorse-pkcs11-commands.c

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Thu Jan 29 02:36:59 2009
@@ -315,7 +315,7 @@
 dnl GNOME-KEYRING
 dnl ****************************************************************************
 
-PKG_CHECK_MODULES([GNOME_KEYRING], gnome-keyring-1 >= 2.25.3,
+PKG_CHECK_MODULES([GNOME_KEYRING], gnome-keyring-1 >= 2.25.5,
                   [enable_gnome_keyring=yes],[enable_gnome_keyring=no])
 
 if test "$enable_gnome_keyring" = "no"; then
@@ -427,7 +427,7 @@
 	echo "disabling pkcs11 support"
 	enable_pkcs11="no"
 else
-	PKG_CHECK_MODULES(GP11, gp11-0 >= 2.23.6, enable_pkcs11="yes", enable_pkcs11="no")
+	PKG_CHECK_MODULES(GP11, gp11-0 >= 2.25.5 gcr >= 2.25.5, enable_pkcs11="yes", enable_pkcs11="no")
 	if test "$enable_pkcs11" == "yes"; then
 		AC_DEFINE(WITH_PKCS11, 1, [gp11 library available])
 		SEAHORSE_CFLAGS="$SEAHORSE_CFLAGS $GP11_CFLAGS"
@@ -561,7 +561,6 @@
 gkr/Makefile
 libcryptui/cryptui.pc
 libcryptui/Makefile
-libcryptui/tests/Makefile
 libegg/Makefile
 libseahorse/Makefile
 pgp/Makefile

Modified: trunk/libcryptui/Makefile.am
==============================================================================
--- trunk/libcryptui/Makefile.am	(original)
+++ trunk/libcryptui/Makefile.am	Thu Jan 29 02:36:59 2009
@@ -1,11 +1,3 @@
-if WITH_TESTS
-TESTS_DIR = tests
-else
-TESTS_DIR = 
-endif
-
-SUBDIRS = . $(TESTS_DIR)
-
 # -----------------------------------------------------------------
 # LIBRARY HEADERS
 # 
@@ -18,11 +10,7 @@
     cryptui-key-store.h \
     cryptui-key-combo.h \
     cryptui-key-list.h \
-    cryptui-key-chooser.h \
-    crui-x509-cert.h \
-    crui-x509-cert-simple.h \
-    crui-x509-cert-basics.h \
-    crui-x509-cert-dialog.h
+    cryptui-key-chooser.h
 
 # -----------------------------------------------------------------
 # MARSHALLERS
@@ -52,12 +40,6 @@
     cryptui-key-combo.h cryptui-key-combo.c \
     cryptui-key-list.h cryptui-key-list.c \
     cryptui-key-chooser.h cryptui-key-chooser.c \
-    crui-asn1.h crui-asn1.c \
-    crui-util.h crui-util.c \
-    crui-x509-cert.h crui-x509-cert.c \
-    crui-x509-cert-basics.h crui-x509-cert-basics.c \
-    crui-x509-cert-dialog.h crui-x509-cert-dialog.c \
-    crui-x509-cert-simple.h crui-x509-cert-simple.c \
     $(MARSHALLERS)
     
 libcryptui_la_LDFLAGS = \
@@ -76,32 +58,6 @@
 	cp cryptui.pc cryptui-$(LIBCRYPTUI_MAJOR).pc
 
 # ------------------------------------------------------------------
-# ASN1 FILES
-
-ASN1_FILES = \
-	pk.asn \
-	pkix.asn
-	
-TAB_FILES = $(ASN1_FILES:.asn=.tab)
-
-.asn.tab:
-	asn1Parser -o $@ $< 
-	
-# ------------------------------------------------------------------
-# UI BUILDER
-# 
-
-uidir = $(datadir)/cryptui/ui/
-
-GLADE_FILES = \
-	crui-x509-cert-basics.glade
-	
-.glade.ui: 
-	gtk-builder-convert --skip-windows $< $@
-	
-ui_DATA = $(GLADE_FILES:.glade=.ui)
-
-# ------------------------------------------------------------------
 # COMMON
 
 INCLUDES = -I$(top_builddir) \
@@ -114,17 +70,12 @@
 EXTRA_DIST = \
 	cryptui-marshal.list \
 	cryptui.pc.in \
-	$(GLADE_FILES) \
-	$(ui_DATA) \
-	$(TAB_FILES)
+	$(GLADE_FILES)
     
 CLEANFILES = \
 	cryptui-marshal.h \
     	cryptui-marshal.c \
-    	$(ui_DATA) \
-	$(TAB_FILES) \
     	$(pkgconfig_DATA)
 
 BUILT_SOURCES = \
-	$(MARSHALLERS) \
-	$(TAB_FILES)
+	$(MARSHALLERS)

Modified: trunk/pkcs11/Makefile.am
==============================================================================
--- trunk/pkcs11/Makefile.am	(original)
+++ trunk/pkcs11/Makefile.am	Thu Jan 29 02:36:59 2009
@@ -13,12 +13,14 @@
 	-DLOCALEDIR=\"$(localedir)\" \
 	-DEXECDIR=\""$(seahorselibexecbindir)"\" \
 	-DLIBCRYPTUI_API_SUBJECT_TO_CHANGE \
+	-DGCR_API_SUBJECT_TO_CHANGE \
 	-DGETTEXT_PACKAGE=\""seahorse\""
 
 noinst_LTLIBRARIES = libseahorse-pkcs11.la
 
 libseahorse_pkcs11_la_SOURCES = \
 	seahorse-pkcs11-certificate.c seahorse-pkcs11-certificate.h \
+	seahorse-pkcs11-certificate-props.c seahorse-pkcs11-certificate-props.h \
 	seahorse-pkcs11-commands.c seahorse-pkcs11-commands.h \
 	seahorse-pkcs11-module.c seahorse-pkcs11-module.h \
 	seahorse-pkcs11-helpers.c seahorse-pkcs11-helpers.h \

Copied: trunk/pkcs11/seahorse-pkcs11-certificate-props.c (from r2694, /trunk/libcryptui/crui-x509-cert-dialog.c)
==============================================================================
--- /trunk/libcryptui/crui-x509-cert-dialog.c	(original)
+++ trunk/pkcs11/seahorse-pkcs11-certificate-props.c	Thu Jan 29 02:36:59 2009
@@ -21,24 +21,26 @@
 
 #include "config.h"
 
-#include "crui-x509-cert-dialog.h"
+#include "seahorse-pkcs11-certificate-props.h"
 
-#include "crui-x509-cert-basics.h"
+#include <gcr/gcr-certificate-basics-widget.h>
+#include <gcr/gcr-certificate-details-widget.h>
 
 enum {
 	PROP_0,
 	PROP_CERTIFICATE
 };
 
-struct _CruiX509CertDialogPrivate {
+struct _SeahorsePkcs11CertificatePropsPrivate {
 	GtkNotebook *tabs;
-	CruiX509CertBasics *basics;
+	GcrCertificateBasicsWidget *basics;
+	GcrCertificateDetailsWidget *details;
 };
 
-G_DEFINE_TYPE (CruiX509CertDialog, crui_x509_cert_dialog, GTK_TYPE_DIALOG);
+G_DEFINE_TYPE (SeahorsePkcs11CertificateProps, seahorse_pkcs11_certificate_props, GTK_TYPE_DIALOG);
 
-#define CRUI_X509_CERT_DIALOG_GET_PRIVATE(o) \
-	(G_TYPE_INSTANCE_GET_PRIVATE ((o), CRUI_TYPE_X509_CERT_DIALOG, CruiX509CertDialogPrivate))
+#define SEAHORSE_PKCS11_CERTIFICATE_PROPS_GET_PRIVATE(o) \
+	(G_TYPE_INSTANCE_GET_PRIVATE ((o), SEAHORSE_TYPE_PKCS11_CERTIFICATE_PROPS, SeahorsePkcs11CertificatePropsPrivate))
 
 /* -----------------------------------------------------------------------------
  * INTERNAL 
@@ -50,9 +52,9 @@
 
 
 static void
-crui_x509_cert_dialog_init (CruiX509CertDialog *self)
+seahorse_pkcs11_certificate_props_init (SeahorsePkcs11CertificateProps *self)
 {
-	CruiX509CertDialogPrivate *pv = CRUI_X509_CERT_DIALOG_GET_PRIVATE (self);
+	SeahorsePkcs11CertificatePropsPrivate *pv = SEAHORSE_PKCS11_CERTIFICATE_PROPS_GET_PRIVATE (self);
 	GtkWidget *button;
 	
 	pv->tabs = GTK_NOTEBOOK (gtk_notebook_new ());
@@ -61,10 +63,14 @@
 	gtk_container_set_border_width (GTK_CONTAINER (pv->tabs), 5);
 	gtk_widget_show (GTK_WIDGET (pv->tabs));
 	
-	pv->basics = crui_x509_cert_basics_new (NULL);
-	crui_x509_cert_dialog_add_view (self, _("Certificate"), GTK_WIDGET (pv->basics));
+	pv->basics = gcr_certificate_basics_widget_new (NULL);
+	seahorse_pkcs11_certificate_props_add_view (self, _("Certificate"), GTK_WIDGET (pv->basics));
 	gtk_widget_show (GTK_WIDGET (pv->basics));
 	
+	pv->details = gcr_certificate_details_widget_new (NULL);
+	seahorse_pkcs11_certificate_props_add_view (self, _("Details"), GTK_WIDGET (pv->details));
+	gtk_widget_show (GTK_WIDGET (pv->details));
+	
 	button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
 	gtk_dialog_add_action_widget (GTK_DIALOG (self), button, GTK_RESPONSE_CLOSE);
 	gtk_widget_show (button);
@@ -73,39 +79,45 @@
 }
 
 static void
-crui_x509_cert_dialog_dispose (GObject *obj)
+seahorse_pkcs11_certificate_props_dispose (GObject *obj)
 {
-	CruiX509CertDialog *self = CRUI_X509_CERT_DIALOG (obj);
-	CruiX509CertDialogPrivate *pv = CRUI_X509_CERT_DIALOG_GET_PRIVATE (self);
+	SeahorsePkcs11CertificateProps *self = SEAHORSE_PKCS11_CERTIFICATE_PROPS (obj);
+	SeahorsePkcs11CertificatePropsPrivate *pv = SEAHORSE_PKCS11_CERTIFICATE_PROPS_GET_PRIVATE (self);
 	
 	if (pv->basics) {
-		crui_x509_cert_dialog_remove_view (self, GTK_WIDGET (pv->basics));
+		seahorse_pkcs11_certificate_props_remove_view (self, GTK_WIDGET (pv->basics));
 		pv->basics = NULL;
 	}
+
+	if (pv->details) {
+		seahorse_pkcs11_certificate_props_remove_view (self, GTK_WIDGET (pv->details));
+		pv->details = NULL;
+	}
     
-	G_OBJECT_CLASS (crui_x509_cert_dialog_parent_class)->dispose (obj);
+	G_OBJECT_CLASS (seahorse_pkcs11_certificate_props_parent_class)->dispose (obj);
 }
 
 static void
-crui_x509_cert_dialog_finalize (GObject *obj)
+seahorse_pkcs11_certificate_props_finalize (GObject *obj)
 {
-	CruiX509CertDialog *self = CRUI_X509_CERT_DIALOG (obj);
-	CruiX509CertDialogPrivate *pv = CRUI_X509_CERT_DIALOG_GET_PRIVATE (self);
+	SeahorsePkcs11CertificateProps *self = SEAHORSE_PKCS11_CERTIFICATE_PROPS (obj);
+	SeahorsePkcs11CertificatePropsPrivate *pv = SEAHORSE_PKCS11_CERTIFICATE_PROPS_GET_PRIVATE (self);
 
 	g_assert (pv->basics == NULL);
+	g_assert (pv->details == NULL);
 	
-	G_OBJECT_CLASS (crui_x509_cert_dialog_parent_class)->finalize (obj);
+	G_OBJECT_CLASS (seahorse_pkcs11_certificate_props_parent_class)->finalize (obj);
 }
 
 static void
-crui_x509_cert_dialog_set_property (GObject *obj, guint prop_id, const GValue *value, 
+seahorse_pkcs11_certificate_props_set_property (GObject *obj, guint prop_id, const GValue *value, 
                            GParamSpec *pspec)
 {
-	CruiX509CertDialog *self = CRUI_X509_CERT_DIALOG (obj);
+	SeahorsePkcs11CertificateProps *self = SEAHORSE_PKCS11_CERTIFICATE_PROPS (obj);
 	
 	switch (prop_id) {
 	case PROP_CERTIFICATE:
-		crui_x509_cert_dialog_set_certificate (self, g_value_get_object (value));
+		seahorse_pkcs11_certificate_props_set_certificate (self, g_value_get_object (value));
 		break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, prop_id, pspec);
@@ -114,14 +126,14 @@
 }
 
 static void
-crui_x509_cert_dialog_get_property (GObject *obj, guint prop_id, GValue *value, 
+seahorse_pkcs11_certificate_props_get_property (GObject *obj, guint prop_id, GValue *value, 
                            GParamSpec *pspec)
 {
-	CruiX509CertDialog *self = CRUI_X509_CERT_DIALOG (obj);
+	SeahorsePkcs11CertificateProps *self = SEAHORSE_PKCS11_CERTIFICATE_PROPS (obj);
 	
 	switch (prop_id) {
 	case PROP_CERTIFICATE:
-		g_value_set_object (value, crui_x509_cert_dialog_get_certificate (self));
+		g_value_set_object (value, seahorse_pkcs11_certificate_props_get_certificate (self));
 		break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, prop_id, pspec);
@@ -130,67 +142,67 @@
 }
 
 static void
-crui_x509_cert_dialog_class_init (CruiX509CertDialogClass *klass)
+seahorse_pkcs11_certificate_props_class_init (SeahorsePkcs11CertificatePropsClass *klass)
 {
 	GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 	
-	crui_x509_cert_dialog_parent_class = g_type_class_peek_parent (klass);
-	g_type_class_add_private (klass, sizeof (CruiX509CertDialogPrivate));
+	seahorse_pkcs11_certificate_props_parent_class = g_type_class_peek_parent (klass);
+	g_type_class_add_private (klass, sizeof (SeahorsePkcs11CertificatePropsPrivate));
 
-	gobject_class->dispose = crui_x509_cert_dialog_dispose;
-	gobject_class->finalize = crui_x509_cert_dialog_finalize;
-	gobject_class->set_property = crui_x509_cert_dialog_set_property;
-	gobject_class->get_property = crui_x509_cert_dialog_get_property;
+	gobject_class->dispose = seahorse_pkcs11_certificate_props_dispose;
+	gobject_class->finalize = seahorse_pkcs11_certificate_props_finalize;
+	gobject_class->set_property = seahorse_pkcs11_certificate_props_set_property;
+	gobject_class->get_property = seahorse_pkcs11_certificate_props_get_property;
 
 	g_object_class_install_property (gobject_class, PROP_CERTIFICATE,
 	           g_param_spec_object ("certificate", "Certificate", "Certificate to display", 
-	                                CRUI_TYPE_X509_CERT, G_PARAM_READWRITE));
+	                                SEAHORSE_TYPE_X509_CERT, G_PARAM_READWRITE));
 }
 
 /* -----------------------------------------------------------------------------
  * PUBLIC 
  */
 
-CruiX509CertDialog*
-crui_x509_cert_dialog_new (CruiX509Cert *cert)
+SeahorsePkcs11CertificateProps*
+seahorse_pkcs11_certificate_props_new (GcrCertificate *cert)
 {
-	return g_object_new (CRUI_TYPE_X509_CERT_DIALOG, "certificate", cert, NULL);
+	return g_object_new (SEAHORSE_TYPE_PKCS11_CERTIFICATE_PROPS, "certificate", cert, NULL);
 }
 
 void
-crui_x509_cert_dialog_set_certificate (CruiX509CertDialog *self, CruiX509Cert *cert)
+seahorse_pkcs11_certificate_props_set_certificate (SeahorsePkcs11CertificateProps *self, GcrCertificate *cert)
 {
-	CruiX509CertDialogPrivate *pv = CRUI_X509_CERT_DIALOG_GET_PRIVATE (self);
-	g_return_if_fail (CRUI_IS_X509_CERT_DIALOG (self));
+	SeahorsePkcs11CertificatePropsPrivate *pv = SEAHORSE_PKCS11_CERTIFICATE_PROPS_GET_PRIVATE (self);
+	g_return_if_fail (SEAHORSE_IS_PKCS11_CERTIFICATE_PROPS (self));
 	
-	crui_x509_cert_basics_set_certificate (pv->basics, cert);
+	gcr_certificate_basics_widget_set_certificate (pv->basics, cert);
+	gcr_certificate_details_widget_set_certificate (pv->details, cert);
 	g_object_notify (G_OBJECT (self), "certificate");
 }
 
-CruiX509Cert*
-crui_x509_cert_dialog_get_certificate (CruiX509CertDialog *self)
+GcrCertificate*
+seahorse_pkcs11_certificate_props_get_certificate (SeahorsePkcs11CertificateProps *self)
 {
-	CruiX509CertDialogPrivate *pv = CRUI_X509_CERT_DIALOG_GET_PRIVATE (self);
-	g_return_val_if_fail (CRUI_IS_X509_CERT_DIALOG (self), NULL);
+	SeahorsePkcs11CertificatePropsPrivate *pv = SEAHORSE_PKCS11_CERTIFICATE_PROPS_GET_PRIVATE (self);
+	g_return_val_if_fail (SEAHORSE_IS_PKCS11_CERTIFICATE_PROPS (self), NULL);
 	
-	return crui_x509_cert_basics_get_certificate (pv->basics);
+	return gcr_certificate_basics_widget_get_certificate (pv->basics);
 }
 
-
 void
-crui_x509_cert_dialog_add_view (CruiX509CertDialog *self, const gchar *title, GtkWidget *view)
+seahorse_pkcs11_certificate_props_add_view (SeahorsePkcs11CertificateProps *self, const gchar *title, GtkWidget *view)
 {
-	g_return_if_fail (CRUI_IS_X509_CERT_DIALOG (self));
-	crui_x509_cert_dialog_insert_view (self, title, view, -1);
+	g_return_if_fail (SEAHORSE_IS_PKCS11_CERTIFICATE_PROPS (self));
+	seahorse_pkcs11_certificate_props_insert_view (self, title, view, -1);
 }
 
 void
-crui_x509_cert_dialog_insert_view (CruiX509CertDialog *self, const gchar *title, 
-                                   GtkWidget *view, gint position)
+seahorse_pkcs11_certificate_props_insert_view (SeahorsePkcs11CertificateProps *self, const gchar *title, 
+                                               GtkWidget *view, gint position)
 {
-	CruiX509CertDialogPrivate *pv = CRUI_X509_CERT_DIALOG_GET_PRIVATE (self);
+	SeahorsePkcs11CertificatePropsPrivate *pv = SEAHORSE_PKCS11_CERTIFICATE_PROPS_GET_PRIVATE (self);
 	
-	g_return_if_fail (CRUI_IS_X509_CERT_DIALOG (self));
+	g_return_if_fail (SEAHORSE_IS_PKCS11_CERTIFICATE_PROPS (self));
 	g_return_if_fail (title);
 	
 	g_return_if_fail (GTK_IS_WIDGET (view));
@@ -200,12 +212,12 @@
 }
 
 void
-crui_x509_cert_dialog_focus_view (CruiX509CertDialog *self, GtkWidget *view)
+seahorse_pkcs11_certificate_props_focus_view (SeahorsePkcs11CertificateProps *self, GtkWidget *view)
 {
-	CruiX509CertDialogPrivate *pv = CRUI_X509_CERT_DIALOG_GET_PRIVATE (self);
+	SeahorsePkcs11CertificatePropsPrivate *pv = SEAHORSE_PKCS11_CERTIFICATE_PROPS_GET_PRIVATE (self);
 	gint page;
 	
-	g_return_if_fail (CRUI_IS_X509_CERT_DIALOG (self));
+	g_return_if_fail (SEAHORSE_IS_PKCS11_CERTIFICATE_PROPS (self));
 	g_return_if_fail (GTK_IS_WIDGET (view));
 	
 	page = gtk_notebook_page_num (pv->tabs, view);
@@ -215,12 +227,12 @@
 }
 
 void
-crui_x509_cert_dialog_remove_view (CruiX509CertDialog *self, GtkWidget *view)
+seahorse_pkcs11_certificate_props_remove_view (SeahorsePkcs11CertificateProps *self, GtkWidget *view)
 {
-	CruiX509CertDialogPrivate *pv = CRUI_X509_CERT_DIALOG_GET_PRIVATE (self);
+	SeahorsePkcs11CertificatePropsPrivate *pv = SEAHORSE_PKCS11_CERTIFICATE_PROPS_GET_PRIVATE (self);
 	gint page;
 	
-	g_return_if_fail (CRUI_IS_X509_CERT_DIALOG (self));
+	g_return_if_fail (SEAHORSE_IS_PKCS11_CERTIFICATE_PROPS (self));
 	g_return_if_fail (GTK_IS_WIDGET (view));
 	
 	page = gtk_notebook_page_num (pv->tabs, view);

Copied: trunk/pkcs11/seahorse-pkcs11-certificate-props.h (from r2694, /trunk/libcryptui/crui-x509-cert-dialog.h)
==============================================================================
--- /trunk/libcryptui/crui-x509-cert-dialog.h	(original)
+++ trunk/pkcs11/seahorse-pkcs11-certificate-props.h	Thu Jan 29 02:36:59 2009
@@ -19,51 +19,57 @@
  * 02111-1307, USA.  
  */
 
-#ifndef __CRUI_X509_CERT_DIALOG_H__
-#define __CRUI_X509_CERT_DIALOG_H__
+#ifndef __SEAHORSE_PKCS11_CERTIFICATE_PROPS_H__
+#define __SEAHORSE_PKCS11_CERTIFICATE_PROPS_H__
 
-#include "crui-x509-cert.h"
+#include <gcr/gcr-certificate.h>
 
 #include <gtk/gtk.h>
 
 #include <glib-object.h>
 #include <glib/gi18n.h>
 
-#define CRUI_TYPE_X509_CERT_DIALOG               (crui_x509_cert_dialog_get_type ())
-#define CRUI_X509_CERT_DIALOG(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), CRUI_TYPE_X509_CERT_DIALOG, CruiX509CertDialog))
-#define CRUI_X509_CERT_DIALOG_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), CRUI_TYPE_X509_CERT_DIALOG, CruiX509CertDialogClass))
-#define CRUI_IS_X509_CERT_DIALOG(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CRUI_TYPE_X509_CERT_DIALOG))
-#define CRUI_IS_X509_CERT_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), CRUI_TYPE_X509_CERT_DIALOG))
-#define CRUI_X509_CERT_DIALOG_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), CRUI_TYPE_X509_CERT_DIALOG, CruiX509CertDialogClass))
-
-typedef struct _CruiX509CertDialog CruiX509CertDialog;
-typedef struct _CruiX509CertDialogClass CruiX509CertDialogClass;
-typedef struct _CruiX509CertDialogPrivate CruiX509CertDialogPrivate;
+#define SEAHORSE_TYPE_PKCS11_CERTIFICATE_PROPS               (seahorse_pkcs11_certificate_props_get_type ())
+#define SEAHORSE_PKCS11_CERTIFICATE_PROPS(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAHORSE_TYPE_PKCS11_CERTIFICATE_PROPS, SeahorsePkcs11CertificateProps))
+#define SEAHORSE_PKCS11_CERTIFICATE_PROPS_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), SEAHORSE_TYPE_PKCS11_CERTIFICATE_PROPS, SeahorsePkcs11CertificatePropsClass))
+#define SEAHORSE_IS_PKCS11_CERTIFICATE_PROPS(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAHORSE_TYPE_PKCS11_CERTIFICATE_PROPS))
+#define SEAHORSE_IS_PKCS11_CERTIFICATE_PROPS_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAHORSE_TYPE_PKCS11_CERTIFICATE_PROPS))
+#define SEAHORSE_PKCS11_CERTIFICATE_PROPS_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAHORSE_TYPE_PKCS11_CERTIFICATE_PROPS, SeahorsePkcs11CertificatePropsClass))
+
+typedef struct _SeahorsePkcs11CertificateProps SeahorsePkcs11CertificateProps;
+typedef struct _SeahorsePkcs11CertificatePropsClass SeahorsePkcs11CertificatePropsClass;
+typedef struct _SeahorsePkcs11CertificatePropsPrivate SeahorsePkcs11CertificatePropsPrivate;
     
-struct _CruiX509CertDialog {
+struct _SeahorsePkcs11CertificateProps {
 	GtkDialog parent;
 };
 
-struct _CruiX509CertDialogClass {
+struct _SeahorsePkcs11CertificatePropsClass {
 	GtkDialogClass parent_class;
 };
 
-GType                      crui_x509_cert_dialog_get_type               (void);
+GType                      seahorse_pkcs11_certificate_props_get_type               (void);
 
-CruiX509CertDialog*        crui_x509_cert_dialog_new                    (CruiX509Cert *cert);
+GtkDialog*                 seahorse_pkcs11_certificate_props_new                    (GcrCertificate *cert);
 
-void                       crui_x509_cert_dialog_set_certificate        (CruiX509CertDialog *self, CruiX509Cert *cert);
+void                       seahorse_pkcs11_certificate_props_set_certificate        (SeahorsePkcs11CertificateProps *self, 
+                                                                                     GcrCertificate *cert);
 
-CruiX509Cert*              crui_x509_cert_dialog_get_certificate        (CruiX509CertDialog *self);
+GcrCertificate*            seahorse_pkcs11_certificate_props_get_certificate        (SeahorsePkcs11CertificateProps *self);
 
-void                       crui_x509_cert_dialog_add_view               (CruiX509CertDialog *self, const gchar *title, 
-                                                                         GtkWidget *view);
+void                       seahorse_pkcs11_certificate_props_add_view               (SeahorsePkcs11CertificateProps *self, 
+                                                                                     const gchar *title, 
+                                                                                     GtkWidget *view);
 
-void                       crui_x509_cert_dialog_insert_view            (CruiX509CertDialog *self, const gchar *title, 
-                                                                         GtkWidget *view, gint position);
+void                       seahorse_pkcs11_certificate_props_insert_view            (SeahorsePkcs11CertificateProps *self, 
+                                                                                     const gchar *title, 
+                                                                                     GtkWidget *view, 
+                                                                                     gint position);
 
-void                       crui_x509_cert_dialog_focus_view             (CruiX509CertDialog *self, GtkWidget *view);
+void                       seahorse_pkcs11_certificate_props_focus_view             (SeahorsePkcs11CertificateProps *self, 
+                                                                                     GtkWidget *view);
 
-void                       crui_x509_cert_dialog_remove_view            (CruiX509CertDialog *self, GtkWidget *view);
+void                       seahorse_pkcs11_certificate_props_remove_view            (SeahorsePkcs11CertificateProps *self, 
+                                                                                     GtkWidget *view);
 
-#endif /* __CRUI_X509_CERT_DIALOG_H__ */
+#endif /* __SEAHORSE_PKCS11_CERTIFICATE_PROPS_H__ */

Modified: trunk/pkcs11/seahorse-pkcs11-certificate.c
==============================================================================
--- trunk/pkcs11/seahorse-pkcs11-certificate.c	(original)
+++ trunk/pkcs11/seahorse-pkcs11-certificate.c	Thu Jan 29 02:36:59 2009
@@ -29,7 +29,7 @@
 #include "seahorse-util.h"
 #include "seahorse-validity.h"
 
-#include "libcryptui/crui-x509-cert.h"
+#include <gcr/gcr-certificate.h>
 
 #include <pkcs11.h>
 #include <pkcs11g.h>
@@ -58,10 +58,10 @@
 	GP11Attribute der_value;
 };
 
-static void seahorse_pkcs11_certificate_iface (CruiX509CertIface *iface);
+static void seahorse_pkcs11_certificate_iface (GcrCertificateIface *iface);
 
-G_DEFINE_TYPE_EXTENDED (SeahorsePkcs11Certificate, seahorse_pkcs11_certificate, SEAHORSE_PKCS11_TYPE_OBJECT, 0,
-                        G_IMPLEMENT_INTERFACE (CRUI_TYPE_X509_CERT, seahorse_pkcs11_certificate_iface));
+G_DEFINE_TYPE_WITH_CODE (SeahorsePkcs11Certificate, seahorse_pkcs11_certificate, SEAHORSE_PKCS11_TYPE_OBJECT, 
+                         G_IMPLEMENT_INTERFACE (GCR_TYPE_CERTIFICATE, seahorse_pkcs11_certificate_iface));
 
 /* -----------------------------------------------------------------------------
  * INTERNAL 
@@ -262,7 +262,7 @@
 }
 
 const guchar*
-seahorse_pkcs11_certificate_get_der_data (CruiX509Cert *cert, gsize *n_length)
+seahorse_pkcs11_certificate_get_der_data (GcrCertificate *cert, gsize *n_length)
 {
 	SeahorsePkcs11Object *obj = SEAHORSE_PKCS11_OBJECT (cert);
 	SeahorsePkcs11Certificate *self = SEAHORSE_PKCS11_CERTIFICATE (cert);
@@ -292,7 +292,7 @@
 }
 
 static void 
-seahorse_pkcs11_certificate_iface (CruiX509CertIface *iface)
+seahorse_pkcs11_certificate_iface (GcrCertificateIface *iface)
 {
 	iface->get_der_data = (gpointer)seahorse_pkcs11_certificate_get_der_data;
 }

Modified: trunk/pkcs11/seahorse-pkcs11-commands.c
==============================================================================
--- trunk/pkcs11/seahorse-pkcs11-commands.c	(original)
+++ trunk/pkcs11/seahorse-pkcs11-commands.c	Thu Jan 29 02:36:59 2009
@@ -25,13 +25,12 @@
 
 #include "seahorse-pkcs11.h"
 #include "seahorse-pkcs11-certificate.h"
+#include "seahorse-pkcs11-certificate-props.h"
 
 #include "seahorse-util.h"
 
 #include "common/seahorse-registry.h"
 
-#include "libcryptui/crui-x509-cert-dialog.h"
-
 enum {
 	PROP_0
 };
@@ -83,7 +82,7 @@
 	}
 	
 	/* Create a new dialog for the certificate */
-	window = GTK_WINDOW (crui_x509_cert_dialog_new (CRUI_X509_CERT (object)));
+	window = GTK_WINDOW (seahorse_pkcs11_certificate_props_new (GCR_CERTIFICATE (object)));
 	gtk_window_set_transient_for (window, seahorse_view_get_window (seahorse_commands_get_view (cmds)));
 	g_object_set_qdata (G_OBJECT (object), slot_certificate_window, window);
 	gtk_widget_show (GTK_WIDGET (window));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]