Also show the text of the progress bar with Gtk+ 3

This commit is contained in:
Pierre Pronchery 2018-01-25 19:49:40 +01:00
parent 4388237e85
commit 1fa73c85a8

View File

@ -576,6 +576,9 @@ static void _out_rate(Progress * p)
if(gtk_progress_bar_get_fraction(bar) == fraction)
return;
gtk_progress_bar_set_fraction(bar, fraction);
#if GTK_CHECK_VERSION(3, 0, 0)
gtk_progress_bar_set_show_text(GTK_PROGRESS_BAR(p->progress), TRUE);
#endif
snprintf(buf, sizeof(buf), "%.1f%%", fraction * 100);
gtk_progress_bar_set_text(bar, buf);
}