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

Commit e4490cd

Browse files
committed
Show status when loading iTunes Top 100
1 parent 04370cc commit e4490cd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Widgets/DirectoryView.vala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ namespace Vocal {
3333
private Gtk.Button first_run_continue_button;
3434

3535
private Gtk.Box loading_box;
36+
private Gtk.Label itunes_title;
37+
private Gtk.Label loading_label;
3638

3739
private Gtk.ScrolledWindow scrolled_window;
3840

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

51-
var itunes_title = new Gtk.Label (_ ("iTunes Top 100 Podcasts"));
53+
itunes_title = new Gtk.Label (_ ("iTunes Top 100 Podcasts"));
5254
itunes_title.margin_top = 15;
5355
itunes_title.margin_bottom = 5;
5456
itunes_title.justify = Gtk.Justification.CENTER;
@@ -101,7 +103,7 @@ namespace Vocal {
101103
loading_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 5);
102104
var spinner = new Gtk.Spinner ();
103105
spinner.active = true;
104-
var loading_label = new Gtk.Label (_ ("Loading iTunes Store"));
106+
loading_label = new Gtk.Label (_ ("Loading iTunes Store (0 / 100)"));
105107
loading_label.get_style_context ().add_class ("h2");
106108
loading_box.add (loading_label);
107109
loading_box.add (spinner);
@@ -131,6 +133,8 @@ namespace Vocal {
131133
int i = 1;
132134
if (entries == null) {
133135
info ("iterating over entries");
136+
itunes_title.set_text ("Error when loading iTunes Top 100 Podcasts");
137+
loading_box.set_no_show_all (true);
134138
return null;
135139
}
136140

@@ -148,6 +152,7 @@ namespace Vocal {
148152
on_new_subscription (url);
149153
});
150154
flowbox.add (directory_art);
155+
loading_label.set_text ("Loading iTunes Store (%d / 100)".printf (i));
151156
i++;
152157
}
153158

0 commit comments

Comments
 (0)