Changeset 18
- Timestamp:
- 10/02/02 02:10:22 (20 years ago)
- Location:
- trunk/j/src/org/armedbear/j
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/j/BufferList.java
r2 r18 3 3 * 4 4 * Copyright (C) 1998-2002 Peter Graves 5 * $Id: BufferList.java,v 1. 1.1.1 2002-09-24 16:09:14piso Exp $5 * $Id: BufferList.java,v 1.2 2002-10-02 02:10:22 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 31 31 private final ArrayList list = new ArrayList(); 32 32 33 private boolean sort;33 private boolean alpha; // Sort alphabetically? 34 34 private boolean reorder; 35 35 private boolean modified; … … 39 39 Preferences p = Editor.preferences(); 40 40 if (p != null) { 41 sort = p.getBooleanProperty(Property.SORT_BUFFER_LIST); 42 reorder = p.getBooleanProperty(Property.REORDER_BUFFERS) && !sort; 41 alpha = p.getBooleanProperty(Property.SORT_BUFFER_LIST); 42 if (alpha) 43 reorder = false; 44 else 45 reorder = p.getIntegerProperty(Property.REORDER_BUFFERS) > 0; 43 46 p.addPreferencesChangeListener(this); 44 47 } else … … 48 51 public synchronized Iterator iterator() 49 52 { 50 if ( sort&& modified)53 if (alpha && modified) 51 54 sort(); 52 55 return list.iterator(); … … 77 80 { 78 81 if (list.size() > 0) { 79 if ( sort&& modified)82 if (alpha && modified) 80 83 sort(); 81 84 return (Buffer) list.get(0); … … 86 89 public synchronized Buffer getNextPrimaryBuffer(Buffer buffer) 87 90 { 88 if ( sort&& modified)91 if (alpha && modified) 89 92 sort(); 90 93 if (buffer.isSecondary()) { … … 113 116 public synchronized Buffer getPreviousPrimaryBuffer(Buffer buffer) 114 117 { 115 if ( sort&& modified)118 if (alpha && modified) 116 119 sort(); 117 120 if (buffer.isSecondary()) { … … 221 224 Preferences p = Editor.preferences(); 222 225 boolean b = p.getBooleanProperty(Property.SORT_BUFFER_LIST); 223 if (b != sort) {224 sort= b;225 if ( sort) {226 if (b != alpha) { 227 alpha = b; 228 if (alpha) { 226 229 sort(); 227 230 Sidebar.setUpdateFlagInAllFrames(SIDEBAR_BUFFER_LIST_CHANGED); 228 231 } 229 232 } 230 reorder = p.getBooleanProperty(Property.REORDER_BUFFERS) && !sort; 233 if (alpha) 234 reorder = false; 235 else 236 reorder = p.getIntegerProperty(Property.REORDER_BUFFERS) > 0; 231 237 } 232 238 … … 244 250 private void sort() 245 251 { 246 if ( sort) {252 if (alpha) { 247 253 if (comparator == null) { 248 254 comparator = new Comparator() { -
trunk/j/src/org/armedbear/j/Property.java
r6 r18 3 3 * 4 4 * Copyright (C) 2000-2002 Peter Graves 5 * $Id: Property.java,v 1. 2 2002-09-25 13:31:42piso Exp $5 * $Id: Property.java,v 1.3 2002-10-02 02:09:49 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 59 59 public static final Property PRINTER_FONT_SIZE = 60 60 createProperty("printerFontSize", 10); 61 public static final Property REORDER_BUFFERS = 62 createProperty("reorderBuffers", 1); 61 63 public static final Property SHELL_OUTPUT_LIMIT = 62 64 createProperty("shellOutputLimit", 1000); … … 161 163 public static final Property POP_KEEP_MESSAGES_ON_SERVER = 162 164 createProperty("popKeepMessagesOnServer", true); 163 public static final Property REORDER_BUFFERS =164 createProperty("reorderBuffers", true);165 165 public static final Property REMOVE_TRAILING_WHITESPACE = 166 166 createProperty("removeTrailingWhitespace", false);
Note: See TracChangeset
for help on using the changeset viewer.