From: yukihane Date: Sat, 10 Sep 2011 21:25:00 +0000 (+0900) Subject: デバッグ出力を追加 X-Git-Tag: rel20110911_ver1.7.3 X-Git-Url: http://git.osdn.net/view?p=coroid%2Finqubus.git;a=commitdiff_plain;h=refs%2Fheads%2Fv1 デバッグ出力を追加 --- diff --git a/frontend/src/saccubus/MainFrame.java b/frontend/src/saccubus/MainFrame.java index 4c19291..77914b9 100644 --- a/frontend/src/saccubus/MainFrame.java +++ b/frontend/src/saccubus/MainFrame.java @@ -46,6 +46,7 @@ import org.apache.commons.lang.StringUtils; import saccubus.ConvertStopFlag.State; import saccubus.converter.profile.FfmpegOption; import saccubus.converter.profile.NgSetting; +import saccubus.converter.profile.Profile; import saccubus.net.TextProgressListener; import saccubus.properties.BasicSetting; import saccubus.properties.ConvertSetting; @@ -83,7 +84,7 @@ public class MainFrame extends JFrame { private static final long serialVersionUID = 2564486741331062989L; public static final String PRODUCT_NAME = "いんきゅばす"; - public static final String VERSION = "1.7.2 (NicoBrowser" + Main.VERSION + ")"; + public static final String VERSION = "1.7.3 (NicoBrowser" + Main.VERSION + ")"; public static final Image WinIcon = Toolkit.getDefaultToolkit().createImage(saccubus.MainFrame.class.getResource( "icon32.png")); // TODO GUIが無いためフィールドに保持. @@ -366,6 +367,7 @@ public class MainFrame extends JFrame { contentPane.setLayout(borderLayout1); setSize(new Dimension(400, 450)); setTitle(PRODUCT_NAME + " " + VERSION); + System.out.println(getTitle()); this.addWindowListener(new MainFrame_this_windowAdapter(this)); statusBar.setText(" "); jMenuFile.setText("ファイル"); @@ -896,6 +898,8 @@ public class MainFrame extends JFrame { private JPanel FFmpegOptionComboBoxPanel = null; public void DoButton_actionPerformed(ActionEvent e) { + System.out.println("doButton: " + doButton.getText()); + System.out.println("Converter: " + (Converter == null ? "null" : Converter.isConverted())); if (Converter == null || Converter.isConverted()) { try { executeConvert(); @@ -910,6 +914,7 @@ public class MainFrame extends JFrame { } else { /* 開始しているので、ストップする。 */ final ConvertStopFlag flag = Converter.getStopFlag(); if (!flag.needStop()) { /* まだストップしていない。 */ + System.out.println("request stop"); flag.requestStop(); } } @@ -919,6 +924,7 @@ public class MainFrame extends JFrame { String url; // NicoBrowserファイルを利用する場合は、ファイル名からビデオIDを特定. + System.out.println("kind: " + videoSaveInfoPanel.getVideoUseNiBrButton().isSelected()); if (videoSaveInfoPanel.getVideoUseNiBrButton().isSelected()) { try { String fileName = videoSaveInfoPanel.getNibrFileField().getText(); @@ -935,6 +941,7 @@ public class MainFrame extends JFrame { } } else { url = videoIdField.getText(); + System.out.println("VIDEO ID: " + url); } TextProgressListener sl = new TextProgressListener() { @@ -967,11 +974,14 @@ public class MainFrame extends JFrame { } }; - Converter = new Converter(url, wayBackField.getText(), getSetting().toProfile(), sl, + final Profile profile = getSetting().toProfile(); + System.out.println(profile); + + Converter = new Converter(url, wayBackField.getText(), profile, sl, new ConvertStopFlag(scl)); doButton.setText(DoButtonStopString); new Thread(Converter).start(); - + System.out.println("Thread invoked"); } /* FFmpegへのパス */ @@ -1634,6 +1644,7 @@ class MainFrame_DoButton_actionAdapter implements ActionListener { private MainFrame adaptee; MainFrame_DoButton_actionAdapter(MainFrame adaptee) { + System.out.println("MainFrame_DoButton_actionAdapter コンストラクタ"); this.adaptee = adaptee; } diff --git a/frontend/src/saccubus/converter/AbstractCommand.java b/frontend/src/saccubus/converter/AbstractCommand.java index 9982e5f..b66a69d 100644 --- a/frontend/src/saccubus/converter/AbstractCommand.java +++ b/frontend/src/saccubus/converter/AbstractCommand.java @@ -25,7 +25,14 @@ public abstract class AbstractCommand { } protected void sendText(String text) { + sendText(text, true); + } + + protected void sendText(String text, boolean debugOut) { getListener().setText(text); + if (debugOut) { + System.out.println(text); + } } /** diff --git a/frontend/src/saccubus/converter/Converter.java b/frontend/src/saccubus/converter/Converter.java index dc657d0..678e362 100644 --- a/frontend/src/saccubus/converter/Converter.java +++ b/frontend/src/saccubus/converter/Converter.java @@ -48,7 +48,9 @@ public class Converter extends AbstractCommand implements Runnable, Callable