Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
torikulhabib committed Feb 4, 2022
1 parent 605e9a7 commit f45ca5d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ This application prioritizes convenience, full of features and an attractive app
<p align="center">
<img src="Screenshot7.png" alt="Home">
</p>

<h1 align="center">🏡 Dbusmenu progress 🙈</h1>
<p align="center">
<img src="Screenshot8.png" alt="Home">
</p>
<h1 align="center">🧚 About Gabutdm 🧞</h1>
<p align="center">
Made for peoples all needed download manager
Expand Down
Binary file added Screenshot8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion src/DownloadRow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,14 @@ namespace Gabut {
grid.attach (start_button, 6, 0, 1, 4);
add (grid);
show_all ();
idle_progress ();
add_timeout ();
}

public void idle_progress () {
Idle.add (()=> { update_progress (); return false; });
}

private void action_dowload () {
status = status_aria (aria_tell_status (ariagid, TellStatus.STATUS));
if (status == StatusMode.ACTIVE) {
Expand Down Expand Up @@ -516,7 +521,7 @@ namespace Gabut {
stoptimer = false;
}

public bool update_progress () {
private bool update_progress () {
totalsize = int64.parse (aria_tell_status (ariagid, TellStatus.TOTALLENGTH));
transferred = int64.parse (aria_tell_status (ariagid, TellStatus.COMPELETEDLENGTH));
transferrate = int.parse (aria_tell_status (ariagid, TellStatus.DOWNLOADSPEED));
Expand Down
3 changes: 2 additions & 1 deletion src/Downloader.vala
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ namespace Gabut {
}
});
add_timeout ();
Idle.add (()=> { update_progress (); return false; });
}

private Gtk.TreeViewColumn text_column (string title, int column) {
Expand Down Expand Up @@ -606,7 +607,7 @@ namespace Gabut {
public void add_timeout () {
if (timeout_id == 0) {
stoptimer = true;
timeout_id = Timeout.add_seconds (1, update_progress);
timeout_id = Timeout.add (500, update_progress);
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/GabutWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -352,15 +352,15 @@ namespace Gabut {
foreach (var row in list_box.get_children ()) {
if (((DownloadRow) row).status == StatusMode.WAIT) {
aria_unpause (((DownloadRow) row).ariagid);
((DownloadRow) row).update_progress ();
((DownloadRow) row).idle_progress ();
}
}
}

public void fast_respond (string ariagid) {
foreach (var row in list_box.get_children ()) {
if (((DownloadRow) row).ariagid == ariagid) {
((DownloadRow) row).update_progress ();
((DownloadRow) row).idle_progress ();
}
}
}
Expand Down Expand Up @@ -495,7 +495,7 @@ namespace Gabut {
foreach (var row in list_box.get_children ()) {
if (((DownloadRow) row).status != StatusMode.COMPLETE && ((DownloadRow) row).status != StatusMode.ERROR) {
aria_unpause (((DownloadRow) row).ariagid);
((DownloadRow) row).update_progress ();
((DownloadRow) row).idle_progress ();
}
}
view_status ();
Expand All @@ -506,7 +506,7 @@ namespace Gabut {
foreach (var row in list_box.get_children ()) {
if (((DownloadRow) row).status != StatusMode.COMPLETE && ((DownloadRow) row).status != StatusMode.ERROR) {
aria_pause (((DownloadRow) row).ariagid);
((DownloadRow) row).update_progress ();
((DownloadRow) row).idle_progress ();
}
}
view_status ();
Expand Down

0 comments on commit f45ca5d

Please sign in to comment.