[gnome-calendar/wip/fix-gobject-property-types] Misc: Fix GObject property types for GLabel::xalign/yalign properties
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/wip/fix-gobject-property-types] Misc: Fix GObject property types for GLabel::xalign/yalign properties
- Date: Thu, 6 Oct 2022 11:39:44 +0000 (UTC)
commit 11a34a1d287f6a77b6c82ec83ef6088b62ea235c
Author: Milan Crha <mcrha redhat com>
Date: Thu Oct 6 13:36:10 2022 +0200
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.
src/gui/importer/gcal-import-file-row.c | 6 +++---
src/gui/views/gcal-agenda-view.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gui/importer/gcal-import-file-row.c b/src/gui/importer/gcal-import-file-row.c
index cc7cf5af..7905b61f 100644
--- a/src/gui/importer/gcal-import-file-row.c
+++ b/src/gui/importer/gcal-import-file-row.c
@@ -83,8 +83,8 @@ add_grid_row (GcalImportFileRow *self,
title_label = g_object_new (GTK_TYPE_LABEL,
"visible", TRUE,
"label", title,
- "xalign", 1.0,
- "yalign", 0.0,
+ "xalign", 1.0f,
+ "yalign", 0.0f,
"ellipsize", PANGO_ELLIPSIZE_END,
"max-width-chars", 40,
NULL);
@@ -96,7 +96,7 @@ add_grid_row (GcalImportFileRow *self,
value_label = g_object_new (GTK_TYPE_LABEL,
"visible", TRUE,
"label", value,
- "xalign", 0.0,
+ "xalign", 0.0f,
"selectable", TRUE,
"ellipsize", PANGO_ELLIPSIZE_END,
"max-width-chars", 40,
diff --git a/src/gui/views/gcal-agenda-view.c b/src/gui/views/gcal-agenda-view.c
index e11b6091..b8f3d440 100644
--- a/src/gui/views/gcal-agenda-view.c
+++ b/src/gui/views/gcal-agenda-view.c
@@ -387,7 +387,7 @@ update_header (GtkListBoxRow *row,
header = g_object_new (GTK_TYPE_LABEL,
"label", label,
- "xalign", 0,
+ "xalign", 0.0f,
NULL);
gtk_widget_add_css_class (header, "caption-heading");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]