diff --git a/dist/karaok-AI.jar b/dist/karaok-AI.jar index 6365148..7f16ade 100644 Binary files a/dist/karaok-AI.jar and b/dist/karaok-AI.jar differ diff --git a/src/com/cubaix/kaiDJ/CategoryManager.java b/src/com/cubaix/kaiDJ/CategoryManager.java index c2ef4ed..0edb31c 100755 --- a/src/com/cubaix/kaiDJ/CategoryManager.java +++ b/src/com/cubaix/kaiDJ/CategoryManager.java @@ -26,7 +26,7 @@ public class CategoryManager extends Composite { // Text categoryT; String currentCategory = ""; public CategoryManager(KaiDJ aParentJDJ,Composite parent, int style) { - super(parent, style | SWT.NO_BACKGROUND); + super(parent, style); parentJDJ = aParentJDJ; String os = System.getProperty("os.name"); diff --git a/src/com/cubaix/kaiDJ/KaiDJ.java b/src/com/cubaix/kaiDJ/KaiDJ.java index b8a2cf2..76ddc90 100755 --- a/src/com/cubaix/kaiDJ/KaiDJ.java +++ b/src/com/cubaix/kaiDJ/KaiDJ.java @@ -45,8 +45,8 @@ // Main class, for all in JDJ public class KaiDJ { - static final public String _VERSION = "0.5.0"; - public static final boolean _DEBUG_PAINT = true; + static final public String _VERSION = "0.5.1"; + public static final boolean _DEBUG_PAINT = false; public static String kaiDir = System.getProperty("user.home")+File.separatorChar+"karaok-AI"; static { @@ -54,7 +54,7 @@ public class KaiDJ { new File(kaiDir).mkdirs(); } } - String configPath = kaiDir+"/config.xml"; + String configPath = kaiDir+File.separatorChar+"config.xml"; String currentPLPath = System.getProperty("user.home"); public Display display = null; @@ -237,7 +237,7 @@ public void setMsg(final String aMsg) { void createInterface() { // final jDJ aThis = this; display = new Display(); - shell = new Shell(display, SWT.SHELL_TRIM | SWT.NO_BACKGROUND); + shell = new Shell(display, SWT.SHELL_TRIM); shell.open(); mainGC = new GC(shell); shell.addPaintListener(new PaintListener() { @@ -319,7 +319,7 @@ public void paintControl(PaintEvent arg0) { aCentralC.setLayout(gridLayout); // Search panel - searchPanel = new Composite(aCentralC, SWT.NO_BACKGROUND); + searchPanel = new Composite(aCentralC, SWT.NONE); aGD = new GridData(GridData.FILL_BOTH); searchPanel.setLayoutData(aGD); GridLayout aGL = new GridLayout(); @@ -972,7 +972,7 @@ public void run() { System.out.println("Db cleaned in : " + Player.formatTimeMs(new Date().getTime() - aTime)); // Try to load last pl aTime = new Date().getTime(); - managerPlay.load(kaiDir+"/last.jdj", true); + managerPlay.load(kaiDir+File.separatorChar+"last.jdj", true); managerPlay.pl.listTC.needRedraw(); System.out.println("Last PL loaded in : " + Player.formatTimeMs(new Date().getTime() - aTime)); // Start analyzer diff --git a/src/com/cubaix/kaiDJ/LogoPanel.java b/src/com/cubaix/kaiDJ/LogoPanel.java index 313d422..73c6b3f 100755 --- a/src/com/cubaix/kaiDJ/LogoPanel.java +++ b/src/com/cubaix/kaiDJ/LogoPanel.java @@ -3,6 +3,7 @@ import java.io.InputStream; import java.util.StringTokenizer; +import org.eclipse.swt.SWT; import org.eclipse.swt.events.PaintEvent; import org.eclipse.swt.events.PaintListener; import org.eclipse.swt.graphics.GC; @@ -33,7 +34,7 @@ public void paintControl(PaintEvent aPE) { GC aPlGC = new GC(aThis); paintDbl(aPlGC); aPlGC.dispose(); -// needRedraw(); + needRedraw(); } }); @@ -61,6 +62,7 @@ protected void paintTimed() { if(KaiDJ._DEBUG_PAINT) { System.out.println("LOGOPANEL.paintTimed()"); } +// if(true) return; if (panelBck == null) { loadImg(); } diff --git a/src/com/cubaix/kaiDJ/PlayList.java b/src/com/cubaix/kaiDJ/PlayList.java index 451b729..8c2b2b3 100755 --- a/src/com/cubaix/kaiDJ/PlayList.java +++ b/src/com/cubaix/kaiDJ/PlayList.java @@ -82,7 +82,7 @@ public class PlayList extends Composite { * @param aPosH */ PlayList(KaiDJ aParentKDJ, Composite parent, int style) { - super(parent, style | SWT.NO_BACKGROUND | SWT.TRANSPARENT); + super(parent, style); parentKDJ = aParentKDJ; ddddNF = NumberFormat.getInstance(); @@ -267,7 +267,7 @@ public void paintControl(PaintEvent aPE) { GC aPlGC = new GC(listTC); paintDbl(aPlGC); aPlGC.dispose(); -// listTC.needRedraw(); + listTC.needRedraw(); } }); listTC.addKeyListener(new KeyListener() { diff --git a/src/com/cubaix/kaiDJ/Player.java b/src/com/cubaix/kaiDJ/Player.java index 15cfa87..b1af080 100755 --- a/src/com/cubaix/kaiDJ/Player.java +++ b/src/com/cubaix/kaiDJ/Player.java @@ -103,7 +103,7 @@ public class Player extends TimedCanvas implements BasicPlayerListener, KJDigita * @param style */ public Player(KaiDJ aParentJDJ, Composite parent, int style, int aDest) { - super(aParentJDJ, parent, style | SWT.NO_BACKGROUND); + super(aParentJDJ, parent, style); //EM 12/11/2008 : refresh more often for the vumeter refreshRate = 50; @@ -113,7 +113,7 @@ public void paintControl(PaintEvent aPE) { playerBounds = getClientArea(); // playerGC = aPE.gc; paintDbl(aPE.gc); -// needRedraw(); + needRedraw(); } }); // playerGC = new GC(this); @@ -174,7 +174,7 @@ public void load(String filename) { //EM 29/04/2009 : provide with parentJDJ player = new BasicPlayer(parentKDJ); //EM 01/11/2008 : try to get the same buffer size on each - player.setLineBufferSize(65535); + player.setLineBufferSize(-1);//65535); setDestCard(destCard); // BasicPlayer is a BasicController. diff --git a/src/com/cubaix/kaiDJ/db/Db.java b/src/com/cubaix/kaiDJ/db/Db.java index 978aa87..628d2bc 100755 --- a/src/com/cubaix/kaiDJ/db/Db.java +++ b/src/com/cubaix/kaiDJ/db/Db.java @@ -13,7 +13,7 @@ public class Db { KaiDJ parentJDJ; - static public String mp3DbPath = KaiDJ.kaiDir+"/MP3_v3.hdb"; + static public String mp3DbPath = KaiDJ.kaiDir+File.separatorChar+"MP3_v3.hdb"; String embeddedUrl = "jdbc:hsqldb:file"; String databaseURL = embeddedUrl + ":" + mp3DbPath; String user = "sa"; diff --git a/src/com/cubaix/kaiDJ/swt/TimedCanvas.java b/src/com/cubaix/kaiDJ/swt/TimedCanvas.java index b248dc3..1d7e0ff 100755 --- a/src/com/cubaix/kaiDJ/swt/TimedCanvas.java +++ b/src/com/cubaix/kaiDJ/swt/TimedCanvas.java @@ -22,7 +22,7 @@ public class TimedCanvas extends Canvas { protected int refreshRate = 100; public TimedCanvas(KaiDJ aParentKDJ, Composite parent, int style) { - super(parent, style | SWT.NO_BACKGROUND | SWT.TRANSPARENT); + super(parent, style); parentKDJ = aParentKDJ; this.addMouseTrackListener(new MouseTrackListener() { public void mouseEnter(MouseEvent arg0) {