Ver código fonte

Added a bunch of options to various settings dialogs

git-svn-id: http://svn.dmdirc.com/trunk@1699 00569f92-eb28-0410-84fd-f71c24880f
tags/0.5
Gregory Holmes 17 anos atrás
pai
commit
a35d1bb6f6

+ 5
- 5
src/com/dmdirc/ui/components/PreferencesPanel.java Ver arquivo

@@ -220,11 +220,11 @@ public final class PreferencesPanel extends StandardDialog implements
220 220
         
221 221
         getContentPane().setLayout(layout);
222 222
         
223
-        tabList.setPreferredSize(new Dimension(150, 450));
224
-        tabList.setMinimumSize(new Dimension(150, 450));
225
-        setMinimumSize(new Dimension(650, 500));
226
-        setPreferredSize(new Dimension(650, 500));
227
-        setMaximumSize(new Dimension(650, 500));
223
+        tabList.setPreferredSize(new Dimension(150, 550));
224
+        tabList.setMinimumSize(new Dimension(150, 550));
225
+        setMinimumSize(new Dimension(650, 600));
226
+        setPreferredSize(new Dimension(650, 600));
227
+        setMaximumSize(new Dimension(650, 600));
228 228
         
229 229
         orderButtons(button1, button2);
230 230
         

+ 24
- 0
src/com/dmdirc/ui/dialogs/PreferencesDialog.java Ver arquivo

@@ -275,6 +275,17 @@ public final class PreferencesDialog implements PreferencesInterface {
275 275
         preferencesPanel.addCheckboxOption(tabName, "ui.showinlist",
276 276
                 "Show colours in nick list: ", "Show nickname colours in the nicklist",
277 277
                 Config.getOptionBool("ui", "shownickcoloursinnicklist"));
278
+        preferencesPanel.addComboboxOption(tabName, "ui.framemanager",
279
+                "Frame manager: ", "Which frame manager should be used",
280
+                new String[]{"treeview", "buttonbar", },
281
+                Config.getOption("ui", "framemanager", "treeview"), false);
282
+        preferencesPanel.addComboboxOption(tabName, "ui.framemanagerPosition",
283
+                "Frame manager position: ", "Where should the frame manager be positioned",
284
+                new String[]{"top", "bottom", "left", "right"},
285
+                Config.getOption("ui", "framemanagerPosition", "left"), false);
286
+        preferencesPanel.addCheckboxOption(tabName, "ui.stylelinks",
287
+                "Style links: ", "Style links in the textpane",
288
+                Config.getOptionBool("ui", "stylelinks"));
278 289
     }
279 290
     
280 291
     /**
@@ -339,6 +350,19 @@ public final class PreferencesDialog implements PreferencesInterface {
339 350
         preferencesPanel.addCheckboxOption(tabName, "treeview.sortservers",
340 351
                 "Sort servers: ", "Sort servers in the treeview",
341 352
                 Config.getOptionBool("treeview", "sortservers"));
353
+        preferencesPanel.addCheckboxOption(tabName, "ui.treeviewActiveBold",
354
+                "Active node bold: ", "Show the active node in bold",
355
+                Config.getOptionBool("ui", "treeviewActiveBold"));
356
+        preferencesPanel.addOptionalColourOption(tabName, "ui.treeviewActiveForeground",
357
+                "Active node foreground: ", "Foreground colour of the active node",
358
+                Config.getOption("treeview", "treeviewActiveForeground",
359
+                Config.getOption("treeview", "foregroundcolour", "")),
360
+                false, true, true);
361
+        preferencesPanel.addOptionalColourOption(tabName, "ui.treeviewActiveBackground",
362
+                "Active node background: ", "Background colour of the active node",
363
+                Config.getOption("treeview", "treeviewActiveBackground",
364
+                Config.getOption("treeview", "backgroundcolour", "")),
365
+                false, true, true);
342 366
     }
343 367
     
344 368
     /**

+ 2
- 1
src/com/dmdirc/ui/dialogs/channelsetting/ChannelListModesPane.java Ver arquivo

@@ -29,6 +29,7 @@ import static com.dmdirc.ui.UIUtilities.SMALL_BORDER;
29 29
 import java.awt.BorderLayout;
30 30
 import java.awt.GridBagConstraints;
31 31
 import java.awt.GridBagLayout;
32
+import java.awt.Insets;
32 33
 import java.awt.event.ActionEvent;
33 34
 import java.awt.event.ActionListener;
34 35
 import java.util.ArrayList;
@@ -43,7 +44,6 @@ import javax.swing.JList;
43 44
 import javax.swing.JOptionPane;
44 45
 import javax.swing.JPanel;
45 46
 import javax.swing.JScrollPane;
46
-import javax.swing.UIManager;
47 47
 
48 48
 /**
49 49
  * List modes panel.
@@ -186,6 +186,7 @@ public class ChannelListModesPane extends JPanel implements ActionListener {
186 186
         add(addListModeButton, constraints);
187 187
 
188 188
         constraints.gridx = 2;
189
+        constraints.insets = new Insets(0, SMALL_BORDER, 0, 0);
189 190
         add(removeListModeButton, constraints);
190 191
 
191 192
         update();

+ 16
- 0
src/com/dmdirc/ui/dialogs/channelsetting/ChannelSettingsDialog.java Ver arquivo

@@ -234,6 +234,14 @@ public final class ChannelSettingsDialog extends StandardDialog implements Actio
234 234
 
235 235
         channelSettingsPane.addOption("channel.splitusermodes",
236 236
                 "Split user modes", OptionType.CHECKBOX);
237
+        channelSettingsPane.addOption("channel.sendwho", "Send channel WHOs",
238
+                OptionType.CHECKBOX);
239
+        channelSettingsPane.addOption("channel.showmodeprefix", "Show mode prefixes",
240
+                OptionType.CHECKBOX);
241
+        channelSettingsPane.addOption("ui.shownickcoloursinnicklist", 
242
+                "Show colours in nicklist", OptionType.CHECKBOX);
243
+        channelSettingsPane.addOption("ui.shownickcoloursintext", 
244
+                "Show colours in textpane", OptionType.CHECKBOX);
237 245
         channelSettingsPane.addOption("general.cyclemessage", "Cycle message",
238 246
                 OptionType.TEXTFIELD);
239 247
         channelSettingsPane.addOption("general.kickmessage", "Kick message",
@@ -248,6 +256,14 @@ public final class ChannelSettingsDialog extends StandardDialog implements Actio
248 256
                 OptionType.SPINNER);
249 257
         channelSettingsPane.addOption("ui.inputbuffersize", "Input buffer size",
250 258
                 OptionType.SPINNER);
259
+        channelSettingsPane.addOption("ui.inputbackgroundcolour", 
260
+                "Inputfield background colour", OptionType.COLOUR);
261
+        channelSettingsPane.addOption("ui.inputforegroundcolour", 
262
+                "Inputfield foreground colour", OptionType.COLOUR);
263
+        channelSettingsPane.addOption("ui.nicklistbackgroundcolour", 
264
+                "Nicklist background colour", OptionType.COLOUR);
265
+        channelSettingsPane.addOption("ui.nicklistforegroundcolour", 
266
+                "Nicklist foreground colour", OptionType.COLOUR);
251 267
     }
252 268
 
253 269
     /** Initialises listeners for this dialog. */

+ 2
- 2
test/com/dmdirc/ProgramErrorTest.java Ver arquivo

@@ -54,8 +54,8 @@ public class ProgramErrorTest extends TestCase {
54 54
     
55 55
     public void testGetDate() {
56 56
         final ProgramError inst = new ProgramError(level, message, trace, date);
57
-        assertTrue("Date check after failed.", inst.getDate().after(new Date(date.getTime() - 1000)));
58
-        assertTrue("Date check before failed.", inst.getDate().before(new Date(date.getTime() + 1000)));
57
+        assertTrue("Date check after failed.", inst.getDate().after(new Date(date.getTime() - 1)));
58
+        assertTrue("Date check before failed.", inst.getDate().before(new Date(date.getTime() + 1)));
59 59
     }
60 60
     
61 61
     public void testGetStatus() {

Carregando…
Cancelar
Salvar