Commit 369436db authored by Christian Hergert's avatar Christian Hergert
Browse files

buildui: bind pipeline GListModel to stages list box

Now that pipeline is a GListModel, we can simplify our list of connected
build stages. This also ensures that things are updated after the pipeline
is initialized. Otherwise, we would show an empty list in the case that
the pipeline was not immediately setup fully. Such can happen when
installing dependent runtimes.
parent e5049663
......@@ -192,9 +192,9 @@ ide_build_panel_started (IdeBuildPanel *self,
static void
ide_build_panel_connect_stage_cb (gpointer data,
gpointer user_data)
static GtkWidget *
ide_build_panel_create_stage_row_cb (gpointer data,
gpointer user_data)
IdeBuildStage *stage = data;
IdeBuildPanel *self = user_data;
......@@ -202,8 +202,7 @@ ide_build_panel_connect_stage_cb (gpointer data,
g_assert (IDE_IS_BUILD_STAGE (stage));
g_assert (IDE_IS_BUILD_PANEL (self));
gtk_container_add (GTK_CONTAINER (self->stages_list_box),
ide_build_stage_row_new (stage));
return ide_build_stage_row_new (stage);
static void
......@@ -227,10 +226,11 @@ ide_build_panel_bind_pipeline (IdeBuildPanel *self,
gtk_label_set_label (self->time_completed_label, "—");
gtk_label_set_label (self->build_status_label, "—");
gtk_list_box_bind_model (self->stages_list_box,
G_LIST_MODEL (pipeline),
self, NULL);
ide_build_pipeline_foreach_stage (pipeline,
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_PIPELINE]);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment