Skip to content

Commit

Permalink
Reboot
Browse files Browse the repository at this point in the history
  • Loading branch information
torikulhabib committed Feb 14, 2022
1 parent 0d0aadf commit fed19d6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/DownloadRow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ namespace Gabut {
add (grid);
}

private void if_not_exist (string ariag, int linkm, int stats) {
public void if_not_exist (string ariag, int linkm, int stats) {
if (stats == StatusMode.COMPLETE || stats == StatusMode.ERROR) {
return;
}
Expand Down
7 changes: 6 additions & 1 deletion src/GabutWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,15 @@ namespace Gabut {
preferences.restart_server.connect (()=> {
restart_server ();
});
preferences.show_all ();
preferences.restart_process.connect (()=> {
foreach (var row in list_box.get_children ()) {
((DownloadRow) row).if_not_exist (((DownloadRow) row).ariagid, ((DownloadRow) row).linkmode, ((DownloadRow) row).status);
}
});
preferences.max_active.connect (()=> {
next_download ();
});
preferences.show_all ();
preferences.destroy.connect (()=> {
preferences = null;
});
Expand Down
2 changes: 1 addition & 1 deletion src/ModeTogle.vala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) {2019} torikulhabib (https://github.com/torikulhabib)
* Copyright (c) {2021} torikulhabib (https://github.com/gabutakut)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
Expand Down
2 changes: 2 additions & 0 deletions src/Preferences.vala
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
namespace Gabut {
public class Preferences : Gtk.Dialog {
public signal void restart_server ();
public signal void restart_process ();
public signal void max_active ();
private Gtk.MenuButton allocate_button;
private Gtk.MenuButton piecesel_button;
Expand Down Expand Up @@ -698,6 +699,7 @@ namespace Gabut {
do {
} while (aria_getverion ());
exec_aria ();
restart_process ();
destroy ();
} else if (local_port.value.to_string () != get_dbsetting (DBSettings.PORTLOCAL)) {
set_dbsetting (DBSettings.PORTLOCAL, local_port.value.to_string ());
Expand Down

0 comments on commit fed19d6

Please sign in to comment.