|
@@ -59,6 +59,7 @@ import javax.swing.text.DefaultStyledDocument;
|
59
|
59
|
import javax.swing.text.SimpleAttributeSet;
|
60
|
60
|
import javax.swing.text.StyleConstants;
|
61
|
61
|
import javax.swing.text.StyledDocument;
|
|
62
|
+import javax.swing.text.StyledEditorKit;
|
62
|
63
|
|
63
|
64
|
import net.miginfocom.swing.MigLayout;
|
64
|
65
|
|
|
@@ -108,13 +109,12 @@ public class TopicBar extends JComponent implements ActionListener,
|
108
|
109
|
topicLengthMax = channel.getMaxTopicLength();
|
109
|
110
|
errorIcon =
|
110
|
111
|
new JLabel(IconManager.getIconManager().getIcon("input-error"));
|
111
|
|
- //TODO issue 3251
|
112
|
|
- //if (channelFrame.getConfigManager().getOptionBool(controller.
|
113
|
|
- // getDomain(), "showfulltopic")) {
|
114
|
|
- // topicText.setEditorKit(new StyledEditorKit());
|
115
|
|
- //} else {
|
116
|
|
- topicText.setEditorKit(new WrapEditorKit());
|
117
|
|
- //}
|
|
112
|
+ if (channelFrame.getConfigManager().getOptionBool(controller.
|
|
113
|
+ getDomain(), "showfulltopic")) {
|
|
114
|
+ topicText.setEditorKit(new StyledEditorKit());
|
|
115
|
+ } else {
|
|
116
|
+ topicText.setEditorKit(new WrapEditorKit());
|
|
117
|
+ }
|
118
|
118
|
((DefaultStyledDocument) topicText.getDocument()).setDocumentFilter(
|
119
|
119
|
new NewlinesDocumentFilter());
|
120
|
120
|
|
|
@@ -215,6 +215,8 @@ public class TopicBar extends JComponent implements ActionListener,
|
215
|
215
|
}
|
216
|
216
|
topicText.setCaretPosition(0);
|
217
|
217
|
validateTopic();
|
|
218
|
+ setVisible(false);
|
|
219
|
+ setVisible(true);
|
218
|
220
|
}
|
219
|
221
|
|
220
|
222
|
/**
|
|
@@ -383,17 +385,17 @@ public class TopicBar extends JComponent implements ActionListener,
|
383
|
385
|
/** {@inheritDoc} */
|
384
|
386
|
@Override
|
385
|
387
|
public void configChanged(String domain, String key) {
|
386
|
|
- //TODO issue 3251
|
387
|
|
- //if ("showfulltopic".equals(key)) {
|
388
|
|
- // if (channel.getConfigManager().getOptionBool(controller.getDomain(),
|
389
|
|
- // "showfulltopic")) {
|
390
|
|
- // topicText.setEditorKit(new StyledEditorKit());
|
391
|
|
- // } else {
|
392
|
|
- // topicText.setEditorKit(new WrapEditorKit());
|
393
|
|
- // }
|
394
|
|
- // ((DefaultStyledDocument) topicText.getDocument()).setDocumentFilter(
|
395
|
|
- // new NewlinesDocumentFilter());
|
396
|
|
- //}
|
|
388
|
+ if ("showfulltopic".equals(key)) {
|
|
389
|
+ if (channel.getConfigManager().getOptionBool(controller.getDomain(),
|
|
390
|
+ "showfulltopic")) {
|
|
391
|
+ topicText.setEditorKit(new StyledEditorKit());
|
|
392
|
+ } else {
|
|
393
|
+ topicText.setEditorKit(new WrapEditorKit());
|
|
394
|
+ }
|
|
395
|
+ ((DefaultStyledDocument) topicText.getDocument()).setDocumentFilter(
|
|
396
|
+ new NewlinesDocumentFilter());
|
|
397
|
+ topicChanged(channel, null);
|
|
398
|
+ }
|
397
|
399
|
setColours();
|
398
|
400
|
if ("hideEmptyTopicBar".equals(key)) {
|
399
|
401
|
setVisible(true);
|