source-dialog: cast to GtkWidget* before increasing refcount

So that we check for the right type.
This commit is contained in:
Georges Basile Stavracas Neto
2017-12-11 23:22:42 -02:00
parent 23a9de1108
commit 8670c6fd8e
+3 -2
View File
@@ -589,6 +589,7 @@ static GtkWidget*
make_row_from_source (GcalSourceDialog *dialog, make_row_from_source (GcalSourceDialog *dialog,
ESource *source) ESource *source)
{ {
ESourceSelectable *extension;
cairo_surface_t *surface; cairo_surface_t *surface;
GtkBuilder *builder; GtkBuilder *builder;
GtkWidget *bottom_label; GtkWidget *bottom_label;
@@ -598,8 +599,8 @@ make_row_from_source (GcalSourceDialog *dialog,
GdkRGBA color; GdkRGBA color;
gchar *parent_name; gchar *parent_name;
ESourceSelectable *extension;
get_source_parent_name_color (dialog->manager, source, &parent_name, NULL); get_source_parent_name_color (dialog->manager, source, &parent_name, NULL);
builder = gtk_builder_new_from_resource ("/org/gnome/calendar/calendar-row.ui"); 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 * the row to the listbox, it should be referenced here so
* it isn't destroyed with the GtkBuilder. * 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 */ /* source color icon */
get_color_name_from_source (source, &color); get_color_name_from_source (source, &color);