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:
sfraser%netscape.com 2002-07-16 17:45:48 +00:00
Родитель 5bd90cc075
Коммит 8236111517
20 изменённых файлов: 54 добавлений и 12 удалений

Просмотреть файл

@ -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 сгенерированный

Двоичный файл не отображается.

Просмотреть файл

@ -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/Personal.nib/objects.nib сгенерированный

Двоичный файл не отображается.

Просмотреть файл

@ -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 сгенерированный

Двоичный файл не отображается.

Просмотреть файл

@ -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/Personal.nib/objects.nib сгенерированный

Двоичный файл не отображается.

Просмотреть файл

@ -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,