aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2003-12-05 10:10:09 +0800
committerChris Toshok <toshok@src.gnome.org>2003-12-05 10:10:09 +0800
commit212cc70aecd40d9578a6e88196122ff91ad2e6e8 (patch)
tree4c6368524a07481de4d329250d120297f74fbaf5
parentc65fbd94c0daff4ed02df7447e8eeaddd9cff9c0 (diff)
downloadgsoc2013-evolution-212cc70aecd40d9578a6e88196122ff91ad2e6e8.tar
gsoc2013-evolution-212cc70aecd40d9578a6e88196122ff91ad2e6e8.tar.gz
gsoc2013-evolution-212cc70aecd40d9578a6e88196122ff91ad2e6e8.tar.bz2
gsoc2013-evolution-212cc70aecd40d9578a6e88196122ff91ad2e6e8.tar.lz
gsoc2013-evolution-212cc70aecd40d9578a6e88196122ff91ad2e6e8.tar.xz
gsoc2013-evolution-212cc70aecd40d9578a6e88196122ff91ad2e6e8.tar.zst
gsoc2013-evolution-212cc70aecd40d9578a6e88196122ff91ad2e6e8.zip
set the window title based on e_cert_get_window_title.
2003-12-04 Chris Toshok <toshok@ximian.com> * gui/certificate-viewer.c (certificate_viewer_show): set the window title based on e_cert_get_window_title. * lib/e-cert.c (e_cert_get_window_title): new function, for use with the certificate viewer. (create_asn1_struct): call e_cert_get_window_title. svn path=/trunk/; revision=23643
-rw-r--r--smime/ChangeLog9
-rw-r--r--smime/gui/certificate-viewer.c8
-rw-r--r--smime/lib/e-cert.c18
-rw-r--r--smime/lib/e-cert.h1
4 files changed, 30 insertions, 6 deletions
diff --git a/smime/ChangeLog b/smime/ChangeLog
index c5b644d9a2..b82a4c6fa0 100644
--- a/smime/ChangeLog
+++ b/smime/ChangeLog
@@ -1,5 +1,14 @@
2003-12-04 Chris Toshok <toshok@ximian.com>
+ * gui/certificate-viewer.c (certificate_viewer_show): set the
+ window title based on e_cert_get_window_title.
+
+ * lib/e-cert.c (e_cert_get_window_title): new function, for use
+ with the certificate viewer.
+ (create_asn1_struct): call e_cert_get_window_title.
+
+2003-12-04 Chris Toshok <toshok@ximian.com>
+
* lib/e-cert.h: add prototype for e_cert_get_asn1_struct.
* lib/e-cert.c (e_cert_dispose): unref the asn1 object.
diff --git a/smime/gui/certificate-viewer.c b/smime/gui/certificate-viewer.c
index e897597319..792ccab01a 100644
--- a/smime/gui/certificate-viewer.c
+++ b/smime/gui/certificate-viewer.c
@@ -271,12 +271,20 @@ GtkWidget*
certificate_viewer_show (ECert *cert)
{
CertificateViewerData *cvm_data;
+ char *title;
cvm_data = g_new0 (CertificateViewerData, 1);
cvm_data->gui = glade_xml_new (EVOLUTION_GLADEDIR "/" GLADE_FILE_NAME, NULL, NULL);
cvm_data->dialog = glade_xml_get_widget (cvm_data->gui, "certificate-viewer-dialog");
+ title = g_strdup_printf (_("Certificate Viewer: %s"), e_cert_get_window_title (cert));
+
+ gtk_window_set_title (GTK_WINDOW (cvm_data->dialog),
+ title);
+
+ g_free (title);
+
fill_in_general (cvm_data, cert);
fill_in_details (cvm_data, cert);
diff --git a/smime/lib/e-cert.c b/smime/lib/e-cert.c
index 173f445c22..b2f4c71769 100644
--- a/smime/lib/e-cert.c
+++ b/smime/lib/e-cert.c
@@ -313,6 +313,17 @@ e_cert_get_raw_der (ECert *cert, char **data, guint32 *len)
}
const char*
+e_cert_get_window_title (ECert *cert)
+{
+ if (cert->priv->cert->nickname)
+ return cert->priv->cert->nickname;
+ else if (cert->priv->cn)
+ return cert->priv->cn;
+ else
+ return cert->priv->cert->subjectName;
+}
+
+const char*
e_cert_get_nickname (ECert *cert)
{
return cert->priv->cert->nickname;
@@ -1128,12 +1139,7 @@ create_asn1_struct (ECert *cert)
cert->priv->asn1 = e_asn1_object_new ();
- if (cert->priv->cert->nickname)
- e_asn1_object_set_display_name (cert->priv->asn1, cert->priv->cert->nickname);
- else if (cert->priv->cn)
- e_asn1_object_set_display_name (cert->priv->asn1, cert->priv->cn);
- else
- e_asn1_object_set_display_name (cert->priv->asn1, cert->priv->cert->subjectName);
+ e_asn1_object_set_display_name (cert->priv->asn1, e_cert_get_window_title (cert));
/* This sequence will be contain the tbsCertificate, signatureAlgorithm,
and signatureValue. */
diff --git a/smime/lib/e-cert.h b/smime/lib/e-cert.h
index d18e0a9486..243ce1539b 100644
--- a/smime/lib/e-cert.h
+++ b/smime/lib/e-cert.h
@@ -71,6 +71,7 @@ ECert* e_cert_new_from_der (char *data, guint32 len);
CERTCertificate* e_cert_get_internal_cert (ECert *cert);
gboolean e_cert_get_raw_der (ECert *cert, char **data, guint32 *len);
+const char* e_cert_get_window_title (ECert *cert);
const char* e_cert_get_nickname (ECert *cert);
const char* e_cert_get_email (ECert *cert);
const char* e_cert_get_org (ECert *cert);