summaryrefslogtreecommitdiff
path: root/gcr
diff options
context:
space:
mode:
authorNiels De Graef <nielsdegraef@gmail.com>2022-07-06 21:56:27 +0200
committerNiels De Graef <nielsdegraef@gmail.com>2022-07-07 13:41:57 +0200
commit33f64237aaf6292d7c040eabade47c75661219bf (patch)
tree3f4b9806bca89849806c0cd24875c27e33f10268 /gcr
parent350453053c13bd528de53d0003c0af4444dcd0f5 (diff)
downloadgcr-33f64237aaf6292d7c040eabade47c75661219bf.tar.gz
certificate: Remove markup-text
It's a silly property that was introduced for the likes of Seahorse, which should just do better.
Diffstat (limited to 'gcr')
-rw-r--r--gcr/Gcr-3.metadata1
-rw-r--r--gcr/gcr-certificate.c46
-rw-r--r--gcr/gcr-certificate.h2
3 files changed, 1 insertions, 48 deletions
diff --git a/gcr/Gcr-3.metadata b/gcr/Gcr-3.metadata
index 3eee7e5..41ab167 100644
--- a/gcr/Gcr-3.metadata
+++ b/gcr/Gcr-3.metadata
@@ -3,7 +3,6 @@
Certificate
.label nullable=true
- .markup nullable=true
.subject nullable=true
.issuer nullable=true
Comparable
diff --git a/gcr/gcr-certificate.c b/gcr/gcr-certificate.c
index 13b2379..f0d6d66 100644
--- a/gcr/gcr-certificate.c
+++ b/gcr/gcr-certificate.c
@@ -94,7 +94,6 @@ static GBytes * _gcr_certificate_get_issuer_const (GcrCertificate *self);
enum {
PROP_FIRST = 0x0007000,
PROP_LABEL,
- PROP_MARKUP_TEXT,
PROP_DESCRIPTION,
PROP_SUBJECT_NAME,
PROP_ISSUER_NAME,
@@ -181,34 +180,6 @@ digest_certificate (GcrCertificate *self, GChecksumType type)
return digest;
}
-/**
- * gcr_certificate_get_markup_text:
- * @self: a certificate
- *
- * Calculate a GMarkup string for displaying this certificate.
- *
- * Returns: (transfer full): the markup string
- */
-gchar *
-gcr_certificate_get_markup_text (GcrCertificate *self)
-{
- gchar *label = NULL;
- gchar *issuer;
- gchar *markup;
-
- g_object_get (self, "label", &label, NULL);
- issuer = gcr_certificate_get_issuer_name (self);
-
- if (issuer)
- markup = g_markup_printf_escaped ("%s\n<small>Issued by: %s</small>", label, issuer);
- else
- markup = g_markup_printf_escaped ("%s\n<small>Issued by: <i>No name</i></small>", label);
-
- g_free (label);
- g_free (issuer);
- return markup;
-}
-
/* ---------------------------------------------------------------------------------
* INTERFACE
*/
@@ -240,16 +211,7 @@ gcr_certificate_default_init (GcrCertificateIface *iface)
"", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
- * GcrCertificate:markup-text:
- *
- * GLib markup to describe the certificate
- */
- g_object_interface_install_property (iface,
- g_param_spec_string ("markup-text", "Markup text", "Markup which describes object being rendered",
- "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
-
- /**
- * GcrCertificate:subject-name:
+ * GcrCertificate:subject:
*
* Common name part of the certificate subject
*/
@@ -971,7 +933,6 @@ gcr_certificate_mixin_emit_notify (GcrCertificate *self)
obj = G_OBJECT (self);
g_object_notify (obj, "label");
- g_object_notify (obj, "markup-text");
g_object_notify (obj, "subject-name");
g_object_notify (obj, "issuer-name");
g_object_notify (obj, "expiry-date");
@@ -1006,8 +967,6 @@ gcr_certificate_mixin_class_init (GObjectClass *object_class)
{
if (!g_object_class_find_property (object_class, "description"))
g_object_class_override_property (object_class, PROP_DESCRIPTION, "description");
- if (!g_object_class_find_property (object_class, "markup-text"))
- g_object_class_override_property (object_class, PROP_MARKUP_TEXT, "markup-text");
if (!g_object_class_find_property (object_class, "label"))
g_object_class_override_property (object_class, PROP_LABEL, "label");
if (!g_object_class_find_property (object_class, "subject-name"))
@@ -1078,9 +1037,6 @@ gcr_certificate_mixin_get_property (GObject *obj, guint prop_id,
case PROP_DESCRIPTION:
g_value_set_string (value, _("Certificate"));
break;
- case PROP_MARKUP_TEXT:
- g_value_take_string (value, gcr_certificate_get_markup_text (cert));
- break;
case PROP_ISSUER_NAME:
g_value_take_string (value, gcr_certificate_get_issuer_name (cert));
break;
diff --git a/gcr/gcr-certificate.h b/gcr/gcr-certificate.h
index ab65026..9f7a1f2 100644
--- a/gcr/gcr-certificate.h
+++ b/gcr/gcr-certificate.h
@@ -120,8 +120,6 @@ guchar* gcr_certificate_get_fingerprint (GcrCertificate *self
gchar* gcr_certificate_get_fingerprint_hex (GcrCertificate *self,
GChecksumType type);
-gchar * gcr_certificate_get_markup_text (GcrCertificate *self);
-
gboolean gcr_certificate_get_basic_constraints (GcrCertificate *self,
gboolean *is_ca,
gint *path_len);