Viewing Issue Advanced Details

ID 0003919 Category [DMDirc] User Interface - Preferences Dialog Severity minor
Reproducibility always Date Submitted 2010-03-11 00:37 Last Update 2010-03-15 02:16
Reporter MD87 Assigned To Demented-Idiot View Status public
Priority normal Status resolved Resolution fixed
Platform Fixed in Version Target Version 0.6.4
Product Version Product Build
Summary 0003919: Improve tab completion settings in prefs dialog
Description
Create a new category for tab completion settings

Move the 'tab completion style' option from general
Move the 'case sensitive' option from advanced

Add a setting for allowempty
Needs unit test no
Upstream Bug URL

Relationships

Notes

A patchset (3) related to this change has been added to gerrit by Simon Mott

Add Tab Completion category to preferences and move all relavent settings into
it

fixes issue 3919

Change-Id: Id6862ebbc85a8c4acc755a0defb0a30e8337becd
authorSimon Mott <simon@dmdirc.com>2010-03-14 04:45:07 (GMT)
committer Chris Smith <chris@dmdirc.com>2010-03-15 02:15:02 (GMT)
commit29eb9a354e6227c378e0f68643720416776971cc (patch) (side-by-side diff)
Add Tab Completion category to preferences and move all relavent settings into it
fixes issue 3919 Change-Id: Id6862ebbc85a8c4acc755a0defb0a30e8337becd Reviewed-on: http://gerrit.dmdirc.com/1024 Reviewed-by: Chris Smith <chris@dmdirc.com> Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
-rw-r--r--src/com/dmdirc/config/prefs/PreferencesManager.java34
1 files changed, 25 insertions, 9 deletions
Click to Expand/Collapse
diff src/com/dmdirc/config/prefs/PreferencesManager.java
@@ -100,7 +100,7 @@ public class PreferencesManager {
*/
public boolean save() {
fireSaveListeners();
-
+
boolean restart = false;
for (PreferencesCategory category : categories) {
if (category.save()) {
@@ -167,17 +167,36 @@ public class PreferencesManager {
new OptionalValidator(new NumericalValidator(0, 100)), "ui", "pasteProtectionLimit",
"Paste protection trigger", "Confirm pasting of text that " +
"contains more than this many lines."));
-
+
+ addTabCompletionCategory(category);
+ addCategory(category.setInlineAfter());
+ }
+
+ /**
+ * Creates and adds the "Tab Completion" category.
+ * @since 0.6.4
+ */
+ private void addTabCompletionCategory(PreferencesCategory parent) {
+ final PreferencesCategory category = new PreferencesCategory("Tab Completion", "");
final Map<String, String> taboptions = new HashMap<String, String>();
- for (Service service : PluginManager.getPluginManager().getServicesByType("tabcompletion")) {
+
+ for (Service service : PluginManager.getPluginManager()
+ .getServicesByType("tabcompletion")) {
taboptions.put(service.getName(), service.getName());
}
-
+
category.addSetting(new PreferencesSetting("tabcompletion", "style",
"Tab completion style", "Determines the behaviour of " +
"the tab completer when there are multiple matches", taboptions));
+ category.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN,
+ "tabcompletion", "casesensitive", "Case-sensitive tab completion",
+ "Respect case when tab completing"));
+ category.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN,
+ "tabcompletion", "allowempty", "Allow empty tab completion",
+ "Attempt to tab complete when the Tab key is pressed even " +
+ "if there is nothing to complete"));
- addCategory(category);
+ parent.addSubCategory(category.setInline());
}
/**
@@ -357,7 +376,7 @@ public class PreferencesManager {
* Creates and adds the "Advanced" category.
*/
private void addAdvancedCategory() {
- final PreferencesCategory category = new PreferencesCategory("Advanced",
+ final PreferencesCategory category = new PreferencesCategory("Advanced",
"", "category-advanced");
category.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN,
@@ -374,9 +393,6 @@ public class PreferencesManager {
"general", "logerrors", "Log errors to disk",
"Save copies of all client errors to disk"));
category.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN,
- "tabcompletion", "casesensitive", "Case-sensitive tab completion",
- "Respect case when tab completing"));
- category.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN,
"ui", "quickCopy", "Quick copy", "Automatically copy" +
" text that's selected when the mouse button is released"));
category.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN,

Issue History

Date Modified Username Field Change
2010-03-11 00:37 MD87 New Issue
2010-03-11 00:37 MD87 Status new => assigned
2010-03-11 00:37 MD87 Assigned To => Demented-Idiot
2010-03-11 00:38 MD87 Needs unit test => no
2010-03-11 00:38 MD87 Description Updated
2010-03-11 01:04 Demented-Idiot Category *Unsorted => User Interface - Input and tab completion
2010-03-11 01:08 MD87 Category User Interface - Input and tab completion => User Interface - Preferences Dialog
2010-03-15 01:47 Demented-Idiot Checkin
2010-03-15 01:47 Demented-Idiot Note Added: 0010413
2010-03-15 01:47 Demented-Idiot Status assigned => fix pending
2010-03-15 02:16 Demented-Idiot Checkin
2010-03-15 02:16 Demented-Idiot Note Added: 0010418
2010-03-15 02:16 Demented-Idiot Status fix pending => resolved
2010-03-15 02:16 Demented-Idiot Resolution open => fixed