[gnome-calendar] source-dialog: cast to GtkWidget* before increasing refcount
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] source-dialog: cast to GtkWidget* before increasing refcount
- Date: Tue, 12 Dec 2017 01:23:30 +0000 (UTC)
commit 8670c6fd8ef733cef547e9ce5853cdaa0a29caa4
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Dec 11 23:22:42 2017 -0200
source-dialog: cast to GtkWidget* before increasing refcount
So that we check for the right type.
src/gcal-source-dialog.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index c55fca4a..afe8a799 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -589,6 +589,7 @@ static GtkWidget*
make_row_from_source (GcalSourceDialog *dialog,
ESource *source)
{
+ ESourceSelectable *extension;
cairo_surface_t *surface;
GtkBuilder *builder;
GtkWidget *bottom_label;
@@ -598,8 +599,8 @@ make_row_from_source (GcalSourceDialog *dialog,
GdkRGBA color;
gchar *parent_name;
- ESourceSelectable *extension;
get_source_parent_name_color (dialog->manager, source, &parent_name, NULL);
+
builder = gtk_builder_new_from_resource ("/org/gnome/calendar/calendar-row.ui");
/*
@@ -607,7 +608,7 @@ make_row_from_source (GcalSourceDialog *dialog,
* the row to the listbox, it should be referenced here so
* it isn't destroyed with the GtkBuilder.
*/
- row = g_object_ref (gtk_builder_get_object (builder, "row"));
+ row = g_object_ref (GTK_WIDGET (gtk_builder_get_object (builder, "row")));
/* source color icon */
get_color_name_from_source (source, &color);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]