Skip to content

Commit

Permalink
2.35b
Browse files Browse the repository at this point in the history
  • Loading branch information
tonikelope committed Nov 29, 2017
1 parent b088897 commit 89d70cb
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 31 deletions.
5 changes: 1 addition & 4 deletions src/megabasterd/MainPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ public final class MainPanel {
public static final int WATCHDOG_PORT = 1338;
public static final int DEFAULT_MEGA_PROXY_PORT = 9999;
public static final String DEFAULT_USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0";
public static final String ICON_FILE = "mbasterd_mini.png";
public static final String ICON_FILE_MED = "mbasterd_med.png";
public static final String ICON_FILE = "mbasterd_med.png";
public static final ExecutorService THREAD_POOL = newCachedThreadPool();
private static String _proxy_host;
private static int _proxy_port;
Expand Down Expand Up @@ -818,13 +817,11 @@ public void actionPerformed(ActionEvent e) {

if (!(boolean) swingReflectionInvokeAndWaitForReturn("isVisible", getView())) {
swingReflectionInvoke("setExtendedState", getView(), NORMAL);

swingReflectionInvoke("setVisible", getView(), true);
} else {
swingReflectionInvoke("dispatchEvent", getView(), new WindowEvent(getView(), WINDOW_CLOSING));
}
}

};

_trayicon = new TrayIcon(getDefaultToolkit().getImage(getClass().getResource(ICON_FILE)), "MegaBasterd", menu);
Expand Down
2 changes: 1 addition & 1 deletion src/megabasterd/MainPanelView.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public MainPanelView(MainPanel main_panel) {

setTitle("MegaBasterd " + VERSION);

setIconImage(new ImageIcon(getClass().getResource(ICON_FILE_MED)).getImage());
setIconImage(new ImageIcon(getClass().getResource(ICON_FILE)).getImage());

swingReflectionInvoke("setVisible", global_speed_down_label, false);
swingReflectionInvoke("setVisible", global_speed_up_label, false);
Expand Down
25 changes: 11 additions & 14 deletions src/megabasterd/SettingsDialog.form
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="cancel_button" min="-2" pref="130" max="-2" attributes="0"/>
</Group>
<Component id="jTabbedPane1" max="32767" attributes="0"/>
<Component id="jTabbedPane1" pref="1076" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
Expand Down Expand Up @@ -105,7 +105,7 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jScrollPane2" max="32767" attributes="0"/>
<Component id="jScrollPane2" pref="1047" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
Expand All @@ -114,7 +114,7 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jScrollPane2" pref="664" max="32767" attributes="0"/>
<Component id="jScrollPane2" pref="536" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
Expand Down Expand Up @@ -192,7 +192,7 @@
<Component id="megacrypter_reverse_warning_label" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="0" pref="542" max="32767" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Component id="jSeparator2" alignment="0" max="32767" attributes="0"/>
<Component id="jSeparator3" alignment="0" max="32767" attributes="0"/>
Expand Down Expand Up @@ -570,7 +570,7 @@
</Group>
<Component id="limit_upload_speed_checkbox" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="686" max="32767" attributes="0"/>
<EmptySpace min="0" pref="410" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
Expand Down Expand Up @@ -605,7 +605,7 @@
<Component id="max_up_speed_label" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="max_up_speed_spinner" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="462" max="32767" attributes="0"/>
<EmptySpace pref="334" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -761,7 +761,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="227" max="32767" attributes="0"/>
<Component id="mega_accounts_scrollpane" pref="162" 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"/>
Expand All @@ -770,7 +770,7 @@
<EmptySpace max="32767" attributes="0"/>
<Component id="elc_accounts_label" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="elc_accounts_scrollpane" pref="226" max="32767" attributes="0"/>
<Component id="elc_accounts_scrollpane" pref="161" 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"/>
Expand Down Expand Up @@ -891,9 +891,6 @@
<Container class="javax.swing.JScrollPane" name="elc_accounts_scrollpane">
<Properties>
<Property name="doubleBuffered" type="boolean" value="true"/>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Dialog" size="12" style="0"/>
</Property>
</Properties>

<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
Expand Down Expand Up @@ -983,7 +980,7 @@
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="proxy_panel" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="479" max="32767" attributes="0"/>
<EmptySpace pref="351" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -1021,7 +1018,7 @@
<Component id="proxy_port_label" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="proxy_port_textfield" min="-2" pref="90" max="-2" attributes="0"/>
<EmptySpace min="0" pref="686" max="32767" attributes="0"/>
<EmptySpace min="0" pref="463" max="32767" attributes="0"/>
</Group>
<Component id="proxy_auth_panel" alignment="0" max="32767" attributes="0"/>
</Group>
Expand Down Expand Up @@ -1138,7 +1135,7 @@
<EmptySpace max="-2" attributes="0"/>
<Component id="proxy_pass_label" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="proxy_pass_textfield" pref="683" max="32767" attributes="0"/>
<Component id="proxy_pass_textfield" pref="699" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
Expand Down
26 changes: 14 additions & 12 deletions src/megabasterd/SettingsDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public boolean isRemember_master_pass() {
public SettingsDialog(javax.swing.JFrame parent, boolean modal) {
super(parent, modal);
initComponents();

swingReflectionInvoke("setUnitIncrement", this.jScrollPane2.getVerticalScrollBar(), 20);
swingReflectionInvoke("setUnitIncrement", this.jScrollPane2.getHorizontalScrollBar(), 20);

_main_panel = ((MainPanelView) parent).getMain_panel();

Expand Down Expand Up @@ -744,7 +747,7 @@ public void stateChanged(javax.swing.event.ChangeEvent evt) {
.addComponent(megacrypter_reverse_port_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(megacrypter_reverse_warning_label)))
.addGap(0, 542, Short.MAX_VALUE))
.addGap(0, 0, Short.MAX_VALUE))
.addComponent(jSeparator2)
.addComponent(jSeparator3)
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
Expand Down Expand Up @@ -832,14 +835,14 @@ public void stateChanged(javax.swing.event.ChangeEvent evt) {
downloads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(downloads_panelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane2)
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 1047, Short.MAX_VALUE)
.addContainerGap())
);
downloads_panelLayout.setVerticalGroup(
downloads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(downloads_panelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 664, Short.MAX_VALUE)
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 536, Short.MAX_VALUE)
.addContainerGap())
);

Expand Down Expand Up @@ -914,7 +917,7 @@ public void stateChanged(javax.swing.event.ChangeEvent evt) {
.addGap(98, 98, 98)
.addComponent(max_up_speed_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(limit_upload_speed_checkbox))
.addGap(0, 686, Short.MAX_VALUE)))
.addGap(0, 410, Short.MAX_VALUE)))
.addContainerGap())
);
uploads_panelLayout.setVerticalGroup(
Expand Down Expand Up @@ -942,7 +945,7 @@ public void stateChanged(javax.swing.event.ChangeEvent evt) {
.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(462, Short.MAX_VALUE))
.addContainerGap(334, Short.MAX_VALUE))
);

jTabbedPane1.addTab("Uploads", uploads_panel);
Expand Down Expand Up @@ -1021,7 +1024,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
});

elc_accounts_scrollpane.setDoubleBuffered(true);
elc_accounts_scrollpane.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N

elc_accounts_table.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
elc_accounts_table.setModel(new javax.swing.table.DefaultTableModel(
Expand Down Expand Up @@ -1113,15 +1115,15 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(mega_accounts_scrollpane, javax.swing.GroupLayout.DEFAULT_SIZE, 227, Short.MAX_VALUE)
.addComponent(mega_accounts_scrollpane, javax.swing.GroupLayout.DEFAULT_SIZE, 162, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(accounts_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(remove_mega_account_button)
.addComponent(add_mega_account_button))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(elc_accounts_label)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(elc_accounts_scrollpane, javax.swing.GroupLayout.DEFAULT_SIZE, 226, Short.MAX_VALUE)
.addComponent(elc_accounts_scrollpane, javax.swing.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(accounts_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(remove_elc_account_button)
Expand Down Expand Up @@ -1199,7 +1201,7 @@ public void stateChanged(javax.swing.event.ChangeEvent evt) {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(proxy_pass_label)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(proxy_pass_textfield, javax.swing.GroupLayout.DEFAULT_SIZE, 683, Short.MAX_VALUE)
.addComponent(proxy_pass_textfield, javax.swing.GroupLayout.DEFAULT_SIZE, 699, Short.MAX_VALUE)
.addContainerGap())
);
proxy_auth_panelLayout.setVerticalGroup(
Expand Down Expand Up @@ -1235,7 +1237,7 @@ public void stateChanged(javax.swing.event.ChangeEvent evt) {
.addComponent(proxy_port_label)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(proxy_port_textfield, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 686, Short.MAX_VALUE))
.addGap(0, 463, Short.MAX_VALUE))
.addComponent(proxy_auth_panel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())))
);
Expand Down Expand Up @@ -1271,7 +1273,7 @@ public void stateChanged(javax.swing.event.ChangeEvent evt) {
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(proxy_panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(479, Short.MAX_VALUE))
.addContainerGap(351, Short.MAX_VALUE))
);

jTabbedPane1.addTab("Advanced", jPanel1);
Expand All @@ -1292,7 +1294,7 @@ public void stateChanged(javax.swing.event.ChangeEvent evt) {
.addComponent(ok_button, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(cancel_button, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jTabbedPane1))
.addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1076, Short.MAX_VALUE))
.addContainerGap())
);
layout.setVerticalGroup(
Expand Down

0 comments on commit 89d70cb

Please sign in to comment.