Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 181917 Details for
Bug 328708
Colors and Fonts preference page: Reset is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Additional Fix
patch.txt (text/plain), 4.06 KB, created by
Dani Megert
on 2010-10-28 05:34:24 EDT
(
hide
)
Description:
Additional Fix
Filename:
MIME Type:
Creator:
Dani Megert
Created:
2010-10-28 05:34:24 EDT
Size:
4.06 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java,v >retrieving revision 1.74 >diff -u -r1.74 ColorsAndFontsPreferencePage.java >--- Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java 27 Oct 2010 17:43:30 -0000 1.74 >+++ Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java 28 Oct 2010 09:30:32 -0000 >@@ -1275,7 +1275,9 @@ > private boolean isDefault(ColorDefinition definition) { > String id = definition.getId(); > >- if (colorPreferencesToSet.containsKey(id)) { >+ if (colorPreferencesToSet.containsKey(id)) { >+ if (colorPreferencesToSet.get(id) == null) >+ return true; > if (definition.getValue() != null) { // value-based color > if (colorPreferencesToSet.get(id).equals(definition.getValue())) > return true; >@@ -1299,7 +1301,9 @@ > private boolean isDefault(FontDefinition definition) { > String id = definition.getId(); > >- if (fontPreferencesToSet.containsKey(id)) { >+ if (fontPreferencesToSet.containsKey(id)) { >+ if (fontPreferencesToSet.get(id) == null) >+ return true; > if (definition.getValue() != null) { // value-based font > if (Arrays.equals((FontData[]) fontPreferencesToSet.get(id), definition.getValue())) > return true; >@@ -1377,11 +1381,15 @@ > String id = (String) i.next(); > String key = ThemeElementHelper.createPreferenceKey(currentTheme, id); > RGB rgb = (RGB) colorPreferencesToSet.get(id); >- String rgbString = StringConverter.asString(rgb); >- String storeString = getPreferenceStore().getString(key); >+ if (rgb == null) >+ getPreferenceStore().setToDefault(key); >+ else { >+ String rgbString = StringConverter.asString(rgb); >+ String storeString = getPreferenceStore().getString(key); > >- if (!rgbString.equals(storeString)) >- getPreferenceStore().setValue(key, rgbString); >+ if (!rgbString.equals(storeString)) >+ getPreferenceStore().setValue(key, rgbString); >+ } > } > > colorValuesToSet.clear(); >@@ -1417,12 +1425,15 @@ > String id = (String) i.next(); > String key = ThemeElementHelper.createPreferenceKey(currentTheme, id); > FontData[] fd = (FontData[]) fontPreferencesToSet.get(id); >+ if (fd == null) >+ getPreferenceStore().setToDefault(key); >+ else { >+ String fdString = PreferenceConverter.getStoredRepresentation(fd); >+ String storeString = getPreferenceStore().getString(key); > >- String fdString = PreferenceConverter.getStoredRepresentation(fd); >- String storeString = getPreferenceStore().getString(key); >- >- if (!fdString.equals(storeString)) >- getPreferenceStore().setValue(key, fdString); >+ if (!fdString.equals(storeString)) >+ getPreferenceStore().setValue(key, fdString); >+ } > } > > fontValuesToSet.clear(); >@@ -1461,7 +1472,7 @@ > if (definition.getDefaultsTo() != null) { > newRGB = getColorAncestorValue(definition); > setDescendantRegistryValues(definition, newRGB); >- colorPreferencesToSet.remove(definition.getId()); >+ colorPreferencesToSet.put(definition.getId(), null); > } else { > newRGB = definition.getValue(); > setColorPreferenceValue(definition, newRGB); >@@ -1479,7 +1490,7 @@ > if (definition.getDefaultsTo() != null) { > newFD = getFontAncestorValue(definition); > setDescendantRegistryValues(definition, newFD); >- fontPreferencesToSet.remove(definition.getId()); >+ fontPreferencesToSet.put(definition.getId(), null); > } else { > newFD = PreferenceConverter.getDefaultFontDataArray(getPreferenceStore(), > ThemeElementHelper.createPreferenceKey(currentTheme, definition.getId()));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 328708
:
181818
|
181917
|
181926