static void
progress_ui_handler_add_to_window (NemoProgressUIHandler *self,
				   NemoProgressInfo *info)
{
	GtkWidget *progress;

	progress = nemo_progress_info_widget_new (info);
    NemoProgressInfoWidgetPriv *priv = NEMO_PROGRESS_INFO_WIDGET (progress)->priv;

	progress_ui_handler_ensure_window (self);

    if (!gtk_widget_get_visible (self->priv->progress_window))
        gtk_window_present (GTK_WINDOW (self->priv->progress_window));

    gboolean started = nemo_progress_info_get_is_started (info);

    gtk_stack_set_visible_child_name (GTK_STACK (priv->stack), started ? "running" : "pending");

    gtk_box_pack_start (GTK_BOX (self->priv->list), progress, FALSE, FALSE, 0);
    gtk_widget_show (progress);

    if (self->priv->active_infos == 1)
        gtk_widget_hide (priv->separator);

    nemo_progress_info_widget_reveal (NEMO_PROGRESS_INFO_WIDGET (progress));

    InfoChangedData *payload = g_slice_new0 (InfoChangedData);
    payload->handler = self;
    payload->widget = NEMO_PROGRESS_INFO_WIDGET (progress);

    g_signal_connect (info, "started", G_CALLBACK (on_info_started), payload);
    g_signal_connect (info, "finished", G_CALLBACK (on_info_finished), payload);

    ensure_first_separator_hidden (self);
}
static void
progress_ui_handler_add_to_window (NemoProgressUIHandler *self,
				   NemoProgressInfo *info)
{
	GtkWidget *progress;

	progress = nemo_progress_info_widget_new (info);
	progress_ui_handler_ensure_window (self);

	gtk_box_pack_start (GTK_BOX (self->priv->window_vbox),
			    progress,
			    FALSE, FALSE, 6);

	gtk_widget_show (progress);
}