mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 17:59:34 +00:00
Fix prefs not getting written out (patch from bfoucher@mac.com). Removing
smooth text menu item since the non-atsui version is so much faster, we always want it on.
This commit is contained in:
parent
cf6fe30a58
commit
28b955fa68
6
camino/English.lproj/MainMenu.nib/info.nib
generated
6
camino/English.lproj/MainMenu.nib/info.nib
generated
@ -3,13 +3,13 @@
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>78 90 356 240 0 0 1152 746 </string>
|
||||
<string>78 108 356 240 0 0 1152 848 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>266</key>
|
||||
<string>418 452 277 90 0 0 1152 746 </string>
|
||||
<key>29</key>
|
||||
<string>0 702 446 44 0 0 1152 746 </string>
|
||||
<string>0 804 446 44 0 0 1152 848 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
@ -34,6 +34,6 @@
|
||||
<integer>29</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
<string>5S60</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
BIN
camino/English.lproj/MainMenu.nib/objects.nib
generated
BIN
camino/English.lproj/MainMenu.nib/objects.nib
generated
Binary file not shown.
@ -98,7 +98,6 @@ class BookmarksService;
|
||||
-(IBAction) doStop:(id)aSender;
|
||||
-(IBAction) biggerTextSize:(id)aSender;
|
||||
-(IBAction) smallerTextSize:(id)aSender;
|
||||
-(IBAction) toggleSmoothText:(id)aSender;
|
||||
-(IBAction) viewSource:(id)aSender;
|
||||
|
||||
// Bookmarks menu actions.
|
||||
|
@ -64,7 +64,6 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
{
|
||||
[super dealloc];
|
||||
[mFindDialog release];
|
||||
[mPreferenceManager release];
|
||||
printf("Main controller died.\n");
|
||||
}
|
||||
|
||||
@ -291,7 +290,14 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
mMenuBookmarks->RemoveObserver();
|
||||
delete mMenuBookmarks;
|
||||
mMenuBookmarks = nsnull;
|
||||
|
||||
// Release before calling TermEmbedding since we need to access XPCOM
|
||||
// to save preferences
|
||||
[mPreferenceManager release];
|
||||
|
||||
nsCocoaBrowserService::TermEmbedding();
|
||||
|
||||
[self autorelease];
|
||||
}
|
||||
|
||||
// Bookmarks menu actions.
|
||||
@ -402,28 +408,6 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
[[[mApplication mainWindow] windowController] smallerTextSize];
|
||||
}
|
||||
|
||||
- (IBAction)toggleSmoothText:(id)aSender
|
||||
{
|
||||
// Grab the prefs service and just set the pref directly.
|
||||
nsCOMPtr<nsIPrefBranch> pref(do_GetService("@mozilla.org/preferences-service;1"));
|
||||
if (!pref)
|
||||
return; // Something bad happened if we can't get prefs.
|
||||
|
||||
int mode;
|
||||
pref->GetIntPref("nglayout.mac.renderingmode", &mode);
|
||||
if (mode == 0) {
|
||||
// Turn on ATSUI Quartz.
|
||||
pref->SetIntPref("nglayout.mac.renderingmode", 1);
|
||||
// Check the menu.
|
||||
[aSender setState: NSOnState];
|
||||
} else {
|
||||
// Turn off ATSUI Quartz and use Quickdraw.
|
||||
pref->SetIntPref("nglayout.mac.renderingmode", 0);
|
||||
// Uncheck the menu.
|
||||
[aSender setState: NSOffState];
|
||||
}
|
||||
}
|
||||
|
||||
-(IBAction) viewSource:(id)aSender
|
||||
{
|
||||
NSWindow* mainWindow = [mApplication mainWindow];
|
||||
@ -431,25 +415,9 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
[[mainWindow windowController] viewSource: self];
|
||||
}
|
||||
|
||||
static PRBool gSetupSmoothTextMenu = PR_FALSE;
|
||||
|
||||
-(BOOL)validateMenuItem: (id <NSMenuItem> )aMenuItem
|
||||
{
|
||||
// XXXDWH I should not be using strings here. Not localizable.
|
||||
// SHould use tags instead.
|
||||
if ([[aMenuItem title] isEqualToString: @"Smooth Text"] &&
|
||||
!gSetupSmoothTextMenu) {
|
||||
gSetupSmoothTextMenu = PR_TRUE;
|
||||
// Grab the prefs service and just set the pref directly.
|
||||
nsCOMPtr<nsIPrefBranch> pref(do_GetService("@mozilla.org/preferences-service;1"));
|
||||
int mode;
|
||||
pref->GetIntPref("nglayout.mac.renderingmode", &mode);
|
||||
if (mode == 0)
|
||||
[aMenuItem setState: NSOffState];
|
||||
else
|
||||
[aMenuItem setState: NSOnState];
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
6
camino/MainMenu.nib/info.nib
generated
6
camino/MainMenu.nib/info.nib
generated
@ -3,13 +3,13 @@
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>78 90 356 240 0 0 1152 746 </string>
|
||||
<string>78 108 356 240 0 0 1152 848 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>266</key>
|
||||
<string>418 452 277 90 0 0 1152 746 </string>
|
||||
<key>29</key>
|
||||
<string>0 702 446 44 0 0 1152 746 </string>
|
||||
<string>0 804 446 44 0 0 1152 848 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
@ -34,6 +34,6 @@
|
||||
<integer>29</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
<string>5S60</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
BIN
camino/MainMenu.nib/objects.nib
generated
BIN
camino/MainMenu.nib/objects.nib
generated
Binary file not shown.
@ -3,13 +3,13 @@
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>78 90 356 240 0 0 1152 746 </string>
|
||||
<string>78 108 356 240 0 0 1152 848 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>266</key>
|
||||
<string>418 452 277 90 0 0 1152 746 </string>
|
||||
<key>29</key>
|
||||
<string>0 702 446 44 0 0 1152 746 </string>
|
||||
<string>0 804 446 44 0 0 1152 848 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
@ -34,6 +34,6 @@
|
||||
<integer>29</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
<string>5S60</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
Binary file not shown.
@ -98,7 +98,6 @@ class BookmarksService;
|
||||
-(IBAction) doStop:(id)aSender;
|
||||
-(IBAction) biggerTextSize:(id)aSender;
|
||||
-(IBAction) smallerTextSize:(id)aSender;
|
||||
-(IBAction) toggleSmoothText:(id)aSender;
|
||||
-(IBAction) viewSource:(id)aSender;
|
||||
|
||||
// Bookmarks menu actions.
|
||||
|
@ -64,7 +64,6 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
{
|
||||
[super dealloc];
|
||||
[mFindDialog release];
|
||||
[mPreferenceManager release];
|
||||
printf("Main controller died.\n");
|
||||
}
|
||||
|
||||
@ -291,7 +290,14 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
mMenuBookmarks->RemoveObserver();
|
||||
delete mMenuBookmarks;
|
||||
mMenuBookmarks = nsnull;
|
||||
|
||||
// Release before calling TermEmbedding since we need to access XPCOM
|
||||
// to save preferences
|
||||
[mPreferenceManager release];
|
||||
|
||||
nsCocoaBrowserService::TermEmbedding();
|
||||
|
||||
[self autorelease];
|
||||
}
|
||||
|
||||
// Bookmarks menu actions.
|
||||
@ -402,28 +408,6 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
[[[mApplication mainWindow] windowController] smallerTextSize];
|
||||
}
|
||||
|
||||
- (IBAction)toggleSmoothText:(id)aSender
|
||||
{
|
||||
// Grab the prefs service and just set the pref directly.
|
||||
nsCOMPtr<nsIPrefBranch> pref(do_GetService("@mozilla.org/preferences-service;1"));
|
||||
if (!pref)
|
||||
return; // Something bad happened if we can't get prefs.
|
||||
|
||||
int mode;
|
||||
pref->GetIntPref("nglayout.mac.renderingmode", &mode);
|
||||
if (mode == 0) {
|
||||
// Turn on ATSUI Quartz.
|
||||
pref->SetIntPref("nglayout.mac.renderingmode", 1);
|
||||
// Check the menu.
|
||||
[aSender setState: NSOnState];
|
||||
} else {
|
||||
// Turn off ATSUI Quartz and use Quickdraw.
|
||||
pref->SetIntPref("nglayout.mac.renderingmode", 0);
|
||||
// Uncheck the menu.
|
||||
[aSender setState: NSOffState];
|
||||
}
|
||||
}
|
||||
|
||||
-(IBAction) viewSource:(id)aSender
|
||||
{
|
||||
NSWindow* mainWindow = [mApplication mainWindow];
|
||||
@ -431,25 +415,9 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
[[mainWindow windowController] viewSource: self];
|
||||
}
|
||||
|
||||
static PRBool gSetupSmoothTextMenu = PR_FALSE;
|
||||
|
||||
-(BOOL)validateMenuItem: (id <NSMenuItem> )aMenuItem
|
||||
{
|
||||
// XXXDWH I should not be using strings here. Not localizable.
|
||||
// SHould use tags instead.
|
||||
if ([[aMenuItem title] isEqualToString: @"Smooth Text"] &&
|
||||
!gSetupSmoothTextMenu) {
|
||||
gSetupSmoothTextMenu = PR_TRUE;
|
||||
// Grab the prefs service and just set the pref directly.
|
||||
nsCOMPtr<nsIPrefBranch> pref(do_GetService("@mozilla.org/preferences-service;1"));
|
||||
int mode;
|
||||
pref->GetIntPref("nglayout.mac.renderingmode", &mode);
|
||||
if (mode == 0)
|
||||
[aMenuItem setState: NSOffState];
|
||||
else
|
||||
[aMenuItem setState: NSOnState];
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
6
chimera/English.lproj/MainMenu.nib/info.nib
generated
6
chimera/English.lproj/MainMenu.nib/info.nib
generated
@ -3,13 +3,13 @@
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>78 90 356 240 0 0 1152 746 </string>
|
||||
<string>78 108 356 240 0 0 1152 848 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>266</key>
|
||||
<string>418 452 277 90 0 0 1152 746 </string>
|
||||
<key>29</key>
|
||||
<string>0 702 446 44 0 0 1152 746 </string>
|
||||
<string>0 804 446 44 0 0 1152 848 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
@ -34,6 +34,6 @@
|
||||
<integer>29</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
<string>5S60</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
BIN
chimera/English.lproj/MainMenu.nib/objects.nib
generated
BIN
chimera/English.lproj/MainMenu.nib/objects.nib
generated
Binary file not shown.
@ -98,7 +98,6 @@ class BookmarksService;
|
||||
-(IBAction) doStop:(id)aSender;
|
||||
-(IBAction) biggerTextSize:(id)aSender;
|
||||
-(IBAction) smallerTextSize:(id)aSender;
|
||||
-(IBAction) toggleSmoothText:(id)aSender;
|
||||
-(IBAction) viewSource:(id)aSender;
|
||||
|
||||
// Bookmarks menu actions.
|
||||
|
@ -64,7 +64,6 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
{
|
||||
[super dealloc];
|
||||
[mFindDialog release];
|
||||
[mPreferenceManager release];
|
||||
printf("Main controller died.\n");
|
||||
}
|
||||
|
||||
@ -291,7 +290,14 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
mMenuBookmarks->RemoveObserver();
|
||||
delete mMenuBookmarks;
|
||||
mMenuBookmarks = nsnull;
|
||||
|
||||
// Release before calling TermEmbedding since we need to access XPCOM
|
||||
// to save preferences
|
||||
[mPreferenceManager release];
|
||||
|
||||
nsCocoaBrowserService::TermEmbedding();
|
||||
|
||||
[self autorelease];
|
||||
}
|
||||
|
||||
// Bookmarks menu actions.
|
||||
@ -402,28 +408,6 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
[[[mApplication mainWindow] windowController] smallerTextSize];
|
||||
}
|
||||
|
||||
- (IBAction)toggleSmoothText:(id)aSender
|
||||
{
|
||||
// Grab the prefs service and just set the pref directly.
|
||||
nsCOMPtr<nsIPrefBranch> pref(do_GetService("@mozilla.org/preferences-service;1"));
|
||||
if (!pref)
|
||||
return; // Something bad happened if we can't get prefs.
|
||||
|
||||
int mode;
|
||||
pref->GetIntPref("nglayout.mac.renderingmode", &mode);
|
||||
if (mode == 0) {
|
||||
// Turn on ATSUI Quartz.
|
||||
pref->SetIntPref("nglayout.mac.renderingmode", 1);
|
||||
// Check the menu.
|
||||
[aSender setState: NSOnState];
|
||||
} else {
|
||||
// Turn off ATSUI Quartz and use Quickdraw.
|
||||
pref->SetIntPref("nglayout.mac.renderingmode", 0);
|
||||
// Uncheck the menu.
|
||||
[aSender setState: NSOffState];
|
||||
}
|
||||
}
|
||||
|
||||
-(IBAction) viewSource:(id)aSender
|
||||
{
|
||||
NSWindow* mainWindow = [mApplication mainWindow];
|
||||
@ -431,25 +415,9 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
[[mainWindow windowController] viewSource: self];
|
||||
}
|
||||
|
||||
static PRBool gSetupSmoothTextMenu = PR_FALSE;
|
||||
|
||||
-(BOOL)validateMenuItem: (id <NSMenuItem> )aMenuItem
|
||||
{
|
||||
// XXXDWH I should not be using strings here. Not localizable.
|
||||
// SHould use tags instead.
|
||||
if ([[aMenuItem title] isEqualToString: @"Smooth Text"] &&
|
||||
!gSetupSmoothTextMenu) {
|
||||
gSetupSmoothTextMenu = PR_TRUE;
|
||||
// Grab the prefs service and just set the pref directly.
|
||||
nsCOMPtr<nsIPrefBranch> pref(do_GetService("@mozilla.org/preferences-service;1"));
|
||||
int mode;
|
||||
pref->GetIntPref("nglayout.mac.renderingmode", &mode);
|
||||
if (mode == 0)
|
||||
[aMenuItem setState: NSOffState];
|
||||
else
|
||||
[aMenuItem setState: NSOnState];
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
6
chimera/MainMenu.nib/info.nib
generated
6
chimera/MainMenu.nib/info.nib
generated
@ -3,13 +3,13 @@
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>78 90 356 240 0 0 1152 746 </string>
|
||||
<string>78 108 356 240 0 0 1152 848 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>266</key>
|
||||
<string>418 452 277 90 0 0 1152 746 </string>
|
||||
<key>29</key>
|
||||
<string>0 702 446 44 0 0 1152 746 </string>
|
||||
<string>0 804 446 44 0 0 1152 848 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
@ -34,6 +34,6 @@
|
||||
<integer>29</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
<string>5S60</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
BIN
chimera/MainMenu.nib/objects.nib
generated
BIN
chimera/MainMenu.nib/objects.nib
generated
Binary file not shown.
@ -3,13 +3,13 @@
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>78 90 356 240 0 0 1152 746 </string>
|
||||
<string>78 108 356 240 0 0 1152 848 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>266</key>
|
||||
<string>418 452 277 90 0 0 1152 746 </string>
|
||||
<key>29</key>
|
||||
<string>0 702 446 44 0 0 1152 746 </string>
|
||||
<string>0 804 446 44 0 0 1152 848 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
@ -34,6 +34,6 @@
|
||||
<integer>29</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
<string>5S60</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
Binary file not shown.
@ -98,7 +98,6 @@ class BookmarksService;
|
||||
-(IBAction) doStop:(id)aSender;
|
||||
-(IBAction) biggerTextSize:(id)aSender;
|
||||
-(IBAction) smallerTextSize:(id)aSender;
|
||||
-(IBAction) toggleSmoothText:(id)aSender;
|
||||
-(IBAction) viewSource:(id)aSender;
|
||||
|
||||
// Bookmarks menu actions.
|
||||
|
@ -64,7 +64,6 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
{
|
||||
[super dealloc];
|
||||
[mFindDialog release];
|
||||
[mPreferenceManager release];
|
||||
printf("Main controller died.\n");
|
||||
}
|
||||
|
||||
@ -291,7 +290,14 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
mMenuBookmarks->RemoveObserver();
|
||||
delete mMenuBookmarks;
|
||||
mMenuBookmarks = nsnull;
|
||||
|
||||
// Release before calling TermEmbedding since we need to access XPCOM
|
||||
// to save preferences
|
||||
[mPreferenceManager release];
|
||||
|
||||
nsCocoaBrowserService::TermEmbedding();
|
||||
|
||||
[self autorelease];
|
||||
}
|
||||
|
||||
// Bookmarks menu actions.
|
||||
@ -402,28 +408,6 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
[[[mApplication mainWindow] windowController] smallerTextSize];
|
||||
}
|
||||
|
||||
- (IBAction)toggleSmoothText:(id)aSender
|
||||
{
|
||||
// Grab the prefs service and just set the pref directly.
|
||||
nsCOMPtr<nsIPrefBranch> pref(do_GetService("@mozilla.org/preferences-service;1"));
|
||||
if (!pref)
|
||||
return; // Something bad happened if we can't get prefs.
|
||||
|
||||
int mode;
|
||||
pref->GetIntPref("nglayout.mac.renderingmode", &mode);
|
||||
if (mode == 0) {
|
||||
// Turn on ATSUI Quartz.
|
||||
pref->SetIntPref("nglayout.mac.renderingmode", 1);
|
||||
// Check the menu.
|
||||
[aSender setState: NSOnState];
|
||||
} else {
|
||||
// Turn off ATSUI Quartz and use Quickdraw.
|
||||
pref->SetIntPref("nglayout.mac.renderingmode", 0);
|
||||
// Uncheck the menu.
|
||||
[aSender setState: NSOffState];
|
||||
}
|
||||
}
|
||||
|
||||
-(IBAction) viewSource:(id)aSender
|
||||
{
|
||||
NSWindow* mainWindow = [mApplication mainWindow];
|
||||
@ -431,25 +415,9 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
||||
[[mainWindow windowController] viewSource: self];
|
||||
}
|
||||
|
||||
static PRBool gSetupSmoothTextMenu = PR_FALSE;
|
||||
|
||||
-(BOOL)validateMenuItem: (id <NSMenuItem> )aMenuItem
|
||||
{
|
||||
// XXXDWH I should not be using strings here. Not localizable.
|
||||
// SHould use tags instead.
|
||||
if ([[aMenuItem title] isEqualToString: @"Smooth Text"] &&
|
||||
!gSetupSmoothTextMenu) {
|
||||
gSetupSmoothTextMenu = PR_TRUE;
|
||||
// Grab the prefs service and just set the pref directly.
|
||||
nsCOMPtr<nsIPrefBranch> pref(do_GetService("@mozilla.org/preferences-service;1"));
|
||||
int mode;
|
||||
pref->GetIntPref("nglayout.mac.renderingmode", &mode);
|
||||
if (mode == 0)
|
||||
[aMenuItem setState: NSOffState];
|
||||
else
|
||||
[aMenuItem setState: NSOnState];
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user