Package: mauve-aligner / 2.4.0+4736-3

use_JConsole_of_zeus-jscl_properly.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
From: Markus Koschany <apo@gambaru.de>
Date: Sun, 26 Apr 2015 15:22:19 +0200
Subject: Adapt to latest libzeus-jscl-java version
 For a detailed explanation see the debian-java mailing list archive
 https://lists.debian.org/debian-java/2015/04/msg00106.html

--- a/src/org/gel/mauve/MyConsole.java
+++ b/src/org/gel/mauve/MyConsole.java
@@ -10,18 +10,20 @@ import java.io.PrintStream;
 public class MyConsole {
 	private static boolean useSwing = false;
 
-	private static JConsole console;
+	private static JConsole console = new JConsole();
 
 	public static void setUseSwing (boolean b) {
 		if (b && !useSwing) {
-			console = JConsole.getConsole ();
 			console.setTitle ("Mauve Console");
 			console.setSize (400, 400);
 			Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
 			console.setLocation(dim.width-400, 0);
-			console.startConsole ();
+			JConsole.getConsole().startConsole ();
+			if (!console.isVisible()) {
+				console.setVisible(true);
+			}
 		} else if (!b && useSwing) {
-			console.stopConsole ();
+			JConsole.getConsole().stopConsole ();
 			console = null;
 		}
 
@@ -30,13 +32,13 @@ public class MyConsole {
 
 	public static void showConsole () {
 		if (useSwing) {
-			console.showConsole ();
+			JConsole.getConsole().showConsole ();
 		}
 	}
 
 	public static PrintStream err () {
 		if (useSwing) {
-			console.showConsole ();
+			JConsole.getConsole().showConsole ();
 		}
 		return System.err;
 	}
@@ -44,4 +46,4 @@ public class MyConsole {
 	public static PrintStream out () {
 		return System.out;
 	}
-}
\ No newline at end of file
+}
--- a/src/org/gel/mauve/gui/MauveFrame.java
+++ b/src/org/gel/mauve/gui/MauveFrame.java
@@ -497,8 +497,7 @@ public class MauveFrame extends JFrame implements ActionListener, ModelProgressL
             }
             if (source == jMenuHelpConsole || ae.getActionCommand().equals("Console"))
             {
-            	JConsole console = JConsole.getConsole();
-            	console.showConsole();
+            	JConsole.getConsole().showConsole();
             }
             if (source == jMenuHelpClearCache || ae.getActionCommand().equals("ClearCache"))
             {