Compare commits
38 Commits
CAMINO_2_0
...
Bugzilla_P
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c591d53e2 | ||
|
|
c1aa983fd5 | ||
|
|
3551227412 | ||
|
|
d0cc91f285 | ||
|
|
65ff7d56b3 | ||
|
|
800eccde9a | ||
|
|
5360e5b008 | ||
|
|
da759055dd | ||
|
|
1f960bb1bd | ||
|
|
e0f4b89db1 | ||
|
|
025b6e8e46 | ||
|
|
704f46aa53 | ||
|
|
f26338df7e | ||
|
|
58548c3f0d | ||
|
|
9a6b4393ad | ||
|
|
4316819604 | ||
|
|
9d93dfabb8 | ||
|
|
d2ddb07675 | ||
|
|
66d426dc97 | ||
|
|
b7e91cb3b6 | ||
|
|
5ac0899827 | ||
|
|
4f49e57a3b | ||
|
|
38c27be28f | ||
|
|
d60d3d6121 | ||
|
|
db0b87fb6c | ||
|
|
6e2791a4b7 | ||
|
|
14542c62c7 | ||
|
|
38ebcba576 | ||
|
|
a5502157a9 | ||
|
|
ba69b37618 | ||
|
|
22b863a5e9 | ||
|
|
3e54979994 | ||
|
|
d73ca44c76 | ||
|
|
a4fc52b12e | ||
|
|
353baca797 | ||
|
|
4618ab6c36 | ||
|
|
faaed9c15f | ||
|
|
675f64d0ae |
@@ -1,142 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# ***** 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 the Mozilla Mac OS X Universal Binary Packaging System
|
||||
#
|
||||
# The Initial Developer of the Original Code is Google Inc.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Mark Mentovai <mark@moxienet.com> (Original Author)
|
||||
#
|
||||
# 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 *****
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Archive::Zip(':ERROR_CODES');
|
||||
|
||||
my ($BUILDCONFIG);
|
||||
|
||||
sub fixBuildconfig($$);
|
||||
|
||||
$BUILDCONFIG = 'content/global/buildconfig.html';
|
||||
|
||||
if (scalar(@ARGV) != 2) {
|
||||
print STDERR ("usage: fix-buildconfig <zipfile1> <zipfile2>\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!fixBuildconfig($ARGV[0], $ARGV[1])) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
exit(0);
|
||||
|
||||
sub fixBuildconfig($$) {
|
||||
my ($zipPath1, $zipPath2);
|
||||
($zipPath1, $zipPath2) = @_;
|
||||
|
||||
my ($ze, $zip1, $zip2);
|
||||
|
||||
$zip1 = Archive::Zip->new();
|
||||
if (($ze = $zip1->read($zipPath1)) != AZ_OK) {
|
||||
print STDERR ($0.': could not read "'.$zipPath1.'": error '.$ze."\n");
|
||||
return 0;
|
||||
}
|
||||
$zip2 = Archive::Zip->new();
|
||||
if (($ze = $zip2->read($zipPath2)) != AZ_OK) {
|
||||
print STDERR ($0.': could not read "'.$zipPath2.'": error '.$ze."\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
my ($contents1, $contents2);
|
||||
if (!defined($contents1 = $zip1->contents($BUILDCONFIG))) {
|
||||
print STDERR ($0.': could not get "'.$BUILDCONFIG.'" from "'.$zipPath1.'"'.
|
||||
"\n");
|
||||
return 0;
|
||||
}
|
||||
if (!defined($contents2 = $zip2->contents($BUILDCONFIG))) {
|
||||
print STDERR ($0.': could not get "'.$BUILDCONFIG.'" from "'.$zipPath2.'"'.
|
||||
"\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
my (@lines1, @lines2);
|
||||
@lines1 = split(/\n/, $contents1);
|
||||
@lines2 = split(/\n/, $contents2);
|
||||
|
||||
my ($line, @linesNew);
|
||||
@linesNew = ();
|
||||
|
||||
# Copy everything from the first file up to the end of its <body>.
|
||||
while ($line = shift(@lines1)) {
|
||||
if ($line eq '</body>') {
|
||||
last;
|
||||
}
|
||||
push(@linesNew, $line);
|
||||
}
|
||||
|
||||
# Insert a <hr> between the two files.
|
||||
push (@linesNew, '<hr> </hr>');
|
||||
|
||||
# Copy the second file's content beginning after its leading <h1> and <p>.
|
||||
while ($line = shift(@lines2)) {
|
||||
if ($line eq '<p> </p>') {
|
||||
last;
|
||||
}
|
||||
}
|
||||
while ($line = shift(@lines2)) {
|
||||
push(@linesNew, $line);
|
||||
}
|
||||
|
||||
my ($contentsNew);
|
||||
$contentsNew = join("\n", @linesNew);
|
||||
|
||||
if (!defined($zip1->contents($BUILDCONFIG, $contentsNew))) {
|
||||
print STDERR ($0.': could not set "'.$BUILDCONFIG.'" to "'.$zipPath1.'"'.
|
||||
"\n");
|
||||
return 0;
|
||||
}
|
||||
if (!defined($zip2->contents($BUILDCONFIG, $contentsNew))) {
|
||||
print STDERR ($0.': could not set "'.$BUILDCONFIG.'" to "'.$zipPath2.'"'.
|
||||
"\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (($ze = $zip1->overwrite()) != AZ_OK) {
|
||||
print STDERR ($0.': could not write "'.$zipPath1.'": error '.$ze."\n");
|
||||
return 0;
|
||||
}
|
||||
if (($ze = $zip2->overwrite()) != AZ_OK) {
|
||||
print STDERR ($0.': could not write "'.$zipPath2.'": error '.$ze."\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
# ***** 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 the Mozilla Mac OS X Universal Binary Packaging System
|
||||
#
|
||||
# The Initial Developer of the Original Code is Google Inc.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Mark Mentovai <mark@moxienet.com> (Original Author)
|
||||
#
|
||||
# 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 *****
|
||||
|
||||
# BE CAREFUL! This makefile handles a postflight_all rule for a
|
||||
# multi-project build, so DON'T rely on anything that might differ between
|
||||
# the two OBJDIRs.
|
||||
|
||||
ifndef OBJDIR
|
||||
OBJDIR_PPC = $(MOZ_OBJDIR)/ppc
|
||||
OBJDIR_X86 = $(MOZ_OBJDIR)/i386
|
||||
DIST_PPC = $(OBJDIR_PPC)/dist
|
||||
DIST_X86 = $(OBJDIR_X86)/dist
|
||||
DIST_UNI = $(DIST_PPC)/universal
|
||||
OBJDIR = $(OBJDIR_PPC)
|
||||
endif
|
||||
|
||||
include $(OBJDIR)/config/autoconf.mk
|
||||
|
||||
DIST = $(OBJDIR)/dist
|
||||
|
||||
ifdef MOZ_DEBUG
|
||||
DBGTAG = Debug
|
||||
else
|
||||
DBGTAG =
|
||||
endif
|
||||
|
||||
ifdef LIBXUL_SDK # {
|
||||
APP_CONTENTS = Contents/Frameworks/XUL.framework
|
||||
else # } {
|
||||
APP_CONTENTS = Contents/MacOS
|
||||
endif # } LIBXUL_SDK
|
||||
|
||||
ifeq ($(MOZ_BUILD_APP),camino) # {
|
||||
INSTALLER_DIR = camino/installer
|
||||
MOZ_PKG_APPNAME = camino
|
||||
APPNAME = Camino.app
|
||||
BUILDCONFIG_JAR = Contents/MacOS/chrome/embed.jar
|
||||
else # } {
|
||||
MOZ_PKG_APPNAME = $(MOZ_APP_NAME)
|
||||
APPNAME = $(MOZ_APP_DISPLAYNAME)$(DBGTAG).app
|
||||
INSTALLER_DIR = $(MOZ_BUILD_APP)/installer
|
||||
ifeq ($(MOZ_BUILD_APP),xulrunner) # {
|
||||
INSTALLER_DIR = xulrunner/installer/mac
|
||||
APPNAME = XUL.framework
|
||||
APP_CONTENTS = Versions/Current
|
||||
endif # } xulrunner
|
||||
BUILDCONFIG_JAR = $(APP_CONTENTS)/chrome/toolkit.jar
|
||||
endif # } !camino
|
||||
|
||||
postflight_all:
|
||||
# Build the universal package out of only the bits that would be released.
|
||||
# Call the packager to set this up. Set UNIVERSAL_BINARY= to avoid producing
|
||||
# a universal binary too early, before the unified bits have been staged.
|
||||
# Set SIGN_NSS= to skip shlibsign.
|
||||
$(MAKE) -C $(OBJDIR_PPC)/$(INSTALLER_DIR) \
|
||||
UNIVERSAL_BINARY= SIGN_NSS= PKG_SKIP_STRIP=1 stage-package
|
||||
$(MAKE) -C $(OBJDIR_X86)/$(INSTALLER_DIR) \
|
||||
UNIVERSAL_BINARY= SIGN_NSS= PKG_SKIP_STRIP=1 stage-package
|
||||
# Remove .chk files that may have been copied from the NSS build. These will
|
||||
# cause unify to warn or fail if present. New .chk files that are
|
||||
# appropriate for the merged libraries will be generated when the universal
|
||||
# dmg is built.
|
||||
rm -f $(DIST_PPC)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(APP_CONTENTS)/*.chk \
|
||||
$(DIST_X86)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(APP_CONTENTS)/*.chk
|
||||
# The only difference betewen the two trees now should be the
|
||||
# about:buildconfig page. Fix it up.
|
||||
$(TOPSRCDIR)/build/macosx/universal/fix-buildconfig \
|
||||
$(DIST_PPC)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(BUILDCONFIG_JAR) \
|
||||
$(DIST_X86)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(BUILDCONFIG_JAR)
|
||||
mkdir -p $(DIST_UNI)/$(MOZ_PKG_APPNAME)
|
||||
rm -f $(DIST_X86)/universal
|
||||
ln -s $(DIST_UNI) $(DIST_X86)/universal
|
||||
rm -rf $(DIST_UNI)/$(MOZ_PKG_APPNAME)/$(APPNAME)
|
||||
$(TOPSRCDIR)/build/macosx/universal/unify \
|
||||
$(DIST_PPC)/$(MOZ_PKG_APPNAME)/$(APPNAME) \
|
||||
$(DIST_X86)/$(MOZ_PKG_APPNAME)/$(APPNAME) \
|
||||
$(DIST_UNI)/$(MOZ_PKG_APPNAME)/$(APPNAME)
|
||||
# A universal .dmg can now be produced by making in either architecture's
|
||||
# INSTALLER_DIR.
|
||||
@@ -1,95 +0,0 @@
|
||||
# ***** 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 the Mozilla Mac OS X Universal Binary Packaging System
|
||||
#
|
||||
# The Initial Developer of the Original Code is Google Inc.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Mark Mentovai <mark@moxienet.com> (Original Author)
|
||||
#
|
||||
# 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 *****
|
||||
|
||||
# As used here, arguments in $MOZ_BUILD_PROJECTS are suitable as arguments
|
||||
# to gcc's -arch parameter.
|
||||
mk_add_options MOZ_BUILD_PROJECTS="ppc i386"
|
||||
|
||||
mk_add_options MOZ_UNIFY_BDATE=1
|
||||
|
||||
mk_add_options MOZ_POSTFLIGHT_ALL+=build/macosx/universal/flight.mk
|
||||
|
||||
DARWIN_VERSION=`uname -r`
|
||||
ac_add_app_options ppc --target=powerpc-apple-darwin$DARWIN_VERSION
|
||||
ac_add_app_options i386 --target=i386-apple-darwin$DARWIN_VERSION
|
||||
|
||||
ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.4u.sdk
|
||||
|
||||
# $MOZ_BUILD_APP is only defined when sourced by configure. That's not a
|
||||
# problem, because the variables it affects only need to be set for
|
||||
# configure.
|
||||
if test -n "$MOZ_BUILD_APP" ; then
|
||||
if test "$MOZ_BUILD_APP" = "i386" -o "$MOZ_BUILD_APP" = "ppc"; then
|
||||
TARGET_CPU=$MOZ_BUILD_APP
|
||||
GCC_VERSION=4.0
|
||||
|
||||
# It's not strictly necessary to specify -arch during native builds, but it
|
||||
# makes the merged about:buildconfig easier to follow, and it reduces
|
||||
# conditionalized differences between builds.
|
||||
CC="gcc-$GCC_VERSION -arch $TARGET_CPU"
|
||||
CXX="g++-$GCC_VERSION -arch $TARGET_CPU"
|
||||
|
||||
# $HOST_CXX is presently unused. $HOST_CC will only be used during a cross
|
||||
# compile. Always use the 4.0 compiler, since it will always be present and
|
||||
# will always work.
|
||||
HOST_CC=gcc-4.0
|
||||
HOST_CXX=g++-4.0
|
||||
|
||||
# These must be set for cross builds, and don't hurt straight builds.
|
||||
RANLIB=ranlib
|
||||
AR=ar
|
||||
AS=$CC
|
||||
LD=ld
|
||||
STRIP="strip -x -S"
|
||||
|
||||
NATIVE_CPU=`uname -p`
|
||||
if test "$NATIVE_CPU" = "powerpc" ; then
|
||||
NATIVE_CPU=ppc
|
||||
fi
|
||||
|
||||
# Let configure know that we mean business.
|
||||
if test "$NATIVE_CPU" != "$TARGET_CPU" ; then
|
||||
CROSS_COMPILE=1
|
||||
fi
|
||||
|
||||
# Each per-CPU build should be entirely oblivious to the fact that a
|
||||
# universal binary will be produced. The exception is packager.mk, which
|
||||
# needs to know to look for universal bits when building the .dmg.
|
||||
UNIVERSAL_BINARY=1
|
||||
|
||||
export CC CXX HOST_CC HOST_CXX RANLIB AR AS LD STRIP
|
||||
fi
|
||||
fi
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,608 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 42;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXAggregateTarget section */
|
||||
53DF6901067E5B8E0090B5B0 /* All */ = {
|
||||
isa = PBXAggregateTarget;
|
||||
buildConfigurationList = 00F3BEC20C4FAF2900E19B0C /* Build configuration list for PBXAggregateTarget "All" */;
|
||||
buildPhases = (
|
||||
);
|
||||
dependencies = (
|
||||
53DF6903067E5B930090B5B0 /* PBXTargetDependency */,
|
||||
53DF6905067E5B930090B5B0 /* PBXTargetDependency */,
|
||||
);
|
||||
name = All;
|
||||
productName = All;
|
||||
};
|
||||
/* End PBXAggregateTarget section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
0F1C93560934047000C95167 /* CaminoViewsInspector.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1C93520934047000C95167 /* CaminoViewsInspector.m */; };
|
||||
0F1C93570934047000C95167 /* CaminoViewsPalette.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1C93530934047000C95167 /* CaminoViewsPalette.m */; };
|
||||
0F67D8D009397D1C00A84327 /* FlippedShrinkWrapView.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 0F67D8CF09397D1C00A84327 /* FlippedShrinkWrapView.tiff */; };
|
||||
0F7EAC5D0932996D0082C3EA /* CHStackView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F7EAC5B0932996D0082C3EA /* CHStackView.m */; };
|
||||
0F7EAC950932C4EE0082C3EA /* NSView+Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F7EAC930932C4EE0082C3EA /* NSView+Utils.m */; };
|
||||
0F7EACFF0932D1090082C3EA /* AutoSizingTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F7EACFD0932D1090082C3EA /* AutoSizingTextField.m */; };
|
||||
0F9481970933E76D00D80EC8 /* ShrinkWrapView.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 0F9481960933E76D00D80EC8 /* ShrinkWrapView.tiff */; };
|
||||
0F9481990933E77200D80EC8 /* StackView.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 0F9481980933E77200D80EC8 /* StackView.tiff */; };
|
||||
0F9481A70933E7BA00D80EC8 /* CaminoViewsPalette.nib in Resources */ = {isa = PBXBuildFile; fileRef = 0F9481A30933E7BA00D80EC8 /* CaminoViewsPalette.nib */; };
|
||||
0F9481A80933E7BA00D80EC8 /* CaminoViewsInspector.nib in Resources */ = {isa = PBXBuildFile; fileRef = 0F9481A50933E7BA00D80EC8 /* CaminoViewsInspector.nib */; };
|
||||
13EB9DBE07DE0F1E00EB933A /* InterfaceBuilder.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 13EB9DBD07DE0F1E00EB933A /* InterfaceBuilder.framework */; };
|
||||
13F8B89007B43554008AE28D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD92D38A0106425D02CA0E72 /* Cocoa.framework */; };
|
||||
546DEAF3067F632A0098DCC4 /* CaminoViewsPaletteFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53DF68FD067E5B5A0090B5B0 /* CaminoViewsPaletteFramework.framework */; };
|
||||
54D33B2906778E3300C9C163 /* CaminoViewsPalette.ibclassdescription in Resources */ = {isa = PBXBuildFile; fileRef = 54D33B2806778E3300C9C163 /* CaminoViewsPalette.ibclassdescription */; };
|
||||
8D1AC9690486D14A00FE50C9 /* palette.table in Resources */ = {isa = PBXBuildFile; fileRef = 0259C583FE90428111CA0C5A /* palette.table */; };
|
||||
8D1AC9700486D14A00FE50C9 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD92D38A0106425D02CA0E72 /* Cocoa.framework */; };
|
||||
8D1AC9800486D23B00FE50C9 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D1AC97F0486D23B00FE50C9 /* InfoPlist.strings */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
53DF6902067E5B930090B5B0 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0259C573FE90428111CA0C5A /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 8D1AC9600486D14A00FE50C9;
|
||||
remoteInfo = CaminoViewsPalette;
|
||||
};
|
||||
53DF6904067E5B930090B5B0 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0259C573FE90428111CA0C5A /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 53DF68FC067E5B5A0090B5B0;
|
||||
remoteInfo = CaminoViewsPaletteFramework;
|
||||
};
|
||||
546DEAEF067F62F70098DCC4 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 0259C573FE90428111CA0C5A /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 53DF68FC067E5B5A0090B5B0;
|
||||
remoteInfo = CaminoViewsPaletteFramework;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
0259C583FE90428111CA0C5A /* palette.table */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = palette.table; path = resources/palette.table; sourceTree = "<group>"; };
|
||||
0F1C93520934047000C95167 /* CaminoViewsInspector.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = CaminoViewsInspector.m; path = src/CaminoViewsInspector.m; sourceTree = SOURCE_ROOT; };
|
||||
0F1C93530934047000C95167 /* CaminoViewsPalette.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = CaminoViewsPalette.m; path = src/CaminoViewsPalette.m; sourceTree = SOURCE_ROOT; };
|
||||
0F1C93540934047000C95167 /* CaminoViewsInspector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CaminoViewsInspector.h; path = src/CaminoViewsInspector.h; sourceTree = SOURCE_ROOT; };
|
||||
0F1C93550934047000C95167 /* CaminoViewsPalette.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CaminoViewsPalette.h; path = src/CaminoViewsPalette.h; sourceTree = SOURCE_ROOT; };
|
||||
0F4523E509401BB100F61E1E /* CaminoViewsFramework_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CaminoViewsFramework_Prefix.pch; path = src/CaminoViewsFramework_Prefix.pch; sourceTree = SOURCE_ROOT; };
|
||||
0F67D8CF09397D1C00A84327 /* FlippedShrinkWrapView.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = FlippedShrinkWrapView.tiff; path = resources/images/FlippedShrinkWrapView.tiff; sourceTree = SOURCE_ROOT; };
|
||||
0F7EAC5A0932996D0082C3EA /* CHStackView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CHStackView.h; path = ../src/extensions/CHStackView.h; sourceTree = SOURCE_ROOT; };
|
||||
0F7EAC5B0932996D0082C3EA /* CHStackView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = CHStackView.m; path = ../src/extensions/CHStackView.m; sourceTree = SOURCE_ROOT; };
|
||||
0F7EAC930932C4EE0082C3EA /* NSView+Utils.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = "NSView+Utils.m"; path = "../src/extensions/NSView+Utils.m"; sourceTree = SOURCE_ROOT; };
|
||||
0F7EAC940932C4EE0082C3EA /* NSView+Utils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = "NSView+Utils.h"; path = "../src/extensions/NSView+Utils.h"; sourceTree = SOURCE_ROOT; };
|
||||
0F7EACFD0932D1090082C3EA /* AutoSizingTextField.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = AutoSizingTextField.m; path = ../src/extensions/AutoSizingTextField.m; sourceTree = SOURCE_ROOT; };
|
||||
0F7EACFE0932D1090082C3EA /* AutoSizingTextField.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AutoSizingTextField.h; path = ../src/extensions/AutoSizingTextField.h; sourceTree = SOURCE_ROOT; };
|
||||
0F9481960933E76D00D80EC8 /* ShrinkWrapView.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = ShrinkWrapView.tiff; path = resources/images/ShrinkWrapView.tiff; sourceTree = "<group>"; };
|
||||
0F9481980933E77200D80EC8 /* StackView.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = StackView.tiff; path = resources/images/StackView.tiff; sourceTree = "<group>"; };
|
||||
0F9481A40933E7BA00D80EC8 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = resources/English.lproj/CaminoViewsPalette.nib; sourceTree = "<group>"; };
|
||||
0F9481A60933E7BA00D80EC8 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = resources/English.lproj/CaminoViewsInspector.nib; sourceTree = "<group>"; };
|
||||
13EB9DBD07DE0F1E00EB933A /* InterfaceBuilder.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = InterfaceBuilder.framework; path = /System/Library/Frameworks/InterfaceBuilder.framework; sourceTree = "<absolute>"; };
|
||||
13F8B88807B434F6008AE28D /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
|
||||
13F8B88907B434F6008AE28D /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
|
||||
13F8B88A07B434F6008AE28D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
||||
32DBCF980370C29C00C91783 /* CaminoViewsPalette_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaminoViewsPalette_Prefix.pch; path = src/CaminoViewsPalette_Prefix.pch; sourceTree = "<group>"; };
|
||||
53DF68FD067E5B5A0090B5B0 /* CaminoViewsPaletteFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CaminoViewsPaletteFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
53DF68FE067E5B5A0090B5B0 /* CaminoViewsPaletteFramework-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = "CaminoViewsPaletteFramework-Info.plist"; path = "resources/CaminoViewsPaletteFramework-Info.plist"; sourceTree = "<group>"; };
|
||||
54D33B2806778E3300C9C163 /* CaminoViewsPalette.ibclassdescription */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CaminoViewsPalette.ibclassdescription; path = resources/CaminoViewsPalette.ibclassdescription; sourceTree = "<group>"; };
|
||||
8D1AC9730486D14A00FE50C9 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = Info.plist; path = resources/Info.plist; sourceTree = "<group>"; };
|
||||
8D1AC9740486D14A00FE50C9 /* CaminoViews.palette */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CaminoViews.palette; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
8D1AC97B0486D23100FE50C9 /* InfoPlist.strings */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = InfoPlist.strings; path = resources/English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
DD92D38A0106425D02CA0E72 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
53DF68FB067E5B5A0090B5B0 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
13F8B89007B43554008AE28D /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
8D1AC96E0486D14A00FE50C9 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D1AC9700486D14A00FE50C9 /* Cocoa.framework in Frameworks */,
|
||||
546DEAF3067F632A0098DCC4 /* CaminoViewsPaletteFramework.framework in Frameworks */,
|
||||
13EB9DBE07DE0F1E00EB933A /* InterfaceBuilder.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
0259C574FE90428111CA0C5A /* CaminoViewsPalette */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
32DBCF9E0370C38000C91783 /* Palette */,
|
||||
54D33B2C06778E4400C9C163 /* Framework */,
|
||||
0259C582FE90428111CA0C5A /* Resources */,
|
||||
1ED78706FE9D4A0611CA0C5A /* Products */,
|
||||
2E58F364FFB232C311CA0CBA /* Frameworks */,
|
||||
);
|
||||
name = CaminoViewsPalette;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0259C582FE90428111CA0C5A /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D1AC9730486D14A00FE50C9 /* Info.plist */,
|
||||
53DF68FE067E5B5A0090B5B0 /* CaminoViewsPaletteFramework-Info.plist */,
|
||||
8D1AC97F0486D23B00FE50C9 /* InfoPlist.strings */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
131E8FE8067F80F40006E0CE /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0F9481A30933E7BA00D80EC8 /* CaminoViewsPalette.nib */,
|
||||
0F9481A50933E7BA00D80EC8 /* CaminoViewsInspector.nib */,
|
||||
0259C583FE90428111CA0C5A /* palette.table */,
|
||||
0F9481960933E76D00D80EC8 /* ShrinkWrapView.tiff */,
|
||||
0F9481980933E77200D80EC8 /* StackView.tiff */,
|
||||
0F67D8CF09397D1C00A84327 /* FlippedShrinkWrapView.tiff */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
13F8B6FD07B43410008AE28D /* Linked Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
13EB9DBD07DE0F1E00EB933A /* InterfaceBuilder.framework */,
|
||||
DD92D38A0106425D02CA0E72 /* Cocoa.framework */,
|
||||
);
|
||||
name = "Linked Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
13F8B70407B43425008AE28D /* Other Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
13F8B88807B434F6008AE28D /* AppKit.framework */,
|
||||
13F8B88907B434F6008AE28D /* CoreData.framework */,
|
||||
13F8B88A07B434F6008AE28D /* Foundation.framework */,
|
||||
);
|
||||
name = "Other Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1ED78706FE9D4A0611CA0C5A /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D1AC9740486D14A00FE50C9 /* CaminoViews.palette */,
|
||||
53DF68FD067E5B5A0090B5B0 /* CaminoViewsPaletteFramework.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2E58F364FFB232C311CA0CBA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
13F8B6FD07B43410008AE28D /* Linked Frameworks */,
|
||||
13F8B70407B43425008AE28D /* Other Frameworks */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
32DBCF9E0370C38000C91783 /* Palette */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
54D33B2406778DD400C9C163 /* Undo Support */,
|
||||
54D33B2506778DF000C9C163 /* Classes */,
|
||||
32DBCF9F0370C38200C91783 /* Other Sources */,
|
||||
131E8FE8067F80F40006E0CE /* Resources */,
|
||||
);
|
||||
name = Palette;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
32DBCF9F0370C38200C91783 /* Other Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
32DBCF980370C29C00C91783 /* CaminoViewsPalette_Prefix.pch */,
|
||||
0F4523E509401BB100F61E1E /* CaminoViewsFramework_Prefix.pch */,
|
||||
);
|
||||
name = "Other Sources";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
54D33B2406778DD400C9C163 /* Undo Support */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
54D33B2806778E3300C9C163 /* CaminoViewsPalette.ibclassdescription */,
|
||||
);
|
||||
name = "Undo Support";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
54D33B2506778DF000C9C163 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0F1C93540934047000C95167 /* CaminoViewsInspector.h */,
|
||||
0F1C93520934047000C95167 /* CaminoViewsInspector.m */,
|
||||
0F1C93550934047000C95167 /* CaminoViewsPalette.h */,
|
||||
0F1C93530934047000C95167 /* CaminoViewsPalette.m */,
|
||||
);
|
||||
name = Classes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
54D33B2C06778E4400C9C163 /* Framework */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0F7EAC940932C4EE0082C3EA /* NSView+Utils.h */,
|
||||
0F7EAC930932C4EE0082C3EA /* NSView+Utils.m */,
|
||||
0F7EAC5A0932996D0082C3EA /* CHStackView.h */,
|
||||
0F7EAC5B0932996D0082C3EA /* CHStackView.m */,
|
||||
0F7EACFE0932D1090082C3EA /* AutoSizingTextField.h */,
|
||||
0F7EACFD0932D1090082C3EA /* AutoSizingTextField.m */,
|
||||
);
|
||||
name = Framework;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
53DF68F8067E5B5A0090B5B0 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
53DF68FC067E5B5A0090B5B0 /* CaminoViewsFramework */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 00F3BEBA0C4FAF2900E19B0C /* Build configuration list for PBXNativeTarget "CaminoViewsFramework" */;
|
||||
buildPhases = (
|
||||
53DF68F8067E5B5A0090B5B0 /* Headers */,
|
||||
53DF68F9067E5B5A0090B5B0 /* Resources */,
|
||||
53DF68FA067E5B5A0090B5B0 /* Sources */,
|
||||
53DF68FB067E5B5A0090B5B0 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = CaminoViewsFramework;
|
||||
productName = CaminoViewsPaletteFramework;
|
||||
productReference = 53DF68FD067E5B5A0090B5B0 /* CaminoViewsPaletteFramework.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
8D1AC9600486D14A00FE50C9 /* CaminoViewsPalette */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 00F3BEBE0C4FAF2900E19B0C /* Build configuration list for PBXNativeTarget "CaminoViewsPalette" */;
|
||||
buildPhases = (
|
||||
8D1AC9660486D14A00FE50C9 /* Resources */,
|
||||
8D1AC96A0486D14A00FE50C9 /* Sources */,
|
||||
8D1AC96E0486D14A00FE50C9 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
546DEAF0067F62F70098DCC4 /* PBXTargetDependency */,
|
||||
);
|
||||
name = CaminoViewsPalette;
|
||||
productInstallPath = "$(HOME)/Developer/Palettes";
|
||||
productName = CaminoViewsPalette;
|
||||
productReference = 8D1AC9740486D14A00FE50C9 /* CaminoViews.palette */;
|
||||
productType = "com.apple.product-type.bundle";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
0259C573FE90428111CA0C5A /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 00F3BEC60C4FAF2900E19B0C /* Build configuration list for PBXProject "CaminoViewsPalette" */;
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 0259C574FE90428111CA0C5A /* CaminoViewsPalette */;
|
||||
projectDirPath = "";
|
||||
targets = (
|
||||
8D1AC9600486D14A00FE50C9 /* CaminoViewsPalette */,
|
||||
53DF68FC067E5B5A0090B5B0 /* CaminoViewsFramework */,
|
||||
53DF6901067E5B8E0090B5B0 /* All */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
53DF68F9067E5B5A0090B5B0 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
8D1AC9660486D14A00FE50C9 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D1AC9690486D14A00FE50C9 /* palette.table in Resources */,
|
||||
8D1AC9800486D23B00FE50C9 /* InfoPlist.strings in Resources */,
|
||||
54D33B2906778E3300C9C163 /* CaminoViewsPalette.ibclassdescription in Resources */,
|
||||
0F9481970933E76D00D80EC8 /* ShrinkWrapView.tiff in Resources */,
|
||||
0F9481990933E77200D80EC8 /* StackView.tiff in Resources */,
|
||||
0F9481A70933E7BA00D80EC8 /* CaminoViewsPalette.nib in Resources */,
|
||||
0F9481A80933E7BA00D80EC8 /* CaminoViewsInspector.nib in Resources */,
|
||||
0F67D8D009397D1C00A84327 /* FlippedShrinkWrapView.tiff in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
53DF68FA067E5B5A0090B5B0 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
0F7EAC5D0932996D0082C3EA /* CHStackView.m in Sources */,
|
||||
0F7EAC950932C4EE0082C3EA /* NSView+Utils.m in Sources */,
|
||||
0F7EACFF0932D1090082C3EA /* AutoSizingTextField.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
8D1AC96A0486D14A00FE50C9 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
0F1C93560934047000C95167 /* CaminoViewsInspector.m in Sources */,
|
||||
0F1C93570934047000C95167 /* CaminoViewsPalette.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
53DF6903067E5B930090B5B0 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 8D1AC9600486D14A00FE50C9 /* CaminoViewsPalette */;
|
||||
targetProxy = 53DF6902067E5B930090B5B0 /* PBXContainerItemProxy */;
|
||||
};
|
||||
53DF6905067E5B930090B5B0 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 53DF68FC067E5B5A0090B5B0 /* CaminoViewsFramework */;
|
||||
targetProxy = 53DF6904067E5B930090B5B0 /* PBXContainerItemProxy */;
|
||||
};
|
||||
546DEAF0067F62F70098DCC4 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 53DF68FC067E5B5A0090B5B0 /* CaminoViewsFramework */;
|
||||
targetProxy = 546DEAEF067F62F70098DCC4 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
0F9481A30933E7BA00D80EC8 /* CaminoViewsPalette.nib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
0F9481A40933E7BA00D80EC8 /* English */,
|
||||
);
|
||||
name = CaminoViewsPalette.nib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0F9481A50933E7BA00D80EC8 /* CaminoViewsInspector.nib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
0F9481A60933E7BA00D80EC8 /* English */,
|
||||
);
|
||||
name = CaminoViewsInspector.nib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8D1AC97F0486D23B00FE50C9 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
8D1AC97B0486D23100FE50C9 /* InfoPlist.strings */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
00F3BEBB0C4FAF2900E19B0C /* Development */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEPLOYMENT_LOCATION = YES;
|
||||
DSTROOT = /;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
FRAMEWORK_VERSION = A;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = src/CaminoViewsFramework_Prefix.pch;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
INFOPLIST_FILE = "resources/CaminoViewsPaletteFramework-Info.plist";
|
||||
INSTALL_PATH = "$(HOME)/Library/Frameworks";
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = CaminoViewsPaletteFramework;
|
||||
WARNING_CFLAGS = (
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
};
|
||||
name = Development;
|
||||
};
|
||||
00F3BEBC0C4FAF2900E19B0C /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEPLOYMENT_LOCATION = YES;
|
||||
DSTROOT = /;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
FRAMEWORK_VERSION = A;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = src/CaminoViewsFramework_Prefix.pch;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
INFOPLIST_FILE = "resources/CaminoViewsPaletteFramework-Info.plist";
|
||||
INSTALL_PATH = "$(HOME)/Library/Frameworks";
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = CaminoViewsPaletteFramework;
|
||||
WARNING_CFLAGS = (
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
00F3BEBF0C4FAF2900E19B0C /* Development */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEPLOYMENT_LOCATION = YES;
|
||||
DSTROOT = /;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = src/CaminoViewsPalette_Prefix.pch;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
INFOPLIST_FILE = resources/Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Library/Palettes";
|
||||
OTHER_LDFLAGS = "-bundle";
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = CaminoViews;
|
||||
WRAPPER_EXTENSION = palette;
|
||||
};
|
||||
name = Development;
|
||||
};
|
||||
00F3BEC00C4FAF2900E19B0C /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEPLOYMENT_LOCATION = YES;
|
||||
DSTROOT = /;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = src/CaminoViewsPalette_Prefix.pch;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
INFOPLIST_FILE = resources/Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Library/Palettes";
|
||||
OTHER_LDFLAGS = "-bundle";
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = CaminoViews;
|
||||
WRAPPER_EXTENSION = palette;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
00F3BEC30C4FAF2900E19B0C /* Development */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = "";
|
||||
OTHER_REZFLAGS = "";
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = All;
|
||||
SECTORDER_FLAGS = "";
|
||||
WARNING_CFLAGS = (
|
||||
"-Wmost",
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Development;
|
||||
};
|
||||
00F3BEC40C4FAF2900E19B0C /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = "";
|
||||
OTHER_REZFLAGS = "";
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = All;
|
||||
SECTORDER_FLAGS = "";
|
||||
WARNING_CFLAGS = (
|
||||
"-Wmost",
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
00F3BEC70C4FAF2900E19B0C /* Development */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Development;
|
||||
};
|
||||
00F3BEC80C4FAF2900E19B0C /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
00F3BEBA0C4FAF2900E19B0C /* Build configuration list for PBXNativeTarget "CaminoViewsFramework" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
00F3BEBB0C4FAF2900E19B0C /* Development */,
|
||||
00F3BEBC0C4FAF2900E19B0C /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Development;
|
||||
};
|
||||
00F3BEBE0C4FAF2900E19B0C /* Build configuration list for PBXNativeTarget "CaminoViewsPalette" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
00F3BEBF0C4FAF2900E19B0C /* Development */,
|
||||
00F3BEC00C4FAF2900E19B0C /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Development;
|
||||
};
|
||||
00F3BEC20C4FAF2900E19B0C /* Build configuration list for PBXAggregateTarget "All" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
00F3BEC30C4FAF2900E19B0C /* Development */,
|
||||
00F3BEC40C4FAF2900E19B0C /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Development;
|
||||
};
|
||||
00F3BEC60C4FAF2900E19B0C /* Build configuration list for PBXProject "CaminoViewsPalette" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
00F3BEC70C4FAF2900E19B0C /* Development */,
|
||||
00F3BEC80C4FAF2900E19B0C /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Development;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 0259C573FE90428111CA0C5A /* Project object */;
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
# ***** 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 mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2003
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Simon Fraser <smfr@smfr.org>
|
||||
#
|
||||
# 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 *****
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
APP_NAME = Camino
|
||||
|
||||
ifdef MOZ_DEBUG
|
||||
BUILDSTYLE = Development
|
||||
else
|
||||
BUILDSTYLE = Deployment
|
||||
endif
|
||||
|
||||
TARGET = All
|
||||
|
||||
GARBAGE_DIRS += build
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
unexport CC CXX
|
||||
|
||||
ABS_topsrcdir := $(shell cd $(topsrcdir); pwd)
|
||||
|
||||
export::
|
||||
ifneq ($(ABS_topsrcdir),$(MOZ_BUILD_ROOT))
|
||||
rsync -a --exclude .DS_Store --exclude "CVS/" --exclude "*.mode1" --exclude "*.pbxuser" $(srcdir)/CaminoViewsPalette.xcodeproj .
|
||||
ln -fs $(srcdir)/src
|
||||
ln -fs $(srcdir)/resources
|
||||
endif
|
||||
|
||||
libs::
|
||||
$(PBBUILD) -project CaminoViewsPalette.xcodeproj -target $(TARGET) -configuration $(BUILDSTYLE) $(PBBUILD_SETTINGS)
|
||||
|
||||
# convenience target for PB script build phases
|
||||
echo_srcdir:
|
||||
@echo $(srcdir)
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
CHShrinkWrapView = {
|
||||
SuperClass = NSView;
|
||||
Attributes = {
|
||||
};
|
||||
};
|
||||
CHFlippedShrinkWrapView = {
|
||||
SuperClass = CHShrinkWrapView;
|
||||
Attributes = {
|
||||
};
|
||||
};
|
||||
CHStackView = {
|
||||
SuperClass = CHShrinkWrapView;
|
||||
Attributes = {
|
||||
};
|
||||
};
|
||||
AutoSizingTextField = {
|
||||
SuperClass = NSTextField;
|
||||
Attributes = {
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>CaminoViewsFramework</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.mozilla.CaminoViewsFramework</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>CaminoViewsPalette</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
IBClasses = (
|
||||
{
|
||||
CLASS = CaminoViewsPaletteInspector;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = IBInspector;
|
||||
},
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>79 12 356 240 0 0 1600 1002 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>437.0</string>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8F46</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -1,33 +0,0 @@
|
||||
{
|
||||
IBClasses = (
|
||||
{CLASS = AutoSizingTextField; LANGUAGE = ObjC; SUPERCLASS = NSTextField; },
|
||||
{
|
||||
CLASS = CHFlippedShrinkWrapView;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = CHShrinkWrapView;
|
||||
},
|
||||
{CLASS = CHShrinkWrapView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{
|
||||
CLASS = CHStackView;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mDataSource = id; };
|
||||
SUPERCLASS = CHShrinkWrapView;
|
||||
},
|
||||
{
|
||||
CLASS = CaminoViewsPalette;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mFlippedShrinkWrapView = CHFlippedShrinkWrapView;
|
||||
mFlippedShrinkWrapViewImageView = NSImageView;
|
||||
mShrinkWrapView = CHShrinkWrapView;
|
||||
mShrinkWrapViewImageView = NSImageView;
|
||||
mStackView = CHStackView;
|
||||
mStackViewImageView = NSImageView;
|
||||
};
|
||||
SUPERCLASS = IBPalette;
|
||||
},
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{CLASS = NSObject; LANGUAGE = ObjC; }
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>24 103 356 240 0 0 1600 1002 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>437.0</string>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8F46</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>CaminoViews</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.mozilla.caminoIBPalette</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<!-- a subclass of IBPalette -->
|
||||
<key>Class</key> <string>CaminoViewsPalette</string>
|
||||
|
||||
<!-- a nib file name -->
|
||||
<key>NibFile</key> <string>CaminoViewsPalette</string>
|
||||
|
||||
<!-- a tiff file name for icon used for palette -->
|
||||
<key>Icon</key> <string>CaminoViewsPalette</string>
|
||||
|
||||
<!-- Tool Tips string for the palette icon -->
|
||||
<key>ToolTips</key> <string>CaminoViewsPalette</string>
|
||||
|
||||
<!-- a list of class names exported from palette to IB -->
|
||||
<key>ExportClasses</key>
|
||||
<array>
|
||||
<string>CHShrinkWrapView</string>
|
||||
<string>CHStackView</string>
|
||||
<string>AutoSizingTextField</string>
|
||||
</array>
|
||||
|
||||
<!-- a list of image names exported from palette to IB -->
|
||||
<key>ExportImages</key>
|
||||
<array>
|
||||
</array>
|
||||
|
||||
<!-- a list of sound names exported from palette to IB -->
|
||||
<key>ExportSounds</key>
|
||||
<array>
|
||||
</array>
|
||||
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,7 +0,0 @@
|
||||
//
|
||||
// Prefix header for all source files of the 'CaminoViewsFrame' target in the 'CaminoViewsPalette' project
|
||||
//
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#endif
|
||||
@@ -1,14 +0,0 @@
|
||||
//
|
||||
// CaminoViewsInspector.h
|
||||
// CaminoViewsPalette
|
||||
//
|
||||
// Created by Simon Fraser on 21/11/05.
|
||||
// Copyright __MyCompanyName__ 2005. All rights reserved.
|
||||
//
|
||||
|
||||
#import <InterfaceBuilder/InterfaceBuilder.h>
|
||||
|
||||
@interface CaminoViewsInspector : IBInspector
|
||||
{
|
||||
}
|
||||
@end
|
||||
@@ -1,33 +0,0 @@
|
||||
//
|
||||
// CaminoViewsInspector.m
|
||||
// CaminoViewsPalette
|
||||
//
|
||||
// Created by Simon Fraser on 21/11/05.
|
||||
// Copyright __MyCompanyName__ 2005 . All rights reserved.
|
||||
//
|
||||
|
||||
#import "CaminoViewsInspector.h"
|
||||
#import "CaminoViewsPalette.h"
|
||||
|
||||
@implementation CaminoViewsInspector
|
||||
|
||||
- (id)init
|
||||
{
|
||||
self = [super init];
|
||||
[NSBundle loadNibNamed:@"CaminoViewsInspector" owner:self];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)ok:(id)sender
|
||||
{
|
||||
/* Your code Here */
|
||||
[super ok:sender];
|
||||
}
|
||||
|
||||
- (void)revert:(id)sender
|
||||
{
|
||||
/* Your code Here */
|
||||
[super revert:sender];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,59 +0,0 @@
|
||||
//
|
||||
// CaminoViewsPalette.h
|
||||
// CaminoViewsPalette
|
||||
//
|
||||
// Created by Simon Fraser on 21/11/05.
|
||||
// Copyright __MyCompanyName__ 2005 . All rights reserved.
|
||||
//
|
||||
|
||||
#import <InterfaceBuilder/InterfaceBuilder.h>
|
||||
|
||||
#import "CHStackView.h"
|
||||
#import "AutoSizingTextField.h"
|
||||
|
||||
@interface CaminoViewsPalette : IBPalette
|
||||
{
|
||||
IBOutlet NSImageView* mShrinkWrapViewImageView;
|
||||
IBOutlet NSImageView* mFlippedShrinkWrapViewImageView;
|
||||
IBOutlet NSImageView* mStackViewImageView;
|
||||
|
||||
IBOutlet CHShrinkWrapView* mShrinkWrapView;
|
||||
IBOutlet CHFlippedShrinkWrapView* mFlippedShrinkWrapView;
|
||||
IBOutlet CHStackView* mStackView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface NSObject(CaminoViewsInspector)
|
||||
|
||||
+ (BOOL)editingInInterfaceBuilder;
|
||||
|
||||
@end
|
||||
|
||||
@interface CHShrinkWrapView(CaminoViewsInspector)
|
||||
|
||||
- (NSString *)inspectorClassName;
|
||||
- (BOOL)ibIsContainer;
|
||||
|
||||
@end
|
||||
|
||||
@interface CHFlippedShrinkWrapView(CaminoViewsInspector)
|
||||
|
||||
- (NSString *)inspectorClassName;
|
||||
- (BOOL)ibIsContainer;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface CHStackView(CaminoViewsInspector)
|
||||
|
||||
- (NSString *)inspectorClassName;
|
||||
- (BOOL)ibIsContainer;
|
||||
|
||||
@end
|
||||
|
||||
@interface AutoSizingTextField(CaminoViewsInspector)
|
||||
|
||||
- (NSString *)inspectorClassName;
|
||||
|
||||
@end
|
||||
@@ -1,204 +0,0 @@
|
||||
//
|
||||
// CaminoViewsPalette.m
|
||||
// CaminoViewsPalette
|
||||
//
|
||||
// Created by Simon Fraser on 21/11/05.
|
||||
// Copyright __MyCompanyName__ 2005 . All rights reserved.
|
||||
//
|
||||
|
||||
|
||||
#import "CaminoViewsPalette.h"
|
||||
|
||||
@interface NSObject(PrivateAPI)
|
||||
+ (BOOL)isInInterfaceBuilder;
|
||||
@end
|
||||
|
||||
@implementation CaminoViewsPalette
|
||||
|
||||
- (void)finishInstantiate
|
||||
{
|
||||
[self associateObject:mShrinkWrapView
|
||||
ofType:IBViewPboardType
|
||||
withView:mShrinkWrapViewImageView];
|
||||
|
||||
[self associateObject:mFlippedShrinkWrapView
|
||||
ofType:IBViewPboardType
|
||||
withView:mFlippedShrinkWrapViewImageView];
|
||||
|
||||
[self associateObject:mStackView
|
||||
ofType:IBViewPboardType
|
||||
withView:mStackViewImageView];
|
||||
}
|
||||
|
||||
- (NSString*)toolTipForObject:(id)object
|
||||
{
|
||||
if (object == mShrinkWrapViewImageView)
|
||||
return @"CHShrinkWrapView";
|
||||
|
||||
if (object == mFlippedShrinkWrapViewImageView)
|
||||
return @"CHFlippedShrinkWrapView";
|
||||
|
||||
if (object == mStackViewImageView)
|
||||
return @"CHStackView";
|
||||
|
||||
return @"";
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@implementation NSObject(CaminoViewsPalettePaletteInspector)
|
||||
|
||||
+ (BOOL)editingInInterfaceBuilder
|
||||
{
|
||||
return ([self respondsToSelector:@selector(isInInterfaceBuilder)] && [self isInInterfaceBuilder]) &&
|
||||
([NSApp respondsToSelector:@selector(isTestingInterface)] && ![NSApp isTestingInterface]);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@implementation CHShrinkWrapView(CaminoViewsPalettePaletteInspector)
|
||||
|
||||
#if 0
|
||||
- (NSString *)inspectorClassName
|
||||
{
|
||||
return @"CaminoViewsInspector";
|
||||
}
|
||||
#endif
|
||||
|
||||
- (BOOL)ibIsContainer
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)ibDrawFrameWhileResizing
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (id)ibNearestTargetForDrag
|
||||
{
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)canEditSelf
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)ibShouldShowContainerGuides
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)ibSupportsInsideOutSelection
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@implementation CHFlippedShrinkWrapView(CaminoViewsPalettePaletteInspector)
|
||||
|
||||
#if 0
|
||||
- (NSString *)inspectorClassName
|
||||
{
|
||||
return @"CaminoViewsInspector";
|
||||
}
|
||||
#endif
|
||||
|
||||
- (BOOL)ibIsContainer
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)ibDrawFrameWhileResizing
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (id)ibNearestTargetForDrag
|
||||
{
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)canEditSelf
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)ibShouldShowContainerGuides
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)ibSupportsInsideOutSelection
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@implementation CHStackView(CaminoViewsPalettePaletteInspector)
|
||||
|
||||
#if 0
|
||||
- (NSString *)inspectorClassName
|
||||
{
|
||||
return @"CaminoViewsInspector";
|
||||
}
|
||||
#endif
|
||||
|
||||
- (BOOL)ibIsContainer
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)ibDrawFrameWhileResizing
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (id)ibNearestTargetForDrag
|
||||
{
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)canEditSelf
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)ibShouldShowContainerGuides
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)ibSupportsInsideOutSelection
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation AutoSizingTextField(CaminoViewsPalettePaletteInspector)
|
||||
|
||||
#if 0
|
||||
- (NSString *)inspectorClassName
|
||||
{
|
||||
return @"CaminoViewsInspector";
|
||||
}
|
||||
#endif
|
||||
|
||||
- (BOOL)ibDrawFrameWhileResizing
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,8 +0,0 @@
|
||||
//
|
||||
// Prefix header for all source files of the 'CaminoViewsPalette' target in the 'CaminoViewsPalette' project
|
||||
//
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <InterfaceBuilder/InterfaceBuilder.h>
|
||||
#endif
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Appearance</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string></string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Appearance.tiff</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.mozilla.camino.preference.appearance</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Appearance</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>MOZC</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>Appearance</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>OrgMozillaCaminoPreferenceAppearance</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,275 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BreakpadConfirmTimeout</key>
|
||||
<string>0</string>
|
||||
<key>BreakpadReportInterval</key>
|
||||
<string>0</string>
|
||||
<key>BreakpadRequestComments</key>
|
||||
<string>YES</string>
|
||||
<key>BreakpadRequestEmail</key>
|
||||
<string>YES</string>
|
||||
<key>BreakpadServerParameters</key>
|
||||
<dict>
|
||||
<key>BuildID</key>
|
||||
<string>%PLATFORM_BUILD_ID%</string>
|
||||
</dict>
|
||||
<key>BreakpadServerType</key>
|
||||
<string>socorro</string>
|
||||
<key>BreakpadURL</key>
|
||||
<string>%BREAKPAD_UPLOAD_URL%</string>
|
||||
<key>BreakpadVendor</key>
|
||||
<string>the Camino developers</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>html</string>
|
||||
<string>htm</string>
|
||||
<string>shtml</string>
|
||||
<string>xml</string>
|
||||
<string>xhtml</string>
|
||||
<string>shtm</string>
|
||||
<string>xhtm</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>fileHtml.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>HTML Document</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>HTML</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>txt</string>
|
||||
<string>text</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>fileBookmark.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Text Document</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>TEXT</string>
|
||||
<string>utxt</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>jpeg</string>
|
||||
<string>jpg</string>
|
||||
<string>png</string>
|
||||
<string>gif</string>
|
||||
<string>svg</string>
|
||||
<string>svgz</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>fileBookmark.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Image Document</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>GIFf</string>
|
||||
<string>JPEG</string>
|
||||
<string>PNGf</string>
|
||||
<string>SVG </string>
|
||||
<string>SVGZ</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>webloc</string>
|
||||
<string>ftploc</string>
|
||||
<string>url</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>fileBookmark.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Web Document</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>ilht</string>
|
||||
<string>ilft</string>
|
||||
<string>LINK</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>fileBookmark.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Camino bookmark</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>org.mozilla.camino.bookmark</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Camino</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Camino %CM_APP_VERSION%, © 1998-%CM_COPYRIGHT_YEAR% Contributors</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>appicon.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.mozilla.camino</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Camino</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>%CM_APP_VERSION%</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>MOZC</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleURLIconFile</key>
|
||||
<string>fileHtml.icns</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>http URL</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>http</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleURLIconFile</key>
|
||||
<string>fileHtml.icns</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>https URL</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>https</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>ftp URL</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>ftp</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>file URL</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>file</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>%CM_APP_VERSION_CFBUNDLE%</string>
|
||||
<key>CGDisableCoalescedUpdates</key>
|
||||
<true/>
|
||||
<key>com.apple.PreferenceSync.ExcludeSyncKeys</key>
|
||||
<array>
|
||||
<string>SUFeedURL</string>
|
||||
<string>SULastCheckTime</string>
|
||||
</array>
|
||||
<key>LSFileQuarantineEnabled</key>
|
||||
<true/>
|
||||
<key>LSFileQuarantineExcludedPathPatterns</key>
|
||||
<array>
|
||||
<string>~/Library/*</string>
|
||||
</array>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.4</string>
|
||||
<key>MozillaBuildID</key>
|
||||
<string>%PLATFORM_BUILD_ID%</string>
|
||||
<key>MozillaCVSTag</key>
|
||||
<string>%CVS_TAG%</string>
|
||||
<key>MozillaCVSTime</key>
|
||||
<date>%CVS_TIME%</date>
|
||||
<key>MozillaGeckoVersion</key>
|
||||
<string>%PLATFORM_VERSION%</string>
|
||||
<key>NSAppleScriptEnabled</key>
|
||||
<true/>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSServices</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>NSKeyEquivalent</key>
|
||||
<dict>
|
||||
<key>default</key>
|
||||
<string>U</string>
|
||||
</dict>
|
||||
<key>NSMenuItem</key>
|
||||
<dict>
|
||||
<key>default</key>
|
||||
<string>Open URL in Camino</string>
|
||||
</dict>
|
||||
<key>NSMessage</key>
|
||||
<string>openURL</string>
|
||||
<key>NSPortName</key>
|
||||
<string>Camino</string>
|
||||
<key>NSSendTypes</key>
|
||||
<array>
|
||||
<string>NSStringPboardType</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>OSAScriptingDefinition</key>
|
||||
<string>Camino.sdef</string>
|
||||
<key>SUEnableAutomaticChecks</key>
|
||||
<%APP_UPDATES_ENABLED%/>
|
||||
<key>SUExpectsDSASignature</key>
|
||||
<true/>
|
||||
<key>SUFeedURL</key>
|
||||
<string>https://</string>
|
||||
<key>SUPublicDSAKeyFile</key>
|
||||
<string>camino_dsa_pub.pem</string>
|
||||
<key>SUScheduledCheckInterval</key>
|
||||
<integer>86400</integer>
|
||||
<key>UTExportedTypeDeclarations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>com.apple.safari.bookmark</string>
|
||||
<string>public.data</string>
|
||||
</array>
|
||||
<key>UTTypeDescription</key>
|
||||
<string>Camino bookmark</string>
|
||||
<key>UTTypeIconFile</key>
|
||||
<string>fileBookmark.icns</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>org.mozilla.camino.bookmark</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>public.filename-extension</key>
|
||||
<array>
|
||||
<string>caminobookmark</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>mozProfileDirName</key>
|
||||
<string>Camino</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Downloads</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Downloads.tiff</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.mozilla.camino.preference.downloads</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>MOZC</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>Downloads</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>OrgMozillaCaminoPreferenceDownloads</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>General</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string></string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>General.tiff</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.mozilla.camino.preference.general</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>General</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>MOZC</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>General</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>OrgMozillaCaminoPreferenceGeneral</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>History</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>History.tiff</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.mozilla.camino.preference.history</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>MOZC</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>History</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>OrgMozillaCaminoPreferenceHistory</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,49 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>MDImporter</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>org.mozilla.camino.bookmark</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.mozilla.camino.spotlightimporter</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${PRODUCT_VERSION_STRING}</string>
|
||||
<key>CFPlugInDynamicRegisterFunction</key>
|
||||
<string></string>
|
||||
<key>CFPlugInDynamicRegistration</key>
|
||||
<string>NO</string>
|
||||
<key>CFPlugInFactories</key>
|
||||
<dict>
|
||||
<key>FE75FA4A-AFDC-4DE2-912A-9860E3870F20</key>
|
||||
<string>MetadataImporterPluginFactory</string>
|
||||
</dict>
|
||||
<key>CFPlugInTypes</key>
|
||||
<dict>
|
||||
<key>8B08C4BF-415B-11D8-B3F9-0003936726FC</key>
|
||||
<array>
|
||||
<string>FE75FA4A-AFDC-4DE2-912A-9860E3870F20</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>CFPlugInUnloadFunction</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Privacy</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string></string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Privacy.tiff</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.mozilla.camino.preference.privacy</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Privacy</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>MOZC</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>Privacy</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>OrgMozillaCaminoPreferencePrivacy</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Security</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string></string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Security.tiff</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.mozilla.camino.preference.security</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Security</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>MOZC</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>Security</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>OrgMozillaCaminoPreferenceSecurity</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Tabs</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Tabs.tiff</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.mozilla.camino.preference.tabs</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Tabbed Browsing</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>MOZC</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>Tabs</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>OrgMozillaCaminoPreferenceTabs</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>WebFeatures</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string></string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>WebFeatures.tiff</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.mozilla.camino.preference.webfeatures</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Web Features</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>MOZC</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>WebFeatures</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>OrgMozillaCaminoPreferenceWebFeatures</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,427 +0,0 @@
|
||||
# ***** 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 mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2003
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Brian Ryner <bryner@brianryner.com>
|
||||
# Mark Mentovai <mark@moxienet.com>
|
||||
# Smokey Ardisson <alqahira@ardisson.org>
|
||||
#
|
||||
# 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 *****
|
||||
|
||||
DEPTH = ..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = \
|
||||
feedhandlers \
|
||||
flashblock \
|
||||
idl \
|
||||
pinstripe \
|
||||
striptease \
|
||||
safebrowsing \
|
||||
$(NULL)
|
||||
|
||||
APP_NAME = Camino
|
||||
|
||||
RSYNC_ALL = rsync -aC --exclude .cvsignore --delete
|
||||
|
||||
CM_APP_VERSION_FILE = $(srcdir)/config/version.txt
|
||||
CM_APP_VERSION := $(shell cat $(CM_APP_VERSION_FILE))
|
||||
CM_COPYRIGHT_YEAR_FILE = $(srcdir)/config/year.txt
|
||||
CM_COPYRIGHT_YEAR := $(shell cat $(CM_COPYRIGHT_YEAR_FILE))
|
||||
FOX_APP_VERSION_FILE = $(topsrcdir)/browser/config/version.txt
|
||||
FOX_APP_VERSION := $(shell cat $(FOX_APP_VERSION_FILE))
|
||||
PLATFORM_VERSION_FILE = $(topsrcdir)/config/milestone.txt
|
||||
PLATFORM_VERSION := $(shell egrep "^[^\#]+" $(PLATFORM_VERSION_FILE))
|
||||
PLATFORM_BUILD_ID_FILE = $(DEPTH)/config/buildid
|
||||
PLATFORM_BUILD_ID := $(shell cat $(PLATFORM_BUILD_ID_FILE))
|
||||
PLATFORM_INI_FILE = ../toolkit/xre/platform.ini
|
||||
|
||||
ifdef MOZILLA_OFFICIAL
|
||||
APP_UPDATE_URL = https://caminobrowser.org/update-check
|
||||
APP_UPDATES_ENABLED = true
|
||||
BREAKPAD_UPLOAD_URL = https://crash-reports.mozilla.com/submit
|
||||
else
|
||||
APP_UPDATES_ENABLED ?= false
|
||||
endif
|
||||
|
||||
# For Launch Services compatibility, CFBundleVersion can be at most three
|
||||
# .-separated integers, aaaaaa.bb.cc, with a maximum of 429496.99.99. Use
|
||||
# Camino's major and minor version number and the build date as the basis for
|
||||
# CFBundleVersion. This transforms version a.b (and any alphas, betas,
|
||||
# prereleases, and bug-fix versions) built on date 20yy.mm.dd into
|
||||
# CFBundleVersion abyy.mm.dd. Only a and b from the version need to be
|
||||
# significant, since any further updates (a.b.c) will necessarily be built on
|
||||
# future dates, and will have larger CFBundleVersion values. This mapping
|
||||
# assumes 0 <= b <= 9 and is not year 2100-compliant. There is currently no
|
||||
# CM_APP_VERSION_CFBUNDLE_FILE to depend on; any rule that uses this value
|
||||
# should depend on CM_APP_VERSION_FILE and PLATFORM_BUILD_ID_FILE.
|
||||
CM_APP_VERSION_CFBUNDLE := $(shell echo $(CM_APP_VERSION)@$(PLATFORM_BUILD_ID) | \
|
||||
sed -E -e 's/^([0-9]+)\.([0-9]).*@[02]0([0-9]{2})([0-9]{2})([0-9]{2})[0-9]{2}$$/\1\2\3.\4.\5/')
|
||||
|
||||
# Info.plist needs to have keys for some values removed, instead of placing
|
||||
# empty values. Start out with a pattern that doesn't exist to give something
|
||||
# to append "or" regex clauses to.
|
||||
GREP_V_PATTERN = __dummy__
|
||||
|
||||
# If a CVS tag (or branch) can be determined, use it as the CVS tag name in
|
||||
# Info.plist. If no tag can be found, set up to remove the relevant key from
|
||||
# Info.plist.
|
||||
CVS_TAG_FILE = generated/cvs_tag
|
||||
CVS_TAG := $(shell if [ -d $(srcdir)/CVS ] ; then \
|
||||
if [ -f $(srcdir)/CVS/Tag ] ; then \
|
||||
sed -e 's/^D.*/HEAD/' -e 's/^[NT]//' $(srcdir)/CVS/Tag ; \
|
||||
else \
|
||||
echo HEAD ; \
|
||||
fi \
|
||||
fi)
|
||||
ifdef CVS_TAG
|
||||
SED_ARGS += -e "s/%CVS_TAG%/$(CVS_TAG)/"
|
||||
else # CVS_TAG
|
||||
# Add the extra dummy pattern to ensure that make can't add whitespace to the
|
||||
# strings we care about.
|
||||
GREP_V_PATTERN += \|MozillaCVSTag\|%CVS_TAG%\|__dummy__
|
||||
endif # CVS_TAG
|
||||
|
||||
# If MOZ_CO_DATE is set, use it as the CVS time in Info.plist. If it doesn't
|
||||
# exist, set up to remove the relevant key from Info.plist.
|
||||
CVS_TIME_FILE = generated/cvs_time
|
||||
ifdef MOZ_CO_DATE
|
||||
CVS_TIME := $(shell $(PERL) $(srcdir)/config/mozcodate2iso8601 "$(MOZ_CO_DATE)")
|
||||
ifndef CVS_TIME
|
||||
# Fail if the MOZ_CO_DATE format ever changes.
|
||||
CVS_TIME := $(error mozcodate2iso8601)
|
||||
endif # !CVS_TIME
|
||||
SED_ARGS += -e "s/%CVS_TIME%/$(CVS_TIME)/"
|
||||
else # MOZ_CO_DATE
|
||||
# Add the extra dummy pattern to ensure that make can't add whitespace to the
|
||||
# strings we care about.
|
||||
GREP_V_PATTERN += \|MozillaCVSTime\|%CVS_TIME%\|__dummy__
|
||||
endif # MOZ_CO_DATE
|
||||
|
||||
STRINGS_FILES = \
|
||||
resources/localized/English.lproj/CertificateDialogs.strings \
|
||||
resources/localized/English.lproj/Localizable.strings \
|
||||
resources/localized/English.lproj/ServicesMenu.strings \
|
||||
PreferencePanes/Appearance/English.lproj/Localizable.strings \
|
||||
PreferencePanes/Appearance/English.lproj/RegionNames.strings \
|
||||
PreferencePanes/Downloads/English.lproj/Localizable.strings \
|
||||
PreferencePanes/General/English.lproj/Localizable.strings \
|
||||
PreferencePanes/History/English.lproj/Localizable.strings \
|
||||
PreferencePanes/Privacy/English.lproj/Localizable.strings \
|
||||
PreferencePanes/Security/English.lproj/Localizable.strings \
|
||||
PreferencePanes/Tabs/English.lproj/Localizable.strings \
|
||||
PreferencePanes/WebFeatures/English.lproj/Localizable.strings \
|
||||
$(NULL)
|
||||
GENERATED_STRINGS_FILES = $(patsubst %,generated/%,$(STRINGS_FILES))
|
||||
|
||||
GECKO_STRINGS_FILES = \
|
||||
resources/localized/English.lproj/global-platform_locale_intl_properties.strings \
|
||||
resources/localized/English.lproj/global-region_locale_region_properties.strings \
|
||||
resources/localized/English.lproj/global_locale_appstrings_properties.strings \
|
||||
resources/localized/English.lproj/global_locale_commonDialogs_properties.strings \
|
||||
resources/localized/English.lproj/global_locale_config_properties.strings \
|
||||
resources/localized/English.lproj/global_locale_crashes_properties.strings \
|
||||
resources/localized/English.lproj/global_locale_css_properties.strings \
|
||||
resources/localized/English.lproj/global_locale_dom_dom_properties.strings \
|
||||
resources/localized/English.lproj/global_locale_layout_HtmlForm_properties.strings \
|
||||
resources/localized/English.lproj/global_locale_layout_MediaDocument_properties.strings \
|
||||
resources/localized/English.lproj/global_locale_layout_errors_properties.strings \
|
||||
resources/localized/English.lproj/global_locale_layout_xmlparser_properties.strings \
|
||||
resources/localized/English.lproj/global_locale_plugins_properties.strings \
|
||||
resources/localized/English.lproj/global_locale_prompts_properties.strings \
|
||||
resources/localized/English.lproj/global_locale_xslt_xslt_properties.strings \
|
||||
resources/localized/English.lproj/necko_locale_necko_properties.strings \
|
||||
resources/localized/English.lproj/pipnss_locale_nsserrors_properties.strings \
|
||||
resources/localized/English.lproj/pipnss_locale_pipnss_properties.strings \
|
||||
resources/localized/English.lproj/pipnss_locale_security_properties.strings \
|
||||
$(NULL)
|
||||
GENERATED_GECKO_STRINGS_FILES = $(patsubst %,generated/%,$(GECKO_STRINGS_FILES))
|
||||
|
||||
# We split this into two groups because symbols for things we build have source files based on
|
||||
# the objdir, and we have to do some tweaking to get the cvs paths to work out right.
|
||||
CAMINO_SYMBOL_SOURCE_FILES = \
|
||||
$(XCODE_PRODUCT_DIR)/*.dSYM/Contents/Resources/DWARF/* \
|
||||
google-breakpad/src/client/mac/build/Release/Breakpad.framework.dSYM/Contents/Resources/DWARF/Breakpad \
|
||||
google-breakpad/src/client/mac/build/Release/breakpadUtilities.dylib.dSYM/Contents/Resources/DWARF/breakpadUtilities.dylib \
|
||||
growl/build/Release/Growl.framework.dSYM/Contents/Resources/DWARF/Growl \
|
||||
sparkle/build/Release/Sparkle.framework.dSYM/Contents/Resources/DWARF/Sparkle \
|
||||
$(NULL)
|
||||
|
||||
CORE_SYMBOL_SOURCE_FILES = \
|
||||
$(XCODE_PRODUCT_DIR)/Camino.app/Contents/MacOS/*.dylib \
|
||||
$(XCODE_PRODUCT_DIR)/Camino.app/Contents/MacOS/plugins/JavaEmbeddingPlugin.bundle/Contents/MacOS/JavaEmbeddingPlugin \
|
||||
$(XCODE_PRODUCT_DIR)/Camino.app/Contents/MacOS/plugins/MRJPlugin.plugin/Contents/MacOS/MRJPlugin \
|
||||
$(XCODE_PRODUCT_DIR)/Camino.app/Contents/PlugIns/PrintPDE.plugin/Contents/MacOS/PrintPDE \
|
||||
"$(XCODE_PRODUCT_DIR)/Camino.app/Contents/MacOS/plugins/Default Plugin.plugin/Contents/MacOS/Default Plugin" \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_DEBUG
|
||||
BUILDSTYLE = Development
|
||||
else
|
||||
BUILDSTYLE = Deployment
|
||||
endif
|
||||
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
TARGET = CaminoStatic
|
||||
else
|
||||
TARGET = Camino
|
||||
endif
|
||||
|
||||
GARBAGE += \
|
||||
$(PLATFORM_INI_FILE) \
|
||||
$(DIST)/bin/platform.ini \
|
||||
$(NULL)
|
||||
|
||||
GARBAGE_DIRS += \
|
||||
build \
|
||||
$(DIST)/$(APP_NAME).app \
|
||||
crashreporter-symbols \
|
||||
embed-replacements.tmp \
|
||||
generated \
|
||||
growl/build \
|
||||
sparkle/build \
|
||||
google-breakpad/src/client/mac/build \
|
||||
google-breakpad/src/tools/mac/dump_syms/build \
|
||||
google-breakpad/src/tools/mac/crash_report/build \
|
||||
google-breakpad/src/tools/mac/symupload/build \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
unexport CC CXX
|
||||
|
||||
ABS_topsrcdir := $(shell cd $(topsrcdir); pwd)
|
||||
|
||||
SYMBOL_ARCHIVE_BASENAME = \
|
||||
$(APP_NAME)-$(CM_APP_VERSION)-$(OS_TEST)-$(PLATFORM_BUILD_ID)
|
||||
SYMBOL_OUTPUT_DIR = crashreporter-symbols/$(PLATFORM_BUILD_ID)
|
||||
SYMBOL_ZIP_FILENAME = crashreporter-symbols-$(SYMBOL_ARCHIVE_BASENAME).zip
|
||||
SYMBOL_STORE_HOME_DIR = $(topsrcdir)/../$(PLATFORM_BUILD_ID)/symbols
|
||||
SYMBOL_REUPLOAD_SCRIPT_FILE = $(SYMBOL_STORE_HOME_DIR)/../upload-symbols-$(OS_TEST).sh
|
||||
# Export the SYMBOL_INDEX_NAME for toolit's upload_symbols.sh scrip
|
||||
# post-upload behavior
|
||||
export SYMBOL_INDEX_NAME = $(SYMBOL_ARCHIVE_BASENAME)-symbols.txt
|
||||
|
||||
export::
|
||||
mkdir -p wallet/tables
|
||||
ln -fs $(ABS_topsrcdir)/extensions/wallet/src/*.tbl wallet/tables
|
||||
ifneq ($(ABS_topsrcdir),$(MOZ_BUILD_ROOT))
|
||||
$(RSYNC_ALL) $(srcdir)/Camino.xcodeproj .
|
||||
ln -fs $(srcdir)/src
|
||||
ln -fs $(srcdir)/resources
|
||||
ln -fs $(srcdir)/config
|
||||
ln -fs $(srcdir)/scripts
|
||||
ln -fs $(srcdir)/PreferencePanes
|
||||
ln -fs $(srcdir)/Info-*.plist .
|
||||
mkdir -p sparkle growl \
|
||||
google-breakpad/src/client/mac \
|
||||
google-breakpad/src/tools/mac/dump_syms \
|
||||
google-breakpad/src/tools/mac/crash_report \
|
||||
google-breakpad/src/tools/mac/symupload
|
||||
bash -O extglob -c \
|
||||
"ln -fs $(ABS_topsrcdir)/camino/sparkle/!(CVS|*.xcodeproj|build) sparkle"
|
||||
$(RSYNC_ALL) $(ABS_topsrcdir)/camino/sparkle/*.xcodeproj sparkle
|
||||
bash -O extglob -c \
|
||||
"ln -fs $(ABS_topsrcdir)/camino/growl/!(CVS|*.xcodeproj|build) growl"
|
||||
$(RSYNC_ALL) $(ABS_topsrcdir)/camino/growl/*.xcodeproj growl
|
||||
bash -O extglob -c \
|
||||
"ln -fs $(ABS_topsrcdir)/camino/google-breakpad/!(CVS|build|src) google-breakpad"
|
||||
bash -O extglob -c \
|
||||
"ln -fs $(ABS_topsrcdir)/camino/google-breakpad/src/!(CVS|build|client|tools) google-breakpad/src"
|
||||
bash -O extglob -c \
|
||||
"ln -fs $(ABS_topsrcdir)/camino/google-breakpad/src/client/!(CVS|build|mac) google-breakpad/src/client"
|
||||
bash -O extglob -c \
|
||||
"ln -fs $(ABS_topsrcdir)/camino/google-breakpad/src/client/mac/!(CVS|build|*.xcodeproj) google-breakpad/src/client/mac"
|
||||
bash -O extglob -c \
|
||||
"ln -fs $(ABS_topsrcdir)/camino/google-breakpad/src/tools/mac/dump_syms/!(CVS|build|*.xcodeproj) google-breakpad/src/tools/mac/dump_syms"
|
||||
bash -O extglob -c \
|
||||
"ln -fs $(ABS_topsrcdir)/camino/google-breakpad/src/tools/mac/crash_report/!(CVS|build|*.xcodeproj) google-breakpad/src/tools/mac/crash_report"
|
||||
bash -O extglob -c \
|
||||
"ln -fs $(ABS_topsrcdir)/camino/google-breakpad/src/tools/mac/symupload/!(CVS|build|*.xcodeproj) google-breakpad/src/tools/mac/symupload"
|
||||
$(RSYNC_ALL) $(ABS_topsrcdir)/camino/google-breakpad/src/client/mac/*.xcodeproj google-breakpad/src/client/mac
|
||||
$(RSYNC_ALL) $(ABS_topsrcdir)/camino/google-breakpad/src/tools/mac/dump_syms/*.xcodeproj google-breakpad/src/tools/mac/dump_syms
|
||||
$(RSYNC_ALL) $(ABS_topsrcdir)/camino/google-breakpad/src/tools/mac/crash_report/*.xcodeproj google-breakpad/src/tools/mac/crash_report
|
||||
$(RSYNC_ALL) $(ABS_topsrcdir)/camino/google-breakpad/src/tools/mac/symupload/*.xcodeproj google-breakpad/src/tools/mac/symupload
|
||||
endif
|
||||
|
||||
# Generate files which need to pull version numbers or dates from other files
|
||||
# in the tree
|
||||
generated/resources/application/all-camino.js: \
|
||||
$(srcdir)/resources/application/all-camino.js.in \
|
||||
$(FOX_APP_VERSION_FILE) \
|
||||
$(CM_APP_VERSION_FILE)
|
||||
mkdir -p $(dir $@)
|
||||
sed -e "s/%FOX_APP_VERSION%/$(FOX_APP_VERSION)/" \
|
||||
-e "s/%CM_APP_VERSION%/$(CM_APP_VERSION)/" \
|
||||
-e "s@%APP_UPDATE_URL%@$(APP_UPDATE_URL)@" $< > $@
|
||||
|
||||
generated/Info-Camino.plist: \
|
||||
$(srcdir)/Info-Camino.plist.in \
|
||||
$(CM_APP_VERSION_FILE) \
|
||||
$(CM_COPYRIGHT_YEAR_FILE) \
|
||||
$(PLATFORM_BUILD_ID_FILE) \
|
||||
$(PLATFORM_VERSION_FILE) \
|
||||
$(CVS_TAG_FILE) \
|
||||
$(CVS_TIME_FILE)
|
||||
mkdir -p $(dir $@)
|
||||
sed -e "s/%CM_APP_VERSION%/$(CM_APP_VERSION)/" \
|
||||
-e "s/%CM_APP_VERSION_CFBUNDLE%/$(CM_APP_VERSION_CFBUNDLE)/" \
|
||||
-e "s/%CM_COPYRIGHT_YEAR%/$(CM_COPYRIGHT_YEAR)/" \
|
||||
-e "s/%PLATFORM_BUILD_ID%/$(PLATFORM_BUILD_ID)/" \
|
||||
-e "s/%PLATFORM_VERSION%/$(PLATFORM_VERSION)/" \
|
||||
-e "s/%APP_UPDATES_ENABLED%/$(APP_UPDATES_ENABLED)/" \
|
||||
-e "s@%BREAKPAD_UPLOAD_URL%@$(BREAKPAD_UPLOAD_URL)@" \
|
||||
$(SED_ARGS) $< | \
|
||||
grep -v "$(GREP_V_PATTERN)" > $@
|
||||
|
||||
generated/resources/localized/English.lproj/InfoPlist.strings: \
|
||||
$(srcdir)/resources/localized/English.lproj/InfoPlist.strings.in \
|
||||
$(CM_APP_VERSION_FILE) \
|
||||
$(CM_COPYRIGHT_YEAR_FILE)
|
||||
mkdir -p $(dir $@)
|
||||
sed -e "s/%CM_APP_VERSION%/$(CM_APP_VERSION)/" \
|
||||
-e "s/%CM_COPYRIGHT_YEAR%/$(CM_COPYRIGHT_YEAR)/" $< | \
|
||||
iconv -f UTF-8 -t UTF-16 > $@
|
||||
|
||||
# Generate UTF-16 with BOM strings files from UTF-8 strings.in files. On Mac
|
||||
# OS X, iconv seems always to output big-endian when asked for UTF-16 with a
|
||||
# BOM, which is what AppleGlot seems to require.
|
||||
$(GENERATED_STRINGS_FILES): \
|
||||
generated/%.strings: $(srcdir)/%.strings.in
|
||||
mkdir -p $(dir $@)
|
||||
iconv -f UTF-8 -t UTF-16 $< > $@
|
||||
|
||||
# Generate UTF-16 with BOM strings files from Gecko properties files. On Mac
|
||||
# OS X, iconv seems always to output big-endian when asked for UTF-16 with a
|
||||
# BOM, which is what AppleGlot seems to require. In a real auto-generate
|
||||
# system, this rule would also fix comments, escape quotes and reformat
|
||||
# strings.
|
||||
$(GENERATED_GECKO_STRINGS_FILES): \
|
||||
generated/%.strings: $(srcdir)/%.strings.in
|
||||
mkdir -p $(dir $@)
|
||||
iconv -f UTF-8 -t UTF-16 $< > $@
|
||||
|
||||
# The "grep -lFx" construct in these rules will only touch the file if the
|
||||
# contents are changing. The file's timestamp will be preserved when the
|
||||
# contents aren't changing, reducing unnecessary build activity.
|
||||
|
||||
$(CVS_TAG_FILE): FORCE
|
||||
grep -lFx "$(CVS_TAG)" $@ >& /dev/null || \
|
||||
(mkdir -p $(dir $@) && echo "$(CVS_TAG)" > $@)
|
||||
|
||||
$(CVS_TIME_FILE): FORCE
|
||||
grep -lFx "$(CVS_TIME)" $@ >& /dev/null || \
|
||||
(mkdir -p $(dir $@) && echo "$(CVS_TIME)" > $@)
|
||||
|
||||
# Put platform.ini into toolkit/xre and dist/bin, because that's where
|
||||
# Tinderbox looks to figure out the build ID. It currently doesn't need
|
||||
# to be distributed with the application.
|
||||
$(PLATFORM_INI_FILE): $(PLATFORM_BUILD_ID_FILE) $(PLATFORM_VERSION_FILE)
|
||||
mkdir -p $(dir $@)
|
||||
echo [Build] > $@
|
||||
echo BuildID=$(PLATFORM_BUILD_ID) >> $@
|
||||
echo Milestone=$(PLATFORM_VERSION) >> $@
|
||||
$(INSTALL) $@ $(DIST)/bin
|
||||
|
||||
# The embed-replacements rsync is done for both srcdir and objdir builds
|
||||
# to avoid adding CVS stuff to embed.jar.
|
||||
# In a real auto-generate system, $(GENERATED_GECKO_STRINGS_FILES) would
|
||||
# need to be called after the embed-replacements rsync (which would itself
|
||||
# be followed by a .properties extraction rule).
|
||||
libs:: \
|
||||
generated/resources/application/all-camino.js \
|
||||
generated/Info-Camino.plist \
|
||||
generated/resources/localized/English.lproj/InfoPlist.strings \
|
||||
$(GENERATED_STRINGS_FILES) \
|
||||
$(GENERATED_GECKO_STRINGS_FILES) \
|
||||
$(PLATFORM_INI_FILE)
|
||||
$(RSYNC_ALL) $(srcdir)/embed-replacements/ embed-replacements.tmp
|
||||
cd embed-replacements.tmp && \
|
||||
$(ZIP) -r0DX ../../dist/Embed/chrome/embed.jar *
|
||||
$(PBBUILD) -project Camino.xcodeproj -target $(TARGET) \
|
||||
-configuration $(BUILDSTYLE) $(PBBUILD_SETTINGS)
|
||||
$(RSYNC_ALL) --copy-unsafe-links \
|
||||
$(XCODE_PRODUCT_DIR)/Camino.app/ $(DIST)/$(APP_NAME).app
|
||||
$(RM) $(DIST)/$(APP_NAME).app/Contents/MacOS/components/camino.xpt
|
||||
$(XPIDL_LINK) $(DIST)/$(APP_NAME).app/Contents/MacOS/camino.xpt \
|
||||
$(DIST)/$(APP_NAME).app/Contents/MacOS/components/*.xpt
|
||||
$(RM) $(DIST)/$(APP_NAME).app/Contents/MacOS/components/*.xpt
|
||||
mv $(DIST)/$(APP_NAME).app/Contents/MacOS/camino.xpt \
|
||||
$(DIST)/$(APP_NAME).app/Contents/MacOS/components/camino.xpt
|
||||
|
||||
buildcaminosymbols:
|
||||
$(PBBUILD) -project google-breakpad/src/tools/mac/dump_syms/dump_syms.xcodeproj \
|
||||
-configuration Release
|
||||
@echo Generating symbols
|
||||
mkdir -p $(SYMBOL_OUTPUT_DIR)
|
||||
$(PYTHON) $(srcdir)/scripts/symbolstore.py \
|
||||
-a $(OS_TEST) -s $(shell pwd) --vcs-info \
|
||||
google-breakpad/src/tools/mac/dump_syms/build/Release/dump_syms \
|
||||
$(SYMBOL_OUTPUT_DIR) \
|
||||
$(CAMINO_SYMBOL_SOURCE_FILES) > \
|
||||
$(SYMBOL_OUTPUT_DIR)/$(SYMBOL_ARCHIVE_BASENAME)-symbols.txt
|
||||
find $(SYMBOL_OUTPUT_DIR) -name '*.sym' -exec sed -e 's#cvsroot:camino#cvsroot:mozilla/camino#' -e "s#/camino$(topsrcdir)##" -i '' "{}" \;
|
||||
$(PYTHON) $(srcdir)/scripts/symbolstore.py \
|
||||
-a $(OS_TEST) -s $(topsrcdir) --vcs-info \
|
||||
google-breakpad/src/tools/mac/dump_syms/build/Release/dump_syms \
|
||||
$(SYMBOL_OUTPUT_DIR) \
|
||||
$(CORE_SYMBOL_SOURCE_FILES) >> \
|
||||
$(SYMBOL_OUTPUT_DIR)/$(SYMBOL_INDEX_NAME)
|
||||
|
||||
uploadcaminosymbols:
|
||||
@echo Zipping symbols
|
||||
cd $(SYMBOL_OUTPUT_DIR) && \
|
||||
zip -r9D ../$(SYMBOL_ZIP_FILENAME) .
|
||||
@echo Storing symbols
|
||||
mkdir -p $(SYMBOL_STORE_HOME_DIR)
|
||||
cp -r -p -v \
|
||||
$(SYMBOL_OUTPUT_DIR)/../$(SYMBOL_ZIP_FILENAME) \
|
||||
$(SYMBOL_STORE_HOME_DIR)/$(SYMBOL_ZIP_FILENAME)
|
||||
@echo Creating re-upload script
|
||||
echo '#!/bin/sh\n\n \
|
||||
export SYMBOL_INDEX_NAME="$(SYMBOL_INDEX_NAME)"\n\n \
|
||||
export POST_SYMBOL_UPLOAD_CMD="$(POST_SYMBOL_UPLOAD_CMD)"\n\n \
|
||||
SYMBOL_SERVER_HOST=$(SYMBOL_SERVER_HOST) \
|
||||
SYMBOL_SERVER_USER=$(SYMBOL_SERVER_USER) \
|
||||
SYMBOL_SERVER_PATH=$(SYMBOL_SERVER_PATH) \
|
||||
SYMBOL_SERVER_SSH_KEY=$(SYMBOL_SERVER_SSH_KEY) \
|
||||
$(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.sh \
|
||||
$(SYMBOL_STORE_HOME_DIR)/$(SYMBOL_ZIP_FILENAME)' | \
|
||||
sed -e 's/ //g' -e 's/^ //g' > \
|
||||
$(SYMBOL_REUPLOAD_SCRIPT_FILE)
|
||||
chmod 755 $(SYMBOL_REUPLOAD_SCRIPT_FILE)
|
||||
@echo Uploading symbols
|
||||
$(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.sh $(SYMBOL_OUTPUT_DIR)/../$(SYMBOL_ZIP_FILENAME)
|
||||
@@ -1,97 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** 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 mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Simon Fraser <sfraser@netscape.com>
|
||||
*
|
||||
* 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 "PreferencePaneBase.h"
|
||||
|
||||
@interface OrgMozillaCaminoPreferenceAppearance : PreferencePaneBase
|
||||
{
|
||||
IBOutlet NSTabView* mTabView;
|
||||
IBOutlet NSButton* mResetButton;
|
||||
|
||||
// colors tab
|
||||
IBOutlet NSColorWell* mTextColorWell;
|
||||
IBOutlet NSColorWell* mBackgroundColorWell;
|
||||
|
||||
IBOutlet NSColorWell* mVisitedLinksColorWell;
|
||||
IBOutlet NSColorWell* mUnvisitedLinksColorWell;
|
||||
|
||||
IBOutlet NSButton* mUnderlineLinksCheckbox;
|
||||
IBOutlet NSButton* mUseMyColorsCheckbox;
|
||||
|
||||
// fonts tab
|
||||
IBOutlet NSButton* mChooseProportionalFontButton;
|
||||
IBOutlet NSButton* mChooseMonospaceFontButton;
|
||||
IBOutlet NSPopUpButton* mFontRegionPopup;
|
||||
|
||||
IBOutlet NSTextField* mFontSampleProportional;
|
||||
IBOutlet NSTextField* mFontSampleMonospace;
|
||||
|
||||
IBOutlet NSTextField* mProportionalSampleLabel;
|
||||
|
||||
IBOutlet NSPopUpButton* mMinFontSizePopup;
|
||||
IBOutlet NSMatrix* mDefaultFontMatrix;
|
||||
IBOutlet NSButton* mUseMyFontsCheckbox;
|
||||
|
||||
IBOutlet NSView* mPreviousBottomControl;
|
||||
|
||||
NSArray* mRegionMappingTable;
|
||||
|
||||
NSButton* mFontButtonForEditor;
|
||||
|
||||
NSTextView* mPropSampleFieldEditor;
|
||||
NSTextView* mMonoSampleFieldEditor;
|
||||
|
||||
BOOL mFontPanelWasVisible;
|
||||
}
|
||||
|
||||
- (void)mainViewDidLoad;
|
||||
|
||||
- (IBAction)buttonClicked:(id)sender;
|
||||
- (IBAction)colorChanged:(id)sender;
|
||||
|
||||
- (IBAction)proportionalFontChoiceButtonClicked:(id)sender;
|
||||
- (IBAction)useMyFontsButtonClicked:(id)sender;
|
||||
- (IBAction)monospaceFontChoiceButtonClicked:(id)sender;
|
||||
- (IBAction)fontRegionPopupClicked:(id)sender;
|
||||
|
||||
- (IBAction)minFontSizePopupClicked:(id)sender;
|
||||
- (IBAction)defaultFontTypeClicked:(id)sender;
|
||||
|
||||
- (IBAction)resetToDefaults:(id)sender;
|
||||
|
||||
@end
|
||||
@@ -1,859 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** 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 mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Simon Fraser <sfraser@netscape.com>
|
||||
* Asaf Romano <mozilla.mano@sent.com>
|
||||
*
|
||||
* 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 "Appearance.h"
|
||||
|
||||
#import "GeckoPrefConstants.h"
|
||||
|
||||
@interface OrgMozillaCaminoPreferenceAppearance(Private)
|
||||
|
||||
- (void)setupFontRegionPopup;
|
||||
- (void)updateFontPreviews;
|
||||
- (void)loadFontPrefs;
|
||||
- (void)saveFontPrefs;
|
||||
|
||||
- (NSMutableDictionary*)makeDictFromPrefsForFontType:(NSString*)fontType andRegion:(NSString*)regionCode;
|
||||
- (NSMutableDictionary*)makeDefaultFontTypeDictFromPrefsForRegion:(NSString*)regionCode;
|
||||
- (NSMutableDictionary*)makeFontSizesDictFromPrefsForRegion:(NSString*)regionCode;
|
||||
|
||||
- (NSMutableDictionary*)settingsForCurrentRegion;
|
||||
- (NSString*)defaultProportionalFontTypeForCurrentRegion;
|
||||
|
||||
- (void)saveFontNamePrefsForRegion:(NSDictionary*)regionDict forFontType:(NSString*)fontType;
|
||||
- (void)saveFontSizePrefsForRegion:(NSDictionary*)entryDict;
|
||||
- (void)saveDefaultFontTypePrefForRegion:(NSDictionary*)entryDict;
|
||||
- (void)saveAllFontPrefsForRegion:(NSDictionary*)regionDict;
|
||||
|
||||
- (BOOL)useMyFontsPref;
|
||||
- (void)setUseMyFontsPref:(BOOL)checkboxState;
|
||||
|
||||
- (void)setupFontSamplesFromDict:(NSDictionary*)regionDict;
|
||||
- (void)setupFontSampleOfType:(NSString*)fontType fromDict:(NSDictionary*)regionDict;
|
||||
|
||||
- (NSFont*)fontOfType:(NSString*)fontType fromDict:(NSDictionary*)regionDict;
|
||||
|
||||
- (void)setFontSampleOfType:(NSString*)fontType withFont:(NSFont*)font andDict:(NSDictionary*)regionDict;
|
||||
- (void)saveFont:(NSFont*)font toDict:(NSMutableDictionary*)regionDict forType:(NSString*)fontType;
|
||||
|
||||
- (void)updateAdvancedFontControls;
|
||||
- (void)updateFontSampleOfType:(NSString*)fontType;
|
||||
- (NSTextField*)fontSampleForType:(NSString*)fontType;
|
||||
- (NSString*)fontSizeType:(NSString*)fontType;
|
||||
|
||||
- (IBAction)resetColorsToDefaults:(id)sender;
|
||||
- (IBAction)resetFontsToDefaults:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
// We use instances of this class as the field editor, to allow us to catch
|
||||
// |changeFont:| messages.
|
||||
|
||||
@interface SampleTextView : NSTextView
|
||||
{
|
||||
id mPrefPane;
|
||||
}
|
||||
- (void)setPrefPane:(id)inPrefPane;
|
||||
|
||||
@end
|
||||
|
||||
@implementation SampleTextView
|
||||
|
||||
- (void)setPrefPane:(id)inPrefPane
|
||||
{
|
||||
mPrefPane = inPrefPane;
|
||||
}
|
||||
|
||||
- (void)changeFont:(id)sender
|
||||
{
|
||||
[mPrefPane changeFont:sender];
|
||||
}
|
||||
|
||||
- (BOOL)fontManager:(id)theFontManager willIncludeFont:(NSString*)fontName
|
||||
{
|
||||
return [mPrefPane fontManager:theFontManager willIncludeFont:fontName];
|
||||
}
|
||||
|
||||
- (unsigned int)validModesForFontPanel:(NSFontPanel*)fontPanel
|
||||
{
|
||||
return [mPrefPane validModesForFontPanel:fontPanel];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@implementation OrgMozillaCaminoPreferenceAppearance
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[mRegionMappingTable release];
|
||||
[mPropSampleFieldEditor release];
|
||||
[mMonoSampleFieldEditor release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)mainViewDidLoad
|
||||
{
|
||||
// should save and restore this
|
||||
[[NSColorPanel sharedColorPanel] setContinuous:NO];
|
||||
|
||||
[self setupFontRegionPopup];
|
||||
}
|
||||
|
||||
- (void)willSelect
|
||||
{
|
||||
BOOL gotPref;
|
||||
[mUnderlineLinksCheckbox setState:
|
||||
[self getBooleanPref:kGeckoPrefUnderlineLinks withSuccess:&gotPref]];
|
||||
[mUseMyColorsCheckbox setState:
|
||||
![self getBooleanPref:kGeckoPrefUsePageColors withSuccess:&gotPref]];
|
||||
|
||||
[mBackgroundColorWell setColor:[self getColorPref:kGeckoPrefPageBackgroundColor withSuccess:&gotPref]];
|
||||
[mTextColorWell setColor:[self getColorPref:kGeckoPrefPageForegroundColor withSuccess:&gotPref]];
|
||||
[mUnvisitedLinksColorWell setColor:[self getColorPref:kGeckoPrefLinkColor withSuccess:&gotPref]];
|
||||
[mVisitedLinksColorWell setColor:[self getColorPref:kGeckoPrefVisitedLinkColor withSuccess:&gotPref]];
|
||||
|
||||
[mUseMyFontsCheckbox setState:[self useMyFontsPref]];
|
||||
|
||||
[self loadFontPrefs];
|
||||
[self updateFontPreviews];
|
||||
[self updateAdvancedFontControls];
|
||||
}
|
||||
|
||||
- (void)didUnselect
|
||||
{
|
||||
// time to save stuff
|
||||
[self saveFontPrefs];
|
||||
}
|
||||
|
||||
// The colors and fonts tab views are different heights. We need to resize
|
||||
// the window when each is selected so the spacing looks correct.
|
||||
- (void)tabView:(NSTabView*)tabView didSelectTabViewItem:(NSTabViewItem*)tabViewItem
|
||||
{
|
||||
NSControl* bottomControl = nil;
|
||||
if ([[tabViewItem identifier] isEqualToString:@"colors"])
|
||||
bottomControl = mUseMyColorsCheckbox;
|
||||
else if ([[tabViewItem identifier] isEqualToString:@"fonts"])
|
||||
bottomControl = mUseMyFontsCheckbox;
|
||||
|
||||
if (bottomControl && bottomControl != mPreviousBottomControl) {
|
||||
NSWindow* prefsWindow = [mTabView window];
|
||||
float heightChange = [mPreviousBottomControl frame].origin.y -
|
||||
[bottomControl frame].origin.y;
|
||||
|
||||
NSRect windowFrame = [prefsWindow frame];
|
||||
windowFrame.size.height += heightChange;
|
||||
windowFrame.origin.y -= heightChange;
|
||||
[prefsWindow setFrame:windowFrame display:YES animate:[prefsWindow isVisible]];
|
||||
|
||||
mPreviousBottomControl = bottomControl;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setupFontRegionPopup
|
||||
{
|
||||
NSBundle* prefBundle = [NSBundle bundleForClass:[self class]];
|
||||
NSString* resPath = [prefBundle pathForResource:@"RegionMapping" ofType:@"plist"];
|
||||
|
||||
// We use the dictionaries in this array as temporary storage of font
|
||||
// values until the pane is unloaded, at which time they are saved.
|
||||
[mRegionMappingTable release];
|
||||
mRegionMappingTable = [[NSArray arrayWithContentsOfFile:resPath] retain];
|
||||
|
||||
[self loadFontPrefs];
|
||||
|
||||
[mFontRegionPopup removeAllItems];
|
||||
for (unsigned int i = 0; i < [mRegionMappingTable count]; i++) {
|
||||
NSDictionary* regionDict = [mRegionMappingTable objectAtIndex:i];
|
||||
[mFontRegionPopup addItemWithTitle:[regionDict objectForKey:@"region"]];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)buttonClicked:(id)sender
|
||||
{
|
||||
if (sender == mUnderlineLinksCheckbox)
|
||||
[self setPref:kGeckoPrefUnderlineLinks toBoolean:[sender state]];
|
||||
else if (sender == mUseMyColorsCheckbox)
|
||||
[self setPref:kGeckoPrefUsePageColors toBoolean:![sender state]];
|
||||
}
|
||||
|
||||
- (IBAction)colorChanged:(id)sender
|
||||
{
|
||||
const char* prefName = NULL;
|
||||
|
||||
if (sender == mBackgroundColorWell)
|
||||
prefName = kGeckoPrefPageBackgroundColor;
|
||||
else if (sender == mTextColorWell)
|
||||
prefName = kGeckoPrefPageForegroundColor;
|
||||
else if (sender == mUnvisitedLinksColorWell)
|
||||
prefName = kGeckoPrefLinkColor;
|
||||
else if (sender == mVisitedLinksColorWell)
|
||||
prefName = kGeckoPrefVisitedLinkColor;
|
||||
|
||||
if (prefName)
|
||||
[self setPref:prefName toColor:[sender color]];
|
||||
}
|
||||
|
||||
- (IBAction)proportionalFontChoiceButtonClicked:(id)sender
|
||||
{
|
||||
NSFontManager* fontManager = [NSFontManager sharedFontManager];
|
||||
|
||||
NSString* defaultFontType = [self defaultProportionalFontTypeForCurrentRegion];
|
||||
|
||||
NSFont* newFont = [[self fontSampleForType:defaultFontType] font];
|
||||
mFontButtonForEditor = mChooseProportionalFontButton;
|
||||
[fontManager setSelectedFont:newFont isMultiple:NO];
|
||||
[[fontManager fontPanel:YES] makeKeyAndOrderFront:self];
|
||||
}
|
||||
|
||||
- (IBAction)monospaceFontChoiceButtonClicked:(id)sender
|
||||
{
|
||||
NSFontManager* fontManager = [NSFontManager sharedFontManager];
|
||||
NSFont* newFont = [[self fontSampleForType:@"monospace"] font];
|
||||
mFontButtonForEditor = mChooseMonospaceFontButton;
|
||||
[fontManager setSelectedFont:newFont isMultiple:NO];
|
||||
[[fontManager fontPanel:YES] makeKeyAndOrderFront:self];
|
||||
}
|
||||
|
||||
- (IBAction)useMyFontsButtonClicked:(id)sender
|
||||
{
|
||||
[self setUseMyFontsPref:[sender state]];
|
||||
}
|
||||
|
||||
- (IBAction)fontRegionPopupClicked:(id)sender
|
||||
{
|
||||
// save the old values
|
||||
[self updateFontPreviews];
|
||||
[self updateAdvancedFontControls];
|
||||
}
|
||||
|
||||
- (void)loadFontPrefs
|
||||
{
|
||||
for (unsigned int i = 0; i < [mRegionMappingTable count]; i++) {
|
||||
NSMutableDictionary* regionDict = [mRegionMappingTable objectAtIndex:i];
|
||||
NSString* regionCode = [regionDict objectForKey:@"code"];
|
||||
|
||||
/*
|
||||
For each region in the array, there is a dictionary of
|
||||
{
|
||||
code =
|
||||
region = (from localized strings file)
|
||||
|
||||
to which we add here a sub-dictionary per font type, thus:
|
||||
|
||||
serif = {
|
||||
fontfamily = Times-Regular
|
||||
}
|
||||
sans-serif = {
|
||||
fontfamily =
|
||||
missing = // set if a font is missing
|
||||
}
|
||||
monospace = {
|
||||
fontfamily =
|
||||
}
|
||||
|
||||
an entry that stores the default font type:
|
||||
|
||||
defaultFontType = {
|
||||
type =
|
||||
}
|
||||
|
||||
and an entry that stores font sizes:
|
||||
|
||||
fontsize = {
|
||||
variable =
|
||||
fixed =
|
||||
minimum = // optional
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
NSString* regionName = NSLocalizedStringFromTableInBundle(regionCode, @"RegionNames",
|
||||
[NSBundle bundleForClass:[self class]], @"");
|
||||
[regionDict setObject:regionName forKey:@"region"];
|
||||
|
||||
NSMutableDictionary* serifDict = [self makeDictFromPrefsForFontType:@"serif" andRegion:regionCode];
|
||||
[regionDict setObject:serifDict forKey:@"serif"];
|
||||
|
||||
NSMutableDictionary* sanssDict = [self makeDictFromPrefsForFontType:@"sans-serif" andRegion:regionCode];
|
||||
[regionDict setObject:sanssDict forKey:@"sans-serif"];
|
||||
|
||||
NSMutableDictionary* monoDict = [self makeDictFromPrefsForFontType:@"monospace" andRegion:regionCode];
|
||||
[regionDict setObject:monoDict forKey:@"monospace"];
|
||||
|
||||
// font sizes dict
|
||||
NSMutableDictionary* sizesDict = [self makeFontSizesDictFromPrefsForRegion:regionCode];
|
||||
[regionDict setObject:sizesDict forKey:@"fontsize"];
|
||||
|
||||
// default font type dict
|
||||
NSMutableDictionary* defaultFontTypeDict = [self makeDefaultFontTypeDictFromPrefsForRegion:regionCode];
|
||||
[regionDict setObject:defaultFontTypeDict forKey:@"defaultFontType"];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)saveFontPrefs
|
||||
{
|
||||
if (!mRegionMappingTable)
|
||||
return;
|
||||
|
||||
for (unsigned int i = 0; i < [mRegionMappingTable count]; i++) {
|
||||
NSMutableDictionary* regionDict = [mRegionMappingTable objectAtIndex:i];
|
||||
[self saveAllFontPrefsForRegion:regionDict];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (NSMutableDictionary*)makeDictFromPrefsForFontType:(NSString*)fontType andRegion:(NSString*)regionCode
|
||||
{
|
||||
NSMutableDictionary* fontDict = [NSMutableDictionary dictionaryWithCapacity:1];
|
||||
NSString* fontPrefName = [NSString stringWithFormat:@"font.name.%@.%@", fontType, regionCode];
|
||||
|
||||
BOOL gotPref;
|
||||
NSString* fontName = [self getStringPref:[fontPrefName UTF8String] withSuccess:&gotPref];
|
||||
|
||||
if (gotPref)
|
||||
[fontDict setObject:fontName forKey:@"fontfamily"];
|
||||
|
||||
return fontDict;
|
||||
}
|
||||
|
||||
- (NSMutableDictionary*)makeDefaultFontTypeDictFromPrefsForRegion:(NSString*)regionCode
|
||||
{
|
||||
NSMutableDictionary* fontTypeDict = [NSMutableDictionary dictionaryWithCapacity:1];
|
||||
NSString* prefName = [NSString stringWithFormat:@"font.default.%@", regionCode];
|
||||
|
||||
BOOL gotPref;
|
||||
NSString* fontType = [self getStringPref:[prefName UTF8String] withSuccess:&gotPref];
|
||||
|
||||
if (gotPref)
|
||||
[fontTypeDict setObject:fontType forKey:@"type"];
|
||||
|
||||
return fontTypeDict;
|
||||
}
|
||||
|
||||
- (NSMutableDictionary*)makeFontSizesDictFromPrefsForRegion:(NSString*)regionCode
|
||||
{
|
||||
NSMutableDictionary* fontDict = [NSMutableDictionary dictionaryWithCapacity:2];
|
||||
|
||||
NSString* variableSizePref = [NSString stringWithFormat:@"font.size.variable.%@", regionCode];
|
||||
NSString* fixedSizePref = [NSString stringWithFormat:@"font.size.fixed.%@", regionCode];
|
||||
NSString* minSizePref = [NSString stringWithFormat:@"font.minimum-size.%@", regionCode];
|
||||
|
||||
BOOL gotFixed, gotVariable, gotMinSize;
|
||||
int variableSize = [self getIntPref:[variableSizePref UTF8String] withSuccess:&gotVariable];
|
||||
int fixedSize = [self getIntPref:[fixedSizePref UTF8String] withSuccess:&gotFixed];
|
||||
int minSize = [self getIntPref:[minSizePref UTF8String] withSuccess:&gotMinSize];
|
||||
|
||||
if (gotVariable)
|
||||
[fontDict setObject:[NSNumber numberWithInt:variableSize] forKey:@"variable"];
|
||||
|
||||
if (gotFixed)
|
||||
[fontDict setObject:[NSNumber numberWithInt:fixedSize] forKey:@"fixed"];
|
||||
|
||||
if (gotMinSize)
|
||||
[fontDict setObject:[NSNumber numberWithInt:minSize] forKey:@"minimum"];
|
||||
|
||||
return fontDict;
|
||||
}
|
||||
|
||||
- (NSMutableDictionary*)settingsForCurrentRegion
|
||||
{
|
||||
int selectedRegion = [mFontRegionPopup indexOfSelectedItem];
|
||||
if (selectedRegion == -1)
|
||||
return nil;
|
||||
|
||||
return [mRegionMappingTable objectAtIndex:selectedRegion];
|
||||
}
|
||||
|
||||
- (NSString*)defaultProportionalFontTypeForCurrentRegion
|
||||
{
|
||||
NSDictionary* regionDict = [self settingsForCurrentRegion];
|
||||
return [[regionDict objectForKey:@"defaultFontType"] objectForKey:@"type"];
|
||||
}
|
||||
|
||||
- (void)saveFontNamePrefsForRegion:(NSDictionary*)regionDict forFontType:(NSString*)fontType
|
||||
{
|
||||
NSString* regionCode = [regionDict objectForKey:@"code"];
|
||||
|
||||
if (!regionDict || !fontType || !regionCode) return;
|
||||
|
||||
NSDictionary* fontTypeDict = [regionDict objectForKey:fontType];
|
||||
|
||||
NSString* fontName = [fontTypeDict objectForKey:@"fontfamily"];
|
||||
NSString* fontPrefName = [NSString stringWithFormat:@"font.name.%@.%@", fontType, regionCode];
|
||||
|
||||
if (fontName) {
|
||||
[self setPref:[fontPrefName UTF8String] toString:fontName];
|
||||
}
|
||||
else {
|
||||
// If the preferences were reset to defaults, this key could be gone.
|
||||
[self clearPref:[fontPrefName UTF8String]];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)saveFontSizePrefsForRegion:(NSDictionary*)regionDict
|
||||
{
|
||||
NSString* regionCode = [regionDict objectForKey:@"code"];
|
||||
|
||||
NSString* variableSizePref = [NSString stringWithFormat:@"font.size.variable.%@", regionCode];
|
||||
NSString* fixedSizePref = [NSString stringWithFormat:@"font.size.fixed.%@", regionCode];
|
||||
NSString* minSizePref = [NSString stringWithFormat:@"font.minimum-size.%@", regionCode];
|
||||
|
||||
NSDictionary* fontSizeDict = [regionDict objectForKey:@"fontsize"];
|
||||
|
||||
int variableSize = [[fontSizeDict objectForKey:@"variable"] intValue];
|
||||
int fixedSize = [[fontSizeDict objectForKey:@"fixed"] intValue];
|
||||
int minSize = [[fontSizeDict objectForKey:@"minimum"] intValue];
|
||||
|
||||
// If the preferences were reset to defaults, these keys could be gone.
|
||||
if (variableSize)
|
||||
[self setPref:[variableSizePref UTF8String] toInt:variableSize];
|
||||
else
|
||||
[self clearPref:[variableSizePref UTF8String]];
|
||||
|
||||
if (fixedSize)
|
||||
[self setPref:[fixedSizePref UTF8String] toInt:fixedSize];
|
||||
else
|
||||
[self clearPref:[fixedSizePref UTF8String]];
|
||||
|
||||
if (minSize)
|
||||
[self setPref:[minSizePref UTF8String] toInt:minSize];
|
||||
else
|
||||
[self clearPref:[minSizePref UTF8String]];
|
||||
}
|
||||
|
||||
- (void)saveDefaultFontTypePrefForRegion:(NSDictionary*)regionDict
|
||||
{
|
||||
NSString* regionCode = [regionDict objectForKey:@"code"];
|
||||
|
||||
NSString* prefName = [NSString stringWithFormat:@"font.default.%@", regionCode];
|
||||
NSString* value = [[regionDict objectForKey:@"defaultFontType"] objectForKey:@"type"];
|
||||
|
||||
// If the preferences were reset to defaults, this key could be gone.
|
||||
if (value)
|
||||
[self setPref:[prefName UTF8String] toString:value];
|
||||
else
|
||||
[self clearPref:[prefName UTF8String]];
|
||||
}
|
||||
|
||||
- (void)saveAllFontPrefsForRegion:(NSDictionary*)regionDict
|
||||
{
|
||||
[self saveFontNamePrefsForRegion:regionDict forFontType:@"serif"];
|
||||
[self saveFontNamePrefsForRegion:regionDict forFontType:@"sans-serif"];
|
||||
[self saveFontNamePrefsForRegion:regionDict forFontType:@"monospace"];
|
||||
|
||||
[self saveDefaultFontTypePrefForRegion:regionDict];
|
||||
[self saveFontSizePrefsForRegion:regionDict];
|
||||
}
|
||||
|
||||
// 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:kGeckoPrefUsePageFonts withSuccess:&gotPref] == 0;
|
||||
}
|
||||
|
||||
- (void)setUseMyFontsPref:(BOOL)checkboxState
|
||||
{
|
||||
int useDocumentFonts = checkboxState ? 0 : 1;
|
||||
[self setPref:kGeckoPrefUsePageFonts toInt:useDocumentFonts];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (void)saveFont:(NSFont*)font toDict:(NSMutableDictionary*)regionDict forType:(NSString*)fontType
|
||||
{
|
||||
NSMutableDictionary* fontTypeDict = [regionDict objectForKey:fontType];
|
||||
NSMutableDictionary* fontSizeDict = [regionDict objectForKey:@"fontsize"];
|
||||
|
||||
if (font)
|
||||
{
|
||||
// clear any missing flag
|
||||
[fontTypeDict removeObjectForKey:@"missing"];
|
||||
|
||||
NSString* fontNameToSave = [font familyName];
|
||||
|
||||
// XXX Special-case Osaka-Mono as part of bug 391076.
|
||||
// When using Osaka as a monospace font, we must use its exact font name (Osaka-Mono),
|
||||
// since the family name (just Osaka) will be incorrect in this case.
|
||||
if ([fontType isEqualToString:@"monospace"] && [[font fontName] isEqualToString:@"Osaka"])
|
||||
fontNameToSave = @"Osaka-Mono";
|
||||
|
||||
[fontTypeDict setObject:fontNameToSave forKey:@"fontfamily"];
|
||||
[fontSizeDict setObject:[NSNumber numberWithInt:(int)[font pointSize]] forKey:[self fontSizeType:fontType]];
|
||||
}
|
||||
}
|
||||
|
||||
// Returns nil if the font could not be found.
|
||||
- (NSFont*)fontOfType:(NSString*)fontType fromDict:(NSDictionary*)regionDict
|
||||
{
|
||||
NSDictionary* fontTypeDict = [regionDict objectForKey:fontType];
|
||||
NSDictionary* fontSizeDict = [regionDict objectForKey:@"fontsize"];
|
||||
|
||||
NSString* fontFamilyFromPrefs = [fontTypeDict objectForKey:@"fontfamily"];
|
||||
int fontSize = [[fontSizeDict objectForKey:[self fontSizeType:fontType]] intValue];
|
||||
|
||||
NSFont* returnFont = nil;
|
||||
|
||||
if (fontFamilyFromPrefs) {
|
||||
returnFont = [NSFont fontWithName:[self fontNameForGeckoFontName:fontFamilyFromPrefs] size:fontSize];
|
||||
if (!returnFont)
|
||||
returnFont = [[NSFontManager sharedFontManager] fontWithFamily:fontFamilyFromPrefs traits:0 weight:5 size:fontSize];
|
||||
// Some fonts are not specified as a family name in prefs, but a single face
|
||||
// (e.g. Osaka-Mono). If we still could not create a font, try to use the pref
|
||||
// value as a face name instead of family name.
|
||||
if (!returnFont)
|
||||
returnFont = [NSFont fontWithName:fontFamilyFromPrefs size:fontSize];
|
||||
}
|
||||
else {
|
||||
returnFont = ([fontType isEqualToString:@"monospace"]) ? [NSFont userFixedPitchFontOfSize:14.0]
|
||||
: [NSFont userFontOfSize:16.0];
|
||||
}
|
||||
|
||||
return returnFont;
|
||||
}
|
||||
|
||||
- (void)setupFontSamplesFromDict:(NSDictionary*)regionDict
|
||||
{
|
||||
// For proportional, show either serif or sans-serif font,
|
||||
// per region's default-font-type (font.default.%regionCode% pref).
|
||||
NSString* defaultFontType = [[regionDict objectForKey:@"defaultFontType"] objectForKey:@"type"];
|
||||
[self setupFontSampleOfType:defaultFontType fromDict:regionDict];
|
||||
[self setupFontSampleOfType:@"monospace" fromDict:regionDict];
|
||||
}
|
||||
|
||||
- (void)setupFontSampleOfType:(NSString*)fontType fromDict:(NSDictionary*)regionDict
|
||||
{
|
||||
NSFont* foundFont = [self fontOfType:fontType fromDict:regionDict];
|
||||
[self setFontSampleOfType:fontType withFont:foundFont andDict:regionDict];
|
||||
}
|
||||
|
||||
// TODO: This code modifies sub-dictionaries of regionDict, which works only
|
||||
// because they happen to have been constructed as mutableDictionaries. This
|
||||
// API (and likely others in this class) should be re-worked to either remove or
|
||||
// enforce that assumption.
|
||||
- (void)setFontSampleOfType:(NSString*)fontType withFont:(NSFont*)font andDict:(NSDictionary*)regionDict
|
||||
{
|
||||
NSMutableDictionary* fontTypeDict = [regionDict objectForKey:fontType];
|
||||
|
||||
NSTextField* sampleCell = [self fontSampleForType:fontType];
|
||||
NSString* displayString = nil;
|
||||
|
||||
// Font may be nil here, in which case the font is missing, and we construct
|
||||
// a string to display from the dict.
|
||||
if (font == nil) {
|
||||
if (regionDict) {
|
||||
NSDictionary* fontSizeDict = [regionDict objectForKey:@"fontsize"];
|
||||
NSString* fontName = [fontTypeDict objectForKey:@"fontfamily"];
|
||||
int fontSize = [[fontSizeDict objectForKey:[self fontSizeType:fontType]] intValue];
|
||||
|
||||
displayString = [NSString stringWithFormat:@"%@, %dpx %@", fontName, fontSize, [self localizedStringForKey:@"Missing"]];
|
||||
font = [NSFont userFontOfSize:14.0];
|
||||
|
||||
// Set the missing flag in the dict.
|
||||
if (![fontTypeDict objectForKey:@"missing"] || ![[fontTypeDict objectForKey:@"missing"] boolValue])
|
||||
[fontTypeDict setObject:[NSNumber numberWithBool:YES] forKey:@"missing"];
|
||||
}
|
||||
else {
|
||||
// should never happen
|
||||
displayString = [self localizedStringForKey:@"FontMissing"];
|
||||
font = [NSFont userFontOfSize:16.0];
|
||||
}
|
||||
}
|
||||
else {
|
||||
// The fact that font != nil merely indicates that the font specified in prefs
|
||||
// is not missing on the system. There could actually be no font pref set for
|
||||
// this region and type, in which case |font| is only a default value.
|
||||
// Check if there is an actual value set in prefs.
|
||||
BOOL fontIsSpecifiedInPrefs = ([fontTypeDict objectForKey:@"fontfamily"] != nil);
|
||||
|
||||
if (fontIsSpecifiedInPrefs) {
|
||||
NSString* localizedFamilyName = [[NSFontManager sharedFontManager] localizedNameForFamily:[font familyName] face:nil];
|
||||
displayString = [NSString stringWithFormat:@"%@, %dpx", localizedFamilyName, (int)[font pointSize]];
|
||||
}
|
||||
else {
|
||||
displayString = [self localizedStringForKey:@"NoFontSelected"];
|
||||
}
|
||||
|
||||
// Make sure we don't have a "missing" entry.
|
||||
[fontTypeDict removeObjectForKey:@"missing"];
|
||||
}
|
||||
|
||||
[sampleCell setFont:font];
|
||||
[sampleCell setStringValue:displayString];
|
||||
}
|
||||
|
||||
- (void)updateFontSampleOfType:(NSString*)fontType
|
||||
{
|
||||
NSMutableDictionary* regionDict = [self settingsForCurrentRegion];
|
||||
if (!regionDict) return;
|
||||
|
||||
NSTextField* sampleCell = [self fontSampleForType:fontType];
|
||||
NSFont* sampleFont = [[NSFontManager sharedFontManager] convertFont:[sampleCell font]];
|
||||
|
||||
// Save the font in the dictionaries...
|
||||
[self saveFont:sampleFont toDict:regionDict forType:fontType];
|
||||
|
||||
// Update the font sample.
|
||||
// Even though we know the new font we actually re-fetch it, as some fonts are
|
||||
// actually modified when saving, to account for Gecko/Cocoa naming conflicts.
|
||||
NSFont* fontAsSaved = [self fontOfType:fontType fromDict:regionDict];
|
||||
[self setFontSampleOfType:fontType withFont:fontAsSaved andDict:regionDict];
|
||||
}
|
||||
|
||||
- (NSTextField*)fontSampleForType:(NSString*)fontType
|
||||
{
|
||||
if ([fontType isEqualToString:@"serif"] || [fontType isEqualToString:@"sans-serif"])
|
||||
return mFontSampleProportional;
|
||||
|
||||
if ([fontType isEqualToString:@"monospace"])
|
||||
return mFontSampleMonospace;
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString*)fontSizeType:(NSString*)fontType
|
||||
{
|
||||
if ([fontType isEqualToString:@"monospace"])
|
||||
return @"fixed";
|
||||
|
||||
return @"variable";
|
||||
}
|
||||
|
||||
- (void)updateFontPreviews
|
||||
{
|
||||
NSDictionary* regionDict = [self settingsForCurrentRegion];
|
||||
if (!regionDict) return;
|
||||
|
||||
NSString* defaultFontType = [self defaultProportionalFontTypeForCurrentRegion];
|
||||
// Make sure the "proportional" label matches.
|
||||
NSString* propLabelString = [NSString stringWithFormat:[self localizedStringForKey:@"ProportionalLabelFormat"],
|
||||
[self localizedStringForKey:defaultFontType]];
|
||||
[mProportionalSampleLabel setStringValue:propLabelString];
|
||||
|
||||
[self setupFontSamplesFromDict:regionDict];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
const int kDefaultFontSerifTag = 0;
|
||||
const int kDefaultFontSansSerifTag = 1;
|
||||
|
||||
- (void)updateAdvancedFontControls
|
||||
{
|
||||
NSDictionary* regionDict = [self settingsForCurrentRegion];
|
||||
if (!regionDict) return;
|
||||
|
||||
// set up min size popup
|
||||
int itemIndex = 0;
|
||||
NSMutableDictionary* fontSizeDict = [regionDict objectForKey:@"fontsize"];
|
||||
NSNumber* minSize = [fontSizeDict objectForKey:@"minimum"];
|
||||
if (minSize) {
|
||||
itemIndex = [mMinFontSizePopup indexOfItemWithTag:[minSize intValue]];
|
||||
if (itemIndex == -1)
|
||||
itemIndex = 0;
|
||||
}
|
||||
[mMinFontSizePopup selectItemAtIndex:itemIndex];
|
||||
|
||||
// set up default font radio buttons (default to serif)
|
||||
NSString* defaultFontType = [self defaultProportionalFontTypeForCurrentRegion];
|
||||
[mDefaultFontMatrix selectCellWithTag:([defaultFontType isEqualToString:@"sans-serif"] ? kDefaultFontSansSerifTag : kDefaultFontSerifTag)];
|
||||
}
|
||||
|
||||
- (IBAction)minFontSizePopupClicked:(id)sender
|
||||
{
|
||||
NSDictionary* regionDict = [self settingsForCurrentRegion];
|
||||
if (!regionDict) return;
|
||||
|
||||
int minSize = [[mMinFontSizePopup selectedItem] tag];
|
||||
// A value of 0 indicates "none"; we'll clear the pref on save.
|
||||
NSMutableDictionary* fontSizeDict = [regionDict objectForKey:@"fontsize"];
|
||||
[fontSizeDict setObject:[NSNumber numberWithInt:(int)minSize] forKey:@"minimum"];
|
||||
|
||||
[self saveFontSizePrefsForRegion:regionDict];
|
||||
[self updateFontPreviews];
|
||||
}
|
||||
|
||||
- (IBAction)defaultFontTypeClicked:(id)sender
|
||||
{
|
||||
NSDictionary* regionDict = [self settingsForCurrentRegion];
|
||||
if (!regionDict) return;
|
||||
|
||||
NSMutableDictionary* defaultFontTypeDict = [regionDict objectForKey:@"defaultFontType"];
|
||||
NSString* defaultFontType = ([[mDefaultFontMatrix selectedCell] tag] == kDefaultFontSerifTag) ? @"serif" : @"sans-serif";
|
||||
[defaultFontTypeDict setObject:defaultFontType forKey:@"type"];
|
||||
|
||||
[self saveDefaultFontTypePrefForRegion:regionDict];
|
||||
[self updateFontPreviews];
|
||||
}
|
||||
|
||||
- (IBAction)resetToDefaults:(id)sender {
|
||||
NSString* selectedTabViewIdentifier = [[mTabView selectedTabViewItem] identifier];
|
||||
if ([selectedTabViewIdentifier isEqual:@"colors"]) {
|
||||
[self resetColorsToDefaults:sender];
|
||||
}
|
||||
else if ([selectedTabViewIdentifier isEqual:@"fonts"]) {
|
||||
[self resetFontsToDefaults:sender];
|
||||
}
|
||||
}
|
||||
|
||||
// Reset the "Colors and Links" tab to application factory defaults.
|
||||
- (IBAction)resetColorsToDefaults:(id)sender
|
||||
{
|
||||
[self clearPref:kGeckoPrefUnderlineLinks];
|
||||
[self clearPref:kGeckoPrefUsePageColors];
|
||||
[self clearPref:kGeckoPrefPageBackgroundColor];
|
||||
[self clearPref:kGeckoPrefPageForegroundColor];
|
||||
[self clearPref:kGeckoPrefLinkColor];
|
||||
[self clearPref:kGeckoPrefVisitedLinkColor];
|
||||
|
||||
// update UI
|
||||
int state;
|
||||
state = [self getBooleanPref:kGeckoPrefUnderlineLinks withSuccess:NULL] ? NSOnState : NSOffState;
|
||||
[mUnderlineLinksCheckbox setState:state];
|
||||
state = [self getBooleanPref:kGeckoPrefUsePageColors withSuccess:NULL] ? NSOffState : NSOnState;
|
||||
[mUseMyColorsCheckbox setState:state];
|
||||
|
||||
[mBackgroundColorWell setColor:[self getColorPref:kGeckoPrefPageBackgroundColor withSuccess:NULL]];
|
||||
[mTextColorWell setColor:[self getColorPref:kGeckoPrefPageForegroundColor withSuccess:NULL]];
|
||||
[mUnvisitedLinksColorWell setColor:[self getColorPref:kGeckoPrefLinkColor withSuccess:NULL]];
|
||||
[mVisitedLinksColorWell setColor:[self getColorPref:kGeckoPrefVisitedLinkColor withSuccess:NULL]];
|
||||
}
|
||||
|
||||
// Reset the Fonts tab to application factory defaults.
|
||||
- (IBAction)resetFontsToDefaults:(id)sender
|
||||
{
|
||||
// Clear all the preferences for the various font regions.
|
||||
for (unsigned int i = 0; i < [mRegionMappingTable count]; i++) {
|
||||
NSMutableDictionary* regionDict = [mRegionMappingTable objectAtIndex:i];
|
||||
// NSString* regionCode = [regionDict objectForKey:@"code"];
|
||||
|
||||
// For each region, we reset the dictionaries to be empty.
|
||||
[regionDict setObject:[NSMutableDictionary dictionary] forKey:@"serif"];
|
||||
[regionDict setObject:[NSMutableDictionary dictionary] forKey:@"sans-serif"];
|
||||
[regionDict setObject:[NSMutableDictionary dictionary] forKey:@"monospace"];
|
||||
[regionDict setObject:[NSMutableDictionary dictionary] forKey:@"fontsize"];
|
||||
[regionDict setObject:[NSMutableDictionary dictionary] forKey:@"defaultFontType"];
|
||||
}
|
||||
|
||||
[self clearPref:kGeckoPrefUsePageFonts];
|
||||
|
||||
// Commit the changes:
|
||||
// First, we clear the preferences by saving them. This clears the values that are returned by
|
||||
// -[self getPref:].
|
||||
[self saveFontPrefs];
|
||||
// Since the rest of the Appearance code doesn't access the prefs by getPref directly,
|
||||
// we need to re-store the default preference values in the region dicts.
|
||||
[self loadFontPrefs];
|
||||
|
||||
// Update the UI. Order is important here -- syncing the font panel depends on the
|
||||
// font previews being correct.
|
||||
[self updateFontPreviews];
|
||||
[self updateAdvancedFontControls];
|
||||
[mUseMyFontsCheckbox setState:[self useMyFontsPref]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation OrgMozillaCaminoPreferenceAppearance (FontManagerDelegate)
|
||||
|
||||
- (id)fieldEditorForObject:(id)inObject
|
||||
{
|
||||
if (inObject == mFontSampleProportional) {
|
||||
if (!mPropSampleFieldEditor) {
|
||||
SampleTextView* propFieldEditor = [[SampleTextView alloc] initWithFrame:[inObject bounds]];
|
||||
[propFieldEditor setPrefPane:self];
|
||||
[propFieldEditor setFieldEditor:YES];
|
||||
[propFieldEditor setDelegate:inObject];
|
||||
mPropSampleFieldEditor = propFieldEditor;
|
||||
}
|
||||
|
||||
return mPropSampleFieldEditor;
|
||||
}
|
||||
else if (inObject == mFontSampleMonospace) {
|
||||
if (!mMonoSampleFieldEditor) {
|
||||
SampleTextView* monoFieldEditor = [[SampleTextView alloc] initWithFrame:[inObject bounds]];
|
||||
[monoFieldEditor setPrefPane:self];
|
||||
[monoFieldEditor setFieldEditor:YES];
|
||||
[monoFieldEditor setDelegate:inObject];
|
||||
mMonoSampleFieldEditor = monoFieldEditor;
|
||||
}
|
||||
|
||||
return mMonoSampleFieldEditor;
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)changeFont:(id)sender
|
||||
{
|
||||
NSDictionary* regionDict = [self settingsForCurrentRegion];
|
||||
|
||||
if (mFontButtonForEditor == mChooseProportionalFontButton) {
|
||||
NSString* fontType = [self defaultProportionalFontTypeForCurrentRegion];
|
||||
[self updateFontSampleOfType:fontType];
|
||||
[self saveFontNamePrefsForRegion:regionDict forFontType:fontType];
|
||||
}
|
||||
else if (mFontButtonForEditor == mChooseMonospaceFontButton) {
|
||||
[self updateFontSampleOfType:@"monospace"];
|
||||
[self saveFontNamePrefsForRegion:regionDict forFontType:@"monospace"];
|
||||
}
|
||||
|
||||
[self saveFontSizePrefsForRegion:regionDict];
|
||||
}
|
||||
|
||||
- (BOOL)fontManager:(id)theFontManager willIncludeFont:(NSString*)fontName
|
||||
{
|
||||
// Filter out fonts for the selected language.
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (unsigned int)validModesForFontPanel:(NSFontPanel*)fontPanel
|
||||
{
|
||||
// Hide the font face panel.
|
||||
return (NSFontPanelStandardModesMask & ~NSFontPanelFaceModeMask);
|
||||
}
|
||||
|
||||
@end
|
||||
Binary file not shown.
@@ -1,144 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBClasses</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>PreferencePaneBase</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSPreferencePane</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>NSView</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSResponder</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>NSMenuItem</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>NSMenu</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>FirstResponder</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>NSObject</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>NSPreferencePane</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>_firstKeyView</key>
|
||||
<string>id</string>
|
||||
<key>_initialKeyView</key>
|
||||
<string>id</string>
|
||||
<key>_lastKeyView</key>
|
||||
<string>id</string>
|
||||
<key>_window</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
<key>buttonClicked</key>
|
||||
<string>id</string>
|
||||
<key>colorChanged</key>
|
||||
<string>id</string>
|
||||
<key>defaultFontTypeClicked</key>
|
||||
<string>id</string>
|
||||
<key>fontRegionPopupClicked</key>
|
||||
<string>id</string>
|
||||
<key>minFontSizePopupClicked</key>
|
||||
<string>id</string>
|
||||
<key>monospaceFontChoiceButtonClicked</key>
|
||||
<string>id</string>
|
||||
<key>proportionalFontChoiceButtonClicked</key>
|
||||
<string>id</string>
|
||||
<key>resetToDefaults</key>
|
||||
<string>id</string>
|
||||
<key>useMyFontsButtonClicked</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>CLASS</key>
|
||||
<string>OrgMozillaCaminoPreferenceAppearance</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>mBackgroundColorWell</key>
|
||||
<string>NSColorWell</string>
|
||||
<key>mChooseMonospaceFontButton</key>
|
||||
<string>NSButton</string>
|
||||
<key>mChooseProportionalFontButton</key>
|
||||
<string>NSButton</string>
|
||||
<key>mDefaultFontMatrix</key>
|
||||
<string>NSMatrix</string>
|
||||
<key>mFontRegionPopup</key>
|
||||
<string>NSPopUpButton</string>
|
||||
<key>mFontSampleMonospace</key>
|
||||
<string>NSTextField</string>
|
||||
<key>mFontSampleProportional</key>
|
||||
<string>NSTextField</string>
|
||||
<key>mMinFontSizePopup</key>
|
||||
<string>NSPopUpButton</string>
|
||||
<key>mPreviousBottomControl</key>
|
||||
<string>NSView</string>
|
||||
<key>mProportionalSampleLabel</key>
|
||||
<string>NSTextField</string>
|
||||
<key>mResetButton</key>
|
||||
<string>NSButton</string>
|
||||
<key>mTabView</key>
|
||||
<string>NSTabView</string>
|
||||
<key>mTextColorWell</key>
|
||||
<string>NSColorWell</string>
|
||||
<key>mUnderlineLinksCheckbox</key>
|
||||
<string>NSButton</string>
|
||||
<key>mUnvisitedLinksColorWell</key>
|
||||
<string>NSColorWell</string>
|
||||
<key>mUseMyColorsCheckbox</key>
|
||||
<string>NSButton</string>
|
||||
<key>mUseMyFontsCheckbox</key>
|
||||
<string>NSButton</string>
|
||||
<key>mVisitedLinksColorWell</key>
|
||||
<string>NSColorWell</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>PreferencePaneBase</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>IBVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>677</string>
|
||||
<key>IBLastKnownRelativeProjectPath</key>
|
||||
<string>../../../Camino.xcodeproj</string>
|
||||
<key>IBOldestOS</key>
|
||||
<integer>4</integer>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>107</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>9L31a</string>
|
||||
<key>targetFramework</key>
|
||||
<string>IBCocoaFramework</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -1,10 +0,0 @@
|
||||
"PreferencePanelLabel" = "Appearance";
|
||||
|
||||
"Missing" = "(missing)";
|
||||
"FontMissing" = "Font missing";
|
||||
"ProportionalLabelFormat" = "Proportional (%@):";
|
||||
"serif" = "Serif";
|
||||
"sans-serif" = "Sans-serif";
|
||||
|
||||
/* Displayed when there is no font specified in prefs for a given language group and type */
|
||||
"NoFontSelected" = "No font selected";
|
||||
@@ -1,34 +0,0 @@
|
||||
/* These langGroups, and their corresponding RegionMapping.plist entries,
|
||||
are ordered geographically, roughly west-to-east and north-to-south,
|
||||
within broad 'regions' starting from 'the West' */
|
||||
"x-western" = "Western";
|
||||
"x-central-euro" = "Central European";
|
||||
"x-baltic" = "Baltic";
|
||||
"x-cyrillic" = "Cyrillic";
|
||||
"el" = "Greek";
|
||||
"x-cans" = "Unified Canadian Syllabary";
|
||||
"tr" = "Turkish";
|
||||
"he" = "Hebrew";
|
||||
"ar" = "Arabic";
|
||||
"x-armn" = "Armenian";
|
||||
"x-geor" = "Georgian";
|
||||
"x-ethi" = "Ethiopic";
|
||||
"x-devanagari" = "Devanagari";
|
||||
"x-guru" = "Gurmukhi";
|
||||
"x-gujr" = "Gujarati";
|
||||
"x-knda" = "Kannada";
|
||||
"x-mlym" = "Malayalam";
|
||||
"x-beng" = "Bengali";
|
||||
"x-orya" = "Oriya";
|
||||
"x-telu" = "Telugu";
|
||||
"x-tamil" = "Tamil";
|
||||
"x-sinh" = "Sinhala";
|
||||
"th" = "Thai";
|
||||
"x-khmr" = "Khmer";
|
||||
"zh-CN" = "Simplified Chinese";
|
||||
"zh-TW" = "Traditional Chinese (Taiwan)";
|
||||
"zh-HK" = "Traditional Chinese (Hong Kong)";
|
||||
"ko" = "Korean";
|
||||
"ja" = "Japanese";
|
||||
"x-unicode" = "Unicode";
|
||||
"x-user-def" = "User-Defined";
|
||||
@@ -1,130 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<array>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-western</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-central-euro</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-baltic</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-cyrillic</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>el</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-cans</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>tr</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>he</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>ar</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-armn</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-geor</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-ethi</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-devanagari</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-guru</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-gujr</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-knda</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-mlym</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-beng</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-orya</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-telu</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-tamil</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-sinh</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>th</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-khmr</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>zh-CN</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>zh-TW</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>zh-HK</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>ko</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>ja</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-unicode</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>code</key>
|
||||
<string>x-user-def</string>
|
||||
</dict>
|
||||
</array>
|
||||
</plist>
|
||||
@@ -1,55 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* ***** 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 the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* william@dell.wisner.name (William Dell Wisner)
|
||||
* josh@mozilla.com (Josh Aas)
|
||||
*
|
||||
* 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 <PreferencePaneBase.h>
|
||||
|
||||
@interface OrgMozillaCaminoPreferenceDownloads : PreferencePaneBase
|
||||
{
|
||||
IBOutlet NSPopUpButton* mDownloadFolder;
|
||||
IBOutlet NSPopUpButton* mDownloadRemovalPolicy;
|
||||
IBOutlet NSButton* mAutoCloseDLManager;
|
||||
IBOutlet NSButton* mEnableHelperApps;
|
||||
}
|
||||
|
||||
- (IBAction)checkboxClicked:(id)sender;
|
||||
- (IBAction)chooseDownloadFolder:(id)sender;
|
||||
- (IBAction)chooseDownloadRemovalPolicy:(id)sender;
|
||||
|
||||
@end
|
||||
@@ -1,232 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* ***** 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 the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* william@dell.wisner.name (William Dell Wisner)
|
||||
* josh@mozilla.com (Josh Aas)
|
||||
*
|
||||
* 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 "Downloads.h"
|
||||
|
||||
#import "GeckoPrefConstants.h"
|
||||
#import "PreferenceManager.h"
|
||||
|
||||
// handy stack-based class to start and stop an Internet Config session
|
||||
class StInternetConfigSession
|
||||
{
|
||||
public:
|
||||
|
||||
StInternetConfigSession(OSType inSignature)
|
||||
: mICInstance(NULL)
|
||||
, mStartedOK(false)
|
||||
{
|
||||
mStartedOK = (::ICStart(&mICInstance, inSignature) == noErr);
|
||||
}
|
||||
|
||||
~StInternetConfigSession()
|
||||
{
|
||||
if (mStartedOK)
|
||||
::ICStop(mICInstance);
|
||||
}
|
||||
|
||||
bool Available() const { return mStartedOK; }
|
||||
ICInstance Instance() const { return mICInstance; }
|
||||
|
||||
private:
|
||||
|
||||
ICInstance mICInstance;
|
||||
bool mStartedOK;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@interface OrgMozillaCaminoPreferenceDownloads(Private)
|
||||
|
||||
- (void)setupDownloadMenuWithPath:(NSString*)inDLPath;
|
||||
- (void)setDownloadFolder:(NSString*)inNewFolder;
|
||||
|
||||
@end
|
||||
|
||||
@implementation OrgMozillaCaminoPreferenceDownloads
|
||||
|
||||
- (id)initWithBundle:(NSBundle*)bundle
|
||||
{
|
||||
self = [super initWithBundle:bundle];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)willSelect
|
||||
{
|
||||
// Our behaviour here should match what the browser does when the prefs don't exist.
|
||||
[mAutoCloseDLManager setState:([self getBooleanPref:kGeckoPrefCloseDownloadManagerWhenDone withSuccess:NULL]) ? NSOnState : NSOffState];
|
||||
[mEnableHelperApps setState:([self getBooleanPref:kGeckoPrefAutoOpenDownloads withSuccess:NULL]) ? NSOnState : NSOffState];
|
||||
[mDownloadRemovalPolicy selectItem:[[mDownloadRemovalPolicy menu] itemWithTag:[self getIntPref:kGeckoPrefDownloadCleanupPolicy
|
||||
withSuccess:NULL]]];
|
||||
|
||||
NSString* downloadFolderDesc = [[PreferenceManager sharedInstance] downloadDirectoryPath];
|
||||
if ([downloadFolderDesc length] == 0)
|
||||
downloadFolderDesc = [self localizedStringForKey:@"MissingDlFolder"];
|
||||
|
||||
[self setupDownloadMenuWithPath:downloadFolderDesc];
|
||||
}
|
||||
|
||||
- (IBAction)checkboxClicked:(id)sender
|
||||
{
|
||||
if (sender == mAutoCloseDLManager)
|
||||
[self setPref:kGeckoPrefCloseDownloadManagerWhenDone toBoolean:[sender state]];
|
||||
|
||||
if (sender == mEnableHelperApps)
|
||||
[self setPref:kGeckoPrefAutoOpenDownloads toBoolean:[sender state]];
|
||||
}
|
||||
|
||||
// Sets the IC download pref to the given path. We write to Internet Config
|
||||
// because Gecko reads from IC when getting NS_MAC_DEFAULT_DOWNLOAD_DIR.
|
||||
- (void)setDownloadFolder:(NSString*)inNewFolder
|
||||
{
|
||||
if (!inNewFolder)
|
||||
return;
|
||||
|
||||
// It would be nice to use PreferenceManager, but I don't want to drag
|
||||
// all that code into the plugin.
|
||||
StInternetConfigSession icSession('MOZC');
|
||||
if (!icSession.Available())
|
||||
return;
|
||||
|
||||
// Make a ICFileSpec out of our path and shove it into IC. This requires
|
||||
// creating an FSSpec and an alias.
|
||||
FSRef fsRef;
|
||||
Boolean isDir;
|
||||
OSStatus error = ::FSPathMakeRef((UInt8*)[inNewFolder fileSystemRepresentation], &fsRef, &isDir);
|
||||
if (error != noErr)
|
||||
return;
|
||||
|
||||
FSSpec fsSpec;
|
||||
error = ::FSGetCatalogInfo(&fsRef, kFSCatInfoNone, nil, nil, &fsSpec, nil);
|
||||
if (error != noErr)
|
||||
return;
|
||||
|
||||
AliasHandle alias = nil;
|
||||
error = ::FSNewAlias(nil, &fsRef, &alias);
|
||||
|
||||
// Copy the data out of our variables into the ICFileSpec and hand it to IC.
|
||||
if (error == noErr && alias) {
|
||||
long headerSize = offsetof(ICFileSpec, alias);
|
||||
long aliasSize = ::GetHandleSize((Handle)alias);
|
||||
ICFileSpec* realbuffer = (ICFileSpec*) calloc(headerSize + aliasSize, 1);
|
||||
realbuffer->fss = fsSpec;
|
||||
memcpy(&realbuffer->alias, *alias, aliasSize);
|
||||
::ICSetPref(icSession.Instance(), kICDownloadFolder, kICAttrNoChange, (const void*)realbuffer, headerSize + aliasSize);
|
||||
free(realbuffer);
|
||||
::DisposeHandle((Handle)alias);
|
||||
}
|
||||
}
|
||||
|
||||
// Given a full path to the d/l dir, display the leaf name and the Finder icon associated
|
||||
// with that folder in the first item of the download folder popup.
|
||||
//
|
||||
- (void)setupDownloadMenuWithPath:(NSString*)inDLPath
|
||||
{
|
||||
NSMenuItem* placeholder = [mDownloadFolder itemAtIndex:0];
|
||||
if (!placeholder)
|
||||
return;
|
||||
|
||||
// Get the Finder icon and scale it down to 16x16.
|
||||
NSImage* icon = [[NSWorkspace sharedWorkspace] iconForFile:inDLPath];
|
||||
[icon setScalesWhenResized:YES];
|
||||
[icon setSize:NSMakeSize(16.0, 16.0)];
|
||||
|
||||
// Set the title to the leaf name and the icon to what we gathered above.
|
||||
[placeholder setTitle:[[NSFileManager defaultManager] displayNameAtPath:inDLPath]];
|
||||
[placeholder setImage:icon];
|
||||
|
||||
// Ensure the first item is selected.
|
||||
[mDownloadFolder selectItemAtIndex:0];
|
||||
}
|
||||
|
||||
// Display a file picker sheet allowing the user to set their new download folder.
|
||||
- (IBAction)chooseDownloadFolder:(id)sender
|
||||
{
|
||||
NSString* oldDLFolder = [[PreferenceManager sharedInstance] downloadDirectoryPath];
|
||||
NSOpenPanel* panel = [NSOpenPanel openPanel];
|
||||
[panel setCanChooseFiles:NO];
|
||||
[panel setCanChooseDirectories:YES];
|
||||
[panel setAllowsMultipleSelection:NO];
|
||||
[panel setCanCreateDirectories:YES];
|
||||
[panel setPrompt:NSLocalizedString(@"ChooseDirectoryOKButton", @"")];
|
||||
|
||||
[panel beginSheetForDirectory:oldDLFolder
|
||||
file:nil
|
||||
types:nil
|
||||
modalForWindow:[mDownloadFolder window]
|
||||
modalDelegate:self
|
||||
didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:)
|
||||
contextInfo:nil];
|
||||
}
|
||||
|
||||
//
|
||||
// Set the download removal policy.
|
||||
//
|
||||
- (IBAction)chooseDownloadRemovalPolicy:(id)sender
|
||||
{
|
||||
// The three options in the popup contains tags 0-2; set the pref according to the
|
||||
// selected menu item's tag.
|
||||
int selectedTagValue = [mDownloadRemovalPolicy selectedTag];
|
||||
[self setPref:kGeckoPrefDownloadCleanupPolicy toInt:selectedTagValue];
|
||||
}
|
||||
|
||||
// This is called when the user closes the open panel sheet for selecting a new d/l folder.
|
||||
// If they clicked ok, change the IC pref and re-display the new choice in the
|
||||
// popup menu.
|
||||
- (void)openPanelDidEnd:(NSOpenPanel*)sheet returnCode:(int)returnCode contextInfo:(void*)contextInfo
|
||||
{
|
||||
if (returnCode == NSOKButton) {
|
||||
// stuff path into pref
|
||||
NSString* newPath = [[sheet filenames] objectAtIndex:0];
|
||||
[self setDownloadFolder:newPath];
|
||||
|
||||
// update the menu
|
||||
[self setupDownloadMenuWithPath:newPath];
|
||||
}
|
||||
else {
|
||||
[mDownloadFolder selectItemAtIndex:0];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
Binary file not shown.
@@ -1,74 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBClasses</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>PreferencePaneBase</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSPreferencePane</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>FirstResponder</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>NSPreferencePane</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>_firstKeyView</key>
|
||||
<string>NSView</string>
|
||||
<key>_initialKeyView</key>
|
||||
<string>NSView</string>
|
||||
<key>_lastKeyView</key>
|
||||
<string>NSView</string>
|
||||
<key>_window</key>
|
||||
<string>NSWindow</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
<key>checkboxClicked</key>
|
||||
<string>id</string>
|
||||
<key>chooseDownloadFolder</key>
|
||||
<string>id</string>
|
||||
<key>chooseDownloadRemovalPolicy</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>CLASS</key>
|
||||
<string>OrgMozillaCaminoPreferenceDownloads</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>mAutoCloseDLManager</key>
|
||||
<string>NSButton</string>
|
||||
<key>mDownloadFolder</key>
|
||||
<string>NSPopUpButton</string>
|
||||
<key>mDownloadRemovalPolicy</key>
|
||||
<string>NSPopUpButton</string>
|
||||
<key>mEnableHelperApps</key>
|
||||
<string>NSButton</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>PreferencePaneBase</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>IBVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>629</string>
|
||||
<key>IBOldestOS</key>
|
||||
<integer>5</integer>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>6</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>9J61</string>
|
||||
<key>targetFramework</key>
|
||||
<string>IBCocoaFramework</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -1,4 +0,0 @@
|
||||
"PreferencePanelLabel" = "Downloads";
|
||||
|
||||
"DownloadFolderDesc" = "Folder “%@” on the volume “%@”";
|
||||
"MissingDlFolder" = "(unknown)";
|
||||
@@ -1,54 +0,0 @@
|
||||
{
|
||||
IBClasses = (
|
||||
{
|
||||
CLASS = FirstResponder;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
CLASS = NSPreferencePane;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
"_firstKeyView" = NSView;
|
||||
"_initialKeyView" = NSView;
|
||||
"_lastKeyView" = NSView;
|
||||
"_window" = NSWindow;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
ACTIONS = {
|
||||
autoUpdateCheckboxClicked = id;
|
||||
checkDefaultBrowserOnLaunchClicked = id;
|
||||
checkboxStartPageClicked = id;
|
||||
defaultBrowserChange = id;
|
||||
defaultFeedViewerChange = id;
|
||||
homePageModified = id;
|
||||
rememberWindowStateCheckboxClicked = id;
|
||||
runOpenDialogToSelectBrowser = id;
|
||||
runOpenDialogToSelectFeedViewer = id;
|
||||
warningCheckboxClicked = id;
|
||||
};
|
||||
CLASS = OrgMozillaCaminoPreferenceGeneral;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
checkboxAutoUpdate = NSButton;
|
||||
checkboxCheckDefaultBrowserOnLaunch = NSButton;
|
||||
checkboxNewTabBlank = NSButton;
|
||||
checkboxNewWindowBlank = NSButton;
|
||||
checkboxRememberWindowState = NSButton;
|
||||
checkboxWarnWhenClosing = NSButton;
|
||||
defaultBrowserPopUp = NSPopUpButton;
|
||||
defaultFeedViewerPopUp = NSPopUpButton;
|
||||
textFieldHomePage = NSTextField;
|
||||
};
|
||||
SUPERCLASS = PreferencePaneBase;
|
||||
},
|
||||
{
|
||||
CLASS = PreferencePaneBase;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSPreferencePane;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>10 8 462 260 0 0 1024 746 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>489.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>9D34</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -1 +0,0 @@
|
||||
"PreferencePanelLabel" = "General";
|
||||
@@ -1,73 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* ***** 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 the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* william@dell.wisner.name (William Dell Wisner)
|
||||
*
|
||||
* 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 <PreferencePaneBase.h>
|
||||
|
||||
@interface OrgMozillaCaminoPreferenceGeneral : PreferencePaneBase
|
||||
{
|
||||
IBOutlet NSTextField* textFieldHomePage;
|
||||
|
||||
IBOutlet NSButton* checkboxNewTabBlank;
|
||||
IBOutlet NSButton* checkboxNewWindowBlank;
|
||||
IBOutlet NSPopUpButton* defaultBrowserPopUp;
|
||||
IBOutlet NSPopUpButton* defaultFeedViewerPopUp;
|
||||
IBOutlet NSButton* checkboxCheckDefaultBrowserOnLaunch;
|
||||
IBOutlet NSButton* checkboxWarnWhenClosing;
|
||||
IBOutlet NSButton* checkboxRememberWindowState;
|
||||
IBOutlet NSButton* checkboxAutoUpdate;
|
||||
}
|
||||
|
||||
- (IBAction)homePageModified:(id)sender;
|
||||
- (IBAction)checkboxStartPageClicked:(id)sender;
|
||||
- (IBAction)defaultBrowserChange:(id)sender;
|
||||
- (IBAction)defaultFeedViewerChange:(id)sender;
|
||||
- (IBAction)warningCheckboxClicked:(id)sender;
|
||||
- (IBAction)rememberWindowStateCheckboxClicked:(id)sender;
|
||||
- (IBAction)checkDefaultBrowserOnLaunchClicked:(id)sender;
|
||||
- (IBAction)autoUpdateCheckboxClicked:(id)sender;
|
||||
|
||||
// called when the default feed viewer is modified in FeedServiceController
|
||||
// so we can rebuild the list here as well
|
||||
- (void)updateDefaultFeedViewerMenu;
|
||||
|
||||
- (IBAction)defaultFeedViewerChange:(id)sender;
|
||||
- (IBAction)runOpenDialogToSelectBrowser:(id)sender;
|
||||
- (IBAction)runOpenDialogToSelectFeedViewer:(id)sender;
|
||||
|
||||
@end
|
||||
@@ -1,296 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* ***** 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 the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* william@dell.wisner.name (William Dell Wisner)
|
||||
* josh@mozilla.com (Josh Aas)
|
||||
*
|
||||
* 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 <ApplicationServices/ApplicationServices.h>
|
||||
|
||||
#import "General.h"
|
||||
|
||||
// Must be after General.h to pick up Cocoa headers.
|
||||
#import <Sparkle/Sparkle.h>
|
||||
|
||||
#import "NSWorkspace+Utils.h"
|
||||
#import "AppListMenuFactory.h"
|
||||
#import "UserDefaults.h"
|
||||
#import "GeckoPrefConstants.h"
|
||||
|
||||
@interface OrgMozillaCaminoPreferenceGeneral(Private)
|
||||
|
||||
- (NSString*)currentHomePage;
|
||||
- (void)updateDefaultBrowserMenu;
|
||||
- (void)browserSelectionPanelDidEnd:(NSOpenPanel*)sheet returnCode:(int)returnCode contextInfo:(void*)contextInfo;
|
||||
- (void)feedSelectionPanelDidEnd:(NSOpenPanel*)sheet returnCode:(int)returnCode contextInfo:(void*)contextInfo;
|
||||
|
||||
@end
|
||||
|
||||
@implementation OrgMozillaCaminoPreferenceGeneral
|
||||
|
||||
- (id)initWithBundle:(NSBundle *)bundle
|
||||
{
|
||||
if ((self = [super initWithBundle:bundle])) {
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObject:[NSArray array]
|
||||
forKey:kUserChosenBrowserUserDefaultsKey]];
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObject:[NSArray array]
|
||||
forKey:kUserChosenFeedViewerUserDefaultsKey]];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)mainViewDidLoad
|
||||
{
|
||||
if (![[[NSBundle mainBundle] objectForInfoDictionaryKey:@"SUEnableAutomaticChecks"] boolValue]) {
|
||||
// Disable update checking if it's turned off for this build. The tooltip comes
|
||||
// from the main application because it's used there too.
|
||||
[checkboxAutoUpdate setEnabled:NO];
|
||||
[checkboxAutoUpdate setToolTip:NSLocalizedString(@"AutoUpdateDisabledToolTip", @"")];
|
||||
}
|
||||
|
||||
// Register for notification when the default feed viewer is changed in the FeedServiceController.
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(updateDefaultFeedViewerMenu)
|
||||
name:kDefaultFeedViewerChanged
|
||||
object:nil];
|
||||
|
||||
// Set up default browser and default feed viewer menus.
|
||||
// These are here instead of in |willSelect| because of bug 353433,
|
||||
// and should be moved to |willSelect| when that bug is fully fixed.
|
||||
[self updateDefaultBrowserMenu];
|
||||
[self updateDefaultFeedViewerMenu];
|
||||
}
|
||||
|
||||
- (void) willSelect
|
||||
{
|
||||
BOOL gotPref;
|
||||
|
||||
[textFieldHomePage setStringValue:[self currentHomePage]];
|
||||
|
||||
// Our behaviour here should match what the browser does when the prefs don't exist.
|
||||
if (([self getIntPref:kGeckoPrefNewWindowStartPage withSuccess:&gotPref] == kStartPageHome) || !gotPref)
|
||||
[checkboxNewWindowBlank setState:NSOnState];
|
||||
|
||||
if (([self getIntPref:kGeckoPrefNewTabStartPage withSuccess:&gotPref] == kStartPageHome))
|
||||
[checkboxNewTabBlank setState:NSOnState];
|
||||
|
||||
if ([self getBooleanPref:kGeckoPrefSessionSaveEnabled withSuccess:&gotPref])
|
||||
[checkboxRememberWindowState setState:NSOnState];
|
||||
|
||||
if ([self getBooleanPref:kGeckoPrefWarnWhenClosingWindows withSuccess:&gotPref])
|
||||
[checkboxWarnWhenClosing setState:NSOnState];
|
||||
|
||||
if ([checkboxAutoUpdate isEnabled] && [[SUUpdater sharedUpdater] automaticallyChecksForUpdates])
|
||||
[checkboxAutoUpdate setState:NSOnState];
|
||||
|
||||
if ([self getBooleanPref:kGeckoPrefCheckDefaultBrowserAtLaunch withSuccess:&gotPref] || !gotPref)
|
||||
[checkboxCheckDefaultBrowserOnLaunch setState:NSOnState];
|
||||
}
|
||||
|
||||
- (void) didUnselect
|
||||
{
|
||||
[self setPref:kGeckoPrefHomepageURL toString:[textFieldHomePage stringValue]];
|
||||
|
||||
// Ensure that the prefs exist.
|
||||
[self setPref:kGeckoPrefNewWindowStartPage toInt:[checkboxNewWindowBlank state] ? kStartPageHome : kStartPageBlank];
|
||||
[self setPref:kGeckoPrefNewTabStartPage toInt:[checkboxNewTabBlank state] ? kStartPageHome : kStartPageBlank];
|
||||
}
|
||||
|
||||
- (IBAction)homePageModified:(id)sender
|
||||
{
|
||||
[self setPref:kGeckoPrefHomepageURL toString:[textFieldHomePage stringValue]];
|
||||
}
|
||||
|
||||
- (IBAction)checkboxStartPageClicked:(id)sender
|
||||
{
|
||||
const char* prefName = NULL;
|
||||
if (sender == checkboxNewTabBlank)
|
||||
prefName = kGeckoPrefNewTabStartPage;
|
||||
else if (sender == checkboxNewWindowBlank)
|
||||
prefName = kGeckoPrefNewWindowStartPage;
|
||||
|
||||
if (prefName)
|
||||
[self setPref:prefName toInt: [sender state] ? kStartPageHome : kStartPageBlank];
|
||||
}
|
||||
|
||||
- (IBAction)warningCheckboxClicked:(id)sender
|
||||
{
|
||||
if (sender == checkboxWarnWhenClosing)
|
||||
[self setPref:kGeckoPrefWarnWhenClosingWindows toBoolean:([sender state] == NSOnState)];
|
||||
}
|
||||
|
||||
- (IBAction)rememberWindowStateCheckboxClicked:(id)sender
|
||||
{
|
||||
if (sender == checkboxRememberWindowState)
|
||||
[self setPref:kGeckoPrefSessionSaveEnabled toBoolean:([sender state] == NSOnState)];
|
||||
}
|
||||
|
||||
- (IBAction)checkDefaultBrowserOnLaunchClicked:(id)sender
|
||||
{
|
||||
if (sender == checkboxCheckDefaultBrowserOnLaunch)
|
||||
[self setPref:kGeckoPrefCheckDefaultBrowserAtLaunch toBoolean:([sender state] == NSOnState)];
|
||||
}
|
||||
|
||||
- (IBAction)autoUpdateCheckboxClicked:(id)sender
|
||||
{
|
||||
if (sender == checkboxAutoUpdate) {
|
||||
NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
|
||||
// We never set the pref to YES; instead we let that case fall
|
||||
// through to the Info.plist, which will be YES for official builds.
|
||||
if ([sender state] == NSOnState) {
|
||||
// Unfortunately, the official API doesn't include the prefs any more,
|
||||
// so we have to hard-code the key to get the behavior we want.
|
||||
[defaults removeObjectForKey:@"SUEnableAutomaticChecks"];
|
||||
[[SUUpdater sharedUpdater] resetUpdateCycle];
|
||||
}
|
||||
else {
|
||||
[[SUUpdater sharedUpdater] setAutomaticallyChecksForUpdates:NO];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (NSString*)currentHomePage
|
||||
{
|
||||
BOOL gotPref;
|
||||
return [self getStringPref:kGeckoPrefHomepageURL withSuccess:&gotPref];
|
||||
}
|
||||
|
||||
// called when the user changes the selection in the default browser menu
|
||||
- (IBAction)defaultBrowserChange:(id)sender
|
||||
{
|
||||
[[AppListMenuFactory sharedAppListMenuFactory] validateAndRegisterDefaultBrowser:[sender representedObject]];
|
||||
[self updateDefaultBrowserMenu];
|
||||
}
|
||||
|
||||
- (IBAction)defaultFeedViewerChange:(id)sender
|
||||
{
|
||||
[[AppListMenuFactory sharedAppListMenuFactory] validateAndRegisterDefaultFeedViewer:[sender representedObject]];
|
||||
[self updateDefaultFeedViewerMenu];
|
||||
}
|
||||
|
||||
- (IBAction)runOpenDialogToSelectBrowser:(id)sender
|
||||
{
|
||||
NSOpenPanel *op = [NSOpenPanel openPanel];
|
||||
[op setCanChooseDirectories:NO];
|
||||
[op setAllowsMultipleSelection:NO];
|
||||
[op beginSheetForDirectory:nil
|
||||
file:nil
|
||||
types:[NSArray arrayWithObject:@"app"]
|
||||
modalForWindow:[defaultBrowserPopUp window]
|
||||
modalDelegate:self
|
||||
didEndSelector:@selector(browserSelectionPanelDidEnd:returnCode:contextInfo:)
|
||||
contextInfo:nil];
|
||||
}
|
||||
|
||||
- (IBAction)runOpenDialogToSelectFeedViewer:(id)sender
|
||||
{
|
||||
NSOpenPanel *op = [NSOpenPanel openPanel];
|
||||
[op setCanChooseDirectories:NO];
|
||||
[op setAllowsMultipleSelection:NO];
|
||||
[op beginSheetForDirectory:nil
|
||||
file:nil
|
||||
types:[NSArray arrayWithObject:@"app"]
|
||||
modalForWindow:[defaultFeedViewerPopUp window]
|
||||
modalDelegate:self
|
||||
didEndSelector:@selector(feedSelectionPanelDidEnd:returnCode:contextInfo:)
|
||||
contextInfo:nil];
|
||||
}
|
||||
|
||||
- (void)browserSelectionPanelDidEnd:(NSOpenPanel*)sheet returnCode:(int)returnCode contextInfo:(void*)contextInfo
|
||||
{
|
||||
if (returnCode == NSOKButton) {
|
||||
NSString *chosenBundleID = [[NSWorkspace sharedWorkspace] identifierForBundle:[[sheet URLs] objectAtIndex:0]];
|
||||
if (chosenBundleID) {
|
||||
// Add this browser to a list of apps we should always consider as browsers...
|
||||
NSMutableArray *userChosenBundleIDs = [NSMutableArray arrayWithCapacity:2];
|
||||
[userChosenBundleIDs addObjectsFromArray:[[NSUserDefaults standardUserDefaults] objectForKey:kUserChosenBrowserUserDefaultsKey]];
|
||||
if (![userChosenBundleIDs containsObject:chosenBundleID]) {
|
||||
[userChosenBundleIDs addObject:chosenBundleID];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:userChosenBundleIDs forKey:kUserChosenBrowserUserDefaultsKey];
|
||||
}
|
||||
// ...and make it the default browser.
|
||||
[[NSWorkspace sharedWorkspace] setDefaultBrowserWithIdentifier:chosenBundleID];
|
||||
}
|
||||
}
|
||||
[self updateDefaultBrowserMenu];
|
||||
}
|
||||
|
||||
- (void)feedSelectionPanelDidEnd:(NSOpenPanel*)sheet returnCode:(int)returnCode contextInfo:(void*)contextInfo
|
||||
{
|
||||
if (returnCode == NSOKButton) {
|
||||
NSString* chosenBundleID = [[NSWorkspace sharedWorkspace] identifierForBundle:[[sheet URLs] objectAtIndex:0]];
|
||||
if (chosenBundleID) {
|
||||
// Add this browser to a list of apps we should always consider as feed viewers...
|
||||
NSMutableArray* userChosenBundleIDs = [NSMutableArray arrayWithCapacity:2];
|
||||
[userChosenBundleIDs addObjectsFromArray:[[NSUserDefaults standardUserDefaults] objectForKey:kUserChosenFeedViewerUserDefaultsKey]];
|
||||
if (![userChosenBundleIDs containsObject:chosenBundleID]) {
|
||||
[userChosenBundleIDs addObject:chosenBundleID];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:userChosenBundleIDs forKey:kUserChosenFeedViewerUserDefaultsKey];
|
||||
}
|
||||
// and make it the default feed viewer.
|
||||
[[NSWorkspace sharedWorkspace] setDefaultFeedViewerWithIdentifier:chosenBundleID];
|
||||
[self updateDefaultFeedViewerMenu];
|
||||
}
|
||||
}
|
||||
else {
|
||||
// The open action was cancelled, so re-select the default application.
|
||||
[defaultFeedViewerPopUp selectItemAtIndex:0];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)updateDefaultBrowserMenu
|
||||
{
|
||||
[[AppListMenuFactory sharedAppListMenuFactory] buildBrowserAppsMenuForPopup:defaultBrowserPopUp
|
||||
andAction:@selector(defaultBrowserChange:)
|
||||
andSelectAction:@selector(runOpenDialogToSelectBrowser:)
|
||||
andTarget:self];
|
||||
}
|
||||
|
||||
- (void)updateDefaultFeedViewerMenu
|
||||
{
|
||||
[[AppListMenuFactory sharedAppListMenuFactory] buildFeedAppsMenuForPopup:defaultFeedViewerPopUp
|
||||
andAction:@selector(defaultFeedViewerChange:)
|
||||
andSelectAction:@selector(runOpenDialogToSelectFeedViewer:)
|
||||
andTarget:self];
|
||||
}
|
||||
|
||||
@end
|
||||
Binary file not shown.
@@ -1,39 +0,0 @@
|
||||
{
|
||||
IBClasses = (
|
||||
{
|
||||
CLASS = FirstResponder;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
CLASS = NSPreferencePane;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
"_firstKeyView" = NSView;
|
||||
"_initialKeyView" = NSView;
|
||||
"_lastKeyView" = NSView;
|
||||
"_window" = NSWindow;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
ACTIONS = {
|
||||
clearDiskCache = id;
|
||||
clearGlobalHistory = id;
|
||||
historyDaysModified = id;
|
||||
};
|
||||
CLASS = OrgMozillaCaminoPreferenceHistory;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
textFieldHistoryDays = NSTextField;
|
||||
};
|
||||
SUPERCLASS = PreferencePaneBase;
|
||||
},
|
||||
{
|
||||
CLASS = PreferencePaneBase;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSPreferencePane;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>32 25 522 320 0 0 1024 746 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>489.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>9D34</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -1 +0,0 @@
|
||||
"PreferencePanelLabel" = "History";
|
||||
@@ -1,53 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* ***** 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 the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* william@dell.wisner.name (William Dell Wisner)
|
||||
* josh@mozilla.com (Josh Aas)
|
||||
*
|
||||
* 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 <Cocoa/Cocoa.h>
|
||||
#import <PreferencePaneBase.h>
|
||||
|
||||
@interface OrgMozillaCaminoPreferenceHistory : PreferencePaneBase
|
||||
{
|
||||
IBOutlet NSTextField* textFieldHistoryDays;
|
||||
}
|
||||
|
||||
- (IBAction)historyDaysModified:(id)sender;
|
||||
- (IBAction)clearGlobalHistory:(id)sender;
|
||||
- (IBAction)clearDiskCache:(id)aSender;
|
||||
|
||||
@end
|
||||
@@ -1,170 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* ***** 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 the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* william@dell.wisner.name (William Dell Wisner)
|
||||
* josh@mozilla.com (Josh Aas)
|
||||
*
|
||||
* 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 "History.h"
|
||||
#import "NSString+Utils.h"
|
||||
|
||||
#import "GeckoPrefConstants.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIBrowserHistory.h"
|
||||
#include "nsICacheService.h"
|
||||
|
||||
static const int kDefaultExpireDays = 9;
|
||||
|
||||
// A formatter for the history duration that only accepts integers >= 0
|
||||
@interface NonNegativeIntegerFormatter : NSFormatter
|
||||
{
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation NonNegativeIntegerFormatter
|
||||
|
||||
- (NSString*)stringForObjectValue:(id)anObject
|
||||
{
|
||||
// Normally we could just return [anObject stringValue], but since the pref is
|
||||
// being read after the formatter is set, this raises an exception if we do that.
|
||||
// Check for the proper class first to avoid this problem and return "" otherwise.
|
||||
return [anObject isKindOfClass:[NSNumber class]] ? [anObject stringValue] : @"";
|
||||
}
|
||||
|
||||
- (BOOL)getObjectValue:(id*)anObject forString:(NSString*)string errorDescription:(NSString**)error
|
||||
{
|
||||
*anObject = [NSNumber numberWithInt:[string intValue]];
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)isPartialStringValid:(NSString*)partialString newEditingString:(NSString**)newString errorDescription:(NSString**)error
|
||||
{
|
||||
NSCharacterSet* nonDigitSet = [[NSCharacterSet decimalDigitCharacterSet] invertedSet];
|
||||
if ([partialString rangeOfCharacterFromSet:nonDigitSet].location != NSNotFound) {
|
||||
*newString = [partialString stringByRemovingCharactersInSet:nonDigitSet];
|
||||
return NO;
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@implementation OrgMozillaCaminoPreferenceHistory
|
||||
|
||||
- (void)mainViewDidLoad
|
||||
{
|
||||
[textFieldHistoryDays setFormatter:[[[NonNegativeIntegerFormatter alloc] init] autorelease]];
|
||||
}
|
||||
|
||||
- (void)willSelect
|
||||
{
|
||||
BOOL gotPref;
|
||||
int expireDays = [self getIntPref:kGeckoPrefHistoryLifetimeDays withSuccess:&gotPref];
|
||||
if (!gotPref)
|
||||
expireDays = kDefaultExpireDays;
|
||||
|
||||
[textFieldHistoryDays setIntValue:expireDays];
|
||||
}
|
||||
|
||||
- (void)didUnselect
|
||||
{
|
||||
[self setPref:kGeckoPrefHistoryLifetimeDays toInt:[textFieldHistoryDays intValue]];
|
||||
}
|
||||
|
||||
- (IBAction)historyDaysModified:(id)sender
|
||||
{
|
||||
[self setPref:kGeckoPrefHistoryLifetimeDays toInt:[sender intValue]];
|
||||
}
|
||||
|
||||
// Clear the user's disk cache.
|
||||
- (IBAction)clearDiskCache:(id)aSender
|
||||
{
|
||||
NSAlert* clearCacheAlert = [[[NSAlert alloc] init] autorelease];
|
||||
[clearCacheAlert setMessageText:NSLocalizedString(@"EmptyCacheTitle", nil)];
|
||||
[clearCacheAlert setInformativeText:NSLocalizedString(@"EmptyCacheMessage", nil)];
|
||||
[clearCacheAlert addButtonWithTitle:NSLocalizedString(@"EmptyCacheButtonText", nil)];
|
||||
NSButton* dontEmptyButton = [clearCacheAlert addButtonWithTitle:NSLocalizedString(@"DontEmptyButtonText", nil)];
|
||||
[dontEmptyButton setKeyEquivalent:@"\e"]; // escape
|
||||
|
||||
[clearCacheAlert setAlertStyle:NSCriticalAlertStyle];
|
||||
[clearCacheAlert beginSheetModalForWindow:[textFieldHistoryDays window]
|
||||
modalDelegate:self
|
||||
didEndSelector:@selector(clearDiskCacheAlertDidEnd:returnCode:contextInfo:)
|
||||
contextInfo:nil];
|
||||
}
|
||||
|
||||
// Use the browser history service to clear out the user's global history.
|
||||
- (IBAction)clearGlobalHistory:(id)sender
|
||||
{
|
||||
NSAlert* clearGlobalHistoryAlert = [[[NSAlert alloc] init] autorelease];
|
||||
[clearGlobalHistoryAlert setMessageText:NSLocalizedString(@"ClearHistoryTitle", nil)];
|
||||
[clearGlobalHistoryAlert setInformativeText:NSLocalizedString(@"ClearHistoryMessage", nil)];
|
||||
[clearGlobalHistoryAlert addButtonWithTitle:NSLocalizedString(@"ClearHistoryButtonText", nil)];
|
||||
NSButton* dontClearButton = [clearGlobalHistoryAlert addButtonWithTitle:NSLocalizedString(@"DontClearButtonText", nil)];
|
||||
[dontClearButton setKeyEquivalent:@"\e"]; // Escape
|
||||
|
||||
[clearGlobalHistoryAlert setAlertStyle:NSCriticalAlertStyle];
|
||||
[clearGlobalHistoryAlert beginSheetModalForWindow:[textFieldHistoryDays window]
|
||||
modalDelegate:self
|
||||
didEndSelector:@selector(clearGlobalHistoryAlertDidEnd:returnCode:contextInfo:)
|
||||
contextInfo:nil];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (void)clearDiskCacheAlertDidEnd:(NSAlert*)alert returnCode:(int)returnCode contextInfo:(void*)contextInfo
|
||||
{
|
||||
if (returnCode == NSAlertFirstButtonReturn) {
|
||||
nsCOMPtr<nsICacheService> cacheServ (do_GetService("@mozilla.org/network/cache-service;1"));
|
||||
if (cacheServ)
|
||||
cacheServ->EvictEntries(nsICache::STORE_ANYWHERE);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)clearGlobalHistoryAlertDidEnd:(NSAlert*)alert returnCode:(int)returnCode contextInfo:(void*)contextInfo
|
||||
{
|
||||
if (returnCode == NSAlertFirstButtonReturn) {
|
||||
nsCOMPtr<nsIBrowserHistory> hist (do_GetService("@mozilla.org/browser/global-history;2"));
|
||||
if (hist)
|
||||
hist->RemoveAllPages();
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
Binary file not shown.
@@ -1,32 +0,0 @@
|
||||
"PreferencePanelLabel" = "Privacy";
|
||||
|
||||
"CookieExpiresOnQuit" = "On Quit";
|
||||
"DontRemoveButtonText" = "Don’t Remove";
|
||||
|
||||
/* cookie removal warning */
|
||||
"Remove All Cookies" = "Remove All Cookies";
|
||||
"RemoveAllCookiesWarningTitle" = "Are you sure you want to remove all cookies?";
|
||||
"RemoveAllCookiesWarning" = "Removing cookies may cause websites to forget your identity, any online shopping carts, and other personalized site settings. You cannot undo this action.";
|
||||
|
||||
/* cookie permissions context menu */
|
||||
"ExpandException" = "Expand Exception";
|
||||
"ExpandExceptionForSite" = "Expand Exception to All of “%@”";
|
||||
|
||||
/* cookie permissions removal warning */
|
||||
"Remove All Exceptions" = "Remove All Exceptions";
|
||||
"RemoveAllCookiePermissionsWarningTitle" = "Are you sure you want to remove all cookie site exceptions?";
|
||||
"RemoveAllCookiePermissionsWarning" = "This will clear the list of sites for which you’ve made a decision about allowing or denying cookies. If you have “Ask before accepting each cookie” selected, you will be prompted again to accept cookies for any website that attempts to set them. You cannot undo this action.";
|
||||
|
||||
/* cookies context menu */
|
||||
"AllowCookieFromSite" = "Allow All Cookies from Sites Matching “%@”";
|
||||
"AllowCookiesFromSites" = "Allow All Cookies from These Sites";
|
||||
|
||||
"BlockCookieFromSite" = "Block Cookies from Sites Matching “%@”";
|
||||
"BlockCookiesFromSites" = "Block Cookies from These Sites";
|
||||
|
||||
"RemoveAndBlockCookieFromSite" = "Remove and Block Cookies from Sites Matching “%@”";
|
||||
"RemoveAndBlockCookiesFromSites" = "Remove and Block Cookies from These Sites";
|
||||
|
||||
"RemoveAllKeychainExclusionsWarningTitle" = "Are you sure you want to remove all Keychain exclusions?";
|
||||
"RemoveAllKeychainExclusionsWarning" = "This will clear the list of sites for which you’ve opted to never save passwords. If you log in to these sites in the future, Camino will offer to save your password. You cannot undo this action.";
|
||||
"RemoveAllKeychainExclusionsButton" = "Remove All Keychain Exclusions";
|
||||
@@ -1,71 +0,0 @@
|
||||
{
|
||||
IBClasses = (
|
||||
{CLASS = CookieDateFormatter; LANGUAGE = ObjC; SUPERCLASS = NSDateFormatter; },
|
||||
{CLASS = ExtendedTableView; LANGUAGE = ObjC; SUPERCLASS = NSTableView; },
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
CLASS = NSPreferencePane;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
"_firstKeyView" = id;
|
||||
"_initialKeyView" = id;
|
||||
"_lastKeyView" = id;
|
||||
"_window" = id;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{CLASS = NSTableView; LANGUAGE = ObjC; SUPERCLASS = NSControl; },
|
||||
{
|
||||
ACTIONS = {
|
||||
allowCookiesFromSites = id;
|
||||
blockCookiesFromSites = id;
|
||||
clickAskAboutCookies = id;
|
||||
clickCookieBehavior = id;
|
||||
clickStorePasswords = id;
|
||||
editCookies = id;
|
||||
editCookiesDone = id;
|
||||
editKeychainExclusions = id;
|
||||
editKeychainExclusionsDone = id;
|
||||
editPermissions = id;
|
||||
editPermissionsDone = id;
|
||||
expandCookiePermission = id;
|
||||
filterChanged = id;
|
||||
launchKeychainAccess = id;
|
||||
removeAllCookiePermissions = id;
|
||||
removeAllCookies = id;
|
||||
removeAllKeychainExclusions = id;
|
||||
removeCookiePermissions = id;
|
||||
removeCookies = id;
|
||||
removeCookiesAndBlockSites = id;
|
||||
removeKeychainExclusions = id;
|
||||
};
|
||||
CLASS = OrgMozillaCaminoPreferencePrivacy;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mAskAboutCookies = NSButton;
|
||||
mCookieBehavior = NSMatrix;
|
||||
mCookiesFilterField = NSSearchField;
|
||||
mCookiesPanel = id;
|
||||
mCookiesTable = ExtendedTableView;
|
||||
mKeychainExclusionsFilterField = NSSearchField;
|
||||
mKeychainExclusionsPanel = id;
|
||||
mKeychainExclusionsTable = ExtendedTableView;
|
||||
mPermissionColumn = NSTableColumn;
|
||||
mPermissionFilterField = NSSearchField;
|
||||
mPermissionsPanel = id;
|
||||
mPermissionsTable = ExtendedTableView;
|
||||
mStorePasswords = NSButton;
|
||||
};
|
||||
SUPERCLASS = PreferencePaneBase;
|
||||
},
|
||||
{CLASS = PopupMenuButton; LANGUAGE = ObjC; SUPERCLASS = NSButton; },
|
||||
{CLASS = PreferencePaneBase; LANGUAGE = ObjC; SUPERCLASS = NSPreferencePane; },
|
||||
{
|
||||
ACTIONS = {selectText = id; };
|
||||
CLASS = SearchTextField;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSTextField;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>36 15 406 307 0 0 1024 746 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>622</key>
|
||||
<string>208 247 254 149 0 0 1440 878 </string>
|
||||
<key>635</key>
|
||||
<string>479 406 157 111 0 0 1440 878 </string>
|
||||
<key>709</key>
|
||||
<string>60 401 126 68 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>489.0</string>
|
||||
<key>IBOldestOS</key>
|
||||
<integer>3</integer>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>401</integer>
|
||||
<integer>287</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8S165</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,123 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** 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 mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* 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 <Cocoa/Cocoa.h>
|
||||
#import <PreferencePanes/NSPreferencePane.h>
|
||||
|
||||
#import "PreferencePaneBase.h"
|
||||
|
||||
@class ExtendedTableView;
|
||||
|
||||
// for the "Policy" column in the Exceptions List
|
||||
typedef enum ECookiePolicyPopupIndex
|
||||
{
|
||||
eAllowIndex,
|
||||
eSessionOnlyIndex,
|
||||
eDenyIndex
|
||||
} ECookiePolicyPopupIndex;
|
||||
|
||||
@interface OrgMozillaCaminoPreferencePrivacy : PreferencePaneBase
|
||||
{
|
||||
// pane
|
||||
IBOutlet NSMatrix* mCookieBehavior;
|
||||
IBOutlet NSButton* mAskAboutCookies;
|
||||
|
||||
IBOutlet NSButton* mStorePasswords;
|
||||
|
||||
BOOL mSortedAscending; // sort direction for tables in sheets
|
||||
|
||||
// permission sheet
|
||||
IBOutlet id mPermissionsPanel;
|
||||
IBOutlet ExtendedTableView* mPermissionsTable;
|
||||
IBOutlet NSTableColumn* mPermissionColumn;
|
||||
IBOutlet NSSearchField* mPermissionFilterField;
|
||||
NSMutableArray* mPermissions; // strong
|
||||
|
||||
// cookie sheet
|
||||
IBOutlet id mCookiesPanel;
|
||||
IBOutlet ExtendedTableView* mCookiesTable;
|
||||
IBOutlet NSSearchField* mCookiesFilterField;
|
||||
NSMutableArray* mCookies; // strong
|
||||
|
||||
// Keychain Exclusions sheet
|
||||
IBOutlet id mKeychainExclusionsPanel;
|
||||
IBOutlet ExtendedTableView* mKeychainExclusionsTable;
|
||||
IBOutlet NSSearchField* mKeychainExclusionsFilterField;
|
||||
NSMutableArray* mKeychainExclusions; // strong
|
||||
}
|
||||
|
||||
// main panel button actions
|
||||
- (IBAction)clickCookieBehavior:(id)aSender;
|
||||
- (IBAction)clickAskAboutCookies:(id)sender;
|
||||
- (IBAction)clickStorePasswords:(id)sender;
|
||||
- (IBAction)launchKeychainAccess:(id)sender;
|
||||
- (IBAction)editKeychainExclusions:(id)sender;
|
||||
|
||||
// cookie editing functions
|
||||
- (IBAction)editCookies:(id)aSender;
|
||||
- (IBAction)editCookiesDone:(id)aSender;
|
||||
- (IBAction)removeCookies:(id)aSender;
|
||||
- (IBAction)removeAllCookies:(id)aSender;
|
||||
- (IBAction)allowCookiesFromSites:(id)aSender;
|
||||
- (IBAction)blockCookiesFromSites:(id)aSender;
|
||||
- (IBAction)removeCookiesAndBlockSites:(id)aSender;
|
||||
|
||||
// permission editing functions
|
||||
- (IBAction)editPermissions:(id)aSender;
|
||||
- (IBAction)editPermissionsDone:(id)aSender;
|
||||
- (IBAction)expandCookiePermission:(id)aSender;
|
||||
- (IBAction)removeCookiePermissions:(id)aSender;
|
||||
- (IBAction)removeAllCookiePermissions:(id)aSender;
|
||||
|
||||
// keychain exclusion list editing functions
|
||||
- (IBAction)editKeychainExclusions:(id)sender;
|
||||
- (IBAction)editKeychainExclusionsDone:(id)sender;
|
||||
- (IBAction)removeKeychainExclusions:(id)sender;
|
||||
- (IBAction)removeAllKeychainExclusions:(id)sender;
|
||||
|
||||
// data source informal protocol (NSTableDataSource)
|
||||
- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
|
||||
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex;
|
||||
- (void)tableView:(NSTableView *)aTableView setObjectValue:anObject forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex;
|
||||
|
||||
// NSTableView delegate methods
|
||||
- (void)tableView:(NSTableView *)aTableView didClickTableColumn:(NSTableColumn *)aTableColumn;
|
||||
|
||||
// Filtering delegate
|
||||
- (IBAction)filterChanged:(id)sender;
|
||||
|
||||
@end
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,7 +0,0 @@
|
||||
"PreferencePanelLabel" = "Security";
|
||||
|
||||
/* Security exception removal warning */
|
||||
"RemoveAllSecurityExceptionsWarningTitle" = "Are you sure you want to remove all security exceptions?";
|
||||
"RemoveAllSecurityExceptionsWarning" = "This will clear the list of sites whose invalid or untrusted certificates you have chosen to trust. If you visit these sites again, and their certificates are still invalid or untrusted, you will not be able to enter without adding a new exception. You cannot undo this action.";
|
||||
"RemoveAllExceptionsButtonText" = "Remove All Exceptions";
|
||||
"DontRemoveButtonText" = "Don’t Remove";
|
||||
@@ -1,80 +0,0 @@
|
||||
{
|
||||
IBClasses = (
|
||||
{
|
||||
CLASS = ExtendedTableView;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSTableView;
|
||||
},
|
||||
{
|
||||
CLASS = FirstResponder;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
CLASS = NSMenu;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
CLASS = NSMenuItem;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
CLASS = NSObject;
|
||||
LANGUAGE = ObjC;
|
||||
},
|
||||
{
|
||||
CLASS = NSPreferencePane;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
"_firstKeyView" = id;
|
||||
"_initialKeyView" = id;
|
||||
"_lastKeyView" = id;
|
||||
"_window" = id;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
CLASS = NSView;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSResponder;
|
||||
},
|
||||
{
|
||||
ACTIONS = {
|
||||
clickCertificateSelectionBehavior = id;
|
||||
clickEnableLeaveEncrypted = id;
|
||||
clickEnableViewMixed = id;
|
||||
clickSafeBrowsing = id;
|
||||
editOverrides = id;
|
||||
editOverridesDone = id;
|
||||
removeAllOverrides = id;
|
||||
removeOverrides = id;
|
||||
showCertificates = id;
|
||||
};
|
||||
CLASS = OrgMozillaCaminoPreferenceSecurity;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mCertificateBehavior = NSMatrix;
|
||||
mLeaveEncrypted = NSButton;
|
||||
mOverridePanel = id;
|
||||
mOverridesController = NSArrayController;
|
||||
mOverridesTable = ExtendedTableView;
|
||||
mSafeBrowsing = NSButton;
|
||||
mViewMixed = NSButton;
|
||||
};
|
||||
SUPERCLASS = PreferencePaneBase;
|
||||
},
|
||||
{
|
||||
CLASS = PopupMenuButton;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSButton;
|
||||
},
|
||||
{
|
||||
CLASS = PreferencePaneBase;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSPreferencePane;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>69 14 356 240 0 0 1440 878 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>489.0</string>
|
||||
<key>IBLastKnownRelativeProjectPath</key>
|
||||
<string>../../../../../CaminoObj/camino/Camino.xcodeproj</string>
|
||||
<key>IBOldestOS</key>
|
||||
<integer>5</integer>
|
||||
<key>IBSystem Version</key>
|
||||
<string>9L31a</string>
|
||||
<key>targetFramework</key>
|
||||
<string>IBCocoaFramework</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,79 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** 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 mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* 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 <Cocoa/Cocoa.h>
|
||||
#import <PreferencePanes/NSPreferencePane.h>
|
||||
|
||||
#import "PreferencePaneBase.h"
|
||||
|
||||
@class ExtendedTableView;
|
||||
|
||||
@interface OrgMozillaCaminoPreferenceSecurity : PreferencePaneBase
|
||||
{
|
||||
IBOutlet NSButton* mSafeBrowsing;
|
||||
IBOutlet NSButton* mLeaveEncrypted;
|
||||
IBOutlet NSButton* mViewMixed;
|
||||
IBOutlet NSMatrix* mCertificateBehavior;
|
||||
|
||||
// Certificate override sheet.
|
||||
IBOutlet id mOverridePanel;
|
||||
IBOutlet NSArrayController* mOverridesController;
|
||||
IBOutlet ExtendedTableView* mOverridesTable;
|
||||
NSMutableArray* mOverrides; // strong
|
||||
}
|
||||
|
||||
- (IBAction)clickSafeBrowsing:(id)sender;
|
||||
|
||||
- (IBAction)clickEnableLeaveEncrypted:(id)sender;
|
||||
- (IBAction)clickEnableViewMixed:(id)sender;
|
||||
|
||||
- (IBAction)clickCertificateSelectionBehavior:(id)sender;
|
||||
- (IBAction)showCertificates:(id)sender;
|
||||
|
||||
// Brings up the sheet for removing certificate overrides.
|
||||
- (IBAction)editOverrides:(id)aSender;
|
||||
|
||||
// Dismisses the sheet for removing certificate overrides.
|
||||
- (IBAction)editOverridesDone:(id)aSender;
|
||||
|
||||
// Removes the currently selected certificate overrides.
|
||||
- (IBAction)removeOverrides:(id)aSender;
|
||||
|
||||
// Removes all of the certificate overrides, after prompting for confirmation.
|
||||
- (IBAction)removeAllOverrides:(id)aSender;
|
||||
|
||||
@end
|
||||
@@ -1,255 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** 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 mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* 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 "SecurityPane.h"
|
||||
|
||||
#import "CHCertificateOverrideManager.h"
|
||||
#import "ExtendedTableView.h"
|
||||
#import "GeckoPrefConstants.h"
|
||||
|
||||
// prefs for showing security dialogs
|
||||
#define LEAVE_SITE_PREF "security.warn_leaving_secure"
|
||||
#define MIXEDCONTENT_PREF "security.warn_viewing_mixed"
|
||||
|
||||
const unsigned int kSelectAutomaticallyMatrixRowValue = 0;
|
||||
const unsigned int kAskEveryTimeMatrixRowValue = 1;
|
||||
|
||||
static NSString* const kOverrideHostKey = @"host";
|
||||
static NSString* const kOverridePortKey = @"port";
|
||||
|
||||
|
||||
@interface OrgMozillaCaminoPreferenceSecurity(Private)
|
||||
// Loads the list of stored certificate overrides into mOverrides.
|
||||
- (void)loadOverrides;
|
||||
@end
|
||||
|
||||
@implementation OrgMozillaCaminoPreferenceSecurity
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[mOverrides release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)updateButtons
|
||||
{
|
||||
// Set initial value on Security checkboxes
|
||||
BOOL phishingCheckingEnabled = [self getBooleanPref:kGeckoPrefSafeBrowsingPhishingCheckingEnabled
|
||||
withSuccess:NULL];
|
||||
BOOL malwareCheckingEnabled = [self getBooleanPref:kGeckoPrefSafeBrowsingMalwareCheckingEnabled
|
||||
withSuccess:NULL];
|
||||
if (phishingCheckingEnabled && malwareCheckingEnabled)
|
||||
[mSafeBrowsing setState:NSOnState];
|
||||
else if (phishingCheckingEnabled || malwareCheckingEnabled)
|
||||
[mSafeBrowsing setState:NSMixedState];
|
||||
else
|
||||
[mSafeBrowsing setState:NSOffState];
|
||||
|
||||
BOOL leaveEncrypted = [self getBooleanPref:LEAVE_SITE_PREF withSuccess:NULL];
|
||||
[mLeaveEncrypted setState:(leaveEncrypted ? NSOnState : NSOffState)];
|
||||
|
||||
BOOL viewMixed = [self getBooleanPref:MIXEDCONTENT_PREF withSuccess:NULL];
|
||||
[mViewMixed setState:(viewMixed ? NSOnState : NSOffState)];
|
||||
|
||||
BOOL gotPref;
|
||||
NSString* certificateBehavior = [self getStringPref:kGeckoPrefDefaultCertificateBehavior
|
||||
withSuccess:&gotPref];
|
||||
if (gotPref) {
|
||||
if ([certificateBehavior isEqual:kPersonalCertificateSelectAutomatically])
|
||||
[mCertificateBehavior selectCellAtRow:kSelectAutomaticallyMatrixRowValue column:0];
|
||||
else if ([certificateBehavior isEqual:kPersonalCertificateAlwaysAsk])
|
||||
[mCertificateBehavior selectCellAtRow:kAskEveryTimeMatrixRowValue column:0];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)willSelect
|
||||
{
|
||||
[self updateButtons];
|
||||
}
|
||||
|
||||
- (void)didActivate
|
||||
{
|
||||
[self updateButtons];
|
||||
}
|
||||
|
||||
//
|
||||
// clickEnableViewMixed:
|
||||
// clickEnableLeaveEncrypted:
|
||||
//
|
||||
// Set prefs for warnings/alerts wrt secure sites.
|
||||
//
|
||||
|
||||
- (IBAction)clickEnableViewMixed:(id)sender
|
||||
{
|
||||
[self setPref:MIXEDCONTENT_PREF toBoolean:[sender state] == NSOnState];
|
||||
}
|
||||
|
||||
- (IBAction)clickEnableLeaveEncrypted:(id)sender
|
||||
{
|
||||
[self setPref:LEAVE_SITE_PREF toBoolean:[sender state] == NSOnState];
|
||||
}
|
||||
|
||||
- (IBAction)clickCertificateSelectionBehavior:(id)sender
|
||||
{
|
||||
unsigned int row = [mCertificateBehavior selectedRow];
|
||||
|
||||
if (row == kSelectAutomaticallyMatrixRowValue)
|
||||
[self setPref:kGeckoPrefDefaultCertificateBehavior toString:kPersonalCertificateSelectAutomatically];
|
||||
else // row == kAskEveryTimeMatrixRowValue
|
||||
[self setPref:kGeckoPrefDefaultCertificateBehavior toString:kPersonalCertificateAlwaysAsk];
|
||||
}
|
||||
|
||||
- (IBAction)showCertificates:(id)sender
|
||||
{
|
||||
// We'll just fire off a notification and let the application show the UI.
|
||||
NSDictionary* userInfoDict = [NSDictionary dictionaryWithObject:[mLeaveEncrypted window] // any view's window
|
||||
forKey:@"parent_window"];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"ShowCertificatesNotification"
|
||||
object:nil
|
||||
userInfo:userInfoDict];
|
||||
}
|
||||
|
||||
- (IBAction)clickSafeBrowsing:(id)sender
|
||||
{
|
||||
// The safe browsing button allows mixed state, since the underlying prefs are
|
||||
// actually independent, but we only want this button to enable or disable
|
||||
// safe browsing in its entirety.
|
||||
if ([sender state] == NSMixedState)
|
||||
[sender setState:NSOnState];
|
||||
|
||||
[self setPref:kGeckoPrefSafeBrowsingPhishingCheckingEnabled
|
||||
toBoolean:[sender state] == NSOnState];
|
||||
|
||||
[self setPref:kGeckoPrefSafeBrowsingMalwareCheckingEnabled
|
||||
toBoolean:[sender state] == NSOnState];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Certificate Overrides Sheet
|
||||
|
||||
- (IBAction)editOverrides:(id)aSender
|
||||
{
|
||||
[self loadOverrides];
|
||||
|
||||
[mOverridesTable setDeleteAction:@selector(removeOverrides:)];
|
||||
[mOverridesTable setTarget:self];
|
||||
|
||||
// bring up sheet
|
||||
[NSApp beginSheet:mOverridePanel
|
||||
modalForWindow:[aSender window]
|
||||
modalDelegate:self
|
||||
didEndSelector:NULL
|
||||
contextInfo:NULL];
|
||||
}
|
||||
|
||||
- (IBAction)editOverridesDone:(id)aSender
|
||||
{
|
||||
[mOverridePanel orderOut:self];
|
||||
[NSApp endSheet:mOverridePanel];
|
||||
|
||||
[mOverrides release];
|
||||
mOverrides = nil;
|
||||
}
|
||||
|
||||
- (void)loadOverrides
|
||||
{
|
||||
CHCertificateOverrideManager* overrideManager =
|
||||
[CHCertificateOverrideManager certificateOverrideManager];
|
||||
NSArray* hostPortOverrides = [overrideManager overrideHosts];
|
||||
|
||||
NSMutableArray* overrides =
|
||||
[NSMutableArray arrayWithCapacity:[hostPortOverrides count]];
|
||||
NSEnumerator* hostPortEnumerator = [hostPortOverrides objectEnumerator];
|
||||
NSString* hostPort;
|
||||
while ((hostPort = [hostPortEnumerator nextObject])) {
|
||||
// Entries should be "host:port"; split them apart and sanity check.
|
||||
NSArray* components = [hostPort componentsSeparatedByString:@":"];
|
||||
if ([components count] != 2)
|
||||
continue;
|
||||
[overrides addObject:[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[components objectAtIndex:0], kOverrideHostKey,
|
||||
[components objectAtIndex:1], kOverridePortKey,
|
||||
nil]];
|
||||
}
|
||||
|
||||
NSSortDescriptor* initialSort =
|
||||
[[[NSSortDescriptor alloc] initWithKey:@"host"
|
||||
ascending:YES] autorelease];
|
||||
[self willChangeValueForKey:@"mOverrides"];
|
||||
[mOverrides autorelease];
|
||||
mOverrides = [overrides retain];
|
||||
[mOverrides sortUsingDescriptors:[NSArray arrayWithObject:initialSort]];
|
||||
[self didChangeValueForKey:@"mOverrides"];
|
||||
}
|
||||
|
||||
- (IBAction)removeOverrides:(id)aSender
|
||||
{
|
||||
CHCertificateOverrideManager* overrideManager =
|
||||
[CHCertificateOverrideManager certificateOverrideManager];
|
||||
|
||||
// Walk the selected rows, removing overrides.
|
||||
NSArray* selectedOverrides = [mOverridesController selectedObjects];
|
||||
NSEnumerator* overrideEnumerator = [selectedOverrides objectEnumerator];
|
||||
NSDictionary* override;
|
||||
while ((override = [overrideEnumerator nextObject])) {
|
||||
[overrideManager removeOverrideForHost:[override objectForKey:kOverrideHostKey]
|
||||
port:[[override objectForKey:kOverridePortKey] intValue]];
|
||||
}
|
||||
[mOverridesController removeObjects:selectedOverrides];
|
||||
}
|
||||
|
||||
- (IBAction)removeAllOverrides:(id)aSender
|
||||
{
|
||||
NSAlert* removeAllAlert = [[[NSAlert alloc] init] autorelease];
|
||||
[removeAllAlert setMessageText:[self localizedStringForKey:@"RemoveAllSecurityExceptionsWarningTitle"]];
|
||||
[removeAllAlert setInformativeText:[self localizedStringForKey:@"RemoveAllSecurityExceptionsWarning"]];
|
||||
[removeAllAlert addButtonWithTitle:[self localizedStringForKey:@"RemoveAllExceptionsButtonText"]];
|
||||
NSButton* dontRemoveButton = [removeAllAlert addButtonWithTitle:[self localizedStringForKey:@"DontRemoveButtonText"]];
|
||||
[dontRemoveButton setKeyEquivalent:@"\e"]; // escape
|
||||
|
||||
[removeAllAlert setAlertStyle:NSCriticalAlertStyle];
|
||||
|
||||
if ([removeAllAlert runModal] == NSAlertFirstButtonReturn) {
|
||||
NSRange fullRange = NSMakeRange(0, [mOverrides count]);
|
||||
NSIndexSet* allIndexes = [NSIndexSet indexSetWithIndexesInRange:fullRange];
|
||||
[mOverridesController setSelectionIndexes:allIndexes];
|
||||
[self removeOverrides:aSender];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1 +0,0 @@
|
||||
"PreferencePanelLabel" = "Tabs";
|
||||
@@ -1,31 +0,0 @@
|
||||
{
|
||||
IBClasses = (
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
CLASS = NSPreferencePane;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
"_firstKeyView" = NSView;
|
||||
"_initialKeyView" = NSView;
|
||||
"_lastKeyView" = NSView;
|
||||
"_window" = NSWindow;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
ACTIONS = {checkboxClicked = id; };
|
||||
CLASS = OrgMozillaCaminoPreferenceTabs;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mCheckboxLoadTabsInBackground = NSButton;
|
||||
mCheckboxOpenTabsForCommand = NSButton;
|
||||
mCheckboxOpenTabsForExternalLinks = NSButton;
|
||||
mSingleWindowMode = NSButton;
|
||||
mTabBarVisiblity = NSButton;
|
||||
};
|
||||
SUPERCLASS = PreferencePaneBase;
|
||||
},
|
||||
{CLASS = PreferencePaneBase; LANGUAGE = ObjC; SUPERCLASS = NSPreferencePane; }
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>15 12 522 320 0 0 1024 746 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>446.1</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8S2167</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -1,56 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* ***** 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 the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* william@dell.wisner.name (William Dell Wisner)
|
||||
* josh@mozilla.com (Josh Aas)
|
||||
*
|
||||
* 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 <Cocoa/Cocoa.h>
|
||||
#import <PreferencePaneBase.h>
|
||||
|
||||
@interface OrgMozillaCaminoPreferenceTabs : PreferencePaneBase
|
||||
{
|
||||
IBOutlet NSButton* mCheckboxOpenTabsForCommand;
|
||||
IBOutlet NSButton* mCheckboxOpenTabsForExternalLinks;
|
||||
IBOutlet NSButton* mSingleWindowMode;
|
||||
|
||||
IBOutlet NSButton* mCheckboxLoadTabsInBackground;
|
||||
IBOutlet NSButton* mTabBarVisiblity;
|
||||
}
|
||||
|
||||
- (IBAction)checkboxClicked:(id)sender;
|
||||
|
||||
@end
|
||||
@@ -1,110 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* ***** 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 the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* william@dell.wisner.name (William Dell Wisner)
|
||||
* josh@mozilla.com (Josh Aas)
|
||||
*
|
||||
* 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 "Tabs.h"
|
||||
|
||||
#import "GeckoPrefConstants.h"
|
||||
|
||||
@implementation OrgMozillaCaminoPreferenceTabs
|
||||
|
||||
- (id)initWithBundle:(NSBundle*)bundle
|
||||
{
|
||||
self = [super initWithBundle:bundle];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)willSelect
|
||||
{
|
||||
BOOL gotPref;
|
||||
|
||||
[mCheckboxOpenTabsForCommand setState:([self getBooleanPref:kGeckoPrefOpenTabsForMiddleClick
|
||||
withSuccess:&gotPref] ? NSOnState : NSOffState)];
|
||||
|
||||
int externalLinksPref = [self getIntPref:kGeckoPrefExternalLoadBehavior withSuccess:&gotPref];
|
||||
if (externalLinksPref == kExternalLoadOpensNewWindow)
|
||||
[mCheckboxOpenTabsForExternalLinks setState:NSOffState];
|
||||
else if (externalLinksPref == kExternalLoadOpensNewTab)
|
||||
[mCheckboxOpenTabsForExternalLinks setState:NSOnState];
|
||||
else
|
||||
[mCheckboxOpenTabsForExternalLinks setState:NSMixedState];
|
||||
|
||||
int swmBehavior = [self getIntPref:kGeckoPrefSingleWindowModeTargetBehavior withSuccess:&gotPref];
|
||||
if (swmBehavior == kSingleWindowModeUseNewWindow)
|
||||
[mSingleWindowMode setState:NSOffState];
|
||||
else if (swmBehavior == kSingleWindowModeUseNewTab)
|
||||
[mSingleWindowMode setState:NSOnState];
|
||||
else
|
||||
[mSingleWindowMode setState:NSMixedState];
|
||||
|
||||
[mCheckboxLoadTabsInBackground setState:([self getBooleanPref:kGeckoPrefOpenTabsInBackground
|
||||
withSuccess:&gotPref] ? NSOnState : NSOffState)];
|
||||
[mTabBarVisiblity setState:([self getBooleanPref:kGeckoPrefAlwaysShowTabBar withSuccess:&gotPref] ? NSOnState : NSOffState)];
|
||||
}
|
||||
|
||||
- (IBAction)checkboxClicked:(id)sender
|
||||
{
|
||||
if (sender == mCheckboxOpenTabsForCommand) {
|
||||
[self setPref:kGeckoPrefOpenTabsForMiddleClick toBoolean:([sender state] == NSOnState)];
|
||||
}
|
||||
else if (sender == mCheckboxOpenTabsForExternalLinks) {
|
||||
[sender setAllowsMixedState:NO];
|
||||
[self setPref:kGeckoPrefExternalLoadBehavior toInt:([sender state] == NSOnState ? kExternalLoadOpensNewTab
|
||||
: kExternalLoadOpensNewWindow)];
|
||||
}
|
||||
else if (sender == mSingleWindowMode) {
|
||||
[sender setAllowsMixedState:NO];
|
||||
int newState = ([sender state] == NSOnState) ? kSingleWindowModeUseNewTab
|
||||
: kSingleWindowModeUseNewWindow;
|
||||
[self setPref:kGeckoPrefSingleWindowModeTargetBehavior toInt:newState];
|
||||
}
|
||||
else if (sender == mCheckboxLoadTabsInBackground) {
|
||||
[self setPref:kGeckoPrefOpenTabsInBackground toBoolean:([sender state] == NSOnState)];
|
||||
}
|
||||
else if (sender == mTabBarVisiblity) {
|
||||
[self setPref:kGeckoPrefAlwaysShowTabBar toBoolean:([sender state] == NSOnState)];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
Binary file not shown.
@@ -1 +0,0 @@
|
||||
"PreferencePanelLabel" = "Web Features";
|
||||
@@ -1,75 +0,0 @@
|
||||
{
|
||||
IBClasses = (
|
||||
{
|
||||
CLASS = ExtendedTableView;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSTableView;
|
||||
},
|
||||
{
|
||||
CLASS = FirstResponder;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
CLASS = NSPreferencePane;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
"_firstKeyView" = id;
|
||||
"_initialKeyView" = id;
|
||||
"_lastKeyView" = id;
|
||||
"_window" = id;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
ACTIONS = {
|
||||
addFlashblockWhitelistSite = id;
|
||||
addWhitelistSite = id;
|
||||
clickEnableAdBlocking = id;
|
||||
clickEnableAnnoyanceBlocker = id;
|
||||
clickEnableFlashblock = id;
|
||||
clickEnableJS = id;
|
||||
clickEnableJava = id;
|
||||
clickEnablePopupBlocking = id;
|
||||
clickPreventAnimation = id;
|
||||
editFlashblockWhitelist = id;
|
||||
editFlashblockWhitelistDone = id;
|
||||
editWhitelist = id;
|
||||
editWhitelistDone = id;
|
||||
removeFlashblockWhitelistSite = id;
|
||||
removeWhitelistSite = id;
|
||||
tabFocusBehaviorChanged = id;
|
||||
};
|
||||
CLASS = OrgMozillaCaminoPreferenceWebFeatures;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mAddButton = NSButton;
|
||||
mAddField = NSTextField;
|
||||
mAddFlashblockButton = NSButton;
|
||||
mAddFlashblockField = NSTextField;
|
||||
mEditFlashblockWhitelist = NSButton;
|
||||
mEditWhitelist = NSButton;
|
||||
mEnableAdBlocking = NSButton;
|
||||
mEnableAnnoyanceBlocker = NSButton;
|
||||
mEnableFlashblock = NSButton;
|
||||
mEnableJS = NSButton;
|
||||
mEnableJava = NSButton;
|
||||
mEnablePopupBlocking = NSButton;
|
||||
mFlashblockWhitelistPanel = id;
|
||||
mFlashblockWhitelistTable = ExtendedTableView;
|
||||
mPolicyColumn = NSTableColumn;
|
||||
mPreventAnimation = NSButton;
|
||||
mTabBehaviorPopup = NSPopUpButton;
|
||||
mWhitelistPanel = id;
|
||||
mWhitelistTable = ExtendedTableView;
|
||||
};
|
||||
SUPERCLASS = PreferencePaneBase;
|
||||
},
|
||||
{
|
||||
CLASS = PreferencePaneBase;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSPreferencePane;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>69 14 356 240 0 0 1440 878 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>489.0</string>
|
||||
<key>IBOldestOS</key>
|
||||
<integer>2</integer>
|
||||
<key>IBSystem Version</key>
|
||||
<string>9J61</string>
|
||||
<key>targetFramework</key>
|
||||
<string>IBCocoaFramework</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -1,107 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* ***** 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 the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* William Dell Wisner <william@dell.wisner.name>
|
||||
* Josh Aas <josh@mozilla.com>
|
||||
* Stuart Morgan <stuart.morgan@alumni.case.edu>
|
||||
*
|
||||
* 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 <Cocoa/Cocoa.h>
|
||||
#import <PreferencePanes/NSPreferencePane.h>
|
||||
#import "PreferencePaneBase.h"
|
||||
|
||||
@class ExtendedTableView;
|
||||
|
||||
@interface OrgMozillaCaminoPreferenceWebFeatures : PreferencePaneBase
|
||||
{
|
||||
IBOutlet NSButton* mEnableJS;
|
||||
IBOutlet NSButton* mEnableJava;
|
||||
IBOutlet NSButton* mEnablePopupBlocking;
|
||||
IBOutlet NSButton* mEnableAdBlocking;
|
||||
IBOutlet NSButton* mPreventAnimation;
|
||||
IBOutlet NSButton* mEditWhitelist;
|
||||
IBOutlet NSButton* mEditFlashblockWhitelist;
|
||||
IBOutlet NSButton* mEnableFlashblock;
|
||||
IBOutlet NSButton* mEnableAnnoyanceBlocker;
|
||||
IBOutlet NSPopUpButton* mTabBehaviorPopup;
|
||||
|
||||
IBOutlet id mWhitelistPanel;
|
||||
IBOutlet ExtendedTableView* mWhitelistTable;
|
||||
IBOutlet NSTableColumn* mPolicyColumn;
|
||||
IBOutlet NSTextField* mAddField;
|
||||
IBOutlet NSButton* mAddButton;
|
||||
|
||||
IBOutlet id mFlashblockWhitelistPanel;
|
||||
IBOutlet ExtendedTableView* mFlashblockWhitelistTable;
|
||||
IBOutlet NSTextField* mAddFlashblockField;
|
||||
IBOutlet NSButton* mAddFlashblockButton;
|
||||
NSArray* mFlashblockSites; // STRONG
|
||||
|
||||
NSMutableArray* mCachedPermissions; // cached list for speed, STRONG
|
||||
}
|
||||
|
||||
-(IBAction) clickEnableJS:(id)sender;
|
||||
-(IBAction) clickEnableJava:(id)sender;
|
||||
|
||||
-(IBAction) clickEnablePopupBlocking:(id)sender;
|
||||
-(IBAction) clickEnableAdBlocking:(id)sender;
|
||||
-(IBAction) clickPreventAnimation:(id)sender;
|
||||
-(IBAction) editWhitelist:(id)sender;
|
||||
-(IBAction) editFlashblockWhitelist:(id)sender;
|
||||
-(IBAction) clickEnableFlashblock:(id)sender;
|
||||
|
||||
-(IBAction) clickEnableAnnoyanceBlocker:(id)sender;
|
||||
-(void) setAnnoyingWindowPrefsTo:(BOOL)inValue;
|
||||
|
||||
-(IBAction) tabFocusBehaviorChanged:(id)sender;
|
||||
|
||||
// whitelist sheet methods
|
||||
-(IBAction) editWhitelistDone:(id)aSender;
|
||||
-(IBAction) removeWhitelistSite:(id)aSender;
|
||||
-(IBAction) addWhitelistSite:(id)sender;
|
||||
-(void) editWhitelistSheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo;
|
||||
|
||||
// Flashblock whitelist sheet methods
|
||||
-(IBAction) editFlashblockWhitelistDone:(id)aSender;
|
||||
-(IBAction) removeFlashblockWhitelistSite:(id)aSender;
|
||||
-(IBAction) addFlashblockWhitelistSite:(id)Sender;
|
||||
-(void) updateFlashblockWhitelist;
|
||||
|
||||
// data source informal protocol (NSTableDataSource)
|
||||
- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
|
||||
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex;
|
||||
|
||||
@end
|
||||
@@ -1,571 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* ***** 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 the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* William Dell Wisner <william@dell.wisner.name>
|
||||
* Josh Aas <josh@mozilla.com>
|
||||
* Stuart Morgan <stuart.morgan@alumni.case.edu>
|
||||
*
|
||||
* 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 "WebFeatures.h"
|
||||
|
||||
#import "NSString+Utils.h"
|
||||
#import "CHPermissionManager.h"
|
||||
#import "ExtendedTableView.h"
|
||||
#import "GeckoPrefConstants.h"
|
||||
#import "FlashblockWhitelistManager.h"
|
||||
|
||||
// need to match the strings in PreferenceManager.mm
|
||||
static NSString* const AdBlockingChangedNotificationName = @"AdBlockingChanged";
|
||||
static NSString* const kFlashblockChangedNotificationName = @"FlashblockChanged";
|
||||
static NSString* const kFlashblockWhitelistChangedNotificationName = @"FlashblockWhitelistChanged";
|
||||
|
||||
// for annoyance blocker prefs
|
||||
const int kAnnoyancePrefNone = 1;
|
||||
const int kAnnoyancePrefAll = 2;
|
||||
const int kAnnoyancePrefSome = 3;
|
||||
|
||||
@interface OrgMozillaCaminoPreferenceWebFeatures(Private)
|
||||
|
||||
- (int)annoyingWindowPrefs;
|
||||
- (int)popupIndexForCurrentTabFocusPref;
|
||||
- (int)preventAnimationCheckboxState;
|
||||
- (BOOL)isFlashblockAllowed;
|
||||
- (void)updateFlashblock;
|
||||
- (void)populatePermissionCache;
|
||||
|
||||
@end
|
||||
|
||||
@implementation OrgMozillaCaminoPreferenceWebFeatures
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
[mFlashblockSites release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)mainViewDidLoad
|
||||
{
|
||||
// Set up policy popups
|
||||
NSPopUpButtonCell *popupButtonCell = [mPolicyColumn dataCell];
|
||||
[popupButtonCell setEditable:YES];
|
||||
[popupButtonCell addItemsWithTitles:[NSArray arrayWithObjects:NSLocalizedString(@"Allow", nil),
|
||||
NSLocalizedString(@"Deny", nil),
|
||||
nil]];
|
||||
}
|
||||
|
||||
- (void)willSelect
|
||||
{
|
||||
BOOL gotPref = NO;
|
||||
|
||||
// Set initial value on JavaScript checkbox.
|
||||
BOOL jsEnabled = [self getBooleanPref:kGeckoPrefEnableJavascript withSuccess:&gotPref] && gotPref;
|
||||
[mEnableJS setState:jsEnabled];
|
||||
|
||||
// Set initial value on Java checkbox, and disable it if plugins are off
|
||||
BOOL pluginsEnabled = [self getBooleanPref:kGeckoPrefEnablePlugins withSuccess:&gotPref] || !gotPref;
|
||||
[mEnableJava setEnabled:pluginsEnabled];
|
||||
BOOL javaEnabled = pluginsEnabled && [self getBooleanPref:kGeckoPrefEnableJava withSuccess:NULL];
|
||||
[mEnableJava setState:javaEnabled];
|
||||
|
||||
// set initial value on popup blocking checkbox and disable the whitelist
|
||||
// button if it's off
|
||||
BOOL enablePopupBlocking = [self getBooleanPref:kGeckoPrefBlockPopups withSuccess:&gotPref] && gotPref;
|
||||
[mEnablePopupBlocking setState:enablePopupBlocking];
|
||||
[mEditWhitelist setEnabled:enablePopupBlocking];
|
||||
|
||||
// set initial value on annoyance blocker checkbox.
|
||||
if([self annoyingWindowPrefs] == kAnnoyancePrefAll)
|
||||
[mEnableAnnoyanceBlocker setState:NSOnState];
|
||||
else if([self annoyingWindowPrefs] == kAnnoyancePrefNone)
|
||||
[mEnableAnnoyanceBlocker setState:NSOffState];
|
||||
else // annoyingWindowPrefs == kAnnoyancePrefSome
|
||||
[mEnableAnnoyanceBlocker setState:NSMixedState];
|
||||
|
||||
[mPreventAnimation setState:[self preventAnimationCheckboxState]];
|
||||
|
||||
BOOL enableAdBlock = [self getBooleanPref:kGeckoPrefBlockAds withSuccess:&gotPref];
|
||||
[mEnableAdBlocking setState:enableAdBlock];
|
||||
|
||||
// Only allow Flashblock if dependencies are set correctly
|
||||
BOOL flashblockAllowed = [self isFlashblockAllowed];
|
||||
[mEnableFlashblock setEnabled:flashblockAllowed];
|
||||
|
||||
if (flashblockAllowed) {
|
||||
BOOL enableFlashblock = [self getBooleanPref:kGeckoPrefBlockFlash withSuccess:NULL];
|
||||
[mEnableFlashblock setState:(enableFlashblock ? NSOnState : NSOffState)];
|
||||
[mEditFlashblockWhitelist setEnabled:enableFlashblock];
|
||||
}
|
||||
else {
|
||||
[mEditFlashblockWhitelist setEnabled:NO];
|
||||
}
|
||||
|
||||
// Set tab focus popup.
|
||||
[mTabBehaviorPopup selectItemAtIndex:[self popupIndexForCurrentTabFocusPref]];
|
||||
}
|
||||
|
||||
//
|
||||
// -clickEnableJS:
|
||||
//
|
||||
// Enable and disable JavaScript
|
||||
//
|
||||
-(IBAction) clickEnableJS:(id)sender
|
||||
{
|
||||
[self setPref:kGeckoPrefEnableJavascript toBoolean:([sender state] == NSOnState)];
|
||||
|
||||
// Flashblock depends on JavaScript, so make sure to update the Flashblock settings.
|
||||
[self updateFlashblock];
|
||||
}
|
||||
|
||||
//
|
||||
// -clickEnableJava:
|
||||
//
|
||||
// Enable and disable Java
|
||||
//
|
||||
-(IBAction) clickEnableJava:(id)sender
|
||||
{
|
||||
[self setPref:kGeckoPrefEnableJava toBoolean:([sender state] == NSOnState)];
|
||||
}
|
||||
|
||||
//
|
||||
// -clickEnableAdBlocking:
|
||||
//
|
||||
// Enable and disable ad blocking via an ad_blocking.css file that we provide
|
||||
// in our package.
|
||||
//
|
||||
- (IBAction)clickEnableAdBlocking:(id)sender
|
||||
{
|
||||
[self setPref:kGeckoPrefBlockAds toBoolean:([sender state] == NSOnState)];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:AdBlockingChangedNotificationName object:nil];
|
||||
}
|
||||
|
||||
//
|
||||
// clickEnablePopupBlocking
|
||||
//
|
||||
// Enable and disable mozilla's popup blocking feature. We use a combination of
|
||||
// two prefs to suppress bad popups.
|
||||
//
|
||||
- (IBAction)clickEnablePopupBlocking:(id)sender
|
||||
{
|
||||
[self setPref:kGeckoPrefBlockPopups toBoolean:([sender state] == NSOnState)];
|
||||
[mEditWhitelist setEnabled:[sender state]];
|
||||
}
|
||||
|
||||
//
|
||||
// -clickPreventAnimation:
|
||||
//
|
||||
// Enable and disable mozilla's limiting of how animated images repeat
|
||||
//
|
||||
-(IBAction) clickPreventAnimation:(id)sender
|
||||
{
|
||||
[sender setAllowsMixedState:NO];
|
||||
[self setPref:kGeckoPrefImageAnimationBehavior
|
||||
toString:([sender state] ? kImageAnimationOnce : kImageAnimationLoop)];
|
||||
}
|
||||
|
||||
//
|
||||
// clickEnableFlashblock:
|
||||
//
|
||||
// Enable and disable Flashblock. When enabled, an icon is displayed and the
|
||||
// Flash animation plays when the user clicks it. When disabled, Flash plays
|
||||
// automatically.
|
||||
//
|
||||
-(IBAction) clickEnableFlashblock:(id)sender
|
||||
{
|
||||
[self setPref:kGeckoPrefBlockFlash toBoolean:([sender state] == NSOnState)];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kFlashblockChangedNotificationName object:nil];
|
||||
[mEditFlashblockWhitelist setEnabled:[sender state]];
|
||||
}
|
||||
|
||||
//
|
||||
// populatePermissionCache
|
||||
//
|
||||
// Builds a popup-blocking cache that we can quickly refer to later.
|
||||
//
|
||||
-(void) populatePermissionCache
|
||||
{
|
||||
if (mCachedPermissions)
|
||||
[mCachedPermissions release];
|
||||
mCachedPermissions = [[[CHPermissionManager permissionManager]
|
||||
permissionsOfType:CHPermissionTypePopup] mutableCopy];
|
||||
if (!mCachedPermissions)
|
||||
mCachedPermissions = [[NSMutableArray alloc] init];
|
||||
}
|
||||
|
||||
//
|
||||
// editWhitelist:
|
||||
//
|
||||
// put up a sheet to allow people to edit the popup blocker whitelist
|
||||
//
|
||||
-(IBAction) editWhitelist:(id)sender
|
||||
{
|
||||
// build parallel permission list for speed with a lot of blocked sites
|
||||
[self populatePermissionCache];
|
||||
|
||||
[NSApp beginSheet:mWhitelistPanel
|
||||
modalForWindow:[mEditWhitelist window] // any old window accessor
|
||||
modalDelegate:self
|
||||
didEndSelector:@selector(editWhitelistSheetDidEnd:returnCode:contextInfo:)
|
||||
contextInfo:NULL];
|
||||
|
||||
// ensure a row is selected (cocoa doesn't do this for us, but will keep
|
||||
// us from unselecting a row once one is set; go figure).
|
||||
if ([mWhitelistTable numberOfRows] > 0)
|
||||
[mWhitelistTable selectRow:0 byExtendingSelection:NO];
|
||||
|
||||
[mWhitelistTable setDeleteAction:@selector(removeWhitelistSite:)];
|
||||
[mWhitelistTable setTarget:self];
|
||||
|
||||
[mAddButton setEnabled:NO];
|
||||
|
||||
// we shouldn't need to do this, but the scrollbar won't enable unless we
|
||||
// force the table to reload its data. Oddly it gets the number of rows correct,
|
||||
// it just forgets to tell the scrollbar. *shrug*
|
||||
[mWhitelistTable reloadData];
|
||||
}
|
||||
|
||||
// whitelist sheet methods
|
||||
-(IBAction) editWhitelistDone:(id)aSender
|
||||
{
|
||||
// save stuff??
|
||||
|
||||
[mWhitelistPanel orderOut:self];
|
||||
[NSApp endSheet:mWhitelistPanel];
|
||||
|
||||
[mCachedPermissions release];
|
||||
mCachedPermissions = nil;
|
||||
}
|
||||
|
||||
-(IBAction) removeWhitelistSite:(id)aSender
|
||||
{
|
||||
CHPermissionManager* permManager = [CHPermissionManager permissionManager];
|
||||
|
||||
// Walk the selected rows backwards, removing permissions.
|
||||
NSIndexSet* selectedIndexes = [mWhitelistTable selectedRowIndexes];
|
||||
for (unsigned int i = [selectedIndexes lastIndex];
|
||||
i != NSNotFound;
|
||||
i = [selectedIndexes indexLessThanIndex:i])
|
||||
{
|
||||
[permManager removePermissionForHost:[[mCachedPermissions objectAtIndex:i] host]
|
||||
type:CHPermissionTypePopup];
|
||||
[mCachedPermissions removeObjectAtIndex:i];
|
||||
}
|
||||
|
||||
[mWhitelistTable reloadData];
|
||||
|
||||
// Select the row after the last deleted row.
|
||||
if ([mWhitelistTable numberOfRows] > 0) {
|
||||
int rowToSelect = [selectedIndexes lastIndex] - ([selectedIndexes count] - 1);
|
||||
if ((rowToSelect < 0) || (rowToSelect >= [mWhitelistTable numberOfRows]))
|
||||
rowToSelect = [mWhitelistTable numberOfRows] - 1;
|
||||
[mWhitelistTable selectRow:rowToSelect byExtendingSelection:NO];
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// addWhitelistSite:
|
||||
//
|
||||
// adds a new site to the permission manager whitelist for popups
|
||||
//
|
||||
-(IBAction) addWhitelistSite:(id)sender
|
||||
{
|
||||
NSString* host = [[mAddField stringValue] stringByRemovingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||
|
||||
[[CHPermissionManager permissionManager] setPolicy:CHPermissionAllow
|
||||
forHost:host
|
||||
type:CHPermissionTypePopup];
|
||||
//TODO: Create a new permission rather than starting from scratch.
|
||||
[self populatePermissionCache];
|
||||
|
||||
[mAddField setStringValue:@""];
|
||||
[mAddButton setEnabled:NO];
|
||||
[mWhitelistTable reloadData];
|
||||
}
|
||||
|
||||
- (void) editWhitelistSheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
|
||||
{
|
||||
[mAddField setStringValue:@""];
|
||||
}
|
||||
|
||||
- (IBAction)editFlashblockWhitelist:(id)aSender
|
||||
{
|
||||
[self updateFlashblockWhitelist];
|
||||
|
||||
[NSApp beginSheet:mFlashblockWhitelistPanel
|
||||
modalForWindow:[mEditFlashblockWhitelist window] // any old window accessor
|
||||
modalDelegate:self
|
||||
didEndSelector:nil
|
||||
contextInfo:NULL];
|
||||
|
||||
[mFlashblockWhitelistTable setDeleteAction:@selector(removeFlashblockWhitelistSite:)];
|
||||
[mFlashblockWhitelistTable setTarget:self];
|
||||
|
||||
[mAddFlashblockButton setEnabled:NO];
|
||||
[mAddFlashblockField setStringValue:@""];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(updateFlashblockWhitelist)
|
||||
name:kFlashblockWhitelistChangedNotificationName
|
||||
object:nil];
|
||||
}
|
||||
|
||||
- (IBAction)editFlashblockWhitelistDone:(id)aSender
|
||||
{
|
||||
[mFlashblockWhitelistPanel orderOut:self];
|
||||
[NSApp endSheet:mFlashblockWhitelistPanel];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self
|
||||
name:kFlashblockWhitelistChangedNotificationName
|
||||
object:nil];
|
||||
[mFlashblockSites release];
|
||||
mFlashblockSites = nil;
|
||||
}
|
||||
|
||||
- (IBAction)removeFlashblockWhitelistSite:(id)aSender
|
||||
{
|
||||
int row = [mFlashblockWhitelistTable selectedRow];
|
||||
if (row < 0)
|
||||
return;
|
||||
|
||||
[[FlashblockWhitelistManager sharedInstance] removeFlashblockWhitelistSite:[mFlashblockSites objectAtIndex:row]];
|
||||
}
|
||||
|
||||
- (IBAction)addFlashblockWhitelistSite:(id)sender
|
||||
{
|
||||
NSString* site = [mAddFlashblockField stringValue];
|
||||
[[FlashblockWhitelistManager sharedInstance] addFlashblockWhitelistSite:site];
|
||||
// The user can no longer add the site that's in the text field,
|
||||
// so clear the text field and disable the Add button.
|
||||
[mAddFlashblockField setStringValue:@""];
|
||||
[mAddFlashblockButton setEnabled:NO];
|
||||
}
|
||||
|
||||
-(void) updateFlashblockWhitelist
|
||||
{
|
||||
// Get the updated whitelist array.
|
||||
[mFlashblockSites release];
|
||||
mFlashblockSites = [[[FlashblockWhitelistManager sharedInstance] whitelistArray] retain];
|
||||
[mFlashblockWhitelistTable reloadData];
|
||||
}
|
||||
|
||||
// data source informal protocol (NSTableDataSource)
|
||||
- (int)numberOfRowsInTableView:(NSTableView *)aTableView
|
||||
{
|
||||
if (aTableView == mWhitelistTable)
|
||||
return [mCachedPermissions count];
|
||||
|
||||
// otherwise aTableView == mFlashblockWhitelistTable
|
||||
return [mFlashblockSites count];
|
||||
}
|
||||
|
||||
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
|
||||
{
|
||||
id retVal = nil;
|
||||
if (aTableView == mWhitelistTable) {
|
||||
CHPermission* permission = [mCachedPermissions objectAtIndex:rowIndex];
|
||||
if (aTableColumn == mPolicyColumn)
|
||||
retVal = [NSNumber numberWithInt:(([permission policy] == CHPermissionAllow) ? 0 : 1)];
|
||||
else // host column
|
||||
retVal = [permission host];
|
||||
}
|
||||
else { // aTableView == mFlashblockWhitelistTable
|
||||
retVal = [mFlashblockSites objectAtIndex:rowIndex];
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
// currently, this only applies to the site allow/deny, since that's the only editable column
|
||||
-(void) tableView:(NSTableView *)aTableView
|
||||
setObjectValue:anObject
|
||||
forTableColumn:(NSTableColumn *)aTableColumn
|
||||
row:(int)rowIndex
|
||||
{
|
||||
if (aTableColumn == mPolicyColumn) {
|
||||
CHPermission* permission = [mCachedPermissions objectAtIndex:rowIndex];
|
||||
[permission setPolicy:(([anObject intValue] == 0) ? CHPermissionAllow
|
||||
: CHPermissionDeny)];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)controlTextDidChange:(NSNotification*)notification
|
||||
{
|
||||
id textField = [notification object];
|
||||
|
||||
if (textField == mAddField)
|
||||
[mAddButton setEnabled:[[mAddField stringValue] length] > 0];
|
||||
else if (textField == mAddFlashblockField)
|
||||
[mAddFlashblockButton setEnabled:[[FlashblockWhitelistManager sharedInstance] canAddToWhitelist:[mAddFlashblockField stringValue]]];
|
||||
}
|
||||
|
||||
//
|
||||
// tabFocusBehaviorChanged:
|
||||
//
|
||||
// Enable and disable tabbing to various elements. We expose only three options,
|
||||
// but internally it's a bitwise additive pref of text fields, other form
|
||||
// elements, and links
|
||||
//
|
||||
- (IBAction)tabFocusBehaviorChanged:(id)sender
|
||||
{
|
||||
int tabFocusValue = 0;
|
||||
switch ([sender indexOfSelectedItem]) {
|
||||
case 0:
|
||||
tabFocusValue = kTabFocusesTextFields;
|
||||
break;
|
||||
case 1:
|
||||
tabFocusValue = kTabFocusesTextFields | kTabFocusesForms;
|
||||
break;
|
||||
case 2:
|
||||
tabFocusValue = kTabFocusesTextFields | kTabFocusesForms | kTabFocusesLinks;
|
||||
break;
|
||||
}
|
||||
|
||||
[self setPref:kGeckoPrefTabFocusBehavior toInt:tabFocusValue];
|
||||
}
|
||||
|
||||
//
|
||||
// popupIndexForCurrentTabFocusPref
|
||||
//
|
||||
// Returns the tab focus popup index for the current setting of the tab focus
|
||||
// pref. Since we may not be able to show the actual pref, we err on the side
|
||||
// of showing an over-inclusive item.
|
||||
//
|
||||
- (int)popupIndexForCurrentTabFocusPref
|
||||
{
|
||||
int tabFocusValue = [self getIntPref:kGeckoPrefTabFocusBehavior withSuccess:NULL];
|
||||
if (tabFocusValue & kTabFocusesLinks)
|
||||
return 2;
|
||||
else if (tabFocusValue & kTabFocusesForms)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
//
|
||||
// clickEnableAnnoyanceBlocker:
|
||||
//
|
||||
// Enable and disable prefs for allowing webpages to be annoying and move/resize the
|
||||
// window or tweak the status bar and make it unusable.
|
||||
//
|
||||
-(IBAction) clickEnableAnnoyanceBlocker:(id)sender
|
||||
{
|
||||
[sender setAllowsMixedState:NO];
|
||||
if ( [sender state] )
|
||||
[self setAnnoyingWindowPrefsTo:YES];
|
||||
else
|
||||
[self setAnnoyingWindowPrefsTo:NO];
|
||||
}
|
||||
|
||||
//
|
||||
// setAnnoyingWindowPrefsTo:
|
||||
//
|
||||
// Set all the prefs that allow webpages to muck with the status bar and window position
|
||||
// (ie, be really annoying) to the given value
|
||||
//
|
||||
-(void) setAnnoyingWindowPrefsTo:(BOOL)inValue
|
||||
{
|
||||
[self setPref:kGeckoPrefPreventDOMWindowResize toBoolean:inValue];
|
||||
[self setPref:kGeckoPrefPreventDOMStatusChange toBoolean:inValue];
|
||||
[self setPref:kGeckoPrefPreventDOMWindowFocus toBoolean:inValue];
|
||||
}
|
||||
|
||||
- (int)annoyingWindowPrefs
|
||||
{
|
||||
BOOL disableStatusChangePref = [self getBooleanPref:kGeckoPrefPreventDOMStatusChange withSuccess:NULL];
|
||||
BOOL disableMoveResizePref = [self getBooleanPref:kGeckoPrefPreventDOMWindowResize withSuccess:NULL];
|
||||
BOOL disableWindowFlipPref = [self getBooleanPref:kGeckoPrefPreventDOMWindowFocus withSuccess:NULL];
|
||||
|
||||
if(disableStatusChangePref && disableMoveResizePref && disableWindowFlipPref)
|
||||
return kAnnoyancePrefAll;
|
||||
if(!disableStatusChangePref && !disableMoveResizePref && !disableWindowFlipPref)
|
||||
return kAnnoyancePrefNone;
|
||||
|
||||
return kAnnoyancePrefSome;
|
||||
}
|
||||
|
||||
- (int)preventAnimationCheckboxState
|
||||
{
|
||||
NSString* preventAnimation = [self getStringPref:kGeckoPrefImageAnimationBehavior withSuccess:NULL];
|
||||
if ([preventAnimation isEqualToString:kImageAnimationOnce])
|
||||
return NSOnState;
|
||||
else if ([preventAnimation isEqualToString:kImageAnimationLoop])
|
||||
return NSOffState;
|
||||
else
|
||||
return NSMixedState;
|
||||
}
|
||||
|
||||
//
|
||||
// isFlashblockAllowed
|
||||
//
|
||||
// Checks whether Flashblock can be enabled.
|
||||
// Flashblock is only allowed if javascript and plug-ins enabled.
|
||||
// NOTE: This code is duplicated in PreferenceManager.mm since the Flashblock checkbox
|
||||
// settings are done by WebFeatures and stylesheet loading is done by PreferenceManager.
|
||||
//
|
||||
-(BOOL) isFlashblockAllowed
|
||||
{
|
||||
BOOL gotPref = NO;
|
||||
BOOL jsEnabled = [self getBooleanPref:kGeckoPrefEnableJavascript withSuccess:&gotPref] && gotPref;
|
||||
BOOL pluginsEnabled = [self getBooleanPref:kGeckoPrefEnablePlugins withSuccess:&gotPref] || !gotPref;
|
||||
|
||||
return jsEnabled && pluginsEnabled;
|
||||
}
|
||||
|
||||
//
|
||||
// updateFlashblock
|
||||
//
|
||||
// Update the state of the Flashblock checkbox
|
||||
//
|
||||
-(void) updateFlashblock
|
||||
{
|
||||
BOOL allowed = [self isFlashblockAllowed];
|
||||
[mEnableFlashblock setEnabled:allowed];
|
||||
|
||||
// Flashblock state can only change if it's already enabled,
|
||||
// since changing dependencies won't have any effect on disabled Flashblock.
|
||||
if (![self getBooleanPref:kGeckoPrefBlockFlash withSuccess:NULL])
|
||||
return;
|
||||
|
||||
// Flashblock preference is enabled. Checkbox is on if Flashblock is also allowed.
|
||||
[mEnableFlashblock setState:(allowed ? NSOnState : NSOffState)];
|
||||
[mEditFlashblockWhitelist setEnabled:allowed];
|
||||
|
||||
// Always send a notification, dependency verification is done by receiver.
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kFlashblockChangedNotificationName object:nil];
|
||||
}
|
||||
|
||||
@end
|
||||
Binary file not shown.
@@ -1,58 +0,0 @@
|
||||
# ***** 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 the Mozilla build system.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# the Mozilla Foundation <http://www.mozilla.org/>.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Benjamin Smedberg <benjamin@smedbergs.us> (Initial Code)
|
||||
#
|
||||
# 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 *****
|
||||
|
||||
ifndef LIBXUL_SDK
|
||||
include $(topsrcdir)/toolkit/toolkit-tiers.mk
|
||||
endif
|
||||
|
||||
TIERS += app
|
||||
|
||||
ifdef MOZ_EXTENSIONS
|
||||
tier_app_dirs += extensions
|
||||
endif
|
||||
|
||||
ifdef MOZ_BRANDING_DIRECTORY
|
||||
tier_app_dirs += $(MOZ_BRANDING_DIRECTORY)
|
||||
endif
|
||||
|
||||
tier_app_dirs += \
|
||||
embedding/config \
|
||||
camino \
|
||||
$(NULL)
|
||||
|
||||
package:
|
||||
@$(MAKE) -C camino/installer
|
||||
@@ -1,24 +0,0 @@
|
||||
// Shared configuration settings for Camino and CaminoStatic
|
||||
|
||||
PRODUCT_NAME = Camino
|
||||
WRAPPER_EXTENSION = app
|
||||
INSTALL_PATH = $(HOME)/Applications
|
||||
INFOPLIST_FILE = generated/Info-Camino.plist
|
||||
|
||||
GCC_PREFIX_HEADER = src/includes/ChimeraPrefix.h
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES
|
||||
GCC_ENABLE_CPP_EXCEPTIONS = NO
|
||||
GCC_ENABLE_CPP_RTTI = NO
|
||||
OTHER_CFLAGS = -fshort-wchar
|
||||
GCC_ENABLE_PASCAL_STRINGS = YES
|
||||
GCC_PREPROCESSOR_DEFINITIONS = OSTYPE=Darwin1.4 OSARCH=Darwin MOZILLA_INTERNAL_API=1
|
||||
OTHER_LDFLAGS = -lpthread -lm -Wl,-executable_path,build/$(CONFIGURATION)/$(WRAPPER_NAME)/Contents/MacOS
|
||||
LIBRARY_SEARCH_PATHS = ../dist/bin ../dist/lib
|
||||
HEADER_SEARCH_PATHS = ../dist/include ../dist/include/appcomps ../dist/include/camino ../dist/include/caps ../dist/include/chardet ../dist/include/chrome ../dist/include/commandhandler ../dist/include/composer ../dist/include/content ../dist/include/cookie ../dist/include/docshell ../dist/include/dom ../dist/include/downloads ../dist/include/editor ../dist/include/embed_base ../dist/include/exthandler ../dist/include/find ../dist/include/gfx ../dist/include/helperAppDlg ../dist/include/history ../dist/include/htmlparser ../dist/include/intl ../dist/include/js ../dist/include/layout ../dist/include/locale ../dist/include/mimetype ../dist/include/mork ../dist/include/necko ../dist/include/nkcache ../dist/include/nspr ../dist/include/pipboot ../dist/include/pipnss ../dist/include/pref ../dist/include/profdirserviceprovider ../dist/include/shistory ../dist/include/spellchecker ../dist/include/string ../dist/include/thebes ../dist/include/txtsvc ../dist/include/uconv ../dist/include/unicharutil ../dist/include/uriloader ../dist/include/url-classifier ../dist/include/view ../dist/include/webbrowserpersist ../dist/include/webbrwsr ../dist/include/webshell ../dist/include/widget ../dist/include/windowwatcher ../dist/include/xmlextras ../dist/include/xpcom ../dist/include/xpconnect ../dist/include/xultmpl ../dist/public/nss $(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon
|
||||
FRAMEWORK_SEARCH_PATHS = sparkle/build/Release growl/build/Release google-breakpad/src/client/mac/build/Release
|
||||
|
||||
// Warning settings
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES
|
||||
GCC_WARN_SIGN_COMPARE = YES
|
||||
WARNING_CFLAGS = -Wall -Wno-four-char-constants
|
||||
OTHER_CPLUSPLUSFLAGS = $(OTHER_CPLUSPLUSFLAGS) -Wno-non-virtual-dtor
|
||||
@@ -1,12 +0,0 @@
|
||||
GCC_OPTIMIZATION_LEVEL = 0
|
||||
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES
|
||||
COPY_PHASE_STRIP = NO
|
||||
|
||||
GCC_DYNAMIC_NO_PIC = NO
|
||||
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO
|
||||
|
||||
// Setting this here will also cause preference panes to inherit hidden
|
||||
// visibility during the debug build without requiring target-level changes.
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = YES
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user