Skip to content

Commit 944abd6

Browse files
committed
Exit on cancel
1 parent 6172b8b commit 944abd6

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

appimageupdategui/main.vala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ static void on_open_clicked() {
2828
if (file_chooser.run () == ResponseType.ACCEPT) {
2929
open_file(file_chooser.get_filename ());
3030
}
31-
file_chooser.destroy ();
31+
32+
print("FOOOOOOOOO");
33+
window_main.destroy();
34+
file_chooser.destroy();
35+
Posix.exit(0);
3236
}
3337

3438
/* Handle about click event */

appimageupdategui/progress.vala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ public class ProgressWindow : Window {
155155
counter++;
156156
progress.set_fraction( 1.0f * counter / total_steps);
157157
if(progress.get_fraction() == 1) spinner.stop();
158-
if(line.contains("Target 100.0% complete")) {
159-
result_file_name=line.replace("Read ","").replace(". Target 100.0% complete.","");
160-
result_file_name=result_file_name.substring(0, result_file_name.length - 1).strip();
161-
result_file_name=Path.build_path (Path.DIR_SEPARATOR_S, Path.get_dirname(this.file_name), Path.get_basename(result_file_name));
158+
if(line.index_of ("Target ") == 0) {
159+
result_file_name=line.replace("Target ","");
160+
result_file_name=result_file_name.strip();
161+
result_file_name=Path.build_path (Path.DIR_SEPARATOR_S, Path.get_dirname(this.file_name), result_file_name);
162162
}
163163
if(line.contains("checksum matches OK")) {
164164
revealer1.set_reveal_child (false);

0 commit comments

Comments
 (0)