[gnome-control-center/gnome-3-20] editable-entry: use floats to avoid warning



commit 80560ef73c0e76c6ce330bcef025b57730db298e
Author: Cosimo Cecchi <cosimo endlessm com>
Date:   Mon Mar 28 20:47:19 2016 -0700

    editable-entry: use floats to avoid warning
    
    Or the code in g_object_set_valist() may treat the zero as a NULL, and
    trigger a warning.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=764296

 shell/cc-editable-entry.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/shell/cc-editable-entry.c b/shell/cc-editable-entry.c
index cd40ac2..8c81fc1 100644
--- a/shell/cc-editable-entry.c
+++ b/shell/cc-editable-entry.c
@@ -605,14 +605,14 @@ cc_editable_entry_init (CcEditableEntry *e)
 
         /* Label */
         priv->label = (GtkLabel*)gtk_label_new (EMPTY_TEXT);
-        g_object_set (G_OBJECT (priv->label), "xalign", 0, NULL);
+        g_object_set (G_OBJECT (priv->label), "xalign", 0.0, NULL);
         gtk_stack_add_named (priv->stack, GTK_WIDGET (priv->label), PAGE_LABEL);
 
         /* Button */
         priv->button = (GtkButton*)gtk_button_new_with_label (EMPTY_TEXT);
         gtk_widget_set_receives_default ((GtkWidget*)priv->button, TRUE);
         gtk_button_set_relief (priv->button, GTK_RELIEF_NONE);
-        g_object_set (G_OBJECT (gtk_bin_get_child (GTK_BIN (priv->button))), "xalign", 0, NULL);
+        g_object_set (G_OBJECT (gtk_bin_get_child (GTK_BIN (priv->button))), "xalign", 0.0, NULL);
 
         gtk_stack_add_named (priv->stack, GTK_WIDGET (priv->button), PAGE_BUTTON);
         g_signal_connect (priv->button, "clicked", G_CALLBACK (button_clicked), e);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]