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



commit 22edce22faf4e21fd18dca6f904dc1e347a47a7f
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]