mirror of
https://github.com/tonikelope/megabasterd.git
synced 2025-04-29 22:24:32 +02:00
7.81
Public folder link optional
This commit is contained in:
parent
b7598c88c4
commit
5eb7603928
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.tonikelope</groupId>
|
||||
<artifactId>MegaBasterd</artifactId>
|
||||
<version>7.76</version>
|
||||
<version>7.81</version>
|
||||
<packaging>jar</packaging>
|
||||
<repositories>
|
||||
<repository>
|
||||
|
@ -13,6 +13,10 @@
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
|
||||
</SyntheticProperties>
|
||||
<Events>
|
||||
<EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosing"/>
|
||||
<EventHandler event="windowOpened" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowOpened"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
|
@ -14,6 +14,7 @@ import static com.tonikelope.megabasterd.MiscTools.*;
|
||||
import java.awt.Color;
|
||||
import java.awt.Dialog;
|
||||
import java.util.logging.Logger;
|
||||
import javax.sound.midi.Sequencer;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
/**
|
||||
@ -29,6 +30,7 @@ public class AboutDialog extends javax.swing.JDialog {
|
||||
public static final String SPAIN_URL = "https://en.wikipedia.org/wiki/Spain";
|
||||
public static final String MEGABASTERD_GITHUB_URL = "https://tonikelope.github.io/megabasterd/";
|
||||
public static final String KIM_URL = "http://www.kim.com/";
|
||||
private static volatile Sequencer _midi = null;
|
||||
|
||||
public AboutDialog(MainPanelView parent, boolean modal) {
|
||||
|
||||
@ -80,6 +82,14 @@ public class AboutDialog extends javax.swing.JDialog {
|
||||
setTitle("About");
|
||||
setIconImage(null);
|
||||
setResizable(false);
|
||||
addWindowListener(new java.awt.event.WindowAdapter() {
|
||||
public void windowClosing(java.awt.event.WindowEvent evt) {
|
||||
formWindowClosing(evt);
|
||||
}
|
||||
public void windowOpened(java.awt.event.WindowEvent evt) {
|
||||
formWindowOpened(evt);
|
||||
}
|
||||
});
|
||||
|
||||
title_label.setFont(new java.awt.Font("Dialog", 1, 48)); // NOI18N
|
||||
title_label.setText("MegaBasterd " + VERSION + " ");
|
||||
@ -417,6 +427,26 @@ public class AboutDialog extends javax.swing.JDialog {
|
||||
subtitle_label.setForeground(new Color(102, 102, 102));
|
||||
}//GEN-LAST:event_subtitle_labelMouseExited
|
||||
|
||||
private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
|
||||
// TODO add your handling code here:
|
||||
THREAD_POOL.execute(() -> {
|
||||
|
||||
if (_midi == null) {
|
||||
_midi = MiscTools.midiLoopPlay("/midis/a-team.mid");
|
||||
} else {
|
||||
_midi.start();
|
||||
}
|
||||
});
|
||||
}//GEN-LAST:event_formWindowOpened
|
||||
|
||||
private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
|
||||
// TODO add your handling code here:
|
||||
THREAD_POOL.execute(() -> {
|
||||
_midi.stop();
|
||||
});
|
||||
dispose();
|
||||
}//GEN-LAST:event_formWindowClosing
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel author_webpage_label;
|
||||
private javax.swing.JButton check_version_button;
|
||||
|
@ -181,9 +181,9 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
|
||||
String chunk_url = ChunkWriterManager.genChunkUrl(worker_url, _download.getFile_size(), chunk_offset, chunk_size);
|
||||
|
||||
if (http_error == 509 && MainPanel.isRun_command()) {
|
||||
|
||||
MainPanel.run_external_command();
|
||||
|
||||
} else if (http_error != 509 && MainPanel.LAST_EXTERNAL_COMMAND_TIMESTAMP != -1) {
|
||||
MainPanel.LAST_EXTERNAL_COMMAND_TIMESTAMP = -1;
|
||||
}
|
||||
|
||||
if ((_current_smart_proxy != null || http_error == 509) && MainPanel.isUse_smart_proxy() && !MainPanel.isUse_proxy()) {
|
||||
|
@ -18,13 +18,12 @@ import java.awt.Color;
|
||||
import static java.awt.EventQueue.invokeLater;
|
||||
import java.awt.Font;
|
||||
import static java.awt.Frame.NORMAL;
|
||||
import java.awt.MenuItem;
|
||||
import java.awt.PopupMenu;
|
||||
import static java.awt.SystemTray.getSystemTray;
|
||||
import static java.awt.Toolkit.getDefaultToolkit;
|
||||
import java.awt.TrayIcon;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.WindowEvent;
|
||||
import static java.awt.event.WindowEvent.WINDOW_CLOSING;
|
||||
import java.io.File;
|
||||
@ -53,11 +52,14 @@ import static java.util.concurrent.Executors.newCachedThreadPool;
|
||||
import java.util.logging.Level;
|
||||
import static java.util.logging.Level.SEVERE;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.JOptionPane;
|
||||
import static javax.swing.JOptionPane.QUESTION_MESSAGE;
|
||||
import static javax.swing.JOptionPane.WARNING_MESSAGE;
|
||||
import static javax.swing.JOptionPane.YES_NO_CANCEL_OPTION;
|
||||
import static javax.swing.JOptionPane.showOptionDialog;
|
||||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.UIDefaults;
|
||||
import javax.swing.UIManager;
|
||||
|
||||
@ -67,14 +69,14 @@ import javax.swing.UIManager;
|
||||
*/
|
||||
public final class MainPanel {
|
||||
|
||||
public static final String VERSION = "7.76";
|
||||
public static final String VERSION = "7.81";
|
||||
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;
|
||||
public static final int STREAMER_PORT = 1337;
|
||||
public static final int WATCHDOG_PORT = 1338;
|
||||
public static final int DEFAULT_MEGA_PROXY_PORT = 9999;
|
||||
public static final int RUN_COMMAND_TIME = 600;
|
||||
public static final int RUN_COMMAND_TIME = 120;
|
||||
public static final String DEFAULT_LANGUAGE = "EN";
|
||||
public static final boolean DEFAULT_SMART_PROXY = false;
|
||||
public static final double FORCE_GARBAGE_COLLECTION_MAX_MEMORY_PERCENT = 0.7;
|
||||
@ -98,7 +100,7 @@ public final class MainPanel {
|
||||
private static String _new_version;
|
||||
private static Boolean _resume_uploads;
|
||||
private static Boolean _resume_downloads;
|
||||
private static long _last_run_command;
|
||||
public static volatile long LAST_EXTERNAL_COMMAND_TIMESTAMP;
|
||||
private static final Logger LOG = Logger.getLogger(MainPanel.class.getName());
|
||||
private static volatile boolean CHECK_RUNNING = true;
|
||||
|
||||
@ -225,7 +227,7 @@ public final class MainPanel {
|
||||
|
||||
_exit = false;
|
||||
|
||||
_last_run_command = -1;
|
||||
LAST_EXTERNAL_COMMAND_TIMESTAMP = -1;
|
||||
|
||||
_restart = false;
|
||||
|
||||
@ -812,7 +814,7 @@ public final class MainPanel {
|
||||
_run_command_path = DBTools.selectSettingValue("run_command_path");
|
||||
|
||||
if (_run_command && old_run_command_path != null && !old_run_command_path.equals(_run_command_path)) {
|
||||
_last_run_command = -1;
|
||||
LAST_EXTERNAL_COMMAND_TIMESTAMP = -1;
|
||||
}
|
||||
|
||||
String use_megacrypter_reverse = selectSettingValue("megacrypter_reverse");
|
||||
@ -866,7 +868,7 @@ public final class MainPanel {
|
||||
|
||||
public static synchronized void run_external_command() {
|
||||
|
||||
if (_run_command && (_last_run_command == -1 || _last_run_command + RUN_COMMAND_TIME * 1000 < System.currentTimeMillis())) {
|
||||
if (_run_command && (LAST_EXTERNAL_COMMAND_TIMESTAMP == -1 || LAST_EXTERNAL_COMMAND_TIMESTAMP + RUN_COMMAND_TIME * 1000 < System.currentTimeMillis())) {
|
||||
|
||||
if (_run_command_path != null && !_run_command_path.equals("")) {
|
||||
try {
|
||||
@ -875,7 +877,7 @@ public final class MainPanel {
|
||||
Logger.getLogger(MainPanel.class.getName()).log(Level.SEVERE, ex.getMessage());
|
||||
}
|
||||
|
||||
_last_run_command = System.currentTimeMillis();
|
||||
LAST_EXTERNAL_COMMAND_TIMESTAMP = System.currentTimeMillis();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1355,29 +1357,29 @@ public final class MainPanel {
|
||||
|
||||
if (java.awt.SystemTray.isSupported()) {
|
||||
|
||||
PopupMenu menu = new PopupMenu();
|
||||
JPopupMenu menu = new JPopupMenu();
|
||||
|
||||
Font new_font = GUI_FONT;
|
||||
|
||||
menu.setFont(new_font.deriveFont(Font.BOLD, Math.round(14 * ZOOM_FACTOR)));
|
||||
|
||||
MenuItem messageItem = new MenuItem(LabelTranslatorSingleton.getInstance().translate("Restore window"));
|
||||
JMenuItem messageItem = new JMenuItem(LabelTranslatorSingleton.getInstance().translate("Restore window"));
|
||||
|
||||
messageItem.addActionListener((ActionEvent e) -> {
|
||||
MiscTools.GUIRun(() -> {
|
||||
getView().setExtendedState(NORMAL);
|
||||
|
||||
getView().setVisible(true);
|
||||
getView().setExtendedState(NORMAL);
|
||||
|
||||
getView().revalidate();
|
||||
getView().setVisible(true);
|
||||
|
||||
getView().revalidate();
|
||||
|
||||
getView().repaint();
|
||||
|
||||
getView().repaint();
|
||||
});
|
||||
});
|
||||
|
||||
menu.add(messageItem);
|
||||
|
||||
MenuItem closeItem = new MenuItem(LabelTranslatorSingleton.getInstance().translate("EXIT"));
|
||||
JMenuItem closeItem = new JMenuItem(LabelTranslatorSingleton.getInstance().translate("EXIT"));
|
||||
|
||||
closeItem.addActionListener((ActionEvent e) -> {
|
||||
if (!getView().isVisible()) {
|
||||
@ -1394,28 +1396,34 @@ public final class MainPanel {
|
||||
|
||||
menu.add(closeItem);
|
||||
|
||||
ActionListener actionListener = (ActionEvent e) -> {
|
||||
MiscTools.GUIRun(() -> {
|
||||
if (!getView().isVisible()) {
|
||||
getView().setExtendedState(NORMAL);
|
||||
getView().setVisible(true);
|
||||
getView().revalidate();
|
||||
getView().repaint();
|
||||
|
||||
} else {
|
||||
|
||||
getView().dispatchEvent(new WindowEvent(getView(), WINDOW_CLOSING));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
_trayicon = new TrayIcon(getDefaultToolkit().getImage(getClass().getResource(ICON_FILE)), "MegaBasterd", menu);
|
||||
_trayicon = new TrayIcon(getDefaultToolkit().getImage(getClass().getResource(ICON_FILE)), "MegaBasterd", null);
|
||||
|
||||
_trayicon.setToolTip("MegaBasterd " + VERSION);
|
||||
|
||||
_trayicon.setImageAutoSize(true);
|
||||
|
||||
_trayicon.addActionListener(actionListener);
|
||||
_trayicon.addMouseListener(new MouseAdapter() {
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
|
||||
if (SwingUtilities.isRightMouseButton(e)) {
|
||||
menu.setLocation(e.getX(), e.getY());
|
||||
menu.setInvoker(menu);
|
||||
menu.setVisible(true);
|
||||
} else {
|
||||
if (!getView().isVisible()) {
|
||||
getView().setExtendedState(NORMAL);
|
||||
getView().setVisible(true);
|
||||
getView().revalidate();
|
||||
getView().repaint();
|
||||
|
||||
} else {
|
||||
|
||||
getView().dispatchEvent(new WindowEvent(getView(), WINDOW_CLOSING));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
getSystemTray().add(_trayicon);
|
||||
|
||||
|
@ -660,6 +660,9 @@
|
||||
</Container>
|
||||
<Component class="javax.swing.JButton" name="unfreeze_transferences_button">
|
||||
<Properties>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="cc" green="ff" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Dialog" size="24" style="1"/>
|
||||
</Property>
|
||||
|
@ -261,9 +261,19 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
|
||||
LOG.log(Level.INFO, "{0} Dir {1} created", new Object[]{Thread.currentThread().getName(), parent_node});
|
||||
|
||||
ma.shareFolder(parent_node, parent_key, share_key);
|
||||
String upload_folder_string = DBTools.selectSettingValue("upload_public_folder");
|
||||
|
||||
String folder_link = ma.getPublicFolderLink(parent_node, share_key);
|
||||
boolean folder_share = "yes".equals(upload_folder_string);
|
||||
|
||||
String folder_link = null;
|
||||
|
||||
if (folder_share) {
|
||||
|
||||
ma.shareFolder(parent_node, parent_key, share_key);
|
||||
|
||||
folder_link = ma.getPublicFolderLink(parent_node, share_key);
|
||||
|
||||
}
|
||||
|
||||
if (dialog.getUpload_log_checkbox().isSelected()) {
|
||||
|
||||
@ -283,8 +293,23 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
}
|
||||
}
|
||||
|
||||
if (folder_share) {
|
||||
res = ma.createDirInsideAnotherSharedDir("MEGABASTERD", parent_node, ma.genFolderKey(), i32a2bin(ma.getMaster_key()), parent_node, share_key);
|
||||
} else {
|
||||
res = ma.createDir("MEGABASTERD", parent_node, ma.genFolderKey(), i32a2bin(ma.getMaster_key()));
|
||||
|
||||
}
|
||||
|
||||
String file_paths_2_node = (String) ((Map) ((List) res.get("f")).get(0)).get("h");
|
||||
|
||||
MegaDirNode file_paths = new MegaDirNode(parent_node);
|
||||
|
||||
MegaDirNode file_paths_2 = new MegaDirNode(file_paths_2_node);
|
||||
|
||||
file_paths.getChildren().put("MEGABASTERD", file_paths_2);
|
||||
|
||||
file_paths = file_paths_2;
|
||||
|
||||
for (File f : dialog.getFiles()) {
|
||||
|
||||
String file_path = f.getParentFile().getAbsolutePath().replace(base_path, "");
|
||||
@ -313,8 +338,12 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
|
||||
} else {
|
||||
|
||||
res = ma.createDirInsideAnotherSharedDir(d, current_node.getNode_id(), ma.genFolderKey(), i32a2bin(ma.getMaster_key()), parent_node, share_key);
|
||||
if (folder_share) {
|
||||
res = ma.createDirInsideAnotherSharedDir(d, current_node.getNode_id(), ma.genFolderKey(), i32a2bin(ma.getMaster_key()), parent_node, share_key);
|
||||
} else {
|
||||
res = ma.createDir(d, current_node.getNode_id(), ma.genFolderKey(), i32a2bin(ma.getMaster_key()));
|
||||
|
||||
}
|
||||
file_parent = (String) ((Map) ((List) res.get("f")).get(0)).get("h");
|
||||
|
||||
current_node.getChildren().put(d, new MegaDirNode(file_parent));
|
||||
@ -754,6 +783,7 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
|
||||
jTabbedPane1.addTab("Uploads", new javax.swing.ImageIcon(getClass().getResource("/images/icons8-upload-to-ftp-30.png")), uploads_panel); // NOI18N
|
||||
|
||||
unfreeze_transferences_button.setBackground(new java.awt.Color(255, 255, 204));
|
||||
unfreeze_transferences_button.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
|
||||
unfreeze_transferences_button.setForeground(new java.awt.Color(0, 153, 255));
|
||||
unfreeze_transferences_button.setText("UNFREEZE WAITING TRANSFERENCES");
|
||||
@ -1458,7 +1488,7 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
|
||||
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);
|
||||
FileSplitterDialog dialog = new FileSplitterDialog(this, false);
|
||||
|
||||
dialog.setLocationRelativeTo(this);
|
||||
|
||||
@ -1468,7 +1498,7 @@ public final class MainPanelView extends javax.swing.JFrame {
|
||||
private void merge_file_menuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_merge_file_menuActionPerformed
|
||||
// TODO add your handling code here:
|
||||
|
||||
FileMergerDialog dialog = new FileMergerDialog(this, true);
|
||||
FileMergerDialog dialog = new FileMergerDialog(this, false);
|
||||
|
||||
dialog.setLocationRelativeTo(this);
|
||||
|
||||
|
@ -79,6 +79,11 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.sound.midi.InvalidMidiDataException;
|
||||
import javax.sound.midi.MidiSystem;
|
||||
import javax.sound.midi.MidiUnavailableException;
|
||||
import javax.sound.midi.Sequence;
|
||||
import javax.sound.midi.Sequencer;
|
||||
import javax.swing.AbstractButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JDialog;
|
||||
@ -445,6 +450,26 @@ public class MiscTools {
|
||||
}
|
||||
}
|
||||
|
||||
public static Sequencer midiLoopPlay(String midi) {
|
||||
try {
|
||||
Sequencer sequencer = MidiSystem.getSequencer(); // Get the default Sequencer
|
||||
if (sequencer == null) {
|
||||
System.err.println("Sequencer device not supported");
|
||||
return null;
|
||||
}
|
||||
sequencer.open(); // Open device
|
||||
// Create sequence, the File must contain MIDI file data.
|
||||
Sequence sequence = MidiSystem.getSequence(MiscTools.class.getResource(midi));
|
||||
sequencer.setSequence(sequence); // load it into sequencer
|
||||
sequencer.setLoopCount(Sequencer.LOOP_CONTINUOUSLY);
|
||||
sequencer.start(); // start the playback
|
||||
return sequencer;
|
||||
} catch (MidiUnavailableException | InvalidMidiDataException | IOException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void updateTitledBorderFont(final TitledBorder border, final Font font, final float zoom_factor) {
|
||||
|
||||
Font old_title_font = border.getTitleFont();
|
||||
|
@ -33,7 +33,7 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="panel_tabs" pref="0" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="status" pref="809" max="32767" attributes="0"/>
|
||||
<Component id="status" pref="846" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="save_button" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
@ -48,7 +48,7 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="panel_tabs" pref="600" max="32767" attributes="0"/>
|
||||
<Component id="panel_tabs" pref="702" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
@ -566,34 +566,31 @@
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="rec_upload_slots_label" alignment="0" pref="1185" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
|
||||
<Component id="max_up_speed_label" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="max_up_speed_spinner" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="limit_upload_speed_checkbox" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="default_slots_up_label" max="32767" attributes="0"/>
|
||||
<Component id="max_uploads_label" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="default_slots_up_spinner" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="max_uploads_spinner" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Component id="thumbnail_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="upload_log_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
|
||||
<Component id="max_up_speed_label" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="max_up_speed_spinner" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="limit_upload_speed_checkbox" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="default_slots_up_label" max="32767" attributes="0"/>
|
||||
<Component id="max_uploads_label" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="default_slots_up_spinner" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="max_uploads_spinner" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Component id="thumbnail_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="upload_log_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="upload_public_folder_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="rec_upload_slots_label" alignment="0" min="-2" pref="1003" max="-2" attributes="0"/>
|
||||
<Component id="public_folder_panel" alignment="0" min="-2" pref="1086" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace pref="29" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -623,6 +620,10 @@
|
||||
<Component id="thumbnail_checkbox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="upload_log_checkbox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="upload_public_folder_checkbox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="public_folder_panel" min="-2" pref="265" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
@ -718,6 +719,44 @@
|
||||
<Property name="doubleBuffered" type="boolean" value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="upload_public_folder_checkbox">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Dialog" size="18" style="1"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="CREATE UPLOAD FOLDER PUBLIC LINK"/>
|
||||
<Property name="doubleBuffered" type="boolean" value="true"/>
|
||||
<Property name="opaque" type="boolean" value="true"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="upload_public_folder_checkboxActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="public_folder_panel">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextArea" name="public_folder_warning">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="33" green="ff" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="columns" type="int" value="20"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Noto Sans" size="18" style="1"/>
|
||||
</Property>
|
||||
<Property name="lineWrap" type="boolean" value="true"/>
|
||||
<Property name="rows" type="int" value="5"/>
|
||||
<Property name="text" type="java.lang.String" value="THIS OPTION IS NOT RECOMMENDED. Using this will cause MegaBasterd uploaded folder to appear in your account as NOT DECRYPTABLE. 

At the time of writing there is a method to FIX IT:

1) Move "MEGABASTERD" FOLDER (first "child" folder of the upload folder) to the ROOT (cloud) folder of your account. 

2) Then go to account settings and RELOAD ACCOUNT. 

I don't know how long this method will last. USE THIS OPTION AT YOUR OWN RISK."/>
|
||||
<Property name="wrapStyleWord" type="boolean" value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
@ -777,7 +816,7 @@
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jLabel1" alignment="0" pref="1072" max="32767" attributes="0"/>
|
||||
<Component id="jLabel1" alignment="0" pref="1109" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
@ -797,7 +836,7 @@
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="mega_accounts_scrollpane" pref="154" max="32767" attributes="0"/>
|
||||
<Component id="mega_accounts_scrollpane" pref="205" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="remove_mega_account_button" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
@ -807,7 +846,7 @@
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="elc_accounts_label" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="elc_accounts_scrollpane" pref="154" max="32767" attributes="0"/>
|
||||
<Component id="elc_accounts_scrollpane" pref="205" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="remove_elc_account_button" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
@ -1063,7 +1102,6 @@
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="mega_api_key_panel" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
@ -1148,10 +1186,8 @@
|
||||
<Component id="custom_chunks_dir_checkbox" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="custom_chunks_dir_button" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="custom_chunks_dir_current_label" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="mega_api_key_panel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="start_frozen_checkbox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
@ -1580,83 +1616,6 @@
|
||||
<Property name="text" type="java.lang.String" value="Save debug info to file"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="mega_api_key_panel">
|
||||
<Properties>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="mega_api_key_warning" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="mega_api_key_label" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="mega_api_key" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="mega_api_key_label" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="mega_api_key" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="mega_api_key_warning" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="mega_api_key_label">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Dialog" size="18" style="1"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="MEGA API KEY:"/>
|
||||
<Property name="doubleBuffered" type="boolean" value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="mega_api_key">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Dialog" size="18" style="0"/>
|
||||
</Property>
|
||||
<Property name="doubleBuffered" type="boolean" value="true"/>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_CreateCodePost" type="java.lang.String" value="mega_api_key.addMouseListener(new ContextMenuMouseListener());"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="mega_api_key_warning">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Dialog" size="14" style="1"/>
|
||||
</Property>
|
||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="ff" green="0" red="0" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="text" type="java.lang.String" value="MEGA API KEY IS NO LONGER REQUIRED (DISABLED)"/>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Cursor de Mano"/>
|
||||
</Property>
|
||||
<Property name="doubleBuffered" type="boolean" value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
|
@ -12,7 +12,6 @@ package com.tonikelope.megabasterd;
|
||||
import static com.tonikelope.megabasterd.DBTools.*;
|
||||
import static com.tonikelope.megabasterd.MainPanel.*;
|
||||
import static com.tonikelope.megabasterd.MiscTools.*;
|
||||
import java.awt.Color;
|
||||
import java.awt.Dialog;
|
||||
import java.awt.Frame;
|
||||
import java.io.BufferedInputStream;
|
||||
@ -215,6 +214,20 @@ public class SettingsDialog extends javax.swing.JDialog {
|
||||
|
||||
upload_log_checkbox.setSelected(upload_log);
|
||||
|
||||
boolean upload_public_folder = Upload.UPLOAD_PUBLIC_FOLDER;
|
||||
|
||||
String upload_public_folder_string = DBTools.selectSettingValue("upload_public_folder");
|
||||
|
||||
if (upload_public_folder_string != null) {
|
||||
upload_public_folder = upload_public_folder_string.equals("yes");
|
||||
}
|
||||
|
||||
upload_public_folder_checkbox.setSelected(upload_public_folder);
|
||||
|
||||
upload_public_folder_checkbox.setBackground(upload_public_folder_checkbox.isSelected() ? java.awt.Color.RED : null);
|
||||
|
||||
this.public_folder_panel.setVisible(this.upload_public_folder_checkbox.isSelected());
|
||||
|
||||
clipboardspy_checkbox.setSelected(monitor_clipboard);
|
||||
|
||||
String default_download_dir = DBTools.selectSettingValue("default_down_dir");
|
||||
@ -661,22 +674,6 @@ public class SettingsDialog extends javax.swing.JDialog {
|
||||
custom_proxy_textarea.setText(custom_proxy_list);
|
||||
}
|
||||
|
||||
String mega_api_key_sql = DBTools.selectSettingValue("mega_api_key");
|
||||
|
||||
if (mega_api_key_sql != null && !"".equals(mega_api_key_sql)) {
|
||||
mega_api_key.setText(mega_api_key_sql);
|
||||
mega_api_key_panel.setBackground(new Color(153, 255, 153));
|
||||
mega_api_key_warning.setVisible(false);
|
||||
mega_api_key_label.setVisible(modal);
|
||||
MegaAPI.API_KEY = mega_api_key_sql.trim();
|
||||
} else {
|
||||
mega_api_key_panel.setBackground(Color.red);
|
||||
mega_api_key_warning.setForeground(Color.white);
|
||||
mega_api_key_label.setForeground(Color.WHITE);
|
||||
mega_api_key_warning.setVisible(true);
|
||||
MegaAPI.API_KEY = null;
|
||||
}
|
||||
|
||||
setPreferredSize(parent.getSize());
|
||||
|
||||
pack();
|
||||
@ -738,6 +735,9 @@ public class SettingsDialog extends javax.swing.JDialog {
|
||||
rec_upload_slots_label = new javax.swing.JLabel();
|
||||
thumbnail_checkbox = new javax.swing.JCheckBox();
|
||||
upload_log_checkbox = new javax.swing.JCheckBox();
|
||||
upload_public_folder_checkbox = new javax.swing.JCheckBox();
|
||||
public_folder_panel = new javax.swing.JScrollPane();
|
||||
public_folder_warning = new javax.swing.JTextArea();
|
||||
accounts_panel = new javax.swing.JPanel();
|
||||
mega_accounts_scrollpane = new javax.swing.JScrollPane();
|
||||
mega_accounts_table = new javax.swing.JTable();
|
||||
@ -787,11 +787,6 @@ public class SettingsDialog extends javax.swing.JDialog {
|
||||
run_command_textbox.addMouseListener(new ContextMenuMouseListener());
|
||||
run_command_test_button = new javax.swing.JButton();
|
||||
debug_file_checkbox = new javax.swing.JCheckBox();
|
||||
mega_api_key_panel = new javax.swing.JPanel();
|
||||
mega_api_key_label = new javax.swing.JLabel();
|
||||
mega_api_key = new javax.swing.JTextField();
|
||||
mega_api_key.addMouseListener(new ContextMenuMouseListener());
|
||||
mega_api_key_warning = new javax.swing.JLabel();
|
||||
status = new javax.swing.JLabel();
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||
@ -1109,6 +1104,26 @@ public class SettingsDialog extends javax.swing.JDialog {
|
||||
upload_log_checkbox.setText("Create upload logs");
|
||||
upload_log_checkbox.setDoubleBuffered(true);
|
||||
|
||||
upload_public_folder_checkbox.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N
|
||||
upload_public_folder_checkbox.setText("CREATE UPLOAD FOLDER PUBLIC LINK");
|
||||
upload_public_folder_checkbox.setDoubleBuffered(true);
|
||||
upload_public_folder_checkbox.setOpaque(true);
|
||||
upload_public_folder_checkbox.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
upload_public_folder_checkboxActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
public_folder_warning.setEditable(false);
|
||||
public_folder_warning.setBackground(new java.awt.Color(255, 255, 51));
|
||||
public_folder_warning.setColumns(20);
|
||||
public_folder_warning.setFont(new java.awt.Font("Noto Sans", 1, 18)); // NOI18N
|
||||
public_folder_warning.setLineWrap(true);
|
||||
public_folder_warning.setRows(5);
|
||||
public_folder_warning.setText("THIS OPTION IS NOT RECOMMENDED. Using this will cause MegaBasterd uploaded folder to appear in your account as NOT DECRYPTABLE. \n\nAt the time of writing there is a method to FIX IT:\n\n1) Move \"MEGABASTERD\" FOLDER (first \"child\" folder of the upload folder) to the ROOT (cloud) folder of your account. \n\n2) Then go to account settings and RELOAD ACCOUNT. \n\nI don't know how long this method will last. USE THIS OPTION AT YOUR OWN RISK.");
|
||||
public_folder_warning.setWrapStyleWord(true);
|
||||
public_folder_panel.setViewportView(public_folder_warning);
|
||||
|
||||
javax.swing.GroupLayout uploads_panelLayout = new javax.swing.GroupLayout(uploads_panel);
|
||||
uploads_panel.setLayout(uploads_panelLayout);
|
||||
uploads_panelLayout.setHorizontalGroup(
|
||||
@ -1116,27 +1131,26 @@ public class SettingsDialog extends javax.swing.JDialog {
|
||||
.addGroup(uploads_panelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(uploads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(rec_upload_slots_label, javax.swing.GroupLayout.DEFAULT_SIZE, 1185, Short.MAX_VALUE)
|
||||
.addGroup(uploads_panelLayout.createSequentialGroup()
|
||||
.addGap(20, 20, 20)
|
||||
.addComponent(max_up_speed_label)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(max_up_speed_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(limit_upload_speed_checkbox)
|
||||
.addGroup(uploads_panelLayout.createSequentialGroup()
|
||||
.addGroup(uploads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(default_slots_up_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(max_uploads_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(uploads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(uploads_panelLayout.createSequentialGroup()
|
||||
.addGap(20, 20, 20)
|
||||
.addComponent(max_up_speed_label)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(max_up_speed_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(limit_upload_speed_checkbox)
|
||||
.addGroup(uploads_panelLayout.createSequentialGroup()
|
||||
.addGroup(uploads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(default_slots_up_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(max_uploads_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(uploads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(default_slots_up_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(max_uploads_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addComponent(thumbnail_checkbox)
|
||||
.addComponent(upload_log_checkbox))
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
.addComponent(default_slots_up_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(max_uploads_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addComponent(thumbnail_checkbox)
|
||||
.addComponent(upload_log_checkbox)
|
||||
.addComponent(upload_public_folder_checkbox)
|
||||
.addComponent(rec_upload_slots_label, javax.swing.GroupLayout.PREFERRED_SIZE, 1003, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(public_folder_panel, javax.swing.GroupLayout.PREFERRED_SIZE, 1086, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(29, Short.MAX_VALUE))
|
||||
);
|
||||
uploads_panelLayout.setVerticalGroup(
|
||||
uploads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@ -1161,6 +1175,10 @@ public class SettingsDialog extends javax.swing.JDialog {
|
||||
.addComponent(thumbnail_checkbox)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(upload_log_checkbox)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(upload_public_folder_checkbox)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(public_folder_panel, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
@ -1339,7 +1357,7 @@ public class SettingsDialog extends javax.swing.JDialog {
|
||||
.addComponent(mega_accounts_label)
|
||||
.addComponent(elc_accounts_label))
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 1072, Short.MAX_VALUE))
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 1109, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
accounts_panelLayout.setVerticalGroup(
|
||||
@ -1355,7 +1373,7 @@ public 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, 154, Short.MAX_VALUE)
|
||||
.addComponent(mega_accounts_scrollpane, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(accounts_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(remove_mega_account_button)
|
||||
@ -1364,7 +1382,7 @@ public 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, 154, Short.MAX_VALUE)
|
||||
.addComponent(elc_accounts_scrollpane, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(accounts_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(remove_elc_account_button)
|
||||
@ -1599,49 +1617,6 @@ public class SettingsDialog extends javax.swing.JDialog {
|
||||
debug_file_checkbox.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N
|
||||
debug_file_checkbox.setText("Save debug info to file");
|
||||
|
||||
mega_api_key_panel.setOpaque(false);
|
||||
|
||||
mega_api_key_label.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N
|
||||
mega_api_key_label.setText("MEGA API KEY:");
|
||||
mega_api_key_label.setDoubleBuffered(true);
|
||||
|
||||
mega_api_key.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
|
||||
mega_api_key.setDoubleBuffered(true);
|
||||
mega_api_key.setEnabled(false);
|
||||
|
||||
mega_api_key_warning.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
|
||||
mega_api_key_warning.setForeground(new java.awt.Color(0, 0, 255));
|
||||
mega_api_key_warning.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
mega_api_key_warning.setText("MEGA API KEY IS NO LONGER REQUIRED (DISABLED)");
|
||||
mega_api_key_warning.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
|
||||
mega_api_key_warning.setDoubleBuffered(true);
|
||||
|
||||
javax.swing.GroupLayout mega_api_key_panelLayout = new javax.swing.GroupLayout(mega_api_key_panel);
|
||||
mega_api_key_panel.setLayout(mega_api_key_panelLayout);
|
||||
mega_api_key_panelLayout.setHorizontalGroup(
|
||||
mega_api_key_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(mega_api_key_panelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(mega_api_key_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(mega_api_key_warning, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(mega_api_key_panelLayout.createSequentialGroup()
|
||||
.addComponent(mega_api_key_label)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(mega_api_key)))
|
||||
.addContainerGap())
|
||||
);
|
||||
mega_api_key_panelLayout.setVerticalGroup(
|
||||
mega_api_key_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(mega_api_key_panelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(mega_api_key_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(mega_api_key_label)
|
||||
.addComponent(mega_api_key, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(mega_api_key_warning)
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout advanced_panelLayout = new javax.swing.GroupLayout(advanced_panel);
|
||||
advanced_panel.setLayout(advanced_panelLayout);
|
||||
advanced_panelLayout.setHorizontalGroup(
|
||||
@ -1649,7 +1624,6 @@ public class SettingsDialog extends javax.swing.JDialog {
|
||||
.addGroup(advanced_panelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(advanced_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(mega_api_key_panel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(advanced_panelLayout.createSequentialGroup()
|
||||
.addGroup(advanced_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(advanced_panelLayout.createSequentialGroup()
|
||||
@ -1715,10 +1689,8 @@ public class SettingsDialog extends javax.swing.JDialog {
|
||||
.addGroup(advanced_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(custom_chunks_dir_checkbox)
|
||||
.addComponent(custom_chunks_dir_button))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(custom_chunks_dir_current_label)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(mega_api_key_panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(start_frozen_checkbox)
|
||||
.addGap(18, 18, 18)
|
||||
@ -1752,7 +1724,7 @@ public class SettingsDialog extends javax.swing.JDialog {
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(panel_tabs, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(status, javax.swing.GroupLayout.DEFAULT_SIZE, 809, Short.MAX_VALUE)
|
||||
.addComponent(status, javax.swing.GroupLayout.DEFAULT_SIZE, 846, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(save_button)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
@ -1763,7 +1735,7 @@ public class SettingsDialog extends javax.swing.JDialog {
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(panel_tabs, javax.swing.GroupLayout.DEFAULT_SIZE, 600, Short.MAX_VALUE)
|
||||
.addComponent(panel_tabs, javax.swing.GroupLayout.DEFAULT_SIZE, 702, Short.MAX_VALUE)
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
@ -1838,10 +1810,10 @@ public class SettingsDialog extends javax.swing.JDialog {
|
||||
settings.put("custom_chunks_dir", _custom_chunks_dir);
|
||||
settings.put("run_command", run_command_checkbox.isSelected() ? "yes" : "no");
|
||||
settings.put("run_command_path", run_command_textbox.getText());
|
||||
settings.put("mega_api_key", mega_api_key.getText().trim());
|
||||
settings.put("clipboardspy", clipboardspy_checkbox.isSelected() ? "yes" : "no");
|
||||
settings.put("thumbnails", thumbnail_checkbox.isSelected() ? "yes" : "no");
|
||||
settings.put("upload_log", upload_log_checkbox.isSelected() ? "yes" : "no");
|
||||
settings.put("upload_public_folder", upload_public_folder_checkbox.isSelected() ? "yes" : "no");
|
||||
|
||||
if (custom_proxy_textarea.getText().trim().length() == 0) {
|
||||
smart_proxy_checkbox.setSelected(false);
|
||||
@ -3116,6 +3088,19 @@ public class SettingsDialog extends javax.swing.JDialog {
|
||||
}
|
||||
}//GEN-LAST:event_import_mega_buttonActionPerformed
|
||||
|
||||
private void upload_public_folder_checkboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_upload_public_folder_checkboxActionPerformed
|
||||
// TODO add your handling code here:
|
||||
if (this.upload_public_folder_checkbox.isSelected()) {
|
||||
JOptionPane.showMessageDialog(this, LabelTranslatorSingleton.getInstance().translate("Using this option may irreversibly corrupt your uploads.\n\nUSE IT AT YOUR OWN RISK"), LabelTranslatorSingleton.getInstance().translate("WARNING"), JOptionPane.WARNING_MESSAGE);
|
||||
|
||||
}
|
||||
|
||||
this.upload_public_folder_checkbox.setBackground(this.upload_public_folder_checkbox.isSelected() ? java.awt.Color.RED : null);
|
||||
|
||||
this.public_folder_panel.setVisible(this.upload_public_folder_checkbox.isSelected());
|
||||
|
||||
}//GEN-LAST:event_upload_public_folder_checkboxActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JPanel accounts_panel;
|
||||
private javax.swing.JButton add_elc_account_button;
|
||||
@ -3168,10 +3153,6 @@ public class SettingsDialog extends javax.swing.JDialog {
|
||||
private javax.swing.JLabel mega_accounts_label;
|
||||
private javax.swing.JScrollPane mega_accounts_scrollpane;
|
||||
private javax.swing.JTable mega_accounts_table;
|
||||
private javax.swing.JTextField mega_api_key;
|
||||
private javax.swing.JLabel mega_api_key_label;
|
||||
private javax.swing.JPanel mega_api_key_panel;
|
||||
private javax.swing.JLabel mega_api_key_warning;
|
||||
private javax.swing.JCheckBox megacrypter_reverse_checkbox;
|
||||
private javax.swing.JLabel megacrypter_reverse_port_label;
|
||||
private javax.swing.JSpinner megacrypter_reverse_port_spinner;
|
||||
@ -3189,6 +3170,8 @@ public class SettingsDialog extends javax.swing.JDialog {
|
||||
private javax.swing.JLabel proxy_user_label;
|
||||
private javax.swing.JTextField proxy_user_textfield;
|
||||
private javax.swing.JLabel proxy_warning_label;
|
||||
private javax.swing.JScrollPane public_folder_panel;
|
||||
private javax.swing.JTextArea public_folder_warning;
|
||||
private javax.swing.JLabel rec_download_slots_label;
|
||||
private javax.swing.JLabel rec_smart_proxy_label;
|
||||
private javax.swing.JLabel rec_smart_proxy_label1;
|
||||
@ -3206,6 +3189,7 @@ public class SettingsDialog extends javax.swing.JDialog {
|
||||
private javax.swing.JCheckBox thumbnail_checkbox;
|
||||
private javax.swing.JButton unlock_accounts_button;
|
||||
private javax.swing.JCheckBox upload_log_checkbox;
|
||||
private javax.swing.JCheckBox upload_public_folder_checkbox;
|
||||
private javax.swing.JPanel uploads_panel;
|
||||
private javax.swing.JScrollPane uploads_scrollpane;
|
||||
private javax.swing.JCheckBox use_mega_account_down_checkbox;
|
||||
|
@ -40,7 +40,8 @@ public class Upload implements Transference, Runnable, SecureSingleThreadNotifia
|
||||
|
||||
public static final int WORKERS_DEFAULT = 6;
|
||||
public static final boolean DEFAULT_THUMBNAILS = true;
|
||||
public static final boolean UPLOAD_LOG = false;
|
||||
public static final boolean UPLOAD_LOG = true;
|
||||
public static final boolean UPLOAD_PUBLIC_FOLDER = false;
|
||||
private static final Logger LOG = Logger.getLogger(Upload.class.getName());
|
||||
private final MainPanel _main_panel;
|
||||
private volatile UploadView _view;
|
||||
|
@ -141,6 +141,11 @@ public class UploadView extends javax.swing.JPanel implements TransferenceView {
|
||||
c.setVisible(false);
|
||||
}
|
||||
|
||||
if (upload.getFolder_link() == null) {
|
||||
folder_link_button.setVisible(false);
|
||||
open_browser_button.setVisible(false);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 209 KiB |
BIN
src/main/resources/midis/a-team.mid
Normal file
BIN
src/main/resources/midis/a-team.mid
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user