• R/O
  • HTTP
  • SSH
  • HTTPS

inqubus: Commit

いんきゅばす(仮称; 旧名: さきゅばすのNicoBrowser拡張版)


Commit MetaInfo

Revision0724a4b0f6f81ad16177ba667e67755a088f809d (tree)
Zeit2012-05-13 16:20:49
Autoryukihane <yukihane.feather@gmai...>
Commiteryukihane

Log Message

Merge branch 'owner_only_setting'

Ändern Zusammenfassung

Diff

--- a/frontend/src/saccubus/MainFrame_AboutBox.java
+++ b/frontend/src/saccubus/MainFrame_AboutBox.java
@@ -51,7 +51,7 @@ import javax.swing.SwingUtilities;
5151 */
5252 public class MainFrame_AboutBox extends JDialog implements ActionListener {
5353
54- public static final String VERSION = "いんきゅばす 2.2.0";
54+ public static final String VERSION = "いんきゅばす 2.2.1";
5555 private static final long serialVersionUID = -4256413309312729840L;
5656 private static final Logger logger = LoggerFactory.getLogger(MainFrame_AboutBox.class);
5757 private static final String LINE_FEED = System.getProperty("line.separator");
--- a/frontend/src/yukihane/inqubus/config/Config.java
+++ b/frontend/src/yukihane/inqubus/config/Config.java
@@ -200,7 +200,6 @@ public enum Config {
200200 public void setCommentUseLocal(boolean s) {
201201 config.setProperty(FILE_COMMENT_LOCAL, s);
202202 }
203-
204203 /*
205204 * ファイル - 変換動画
206205 */
@@ -253,6 +252,15 @@ public enum Config {
253252 /*
254253 * コメント
255254 */
255+ private static final String COMMENT_DOWNLOAD_OWNER_ONLY = "comment.download.owneronly";
256+
257+ public boolean getCommentOwnerOnly() {
258+ return config.getBoolean(COMMENT_DOWNLOAD_OWNER_ONLY, false);
259+ }
260+
261+ public void setCommentOwnerOnly(boolean s) {
262+ config.setProperty(COMMENT_DOWNLOAD_OWNER_ONLY, s);
263+ }
256264 private static final String COMMENT_SIZE_AUTOSIZE = "comment.size.autosize";
257265
258266 public boolean getCommentSizeAutosize() {
--- a/frontend/src/yukihane/inqubus/config/ConfigCommentProfile.java
+++ b/frontend/src/yukihane/inqubus/config/ConfigCommentProfile.java
@@ -14,6 +14,7 @@ public class ConfigCommentProfile implements CommentProfile {
1414 private final boolean disablePerMinComment;
1515 private final long backLogPoint;
1616 private final boolean download;
17+ private final boolean ownerCommentOnly;
1718 private final File dir;
1819 private final String fileName;
1920
@@ -24,6 +25,7 @@ public class ConfigCommentProfile implements CommentProfile {
2425 this.disablePerMinComment = p.getCommentMinDisabled();
2526 this.backLogPoint = -1L;
2627 this.download = !p.getCommentUseLocal();
28+ this.ownerCommentOnly = p.getCommentOwnerOnly();
2729 this.dir = new File(p.getCommentDir());
2830 this.fileName = p.getCommentFileNamePattern();
2931 }
@@ -50,7 +52,7 @@ public class ConfigCommentProfile implements CommentProfile {
5052
5153 @Override
5254 public boolean isOwnerCommentOnly() {
53- return false;
55+ return ownerCommentOnly;
5456 }
5557
5658 @Override
--- a/frontend/src/yukihane/inqubus/gui/ConfigDialog.java
+++ b/frontend/src/yukihane/inqubus/gui/ConfigDialog.java
@@ -83,6 +83,7 @@ public class ConfigDialog extends JDialog {
8383 final JLabel lblCommentMinSizeManual = new JLabel();
8484 final JLabel lblCommentDisplayMax = new JLabel();
8585 final JLabel lblCommentDisplayMaxManual = new JLabel();
86+ final JLabel lblCommentOwnerOnly = new JLabel();
8687 final JPanel pnlCommentAdvanced = new JPanel();
8788 final JLabel lblFontPath = new JLabel();
8889 cbFontSizeArrangeDisable = new JCheckBox();
@@ -376,6 +377,8 @@ public class ConfigDialog extends JDialog {
376377
377378 lblCommentDisplayMaxManual.setText("手動設定");
378379
380+ lblCommentOwnerOnly.setText("取得するコメントの種類");
381+
379382 GroupLayout gl_pnlCommentStandard = new GroupLayout(pnlCommentStandard);
380383 pnlCommentStandard.setLayout(gl_pnlCommentStandard);
381384 gl_pnlCommentStandard.setAutoCreateContainerGaps(true);
@@ -385,20 +388,30 @@ public class ConfigDialog extends JDialog {
385388 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.LEADING)
386389 .addComponent(lblCommentSize)
387390 .addComponent(lblCommentMinSize)
388- .addComponent(lblCommentDisplayMax))
389- .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.LEADING)
390- .addComponent(cbCommentSizeAuto)
391- .addComponent(cbCommentMinDisable)
392- .addComponent(cbCommentMinSizeAuto)
393- .addComponent(cbCommentDisplaySizeDefault))
394- .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.LEADING)
395- .addComponent(lblCommentSizeManual)
396- .addComponent(lblCommentMinSizeManual)
397- .addComponent(lblCommentDisplayMaxManual))
391+ .addComponent(lblCommentDisplayMax)
392+ .addComponent(lblCommentOwnerOnly)
393+ )
398394 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.LEADING)
399- .addComponent(fldCommentSizeManual, 48, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
400- .addComponent(fldCommentMinSizeManual, 48, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
401- .addComponent(fldCommentDisplaySizeManual, 48, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
395+ .addGroup(gl_pnlCommentStandard.createSequentialGroup()
396+ .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.LEADING)
397+ .addComponent(cbCommentSizeAuto)
398+ .addComponent(cbCommentMinDisable)
399+ .addComponent(cbCommentMinSizeAuto)
400+ .addComponent(cbCommentDisplaySizeDefault)
401+ )
402+ .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.LEADING)
403+ .addComponent(lblCommentSizeManual)
404+ .addComponent(lblCommentMinSizeManual)
405+ .addComponent(lblCommentDisplayMaxManual))
406+ .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.LEADING)
407+ .addComponent(fldCommentSizeManual, 48, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
408+ .addComponent(fldCommentMinSizeManual, 48, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
409+ .addComponent(fldCommentDisplaySizeManual, 48, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
410+ )
411+ .addGroup(gl_pnlCommentStandard.createSequentialGroup()
412+ .addComponent(cbCommentOwnerOnly)
413+ )
414+ )
402415 );
403416 gl_pnlCommentStandard.setVerticalGroup(
404417 gl_pnlCommentStandard.createSequentialGroup()
@@ -420,6 +433,10 @@ public class ConfigDialog extends JDialog {
420433 .addComponent(cbCommentDisplaySizeDefault)
421434 .addComponent(lblCommentDisplayMaxManual)
422435 .addComponent(fldCommentDisplaySizeManual))
436+ .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.BASELINE)
437+ .addComponent(lblCommentOwnerOnly)
438+ .addComponent(cbCommentOwnerOnly)
439+ )
423440 );
424441
425442 pnlCommentAdvanced.setBorder(BorderFactory.createTitledBorder("高度な設定"));
@@ -830,6 +847,7 @@ public class ConfigDialog extends JDialog {
830847 private final NumberFormattedTextField fldCommentMinSizeManual = new NumberFormattedTextField();
831848 private final JCheckBox cbCommentDisplaySizeDefault = new JCheckBox("標準(30)");
832849 private final NumberFormattedTextField fldCommentDisplaySizeManual = new NumberFormattedTextField();
850+ private final JCheckBox cbCommentOwnerOnly = new JCheckBox("投稿者コメントのみ");
833851 // コメント - 高度な設定
834852 private final JTextField fldFontPath;
835853 private final JTextField fldFontIndex;
@@ -946,6 +964,7 @@ public class ConfigDialog extends JDialog {
946964 fldCommentSizeManual.setText(p.getCommentMinSizeManual());
947965 cbCommentDisplaySizeDefault.setSelected(p.getCommentDisplaySizeDefault());
948966 fldCommentDisplaySizeManual.setText(p.getCommentDisplaySizeManual());
967+ cbCommentOwnerOnly.setSelected(p.getCommentOwnerOnly());
949968
950969 /**
951970 * コメント - 高度な設定
@@ -1069,6 +1088,7 @@ public class ConfigDialog extends JDialog {
10691088 p.setCommentMinSizeManual(fldCommentSizeManual.getText());
10701089 p.setCommentDisplaySizeDefault(cbCommentDisplaySizeDefault.isSelected());
10711090 p.setCommentDisplaySizeManual(fldCommentDisplaySizeManual.getText());
1091+ p.setCommentOwnerOnly(cbCommentOwnerOnly.isSelected());
10721092
10731093 /**
10741094 * コメント - 高度な設定
--- a/frontend/src/yukihane/inqubus/gui/MainFrame.java
+++ b/frontend/src/yukihane/inqubus/gui/MainFrame.java
@@ -726,6 +726,7 @@ public class MainFrame extends JFrame {
726726 final Config p = Config.INSTANCE;
727727
728728 cmbId.setText("");
729+ cbOwnerComment.setSelected(p.getCommentOwnerOnly());
729730 cbBackLogReduce.setSelected(p.getCommentMinDisabled());
730731 cbBackLog.setEnabled(true);
731732 cbBackLog.setSelected(false);
Show on old repository browser