diff --git a/mozilla/camino/Camino.xcodeproj/project.pbxproj b/mozilla/camino/Camino.xcodeproj/project.pbxproj index 1e99fdc6be0..c5a1ba2045a 100644 --- a/mozilla/camino/Camino.xcodeproj/project.pbxproj +++ b/mozilla/camino/Camino.xcodeproj/project.pbxproj @@ -287,6 +287,10 @@ 33B777E20C55890200A6D67F /* libmozlcms.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 33B777E10C5588E500A6D67F /* libmozlcms.a */; }; 33B778810C55C58500A6D67F /* libnssdbm3.dylib in Copy Security Libraries */ = {isa = PBXBuildFile; fileRef = 33B778800C55C57800A6D67F /* libnssdbm3.dylib */; }; 33B778820C55C59A00A6D67F /* libnssdbm3.dylib in Copy Security Libraries */ = {isa = PBXBuildFile; fileRef = 33B778800C55C57800A6D67F /* libnssdbm3.dylib */; }; + 33C222860D106CDD00611936 /* PreferencesWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 33C222840D106CDD00611936 /* PreferencesWindow.h */; }; + 33C222870D106CDD00611936 /* PreferencesWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 33C222850D106CDD00611936 /* PreferencesWindow.m */; }; + 33C222880D106CDD00611936 /* PreferencesWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 33C222840D106CDD00611936 /* PreferencesWindow.h */; }; + 33C222890D106CDD00611936 /* PreferencesWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 33C222850D106CDD00611936 /* PreferencesWindow.m */; }; 33F3B70B0C63F5F7007DFBD0 /* ScriptingSupport.mm in Sources */ = {isa = PBXBuildFile; fileRef = 33F3B70A0C63F5F7007DFBD0 /* ScriptingSupport.mm */; }; 33F3B70C0C63F5F7007DFBD0 /* ScriptingSupport.mm in Sources */ = {isa = PBXBuildFile; fileRef = 33F3B70A0C63F5F7007DFBD0 /* ScriptingSupport.mm */; }; 33FBAAF80C84D0AB00DD459E /* NSString+Gecko.h in Headers */ = {isa = PBXBuildFile; fileRef = 33FBAAF30C84D0A500DD459E /* NSString+Gecko.h */; }; @@ -2474,6 +2478,8 @@ 33B777950C55851800A6D67F /* libmozlcms.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libmozlcms.dylib; path = ../dist/bin/libmozlcms.dylib; sourceTree = SOURCE_ROOT; }; 33B777E10C5588E500A6D67F /* libmozlcms.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmozlcms.a; path = ../dist/lib/libmozlcms.a; sourceTree = SOURCE_ROOT; }; 33B778800C55C57800A6D67F /* libnssdbm3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libnssdbm3.dylib; path = ../dist/lib/libnssdbm3.dylib; sourceTree = SOURCE_ROOT; }; + 33C222840D106CDD00611936 /* PreferencesWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreferencesWindow.h; sourceTree = ""; }; + 33C222850D106CDD00611936 /* PreferencesWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PreferencesWindow.m; sourceTree = ""; }; 33F3B70A0C63F5F7007DFBD0 /* ScriptingSupport.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = ScriptingSupport.mm; path = src/appleevents/ScriptingSupport.mm; sourceTree = ""; }; 33FBAAF30C84D0A500DD459E /* NSString+Gecko.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = "NSString+Gecko.h"; path = "src/extensions/NSString+Gecko.h"; sourceTree = ""; }; 33FBAAFA0C84D0CA00DD459E /* NSString+Gecko.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = "NSString+Gecko.mm"; path = "src/extensions/NSString+Gecko.mm"; sourceTree = ""; }; @@ -4503,6 +4509,8 @@ F53F21EC022B7C77010001CA /* MVPreferencePaneDefaults.plist */, F53F21EF022B7C77010001CA /* MVPreferencesController.h */, F53F21F0022B7C77010001CA /* MVPreferencesController.mm */, + 33C222840D106CDD00611936 /* PreferencesWindow.h */, + 33C222850D106CDD00611936 /* PreferencesWindow.m */, ); name = "Prefs window"; sourceTree = ""; @@ -4764,6 +4772,7 @@ 337F2BA40CA200D100572F7D /* ContentDispatchChooser.h in Headers */, DE70BE710CBC7CB400C1CC63 /* ToolbarScriptItem.h in Headers */, 7B06E8140D0DC83B0032E38A /* PreferencePaneBase.h in Headers */, + 33C222860D106CDD00611936 /* PreferencesWindow.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -4935,6 +4944,7 @@ 337F2BA60CA200D100572F7D /* ContentDispatchChooser.h in Headers */, DE70BE730CBC7CB400C1CC63 /* ToolbarScriptItem.h in Headers */, 7B06E8150D0DC8800032E38A /* PreferencePaneBase.h in Headers */, + 33C222880D106CDD00611936 /* PreferencesWindow.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5203,6 +5213,7 @@ ProjectRef = 7B64B7BA0CCFD9F50098406C /* Sparkle.xcodeproj */; }, ); + projectRoot = ""; targets = ( 7BDD26CC0D0DC2BA00BA05C6 /* Camino */, 7BDD26E30D0DC30600BA05C6 /* CaminoStatic */, @@ -5807,6 +5818,7 @@ 337F2BA50CA200D100572F7D /* ContentDispatchChooser.mm in Sources */, DE70BE700CBC7CB400C1CC63 /* ToolbarScriptItem.mm in Sources */, 7B06E8160D0DC8C20032E38A /* PreferencePaneBase.mm in Sources */, + 33C222870D106CDD00611936 /* PreferencesWindow.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5973,6 +5985,7 @@ 337F2BA70CA200D100572F7D /* ContentDispatchChooser.mm in Sources */, DE70BE720CBC7CB400C1CC63 /* ToolbarScriptItem.mm in Sources */, 7B06E8170D0DC8DC0032E38A /* PreferencePaneBase.mm in Sources */, + 33C222890D106CDD00611936 /* PreferencesWindow.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/mozilla/camino/resources/localized/English.lproj/MVPreferences.nib/classes.nib b/mozilla/camino/resources/localized/English.lproj/MVPreferences.nib/classes.nib index 42dd0f10df9..290cca02de2 100644 --- a/mozilla/camino/resources/localized/English.lproj/MVPreferences.nib/classes.nib +++ b/mozilla/camino/resources/localized/English.lproj/MVPreferences.nib/classes.nib @@ -12,7 +12,8 @@ mWindow = NSWindow; }; SUPERCLASS = NSObject; - } + }, + {CLASS = PreferencesWindow; LANGUAGE = ObjC; SUPERCLASS = NSWindow; } ); IBVersion = 1; } \ No newline at end of file diff --git a/mozilla/camino/resources/localized/English.lproj/MVPreferences.nib/info.nib b/mozilla/camino/resources/localized/English.lproj/MVPreferences.nib/info.nib index c8d190b4c58..5f5001f5e9a 100644 --- a/mozilla/camino/resources/localized/English.lproj/MVPreferences.nib/info.nib +++ b/mozilla/camino/resources/localized/English.lproj/MVPreferences.nib/info.nib @@ -3,15 +3,15 @@ IBDocumentLocation - 100 32 356 240 0 0 1600 1002 + 87 27 356 240 0 0 1440 878 IBEditorPositions 11 475 522 615 292 0 0 1600 1002 IBFramework Version - 437.0 + 446.1 IBSystem Version - 8C46 + 8S2167 diff --git a/mozilla/camino/resources/localized/English.lproj/MVPreferences.nib/keyedobjects.nib b/mozilla/camino/resources/localized/English.lproj/MVPreferences.nib/keyedobjects.nib index 8f82161a806..784c589565a 100644 Binary files a/mozilla/camino/resources/localized/English.lproj/MVPreferences.nib/keyedobjects.nib and b/mozilla/camino/resources/localized/English.lproj/MVPreferences.nib/keyedobjects.nib differ diff --git a/mozilla/camino/src/preferences/MVPreferencesController.mm b/mozilla/camino/src/preferences/MVPreferencesController.mm index c164bfef56a..b9410a5e350 100644 --- a/mozilla/camino/src/preferences/MVPreferencesController.mm +++ b/mozilla/camino/src/preferences/MVPreferencesController.mm @@ -162,6 +162,10 @@ static NSString* const CacheInfoPaneSeenKey = @"MVPreferencePaneSeen"; // N [toolbar setAlwaysCustomizableByDrag:NO]; [toolbar setShowsContextMenu:NO]; [mWindow setToolbar:toolbar]; + [toolbar setVisible:YES]; + + // Prevent hiding the toolbar. + [mWindow setShowsToolbarButton:NO]; // save/restore the top-left window frame (because our size changes confuse the standard frame saving) // (Cocoa will ensure that the window isn't placed totally offscreen) diff --git a/mozilla/camino/src/preferences/PreferencesWindow.h b/mozilla/camino/src/preferences/PreferencesWindow.h new file mode 100644 index 00000000000..e146d205e14 --- /dev/null +++ b/mozilla/camino/src/preferences/PreferencesWindow.h @@ -0,0 +1,46 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Camino code. + * + * The Initial Developer of the Original Code is + * Stuart Morgan. + * Portions created by the Initial Developer are Copyright (C) 2007 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Stuart Morgan + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#import + + +// Provides custom behaviors for the preferences window. +@interface PreferencesWindow : NSWindow { + +} + +@end diff --git a/mozilla/camino/src/preferences/PreferencesWindow.m b/mozilla/camino/src/preferences/PreferencesWindow.m new file mode 100644 index 00000000000..e5cbe684cad --- /dev/null +++ b/mozilla/camino/src/preferences/PreferencesWindow.m @@ -0,0 +1,51 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Camino code. + * + * The Initial Developer of the Original Code is + * Stuart Morgan. + * Portions created by the Initial Developer are Copyright (C) 2007 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Stuart Morgan + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#import "PreferencesWindow.h" + + +@implementation PreferencesWindow + +- (BOOL)validateMenuItem:(NSMenuItem *)menuItem +{ + // Disable toolbar toggling + if ([menuItem action] == @selector(toggleToolbarShown:)) + return NO; + return [super validateMenuItem:menuItem]; +} + +@end