Skip to content

Commit

Permalink
Windows debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Win10 authored and Win10 committed Mar 9, 2023
1 parent 8c99d87 commit b4f8e72
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 15 deletions.
Binary file modified dist/karaok-AI.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/com/cubaix/kaiDJ/CategoryManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
12 changes: 6 additions & 6 deletions src/com/cubaix/kaiDJ/KaiDJ.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@

// 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 {
if(!new File(kaiDir).exists()) {
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;
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/com/cubaix/kaiDJ/LogoPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -33,7 +34,7 @@ public void paintControl(PaintEvent aPE) {
GC aPlGC = new GC(aThis);
paintDbl(aPlGC);
aPlGC.dispose();
// needRedraw();
needRedraw();
}
});

Expand Down Expand Up @@ -61,6 +62,7 @@ protected void paintTimed() {
if(KaiDJ._DEBUG_PAINT) {
System.out.println("LOGOPANEL.paintTimed()");
}
// if(true) return;
if (panelBck == null) {
loadImg();
}
Expand Down
4 changes: 2 additions & 2 deletions src/com/cubaix/kaiDJ/PlayList.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions src/com/cubaix/kaiDJ/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -113,7 +113,7 @@ public void paintControl(PaintEvent aPE) {
playerBounds = getClientArea();
// playerGC = aPE.gc;
paintDbl(aPE.gc);
// needRedraw();
needRedraw();
}
});
// playerGC = new GC(this);
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/com/cubaix/kaiDJ/db/Db.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/com/cubaix/kaiDJ/swt/TimedCanvas.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b4f8e72

Please sign in to comment.