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 181818 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]
Fix
patch.txt (text/plain), 3.72 KB, created by
Dani Megert
on 2010-10-27 06:25:58 EDT
(
hide
)
Description:
Fix
Filename:
MIME Type:
Creator:
Dani Megert
Created:
2010-10-27 06:25:58 EDT
Size:
3.72 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.72 >diff -u -r1.72 ColorsAndFontsPreferencePage.java >--- Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java 9 Oct 2010 06:53:37 -0000 1.72 >+++ Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java 27 Oct 2010 10:25:15 -0000 >@@ -1453,46 +1453,43 @@ > updateControls(); > } > >- /** >- * Resets the supplied definition to its default value. >- * >- * @param definition the <code>ColorDefinition</code> to reset. >- * @return whether any change was made. >- */ >- private boolean resetColor(ColorDefinition definition) { >- if (!isDefault(definition)) { >- RGB newRGB; >- if (definition.getValue() != null) >- newRGB = definition.getValue(); >- else >- newRGB = getColorAncestorValue(definition); >- >- if (newRGB != null) { >- setColorPreferenceValue(definition, newRGB); >- setRegistryValue(definition, newRGB); >- return true; >- } >- } >- return false; >- } >+ /** >+ * Resets the supplied definition to its default value. >+ * >+ * @param definition >+ * the <code>ColorDefinition</code> to reset >+ */ >+ private void resetColor(ColorDefinition definition) { >+ if (!isDefault(definition)) { >+ RGB newRGB; >+ if (definition.getDefaultsTo() != null) { >+ newRGB = getColorAncestorValue(definition); >+ colorPreferencesToSet.remove(definition.getId()); >+ } else { >+ newRGB = definition.getValue(); >+ setColorPreferenceValue(definition, newRGB); >+ } > >- protected boolean resetFont(FontDefinition definition) { >- if (!isDefault(definition)) { >- FontData[] newFD; >- if (definition.getDefaultsTo() != null) >- newFD = getFontAncestorValue(definition); >- else >- newFD = PreferenceConverter.getDefaultFontDataArray(getPreferenceStore(), ThemeElementHelper >- .createPreferenceKey(currentTheme, definition.getId())); >- >- if (newFD != null) { >- setFontPreferenceValue(definition, newFD); >- setRegistryValue(definition, newFD); >- return true; >- } >- } >- return false; >- } >+ if (newRGB != null) { >+ setRegistryValue(definition, newRGB); >+ } >+ } >+ } >+ >+ private void resetFont(FontDefinition definition) { >+ if (!isDefault(definition)) { >+ FontData[] newFD; >+ if (definition.getDefaultsTo() != null) { >+ newFD = getFontAncestorValue(definition); >+ fontPreferencesToSet.remove(definition.getId()); >+ } else { >+ newFD = PreferenceConverter.getDefaultFontDataArray(getPreferenceStore(), >+ ThemeElementHelper.createPreferenceKey(currentTheme, definition.getId())); >+ setFontPreferenceValue(definition, newFD); >+ } >+ setRegistryValue(definition, newFD); >+ } >+ } > > /** > * Set the value (in preferences) for the given color. >@@ -1539,8 +1536,8 @@ > } > > protected void setFontPreferenceValue(FontDefinition definition, FontData[] datas) { >- setDescendantRegistryValues(definition, datas); >- fontPreferencesToSet.put(definition.getId(), datas); >+ setDescendantRegistryValues(definition, datas); >+ fontPreferencesToSet.put(definition.getId(), datas); > } > > /**
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