From d5eb9e80ed9cdc503994987e9601e0d3e4d0c91f Mon Sep 17 00:00:00 2001 From: tonikelope Date: Mon, 9 Jul 2018 11:41:44 +0200 Subject: [PATCH] 4.3 -File splitter --- .../tonikelope/megabasterd/AboutDialog.java | 4 +- .../megabasterd/FileSplitterDialog.form | 176 +++++++++ .../megabasterd/FileSplitterDialog.java | 372 ++++++++++++++++++ .../megabasterd/KissVideoStreamServer.java | 2 +- .../com/tonikelope/megabasterd/MainPanel.java | 2 +- .../tonikelope/megabasterd/MainPanelView.form | 14 + .../tonikelope/megabasterd/MainPanelView.java | 21 + .../megabasterd/SettingsDialog.form | 14 +- .../megabasterd/SettingsDialog.java | 14 +- src/main/resources/images/icons8-cut-30.png | Bin 0 -> 1531 bytes 10 files changed, 601 insertions(+), 18 deletions(-) create mode 100644 src/main/java/com/tonikelope/megabasterd/FileSplitterDialog.form create mode 100644 src/main/java/com/tonikelope/megabasterd/FileSplitterDialog.java create mode 100644 src/main/resources/images/icons8-cut-30.png diff --git a/src/main/java/com/tonikelope/megabasterd/AboutDialog.java b/src/main/java/com/tonikelope/megabasterd/AboutDialog.java index e9548b0f7..fbdd36348 100644 --- a/src/main/java/com/tonikelope/megabasterd/AboutDialog.java +++ b/src/main/java/com/tonikelope/megabasterd/AboutDialog.java @@ -13,10 +13,10 @@ import java.awt.Color; public final class AboutDialog extends javax.swing.JDialog { private static final String MEGA_URL = "https://mega.nz/#F!lYsRWaQB!uVhntmyKcVECRaOxAbcL4A"; - private static final String TONIKELOPE_URL = "http://toni.world"; + private static final String TONIKELOPE_URL = "https://github.com/tonikelope/"; private static final String MEGACRYPTER_URL = "https://tonikelope.github.io/megacrypter/"; private static final String SPAIN_URL = "https://en.wikipedia.org/wiki/Spain"; - private static final String MEGABASTERD_GITHUB_URL = "https://github.com/tonikelope/megabasterd"; + private static final String MEGABASTERD_GITHUB_URL = "https://github.com/tonikelope/megabasterd/"; public AboutDialog(MainPanelView parent, boolean modal) { diff --git a/src/main/java/com/tonikelope/megabasterd/FileSplitterDialog.form b/src/main/java/com/tonikelope/megabasterd/FileSplitterDialog.form new file mode 100644 index 000000000..4602d2831 --- /dev/null +++ b/src/main/java/com/tonikelope/megabasterd/FileSplitterDialog.form @@ -0,0 +1,176 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/tonikelope/megabasterd/FileSplitterDialog.java b/src/main/java/com/tonikelope/megabasterd/FileSplitterDialog.java new file mode 100644 index 000000000..65e17510c --- /dev/null +++ b/src/main/java/com/tonikelope/megabasterd/FileSplitterDialog.java @@ -0,0 +1,372 @@ +/* + * Copyright (C) 2018 tonikelope + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.tonikelope.megabasterd; + +import static com.tonikelope.megabasterd.MainPanel.DEFAULT_FONT; +import static com.tonikelope.megabasterd.MainPanel.THREAD_POOL; +import static com.tonikelope.megabasterd.MiscTools.swingInvoke; +import static com.tonikelope.megabasterd.MiscTools.updateFonts; +import java.awt.Dialog; +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; +import static java.lang.Integer.MAX_VALUE; +import java.nio.channels.FileChannel; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JFileChooser; +import javax.swing.JOptionPane; + +/** + * + * @author tonikelope + */ +public class FileSplitterDialog extends javax.swing.JDialog { + + private final MainPanelView _mainPanelView; + private final MainPanel _main_panel; + private File _file = null; + private File _output_dir = null; + private long _progress = 0L; + + /** + * Creates new form FileSplitterDialog + */ + public FileSplitterDialog(MainPanelView parent, boolean modal) { + super(parent, modal); + _main_panel = parent.getMain_panel(); + initComponents(); + updateFonts(this.getRootPane(), DEFAULT_FONT, _main_panel.getZoom_factor()); + _mainPanelView = parent; + } + + private List _splitFile() throws IOException { + + int mBperSplit = Integer.parseInt(this.split_size_text.getText()); + + if (mBperSplit <= 0) { + throw new IllegalArgumentException("mBperSplit must be more than zero"); + } + + List partFiles = new ArrayList<>(); + final long sourceSize = Files.size(Paths.get(this._file.getAbsolutePath())); + final long bytesPerSplit = 1024L * 1024L * mBperSplit; + final long numSplits = sourceSize / bytesPerSplit; + final long remainingBytes = sourceSize % bytesPerSplit; + int position = 0; + int conta_split = 1; + + try (RandomAccessFile sourceFile = new RandomAccessFile(this._file.getAbsolutePath(), "r"); + FileChannel sourceChannel = sourceFile.getChannel()) { + + for (; position < numSplits; position++, conta_split++) { + _writePartToFile(bytesPerSplit, position * bytesPerSplit, sourceChannel, partFiles, conta_split); + } + + if (remainingBytes > 0) { + _writePartToFile(remainingBytes, position * bytesPerSplit, sourceChannel, partFiles, conta_split); + } + } + return partFiles; + } + + private void _writePartToFile(long byteSize, long position, FileChannel sourceChannel, List partFiles, int conta_split) throws IOException { + + Path fileName = Paths.get(this._output_dir.getAbsolutePath() + "/" + this._file.getName() + ".part" + String.valueOf(conta_split)); + try (RandomAccessFile toFile = new RandomAccessFile(fileName.toFile(), "rw"); + FileChannel toChannel = toFile.getChannel()) { + sourceChannel.position(position); + toChannel.transferFrom(sourceChannel, 0, byteSize); + } + partFiles.add(fileName); + + this._progress += byteSize; + + swingInvoke( + new Runnable() { + @Override + public void run() { + + jProgressBar2.setValue((int) Math.ceil((MAX_VALUE / (double) _file.length()) * _progress)); + } + }); + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + file_button = new javax.swing.JButton(); + file_name_label = new javax.swing.JLabel(); + output_button = new javax.swing.JButton(); + file_size_label = new javax.swing.JLabel(); + output_folder_label = new javax.swing.JLabel(); + split_size_label = new javax.swing.JLabel(); + split_size_text = new javax.swing.JTextField(); + jProgressBar2 = new javax.swing.JProgressBar(); + split_button = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle("File Splitter"); + + file_button.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N + file_button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/icons8-add-file-30.png"))); // NOI18N + file_button.setText("Open file"); + file_button.setDoubleBuffered(true); + file_button.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + file_buttonActionPerformed(evt); + } + }); + + file_name_label.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N + file_name_label.setDoubleBuffered(true); + + output_button.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N + output_button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/icons8-add-folder-30.png"))); // NOI18N + output_button.setText("Change output folder"); + output_button.setDoubleBuffered(true); + output_button.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + output_buttonActionPerformed(evt); + } + }); + + file_size_label.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N + file_size_label.setDoubleBuffered(true); + + output_folder_label.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N + output_folder_label.setDoubleBuffered(true); + + split_size_label.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N + split_size_label.setText("Split size (MBs):"); + split_size_label.setDoubleBuffered(true); + + split_size_text.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N + split_size_text.setDoubleBuffered(true); + + jProgressBar2.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N + jProgressBar2.setDoubleBuffered(true); + + split_button.setBackground(new java.awt.Color(102, 204, 255)); + split_button.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N + split_button.setForeground(new java.awt.Color(255, 255, 255)); + split_button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/icons8-cut-30.png"))); // NOI18N + split_button.setText("SPLIT FILE"); + split_button.setDoubleBuffered(true); + split_button.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + split_buttonActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(file_button, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(file_name_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(output_button, javax.swing.GroupLayout.DEFAULT_SIZE, 976, Short.MAX_VALUE) + .addComponent(file_size_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(output_folder_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jProgressBar2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addComponent(split_size_label) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(split_size_text)) + .addComponent(split_button, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(file_button) + .addGap(9, 9, 9) + .addComponent(file_name_label) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(file_size_label) + .addGap(18, 18, 18) + .addComponent(output_button) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(output_folder_label) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(split_size_label) + .addComponent(split_size_text, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addComponent(jProgressBar2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(split_button, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap()) + ); + + pack(); + }// //GEN-END:initComponents + + private void file_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_file_buttonActionPerformed + // TODO add your handling code here: + + this.file_button.setText("Opening file..."); + + this.file_button.setEnabled(false); + + this.output_button.setEnabled(false); + + this.split_button.setEnabled(false); + + JFileChooser filechooser = new javax.swing.JFileChooser(); + + filechooser.setDialogTitle("Add files"); + + filechooser.setAcceptAllFileFilterUsed(false); + + if (filechooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION && filechooser.getSelectedFile().canRead()) { + + this._file = filechooser.getSelectedFile(); + this.file_name_label.setText(this._file.getAbsolutePath()); + this.file_size_label.setText(MiscTools.formatBytes(this._file.length())); + this.output_folder_label.setText(this._file.getParentFile().getAbsolutePath()); + this.jProgressBar2.setMinimum(0); + this.jProgressBar2.setMaximum(MAX_VALUE); + this.jProgressBar2.setStringPainted(true); + this.jProgressBar2.setValue(0); + this._progress = 0L; + } + + this.file_button.setText("Open file"); + + this.file_button.setEnabled(true); + + this.output_button.setEnabled(true); + + this.split_button.setEnabled(true); + + pack(); + + }//GEN-LAST:event_file_buttonActionPerformed + + private void output_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_output_buttonActionPerformed + // TODO add your handling code here: + + this.output_button.setText("Changing output folder..."); + + this.file_button.setEnabled(false); + + this.output_button.setEnabled(false); + + this.split_button.setEnabled(false); + + JFileChooser filechooser = new javax.swing.JFileChooser(); + + filechooser.setDialogTitle("Add directory"); + + filechooser.setFileSelectionMode(javax.swing.JFileChooser.DIRECTORIES_ONLY); + + filechooser.setAcceptAllFileFilterUsed(false); + + if (filechooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION && filechooser.getSelectedFile().canRead()) { + + this._output_dir = filechooser.getSelectedFile(); + + this.output_folder_label.setText(this._output_dir.getAbsolutePath()); + } + + this.output_button.setText("Change output folder"); + + this.file_button.setEnabled(true); + + this.output_button.setEnabled(true); + + this.split_button.setEnabled(true); + + pack(); + }//GEN-LAST:event_output_buttonActionPerformed + + private void split_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_split_buttonActionPerformed + // TODO add your handling code here: + + if (this._file != null && this._output_dir != null && !this.split_size_text.getText().equals("")) { + + this.split_button.setText("SPLITTING FILE..."); + + this.file_button.setEnabled(false); + + this.output_button.setEnabled(false); + + this.split_button.setEnabled(false); + + this.split_size_text.setEnabled(false); + + Dialog tthis = this; + + THREAD_POOL.execute(new Runnable() { + @Override + public void run() { + + try { + _splitFile(); + } catch (IOException ex) { + Logger.getLogger(FileSplitterDialog.class.getName()).log(Level.SEVERE, null, ex); + } + + JOptionPane.showMessageDialog(tthis, "File successfully splitted!"); + + split_button.setText("SPLIT FILE"); + + file_button.setEnabled(true); + + output_button.setEnabled(true); + + split_button.setEnabled(true); + + split_size_text.setEnabled(true); + + pack(); + + } + }); + + } + }//GEN-LAST:event_split_buttonActionPerformed + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton file_button; + private javax.swing.JLabel file_name_label; + private javax.swing.JLabel file_size_label; + private javax.swing.JProgressBar jProgressBar2; + private javax.swing.JButton output_button; + private javax.swing.JLabel output_folder_label; + private javax.swing.JButton split_button; + private javax.swing.JLabel split_size_label; + private javax.swing.JTextField split_size_text; + // End of variables declaration//GEN-END:variables +} diff --git a/src/main/java/com/tonikelope/megabasterd/KissVideoStreamServer.java b/src/main/java/com/tonikelope/megabasterd/KissVideoStreamServer.java index b66c20162..d82a01064 100644 --- a/src/main/java/com/tonikelope/megabasterd/KissVideoStreamServer.java +++ b/src/main/java/com/tonikelope/megabasterd/KissVideoStreamServer.java @@ -37,7 +37,7 @@ public final class KissVideoStreamServer implements HttpHandler, SecureSingleThr public static final int THREAD_START = 0x01; public static final int THREAD_STOP = 0x02; - public static final int DEFAULT_WORKERS = 10; + public static final int DEFAULT_WORKERS = 8; private final MainPanel _main_panel; private final ConcurrentHashMap> _link_cache; diff --git a/src/main/java/com/tonikelope/megabasterd/MainPanel.java b/src/main/java/com/tonikelope/megabasterd/MainPanel.java index e5e907e25..be513b4dd 100644 --- a/src/main/java/com/tonikelope/megabasterd/MainPanel.java +++ b/src/main/java/com/tonikelope/megabasterd/MainPanel.java @@ -48,7 +48,7 @@ import org.apache.http.auth.UsernamePasswordCredentials; */ public final class MainPanel { - public static final String VERSION = "4.2"; + public static final String VERSION = "4.3"; 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; diff --git a/src/main/java/com/tonikelope/megabasterd/MainPanelView.form b/src/main/java/com/tonikelope/megabasterd/MainPanelView.form index 4047ba5f4..388339e49 100644 --- a/src/main/java/com/tonikelope/megabasterd/MainPanelView.form +++ b/src/main/java/com/tonikelope/megabasterd/MainPanelView.form @@ -55,6 +55,20 @@ + + + + + + + + + + + + + + diff --git a/src/main/java/com/tonikelope/megabasterd/MainPanelView.java b/src/main/java/com/tonikelope/megabasterd/MainPanelView.java index aee257fa5..ef08fcb0d 100644 --- a/src/main/java/com/tonikelope/megabasterd/MainPanelView.java +++ b/src/main/java/com/tonikelope/megabasterd/MainPanelView.java @@ -247,6 +247,7 @@ public final class MainPanelView extends javax.swing.JFrame { new_download_menu = new javax.swing.JMenuItem(); new_upload_menu = new javax.swing.JMenuItem(); new_stream_menu = new javax.swing.JMenuItem(); + split_file_menu = new javax.swing.JMenuItem(); jSeparator4 = new javax.swing.JPopupMenu.Separator(); clean_all_down_menu = new javax.swing.JMenuItem(); clean_all_up_menu = new javax.swing.JMenuItem(); @@ -452,6 +453,16 @@ public final class MainPanelView extends javax.swing.JFrame { } }); file_menu.add(new_stream_menu); + + split_file_menu.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N + split_file_menu.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/icons8-cut-30.png"))); // NOI18N + split_file_menu.setText("Split file"); + split_file_menu.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + split_file_menuActionPerformed(evt); + } + }); + file_menu.add(split_file_menu); file_menu.add(jSeparator4); clean_all_down_menu.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N @@ -1083,6 +1094,15 @@ public final class MainPanelView extends javax.swing.JFrame { } }//GEN-LAST:event_clean_all_up_menuActionPerformed + private void split_file_menuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_split_file_menuActionPerformed + // TODO add your handling code here: + FileSplitterDialog dialog = new FileSplitterDialog(this, true); + + dialog.setLocationRelativeTo(this); + + dialog.setVisible(true); + }//GEN-LAST:event_split_file_menuActionPerformed + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JMenuItem about_menu; private javax.swing.JMenuItem clean_all_down_menu; @@ -1116,6 +1136,7 @@ public final class MainPanelView extends javax.swing.JFrame { private javax.swing.JButton pause_all_up_button; private javax.swing.JMenuItem settings_menu; private javax.swing.JLabel smart_proxy_status; + private javax.swing.JMenuItem split_file_menu; private javax.swing.JLabel status_down_label; private javax.swing.JLabel status_up_label; private javax.swing.JLabel up_remtime_label; diff --git a/src/main/java/com/tonikelope/megabasterd/SettingsDialog.form b/src/main/java/com/tonikelope/megabasterd/SettingsDialog.form index 4cd493cbb..7af8c9667 100644 --- a/src/main/java/com/tonikelope/megabasterd/SettingsDialog.form +++ b/src/main/java/com/tonikelope/megabasterd/SettingsDialog.form @@ -44,7 +44,7 @@ - + @@ -127,7 +127,7 @@ - + @@ -406,7 +406,7 @@ - + @@ -637,7 +637,7 @@ - + @@ -796,7 +796,7 @@ - + @@ -805,7 +805,7 @@ - + @@ -1079,7 +1079,7 @@ - + diff --git a/src/main/java/com/tonikelope/megabasterd/SettingsDialog.java b/src/main/java/com/tonikelope/megabasterd/SettingsDialog.java index a31690d1a..56b76107e 100644 --- a/src/main/java/com/tonikelope/megabasterd/SettingsDialog.java +++ b/src/main/java/com/tonikelope/megabasterd/SettingsDialog.java @@ -671,7 +671,7 @@ public final class SettingsDialog extends javax.swing.JDialog { }); smart_proxy_url_label.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N - smart_proxy_url_label.setText("Custom URL:"); + smart_proxy_url_label.setText("Custom URL (optional):"); max_downloads_spinner.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N max_downloads_spinner.setDoubleBuffered(true); @@ -882,7 +882,7 @@ public final class SettingsDialog extends javax.swing.JDialog { downloads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(downloads_panelLayout.createSequentialGroup() .addContainerGap() - .addComponent(downloads_scroll_pane, javax.swing.GroupLayout.DEFAULT_SIZE, 465, Short.MAX_VALUE) + .addComponent(downloads_scroll_pane, javax.swing.GroupLayout.DEFAULT_SIZE, 471, Short.MAX_VALUE) .addContainerGap()) ); @@ -987,7 +987,7 @@ public final class SettingsDialog extends javax.swing.JDialog { .addGroup(uploads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(max_up_speed_label) .addComponent(max_up_speed_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(269, Short.MAX_VALUE)) + .addContainerGap(275, Short.MAX_VALUE)) ); jTabbedPane1.addTab("Uploads", new javax.swing.ImageIcon(getClass().getResource("/images/icons8-upload-to-ftp-30.png")), uploads_panel); // NOI18N @@ -1166,7 +1166,7 @@ public final class SettingsDialog extends javax.swing.JDialog { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(mega_accounts_scrollpane, javax.swing.GroupLayout.DEFAULT_SIZE, 118, Short.MAX_VALUE) + .addComponent(mega_accounts_scrollpane, javax.swing.GroupLayout.DEFAULT_SIZE, 121, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(accounts_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(remove_mega_account_button) @@ -1174,7 +1174,7 @@ public final class SettingsDialog extends javax.swing.JDialog { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(elc_accounts_label) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(elc_accounts_scrollpane, javax.swing.GroupLayout.DEFAULT_SIZE, 118, Short.MAX_VALUE) + .addComponent(elc_accounts_scrollpane, javax.swing.GroupLayout.DEFAULT_SIZE, 121, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(accounts_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(remove_elc_account_button) @@ -1383,7 +1383,7 @@ public final class SettingsDialog extends javax.swing.JDialog { .addGroup(advanced_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(import_settings_button) .addComponent(export_settings_button)) - .addContainerGap(144, Short.MAX_VALUE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jTabbedPane1.addTab("Advanced", new javax.swing.ImageIcon(getClass().getResource("/images/icons8-administrative-tools-30.png")), advanced_panel); // NOI18N @@ -1411,7 +1411,7 @@ public final class SettingsDialog extends javax.swing.JDialog { layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() - .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 530, Short.MAX_VALUE) + .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 536, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(cancel_button) diff --git a/src/main/resources/images/icons8-cut-30.png b/src/main/resources/images/icons8-cut-30.png new file mode 100644 index 0000000000000000000000000000000000000000..efd87964e44915e70bf0e6079f0cfdff16ff2c8c GIT binary patch literal 1531 zcmV|L4r?E+{N^7m%3=++aEw>8EynWiO2<~aCG z%EUztJ6E_x03f2c(PFbD-|%`z2mSsw&e%JYF%p!dZ$U_nrKBWTx^Q75fVki<8^6nk zqCYw{J7ems;+d0-Q;g8*b&$LR>|FcVVJ7oM4Leu30YC%*Xj)-PdOD=@=NTAVRdx8V z9{^e%j#WWPa!qqM3`|vv;z74<_Y3dsGMJsmSxS3#_H?#YR(Q%c@P=}Gey~W z)#(gn%$%8IvRdcq2=R)d*lV_0=Vi~HtxHNxg{7pJJN_*@=1^Bu#3hAEYV)8zY5V|MPu z(1x9FU5T|l6E+a8szo4#aU$rfwqhcPA|%fx7}spZbw$rRTRKC85LC>sNO>6Q4lo5( z@t_ZZ$7}!V?=GG;A|0lb(kbtM4l&D$k)aW^9BP5R+K!yOoanQC-CoVr;R$F8PY4A7 zA>QOq&NKbXDwec*E!8j5%p8Lt2(`|dWq=6(56%`|gPG4SQN0ucE=T4pnV;aJW0%xZinx+{w zzyjcr!3i_|rGD+pLG#mlik2*n9wbfG;Op_h)#Zk!s>rltB5*A*tjT;{q$MUyCJ{9I zX5aqu%ZF1l^lJ1aeLX(7??dO5%|XrL8kEm_CXMPz+m7`=#BHq+#q?uNC}Y56tE~ir zAi&?<1LK;_xH7^ucbDsy7S__HP0ye;b+yqL1N~QdS8LY@Q+REn%wzg7=Nw^0d8mP0 zobmjv+mq8P355|{I8aPoV!&pB4!?eMSx`udPTE z3}}s4_IoBV){iBrl`&QdRkaUFQtKZ*J>k*Yx8ZlX`PHXpys&)VuI9+%#;x^|%+$HA zGwz$?;r8mXG-`;w=l2fReLoKR{SiOzf3~TqFRUo51|><+84Msy8+~=}*GI+&Xxv&a zjWV@rJltAfC1q81V=OoY9>I?(1p$xw1vGB0mlRcA;OuY>`Ff@3dh1LpDXFlfih6o% zd&BM-50^TQADeS?g-{>>A_%TnU;y}V`|4gWx$5HS^ZxecQ+I z!Jj=ftXlb4KOm66$f6B9>ic8+F@R7YfB~oTj;5+#RUJC?Nh0XKQEWd3Kt<7|D$3^C hqeu5YPUw@VzX8;v+$^0O?QH-6002ovPDHLkV1is6*6jcQ literal 0 HcmV?d00001