diff --git a/README.md b/README.md index 295b59a..a65cfc7 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,10 @@ This application prioritizes convenience, full of features and an attractive app

Home

- +

🏡 Dbusmenu progress 🙈

+

+ Home +

🧚 About Gabutdm 🧞

Made for peoples all needed download manager diff --git a/Screenshot8.png b/Screenshot8.png new file mode 100644 index 0000000..f4ae63b Binary files /dev/null and b/Screenshot8.png differ diff --git a/src/DownloadRow.vala b/src/DownloadRow.vala index 85dacdf..5b70c27 100644 --- a/src/DownloadRow.vala +++ b/src/DownloadRow.vala @@ -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) { @@ -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)); diff --git a/src/Downloader.vala b/src/Downloader.vala index 74c2387..40f55c9 100644 --- a/src/Downloader.vala +++ b/src/Downloader.vala @@ -490,6 +490,7 @@ namespace Gabut { } }); add_timeout (); + Idle.add (()=> { update_progress (); return false; }); } private Gtk.TreeViewColumn text_column (string title, int column) { @@ -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); } } diff --git a/src/GabutWindow.vala b/src/GabutWindow.vala index b263cc7..356a3b2 100644 --- a/src/GabutWindow.vala +++ b/src/GabutWindow.vala @@ -352,7 +352,7 @@ 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 (); } } } @@ -360,7 +360,7 @@ namespace Gabut { 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 (); } } } @@ -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 (); @@ -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 ();