18e780d
From 2610cddc7cae34a3db0716f0bf24ddceea25d533 Mon Sep 17 00:00:00 2001
18e780d
From: Martin Paljak <martin@martinpaljak.net>
18e780d
Date: Wed, 13 Oct 2010 09:59:00 +0000
18e780d
Subject: build with latest gcr which only has GcrCertificateWidget
18e780d
18e780d
---
18e780d
diff --git a/pkcs11/seahorse-pkcs11-certificate-props.c b/pkcs11/seahorse-pkcs11-certificate-props.c
18e780d
index c6676ce..fb44e95 100644
18e780d
--- a/pkcs11/seahorse-pkcs11-certificate-props.c
18e780d
+++ b/pkcs11/seahorse-pkcs11-certificate-props.c
18e780d
@@ -24,8 +24,7 @@
18e780d
 #include "seahorse-pkcs11-certificate.h"
18e780d
 #include "seahorse-pkcs11-certificate-props.h"
18e780d
 
18e780d
-#include <gcr/gcr-certificate-basics-widget.h>
18e780d
-#include <gcr/gcr-certificate-details-widget.h>
18e780d
+#include <gcr/gcr-certificate-widget.h>
18e780d
 
18e780d
 enum {
18e780d
 	PROP_0,
18e780d
@@ -34,8 +33,7 @@ enum {
18e780d
 
18e780d
 struct _SeahorsePkcs11CertificatePropsPrivate {
18e780d
 	GtkNotebook *tabs;
18e780d
-	GcrCertificateBasicsWidget *basics;
18e780d
-	GcrCertificateDetailsWidget *details;
18e780d
+	GcrCertificateWidget *widget;
18e780d
 };
18e780d
 
18e780d
 G_DEFINE_TYPE (SeahorsePkcs11CertificateProps, seahorse_pkcs11_certificate_props, GTK_TYPE_DIALOG);
18e780d
@@ -64,13 +62,9 @@ seahorse_pkcs11_certificate_props_init (SeahorsePkcs11CertificateProps *self)
18e780d
 	gtk_container_set_border_width (GTK_CONTAINER (pv->tabs), 5);
18e780d
 	gtk_widget_show (GTK_WIDGET (pv->tabs));
18e780d
 	
18e780d
-	pv->basics = gcr_certificate_basics_widget_new (NULL);
18e780d
-	seahorse_pkcs11_certificate_props_add_view (self, _("Certificate"), GTK_WIDGET (pv->basics));
18e780d
-	gtk_widget_show (GTK_WIDGET (pv->basics));
18e780d
-	
18e780d
-	pv->details = gcr_certificate_details_widget_new (NULL);
18e780d
-	seahorse_pkcs11_certificate_props_add_view (self, _("Details"), GTK_WIDGET (pv->details));
18e780d
-	gtk_widget_show (GTK_WIDGET (pv->details));
18e780d
+	pv->widget = gcr_certificate_widget_new (NULL);
18e780d
+	seahorse_pkcs11_certificate_props_add_view (self, _("Certificate"), GTK_WIDGET (pv->widget));
18e780d
+	gtk_widget_show (GTK_WIDGET (pv->widget));
18e780d
 	
18e780d
 	button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
18e780d
 	gtk_dialog_add_action_widget (GTK_DIALOG (self), button, GTK_RESPONSE_CLOSE);
18e780d
@@ -85,14 +79,9 @@ seahorse_pkcs11_certificate_props_dispose (GObject *obj)
18e780d
 	SeahorsePkcs11CertificateProps *self = SEAHORSE_PKCS11_CERTIFICATE_PROPS (obj);
18e780d
 	SeahorsePkcs11CertificatePropsPrivate *pv = SEAHORSE_PKCS11_CERTIFICATE_PROPS_GET_PRIVATE (self);
18e780d
 	
18e780d
-	if (pv->basics) {
18e780d
-		seahorse_pkcs11_certificate_props_remove_view (self, GTK_WIDGET (pv->basics));
18e780d
-		pv->basics = NULL;
18e780d
-	}
18e780d
-
18e780d
-	if (pv->details) {
18e780d
-		seahorse_pkcs11_certificate_props_remove_view (self, GTK_WIDGET (pv->details));
18e780d
-		pv->details = NULL;
18e780d
+	if (pv->widget) {
18e780d
+		seahorse_pkcs11_certificate_props_remove_view (self, GTK_WIDGET (pv->widget));
18e780d
+		pv->widget = NULL;
18e780d
 	}
18e780d
     
18e780d
 	G_OBJECT_CLASS (seahorse_pkcs11_certificate_props_parent_class)->dispose (obj);
18e780d
@@ -104,8 +93,7 @@ seahorse_pkcs11_certificate_props_finalize (GObject *obj)
18e780d
 	SeahorsePkcs11CertificateProps *self = SEAHORSE_PKCS11_CERTIFICATE_PROPS (obj);
18e780d
 	SeahorsePkcs11CertificatePropsPrivate *pv = SEAHORSE_PKCS11_CERTIFICATE_PROPS_GET_PRIVATE (self);
18e780d
 
18e780d
-	g_assert (pv->basics == NULL);
18e780d
-	g_assert (pv->details == NULL);
18e780d
+	g_assert (pv->widget == NULL);
18e780d
 	
18e780d
 	G_OBJECT_CLASS (seahorse_pkcs11_certificate_props_parent_class)->finalize (obj);
18e780d
 }
18e780d
@@ -176,8 +164,7 @@ seahorse_pkcs11_certificate_props_set_certificate (SeahorsePkcs11CertificateProp
18e780d
 	SeahorsePkcs11CertificatePropsPrivate *pv = SEAHORSE_PKCS11_CERTIFICATE_PROPS_GET_PRIVATE (self);
18e780d
 	g_return_if_fail (SEAHORSE_IS_PKCS11_CERTIFICATE_PROPS (self));
18e780d
 	
18e780d
-	gcr_certificate_basics_widget_set_certificate (pv->basics, cert);
18e780d
-	gcr_certificate_details_widget_set_certificate (pv->details, cert);
18e780d
+	gcr_certificate_widget_set_certificate (pv->widget, cert);
18e780d
 	g_object_notify (G_OBJECT (self), "certificate");
18e780d
 }
18e780d
 
18e780d
@@ -187,7 +174,7 @@ seahorse_pkcs11_certificate_props_get_certificate (SeahorsePkcs11CertificateProp
18e780d
 	SeahorsePkcs11CertificatePropsPrivate *pv = SEAHORSE_PKCS11_CERTIFICATE_PROPS_GET_PRIVATE (self);
18e780d
 	g_return_val_if_fail (SEAHORSE_IS_PKCS11_CERTIFICATE_PROPS (self), NULL);
18e780d
 	
18e780d
-	return gcr_certificate_basics_widget_get_certificate (pv->basics);
18e780d
+	return gcr_certificate_widget_get_certificate (pv->widget);
18e780d
 }
18e780d
 
18e780d
 void
18e780d
--
18e780d
cgit v0.8.3.1