[gcr/wip/nielsdg/g-param-static-strings: 40/41] gcr: Use G_PARAM_STATIC_STRINGS
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcr/wip/nielsdg/g-param-static-strings: 40/41] gcr: Use G_PARAM_STATIC_STRINGS
- Date: Fri, 3 Jan 2020 08:46:16 +0000 (UTC)
commit c6f759c1e799e9059380b777673e801a9f4d3b7e
Author: Niels De Graef <nielsdegraef gmail com>
Date: Fri May 24 22:36:13 2019 +0200
gcr: Use G_PARAM_STATIC_STRINGS
This prevents some unnecessary string copies, resulting in less memory
used and some unnecessary performance overhead being removed. Well, a
little bit at least.
gcr/gcr-certificate-chain.c | 12 +++++++-----
gcr/gcr-certificate-request.c | 11 ++++++-----
gcr/gcr-certificate.c | 14 +++++++-------
gcr/gcr-gnupg-importer.c | 10 ++++++----
gcr/gcr-gnupg-key.c | 16 ++++++++--------
gcr/gcr-gnupg-process.c | 25 +++++++++++++++----------
gcr/gcr-importer.c | 22 +++++++++++++---------
gcr/gcr-parser.c | 9 ++++++---
gcr/gcr-pkcs11-certificate.c | 3 ++-
gcr/gcr-pkcs11-importer.c | 14 ++++++++------
gcr/gcr-secret-exchange.c | 2 +-
gcr/gcr-ssh-askpass.c | 2 +-
gcr/gcr-system-prompt.c | 15 +++++++++------
13 files changed, 89 insertions(+), 66 deletions(-)
---
diff --git a/gcr/gcr-certificate-chain.c b/gcr/gcr-certificate-chain.c
index b0d2d31..fa866d2 100644
--- a/gcr/gcr-certificate-chain.c
+++ b/gcr/gcr-certificate-chain.c
@@ -457,9 +457,10 @@ gcr_certificate_chain_class_init (GcrCertificateChainClass *klass)
* The certificate chain status. See #GcrCertificateChainStatus
*/
g_object_class_install_property (gobject_class, PROP_STATUS,
- g_param_spec_enum ("status", "Status", "Status of certificate chain",
- GCR_TYPE_CERTIFICATE_CHAIN_STATUS,
- GCR_CERTIFICATE_CHAIN_UNKNOWN, G_PARAM_READABLE));
+ g_param_spec_enum ("status", "Status", "Status of certificate chain",
+ GCR_TYPE_CERTIFICATE_CHAIN_STATUS,
+ GCR_CERTIFICATE_CHAIN_UNKNOWN,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrCertificateChain:length:
@@ -467,8 +468,9 @@ gcr_certificate_chain_class_init (GcrCertificateChainClass *klass)
* The length of the certificate chain.
*/
g_object_class_install_property (gobject_class, PROP_LENGTH,
- g_param_spec_uint ("length", "Length", "Length of certificate chain",
- 0, G_MAXUINT, 0, G_PARAM_READABLE));
+ g_param_spec_uint ("length", "Length", "Length of certificate chain",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
Q_ORIGINAL_CERT = g_quark_from_static_string ("gcr-certificate-chain-original-cert");
Q_OPERATION_DATA = g_quark_from_static_string ("gcr-certificate-chain-operation-data");
diff --git a/gcr/gcr-certificate-request.c b/gcr/gcr-certificate-request.c
index 1128f30..a1d93e7 100644
--- a/gcr/gcr-certificate-request.c
+++ b/gcr/gcr-certificate-request.c
@@ -205,8 +205,9 @@ gcr_certificate_request_class_init (GcrCertificateRequestClass *klass)
* The private key that this certificate request is for.
*/
g_object_class_install_property (gobject_class, PROP_PRIVATE_KEY,
- g_param_spec_object ("private-key", "Private key", "Private key for request",
- GCK_TYPE_OBJECT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ g_param_spec_object ("private-key", "Private key", "Private key for request",
+ GCK_TYPE_OBJECT,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
/**
* GcrCertificateRequest:format:
@@ -214,9 +215,9 @@ gcr_certificate_request_class_init (GcrCertificateRequestClass *klass)
* The format of the certificate request.
*/
g_object_class_install_property (gobject_class, PROP_FORMAT,
- g_param_spec_enum ("format", "Format", "Format of certificate request",
- GCR_TYPE_CERTIFICATE_REQUEST_FORMAT, GCR_CERTIFICATE_REQUEST_PKCS10,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ g_param_spec_enum ("format", "Format", "Format of certificate request",
+ GCR_TYPE_CERTIFICATE_REQUEST_FORMAT, GCR_CERTIFICATE_REQUEST_PKCS10,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
}
/**
diff --git a/gcr/gcr-certificate.c b/gcr/gcr-certificate.c
index 07d7572..f9a859f 100644
--- a/gcr/gcr-certificate.c
+++ b/gcr/gcr-certificate.c
@@ -267,7 +267,7 @@ gcr_certificate_default_init (GcrCertificateIface *iface)
*/
g_object_interface_install_property (iface,
g_param_spec_string ("label", "Label", "Certificate label",
- "", G_PARAM_READABLE));
+ "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrCertificate:description:
@@ -276,7 +276,7 @@ gcr_certificate_default_init (GcrCertificateIface *iface)
*/
g_object_interface_install_property (iface,
g_param_spec_string ("description", "Description", "Description of object being
rendered",
- "", G_PARAM_READABLE));
+ "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrCertificate:markup:
@@ -285,7 +285,7 @@ gcr_certificate_default_init (GcrCertificateIface *iface)
*/
g_object_interface_install_property (iface,
g_param_spec_string ("markup", "Markup", "Markup which describes object being
rendered",
- "", G_PARAM_READABLE));
+ "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrCertificate:icon:
@@ -294,7 +294,7 @@ gcr_certificate_default_init (GcrCertificateIface *iface)
*/
g_object_interface_install_property (iface,
g_param_spec_object ("icon", "Icon", "Icon for the object being rendered",
- G_TYPE_ICON, G_PARAM_READABLE));
+ G_TYPE_ICON, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrCertificate:subject:
@@ -303,7 +303,7 @@ gcr_certificate_default_init (GcrCertificateIface *iface)
*/
g_object_interface_install_property (iface,
g_param_spec_string ("subject", "Subject", "Common name of subject",
- "", G_PARAM_READABLE));
+ "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrCertificate:issuer:
@@ -312,7 +312,7 @@ gcr_certificate_default_init (GcrCertificateIface *iface)
*/
g_object_interface_install_property (iface,
g_param_spec_string ("issuer", "Issuer", "Common name of issuer",
- "", G_PARAM_READABLE));
+ "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrCertificate:expiry:
@@ -321,7 +321,7 @@ gcr_certificate_default_init (GcrCertificateIface *iface)
*/
g_object_interface_install_property (iface,
g_param_spec_boxed ("expiry", "Expiry", "Certificate expiry",
- G_TYPE_DATE, G_PARAM_READABLE));
+ G_TYPE_DATE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_once_init_leave (&initialized, 1);
}
diff --git a/gcr/gcr-gnupg-importer.c b/gcr/gcr-gnupg-importer.c
index 9eaad91..6e7cbdf 100644
--- a/gcr/gcr-gnupg-importer.c
+++ b/gcr/gcr-gnupg-importer.c
@@ -241,12 +241,14 @@ _gcr_gnupg_importer_class_init (GcrGnupgImporterClass *klass)
g_object_class_override_property (gobject_class, PROP_URI, "uri");
g_object_class_install_property (gobject_class, PROP_IMPORTED,
- g_param_spec_boxed ("imported", "Imported", "Fingerprints of imported keys",
- G_TYPE_STRV, G_PARAM_READABLE));
+ g_param_spec_boxed ("imported", "Imported", "Fingerprints of imported keys",
+ G_TYPE_STRV,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_DIRECTORY,
- g_param_spec_string ("directory", "Directory", "Directory to import keys to",
- NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ g_param_spec_string ("directory", "Directory", "Directory to import keys to",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
gck_builder_add_ulong (&builder, CKA_CLASS, CKO_GCR_GNUPG_RECORDS);
gcr_importer_register (GCR_TYPE_GNUPG_IMPORTER, gck_builder_end (&builder));
diff --git a/gcr/gcr-gnupg-key.c b/gcr/gcr-gnupg-key.c
index c6e9e48..bd99fb5 100644
--- a/gcr/gcr-gnupg-key.c
+++ b/gcr/gcr-gnupg-key.c
@@ -175,7 +175,7 @@ _gcr_gnupg_key_class_init (GcrGnupgKeyClass *klass)
*/
g_object_class_install_property (gobject_class, PROP_PUBLIC_RECORDS,
g_param_spec_boxed ("public-records", "Public Records", "Public Key Colon Records",
- G_TYPE_PTR_ARRAY, G_PARAM_READWRITE));
+ G_TYPE_PTR_ARRAY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GcrGnupgKey:secret-records:
@@ -185,7 +185,7 @@ _gcr_gnupg_key_class_init (GcrGnupgKeyClass *klass)
*/
g_object_class_install_property (gobject_class, PROP_SECRET_RECORDS,
g_param_spec_boxed ("secret-records", "Secret Records", "Secret Key Colon Records",
- G_TYPE_PTR_ARRAY, G_PARAM_READWRITE));
+ G_TYPE_PTR_ARRAY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GcrGnupgKey:keyid:
@@ -194,7 +194,7 @@ _gcr_gnupg_key_class_init (GcrGnupgKeyClass *klass)
*/
g_object_class_install_property (gobject_class, PROP_KEYID,
g_param_spec_string ("keyid", "Key ID", "Key identifier",
- "", G_PARAM_READABLE));
+ "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrGnupgKey:label:
@@ -203,7 +203,7 @@ _gcr_gnupg_key_class_init (GcrGnupgKeyClass *klass)
*/
g_object_class_install_property (gobject_class, PROP_LABEL,
g_param_spec_string ("label", "Label", "Key label",
- "", G_PARAM_READABLE));
+ "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrGnupgKey::description:
@@ -212,7 +212,7 @@ _gcr_gnupg_key_class_init (GcrGnupgKeyClass *klass)
*/
g_object_class_install_property (gobject_class, PROP_DESCRIPTION,
g_param_spec_string ("description", "Description", "Description of object type",
- "", G_PARAM_READABLE));
+ "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrGnupgKey:markup:
@@ -221,7 +221,7 @@ _gcr_gnupg_key_class_init (GcrGnupgKeyClass *klass)
*/
g_object_class_install_property (gobject_class, PROP_MARKUP,
g_param_spec_string ("markup", "Markup", "Markup which describes key",
- "", G_PARAM_READABLE));
+ "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrGnupgKey:short-keyid:
@@ -230,7 +230,7 @@ _gcr_gnupg_key_class_init (GcrGnupgKeyClass *klass)
*/
g_object_class_install_property (gobject_class, PROP_SHORT_KEYID,
g_param_spec_string ("short-keyid", "Short Key ID", "Display key identifier",
- "", G_PARAM_READABLE));
+ "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrGnupgKey:icon:
@@ -239,7 +239,7 @@ _gcr_gnupg_key_class_init (GcrGnupgKeyClass *klass)
*/
g_object_class_install_property (gobject_class, PROP_ICON,
g_param_spec_object ("icon", "Icon", "Icon for this key",
- G_TYPE_ICON, G_PARAM_READABLE));
+ G_TYPE_ICON, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
}
/**
diff --git a/gcr/gcr-gnupg-process.c b/gcr/gcr-gnupg-process.c
index b3ff444..7bc65f8 100644
--- a/gcr/gcr-gnupg-process.c
+++ b/gcr/gcr-gnupg-process.c
@@ -231,8 +231,9 @@ _gcr_gnupg_process_class_init (GcrGnupgProcessClass *klass)
* ~/.gnupg/ directory.
*/
g_object_class_install_property (gobject_class, PROP_DIRECTORY,
- g_param_spec_string ("directory", "Directory", "Gnupg Directory",
- NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ g_param_spec_string ("directory", "Directory", "Gnupg Directory",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
/**
* GcrGnupgProcess:executable:
@@ -240,8 +241,9 @@ _gcr_gnupg_process_class_init (GcrGnupgProcessClass *klass)
* Path to the gnupg executable, or %NULL for default.
*/
g_object_class_install_property (gobject_class, PROP_EXECUTABLE,
- g_param_spec_string ("executable", "Executable", "Gnupg Executable",
- GPG_EXECUTABLE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ g_param_spec_string ("executable", "Executable", "Gnupg Executable",
+ GPG_EXECUTABLE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
/**
* GcrGnupgProcess:input-stream:
@@ -249,8 +251,9 @@ _gcr_gnupg_process_class_init (GcrGnupgProcessClass *klass)
* Input for gnupg, or %NULL for no input.
*/
g_object_class_install_property (gobject_class, PROP_INPUT_STREAM,
- g_param_spec_object ("input-stream", "Input Stream", "Input Stream",
- G_TYPE_INPUT_STREAM, G_PARAM_READWRITE));
+ g_param_spec_object ("input-stream", "Input Stream", "Input Stream",
+ G_TYPE_INPUT_STREAM,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GcrGnupgProcess:output-stream:
@@ -258,8 +261,9 @@ _gcr_gnupg_process_class_init (GcrGnupgProcessClass *klass)
* Output from gnupg, or %NULL for ignored output.
*/
g_object_class_install_property (gobject_class, PROP_OUTPUT_STREAM,
- g_param_spec_object ("output-stream", "Output Stream", "Output Stream",
- G_TYPE_OUTPUT_STREAM, G_PARAM_READWRITE));
+ g_param_spec_object ("output-stream", "Output Stream", "Output Stream",
+ G_TYPE_OUTPUT_STREAM,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GcrGnupgProcess:attribute-stream:
@@ -267,8 +271,9 @@ _gcr_gnupg_process_class_init (GcrGnupgProcessClass *klass)
* Output of attribute data from gnupg, or %NULL for ignored attributes.
*/
g_object_class_install_property (gobject_class, PROP_ATTRIBUTE_STREAM,
- g_param_spec_object ("attribute-stream", "Attribute Stream", "Attribute Stream",
- G_TYPE_OUTPUT_STREAM, G_PARAM_READWRITE));
+ g_param_spec_object ("attribute-stream", "Attribute Stream", "Attribute Stream",
+ G_TYPE_OUTPUT_STREAM,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GcrGnupgProcess::error-line:
diff --git a/gcr/gcr-importer.c b/gcr/gcr-importer.c
index ef029e1..3efd749 100644
--- a/gcr/gcr-importer.c
+++ b/gcr/gcr-importer.c
@@ -96,8 +96,9 @@ gcr_importer_default_init (GcrImporterIface *iface)
* The label for the importer.
*/
g_object_interface_install_property (iface,
- g_param_spec_string ("label", "Label", "The label for the importer",
- "", G_PARAM_READABLE));
+ g_param_spec_string ("label", "Label", "The label for the importer",
+ "",
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrImporter:icon:
@@ -105,8 +106,9 @@ gcr_importer_default_init (GcrImporterIface *iface)
* The icon for the importer.
*/
g_object_interface_install_property (iface,
- g_param_spec_object ("icon", "Icon", "The icon for the importer",
- G_TYPE_ICON, G_PARAM_READABLE));
+ g_param_spec_object ("icon", "Icon", "The icon for the importer",
+ G_TYPE_ICON,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrImporter:interaction:
@@ -114,9 +116,10 @@ gcr_importer_default_init (GcrImporterIface *iface)
* The interaction for the importer.
*/
g_object_interface_install_property (iface,
- g_param_spec_object ("interaction", "Interaction",
- "Interaction for prompts",
- G_TYPE_TLS_INTERACTION, G_PARAM_READWRITE));
+ g_param_spec_object ("interaction", "Interaction",
+ "Interaction for prompts",
+ G_TYPE_TLS_INTERACTION,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GcrImporter:uri:
@@ -124,8 +127,9 @@ gcr_importer_default_init (GcrImporterIface *iface)
* The URI of the location imported to.
*/
g_object_interface_install_property (iface,
- g_param_spec_string ("uri", "URI", "URI of location",
- NULL, G_PARAM_READABLE));
+ g_param_spec_string ("uri", "URI", "URI of location",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_once_init_leave (&initialized, 1);
}
diff --git a/gcr/gcr-parser.c b/gcr/gcr-parser.c
index 11c5fbb..fb4b07e 100644
--- a/gcr/gcr-parser.c
+++ b/gcr/gcr-parser.c
@@ -2440,7 +2440,8 @@ gcr_parser_class_init (GcrParserClass *klass)
*/
g_object_class_install_property (gobject_class, PROP_PARSED_ATTRIBUTES,
g_param_spec_boxed ("parsed-attributes", "Parsed Attributes", "Parsed PKCS#11 attributes",
- GCK_TYPE_ATTRIBUTES, G_PARAM_READABLE));
+ GCK_TYPE_ATTRIBUTES,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrParser:parsed-label:
@@ -2450,7 +2451,8 @@ gcr_parser_class_init (GcrParserClass *klass)
*/
g_object_class_install_property (gobject_class, PROP_PARSED_LABEL,
g_param_spec_string ("parsed-label", "Parsed Label", "Parsed item label",
- "", G_PARAM_READABLE));
+ "",
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrParser:parsed-description:
@@ -2460,7 +2462,8 @@ gcr_parser_class_init (GcrParserClass *klass)
*/
g_object_class_install_property (gobject_class, PROP_PARSED_DESCRIPTION,
g_param_spec_string ("parsed-description", "Parsed Description", "Parsed item description",
- "", G_PARAM_READABLE));
+ "",
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrParser::authenticate:
diff --git a/gcr/gcr-pkcs11-certificate.c b/gcr/gcr-pkcs11-certificate.c
index 8016c89..3f20c48 100644
--- a/gcr/gcr-pkcs11-certificate.c
+++ b/gcr/gcr-pkcs11-certificate.c
@@ -287,7 +287,8 @@ gcr_pkcs11_certificate_class_init (GcrPkcs11CertificateClass *klass)
*/
g_object_class_install_property (gobject_class, PROP_ATTRIBUTES,
g_param_spec_boxed ("attributes", "Attributes", "The data displayed in the renderer",
- GCK_TYPE_ATTRIBUTES, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ GCK_TYPE_ATTRIBUTES,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
gcr_certificate_mixin_class_init (gobject_class);
_gcr_initialize_library ();
diff --git a/gcr/gcr-pkcs11-importer.c b/gcr/gcr-pkcs11-importer.c
index b86c645..ab497aa 100644
--- a/gcr/gcr-pkcs11-importer.c
+++ b/gcr/gcr-pkcs11-importer.c
@@ -714,16 +714,18 @@ _gcr_pkcs11_importer_class_init (GcrPkcs11ImporterClass *klass)
g_object_class_override_property (gobject_class, PROP_URI, "uri");
g_object_class_install_property (gobject_class, PROP_SLOT,
- g_param_spec_object ("slot", "Slot", "PKCS#11 slot to import data into",
- GCK_TYPE_SLOT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ g_param_spec_object ("slot", "Slot", "PKCS#11 slot to import data into",
+ GCK_TYPE_SLOT,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_IMPORTED,
- g_param_spec_boxed ("imported", "Imported", "Imported objects",
- GCK_TYPE_LIST, G_PARAM_READABLE));
+ g_param_spec_boxed ("imported", "Imported", "Imported objects",
+ GCK_TYPE_LIST,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_QUEUED,
- g_param_spec_pointer ("queued", "Queued", "Queued attributes",
- G_PARAM_READABLE));
+ g_param_spec_pointer ("queued", "Queued", "Queued attributes",
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
gck_builder_add_ulong (&builder, CKA_CLASS, CKO_CERTIFICATE);
gck_builder_add_ulong (&builder, CKA_CERTIFICATE_TYPE, CKC_X_509);
diff --git a/gcr/gcr-secret-exchange.c b/gcr/gcr-secret-exchange.c
index 02380ca..0269091 100644
--- a/gcr/gcr-secret-exchange.c
+++ b/gcr/gcr-secret-exchange.c
@@ -870,5 +870,5 @@ gcr_secret_exchange_class_init (GcrSecretExchangeClass *klass)
g_object_class_install_property (gobject_class, PROP_PROTOCOL,
g_param_spec_string ("protocol", "Protocol", "Exchange protocol",
GCR_SECRET_EXCHANGE_PROTOCOL_1,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
}
diff --git a/gcr/gcr-ssh-askpass.c b/gcr/gcr-ssh-askpass.c
index 3261916..b79b4c2 100644
--- a/gcr/gcr-ssh-askpass.c
+++ b/gcr/gcr-ssh-askpass.c
@@ -442,7 +442,7 @@ gcr_ssh_askpass_class_init (GcrSshAskpassClass *klass)
g_object_class_install_property (gobject_class, PROP_INTERACTION,
g_param_spec_object ("interaction", "Interaction", "Interaction",
G_TYPE_TLS_INTERACTION,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
}
#ifdef GCR_SSH_ASKPASS_TOOL
diff --git a/gcr/gcr-system-prompt.c b/gcr/gcr-system-prompt.c
index 08a4a4a..9735d4b 100644
--- a/gcr/gcr-system-prompt.c
+++ b/gcr/gcr-system-prompt.c
@@ -561,8 +561,9 @@ gcr_system_prompt_class_init (GcrSystemPromptClass *klass)
* for the default prompter.
*/
g_object_class_install_property (gobject_class, PROP_BUS_NAME,
- g_param_spec_string ("bus-name", "Bus name", "Prompter bus name",
- NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ g_param_spec_string ("bus-name", "Bus name", "Prompter bus name",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
/**
* GcrSystemPrompt:timeout-seconds:
@@ -570,8 +571,9 @@ gcr_system_prompt_class_init (GcrSystemPromptClass *klass)
* The timeout in seconds to wait when opening the prompt.
*/
g_object_class_install_property (gobject_class, PROP_TIMEOUT_SECONDS,
- g_param_spec_int ("timeout-seconds", "Timeout seconds", "Timeout (in seconds) for
opening prompt",
- -1, G_MAXINT, -1, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+ g_param_spec_int ("timeout-seconds", "Timeout seconds", "Timeout (in seconds) for opening
prompt",
+ -1, G_MAXINT, -1,
+ G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
/**
* GcrSystemPrompt:secret-exchange:
@@ -580,8 +582,9 @@ gcr_system_prompt_class_init (GcrSystemPromptClass *klass)
* secret exchange will be used if this is not set.
*/
g_object_class_install_property (gobject_class, PROP_SECRET_EXCHANGE,
- g_param_spec_object ("secret-exchange", "Secret exchange", "Secret exchange for passing
passwords",
- GCR_TYPE_SECRET_EXCHANGE, G_PARAM_READWRITE));
+ g_param_spec_object ("secret-exchange", "Secret exchange", "Secret exchange for passing
passwords",
+ GCR_TYPE_SECRET_EXCHANGE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_override_property (gobject_class, PROP_TITLE, "title");
g_object_class_override_property (gobject_class, PROP_MESSAGE, "message");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]