зеркало из https://github.com/mozilla/pjs.git
Fixing bug 277278, create a GUI for always
This commit is contained in:
Родитель
c3ae1f60b7
Коммит
c7bf7abd3a
|
@ -65,6 +65,8 @@
|
|||
IBOutlet NSTextField* mProportionalSampleLabel;
|
||||
IBOutlet NSTextField* mProportionalSubLabel;
|
||||
|
||||
IBOutlet NSButton* mUseMyFontsCheckbox;
|
||||
|
||||
IBOutlet NSButton* mFontsResetButton;
|
||||
|
||||
// advanced panel stuff
|
||||
|
@ -95,6 +97,7 @@
|
|||
- (IBAction)colorChanged:(id)sender;
|
||||
|
||||
- (IBAction)proportionalFontChoiceButtonClicked:(id)sender;
|
||||
- (IBAction)useMyFontsButtonClicked:(id)sender;
|
||||
- (IBAction)monospaceFontChoiceButtonClicked:(id)sender;
|
||||
- (IBAction)fontRegionPopupClicked:(id)sender;
|
||||
|
||||
|
|
|
@ -54,8 +54,11 @@
|
|||
- (NSString*)defaultProportionalFontTypeForCurrentRegion;
|
||||
|
||||
- (void)saveFontNamePrefsForRegion:(NSDictionary*)regionDict forFontType:(NSString*)fontType;
|
||||
- (void)saveDefaultFontTypePrefForRegion:(NSDictionary*)entryDict;
|
||||
- (void)saveFontSizePrefsForRegion:(NSDictionary*)entryDict;
|
||||
- (void)saveDefaultFontTypePrefForRegion:(NSDictionary*)entryDict;
|
||||
|
||||
- (BOOL)useMyFontsPref;
|
||||
- (void)setUseMyFontsPref:(BOOL)checkboxState;
|
||||
|
||||
- (void)setupFontSamplesFromDict:(NSDictionary*)regionDict;
|
||||
- (void)setupFontSampleOfType:(NSString*)fontType fromDict:(NSDictionary*)regionDict;
|
||||
|
@ -148,6 +151,8 @@
|
|||
[mTextColorWell setColor:[self getColorPref:"browser.display.foreground_color" withSuccess:&gotPref]];
|
||||
[mUnvisitedLinksColorWell setColor:[self getColorPref:"browser.anchor_color" withSuccess:&gotPref]];
|
||||
[mVisitedLinksColorWell setColor:[self getColorPref:"browser.visited_color" withSuccess:&gotPref]];
|
||||
|
||||
[mUseMyFontsCheckbox setState:[self useMyFontsPref]];
|
||||
|
||||
[self setupFontRegionPopup];
|
||||
[self updateFontPreviews];
|
||||
|
@ -227,6 +232,11 @@
|
|||
[[fontManager fontPanel:YES] makeKeyAndOrderFront:self];
|
||||
}
|
||||
|
||||
- (IBAction)useMyFontsButtonClicked:(id)sender
|
||||
{
|
||||
[self setUseMyFontsPref:[sender state]];
|
||||
}
|
||||
|
||||
- (IBAction)fontRegionPopupClicked:(id)sender
|
||||
{
|
||||
// save the old values
|
||||
|
@ -458,6 +468,21 @@
|
|||
[self clearPref:[prefName cString]];
|
||||
}
|
||||
|
||||
// The exposed "Use My Fonts" pref has reverse logic from the internal pref
|
||||
// (when mUseMyFontsCheckbox == 1, use_document_fonts == 0). These private accessor methods allow code
|
||||
// elsewhere to use the exposed pref's logic
|
||||
- (BOOL)useMyFontsPref
|
||||
{
|
||||
BOOL gotPref;
|
||||
return [self getIntPref:"browser.display.use_document_fonts" withSuccess:&gotPref] == 0;
|
||||
}
|
||||
|
||||
- (void)setUseMyFontsPref:(BOOL)checkboxState
|
||||
{
|
||||
int useDocumentFonts = checkboxState ? 0 : 1;
|
||||
[self setPref:"browser.display.use_document_fonts" toInt:useDocumentFonts];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (void)saveFont:(NSFont*)font toDict:(NSMutableDictionary*)regionDict forType:(NSString*)fontType
|
||||
|
@ -731,6 +756,8 @@ const int kDefaultFontSansSerifTag = 1;
|
|||
[regionDict setObject:[NSMutableDictionary dictionary] forKey:@"fontsize"];
|
||||
[regionDict setObject:[NSMutableDictionary dictionary] forKey:@"defaultFontType"];
|
||||
}
|
||||
|
||||
[self clearPref:"browser.display.use_document_fonts"];
|
||||
|
||||
// commit the changes
|
||||
// first, we clear the preferences by saving them. This clears the values that are returned by
|
||||
|
@ -743,6 +770,7 @@ const int kDefaultFontSansSerifTag = 1;
|
|||
// Update the UI of the Appearance pane
|
||||
// order is important here -- syncing the font panel depends on the font previews being correct.
|
||||
[self updateFontPreviews];
|
||||
[mUseMyFontsCheckbox setState:[self useMyFontsPref]];
|
||||
}
|
||||
|
||||
- (void)advancedFontsSheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
resetColorsToDefaults = id;
|
||||
resetFontsToDefaults = id;
|
||||
showAdvancedFontsDialog = id;
|
||||
useMyFontsButtonClicked = id;
|
||||
};
|
||||
CLASS = OrgMozillaChimeraPreferenceAppearance;
|
||||
LANGUAGE = ObjC;
|
||||
|
@ -57,6 +58,7 @@
|
|||
mUnderlineLinksCheckbox = NSButton;
|
||||
mUnvisitedLinksColorWell = NSColorWell;
|
||||
mUseMyColorsCheckbox = NSButton;
|
||||
mUseMyFontsCheckbox = NSButton;
|
||||
mVisitedLinksColorWell = NSColorWell;
|
||||
};
|
||||
SUPERCLASS = PreferencePaneBase;
|
||||
|
|
|
@ -3,15 +3,19 @@
|
|||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>110 65 458 263 0 0 1600 1002 </string>
|
||||
<string>27 81 458 263 0 0 1024 746 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>214</key>
|
||||
<string>70 395 152 96 0 0 1152 746 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>364.0</string>
|
||||
<string>446.1</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>99</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>7W98</string>
|
||||
<string>8I127</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичные данные
camino/PreferencePanes/Appearance/English.lproj/Appearance.nib/keyedobjects.nib
сгенерированный
Двоичные данные
camino/PreferencePanes/Appearance/English.lproj/Appearance.nib/keyedobjects.nib
сгенерированный
Двоичный файл не отображается.
Загрузка…
Ссылка в новой задаче