[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 08:07:31 +0000 (UTC)
commit 13da621aa8517f0020faeb3a5a544c55edfcfb29
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 9646069..b1fa6de 100644
--- a/ui/gcr-prompt-dialog.c
+++ b/ui/gcr-prompt-dialog.c
@@ -828,7 +828,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:
@@ -837,7 +838,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:
@@ -846,7 +848,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:
@@ -855,7 +858,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]