[gcr/wip/nielsdg/lose-x11-dependency: 3/3] prompt: Use G_PARAM_STATIC_STRINGS



commit b8716a2f80098b1c9ded3ff8a96b61a0fe8fe725
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 88a3f96..9b5a53a 100644
--- a/ui/gcr-prompt-dialog.c
+++ b/ui/gcr-prompt-dialog.c
@@ -800,7 +800,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:
@@ -809,7 +810,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:
@@ -818,7 +820,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:
@@ -827,7 +830,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]