diff options
author | Chris Toshok <toshok@ximian.com> | 2003-12-05 10:10:09 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2003-12-05 10:10:09 +0800 |
commit | 212cc70aecd40d9578a6e88196122ff91ad2e6e8 (patch) | |
tree | 4c6368524a07481de4d329250d120297f74fbaf5 /smime/lib | |
parent | c65fbd94c0daff4ed02df7447e8eeaddd9cff9c0 (diff) | |
download | gsoc2013-evolution-212cc70aecd40d9578a6e88196122ff91ad2e6e8.tar.gz 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
Diffstat (limited to 'smime/lib')
-rw-r--r-- | smime/lib/e-cert.c | 18 | ||||
-rw-r--r-- | smime/lib/e-cert.h | 1 |
2 files changed, 13 insertions, 6 deletions
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); |