[gcr/wip/nielsdg/lose-x11-dependency: 2/2] prompt: Use G_PARAM_STATIC_STRINGS
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcr/wip/nielsdg/lose-x11-dependency: 2/2] prompt: Use G_PARAM_STATIC_STRINGS
- Date: Tue, 3 Dec 2019 18:05:52 +0000 (UTC)
commit 6ac572c1183aec226f7281777e2bbba1630b26ad
Author: Niels De Graef <nielsdegraef gmail com>
Date: Tue Dec 3 08:59:40 2019 +0100
prompt: Use G_PARAM_STATIC_STRINGS
Small cleanup which prevents some unnecessary string copies.
ui/gcr-prompt-dialog.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/ui/gcr-prompt-dialog.c b/ui/gcr-prompt-dialog.c
index 147a05b..c5066a9 100644
--- a/ui/gcr-prompt-dialog.c
+++ b/ui/gcr-prompt-dialog.c
@@ -838,7 +838,8 @@ gcr_prompt_dialog_class_init (GcrPromptDialogClass *klass)
*/
g_object_class_install_property (gobject_class, PROP_PASSWORD_VISIBLE,
g_param_spec_boolean ("password-visible", "Password visible", "Password field is visible",
- FALSE, G_PARAM_READABLE));
+ FALSE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrPromptDialog:confirm-visible:
@@ -847,7 +848,8 @@ gcr_prompt_dialog_class_init (GcrPromptDialogClass *klass)
*/
g_object_class_install_property (gobject_class, PROP_CONFIRM_VISIBLE,
g_param_spec_boolean ("confirm-visible", "Confirm visible", "Confirm field is visible",
- FALSE, G_PARAM_READABLE));
+ FALSE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrPromptDialog:warning-visible:
@@ -856,7 +858,8 @@ gcr_prompt_dialog_class_init (GcrPromptDialogClass *klass)
*/
g_object_class_install_property (gobject_class, PROP_WARNING_VISIBLE,
g_param_spec_boolean ("warning-visible", "Warning visible", "Warning is visible",
- FALSE, G_PARAM_READABLE));
+ FALSE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
* GcrPromptDialog:choice-visible:
@@ -865,7 +868,8 @@ gcr_prompt_dialog_class_init (GcrPromptDialogClass *klass)
*/
g_object_class_install_property (gobject_class, PROP_CHOICE_VISIBLE,
g_param_spec_boolean ("choice-visible", "Choice visible", "Choice is visible",
- FALSE, G_PARAM_READABLE));
+ FALSE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]