-Fix update max transferences during running.
This commit is contained in:
tonikelope 2016-10-06 14:33:52 +02:00
parent 94e6f3e60f
commit fe7364e3e7
2 changed files with 11 additions and 2 deletions

View File

@ -623,6 +623,10 @@ public final class MainPanelView extends javax.swing.JFrame {
swingReflectionInvoke("setForeground", global_speed_up_label, _main_panel.isLimit_upload_speed()?new Color(255,0,0):new Color(0,128,255)); swingReflectionInvoke("setForeground", global_speed_up_label, _main_panel.isLimit_upload_speed()?new Color(255,0,0):new Color(0,128,255));
_main_panel.getDownload_manager().setMax_running_trans(_main_panel.getMax_dl());
_main_panel.getUpload_manager().setMax_running_trans(_main_panel.getMax_ul());
_main_panel.getDownload_manager().secureNotify(); _main_panel.getDownload_manager().secureNotify();
_main_panel.getUpload_manager().secureNotify(); _main_panel.getUpload_manager().secureNotify();

View File

@ -27,7 +27,7 @@ abstract public class TransferenceManager implements Runnable, SecureNotifiable
private final javax.swing.JButton _close_all_button; private final javax.swing.JButton _close_all_button;
private final javax.swing.JButton _pause_all_button; private final javax.swing.JButton _pause_all_button;
private final javax.swing.MenuElement _clean_all_menu; private final javax.swing.MenuElement _clean_all_menu;
private final int _max_running_trans; private int _max_running_trans;
private final MainPanel _main_panel; private final MainPanel _main_panel;
private final Object _secure_notify_lock; private final Object _secure_notify_lock;
private boolean _notified; private boolean _notified;
@ -98,7 +98,12 @@ abstract public class TransferenceManager implements Runnable, SecureNotifiable
public synchronized void addPre_count(int pre_count) { public synchronized void addPre_count(int pre_count) {
_pre_count+=pre_count; _pre_count+=pre_count;
} }
public void setMax_running_trans(int _max_running_trans) {
this._max_running_trans = _max_running_trans;
}
@Override @Override
public void secureNotify() public void secureNotify()