Skip to content

Commit fa289ba

Browse files
committed
Show OK and error icons
1 parent 689ac1c commit fa289ba

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

appimageupdategui/progress.vala

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ public class ProgressWindow : Window {
1616
private Label action_label;
1717
private Label message_label;
1818

19+
private Image icon_image;
20+
1921
private Button btn_cancel;
2022
private Button btn_show_files;
2123
private Button btn_quit;
@@ -51,6 +53,8 @@ public class ProgressWindow : Window {
5153
var vbox = builder.get_object("main_box") as Box;
5254
add(vbox);
5355

56+
icon_image = builder.get_object("icon_image") as Image;
57+
5458
btn_cancel = builder.get_object("btn_cancel") as Button;
5559
btn_cancel.clicked.connect(cancel);
5660

@@ -137,7 +141,12 @@ public class ProgressWindow : Window {
137141
action_label.label = line.substring(0, line.length - 1);
138142
counter++;
139143
progress.set_fraction( 1.0f * counter / file_counts);
140-
144+
if(line.contains("checksum matches OK")) {
145+
icon_image.icon_name="emblem-ok-symbolic";
146+
}
147+
if(line.contains("Cannot")) {
148+
icon_image.icon_name="dialog-error-symbolic";
149+
}
141150
} catch (IOChannelError e) {
142151
stdout.printf ("%s: IOChannelError: %s\n", stream_name, e.message);
143152
return false;

0 commit comments

Comments
 (0)