mirror of
https://github.com/tonikelope/megabasterd.git
synced 2025-04-29 22:24:32 +02:00
8.12
New button COPY ALL UPLOADS LINKS Upload button copy folder/file link includes email
This commit is contained in:
parent
858e1c12a9
commit
02d5582469
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.tonikelope</groupId>
|
||||
<artifactId>MegaBasterd</artifactId>
|
||||
<version>8.11</version>
|
||||
<version>8.12</version>
|
||||
<packaging>jar</packaging>
|
||||
<repositories>
|
||||
<repository>
|
||||
|
@ -70,7 +70,7 @@ import javax.swing.UIManager;
|
||||
*/
|
||||
public final class MainPanel {
|
||||
|
||||
public static final String VERSION = "8.11";
|
||||
public static final String VERSION = "8.12";
|
||||
public static final boolean FORCE_SMART_PROXY = false; //TRUE FOR DEBUGING SMART PROXY
|
||||
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
|
||||
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
|
||||
|
@ -382,10 +382,11 @@
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="status_down_label" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
|
||||
<Component id="close_all_finished_down_button" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jScrollPane_down" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="down_remtime_label" alignment="0" max="32767" attributes="0"/>
|
||||
@ -559,8 +560,11 @@
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="status_up_label" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="3" max="-2" attributes="0"/>
|
||||
<Component id="close_all_finished_up_button" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="copy_all_uploads" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jScrollPane_up" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="up_remtime_label" alignment="0" max="32767" attributes="0"/>
|
||||
@ -572,7 +576,10 @@
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="close_all_finished_up_button" alignment="0" max="32767" attributes="0"/>
|
||||
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
|
||||
<Component id="close_all_finished_up_button" alignment="3" max="32767" attributes="0"/>
|
||||
<Component id="copy_all_uploads" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="status_up_label" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
@ -673,6 +680,20 @@
|
||||
</Component>
|
||||
<Component class="javax.swing.JProgressBar" name="upload_status_bar">
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="copy_all_uploads">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Dialog" size="16" style="1"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/images/icons8-copy-to-clipboard-30.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="COPY ALL UPLOAD LINKS"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="copy_all_uploadsActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
|
@ -582,6 +582,7 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
pause_all_up_button = new javax.swing.JButton();
|
||||
up_remtime_label = new javax.swing.JLabel();
|
||||
upload_status_bar = new javax.swing.JProgressBar();
|
||||
copy_all_uploads = new javax.swing.JButton();
|
||||
unfreeze_transferences_button = new javax.swing.JButton();
|
||||
main_menubar = new javax.swing.JMenuBar();
|
||||
file_menu = new javax.swing.JMenu();
|
||||
@ -695,10 +696,11 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
.addComponent(pause_all_down_button))
|
||||
.addGroup(downloads_panelLayout.createSequentialGroup()
|
||||
.addComponent(status_down_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(close_all_finished_down_button)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jButton1))
|
||||
.addComponent(jButton1)
|
||||
.addContainerGap())
|
||||
.addComponent(jScrollPane_down)
|
||||
.addComponent(down_remtime_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(download_status_bar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
@ -762,6 +764,15 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
|
||||
up_remtime_label.setFont(new java.awt.Font("Dialog", 1, 20)); // NOI18N
|
||||
|
||||
copy_all_uploads.setFont(new java.awt.Font("Dialog", 1, 16)); // NOI18N
|
||||
copy_all_uploads.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/icons8-copy-to-clipboard-30.png"))); // NOI18N
|
||||
copy_all_uploads.setText("COPY ALL UPLOAD LINKS");
|
||||
copy_all_uploads.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
copy_all_uploadsActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout uploads_panelLayout = new javax.swing.GroupLayout(uploads_panel);
|
||||
uploads_panel.setLayout(uploads_panelLayout);
|
||||
uploads_panelLayout.setHorizontalGroup(
|
||||
@ -772,8 +783,11 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
.addComponent(pause_all_up_button))
|
||||
.addGroup(uploads_panelLayout.createSequentialGroup()
|
||||
.addComponent(status_up_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGap(3, 3, 3)
|
||||
.addComponent(close_all_finished_up_button)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(close_all_finished_up_button))
|
||||
.addComponent(copy_all_uploads)
|
||||
.addContainerGap())
|
||||
.addComponent(jScrollPane_up)
|
||||
.addComponent(up_remtime_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(upload_status_bar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
@ -783,7 +797,9 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, uploads_panelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(uploads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addGroup(uploads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(close_all_finished_up_button, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(copy_all_uploads))
|
||||
.addComponent(status_up_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(upload_status_bar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
@ -1586,6 +1602,14 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
|
||||
}//GEN-LAST:event_force_chunk_reset_buttonActionPerformed
|
||||
|
||||
private void copy_all_uploadsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_copy_all_uploadsActionPerformed
|
||||
// TODO add your handling code here:
|
||||
int total = _main_panel.getUpload_manager().copyAllLinksToClipboard();
|
||||
|
||||
JOptionPane.showMessageDialog(this, LabelTranslatorSingleton.getInstance().translate(total > 0 ? "ALL UPLOAD LINKS COPIED!" : "NO UPLOAD LINKS TO COPY"));
|
||||
|
||||
}//GEN-LAST:event_copy_all_uploadsActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JMenuItem about_menu;
|
||||
private javax.swing.JCheckBoxMenuItem auto_close_menu;
|
||||
@ -1594,6 +1618,7 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
private javax.swing.JMenuItem clean_all_up_menu;
|
||||
private javax.swing.JButton close_all_finished_down_button;
|
||||
private javax.swing.JButton close_all_finished_up_button;
|
||||
private javax.swing.JButton copy_all_uploads;
|
||||
private javax.swing.JLabel down_remtime_label;
|
||||
private javax.swing.JProgressBar download_status_bar;
|
||||
private javax.swing.JPanel downloads_panel;
|
||||
|
@ -92,4 +92,57 @@ public class UploadManager extends TransferenceManager {
|
||||
secureNotify();
|
||||
}
|
||||
|
||||
public int copyAllLinksToClipboard() {
|
||||
|
||||
int total = 0;
|
||||
|
||||
ArrayList<String> links = new ArrayList<>();
|
||||
|
||||
String out = "";
|
||||
|
||||
for (Transference t : _transference_waitstart_aux_queue) {
|
||||
Upload up = (Upload) t;
|
||||
links.add(up.getFile_name() + " [" + up.getMa().getEmail() + "] " + (up.getFolder_link() != null ? up.getFolder_link() : ""));
|
||||
}
|
||||
|
||||
for (Transference t : _transference_waitstart_queue) {
|
||||
|
||||
Upload up = (Upload) t;
|
||||
links.add(up.getFile_name() + " [" + up.getMa().getEmail() + "] " + (up.getFolder_link() != null ? up.getFolder_link() : ""));
|
||||
}
|
||||
|
||||
out += String.join("\r\n", links);
|
||||
|
||||
total += links.size();
|
||||
|
||||
links.clear();
|
||||
|
||||
for (Transference t : _transference_running_list) {
|
||||
|
||||
Upload up = (Upload) t;
|
||||
links.add(up.getFile_name() + " [" + up.getMa().getEmail() + "] " + (up.getFolder_link() != null ? up.getFolder_link() : "") + (up.getFile_link() != null ? " " + up.getFile_link() : ""));
|
||||
}
|
||||
|
||||
out += String.join("\r\n", links);
|
||||
|
||||
total += links.size();
|
||||
|
||||
links.clear();
|
||||
|
||||
for (Transference t : _transference_finished_queue) {
|
||||
|
||||
Upload up = (Upload) t;
|
||||
links.add("(UPLOAD FINISHED) " + up.getFile_name() + " [" + up.getMa().getEmail() + "] " + (up.getFolder_link() != null ? up.getFolder_link() : "") + (up.getFile_link() != null ? " " + up.getFile_link() : ""));
|
||||
}
|
||||
|
||||
out += String.join("\r\n", links);
|
||||
|
||||
total += links.size();
|
||||
|
||||
MiscTools.copyTextToClipboard(out);
|
||||
|
||||
return total;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -472,7 +472,7 @@ public class UploadView extends javax.swing.JPanel implements TransferenceView {
|
||||
|
||||
folder_link_button.setText(LabelTranslatorSingleton.getInstance().translate("Please wait..."));
|
||||
|
||||
copyTextToClipboard(_upload.getFolder_link());
|
||||
copyTextToClipboard("[" + _upload.getMa().getEmail() + "] " + _upload.getFolder_link());
|
||||
|
||||
folder_link_button.setText(LabelTranslatorSingleton.getInstance().translate("Copy folder link"));
|
||||
|
||||
@ -485,7 +485,7 @@ public class UploadView extends javax.swing.JPanel implements TransferenceView {
|
||||
|
||||
file_link_button.setText(LabelTranslatorSingleton.getInstance().translate("Please wait..."));
|
||||
|
||||
copyTextToClipboard(_upload.getFile_link());
|
||||
copyTextToClipboard("[" + _upload.getMa().getEmail() + "] " + _upload.getFile_link());
|
||||
|
||||
file_link_button.setText(LabelTranslatorSingleton.getInstance().translate("Copy file link"));
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 204 KiB After Width: | Height: | Size: 210 KiB |
Loading…
x
Reference in New Issue
Block a user