Skip to content

Commit

Permalink
Bug Fix: Removed outbid auto-update due to impact on ESI
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenGnu committed Oct 18, 2023
1 parent 6b5a6a5 commit 4495436
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 271 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,25 @@
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import javax.swing.*;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.ParallelGroup;
import javax.swing.GroupLayout.SequentialGroup;
import javax.swing.text.BadLocationException;
import javax.swing.text.StyledDocument;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.JScrollPane;
import javax.swing.JTextPane;
import javax.swing.SwingUtilities;
import javax.swing.WindowConstants;
import net.nikr.eve.jeveasset.Program;
import net.nikr.eve.jeveasset.data.settings.Colors;
import net.nikr.eve.jeveasset.gui.frame.StatusPanel;
import net.nikr.eve.jeveasset.gui.frame.StatusPanel.Progress;
import net.nikr.eve.jeveasset.gui.frame.StatusPanel.UpdateType;
import net.nikr.eve.jeveasset.gui.shared.Formatter;
import net.nikr.eve.jeveasset.gui.shared.components.JLockWindow;
import net.nikr.eve.jeveasset.gui.shared.components.JLockWindow.LockWorkerAdaptor;
import net.nikr.eve.jeveasset.i18n.DialoguesUpdate;
Expand Down Expand Up @@ -291,10 +297,6 @@ public void task() {
public void gui() {
jOK.setEnabled(true);
jMinimize.setEnabled(false); //Should not minimize after completed
if (completed instanceof TasksCompletedAdvanced) {
StyledDocument doc = ((TasksCompletedAdvanced) completed).getStyledDocument();
updateErrorDocument(doc);
}
}
@Override
public void hidden() {
Expand All @@ -313,10 +315,6 @@ public void task() {
@Override
public void gui() {
setVisible(false);
if (completed instanceof TasksCompletedAdvanced) {
StyledDocument doc = ((TasksCompletedAdvanced) completed).getStyledDocument();
updateErrorDocument(doc);
}
}
@Override
public void hidden() {
Expand All @@ -328,26 +326,6 @@ public void hidden() {
}
}

private void updateErrorDocument(StyledDocument doc) {
if (doc == null) {
return;
}
int length = doc.getLength();
for (UpdateTask task : updateTasks) {
task.insertLog(doc);
}
if (doc.getLength() > length) { //If changed
try {
doc.insertString(length, Formatter.columnDate(new Date()) + "\n\r", null);
if (length > 0) {
doc.insertString(length, "\n\r", null);
}
} catch (BadLocationException ex) {
//Shouldn't be possible....
}
}
}

private Window getTopWindow(Window in) {
for (Window window : in.getOwnedWindows()) {
if (window.isVisible()) {
Expand Down Expand Up @@ -558,6 +536,5 @@ public static interface TasksCompleted {

public static interface TasksCompletedAdvanced extends TasksCompleted {
public void tasksHidden(TaskDialog taskDialog);
public StyledDocument getStyledDocument();
}
}

This file was deleted.

Loading

0 comments on commit 4495436

Please sign in to comment.