зеркало из https://github.com/mozilla/gecko-dev.git
Adding the Appearance prefs panel to the list of panels, fixing the prefs panel base class to use UTF-8 for prefs, and adding a changeFont handler on the window's controller that can forward changeFont() messages back to the current prefs pane (used by the Appearance pane).
This commit is contained in:
Родитель
5bd90cc075
Коммит
8236111517
|
@ -1,5 +1,6 @@
|
|||
( Chimera.SitesPrefPane,
|
||||
org.mozilla.chimera.preference.navigation,
|
||||
org.mozilla.chimera.preference.appearance,
|
||||
org.mozilla.chimera.preference.privacy,
|
||||
Chimera.HelpersPrefPane,
|
||||
Chimera.SecurityPrefPane,
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
identifier = chimera;
|
||||
panes = (
|
||||
org.mozilla.chimera.preference.navigation,
|
||||
org.mozilla.chimera.preference.appearance,
|
||||
org.mozilla.chimera.preference.privacy,
|
||||
Chimera.SitesPrefPane,
|
||||
Chimera.HelpersPrefPane,
|
||||
|
|
|
@ -258,6 +258,7 @@ static NSString *MVPreferencesWindowNotification = @"MVPreferencesWindowNotifica
|
|||
[items addObject:NSToolbarSeparatorItemIdentifier];
|
||||
return items;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation MVPreferencesController (MVPreferencesControllerPrivate)
|
||||
|
@ -340,3 +341,17 @@ static NSString *MVPreferencesWindowNotification = @"MVPreferencesWindowNotifica
|
|||
}
|
||||
@end
|
||||
|
||||
// When using the Font Panel without an obvious target (like an editable text field),
|
||||
// changeFont action messages propagate all the way up the responder chain to here.
|
||||
// There isn't an easy way for individual prefs panes to get themselves into
|
||||
// the responder chain, so we just bounce this message back to the currently
|
||||
// loaded pane.
|
||||
@implementation MVPreferencesController (FontChangeNotifications)
|
||||
|
||||
- (void)changeFont:(id)sender
|
||||
{
|
||||
[[loadedPanes objectForKey:currentPaneIdentifier] changeFont:sender];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>413 91 356 240 0 0 1152 848 </string>
|
||||
<string>185 70 356 240 0 0 1152 746 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
<key>IBGroupedObjects</key>
|
||||
|
@ -17,6 +17,6 @@
|
|||
<key>IBLastGroupID</key>
|
||||
<string>4</string>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичные данные
camino/PreferencePanes/Personal/English.lproj/Personal.nib/objects.nib
сгенерированный
Двоичные данные
camino/PreferencePanes/Personal/English.lproj/Personal.nib/objects.nib
сгенерированный
Двоичный файл не отображается.
|
@ -3,7 +3,7 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>413 91 356 240 0 0 1152 848 </string>
|
||||
<string>185 70 356 240 0 0 1152 746 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
<key>IBGroupedObjects</key>
|
||||
|
@ -17,6 +17,6 @@
|
|||
<key>IBLastGroupID</key>
|
||||
<string>4</string>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичный файл не отображается.
|
@ -41,7 +41,8 @@
|
|||
char *buf = nsnull;
|
||||
nsresult rv = mPrefService->GetCharPref(prefName, &buf);
|
||||
if (NS_SUCCEEDED(rv) && buf) {
|
||||
prefValue = [NSString stringWithCString:buf];
|
||||
// prefs are UTF-8
|
||||
prefValue = [NSString stringWithUTF8String:buf];
|
||||
free(buf);
|
||||
if (outSuccess) *outSuccess = YES;
|
||||
} else {
|
||||
|
@ -93,8 +94,9 @@
|
|||
|
||||
- (void)setPref: (const char*)prefName toString:(NSString*)value
|
||||
{
|
||||
// prefs are UTF-8
|
||||
if (mPrefService) {
|
||||
mPrefService->SetCharPref(prefName, [value cString]);
|
||||
mPrefService->SetCharPref(prefName, [value UTF8String]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
( Chimera.SitesPrefPane,
|
||||
org.mozilla.chimera.preference.navigation,
|
||||
org.mozilla.chimera.preference.appearance,
|
||||
org.mozilla.chimera.preference.privacy,
|
||||
Chimera.HelpersPrefPane,
|
||||
Chimera.SecurityPrefPane,
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
identifier = chimera;
|
||||
panes = (
|
||||
org.mozilla.chimera.preference.navigation,
|
||||
org.mozilla.chimera.preference.appearance,
|
||||
org.mozilla.chimera.preference.privacy,
|
||||
Chimera.SitesPrefPane,
|
||||
Chimera.HelpersPrefPane,
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
( Chimera.SitesPrefPane,
|
||||
org.mozilla.chimera.preference.navigation,
|
||||
org.mozilla.chimera.preference.appearance,
|
||||
org.mozilla.chimera.preference.privacy,
|
||||
Chimera.HelpersPrefPane,
|
||||
Chimera.SecurityPrefPane,
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
identifier = chimera;
|
||||
panes = (
|
||||
org.mozilla.chimera.preference.navigation,
|
||||
org.mozilla.chimera.preference.appearance,
|
||||
org.mozilla.chimera.preference.privacy,
|
||||
Chimera.SitesPrefPane,
|
||||
Chimera.HelpersPrefPane,
|
||||
|
|
|
@ -258,6 +258,7 @@ static NSString *MVPreferencesWindowNotification = @"MVPreferencesWindowNotifica
|
|||
[items addObject:NSToolbarSeparatorItemIdentifier];
|
||||
return items;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation MVPreferencesController (MVPreferencesControllerPrivate)
|
||||
|
@ -340,3 +341,17 @@ static NSString *MVPreferencesWindowNotification = @"MVPreferencesWindowNotifica
|
|||
}
|
||||
@end
|
||||
|
||||
// When using the Font Panel without an obvious target (like an editable text field),
|
||||
// changeFont action messages propagate all the way up the responder chain to here.
|
||||
// There isn't an easy way for individual prefs panes to get themselves into
|
||||
// the responder chain, so we just bounce this message back to the currently
|
||||
// loaded pane.
|
||||
@implementation MVPreferencesController (FontChangeNotifications)
|
||||
|
||||
- (void)changeFont:(id)sender
|
||||
{
|
||||
[[loadedPanes objectForKey:currentPaneIdentifier] changeFont:sender];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>413 91 356 240 0 0 1152 848 </string>
|
||||
<string>185 70 356 240 0 0 1152 746 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
<key>IBGroupedObjects</key>
|
||||
|
@ -17,6 +17,6 @@
|
|||
<key>IBLastGroupID</key>
|
||||
<string>4</string>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичные данные
chimera/PreferencePanes/Personal/English.lproj/Personal.nib/objects.nib
сгенерированный
Двоичные данные
chimera/PreferencePanes/Personal/English.lproj/Personal.nib/objects.nib
сгенерированный
Двоичный файл не отображается.
|
@ -3,7 +3,7 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>413 91 356 240 0 0 1152 848 </string>
|
||||
<string>185 70 356 240 0 0 1152 746 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
<key>IBGroupedObjects</key>
|
||||
|
@ -17,6 +17,6 @@
|
|||
<key>IBLastGroupID</key>
|
||||
<string>4</string>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичный файл не отображается.
|
@ -41,7 +41,8 @@
|
|||
char *buf = nsnull;
|
||||
nsresult rv = mPrefService->GetCharPref(prefName, &buf);
|
||||
if (NS_SUCCEEDED(rv) && buf) {
|
||||
prefValue = [NSString stringWithCString:buf];
|
||||
// prefs are UTF-8
|
||||
prefValue = [NSString stringWithUTF8String:buf];
|
||||
free(buf);
|
||||
if (outSuccess) *outSuccess = YES;
|
||||
} else {
|
||||
|
@ -93,8 +94,9 @@
|
|||
|
||||
- (void)setPref: (const char*)prefName toString:(NSString*)value
|
||||
{
|
||||
// prefs are UTF-8
|
||||
if (mPrefService) {
|
||||
mPrefService->SetCharPref(prefName, [value cString]);
|
||||
mPrefService->SetCharPref(prefName, [value UTF8String]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
( Chimera.SitesPrefPane,
|
||||
org.mozilla.chimera.preference.navigation,
|
||||
org.mozilla.chimera.preference.appearance,
|
||||
org.mozilla.chimera.preference.privacy,
|
||||
Chimera.HelpersPrefPane,
|
||||
Chimera.SecurityPrefPane,
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
identifier = chimera;
|
||||
panes = (
|
||||
org.mozilla.chimera.preference.navigation,
|
||||
org.mozilla.chimera.preference.appearance,
|
||||
org.mozilla.chimera.preference.privacy,
|
||||
Chimera.SitesPrefPane,
|
||||
Chimera.HelpersPrefPane,
|
||||
|
|
Загрузка…
Ссылка в новой задаче