This commit is contained in:
tonikelope 2017-12-06 21:42:28 +01:00
parent c2b250edd4
commit 51f54711f7
9 changed files with 17 additions and 12 deletions

View File

@ -48,7 +48,6 @@ public final class Download implements Transference, Runnable, SecureSingleThrea
public static final int WORKERS_DEFAULT = 6;
public static final boolean USE_MEGA_ACCOUNT_DOWN = false;
public static final int CHUNK_SIZE_MULTI = 10;
public static final int WATCHDOG_SMART_PROXY_TIMEOUT = 3600;
private final MainPanel _main_panel;
private volatile DownloadView _view;

View File

@ -66,7 +66,7 @@
<Component id="restore_button" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="file_tree_scrollpane" pref="383" max="32767" attributes="0"/>
<Component id="file_tree_scrollpane" pref="381" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="total_space_label" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
@ -186,6 +186,9 @@
</Component>
<Component class="javax.swing.JButton" name="restore_button">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Dialog" size="14" style="1"/>
</Property>
<Property name="text" type="java.lang.String" value="Restore folder data"/>
<Property name="doubleBuffered" type="boolean" value="true"/>
</Properties>

View File

@ -147,6 +147,7 @@ public final class FolderLinkDialog extends javax.swing.JDialog {
}
});
restore_button.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
restore_button.setText("Restore folder data");
restore_button.setDoubleBuffered(true);
restore_button.addActionListener(new java.awt.event.ActionListener() {
@ -197,7 +198,7 @@ public final class FolderLinkDialog extends javax.swing.JDialog {
.addComponent(folder_link_label)
.addComponent(restore_button))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(file_tree_scrollpane, javax.swing.GroupLayout.DEFAULT_SIZE, 383, Short.MAX_VALUE)
.addComponent(file_tree_scrollpane, javax.swing.GroupLayout.DEFAULT_SIZE, 381, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(total_space_label)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

View File

@ -77,15 +77,15 @@ public final class GlobalSpeedMeter implements Runnable {
double current_speed = (progress - last_progress) / sleep_time;
last_progress = progress;
sp = Math.round(current_speed);
sp = last_progress > 0 ? Math.round(current_speed) : 0;
if (sp > 0) {
transference.getView().updateSpeed(formatBytes(sp) + "/s", true);
}
last_progress = progress;
no_data_count = 0;
} else {

View File

@ -45,7 +45,7 @@ import org.apache.http.auth.UsernamePasswordCredentials;
*/
public final class MainPanel {
public static final String VERSION = "2.49";
public static final String VERSION = "2.50";
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
public static final int STREAMER_PORT = 1337;

View File

@ -16,7 +16,7 @@ public final class ProgressMeter implements Runnable, SecureSingleThreadNotifiab
_notified = false;
_secure_notify_lock = new Object();
_transference = transference;
_progress = transference.getProgress();
_progress = 0;
_exit = false;
}
@ -56,6 +56,8 @@ public final class ProgressMeter implements Runnable, SecureSingleThreadNotifiab
public void run() {
Logger.getLogger(getClass().getName()).log(Level.INFO, "{0} ProgressMeter hello!", Thread.currentThread().getName());
_progress = _transference.getProgress();
while (!_exit || !_transference.getPartialProgress().isEmpty()) {
Integer reads;

View File

@ -574,7 +574,7 @@
</Group>
<Component id="limit_upload_speed_checkbox" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="321" max="32767" attributes="0"/>
<EmptySpace min="0" pref="255" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
@ -701,7 +701,7 @@
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Dialog" size="14" style="2"/>
</Property>
<Property name="text" type="java.lang.String" value="Note: MULTI-SLOT it&apos;s more robust against upload errors but it might be slower."/>
<Property name="text" type="java.lang.String" value="Note: MULTI-SLOT seems to be more robust against upload errors but it might be slower."/>
</Properties>
</Component>
</SubComponents>

View File

@ -897,7 +897,7 @@ public final class SettingsDialog extends javax.swing.JDialog {
});
rec_upload_slots_label.setFont(new java.awt.Font("Dialog", 2, 14)); // NOI18N
rec_upload_slots_label.setText("Note: MULTI-SLOT it's more robust against upload errors but it might be slower.");
rec_upload_slots_label.setText("Note: MULTI-SLOT seems to be more robust against upload errors but it might be slower.");
javax.swing.GroupLayout uploads_panelLayout = new javax.swing.GroupLayout(uploads_panel);
uploads_panel.setLayout(uploads_panelLayout);
@ -930,7 +930,7 @@ public final class SettingsDialog extends javax.swing.JDialog {
.addGap(3, 3, 3)
.addComponent(max_up_speed_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(limit_upload_speed_checkbox))
.addGap(0, 321, Short.MAX_VALUE)))
.addGap(0, 255, Short.MAX_VALUE)))
.addContainerGap())))
);
uploads_panelLayout.setVerticalGroup(