Misc: Fix GObject property types for GLabel::xalign/yalign properties

When running under valgrind, it claims that there's used uninitialized
memory, which is set as GObject property in the code. It's for
GtkLabel::xalign. The problem was that the value in the code is
an integer, but the property itself expects float type. This fixes
the place and where a floating point is already used it annotates
the value to be float, not a double.
This commit is contained in:
Milan Crha
2022-10-06 13:36:10 +02:00
parent 8138619419
commit 11a34a1d28
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -83,8 +83,8 @@ add_grid_row (GcalImportFileRow *self,
title_label = g_object_new (GTK_TYPE_LABEL, title_label = g_object_new (GTK_TYPE_LABEL,
"visible", TRUE, "visible", TRUE,
"label", title, "label", title,
"xalign", 1.0, "xalign", 1.0f,
"yalign", 0.0, "yalign", 0.0f,
"ellipsize", PANGO_ELLIPSIZE_END, "ellipsize", PANGO_ELLIPSIZE_END,
"max-width-chars", 40, "max-width-chars", 40,
NULL); NULL);
@@ -96,7 +96,7 @@ add_grid_row (GcalImportFileRow *self,
value_label = g_object_new (GTK_TYPE_LABEL, value_label = g_object_new (GTK_TYPE_LABEL,
"visible", TRUE, "visible", TRUE,
"label", value, "label", value,
"xalign", 0.0, "xalign", 0.0f,
"selectable", TRUE, "selectable", TRUE,
"ellipsize", PANGO_ELLIPSIZE_END, "ellipsize", PANGO_ELLIPSIZE_END,
"max-width-chars", 40, "max-width-chars", 40,
+1 -1
View File
@@ -387,7 +387,7 @@ update_header (GtkListBoxRow *row,
header = g_object_new (GTK_TYPE_LABEL, header = g_object_new (GTK_TYPE_LABEL,
"label", label, "label", label,
"xalign", 0, "xalign", 0.0f,
NULL); NULL);
gtk_widget_add_css_class (header, "caption-heading"); gtk_widget_add_css_class (header, "caption-heading");