[libnma: 5/7] cert-chooser: drop nma_cert_chooser_clear_cert()/nma_cert_chooser_clear_key() from public API
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libnma: 5/7] cert-chooser: drop nma_cert_chooser_clear_cert()/nma_cert_chooser_clear_key() from public API
- Date: Thu, 13 Feb 2020 16:51:29 +0000 (UTC)
commit 456e48936a4f9434ead994873f9b0962c75c3d52
Author: Thomas Haller <thaller redhat com>
Date: Thu Feb 13 17:28:34 2020 +0100
cert-chooser: drop nma_cert_chooser_clear_cert()/nma_cert_chooser_clear_key() from public API
The user can achieve the same via nma_cert_chooser_set_key(chooser, NULL)
and similar.
The public API should be smaller and not have functions which aren't
strictly necessary.
Drop these two.
src/libnma.ver | 5 -----
src/nma-cert-chooser.c | 38 ++++++++++++++------------------------
src/nma-cert-chooser.h | 6 ------
3 files changed, 14 insertions(+), 35 deletions(-)
---
diff --git a/src/libnma.ver b/src/libnma.ver
index 799358db..9b263d9c 100644
--- a/src/libnma.ver
+++ b/src/libnma.ver
@@ -112,8 +112,3 @@ libnma_1_8_22 {
nma_bar_code_widget_get_type;
nma_bar_code_widget_new;
} libnma_1_8_12;
-
-libnma_1_8_28 {
- nma_cert_chooser_clear_cert;
- nma_cert_chooser_clear_key;
-} libnma_1_8_22;
diff --git a/src/nma-cert-chooser.c b/src/nma-cert-chooser.c
index 2777767d..140cd15d 100644
--- a/src/nma-cert-chooser.c
+++ b/src/nma-cert-chooser.c
@@ -53,6 +53,12 @@ G_DEFINE_TYPE (NMACertChooser, nma_cert_chooser, GTK_TYPE_GRID)
#define NMA_CERT_CHOOSER_GET_PRIVATE(self) _NM_GET_PRIVATE (self, NMACertChooser, NMA_IS_CERT_CHOOSER)
#define NMA_CERT_CHOOSER_GET_VTABLE(o) (NMA_CERT_CHOOSER_GET_PRIVATE (o)->vtable)
+/*****************************************************************************/
+
+static void _chooser_clear_cert (NMACertChooser *cert_chooser);
+
+/*****************************************************************************/
+
static gboolean
accu_validation_error (GSignalInvocationHint *ihint,
GValue *return_accu,
@@ -121,7 +127,7 @@ nma_cert_chooser_set_cert_uri (NMACertChooser *cert_chooser,
g_return_if_fail (NMA_IS_CERT_CHOOSER (cert_chooser));
if (!uri) {
- nma_cert_chooser_clear_cert (cert_chooser);
+ _chooser_clear_cert (cert_chooser);
return;
}
NMA_CERT_CHOOSER_GET_VTABLE (cert_chooser)->set_cert_uri (cert_chooser, uri);
@@ -147,7 +153,7 @@ nma_cert_chooser_set_cert (NMACertChooser *cert_chooser,
g_return_if_fail (NMA_IS_CERT_CHOOSER (cert_chooser));
if (!value) {
- nma_cert_chooser_clear_cert (cert_chooser);
+ _chooser_clear_cert (cert_chooser);
return;
}
@@ -242,16 +248,8 @@ nma_cert_chooser_get_cert_password (NMACertChooser *cert_chooser)
return vtable->get_cert_password (cert_chooser);
}
-/**
- * nma_cert_chooser_clear_cert:
- * @cert_chooser: certificate chooser button instance
- *
- * Clear the certificate for the chooser button
- *
- * Since: 1.8.28
- */
-void
-nma_cert_chooser_clear_cert (NMACertChooser *cert_chooser)
+static void
+_chooser_clear_cert (NMACertChooser *cert_chooser)
{
const NMACertChooserVtable *vtable;
@@ -263,16 +261,8 @@ nma_cert_chooser_clear_cert (NMACertChooser *cert_chooser)
}
-/**
- * nma_cert_chooser_clear_key:
- * @cert_chooser: certificate chooser button instance
- *
- * Clear the key for the chooser button
- *
- * Since: 1.8.28
- */
-void
-nma_cert_chooser_clear_key (NMACertChooser *cert_chooser)
+static void
+_chooser_clear_key (NMACertChooser *cert_chooser)
{
const NMACertChooserVtable *vtable;
@@ -300,7 +290,7 @@ nma_cert_chooser_set_key_uri (NMACertChooser *cert_chooser,
g_return_if_fail (NMA_IS_CERT_CHOOSER (cert_chooser));
if (!uri) {
- nma_cert_chooser_clear_key (cert_chooser);
+ _chooser_clear_key (cert_chooser);
return;
}
@@ -327,7 +317,7 @@ nma_cert_chooser_set_key (NMACertChooser *cert_chooser,
g_return_if_fail (NMA_IS_CERT_CHOOSER (cert_chooser));
if (!value) {
- nma_cert_chooser_clear_key (cert_chooser);
+ _chooser_clear_key (cert_chooser);
return;
}
diff --git a/src/nma-cert-chooser.h b/src/nma-cert-chooser.h
index 036a38df..c4c0ad54 100644
--- a/src/nma-cert-chooser.h
+++ b/src/nma-cert-chooser.h
@@ -99,12 +99,6 @@ void nma_cert_chooser_set_key_password (NMACertChoos
NMA_AVAILABLE_IN_1_8
const gchar *nma_cert_chooser_get_key_password (NMACertChooser *cert_chooser);
-NMA_AVAILABLE_IN_1_8_28
-void nma_cert_chooser_clear_cert (NMACertChooser *cert_chooser);
-
-NMA_AVAILABLE_IN_1_8_28
-void nma_cert_chooser_clear_key (NMACertChooser *cert_chooser);
-
NMA_AVAILABLE_IN_1_8
GtkWidget *nma_cert_chooser_new (const gchar *title,
NMACertChooserFlags flags);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]