Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
Show status when loading iTunes Top 100
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanouta committed Apr 4, 2020
1 parent 04370cc commit e4490cd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Widgets/DirectoryView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ namespace Vocal {
private Gtk.Button first_run_continue_button;

private Gtk.Box loading_box;
private Gtk.Label itunes_title;
private Gtk.Label loading_label;

private Gtk.ScrolledWindow scrolled_window;

Expand All @@ -48,7 +50,7 @@ namespace Vocal {
banner_box.get_style_context ().add_class ("toolbar");
banner_box.get_style_context ().add_class ("library-toolbar");

var itunes_title = new Gtk.Label (_ ("iTunes Top 100 Podcasts"));
itunes_title = new Gtk.Label (_ ("iTunes Top 100 Podcasts"));
itunes_title.margin_top = 15;
itunes_title.margin_bottom = 5;
itunes_title.justify = Gtk.Justification.CENTER;
Expand Down Expand Up @@ -101,7 +103,7 @@ namespace Vocal {
loading_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 5);
var spinner = new Gtk.Spinner ();
spinner.active = true;
var loading_label = new Gtk.Label (_ ("Loading iTunes Store"));
loading_label = new Gtk.Label (_ ("Loading iTunes Store (0 / 100)"));
loading_label.get_style_context ().add_class ("h2");
loading_box.add (loading_label);
loading_box.add (spinner);
Expand Down Expand Up @@ -131,6 +133,8 @@ namespace Vocal {
int i = 1;
if (entries == null) {
info ("iterating over entries");
itunes_title.set_text ("Error when loading iTunes Top 100 Podcasts");
loading_box.set_no_show_all (true);
return null;
}

Expand All @@ -148,6 +152,7 @@ namespace Vocal {
on_new_subscription (url);
});
flowbox.add (directory_art);
loading_label.set_text ("Loading iTunes Store (%d / 100)".printf (i));
i++;
}

Expand Down

0 comments on commit e4490cd

Please sign in to comment.