diff --git a/src/megabasterd/MainPanel.java b/src/megabasterd/MainPanel.java index 26ee80ca8..d845fed25 100644 --- a/src/megabasterd/MainPanel.java +++ b/src/megabasterd/MainPanel.java @@ -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; @@ -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); diff --git a/src/megabasterd/MainPanelView.java b/src/megabasterd/MainPanelView.java index b460af3da..3b3500907 100644 --- a/src/megabasterd/MainPanelView.java +++ b/src/megabasterd/MainPanelView.java @@ -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); diff --git a/src/megabasterd/SettingsDialog.form b/src/megabasterd/SettingsDialog.form index 28139a1cd..c73eeed3d 100644 --- a/src/megabasterd/SettingsDialog.form +++ b/src/megabasterd/SettingsDialog.form @@ -34,7 +34,7 @@ - + @@ -105,7 +105,7 @@ - + @@ -114,7 +114,7 @@ - + @@ -192,7 +192,7 @@ - + @@ -570,7 +570,7 @@ - + @@ -605,7 +605,7 @@ - + @@ -761,7 +761,7 @@ - + @@ -770,7 +770,7 @@ - + @@ -891,9 +891,6 @@ - - - @@ -983,7 +980,7 @@ - + @@ -1021,7 +1018,7 @@ - + @@ -1138,7 +1135,7 @@ - + diff --git a/src/megabasterd/SettingsDialog.java b/src/megabasterd/SettingsDialog.java index fbecbbf44..fa931e986 100644 --- a/src/megabasterd/SettingsDialog.java +++ b/src/megabasterd/SettingsDialog.java @@ -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(); @@ -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) @@ -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()) ); @@ -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( @@ -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); @@ -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( @@ -1113,7 +1115,7 @@ 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) @@ -1121,7 +1123,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .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) @@ -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( @@ -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()))) ); @@ -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); @@ -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(