OBS User unknown 2007-01-15 22:49:32 +00:00 committed by Git OBS Bridge
commit 41f91a9bd7
43 changed files with 11600 additions and 0 deletions

25
.gitattributes vendored Normal file
View File

@ -0,0 +1,25 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
## Specific LFS patterns
mailredirect-0.7.4.xpi filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

422
MozillaThunderbird.changes Normal file
View File

@ -0,0 +1,422 @@
-------------------------------------------------------------------
Thu Nov 9 01:41:19 CET 2006 - jhargadon@suse.de
- security update to version 1.5.0.8
-------------------------------------------------------------------
Tue Sep 12 20:51:58 CEST 2006 - stark@suse.de
- security update to version 1.5.0.7
-------------------------------------------------------------------
Mon Aug 14 11:37:46 CEST 2006 - stark@suse.de
- update enigmail to 0.94.1
* Added support for signing attachments with inline-PGP
- update mailredirect to 0.7.4
- added backend patch to allow replies to list with
ReplyToListThunderbirdExtension (#199125, bmo #45715)
- added mailnews.clobber_list_reply pref which switches
"Reply All" to "Reply List" functionality if set
-------------------------------------------------------------------
Thu Jul 27 06:50:44 CEST 2006 - stark@suse.de
- security update to version 1.5.0.5 (#195043)
- fixed overwrite confirmation for GTK filesaver (#179531)
-------------------------------------------------------------------
Wed Jun 7 19:52:37 CEST 2006 - stark@suse.de
- fixed up BuildRequires
-------------------------------------------------------------------
Fri Jun 2 12:18:49 CEST 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Fri Jun 2 12:13:48 CEST 2006 - stark@suse.de
- update to security/stability release 1.5.0.4 (#179011)
(http://www.mozilla.org/projects/security/known-vulnerabilities.html#Thunderbird)
-------------------------------------------------------------------
Mon May 15 07:16:13 CEST 2006 - stark@suse.de
- update to version 1.5.0.2
- update mailredirect to 0.7.3
- save printer settings properly (#174082, bmo #324072)
- improved postscript output (bmo #334485)
- changed defaults for printer properties (#6534)
- get available paper sizes from CUPS (#65482)
-------------------------------------------------------------------
Sat Mar 18 22:23:49 CET 2006 - stark@suse.de
- translations package is suggested now by main package
- yet another set of upstream fixes (#148876)
-------------------------------------------------------------------
Sun Mar 12 19:52:08 CET 2006 - stark@suse.de
- added Khmer (km-*) to pango locales (#157397)
- yet another set of upstream fixes (#148876)
-------------------------------------------------------------------
Sat Mar 4 21:27:42 CET 2006 - stark@suse.de
- latest security fixes from upstream (#148876)
- show multiple Reply-To addresses (bmo #106189)
-------------------------------------------------------------------
Fri Feb 24 09:00:40 CET 2006 - stark@suse.de
- added GTK category to desktop-file
- dumpstack.patch is in upstream patches now
- get some more patches (#148876)
-------------------------------------------------------------------
Tue Feb 14 07:28:48 CET 2006 - stark@suse.de
- applied set of security patches (#148876)
-------------------------------------------------------------------
Tue Feb 7 20:09:32 CET 2006 - stark@suse.de
- fixed disabling of Pango (#148788)
-------------------------------------------------------------------
Thu Feb 2 21:50:18 CET 2006 - stark@suse.de
- defined gssapi lib explicitely (#147670)
-------------------------------------------------------------------
Wed Feb 1 17:34:34 CET 2006 - stark@suse.de
- removed additional CA certs from builtin NSS
- make it possible to choose $HOME as download directory
(#144894, bmo #300856)
- cleaned up BuildRequires
-------------------------------------------------------------------
Wed Jan 25 21:33:47 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Mon Jan 23 08:39:32 CET 2006 - stark@suse.de
- disable Pango if MOZ_ENABLE_PANGO is not set
and no typical language which needs Pango is used (#143428)
- preload libaoss for plugin sound (#117079)
- fix to ignore X composite extension (#135373)
-------------------------------------------------------------------
Wed Jan 18 09:38:18 CET 2006 - stark@suse.de
- added default (font) settings
- tweak useragent
- fixed DumpStackToFile() for glibc 2.4
-------------------------------------------------------------------
Thu Jan 12 10:35:03 CET 2006 - stark@suse.de
- update to 1.5 (20060111)
- added sytem extensions patch
- added XUL filechooser patch (MOZ_XUL_PICKER)
- update enigmail to 0.94.0
- use -fstack-protector where available
- use system NSS since CODE10
-------------------------------------------------------------------
Wed Dec 28 08:35:38 CET 2005 - stark@suse.de
- update to 1.5rc2 (20051227)
-------------------------------------------------------------------
Sun Dec 11 08:16:01 CET 2005 - stark@suse.de
- update to 1.5 (20051211)
- update enigmail to 0.93.2
-------------------------------------------------------------------
Tue Nov 29 09:53:05 CET 2005 - stark@suse.de
- update enigmail to 0.93.1
- added patch for GTK2 handling (#134831)
-------------------------------------------------------------------
Fri Nov 25 10:29:26 CET 2005 - stark@suse.de
- update to 1.5 (20051124)
-------------------------------------------------------------------
Fri Oct 28 06:47:11 CEST 2005 - stark@suse.de
- update to latest 1.5 snapshot (20051027)
- added patch to be able to reply to and forward rfc822 messages
(bmo #204350)
- again don't provide and require NSS stuff
- removed disable-gconf patch (no registration needed in build
process anymore)
- added mailredirect extension
- removed update functionality
-------------------------------------------------------------------
Mon Oct 10 21:50:36 CEST 2005 - stark@suse.de
- update to 1.5b2 (20051008)
- preinstall Enigmail (version 0.93.0) as global extension
- add all supported locales and use if installed
-------------------------------------------------------------------
Tue Oct 4 09:32:11 CEST 2005 - stark@suse.de
- update to 1.5b2 (20051003) (RPM version 1.4.1)
- prerequire NSPR
- prepared translations subpackage
- fixed filelist
- fixed build with new gcc
-------------------------------------------------------------------
Wed Sep 21 14:32:28 CEST 2005 - stark@suse.de
- update to 1.5b1 (20050920)
- added spellchecker integration with myspell (add-plugins.sh)
- removed aviary-install-global patch (not needed anymore, with
new EM)
- enabled pango font rendering (through cairo hopefully)
- fixed GNOME gconf registration (#117851)
-------------------------------------------------------------------
Sat Aug 20 20:33:10 CEST 2005 - stark@suse.de
- workaround for linking with pangoxft and pangox
(broken by gtk 2.8 update) (#105764)
-------------------------------------------------------------------
Thu Aug 18 08:48:17 CEST 2005 - stark@suse.de
- fixed Gdk-WARNING at startup (gtk.patch)
- fixed regression in profile locking change (bmo #303633)
- fixed crash with gtk 2.7 (bmo #300226, bnc #104586)
-------------------------------------------------------------------
Wed Aug 3 07:23:50 CEST 2005 - stark@suse.de
- fixed profile locking (bmo #151188)
-------------------------------------------------------------------
Fri Jul 29 07:06:57 CEST 2005 - stark@suse.de
- don't require and provide NSS libs (#98002)
-------------------------------------------------------------------
Fri Jul 22 11:00:05 CEST 2005 - stark@suse.de
- fixed printing patch
-------------------------------------------------------------------
Tue Jul 19 10:45:22 CEST 2005 - stark@suse.de
- added NSPR to PreReq
- disable stripping in specfile
-------------------------------------------------------------------
Fri Jul 15 07:01:45 CEST 2005 - stark@suse.de
- update to 1.0.6 which restores API compatibility
- fixed width calculation in Postscript module (bmo #290292)
-------------------------------------------------------------------
Thu Jul 14 12:29:41 CEST 2005 - stark@suse.de
- fixed filelist to include icon-file and startscript again
-------------------------------------------------------------------
Tue Jul 12 06:28:21 CEST 2005 - stark@suse.de
- fixed remote usage behaviour in start script (bnc #41903)
- update to 1.0.5 security release
- fixed quoting patch
- moved desktop file to a Gnome independent location
- don't strip explicitely
- use RPM_OPT_FLAGS for NSS component
- fixed implicit declarations and uninitialized used variables
-------------------------------------------------------------------
Thu Apr 28 10:45:51 CEST 2005 - stark@suse.de
- updated to current 1.0 branch version
- use static NSPR from other location
-------------------------------------------------------------------
Sat Apr 23 23:13:52 CEST 2005 - stark@suse.de
- activate usage of system NSPR for distributions after 9.3
- add patch to be able to use systen NSPR at all
- extended desktop file
-------------------------------------------------------------------
Fri Apr 22 12:48:13 CEST 2005 - ro@suse.de
- apply mozilla-gcc4.patch
-------------------------------------------------------------------
Wed Mar 23 08:28:57 CET 2005 - stark@suse.de
- update to 1.0.2
- use system NSPR on SUSE releases after 9.3
- made startscript PIS aware
- set g-application-name correctly (bmo #281979)
-------------------------------------------------------------------
Mon Mar 7 21:27:33 CET 2005 - stark@suse.de
- don't use gconfd in registration phase (#66381)
-------------------------------------------------------------------
Fri Feb 25 18:03:31 CET 2005 - stark@suse.de
- update to version 1.0.1
-------------------------------------------------------------------
Tue Feb 22 21:59:53 CET 2005 - stark@suse.de
- added patch to create Postscript level 2 (instead of 3)
(special thanks to Jungshik Shin)
- disabled freetype explicitly to be able to use the above patch
(freetype wasn't used anymore since some time anyway)
-------------------------------------------------------------------
Wed Feb 2 14:02:34 CET 2005 - stark@suse.de
- added a JS crasher fix (bmc #268535)
-------------------------------------------------------------------
Sat Jan 22 13:17:37 CET 2005 - stark@suse.de
- added some backported bugfixes
-------------------------------------------------------------------
Tue Dec 7 10:26:15 CET 2004 - stark@suse.de
- update to 1.0
- fixed extra lines in replies (bmo #144998)
- fixed build on s390/s390x
-------------------------------------------------------------------
Wed Nov 24 07:16:17 CET 2004 - stark@suse.de
- update to 20041123 snapshot
- inherit downloadFolder patch from Firefox
-------------------------------------------------------------------
Fri Nov 12 10:58:46 CET 2004 - stark@suse.de
- fixed chrome filelist
-------------------------------------------------------------------
Thu Nov 4 08:12:51 CET 2004 - stark@suse.de
- update to 0.9
- sync patch-set with firefox base
- fixed neededforbuild to get GNOME functionalities
-------------------------------------------------------------------
Fri Sep 17 10:30:36 CEST 2004 - stark@suse.de
- added some missing fixes for official release
- synced add-plugins.sh
-------------------------------------------------------------------
Sat Sep 11 13:47:50 CEST 2004 - stark@suse.de
- update to official 0.8 version (20040911)
- fixed enigmail config
-------------------------------------------------------------------
Mon Sep 6 08:58:08 CEST 2004 - stark@suse.de
- fixed profile directory
-------------------------------------------------------------------
Fri Sep 3 21:50:19 CEST 2004 - stark@suse.de
- update to thunderbird 0.8 (20040903)
- update enigmail to 0.86.0 and ipc to 1.0.8 (deactivated)
-------------------------------------------------------------------
Tue Aug 24 08:09:42 CEST 2004 - stark@suse.de
- update to thunderbird 0.7.3
- update enigmail to 0.85.0 and ipc to 1.0.7
-------------------------------------------------------------------
Tue Jun 29 11:31:39 CEST 2004 - stark@suse.de
- update to thunderbird 0.7.1
- update enigmail to 0.84.1
-------------------------------------------------------------------
Wed May 12 18:16:28 CEST 2004 - ro@suse.de
- add some missing return values
-------------------------------------------------------------------
Mon May 3 13:16:26 CEST 2004 - stark@suse.de
- update to Thunderbird 0.6 (based on 1.7rc1)
- use official branding for release builds
- added desktop-icon (#39139)
-------------------------------------------------------------------
Fri Apr 2 10:32:00 CEST 2004 - stark@suse.de
- removing relocation of TEMP directory (#34391)
-------------------------------------------------------------------
Fri Mar 26 18:09:27 CET 2004 - uli@suse.de
- fixed hang during build on s390* (bug #35440)
-------------------------------------------------------------------
Sun Mar 7 23:19:54 CET 2004 - ro@suse.de
- match function declaration in enigmail mimedummy.cpp
-------------------------------------------------------------------
Fri Mar 5 07:00:23 CET 2004 - stark@suse.de
- more fixes for #35179
- added firefox as default handler for its protocols
- update enigmail to 0.83.4
-------------------------------------------------------------------
Wed Mar 3 06:52:35 CET 2004 - stark@suse.de
- removed unused patches for GTK2 build
-------------------------------------------------------------------
Sun Feb 29 14:35:02 CET 2004 - stark@suse.de
- improved start-script to interact with firefox and mozilla
(#35179)
-------------------------------------------------------------------
Fri Feb 27 06:50:16 CET 2004 - stark@suse.de
- update to 0.5
- spec-file cleanup
-------------------------------------------------------------------
Wed Oct 15 17:08:01 CEST 2003 - stark@suse.de
- update to 0.3 (sync with mozilla 1.5)
-------------------------------------------------------------------
Tue Jul 15 09:18:45 CEST 2003 - stark@suse.de
- initial package (snapshot 20030714)

View File

@ -0,0 +1,8 @@
[Desktop Entry]
Name=Thunderbird
GenericName=Mail/News Client
Comment=Mail/News Client
Exec=thunderbird
Icon=thunderbird
Terminal=false
Type=Application

808
MozillaThunderbird.spec Normal file
View File

@ -0,0 +1,808 @@
#
# spec file for package MozillaThunderbird (Version 1.5.0.8)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: MozillaThunderbird
BuildRequires: gcc-c++ libgnomeui-devel libidl-devel mozilla-nss-devel orbit-devel update-desktop-files zip
License: GNU General Public License (GPL), GNU Library General Public License v. 2.0 and 2.1 (LGPL)
Version: 1.5.0.8
Release: 1
Summary: The Stand-Alone Mozilla Mail Component
URL: http://www.mozilla.org/products/thunderbird/
Group: Productivity/Networking/Email/Clients
Source: thunderbird-%{version}-source.tar.bz2
Source1: MozillaThunderbird.desktop
Source2: add-plugins.sh.in
Source3: mozilla.sh.in
Source4: l10n.tar.bz2
Source5: mailredirect-0.7.4.xpi
Source6: suse-default-prefs.js
Source9: enigmail-0.94.1.tar.gz
Source11: enigmail.manifest
Patch1: pango-cairo.patch
Patch2: thunderbird-appname.patch
Patch3: visibility.patch
Patch4: locale.patch
Patch5: abuild.patch
Patch6: nspr-prdtoa.patch
Patch7: enig-shared.patch
Patch8: digest-mail.patch
Patch9: thunderbird-no-update.patch
Patch10: mips-buildfix.diff
Patch11: lightning.patch
Patch12: misc.dif
Patch13: nss-opt.patch
Patch14: html-compose.patch
Patch15: system-extensions.patch
Patch16: xul-picker.patch
Patch17: remote.patch
Patch18: system-nss.patch
Patch19: system-nspr.patch
Patch20: file-saver.patch
Patch21: ppc64.patch
Patch22: cjk-postscript-fonts.dif
Patch23: home-download.patch
Patch24: multi-replyto.patch
Patch25: postscript.patch
Patch26: cups-paper.patch
Patch27: print-properties.patch
Patch28: replytolist.patch
Patch29: list-replyto-clobber.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: libstdc++ fileutils textutils /bin/sh
%if %suse_version > 1000
Suggests: %{name}-translations
%endif
%define has_system_cairo 0
%define has_system_nspr 0
%define has_system_nss 0
%define pango 0
%if %suse_version > 930 || %is_plus
%define has_system_cairo 1
%define has_system_nspr 1
%endif
%if %suse_version > 1000 || %is_plus
%define has_system_nss 1
%endif
%if %is_plus || %suse_version >= 930
%define pango 1
%endif
%if %has_system_nspr
Requires: mozilla-nspr >= %( echo `rpm -q --queryformat '%{VERSION}' mozilla-nspr`)
%endif
%if %has_system_nss
Requires: mozilla-nss >= %( echo `rpm -q --queryformat '%{VERSION}' mozilla-nss`)
%endif
%define _unpackaged_files_terminate_build 0
%define releasedate 2006091100
%define progname thunderbird
%define progdir %{_prefix}/%_lib/thunderbird
%define my_provides /tmp/my-provides
%define my_requires /tmp/my-requires
%if %suse_version > 920
%define libgssapi libgssapi_krb5.so.2
%else
%define libgssapi libgssapi.so.1
%endif
### build options
%define milestone 1
%define build_enigmail 1
%define localize 1
### build options end
%description
Mozilla Thunderbird is a redesign of the Mozilla Mail component. It is
written using the XUL user interface language and designed to be
cross-platform. It is a stand-alone application instead of part of the
Mozilla application suite.
Authors:
--------
Mozilla Foundation <drivers@mozilla.org>
%package translations
Summary: Translations of MozillaThunderbird
Group: Productivity/Networking/Email/Clients
PreReq: %{name} = %{version}
%description translations
This package contains several optional languages for the user interface
of MozillaThunderbird.
Authors:
--------
Mozilla Foundation <drivers@mozilla.org>
%prep
%if %build_enigmail
%setup -n mozilla -q -b 4 -b 9
cd $RPM_BUILD_DIR
%patch7
%else
%setup -n mozilla -q -b 4
%endif
cd $RPM_BUILD_DIR/mozilla
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch8
%patch9
%patch10
#%patch11
%patch12
%patch13
%patch14
%patch15
%patch16
#%patch17 # temporary disabled
%if %has_system_nss
%patch18
%endif
%if %has_system_nspr
%patch19
%endif
%if %suse_version >= 1000
%patch20
%endif
%patch21 -p1
%patch22
%patch23
%patch24
%patch25
%patch26
%patch27
%patch28
%patch29
%build
export MOZ_BUILD_DATE=%{releasedate}
export MOZILLA_OFFICIAL=1
export BUILD_OFFICIAL=1
export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing"
%if %suse_version > 1000
export CFLAGS="$CFLAGS -fstack-protector"
%endif
export CXXFLAGS="$CFLAGS"
export MOZCONFIG=$RPM_BUILD_DIR/mozconfig
cat << EOF > $MOZCONFIG
mk_add_options MOZILLA_OFFICIAL=1
mk_add_options BUILD_OFFICIAL=1
mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs}
. \$topsrcdir/mail/config/mozconfig
ac_add_options --prefix=%{_prefix}
ac_add_options --libdir=%{_libdir}
ac_add_options --sysconfdir=%{_sysconfdir}
ac_add_options --mandir=%{_mandir}
ac_add_options --includedir=%{_includedir}
ac_add_options --enable-optimize="$CFLAGS"
ac_add_options --with-system-jpeg
ac_add_options --with-system-png
ac_add_options --with-system-mng
ac_add_options --with-system-zlib
#ac_add_options --enable-extensions=default,lightning
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --enable-xft
%if %suse_version > 920
ac_add_options --enable-pango
%endif
ac_add_options --disable-freetype2
ac_add_options --disable-installer
ac_add_options --disable-plugins
ac_add_options --enable-static
ac_add_options --disable-shared
EOF
%if %has_system_nspr
cat << EOF >> $MOZCONFIG
ac_add_options --with-system-nspr
EOF
%endif
%if %has_system_nss
cat << EOF >> $MOZCONFIG
ac_add_options --with-system-nss
EOF
%endif
%if %has_system_cairo
cat << EOF >> $MOZCONFIG
ac_add_options --enable-system-cairo
EOF
%endif
%if %milestone
cat << EOF >> $MOZCONFIG
ac_add_options --enable-official-branding
EOF
%endif
make -f client.mk build
#
### enigmail build
%if %build_enigmail
mv $RPM_BUILD_DIR/enigmail $RPM_BUILD_DIR/mozilla/mailnews/extensions/
(cd $RPM_BUILD_DIR/mozilla/mailnews/extensions/enigmail; ./makemake -r; make)
%endif
%install
make -C mail/installer STRIP=/bin/true
# copy tree into RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{progdir}
cp -rf $RPM_BUILD_DIR/mozilla/dist/thunderbird/* $RPM_BUILD_ROOT%{progdir}
# build additional locales
%if %localize
echo %defattr\(-,root,root\) > %{_tmppath}/translations.list
for locale in $(cat mail/locales/all-locales); do
make -C mail/locales libs-$locale
cp dist/xpi-stage/locale-$locale/chrome/$locale.jar \
$RPM_BUILD_ROOT%{progdir}/chrome
cp dist/xpi-stage/locale-$locale/chrome/$locale.manifest \
$RPM_BUILD_ROOT%{progdir}/chrome
echo %{progdir}/chrome/$locale.jar >> %{_tmppath}/translations.list
echo %{progdir}/chrome/$locale.manifest >> %{_tmppath}/translations.list
done
%endif
# overwrite the mozilla start-script and link it to /usr/bin
mkdir --parents $RPM_BUILD_ROOT%{_bindir}/
sed "s:%%PREFIX:%{_prefix}:g
s:%%PROGDIR:%{progdir}:g
s:%%APPNAME:%{progname}:g
s:%%PROFILE:.thunderbird:g" \
%{SOURCE3} > $RPM_BUILD_ROOT%{progdir}/%{progname}.sh
chmod 755 $RPM_BUILD_ROOT%{progdir}/%{progname}.sh
ln -sf ../..%{progdir}/%{progname}.sh $RPM_BUILD_ROOT/%{_bindir}/%{progname}
# freedesktop definition
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
install -m 644 %{SOURCE1} \
$RPM_BUILD_ROOT%{_datadir}/applications
# install add-plugins.sh
sed "s:%%PROGDIR:%{progdir}:g
s:%%APPNAME:%{progname}:g" \
%{SOURCE2} > $RPM_BUILD_ROOT%{progdir}/add-plugins.sh
chmod 755 $RPM_BUILD_ROOT%{progdir}/add-plugins.sh
# apply SUSE defaults
sed -e 's,RPM_VERSION,%{version}-%{release},g
s,GSSAPI,%{libgssapi},g' \
%{SOURCE6} > suse-default-prefs
cp suse-default-prefs $RPM_BUILD_ROOT/%{progdir}/defaults/pref/novell.js
rm suse-default-prefs
# use correct locale for useragent
cat > $RPM_BUILD_ROOT%{progdir}/defaults/pref/all-l10n.js << EOF
pref("general.useragent.locale", "chrome://global/locale/intl.properties");
EOF
##########
# ADDONS
#
# install enigmail in extension dir
%if %build_enigmail
_enig_dir=$RPM_BUILD_ROOT%{progdir}/extensions/\{847b3a00-7ab1-11d4-8f02-006008948af5\}
mkdir -p $_enig_dir/chrome/
mkdir -p $_enig_dir/components/
mkdir -p $_enig_dir/defaults/preferences/
mv -f $RPM_BUILD_ROOT%{progdir}/chrome/enigmail.jar $_enig_dir/chrome/
mv -f $RPM_BUILD_ROOT%{progdir}/chrome/enigmail-skin-tbird.jar $_enig_dir/chrome/
mv -f $RPM_BUILD_ROOT%{progdir}/components/enig* $_enig_dir/components/
mv -f $RPM_BUILD_ROOT%{progdir}/components/libenigmime.so $_enig_dir/components/
mv -f $RPM_BUILD_ROOT%{progdir}/components/ipc.xpt $_enig_dir/components/
mv -f $RPM_BUILD_ROOT%{progdir}/defaults/preferences/enigmail.js $_enig_dir/defaults/preferences/
cp -f $RPM_BUILD_DIR/mozilla/mailnews/extensions/enigmail/package/install.rdf $_enig_dir/
rm -rf $RPM_BUILD_ROOT%{progdir}/defaults/preferences/
rm -rf $RPM_BUILD_ROOT%{progdir}/chrome/enigmail-en-US.jar
rm -rf $RPM_BUILD_ROOT%{progdir}/chrome/enigmail-skin.jar
rm -rf $RPM_BUILD_ROOT%{progdir}/chrome/enigmime.jar
rm -rf $RPM_BUILD_ROOT%{progdir}/components/enig*
rm -rf $RPM_BUILD_ROOT%{progdir}/components/libenigmime.so
rm -rf $RPM_BUILD_ROOT%{progdir}/components/ipc.xpt
cp -f %{SOURCE11} $_enig_dir/chrome.manifest
%endif
#
# install mailredirect
_redir_dir=$RPM_BUILD_ROOT%{progdir}/extensions/\{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5\}
mkdir $_redir_dir
unzip %{SOURCE5} -d $_redir_dir
#
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps/
cp -f $RPM_BUILD_ROOT%{progdir}/icons/mozicon50.xpm $RPM_BUILD_ROOT%{_datadir}/pixmaps/thunderbird.xpm
%if %suse_version > 820
%suse_update_desktop_file %{name} Application Network Email GTK
%endif
%if %has_system_nspr && !%has_system_nss
# modify provides and requires lists
cat << EOF > %{my_provides}
grep -vE "libnss3.so|libnssckbi.so|libsmime3.so|libsoftokn3.so|libssl3.so" | %{__find_provides}
EOF
chmod 755 %{my_provides}
%define __find_provides %{my_provides}
cat << EOF > %{my_requires}
grep -vE "libnss3.so|libnssckbi.so|libsmime3.so|libsoftokn3.so|libssl3.so|thunderbird-bin" | %{__find_requires}
EOF
chmod 755 %{my_requires}
%define __find_requires %{my_requires}
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if %has_system_nspr && !%has_system_nss
rm -f %{my_provides}
rm -f %{my_requires}
%endif
%triggerin -- myspell-dictionary
%progdir/add-plugins.sh > /dev/null 2>&1
exit 0
%triggerpostun -- myspell-dictionary
%progdir/add-plugins.sh > /dev/null 2>&1
exit 0
%post
%progdir/add-plugins.sh > /dev/null 2>&1
exit 0
%preun
if [ "$1" = "0" ]; then # deinstallation
rm -f %{progdir}/components/myspell/*
fi
exit 0
%files
%defattr(-,root,root)
%attr(755,root,root) %{progdir}/%{progname}.sh
%attr(755,root,root) %{progdir}/add-plugins.sh
%dir %{progdir}
%{progdir}/res/
%{progdir}/icons/
# NSPR
%if ! %has_system_nspr
%{progdir}/libnspr4.so
%{progdir}/libplc4.so
%{progdir}/libplds4.so
%endif
# NSS
%if ! %has_system_nss
%{progdir}/libnss3.so
%{progdir}/libnssckbi.so
%{progdir}/libsmime3.so
%{progdir}/libsoftokn3.chk
%{progdir}/libsoftokn3.so
%{progdir}/libssl3.so
%endif
#
%{progdir}/LICENSE.txt
%{progdir}/README.txt
%{progdir}/libldap50.so
%{progdir}/libmozjs.so
%{progdir}/libprldap50.so
%{progdir}/libxpcom_core.so
%{progdir}/libxpcom_compat.so
%{progdir}/libxpcom.so
%{progdir}/libxpistub.so
%{progdir}/mozilla-xremote-client
%{progdir}/run-mozilla.sh
%{progdir}/thunderbird
%{progdir}/thunderbird-bin
%{progdir}/updater
%{progdir}/updater.ini
%{progdir}/xpicleanup
%dir %{progdir}/components
%{progdir}/components/accessibility-atk.xpt
%{progdir}/components/accessibility.xpt
%{progdir}/components/addrbook.xpt
%{progdir}/components/alerts.xpt
%{progdir}/components/appshell.xpt
%{progdir}/components/appstartup.xpt
%{progdir}/components/autocomplete.xpt
%{progdir}/components/autoconfig.xpt
%{progdir}/components/bookmarks.xpt
%{progdir}/components/caps.xpt
%{progdir}/components/chardet.xpt
%{progdir}/components/chrome.xpt
%{progdir}/components/commandhandler.xpt
%{progdir}/components/commandlines.xpt
%{progdir}/components/composer.xpt
%{progdir}/components/content_base.xpt
%{progdir}/components/content_htmldoc.xpt
%{progdir}/components/content_html.xpt
%{progdir}/components/content_xmldoc.xpt
%{progdir}/components/content_xslt.xpt
%{progdir}/components/content_xtf.xpt
%{progdir}/components/docshell.xpt
%{progdir}/components/dom_base.xpt
%{progdir}/components/dom_canvas.xpt
%{progdir}/components/dom_core.xpt
%{progdir}/components/dom_css.xpt
%{progdir}/components/dom_events.xpt
%{progdir}/components/dom_html.xpt
%{progdir}/components/dom_loadsave.xpt
%{progdir}/components/dom_range.xpt
%{progdir}/components/dom_stylesheets.xpt
%{progdir}/components/dom_traversal.xpt
%{progdir}/components/dom_views.xpt
%{progdir}/components/dom_xbl.xpt
%{progdir}/components/dom_xpath.xpt
%{progdir}/components/dom.xpt
%{progdir}/components/dom_xul.xpt
%{progdir}/components/downloadmanager.xpt
%{progdir}/components/downloads.xpt
%{progdir}/components/editor.xpt
%{progdir}/components/embed_base.xpt
%{progdir}/components/extensions.xpt
%{progdir}/components/exthandler.xpt
%{progdir}/components/filepicker.xpt
%{progdir}/components/find.xpt
%{progdir}/components/gfx.xpt
%{progdir}/components/history.xpt
%{progdir}/components/htmlparser.xpt
%{progdir}/components/imgicon.xpt
%{progdir}/components/imglib2.xpt
%{progdir}/components/impComm4xMail.xpt
%{progdir}/components/import.xpt
%{progdir}/components/intl.xpt
%{progdir}/components/jar.xpt
%{progdir}/components/jsconsole.xpt
%{progdir}/components/jsconsole-clhandler.js
%{progdir}/components/jsdservice.xpt
%{progdir}/components/layout_base.xpt
%{progdir}/components/layout_printing.xpt
%{progdir}/components/layout_xul_tree.xpt
%{progdir}/components/layout_xul.xpt
%{progdir}/components/libimgicon.so
%{progdir}/components/libjsd.so
%{progdir}/components/libmozgnome.so
%{progdir}/components/libmyspell.so
%{progdir}/components/libspellchecker.so
%{progdir}/components/libxpinstall.so
%{progdir}/components/locale.xpt
%{progdir}/components/lwbrk.xpt
%{progdir}/components/mailnews.xpt
%{progdir}/components/mailprofilemigration.xpt
%{progdir}/components/mailview.xpt
%{progdir}/components/mdn-service.js
%{progdir}/components/mimetype.xpt
%{progdir}/components/mime.xpt
%{progdir}/components/mozbrwsr.xpt
%{progdir}/components/mozfind.xpt
%{progdir}/components/mozgnome.xpt
%{progdir}/components/mozldap.xpt
%{progdir}/components/msgbase.xpt
%{progdir}/components/msgcompose.xpt
%{progdir}/components/msgdb.xpt
%{progdir}/components/msgimap.xpt
%{progdir}/components/msglocal.xpt
%{progdir}/components/msgnews.xpt
%{progdir}/components/msgsearch.xpt
%{progdir}/components/msgsmime.xpt
%{progdir}/components/myspell/
%{progdir}/components/necko_about.xpt
%{progdir}/components/necko_cache.xpt
%{progdir}/components/necko_cookie.xpt
%{progdir}/components/necko_data.xpt
%{progdir}/components/necko_dns.xpt
%{progdir}/components/necko_file.xpt
%{progdir}/components/necko_ftp.xpt
%{progdir}/components/necko_http.xpt
%{progdir}/components/necko_res.xpt
%{progdir}/components/necko_socket.xpt
%{progdir}/components/necko_strconv.xpt
%{progdir}/components/necko_viewsource.xpt
%{progdir}/components/necko.xpt
%{progdir}/components/newsblog.js
%{progdir}/components/nsAbLDAPAttributeMap.js
%{progdir}/components/nsCloseAllWindows.js
%{progdir}/components/nsComposerCmdLineHandler.js
%{progdir}/components/nsDefaultCLH.js
%{progdir}/components/nsDownloadProgressListener.js
%{progdir}/components/nsExtensionManager.js
%{progdir}/components/nsFilePicker.js
%{progdir}/components/nsHelperAppDlg.js
%{progdir}/components/nsInterfaceInfoToIDL.js
%{progdir}/components/nsLDAPPrefsService.js
%{progdir}/components/nsMailDefaultHandler.js
%{progdir}/components/nsUpdateService.js
%{progdir}/components/nsProgressDialog.js
%{progdir}/components/nsProxyAutoConfig.js
%{progdir}/components/offlineStartup.js
%{progdir}/components/pipboot.xpt
%{progdir}/components/pipnss.xpt
%{progdir}/components/pippki.xpt
%{progdir}/components/pref.xpt
%{progdir}/components/prefetch.xpt
%{progdir}/components/profile.xpt
%{progdir}/components/progressDlg.xpt
%{progdir}/components/proxyObjInst.xpt
%{progdir}/components/rdf.xpt
%{progdir}/components/shistory.xpt
%{progdir}/components/sidebar.xpt
%{progdir}/components/signonviewer.xpt
%{progdir}/components/smime-service.js
%{progdir}/components/spellchecker.xpt
%{progdir}/components/toolkitprofile.xpt
%{progdir}/components/toolkitremote.xpt
%{progdir}/components/txmgr.xpt
%{progdir}/components/txtsvc.xpt
%{progdir}/components/uconv.xpt
%{progdir}/components/unicharutil.xpt
%{progdir}/components/update.xpt
%{progdir}/components/uriloader.xpt
%{progdir}/components/wallet.xpt
%{progdir}/components/walleteditor.xpt
%{progdir}/components/walletpreview.xpt
%{progdir}/components/webBrowser_core.xpt
%{progdir}/components/webbrowserpersist.xpt
%{progdir}/components/webshell_idls.xpt
%{progdir}/components/websrvcs.xpt
%{progdir}/components/widget.xpt
%{progdir}/components/windowds.xpt
%{progdir}/components/windowwatcher.xpt
%{progdir}/components/xmlextras.xpt
%{progdir}/components/xpcom_base.xpt
%{progdir}/components/xpcom_components.xpt
%{progdir}/components/xpcom_ds.xpt
%{progdir}/components/xpcom_io.xpt
%{progdir}/components/xpcom_obsolete.xpt
%{progdir}/components/xpcom_threads.xpt
%{progdir}/components/xpcom_xpti.xpt
%{progdir}/components/xpconnect.xpt
%{progdir}/components/xpinstall.xpt
%{progdir}/components/xulapp.xpt
%{progdir}/components/xuldoc.xpt
%{progdir}/components/xultmpl.xpt
%dir %{progdir}/chrome/
%{progdir}/chrome/classic.*
%{progdir}/chrome/comm.*
%{progdir}/chrome/en-US.*
%{progdir}/chrome/messenger.*
%{progdir}/chrome/newsblog.*
%{progdir}/chrome/offline.*
%{progdir}/chrome/pippki.*
%{progdir}/chrome/toolkit.*
%{progdir}/chrome/US.jar
%{progdir}/chrome/icons/
%{progdir}/defaults/
%{progdir}/greprefs/
%{progdir}/extensions/
%{progdir}/init.d/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/thunderbird.xpm
%{_bindir}/%{progname}
%if %localize
%files translations -f %{_tmppath}/translations.list
%defattr(-,root,root)
%endif
%changelog -n MozillaThunderbird
* Thu Nov 09 2006 - jhargadon@suse.de
- security update to version 1.5.0.8
* Tue Sep 12 2006 - stark@suse.de
- security update to version 1.5.0.7
* Mon Aug 14 2006 - stark@suse.de
- update enigmail to 0.94.1
* Added support for signing attachments with inline-PGP
- update mailredirect to 0.7.4
- added backend patch to allow replies to list with
ReplyToListThunderbirdExtension (#199125, bmo #45715)
- added mailnews.clobber_list_reply pref which switches
"Reply All" to "Reply List" functionality if set
* Thu Jul 27 2006 - stark@suse.de
- security update to version 1.5.0.5 (#195043)
- fixed overwrite confirmation for GTK filesaver (#179531)
* Wed Jun 07 2006 - stark@suse.de
- fixed up BuildRequires
* Fri Jun 02 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Jun 02 2006 - stark@suse.de
- update to security/stability release 1.5.0.4 (#179011)
(http://www.mozilla.org/projects/security/known-vulnerabilities.html#Thunderbird)
* Mon May 15 2006 - stark@suse.de
- update to version 1.5.0.2
- update mailredirect to 0.7.3
- save printer settings properly (#174082, bmo #324072)
- improved postscript output (bmo #334485)
- changed defaults for printer properties (#6534)
- get available paper sizes from CUPS (#65482)
* Sat Mar 18 2006 - stark@suse.de
- translations package is suggested now by main package
- yet another set of upstream fixes (#148876)
* Sun Mar 12 2006 - stark@suse.de
- added Khmer (km-*) to pango locales (#157397)
- yet another set of upstream fixes (#148876)
* Sat Mar 04 2006 - stark@suse.de
- latest security fixes from upstream (#148876)
- show multiple Reply-To addresses (bmo #106189)
* Fri Feb 24 2006 - stark@suse.de
- added GTK category to desktop-file
- dumpstack.patch is in upstream patches now
- get some more patches (#148876)
* Tue Feb 14 2006 - stark@suse.de
- applied set of security patches (#148876)
* Tue Feb 07 2006 - stark@suse.de
- fixed disabling of Pango (#148788)
* Thu Feb 02 2006 - stark@suse.de
- defined gssapi lib explicitely (#147670)
* Wed Feb 01 2006 - stark@suse.de
- removed additional CA certs from builtin NSS
- make it possible to choose $HOME as download directory
(#144894, bmo #300856)
- cleaned up BuildRequires
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 23 2006 - stark@suse.de
- disable Pango if MOZ_ENABLE_PANGO is not set
and no typical language which needs Pango is used (#143428)
- preload libaoss for plugin sound (#117079)
- fix to ignore X composite extension (#135373)
* Wed Jan 18 2006 - stark@suse.de
- added default (font) settings
- tweak useragent
- fixed DumpStackToFile() for glibc 2.4
* Thu Jan 12 2006 - stark@suse.de
- update to 1.5 (20060111)
- added sytem extensions patch
- added XUL filechooser patch (MOZ_XUL_PICKER)
- update enigmail to 0.94.0
- use -fstack-protector where available
- use system NSS since CODE10
* Wed Dec 28 2005 - stark@suse.de
- update to 1.5rc2 (20051227)
* Sun Dec 11 2005 - stark@suse.de
- update to 1.5 (20051211)
- update enigmail to 0.93.2
* Tue Nov 29 2005 - stark@suse.de
- update enigmail to 0.93.1
- added patch for GTK2 handling (#134831)
* Fri Nov 25 2005 - stark@suse.de
- update to 1.5 (20051124)
* Fri Oct 28 2005 - stark@suse.de
- update to latest 1.5 snapshot (20051027)
- added patch to be able to reply to and forward rfc822 messages
(bmo #204350)
- again don't provide and require NSS stuff
- removed disable-gconf patch (no registration needed in build
process anymore)
- added mailredirect extension
- removed update functionality
* Mon Oct 10 2005 - stark@suse.de
- update to 1.5b2 (20051008)
- preinstall Enigmail (version 0.93.0) as global extension
- add all supported locales and use if installed
* Tue Oct 04 2005 - stark@suse.de
- update to 1.5b2 (20051003) (RPM version 1.4.1)
- prerequire NSPR
- prepared translations subpackage
- fixed filelist
- fixed build with new gcc
* Wed Sep 21 2005 - stark@suse.de
- update to 1.5b1 (20050920)
- added spellchecker integration with myspell (add-plugins.sh)
- removed aviary-install-global patch (not needed anymore, with
new EM)
- enabled pango font rendering (through cairo hopefully)
- fixed GNOME gconf registration (#117851)
* Sat Aug 20 2005 - stark@suse.de
- workaround for linking with pangoxft and pangox
(broken by gtk 2.8 update) (#105764)
* Thu Aug 18 2005 - stark@suse.de
- fixed Gdk-WARNING at startup (gtk.patch)
- fixed regression in profile locking change (bmo #303633)
- fixed crash with gtk 2.7 (bmo #300226, bnc #104586)
* Wed Aug 03 2005 - stark@suse.de
- fixed profile locking (bmo #151188)
* Fri Jul 29 2005 - stark@suse.de
- don't require and provide NSS libs (#98002)
* Fri Jul 22 2005 - stark@suse.de
- fixed printing patch
* Tue Jul 19 2005 - stark@suse.de
- added NSPR to PreReq
- disable stripping in specfile
* Fri Jul 15 2005 - stark@suse.de
- update to 1.0.6 which restores API compatibility
- fixed width calculation in Postscript module (bmo #290292)
* Thu Jul 14 2005 - stark@suse.de
- fixed filelist to include icon-file and startscript again
* Tue Jul 12 2005 - stark@suse.de
- fixed remote usage behaviour in start script (bnc #41903)
- update to 1.0.5 security release
- fixed quoting patch
- moved desktop file to a Gnome independent location
- don't strip explicitely
- use RPM_OPT_FLAGS for NSS component
- fixed implicit declarations and uninitialized used variables
* Thu Apr 28 2005 - stark@suse.de
- updated to current 1.0 branch version
- use static NSPR from other location
* Sat Apr 23 2005 - stark@suse.de
- activate usage of system NSPR for distributions after 9.3
- add patch to be able to use systen NSPR at all
- extended desktop file
* Fri Apr 22 2005 - ro@suse.de
- apply mozilla-gcc4.patch
* Wed Mar 23 2005 - stark@suse.de
- update to 1.0.2
- use system NSPR on SUSE releases after 9.3
- made startscript PIS aware
- set g-application-name correctly (bmo #281979)
* Mon Mar 07 2005 - stark@suse.de
- don't use gconfd in registration phase (#66381)
* Fri Feb 25 2005 - stark@suse.de
- update to version 1.0.1
* Tue Feb 22 2005 - stark@suse.de
- added patch to create Postscript level 2 (instead of 3)
(special thanks to Jungshik Shin)
- disabled freetype explicitly to be able to use the above patch
(freetype wasn't used anymore since some time anyway)
* Wed Feb 02 2005 - stark@suse.de
- added a JS crasher fix (bmc #268535)
* Sat Jan 22 2005 - stark@suse.de
- added some backported bugfixes
* Tue Dec 07 2004 - stark@suse.de
- update to 1.0
- fixed extra lines in replies (bmo #144998)
- fixed build on s390/s390x
* Wed Nov 24 2004 - stark@suse.de
- update to 20041123 snapshot
- inherit downloadFolder patch from Firefox
* Fri Nov 12 2004 - stark@suse.de
- fixed chrome filelist
* Thu Nov 04 2004 - stark@suse.de
- update to 0.9
- sync patch-set with firefox base
- fixed neededforbuild to get GNOME functionalities
* Fri Sep 17 2004 - stark@suse.de
- added some missing fixes for official release
- synced add-plugins.sh
* Sat Sep 11 2004 - stark@suse.de
- update to official 0.8 version (20040911)
- fixed enigmail config
* Mon Sep 06 2004 - stark@suse.de
- fixed profile directory
* Fri Sep 03 2004 - stark@suse.de
- update to thunderbird 0.8 (20040903)
- update enigmail to 0.86.0 and ipc to 1.0.8 (deactivated)
* Tue Aug 24 2004 - stark@suse.de
- update to thunderbird 0.7.3
- update enigmail to 0.85.0 and ipc to 1.0.7
* Tue Jun 29 2004 - stark@suse.de
- update to thunderbird 0.7.1
- update enigmail to 0.84.1
* Wed May 12 2004 - ro@suse.de
- add some missing return values
* Mon May 03 2004 - stark@suse.de
- update to Thunderbird 0.6 (based on 1.7rc1)
- use official branding for release builds
- added desktop-icon (#39139)
* Fri Apr 02 2004 - stark@suse.de
- removing relocation of TEMP directory (#34391)
* Fri Mar 26 2004 - uli@suse.de
- fixed hang during build on s390* (bug #35440)
* Sun Mar 07 2004 - ro@suse.de
- match function declaration in enigmail mimedummy.cpp
* Fri Mar 05 2004 - stark@suse.de
- more fixes for #35179
- added firefox as default handler for its protocols
- update enigmail to 0.83.4
* Wed Mar 03 2004 - stark@suse.de
- removed unused patches for GTK2 build
* Sun Feb 29 2004 - stark@suse.de
- improved start-script to interact with firefox and mozilla
(#35179)
* Fri Feb 27 2004 - stark@suse.de
- update to 0.5
- spec-file cleanup
* Wed Oct 15 2003 - stark@suse.de
- update to 0.3 (sync with mozilla 1.5)
* Tue Jul 15 2003 - stark@suse.de
- initial package (snapshot 20030714)

150
abuild.patch Normal file
View File

@ -0,0 +1,150 @@
From: Wolfgang Rosenauer <stark@suse.de>
Subject: Fix compiler warnings which disturb autobuild
References:
### autobuild
... testing for serious compiler warnings
Program is using uninitialized variables. Note the difference between "is used"
and "may be used". Please investigate and fix.
Problematic file(s) and their linenumbers:
certificate.c: 541
nsUnicodeToJamoTTF.cpp: 855
nsObjectFrame.cpp: 1933
###
### autobuild
... testing for serious compiler warnings
Program returns random data in a function. Please fix.
Problematic file(s) and their linenumbers:
nsWebShell.cpp: 562
Program is using uninitialized variables. Note the difference between "is used" and "may be used".
Please investigate and fix.
Problematic file(s) and their linenumbers:
nsFrame.cpp: 3536
###
--- gfx/src/gtk/nsFontMetricsUtils.cpp.old 2005-03-24 07:27:33.000000000 +0100
+++ gfx/src/gtk/nsFontMetricsUtils.cpp 2005-03-24 07:28:26.000000000 +0100
@@ -75,6 +75,7 @@ NS_FontMetricsGetHints(void)
#ifdef MOZ_ENABLE_COREXFONTS
return nsFontMetricsGTK::GetHints();
#endif
+ return 1;
}
nsresult
@@ -95,6 +96,7 @@ NS_FontMetricsFamilyExists(nsIDeviceCont
#ifdef MOZ_ENABLE_COREXFONTS
return nsFontMetricsGTK::FamilyExists(aDevice, aName);
#endif
+ return 1;
}
#ifdef MOZ_ENABLE_XFT
Index: security/nss/lib/pki/certificate.c
===================================================================
RCS file: /cvsroot/mozilla/security/nss/lib/pki/certificate.c,v
retrieving revision 1.53
diff -u -p -6 -r1.53 certificate.c
--- security/nss/lib/pki/certificate.c 20 Jan 2005 02:25:48 -0000 1.53
+++ security/nss/lib/pki/certificate.c 7 Jun 2005 07:11:39 -0000
@@ -478,13 +478,13 @@ nssCertificate_BuildChain (
NSSTrustDomain *td,
NSSCryptoContext *cc
)
{
NSSCertificate **rvChain = NULL;
NSSUsage issuerUsage = *usage;
- nssPKIObjectCollection *collection;
+ nssPKIObjectCollection *collection = NULL;
PRUint32 rvCount = 0;
PRStatus st;
PRStatus ret = PR_SUCCESS;
if (!td)
td = NSSCertificate_GetTrustDomain(c);
Index: intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp
===================================================================
RCS file: /cvsroot/mozilla/intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp,v
retrieving revision 1.10
diff -u -p -6 -r1.10 nsUnicodeToJamoTTF.cpp
--- intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp 19 Feb 2005 07:27:54 -0000 1.10
+++ intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp 7 Jun 2005 07:21:10 -0000
@@ -842,12 +842,13 @@ PRInt16 JamoSrchReplace (const JamoNormM
// we don't need a separate range check here because the one in
// for-loop is sufficient.
for (PRInt32 i = start; i <= end - clusterLen; i++)
{
const JamoNormMap *match;
JamoNormMap key;
+ key.liga = 0;
// cluster array is made up of PRUint8's to save memory
// and we have to subtract aOffset from the input before looking it up.
key.seq[0] = aIn[i] - aOffset;
key.seq[1] = aIn[i + 1] - aOffset;
key.seq[2] = clusterLen == 3 ? (aIn[i + 2] - aOffset) : 0;
Index: layout/generic/nsObjectFrame.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/generic/nsObjectFrame.cpp,v
retrieving revision 1.505
diff -u -p -6 -r1.505 nsObjectFrame.cpp
--- layout/generic/nsObjectFrame.cpp 6 May 2005 03:14:31 -0000 1.505
+++ layout/generic/nsObjectFrame.cpp 7 Jun 2005 07:23:27 -0000
@@ -1850,12 +1850,13 @@ nsObjectFrame::Paint(nsPresContext*
// now we need to setup the correct location for printing
nsresult rv;
nsPluginWindow window;
nsPoint origin;
float t2p;
window.window = nsnull;
+ window.ws_info = nsnull;
// prepare embedded mode printing struct
nsPluginPrint npprint;
npprint.mode = nsPluginMode_Embedded;
// we need to find out if we are windowless or not
Index: docshell/base/nsWebShell.cpp
===================================================================
RCS file: /cvsroot/mozilla/docshell/base/nsWebShell.cpp,v
retrieving revision 1.656.2.1
diff -u -p -6 -r1.656.2.1 nsWebShell.cpp
--- docshell/base/nsWebShell.cpp 16 Sep 2005 19:11:52 -0000 1.656.2.1
+++ docshell/base/nsWebShell.cpp 22 Sep 2005 06:30:30 -0000
@@ -556,12 +556,13 @@ nsWebShell::OnLinkClickSync(nsIContent *
// XXX TODO Should be similar to the HTML IMG ALT attribute handling
// in NS 4.x
default:
NS_ABORT_IF_FALSE(0,"unexpected link verb");
return NS_ERROR_UNEXPECTED;
}
+ return NS_ERROR_UNEXPECTED;
}
NS_IMETHODIMP
nsWebShell::OnOverLink(nsIContent* aContent,
nsIURI* aURI,
const PRUnichar* aTargetSpec)
Index: layout/generic/nsFrame.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/generic/nsFrame.cpp,v
retrieving revision 3.574.2.4
diff -u -p -6 -r3.574.2.4 nsFrame.cpp
--- layout/generic/nsFrame.cpp 20 Sep 2005 06:32:09 -0000 3.574.2.4
+++ layout/generic/nsFrame.cpp 22 Sep 2005 06:31:42 -0000
@@ -3528,13 +3528,13 @@ nsresult
nsFrame::PeekOffsetParagraph(nsPresContext* aPresContext,
nsPeekOffsetStruct *aPos)
{
#ifdef DEBUG_paragraph
printf("Selecting paragraph\n");
#endif
- nsIFrame* blockFrame;
+ nsIFrame* blockFrame = NULL;
nsCOMPtr<nsILineIterator> iter (getter_AddRefs(GetBlockFrameAndLineIter(this, &blockFrame)));
if (!blockFrame || !iter)
return NS_ERROR_UNEXPECTED;
PRInt32 thisLine;
nsresult result = iter->FindLineContaining(this, &thisLine);

61
add-plugins.sh.in Normal file
View File

@ -0,0 +1,61 @@
#! /bin/sh
# Copyright (c) 2001 SuSE GmbH Nuernberg, Germany. All rights reserved.
# 2002-2004 SuSE Linux AG, Nuernberg, Germany
# 2005 SUSE LINUX Products GmbH, Nuernberg, Germany
#
# check if we are started as root
# only one of UID and USER must be set correctly
if test "$UID" != 0 -a "$USER" != root; then
echo "You must be root to start $0."
exit 1
fi
PREFIX="%PROGDIR"
MOZ_APP="%APPNAME"
# MySPELL
MYSPELL=/usr/share/myspell
MOZ_SPELL=$PREFIX/components/myspell
if [ -d $MOZ_SPELL ] ; then
if [ -d $MYSPELL ] ; then
for dict in $MYSPELL/??[-_]??.aff ; do
# check is it is really the file or it is a string which contain '??_??'
if ! [ -e $dict ] ; then
continue
fi
# the dict file name
dict_file=`echo ${dict##*/}`
# the dict file has a valid name
lang=`echo ${dict_file:0:2}`
country=`echo ${dict_file:3:2}`
# check for .dic file
if ! [ -r $MYSPELL/${lang}[-_]${country}.dic ] ; then
continue
fi
# create links
if [ ! -r $MOZ_SPELL/${lang}[-_]${country}.aff ] ; then
ln -sf $MYSPELL/${lang}[-_]${country}.aff \
$MOZ_SPELL/${lang}-${country}.aff
fi
if [ ! -r $MOZ_SPELL/${lang}[-_]${country}.dic ] ; then
ln -sf $MYSPELL/${lang}[-_]${country}.dic \
$MOZ_SPELL/${lang}-${country}.dic
fi
done
echo "-> added myspell dictionaries"
fi
# remove broken links
for dict in $MOZ_SPELL/*.{aff,dic} ; do
if ! [ -r $dict ] ; then
rm -f $dict
fi
done
fi

28
cjk-postscript-fonts.dif Normal file
View File

@ -0,0 +1,28 @@
--- modules/libpref/src/init/all.js.orig 2004-01-23 11:22:44.000000000 +0100
+++ modules/libpref/src/init/all.js 2004-01-23 11:24:10.000000000 +0100
@@ -1819,8 +1819,10 @@
pref("print.postscript.nativefont.ar", "");
pref("print.postscript.nativefont.el", "");
pref("print.postscript.nativefont.he", "");
-pref("print.postscript.nativefont.ja", "");
-pref("print.postscript.nativefont.ko", "");
+pref("print.postscript.nativefont.ja", "UTF-8");
+pref("print.postscript.nativefont.ja", "Ryumin-Light-UniJIS-UTF8-H");
+pref("print.postscript.nativefont.ko", "UTF-8");
+pref("print.postscript.nativefont.ko", "Baekmuk-Gulim-UniKS-UTF8-H");
pref("print.postscript.nativefont.th", "");
pref("print.postscript.nativefont.tr", "");
pref("print.postscript.nativefont.x-baltic", "");
@@ -1829,8 +1831,10 @@
pref("print.postscript.nativefont.x-unicode", "");
pref("print.postscript.nativefont.x-user-def", "");
pref("print.postscript.nativefont.x-western", "");
-pref("print.postscript.nativefont.zh-CN", "");
-pref("print.postscript.nativefont.zh-TW", "");
+pref("print.postscript.nativefont.zh-CN", "UTF-8");
+pref("print.postscript.nativefont.zh-CN", "GB-Song-Medium-UniGB-UTF8-H");
+pref("print.postscript.nativefont.zh-TW", "UTF-8");
+pref("print.postscript.nativefont.zh-TW", "B5-Song-Medium-UniCNS-UTF8-H");
pref("print.postscript.nativefont.zh-HK", "");
# XP_UNIX

998
cups-paper.patch Normal file
View File

@ -0,0 +1,998 @@
From: Wolfgang Rosenauer <stark@suse.de>, Arne John Glenstrup <panic@itu.dk>
Subject: get paper sizes from CUPS
References:
https://bugzilla.novell.com/show_bug.cgi?id=65482
https://bugzilla.mozilla.org/show_bug.cgi?id=324060
diff -urNU6 gfx/src.old/gtk/nsDeviceContextSpecG.cpp gfx/src/gtk/nsDeviceContextSpecG.cpp
--- gfx/src.old/gtk/nsDeviceContextSpecG.cpp 2004-10-24 20:34:37.000000000 +0200
+++ gfx/src/gtk/nsDeviceContextSpecG.cpp 2006-04-21 22:58:48.000000000 +0200
@@ -63,12 +63,13 @@
#include "xprintutil.h"
#endif /* USE_XPRINT */
#ifdef USE_POSTSCRIPT
#include "nsPSPrinters.h"
#include "nsPaperPS.h" /* Paper size list */
+#include "nsPaperFactoryPS.h" /* Paper size list factory */
#endif /* USE_POSTSCRIPT */
/* Ensure that the result is always equal to either PR_TRUE or PR_FALSE */
#define MAKE_PR_BOOL(val) ((val)?(PR_TRUE):(PR_FALSE))
#ifdef PR_LOGGING
@@ -1207,40 +1208,44 @@
printerFeatures.SetNumColorspaceRecords(1);
#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
#ifdef SET_PRINTER_FEATURES_VIA_PREFS
printerFeatures.SetCanChangePaperSize(PR_TRUE);
#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
- nsXPIDLCString papername;
- if (NS_SUCCEEDED(CopyPrinterCharPref(pPrefs, "postscript", printerName, "paper_size", getter_Copies(papername)))) {
- nsPaperSizePS paper;
-
- if (paper.Find(papername)) {
- DO_PR_DEBUG_LOG(("setting default paper size to '%s' (%g mm/%g mm)\n",
- paper.Name(), paper.Width_mm(), paper.Height_mm()));
- aPrintSettings->SetPaperSizeUnit(paper.IsMetric() ?
- (int)nsIPrintSettings::kPaperSizeMillimeters :
- (int)nsIPrintSettings::kPaperSizeInches);
- aPrintSettings->SetPaperWidth(paper.Width_mm());
- aPrintSettings->SetPaperHeight(paper.Height_mm());
- aPrintSettings->SetPaperName(NS_ConvertASCIItoUCS2(paper.Name()).get());
- }
- else {
- DO_PR_DEBUG_LOG(("Unknown paper size '%s' given.\n", papername.get()));
+ {
+ nsIPaperSizePS* paper;
+ nsresult rv;
+ rv = nsPaperFactoryPS::CreatePaper
+ (fullPrinterName.get(), printerName.get(), paper);
+ if (NS_FAILED(rv)) return rv;
+ paper->FindDefault();
+
+ nsXPIDLCString papername;
+ if (NS_SUCCEEDED(CopyPrinterCharPref(pPrefs, "postscript", fullPrinterName, "print_paper_name", getter_Copies(papername)))) {
+ if (!paper->Find(papername)) {
+ DO_PR_DEBUG_LOG(("Unknown paper size '%s' given.\n", papername.get()));
+ }
}
+ DO_PR_DEBUG_LOG(("setting default paper size to '%s' (%g mm/%g mm)\n",
+ paper->Name(), paper->Width_mm(), paper->Height_mm()));
+ aPrintSettings->SetPaperSizeUnit(nsIPrintSettings::kPaperSizeMillimeters);
+ aPrintSettings->SetPaperWidth(paper->Width_mm());
+ aPrintSettings->SetPaperHeight(paper->Height_mm());
+ aPrintSettings->SetPaperName(NS_ConvertASCIItoUTF16(paper->Name()).get());
#ifdef SET_PRINTER_FEATURES_VIA_PREFS
- paper.First();
+ paper->First();
int count = 0;
- while (!paper.AtEnd())
+ while (!paper->AtEnd())
{
- printerFeatures.SetPaperRecord(count++, paper.Name(),
- (int)paper.Width_mm(), (int)paper.Height_mm(), !paper.IsMetric());
- paper.Next();
+ printerFeatures.SetPaperRecord(count++, paper->Name(),
+ (int)paper->Width_mm(), (int)paper->Height_mm(), !paper->IsMetric());
+ paper->Next();
}
printerFeatures.SetNumPaperSizeRecords(count);
#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
+ delete(paper);
}
PRBool hasSpoolerCmd = (nsPSPrinterList::kTypePS ==
nsPSPrinterList::GetPrinterType(fullPrinterName));
#ifdef SET_PRINTER_FEATURES_VIA_PREFS
printerFeatures.SetSupportsSpoolerCommandChange(hasSpoolerCmd);
diff -urNU6 gfx/src.old/ps/nsPrintJobPS.cpp gfx/src/ps/nsPrintJobPS.cpp
--- gfx/src.old/ps/nsPrintJobPS.cpp 2005-05-21 17:33:09.000000000 +0200
+++ gfx/src/ps/nsPrintJobPS.cpp 2006-04-21 22:58:48.000000000 +0200
@@ -361,12 +361,16 @@
aSpec->GetPrinterName(&printerName);
NS_ENSURE_TRUE(printerName, NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND);
const char *slash = strchr(printerName, '/');
mPrinterName = slash ? slash + 1 : printerName;
mJobTitle.SetIsVoid(PR_TRUE);
+ /* Paper name */
+ const char* paperName = nsnull;
+ aSpec->GetPaperName(&paperName);
+ mPaperName = paperName;
return NS_OK;
}
nsresult
nsPrintJobCUPS::SetNumCopies(int aNumCopies)
{
@@ -442,12 +446,17 @@
if (dest != NULL) {
if (!mNumCopies.IsEmpty())
dest->num_options = (mCups.mCupsAddOption)("copies",
mNumCopies.get(),
dest->num_options,
&dest->options);
+ if (!mPaperName.IsEmpty())
+ dest->num_options = (mCups.mCupsAddOption)("media",
+ mPaperName.get(),
+ dest->num_options,
+ &dest->options);
const char *title = mJobTitle.IsVoid() ?
"Untitled Document" : mJobTitle.get();
result = (mCups.mCupsPrintFile)(printer.CStringAt(0)->get(),
GetDestination().get(), title,
dest->num_options, dest->options);
}
diff -urNU6 gfx/src.old/ps/nsPrintJobPS.h gfx/src/ps/nsPrintJobPS.h
--- gfx/src.old/ps/nsPrintJobPS.h 2005-05-21 17:33:09.000000000 +0200
+++ gfx/src/ps/nsPrintJobPS.h 2006-04-21 22:58:48.000000000 +0200
@@ -176,11 +176,12 @@
nsresult Init(nsIDeviceContextSpecPS *);
private:
nsCUPSShim mCups;
nsCString mPrinterName;
nsCString mNumCopies;
+ nsCString mPaperName;
nsCString mJobTitle; // IsVoid() if no title
};
#endif /* VMS */
#endif /* nsPrintJobPS_h__ */
diff -urNU6 gfx/src.old/psshared/Makefile.in gfx/src/psshared/Makefile.in
--- gfx/src.old/psshared/Makefile.in 2004-12-15 06:52:36.000000000 +0100
+++ gfx/src/psshared/Makefile.in 2006-04-21 22:58:48.000000000 +0200
@@ -54,19 +54,22 @@
LIBXUL_LIBRARY = 1
PACKAGE_FILE = psshared.pkg
EXPORTS = nsCUPSShim.h \
nsPaperPS.h \
+ nsIPaperPS.h \
nsPSPrinters.h\
psSharedCore.h \
+ nsPaperFactoryPS.h \
$(NULL)
CPPSRCS = nsCUPSShim.cpp \
nsPaperPS.cpp \
nsPSPrinters.cpp \
+ nsPaperFactoryPS.cpp \
$(NULL)
EXTRA_DSO_LDOPTS = \
$(MOZ_COMPONENT_LIBS) \
$(NULL)
diff -urNU6 gfx/src.old/psshared/nsCUPSShim.cpp gfx/src/psshared/nsCUPSShim.cpp
--- gfx/src.old/psshared/nsCUPSShim.cpp 2005-05-08 17:01:20.000000000 +0200
+++ gfx/src/psshared/nsCUPSShim.cpp 2006-04-21 22:58:48.000000000 +0200
@@ -42,19 +42,24 @@
#include "prlink.h"
// List of symbols to find in libcups. Must match symAddr[] defined in Init().
// Making this an array of arrays instead of pointers allows storing the
// whole thing in read-only memory.
-static const char gSymName[][sizeof("cupsPrintFile")] = {
+static const char gSymName[][sizeof("ppdMarkDefaults")] = {
{ "cupsAddOption" },
{ "cupsFreeDests" },
{ "cupsGetDest" },
{ "cupsGetDests" },
{ "cupsPrintFile" },
{ "cupsTempFd" },
+ { "cupsGetPPD" },
+ { "ppdOpenFile" },
+ { "ppdClose" },
+ { "ppdMarkDefaults" },
+ { "ppdIsMarked" },
};
static const int gSymNameCt = sizeof(gSymName) / sizeof(gSymName[0]);
PRBool
nsCUPSShim::Init()
@@ -68,12 +73,17 @@
(void **)&mCupsAddOption,
(void **)&mCupsFreeDests,
(void **)&mCupsGetDest,
(void **)&mCupsGetDests,
(void **)&mCupsPrintFile,
(void **)&mCupsTempFd,
+ (void **)&mCupsGetPPD,
+ (void **)&mPpdOpenFile,
+ (void **)&mPpdClose,
+ (void **)&mPpdMarkDefaults,
+ (void **)&mPpdIsMarked,
};
for (int i = gSymNameCt; i--; ) {
*(symAddr[i]) = PR_FindSymbol(mCupsLib, gSymName[i]);
if (! *(symAddr[i])) {
#ifdef DEBUG
diff -urNU6 gfx/src.old/psshared/nsCUPSShim.h gfx/src/psshared/nsCUPSShim.h
--- gfx/src.old/psshared/nsCUPSShim.h 2005-05-08 17:01:20.000000000 +0200
+++ gfx/src/psshared/nsCUPSShim.h 2006-04-21 22:58:48.000000000 +0200
@@ -59,12 +59,88 @@
*instance; /* Local instance name or NULL */
int is_default; /* Is this printer the default? */
int num_options; /* Number of options */
cups_option_t *options; /* Options */
} cups_dest_t;
+typedef enum /**** Colorspaces ****/
+{
+ PPD_CS_CMYK = -4, /* CMYK colorspace */
+ PPD_CS_CMY, /* CMY colorspace */
+ PPD_CS_GRAY = 1, /* Grayscale colorspace */
+ PPD_CS_RGB = 3, /* RGB colorspace */
+ PPD_CS_RGBK, /* RGBK (K = gray) colorspace */
+ PPD_CS_N /* DeviceN colorspace */
+} ppd_cs_t;
+
+typedef struct /**** Page Sizes ****/
+{
+ int marked; /* Page size selected? */
+ char name[41];
+ /* Media size option */
+ float width, /* Width of media in points */
+ length, /* Length of media in points */
+ left, /* Left printable margin in points */
+ bottom, /* Bottom printable margin in points */
+ right, /* Right printable margin in points */
+ top; /* Top printable margin in points */
+} ppd_size_t;
+
+typedef struct /**** Files ****/
+{
+ int language_level, /* Language level of device */
+ color_device, /* 1 = color device, 0 = grayscale */
+ variable_sizes, /* 1 = supports variable sizes, 0 = doesn't */
+ accurate_screens, /* 1 = supports accurate screens, 0 = not */
+ contone_only, /* 1 = continuous tone only, 0 = not */
+ landscape, /* -90 or 90 */
+ model_number, /* Device-specific model number */
+ manual_copies, /* 1 = Copies done manually, 0 = hardware */
+ throughput; /* Pages per minute */
+ ppd_cs_t colorspace; /* Default colorspace */
+ char *patches; /* Patch commands to be sent to printer */
+ int num_emulations; /* Number of emulations supported */
+ void *emulations; /* Emulations and the code to invoke them */
+ char *jcl_begin, /* Start JCL commands */
+ *jcl_ps, /* Enter PostScript interpreter */
+ *jcl_end, /* End JCL commands */
+ *lang_encoding, /* Language encoding */
+ *lang_version, /* Language version (English, Spanish, etc.) */
+ *modelname, /* Model name (general) */
+ *ttrasterizer, /* Truetype rasterizer */
+ *manufacturer, /* Manufacturer name */
+ *product, /* Product name (from PS RIP/interpreter) */
+ *nickname, /* Nickname (specific) */
+ *shortnickname; /* Short version of nickname */
+ int num_groups; /* Number of UI groups */
+ void *groups; /* UI groups */
+ int num_sizes; /* Number of page sizes */
+ ppd_size_t *sizes; /* Page sizes */
+ float custom_min[2], /* Minimum variable page size */
+ custom_max[2], /* Maximum variable page size */
+ custom_margins[4];/* Margins around page */
+ int num_consts; /* Number of UI/Non-UI constraints */
+ void *consts; /* UI/Non-UI constraints */
+ int num_fonts; /* Number of pre-loaded fonts */
+ char **fonts; /* Pre-loaded fonts */
+ int num_profiles; /* Number of sRGB color profiles */
+ void *profiles; /* sRGB color profiles */
+ int num_filters; /* Number of filters */
+ char **filters; /* Filter strings... */
+
+ /**** New in CUPS 1.1 ****/
+ int flip_duplex; /* 1 = Flip page for back sides */
+
+ /**** New in CUPS 1.1.19 ****/
+ char *protocols, /* Protocols (BCP, TBCP) string */
+ *pcfilename; /* PCFileName string */
+ int num_attrs, /* Number of attributes */
+ cur_attr; /* Current attribute */
+ void **attrs; /* Attributes */
+} ppd_file_t;
+
typedef cups_dest_t* (PR_CALLBACK *CupsGetDestType)(const char *printer,
const char *instance,
int num_dests,
cups_dest_t *dests);
typedef int (PR_CALLBACK *CupsGetDestsType)(cups_dest_t **dests);
typedef int (PR_CALLBACK *CupsFreeDestsType)(int num_dests,
@@ -77,12 +153,17 @@
typedef int (PR_CALLBACK *CupsTempFdType)(char *filename,
int length);
typedef int (PR_CALLBACK *CupsAddOptionType)(const char *name,
const char *value,
int num_options,
cups_option_t **options);
+typedef const char* (PR_CALLBACK *CupsGetPPDType) (const char* name);
+typedef ppd_file_t* (PR_CALLBACK *PPDOpenFileType) (const char* filename);
+typedef void (PR_CALLBACK *PPDCloseType) (ppd_file_t* ppd);
+typedef void (PR_CALLBACK *PPDMarkDefaultsType) (ppd_file_t* ppd);
+typedef int (PR_CALLBACK *PPDIsMarkedType) (ppd_file_t* ppd, const char* pname, const char* pname_clear);
struct PRLibrary;
class NS_PSSHARED nsCUPSShim {
public:
nsCUPSShim() : mCupsLib(nsnull) { }
@@ -110,12 +191,17 @@
CupsAddOptionType mCupsAddOption;
CupsFreeDestsType mCupsFreeDests;
CupsGetDestType mCupsGetDest;
CupsGetDestsType mCupsGetDests;
CupsPrintFileType mCupsPrintFile;
CupsTempFdType mCupsTempFd;
+ CupsGetPPDType mCupsGetPPD;
+ PPDOpenFileType mPpdOpenFile;
+ PPDCloseType mPpdClose;
+ PPDMarkDefaultsType mPpdMarkDefaults;
+ PPDIsMarkedType mPpdIsMarked;
private:
PRLibrary *mCupsLib;
};
diff -urNU6 gfx/src.old/psshared/nsIPaperPS.h gfx/src/psshared/nsIPaperPS.h
--- gfx/src.old/psshared/nsIPaperPS.h 1970-01-01 01:00:00.000000000 +0100
+++ gfx/src/psshared/nsIPaperPS.h 2006-04-21 23:14:50.000000000 +0200
@@ -0,0 +1,102 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ex: set tabstop=8 softtabstop=4 shiftwidth=4 expandtab: */
+/* ***** 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.
+ *
+ * Contributor(s):
+ * Arne John Glenstrup <panic@itu.dk>
+ *
+ * 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 _NSIPAPERPS_H_
+#define _NSIPAPERPS_H_
+
+#include "prtypes.h"
+#include "psSharedCore.h"
+
+class nsIPaperSizePS {
+ public:
+ /** ---------------------------------------------------
+ * Virtual destructor.
+ */
+ virtual ~nsIPaperSizePS();
+
+ /* Allow the paper factory to create instances */
+ friend class nsPaperFactoryPS;
+
+ /** ---------------------------------------------------
+ * @return PR_TRUE if the cursor points past the last item.
+ */
+ virtual PRBool AtEnd() = 0;
+
+ /** ---------------------------------------------------
+ * Position the cursor at the beginning of the paper size list.
+ * @return VOID
+ */
+ virtual void First() = 0;
+
+ /** ---------------------------------------------------
+ * Advance the cursor to the next item.
+ * @return VOID
+ */
+ virtual void Next() = 0;
+
+ /** ---------------------------------------------------
+ * Point the cursor to the entry with the given paper name.
+ * @return PR_TRUE if pointing to a valid entry.
+ */
+ virtual PRBool Find(const char *aName) = 0;
+
+ /** ---------------------------------------------------
+ * Point the cursor to a default entry if available.
+ * Otherwise it's equivalent to First().
+ * @return PR_TRUE if pointing to a valid entry.
+ */
+ virtual PRBool FindDefault() = 0;
+
+ /** ---------------------------------------------------
+ * @return a pointer to the name of the current paper size
+ */
+ virtual const char *Name() = 0;
+
+ /** ---------------------------------------------------
+ * @return the width of the page in millimeters
+ */
+ virtual float Width_mm() = 0;
+
+ /** ---------------------------------------------------
+ * @return the height of the page in millimeters
+ */
+ virtual float Height_mm() = 0;
+
+ /** ---------------------------------------------------
+ * @return PR_TRUE if the paper should be presented to
+ * the user in metric units.
+ */
+ virtual PRBool IsMetric() { return PR_TRUE; };
+};
+
+#endif /* _NSIPAPERPS_H_ */
diff -urNU6 gfx/src.old/psshared/nsPaperFactoryPS.cpp gfx/src/psshared/nsPaperFactoryPS.cpp
--- gfx/src.old/psshared/nsPaperFactoryPS.cpp 1970-01-01 01:00:00.000000000 +0100
+++ gfx/src/psshared/nsPaperFactoryPS.cpp 2006-04-21 23:04:01.000000000 +0200
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ex: set tabstop=8 softtabstop=4 shiftwidth=4 expandtab: */
+/* ***** 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
+ * Kenneth Herron <kherron@fastmail.us>.
+ * Portions created by the Initial Developer are Copyright (C) 2004
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Arne John Glenstrup <panic@itu.dk>
+ *
+ * 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 ***** */
+
+
+#include "nsDebug.h"
+#include "nsPaperFactoryPS.h"
+#include "nsIPaperPS.h"
+#include "nsPaperPS.h"
+#include "nsPSPrinters.h"
+
+nsresult
+nsPaperFactoryPS::CreatePaper(const char* fullPrinterName,
+ const char* printerName,
+ nsIPaperSizePS* &aPaper)
+{
+ nsIPaperSizePS *newPZ;
+
+ if (nsPSPrinterList::kTypeCUPS == nsPSPrinterList::GetPrinterType
+ (nsDependentCString(fullPrinterName)))
+ newPZ = new nsPaperSizeCUPS(fullPrinterName, printerName);
+ else
+ newPZ = new nsPaperSizePS();
+
+ if (!newPZ)
+ return NS_ERROR_OUT_OF_MEMORY;
+
+ aPaper = newPZ;
+ return NS_OK;
+}
diff -urNU6 gfx/src.old/psshared/nsPaperFactoryPS.h gfx/src/psshared/nsPaperFactoryPS.h
--- gfx/src.old/psshared/nsPaperFactoryPS.h 1970-01-01 01:00:00.000000000 +0100
+++ gfx/src/psshared/nsPaperFactoryPS.h 2006-04-21 23:02:28.000000000 +0200
@@ -0,0 +1,64 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ex: set tabstop=8 softtabstop=4 shiftwidth=4 expandtab: */
+/* ***** 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.
+ *
+ * Contributor(s):
+ * Arne John Glenstrup <panic@itu.dk>
+ *
+ * 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 nsPaperFactoryPS_h__
+#define nsPaperFactoryPS_h__
+
+#include "nscore.h"
+#include "nsIPaperPS.h"
+
+/* Factory class for the paper sizes. This class determines
+ * which paper size class should handle a request, and constructs
+ * an object of the appropriate class.
+ */
+
+class NS_PSSHARED nsPaperFactoryPS
+{
+public:
+ /**
+ * Construct a paper size object for the given device context spec.
+ * On success, the paper size object is owned by the caller and should
+ * be destroyed when no longer needed.
+ *
+ * @param fullPrinterName Fully qualified name, e.g., "CUPS/myprinter"
+ * @param printerName Stripped name, e.g., "myprinter"
+ * @param aPaper If NS_OK is returned, this will be filled
+ * in with a pointer to a paper size object.
+ * @return NS_OK or a suitable error value.
+ */
+ static nsresult CreatePaper(const char* fullPrinterName,
+ const char* printerName,
+ nsIPaperSizePS* &aPaper);
+};
+
+
+#endif /* nsPaperFactoryPS_h__ */
diff -urNU6 gfx/src.old/psshared/nsPaperPS.cpp gfx/src/psshared/nsPaperPS.cpp
--- gfx/src.old/psshared/nsPaperPS.cpp 2004-09-07 19:51:50.000000000 +0200
+++ gfx/src/psshared/nsPaperPS.cpp 2006-04-21 23:22:13.000000000 +0200
@@ -19,12 +19,13 @@
* The Initial Developer of the Original Code is
* Kenneth Herron <kherron@newsguy.com>.
* Portions created by the Initial Developer are Copyright (C) 2004
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
+ * Arne John Glenstrup <panic@itu.dk>
*
* 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
@@ -34,15 +35,31 @@
* 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 ***** */
-
+#ifdef MOZ_LOGGING
+#define FORCE_PR_LOG 1 /* Allow logging in the release build */
+#endif /* MOZ_LOGGING */
+#include "prlog.h"
+
#include "nsPaperPS.h"
#include "plstr.h"
+#include "nsPSPrinters.h"
+#include <math.h>
+
+#ifdef PR_LOGGING
+static PRLogModuleInfo *PaperSizePSLM = PR_NewLogModule("PaperSizePS");
+#endif /* PR_LOGGING */
+/* Macro to make lines shorter */
+#define DO_PR_DEBUG_LOG(x) PR_LOG(PaperSizePSLM, PR_LOG_DEBUG, x)
+
+#define MM_PER_PT (25.4 / 72.0)
+#define HALF_INCH_PT 36.0
+#define EPSILON 0.125
#define COUNTOF(x) (sizeof(x) / sizeof((x)[0]))
const nsPaperSizePS_ nsPaperSizePS::mList[] =
{
#define SIZE_MM(x) (x)
@@ -54,19 +71,149 @@
{ "Legal", SIZE_INCH(8.5), SIZE_INCH(14), PR_FALSE },
{ "Executive", SIZE_INCH(7.5), SIZE_INCH(10), PR_FALSE },
#undef SIZE_INCH
#undef SIZE_MM
};
-const unsigned int nsPaperSizePS::mCount = COUNTOF(mList);
+nsCUPSShim nsPaperSizeCUPS::mCups;
+
+/* ~nsIPaperSizePS() is virtual, so must implement a destructor. */
+nsIPaperSizePS::~nsIPaperSizePS () { }
+
+nsPaperSizePS::nsPaperSizePS() {
+ mCount = COUNTOF(mList);
+ mCurrent = 0;
+}
PRBool
nsPaperSizePS::Find(const char *aName)
{
for (int i = mCount; i--; ) {
if (!PL_strcasecmp(aName, mList[i].name)) {
mCurrent = i;
return PR_TRUE;
}
}
return PR_FALSE;
}
+
+nsPaperSizeCUPS::nsPaperSizeCUPS(const char* fullPrinterName,
+ const char* printerName) {
+ DO_PR_DEBUG_LOG(("nsPaperSizeCUPS::nsPaperSizeCUPS('%s', '%s')\n",
+ fullPrinterName, printerName));
+ /* Don't use CUPS before we are sure we have access to the PPD */
+ mUsingCups = false;
+ mPPD = nsnull;
+ mCount = COUNTOF(mList);
+ mCurrent = 0;
+ if (!fullPrinterName || !printerName ||
+ nsPSPrinterList::kTypeCUPS !=
+ nsPSPrinterList::GetPrinterType(nsDependentCString(fullPrinterName)))
+ return;
+ if (!mCups.IsInitialized()) { mCups.Init(); }
+ if (!mCups.IsInitialized()) {
+ DO_PR_DEBUG_LOG(("nsPaperSizeCUPS::nsPaperSizeCUPS: CUPS unavailable\n"));
+ return;
+ }
+ const char* ppdFileName = mCups.mCupsGetPPD(printerName);
+ if (!ppdFileName) {
+ DO_PR_DEBUG_LOG(("nsPaperSizeCUPS::nsPaperSizeCUPS: "
+ "cannot get PPD file name for printer '%s'\n",
+ printerName));
+ return;
+ }
+ mPPD = mCups.mPpdOpenFile(ppdFileName);
+ if (!mPPD) {
+ DO_PR_DEBUG_LOG(("nsPaperSizeCUPS::nsPaperSizeCUPS: "
+ "cannot open PPD file '%s'\n",
+ ppdFileName));
+ return;
+ }
+ mCount = mPPD->num_sizes;
+ mUsingCups = true;
+}
+
+nsPaperSizeCUPS::~nsPaperSizeCUPS() {
+ if (mPPD) mCups.mPpdClose(mPPD);
+}
+
+void
+nsPaperSizeCUPS::SkipZeroSizes() {
+ if (!mUsingCups) return;
+ while (mCurrent < mCount
+ && (mPPD->sizes[mCurrent].width == 0.0f ||
+ mPPD->sizes[mCurrent].length == 0.0f)) {
+ mCurrent++;
+ }
+}
+
+PRBool
+nsPaperSizeCUPS::Find(const char* aName) {
+ DO_PR_DEBUG_LOG(("nsPaperSizeCUPS::Find ('%s') ", aName));
+ if (!mUsingCups) return nsPaperSizePS::Find(aName);
+ for (int i = mCount; i--; ) {
+ if (!PL_strcasecmp(aName, mPPD->sizes[i].name)) {
+ DO_PR_DEBUG_LOG
+ (("found paper '%s' (%gx%gmm)\n",
+ aName,
+ round(mPPD->sizes[i].width * MM_PER_PT),
+ round(mPPD->sizes[i].length * MM_PER_PT)));
+ mCurrent = i;
+ return PR_TRUE;
+ }
+ }
+ DO_PR_DEBUG_LOG(("did not find paper '%s'\n", aName));
+ return PR_FALSE;
+}
+
+PRBool
+nsPaperSizeCUPS::FindDefault() {
+ DO_PR_DEBUG_LOG(("nsPaperSizeCUPS::FindDefault"));
+ if (!mUsingCups) return nsPaperSizePS::FindDefault();
+ mCups.mPpdMarkDefaults(mPPD);
+ for (int i = mCount; i--; ) {
+ if (mCups.mPpdIsMarked(mPPD, "PageSize", mPPD->sizes[i].name )) {
+ DO_PR_DEBUG_LOG
+ (("found default paper '%s' (%gx%gmm)\n",
+ mPPD->sizes[i].name,
+ round(mPPD->sizes[i].width * MM_PER_PT),
+ round(mPPD->sizes[i].length * MM_PER_PT)));
+ mCurrent = i;
+ return PR_TRUE;
+ }
+ }
+ mCurrent = 0;
+ DO_PR_DEBUG_LOG(("no default paper found, therefore set the first\n"));
+ return PR_TRUE;
+}
+
+const char*
+nsPaperSizeCUPS::Name() {
+ if (!mUsingCups) return nsPaperSizePS::Name();
+ NS_PRECONDITION(!AtEnd(), "Invalid current item");
+ return mPPD->sizes[mCurrent].name;
+}
+
+float
+nsPaperSizeCUPS::Width_mm() {
+ if (!mUsingCups) return nsPaperSizePS::Width_mm();
+ NS_PRECONDITION(!AtEnd(), "Invalid current item");
+ return round(mPPD->sizes[mCurrent].width * MM_PER_PT);
+}
+
+float
+nsPaperSizeCUPS::Height_mm() {
+ if (!mUsingCups) return nsPaperSizePS::Height_mm();
+ NS_PRECONDITION(!AtEnd(), "Invalid current item");
+ return round(mPPD->sizes[mCurrent].length * MM_PER_PT);
+}
+
+PRBool
+nsPaperSizeCUPS::IsMetric() {
+ if (!mUsingCups) return nsPaperSizePS::IsMetric();
+ NS_PRECONDITION(!AtEnd(), "Invalid current item");
+ /* Educated guess: unless sizes are integral number */
+ /* of half inches, present them to the user in metric. */
+ return
+ fabs(fmod(mPPD->sizes[mCurrent].width, HALF_INCH_PT)) > EPSILON ||
+ fabs(fmod(mPPD->sizes[mCurrent].length, HALF_INCH_PT)) > EPSILON;
+}
diff -urNU6 gfx/src.old/psshared/nsPaperPS.h gfx/src/psshared/nsPaperPS.h
--- gfx/src.old/psshared/nsPaperPS.h 2004-12-15 06:52:36.000000000 +0100
+++ gfx/src/psshared/nsPaperPS.h 2006-04-21 23:14:05.000000000 +0200
@@ -37,30 +37,30 @@
* ***** END LICENSE BLOCK ***** */
#ifndef _PAPERPS_H_
#define _PAPERPS_H_
-#include "prtypes.h"
+#include "nsIPaperPS.h"
#include "nsDebug.h"
-#include "psSharedCore.h"
+#include "nsCUPSShim.h"
struct nsPaperSizePS_ {
const char *name;
float width_mm;
float height_mm;
PRBool isMetric; // Present to the user in metric, if possible
};
-class NS_PSSHARED nsPaperSizePS {
+class NS_PSSHARED nsPaperSizePS : public nsIPaperSizePS {
public:
/** ---------------------------------------------------
* Constructor
*/
- nsPaperSizePS() { mCurrent = 0; }
-
+ nsPaperSizePS();
+
/** ---------------------------------------------------
* @return PR_TRUE if the cursor points past the last item.
*/
PRBool AtEnd() { return mCurrent >= mCount; }
/** ---------------------------------------------------
@@ -82,12 +82,18 @@
* Point the cursor to the entry with the given paper name.
* @return PR_TRUE if pointing to a valid entry.
*/
PRBool Find(const char *aName);
/** ---------------------------------------------------
+ * Position the cursor at the beginning of the paper size list.
+ * @return PR_TRUE
+ */
+ PRBool FindDefault() { mCurrent = 0; return PR_TRUE; }
+
+ /** ---------------------------------------------------
* @return a pointer to the name of the current paper size
*/
const char *Name() {
NS_PRECONDITION(!AtEnd(), "Invalid current item");
return mList[mCurrent].name;
}
@@ -114,15 +120,87 @@
*/
PRBool IsMetric() {
NS_PRECONDITION(!AtEnd(), "Invalid current item");
return mList[mCurrent].isMetric;
}
- private:
+ protected:
unsigned int mCurrent;
// the class visibility should export these, but it doesn't
static NS_PSSHARED_STATIC_MEMBER_(const nsPaperSizePS_) mList[];
- static NS_PSSHARED_STATIC_MEMBER_(const unsigned int) mCount;
+ unsigned int mCount;
+};
+
+class NS_PSSHARED nsPaperSizeCUPS : public nsPaperSizePS {
+ public:
+ /** ---------------------------------------------------
+ * Constructor for a specific CUPS printer.
+ * @param fullPrinterName Fully qualified name, e.g., "CUPS/myprinter"
+ * @param printerName Stripped name, e.g., "myprinter"
+ */
+ nsPaperSizeCUPS(const char* fullPrinterName, const char* printerName);
+
+ /** ---------------------------------------------------
+ * Destructor.
+ */
+ ~nsPaperSizeCUPS();
+
+ /** ---------------------------------------------------
+ * Position the cursor at the beginning of the paper size list.
+ * @return VOID
+ */
+ void First() {
+ nsPaperSizePS::First();
+ SkipZeroSizes();
+ }
+
+ /** ---------------------------------------------------
+ * Advance the cursor to the next item.
+ * @return VOID
+ */
+ void Next() {
+ nsPaperSizePS::Next();
+ SkipZeroSizes();
+ }
+
+ /** ---------------------------------------------------
+ * Point the cursor to the entry with the given paper name.
+ * @return PR_TRUE if pointing to a valid entry.
+ */
+ PRBool Find(const char *aName);
+
+ /** ---------------------------------------------------
+ * Point the cursor to the CUPS default entry for paper size.
+ * @return PR_TRUE if pointing to a valid entry.
+ */
+ PRBool FindDefault();
+
+ /** ---------------------------------------------------
+ * @return a pointer to the name of the current paper size
+ */
+ const char *Name();
+
+ /** ---------------------------------------------------
+ * @return the width of the page in millimeters
+ */
+ float Width_mm();
+
+ /** ---------------------------------------------------
+ * @return the height of the page in millimeters
+ */
+ float Height_mm();
+
+ /** ---------------------------------------------------
+ * @return PR_TRUE if the paper should be presented to
+ * the user in metric units.
+ */
+ PRBool IsMetric();
+
+ private:
+ void SkipZeroSizes();
+ PRBool mUsingCups;
+ static NS_PSSHARED_STATIC_MEMBER_(nsCUPSShim) mCups;
+ ppd_file_t* mPPD;
};
#endif
diff -urNU6 gfx/src.old/xlib/nsDeviceContextSpecXlib.cpp gfx/src/xlib/nsDeviceContextSpecXlib.cpp
--- gfx/src.old/xlib/nsDeviceContextSpecXlib.cpp 2004-10-24 20:34:38.000000000 +0200
+++ gfx/src/xlib/nsDeviceContextSpecXlib.cpp 2006-04-21 22:58:48.000000000 +0200
@@ -1209,13 +1209,17 @@
#ifdef SET_PRINTER_FEATURES_VIA_PREFS
printerFeatures.SetCanChangePaperSize(PR_TRUE);
#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
nsXPIDLCString papername;
if (NS_SUCCEEDED(CopyPrinterCharPref(pPrefs, "postscript", printerName, "paper_size", getter_Copies(papername)))) {
- nsPaperSizePS paper;
+ nsIPaperSizePS* paper;
+ nsresult rv;
+ rv = nsPaperFactoryPS::CreatePaper
+ (fullPrinterName.get(), printerName.get(), paper);
+ if (NS_FAILED(rv)) return rv;
if (paper.Find(papername)) {
DO_PR_DEBUG_LOG(("setting default paper size to '%s' (%g mm/%g mm)\n",
paper.Name(), paper.Width_mm(), paper.Height_mm()));
aPrintSettings->SetPaperSizeUnit(paper.IsMetric() ?
(int)nsIPrintSettings::kPaperSizeMillimeters :
@@ -1235,12 +1239,13 @@
printerFeatures.SetPaperRecord(count++, paper.Name(),
(int)paper.Width_mm(), (int)paper.Height_mm(), !paper.IsMetric());
paper.Next();
}
printerFeatures.SetNumPaperSizeRecords(count);
#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
+ delete(paper);
}
PRBool hasSpoolerCmd = (nsPSPrinterList::kTypePS ==
nsPSPrinterList::GetPrinterType(fullPrinterName));
#ifdef SET_PRINTER_FEATURES_VIA_PREFS
printerFeatures.SetSupportsSpoolerCommandChange(hasSpoolerCmd);
Index: mozilla/gfx/src/psshared/nsPSPrinters.h
===================================================================
RCS file: /cvsroot/mozilla/gfx/src/psshared/nsPSPrinters.h,v
retrieving revision 1.3
diff -U8 -p -r1.3 nsPSPrinters.h
--- mozilla/gfx/src/psshared/nsPSPrinters.h 15 Dec 2004 05:52:36 -0000 1.3
+++ gfx/src/psshared/nsPSPrinters.h 6 Feb 2006 13:46:54 -0000
@@ -39,16 +39,17 @@
#ifndef nsPSPrinters_h___
#define nsPSPrinters_h___
#include "nsString.h"
#include "nsVoidArray.h"
#include "prtypes.h"
#include "nsCUPSShim.h"
#include "psSharedCore.h"
+#include "nsCOMPtr.h"
class nsIPrefService;
class nsIPrefBranch;
class nsCUPSShim;
class NS_PSSHARED nsPSPrinterList {
public:
/**

885
digest-mail.patch Normal file
View File

@ -0,0 +1,885 @@
Index: mailnews/base/src/nsMessenger.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/base/src/nsMessenger.cpp,v
retrieving revision 1.326
diff -u -w -p -8 -r1.326 nsMessenger.cpp
--- base/src/nsMessenger.cpp 26 Sep 2005 01:38:19 -0000 1.326
+++ mailnews/base/src/nsMessenger.cpp 21 Oct 2005 15:51:26 -0000
@@ -612,16 +612,17 @@ nsMessenger::LoadURL(nsIDOMWindowInterna
NS_ConvertASCIItoUTF16 uriString(aURL);
// Cleanup the empty spaces that might be on each end.
uriString.Trim(" ");
// Eliminate embedded newlines, which single-line text fields now allow:
uriString.StripChars("\r\n");
NS_ENSURE_TRUE(!uriString.IsEmpty(), NS_ERROR_FAILURE);
PRBool loadingFromFile = PR_FALSE;
+ PRBool getDummyMsgHdr = PR_FALSE;
PRInt64 fileSize;
if (StringBeginsWith(uriString, NS_LITERAL_STRING("file:")))
{
nsCOMPtr<nsIURI> fileUri;
rv = NS_NewURI(getter_AddRefs(fileUri), uriString);
NS_ENSURE_SUCCESS(rv, rv);
@@ -629,41 +630,48 @@ nsMessenger::LoadURL(nsIDOMWindowInterna
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr <nsIFile> file;
rv = fileUrl->GetFile(getter_AddRefs(file));
NS_ENSURE_SUCCESS(rv, rv);
file->GetFileSize(&fileSize);
uriString.ReplaceSubstring(NS_LITERAL_STRING("file:"), NS_LITERAL_STRING("mailbox:"));
uriString.Append(NS_LITERAL_STRING("&number=0"));
loadingFromFile = PR_TRUE;
+ getDummyMsgHdr = PR_TRUE;
}
+ else if (FindInReadable(NS_LITERAL_STRING("type=application/x-message-display"), uriString))
+ getDummyMsgHdr = PR_TRUE;
nsCOMPtr<nsIURI> uri;
rv = NS_NewURI(getter_AddRefs(uri), uriString);
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_TRUE(mDocShell, NS_ERROR_FAILURE);
nsCOMPtr<nsIMsgMailNewsUrl> msgurl = do_QueryInterface(uri);
if (msgurl)
{
msgurl->SetMsgWindow(mMsgWindow);
+ if (loadingFromFile || getDummyMsgHdr)
+ {
if (loadingFromFile)
{
nsCOMPtr <nsIMailboxUrl> mailboxUrl = do_QueryInterface(msgurl, &rv);
mailboxUrl->SetMessageSize((PRUint32) fileSize);
+ }
+ if (getDummyMsgHdr)
+ {
nsCOMPtr <nsIMsgHeaderSink> headerSink;
// need to tell the header sink to capture some headers to create a fake db header
// so we can do reply to a .eml file or a rfc822 msg attachment.
mMsgWindow->GetMsgHeaderSink(getter_AddRefs(headerSink));
if (headerSink)
{
nsCOMPtr <nsIMsgDBHdr> dummyHeader;
headerSink->GetDummyMsgHeader(getter_AddRefs(dummyHeader));
- if (dummyHeader)
- {
+ if (dummyHeader && loadingFromFile)
dummyHeader->SetMessageSize((PRUint32) fileSize);
}
}
}
}
nsCOMPtr<nsIDocShellLoadInfo> loadInfo;
rv = mDocShell->CreateLoadInfo(getter_AddRefs(loadInfo));
@@ -1386,17 +1394,17 @@ nsMessenger::MessageServiceFromURI(const
NS_IMETHODIMP
nsMessenger::MsgHdrFromURI(const char *aUri, nsIMsgDBHdr **aMsgHdr)
{
NS_ENSURE_ARG_POINTER(aUri);
NS_ENSURE_ARG_POINTER(aMsgHdr);
nsCOMPtr <nsIMsgMessageService> msgService;
nsresult rv;
- if (!strncmp(aUri, "file:", 5))
+ if (!strncmp(aUri, "file:", 5) || PL_strstr(aUri, "type=application/x-message-display"))
{
nsCOMPtr <nsIMsgHeaderSink> headerSink;
mMsgWindow->GetMsgHeaderSink(getter_AddRefs(headerSink));
if (headerSink)
{
rv = headerSink->GetDummyMsgHeader(aMsgHdr);
// Is there a way to check if they're asking for the hdr currently
// displayed in a stand-alone msg window from a .eml file?
Index: base/src/nsMsgCopyService.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/base/src/nsMsgCopyService.cpp,v
retrieving revision 1.51
diff -u -w -p -8 -r1.51 nsMsgCopyService.cpp
--- base/src/nsMsgCopyService.cpp 8 Aug 2005 20:36:39 -0000 1.51
+++ mailnews/base/src/nsMsgCopyService.cpp 21 Oct 2005 15:51:27 -0000
@@ -549,23 +549,20 @@ nsMsgCopyService::CopyFileMessage(nsIFil
PRUint32 aMsgFlags,
nsIMsgCopyServiceListener* listener,
nsIMsgWindow* window)
{
nsresult rv = NS_ERROR_NULL_POINTER;
nsCopyRequest* copyRequest;
nsCopySource* copySource = nsnull;
nsCOMPtr<nsISupports> fileSupport;
- nsCOMPtr<nsITransactionManager> txnMgr;
NS_ENSURE_ARG_POINTER(fileSpec);
NS_ENSURE_ARG_POINTER(dstFolder);
- if (window)
- window->GetTransactionManager(getter_AddRefs(txnMgr));
copyRequest = new nsCopyRequest();
if (!copyRequest) return rv;
fileSupport = do_QueryInterface(fileSpec, &rv);
if (NS_FAILED(rv)) goto done;
rv = copyRequest->Init(nsCopyFileMessageType, fileSupport, dstFolder,
isDraft, aMsgFlags, listener, window, PR_FALSE);
if (NS_FAILED(rv)) goto done;
Index: base/src/nsMsgDBView.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/base/src/nsMsgDBView.cpp,v
retrieving revision 1.226
diff -u -w -p -8 -r1.226 nsMsgDBView.cpp
--- base/src/nsMsgDBView.cpp 20 Oct 2005 16:03:26 -0000 1.226
+++ mailnews/base/src/nsMsgDBView.cpp 21 Oct 2005 15:51:35 -0000
@@ -974,17 +974,18 @@ NS_IMETHODIMP nsMsgDBView::ReloadMessage
{
if (m_currentlyDisplayedMsgUri.IsEmpty())
return NS_ERROR_FAILURE;
if (mSuppressMsgDisplay)
return NS_OK;
nsCAutoString forceAllParts(m_currentlyDisplayedMsgUri);
- forceAllParts.AppendLiteral("?fetchCompleteMessage=true");
+ forceAllParts += (forceAllParts.FindChar('?') == kNotFound) ? "?" : "&";
+ forceAllParts.AppendLiteral("fetchCompleteMessage=true");
return mMessengerInstance->OpenURL(forceAllParts.get());
}
NS_IMETHODIMP nsMsgDBView::ReloadMessage()
{
if (m_currentlyDisplayedMsgUri.IsEmpty())
return NS_ERROR_FAILURE;
Index: compose/src/nsMsgAttachmentHandler.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/compose/src/nsMsgAttachmentHandler.cpp,v
retrieving revision 1.117
diff -u -w -p -8 -r1.117 nsMsgAttachmentHandler.cpp
--- compose/src/nsMsgAttachmentHandler.cpp 21 Apr 2005 18:48:36 -0000 1.117
+++ mailnews/compose/src/nsMsgAttachmentHandler.cpp 21 Oct 2005 15:51:47 -0000
@@ -555,17 +555,18 @@ nsMsgAttachmentHandler::SnarfMsgAttachme
goto done;
}
rv = fetcher->Initialize(localFile, mOutFile, FetcherURLDoneCallback, this);
rv = GetMessageServiceFromURI(m_uri, getter_AddRefs(messageService));
if (NS_SUCCEEDED(rv) && messageService)
{
nsCAutoString uri(m_uri);
- uri.Append("?fetchCompleteMessage=true");
+ uri += (uri.FindChar('?') == kNotFound) ? "?" : "&";
+ uri.Append("fetchCompleteMessage=true");
nsCOMPtr<nsIStreamListener> strListener;
fetcher->QueryInterface(NS_GET_IID(nsIStreamListener), getter_AddRefs(strListener));
// initialize a new stream converter, that uses the strListener as its input
// obtain the input stream listener from the new converter,
// and pass the converter's input stream listener to DisplayMessage
m_mime_parser = do_CreateInstance(NS_MAILNEWS_MIME_STREAM_CONVERTER_CONTRACTID, &rv);
Index: compose/src/nsMsgCompose.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/compose/src/nsMsgCompose.cpp,v
retrieving revision 1.471
diff -u -w -p -8 -r1.471 nsMsgCompose.cpp
--- compose/src/nsMsgCompose.cpp 18 Oct 2005 16:29:37 -0000 1.471
+++ mailnews/compose/src/nsMsgCompose.cpp 21 Oct 2005 15:51:54 -0000
@@ -1468,19 +1468,31 @@ nsresult nsMsgCompose::CreateMessage(con
// strip out ?type=application/x-message-display because it confuses libmime
PRInt32 typeIndex = msgUri.Find("?type=application/x-message-display");
if (typeIndex != kNotFound)
{
msgUri.Cut(typeIndex, sizeof("?type=application/x-message-display") - 1);
// we also need to replace the next '&' with '?'
if (msgUri.CharAt(typeIndex) == '&')
msgUri.SetCharAt('?', typeIndex);
+ originalMsgURI = msgUri.get();
+ }
}
+ else // check if we're dealing with a displayed message/rfc822 attachment
+ {
+ PRInt32 typeIndex = typeIndex = msgUri.Find("&type=application/x-message-display");
+ if (typeIndex != kNotFound)
+ {
+ msgUri.Cut(typeIndex, sizeof("&type=application/x-message-display") - 1);
+ // nsURLFetcher will check for "realtype=message/rfc822" and will set the
+ // content type to message/rfc822 in the forwarded message.
+ msgUri.Append("&realtype=message/rfc822");
originalMsgURI = msgUri.get();
}
+ }
if (compFields)
{
NS_IF_RELEASE(m_compFields);
m_compFields = NS_REINTERPRET_CAST(nsMsgCompFields*, compFields);
NS_ADDREF(m_compFields);
}
else
{
Index: compose/src/nsMsgComposeService.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/compose/src/nsMsgComposeService.cpp,v
retrieving revision 1.113
diff -u -w -p -8 -r1.113 nsMsgComposeService.cpp
--- compose/src/nsMsgComposeService.cpp 3 Oct 2005 23:51:05 -0000 1.113
+++ mailnews/compose/src/nsMsgComposeService.cpp 21 Oct 2005 15:51:56 -0000
@@ -414,17 +414,19 @@ nsMsgComposeService::OpenComposeWindow(c
*/
if (type == nsIMsgCompType::ForwardInline || type == nsIMsgCompType::Draft || type == nsIMsgCompType::Template
|| type == nsIMsgCompType::ReplyWithTemplate)
{
nsCOMPtr<nsIMsgDraft> pMsgDraft (do_CreateInstance(NS_MSGDRAFT_CONTRACTID, &rv));
if (NS_SUCCEEDED(rv) && pMsgDraft)
{
nsCAutoString uriToOpen(originalMsgURI);
- uriToOpen.Append("?fetchCompleteMessage=true");
+
+ uriToOpen += (uriToOpen.FindChar('?') == kNotFound) ? "?" : "&";
+ uriToOpen.Append("fetchCompleteMessage=true");
switch(type)
{
case nsIMsgCompType::ForwardInline:
rv = pMsgDraft->OpenDraftMsg(uriToOpen.get(), originalMsgURI, identity, PR_TRUE, aMsgWindow);
break;
case nsIMsgCompType::Draft:
rv = pMsgDraft->OpenDraftMsg(uriToOpen.get(), nsnull, identity, PR_FALSE, aMsgWindow);
@@ -470,22 +472,22 @@ nsMsgComposeService::OpenComposeWindow(c
esc_FileBaseName|esc_Forced|esc_AlwaysCopy,
unescapedName);
pMsgCompFields->SetNewsgroups(NS_ConvertUTF8toUTF16(unescapedName));
pMsgCompFields->SetNewshost(host.get());
}
else
{
pMsgComposeParams->SetOriginalMsgURI(originalMsgURI);
- if (PL_strstr(originalMsgURI, "?type=application/x-message-display"))
+ if (PL_strstr(originalMsgURI, "type=application/x-message-display"))
{
nsCOMPtr <nsIMsgDBHdr> msgHdr;
if (strncmp(originalMsgURI, "file:", 5))
rv = GetMsgDBHdrFromURI(originalMsgURI, getter_AddRefs(msgHdr));
- else if (aMsgWindow)
+ if (aMsgWindow && !msgHdr)
{
nsCOMPtr <nsIMsgHeaderSink> headerSink;
rv = aMsgWindow->GetMsgHeaderSink(getter_AddRefs(headerSink));
if (headerSink)
rv = headerSink->GetDummyMsgHeader(getter_AddRefs(msgHdr));
}
pMsgComposeParams->SetOrigMsgHdr(msgHdr);
}
Index: compose/src/nsMsgCreate.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/compose/src/nsMsgCreate.cpp,v
retrieving revision 1.60
diff -u -w -p -8 -r1.60 nsMsgCreate.cpp
--- compose/src/nsMsgCreate.cpp 16 Sep 2005 15:18:33 -0000 1.60
+++ mailnews/compose/src/nsMsgCreate.cpp 21 Oct 2005 15:51:57 -0000
@@ -144,19 +144,19 @@ nsMsgDraft::ProcessDraftOrTemplateOperat
printf("Unable to get the nsIStreamListener interface from libmime\n");
#endif
return NS_ERROR_UNEXPECTED;
}
nsCOMPtr<nsIURI> aURL;
nsCAutoString uriString(msgURI);
PRBool fileUrl = StringBeginsWith(uriString, NS_LITERAL_CSTRING("file:"));
+ PRBool forwardedMessage = PL_strstr(msgURI, "&type=application/x-message-display") != nsnull;
-
- if (fileUrl)
+ if (fileUrl || forwardedMessage)
rv = NS_NewURI(getter_AddRefs(aURL), msgURI);
else
rv = mMessageService->GetUrlForUri(mURI, getter_AddRefs(aURL), aMsgWindow);
if (aURL)
aURL->SetSpec(nsDependentCString(mURI));
// if we are forwarding a message and that message used a charset over ride
// then use that over ride charset instead of the charset specified in the message
Index: compose/src/nsMsgQuote.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/compose/src/nsMsgQuote.cpp,v
retrieving revision 1.71
diff -u -w -p -8 -r1.71 nsMsgQuote.cpp
--- compose/src/nsMsgQuote.cpp 16 Sep 2005 15:18:33 -0000 1.71
+++ mailnews/compose/src/nsMsgQuote.cpp 21 Oct 2005 15:51:58 -0000
@@ -170,19 +170,19 @@ nsMsgQuote::QuoteMessage(const char *msg
if (!msgURI)
return NS_ERROR_INVALID_ARG;
mQuoteHeaders = quoteHeaders;
mStreamListener = aQuoteMsgStreamListener;
nsCAutoString msgUri(msgURI);
PRBool fileUrl = !strncmp(msgURI, "file:", 5);
-
+ PRBool forwardedMessage = PL_strstr(msgURI, "&realtype=message/rfc822") != nsnull;
nsCOMPtr<nsIURI> aURL;
- if (fileUrl)
+ if (fileUrl || forwardedMessage)
rv = NS_NewURI(getter_AddRefs(aURL), msgURI);
else
{
nsCOMPtr <nsIMsgMessageService> msgService;
rv = GetMessageServiceFromURI(msgURI, getter_AddRefs(msgService));
if (NS_FAILED(rv)) return rv;
rv = msgService->GetUrlForUri(msgURI, getter_AddRefs(aURL), nsnull);
}
Index: compose/src/nsURLFetcher.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/compose/src/nsURLFetcher.cpp,v
retrieving revision 1.72
diff -u -w -p -8 -r1.72 nsURLFetcher.cpp
--- compose/src/nsURLFetcher.cpp 13 Jun 2005 18:10:20 -0000 1.72
+++ mailnews/compose/src/nsURLFetcher.cpp 21 Oct 2005 15:51:58 -0000
@@ -484,26 +484,33 @@ NS_IMETHODIMP nsURLFetcherStreamConsumer
{
if (!mURLFetcher)
return NS_ERROR_FAILURE;
// Check the content type!
nsCAutoString contentType;
nsCAutoString charset;
- nsCOMPtr<nsIChannel> aChannel = do_QueryInterface(aRequest);
- if(!aChannel) return NS_ERROR_FAILURE;
+ nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
+ if(!channel) return NS_ERROR_FAILURE;
- if (NS_SUCCEEDED(aChannel->GetContentType(contentType)) &&
+ if (NS_SUCCEEDED(channel->GetContentType(contentType)) &&
!contentType.EqualsLiteral(UNKNOWN_CONTENT_TYPE))
{
+ nsCAutoString uriSpec;
+ nsCOMPtr <nsIURI> channelURI;
+ channel->GetURI(getter_AddRefs(channelURI));
+ channelURI->GetSpec(uriSpec);
+ if (FindInReadable(NS_LITERAL_CSTRING("&realtype=message/rfc822"), uriSpec))
+ mURLFetcher->mContentType = MESSAGE_RFC822;
+ else
mURLFetcher->mContentType = contentType;
}
- if (NS_SUCCEEDED(aChannel->GetContentCharset(charset)) && !charset.IsEmpty())
+ if (NS_SUCCEEDED(channel->GetContentCharset(charset)) && !charset.IsEmpty())
{
mURLFetcher->mCharset = charset;
}
return NS_OK;
}
/** nsIStreamListener methods **/
===================================================================
RCS file: /cvsroot/mozilla/mailnews/imap/src/nsImapService.cpp,v
retrieving revision 1.309
diff -u -w -p -8 -r1.309 nsImapService.cpp
--- imap/src/nsImapService.cpp 22 Mar 2005 18:25:33 -0000 1.309
+++ mailnews/imap/src/nsImapService.cpp 21 Oct 2005 15:52:23 -0000
@@ -95,16 +95,17 @@
#include "nsIDOMWindowInternal.h"
#include "nsIMessengerWindowService.h"
#include "nsIWindowMediator.h"
#include "nsIPrompt.h"
#include "nsIWindowWatcher.h"
#include "nsImapProtocol.h"
#include "nsIMsgMailSession.h"
#include "nsIStreamConverterService.h"
+#include "nsNetUtil.h"
#include "nsInt64.h"
#define PREF_MAIL_ROOT_IMAP "mail.root.imap" // old - for backward compatibility only
#define PREF_MAIL_ROOT_IMAP_REL "mail.root.imap-rel"
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
static NS_DEFINE_CID(kImapUrlCID, NS_IMAPURL_CID);
static NS_DEFINE_CID(kCacheServiceCID, NS_CACHESERVICE_CID);
@@ -308,16 +309,20 @@ nsImapService::LiteSelectFolder(nsIEvent
return rv;
}
NS_IMETHODIMP nsImapService::GetUrlForUri(const char *aMessageURI, nsIURI **aURL, nsIMsgWindow *aMsgWindow)
{
nsresult rv = NS_OK;
+ if (PL_strstr(aMessageURI, "&type=application/x-message-display"))
+ return NS_NewURI(aURL, aMessageURI);
+
+
nsCOMPtr<nsIMsgFolder> folder;
nsXPIDLCString msgKey;
rv = DecomposeImapURI(aMessageURI, getter_AddRefs(folder), getter_Copies(msgKey));
if (NS_SUCCEEDED(rv))
{
nsCOMPtr<nsIImapUrl> imapUrl;
nsCAutoString urlSpec;
PRUnichar hierarchySeparator = GetHierarchyDelimiter(folder);
@@ -477,17 +482,47 @@ NS_IMETHODIMP nsImapService::DisplayMess
nsIURI ** aURL)
{
nsresult rv = NS_OK;
nsCOMPtr<nsIMsgFolder> folder;
nsXPIDLCString msgKey;
nsXPIDLCString mimePart;
nsCAutoString folderURI;
nsMsgKey key;
+ nsCAutoString messageURI(aMessageURI);
+ PRInt32 typeIndex = messageURI.Find("&type=application/x-message-display");
+ if (typeIndex != kNotFound)
+ {
+ // This happens with forward inline of a message/rfc822 attachment opened in
+ // a standalone msg window.
+ // So, just cut to the chase and call AsyncOpen on a channel.
+ nsCOMPtr <nsIURI> uri;
+ messageURI.Cut(typeIndex, sizeof("&type=application/x-message-display") - 1);
+ rv = NS_NewURI(getter_AddRefs(uri), messageURI.get());
+ NS_ENSURE_SUCCESS(rv, rv);
+ if (aURL)
+ NS_IF_ADDREF(*aURL = uri);
+ nsCOMPtr<nsIStreamListener> aStreamListener = do_QueryInterface(aDisplayConsumer, &rv);
+ if (NS_SUCCEEDED(rv) && aStreamListener)
+ {
+ nsCOMPtr<nsIChannel> aChannel;
+ nsCOMPtr<nsILoadGroup> aLoadGroup;
+ nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(uri, &rv);
+ if (NS_SUCCEEDED(rv) && mailnewsUrl)
+ mailnewsUrl->GetLoadGroup(getter_AddRefs(aLoadGroup));
+
+ rv = NewChannel(uri, getter_AddRefs(aChannel));
+ if (NS_FAILED(rv)) return rv;
+
+ nsCOMPtr<nsISupports> aCtxt = do_QueryInterface(uri);
+ // now try to open the channel passing in our display consumer as the listener
+ return aChannel->AsyncOpen(aStreamListener, aCtxt);
+ }
+ }
rv = DecomposeImapURI(aMessageURI, getter_AddRefs(folder), getter_Copies(msgKey));
if (msgKey.IsEmpty())
return NS_MSG_MESSAGE_NOT_FOUND;
rv = nsParseImapMessageURI(aMessageURI, folderURI, &key, getter_Copies(mimePart));
if (NS_SUCCEEDED(rv))
{
nsCOMPtr<nsIImapMessageSink> imapMessageSink(do_QueryInterface(folder, &rv));
if (NS_SUCCEEDED(rv))
Index: local/src/nsMailboxProtocol.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/local/src/nsMailboxProtocol.cpp,v
retrieving revision 1.122
diff -u -w -p -8 -r1.122 nsMailboxProtocol.cpp
--- local/src/nsMailboxProtocol.cpp 1 Jun 2005 19:04:20 -0000 1.122
+++ mailnews/local/src/nsMailboxProtocol.cpp 21 Oct 2005 15:52:26 -0000
@@ -456,16 +456,18 @@ nsresult nsMailboxProtocol::LoadUrl(nsIU
m_runningUrl = do_QueryInterface(aURL);
if (m_runningUrl)
{
// find out from the url what action we are supposed to perform...
rv = m_runningUrl->GetMailboxAction(&m_mailboxAction);
PRBool convertData = PR_FALSE;
+ // need to check if we're fetching an rfc822 part in order to
+ // quote a message.
if (m_mailboxAction == nsIMailboxUrl::ActionFetchMessage)
{
nsCOMPtr<nsIMsgMailNewsUrl> msgUrl = do_QueryInterface(m_runningUrl, &rv);
NS_ENSURE_SUCCESS(rv,rv);
nsCAutoString queryStr;
rv = msgUrl->GetQuery(queryStr);
NS_ENSURE_SUCCESS(rv,rv);
Index: local/src/nsMailboxService.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/local/src/nsMailboxService.cpp,v
retrieving revision 1.116
diff -u -w -p -8 -r1.116 nsMailboxService.cpp
--- local/src/nsMailboxService.cpp 16 Sep 2005 15:19:09 -0000 1.116
+++ mailnews/local/src/nsMailboxService.cpp 21 Oct 2005 15:52:27 -0000
@@ -177,16 +177,19 @@ nsresult nsMailboxService::FetchMessage(
nsIURI ** aURL)
{
nsresult rv = NS_OK;
nsCOMPtr<nsIMailboxUrl> mailboxurl;
nsMailboxAction actionToUse = mailboxAction;
nsCOMPtr <nsIURI> url;
+
+ nsCAutoString uriString(aMessageURI);
+
if (!strncmp(aMessageURI, "file:", 5))
{
PRInt64 fileSize;
nsCOMPtr<nsIURI> fileUri;
rv = NS_NewURI(getter_AddRefs(fileUri), aMessageURI);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr <nsIFileURL> fileUrl = do_QueryInterface(fileUri, &rv);
NS_ENSURE_SUCCESS(rv, rv);
@@ -216,16 +219,27 @@ nsresult nsMailboxService::FetchMessage(
headerSink->GetDummyMsgHeader(getter_AddRefs(dummyHeader));
if (dummyHeader)
dummyHeader->SetMessageSize((PRUint32) fileSize);
}
}
}
else
{
+
+ // this happens with forward inline of message/rfc822 attachment
+ // opened in a stand-alone msg window.
+ PRInt32 typeIndex = typeIndex = uriString.Find("&type=application/x-message-display");
+ if (typeIndex != kNotFound)
+ {
+ uriString.Cut(typeIndex, sizeof("&type=application/x-message-display") - 1);
+ rv = NS_NewURI(getter_AddRefs(url), uriString.get());
+ mailboxurl = do_QueryInterface(url);
+ }
+ else
rv = PrepareMessageUrl(aMessageURI, aUrlListener, actionToUse , getter_AddRefs(mailboxurl), aMsgWindow);
if (NS_SUCCEEDED(rv))
{
url = do_QueryInterface(mailboxurl);
nsCOMPtr<nsIMsgMailNewsUrl> msgUrl (do_QueryInterface(url));
msgUrl->SetMsgWindow(aMsgWindow);
nsCOMPtr<nsIMsgI18NUrl> i18nurl (do_QueryInterface(msgUrl));
@@ -313,27 +327,16 @@ NS_IMETHODIMP nsMailboxService::OpenAtta
const char *aUrl,
const char *aMessageUri,
nsISupports *aDisplayConsumer,
nsIMsgWindow *aMsgWindow,
nsIUrlListener *aUrlListener)
{
nsCOMPtr <nsIURI> URL;
nsCAutoString urlString(aUrl);
- // strip out ?type=application/x-message-display because it confuses libmime
-
- PRInt32 typeIndex = urlString.Find("?type=application/x-message-display");
- if (typeIndex != kNotFound)
- {
- urlString.Cut(typeIndex, sizeof("?type=application/x-message-display") - 1);
- // we also need to replace the next '&' with '?'
- PRInt32 firstPartIndex = urlString.FindChar('&');
- if (firstPartIndex != kNotFound)
- urlString.SetCharAt('?', firstPartIndex);
- }
urlString += "&type=";
urlString += aContentType;
urlString += "&filename=";
urlString += aFileName;
CreateStartupUrl(urlString.get(), getter_AddRefs(URL));
nsresult rv;
// try to run the url in the docshell...
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(aDisplayConsumer, &rv));
@@ -384,17 +387,18 @@ nsMailboxService::SaveMessageToDisk(cons
if (aURL)
mailboxurl->QueryInterface(NS_GET_IID(nsIURI), (void **) aURL);
return rv;
}
NS_IMETHODIMP nsMailboxService::GetUrlForUri(const char *aMessageURI, nsIURI **aURL, nsIMsgWindow *aMsgWindow)
{
- if (!strncmp(aMessageURI, "file:", 5))
+ if (!strncmp(aMessageURI, "file:", 5) || PL_strstr(aMessageURI, "type=application/x-message-display")
+ || !strncmp(aMessageURI, "mailbox:", 8))
return NS_NewURI(aURL, aMessageURI);
nsresult rv = NS_OK;
nsCOMPtr<nsIMailboxUrl> mailboxurl;
rv = PrepareMessageUrl(aMessageURI, nsnull, nsIMailboxUrl::ActionFetchMessage, getter_AddRefs(mailboxurl), aMsgWindow);
if (NS_SUCCEEDED(rv) && mailboxurl)
rv = mailboxurl->QueryInterface(NS_GET_IID(nsIURI), (void **) aURL);
return rv;
Index: local/src/nsPop3Sink.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/local/src/nsPop3Sink.cpp,v
retrieving revision 1.127
diff -u -w -p -8 -r1.127 nsPop3Sink.cpp
--- local/src/nsPop3Sink.cpp 7 Aug 2005 15:43:53 -0000 1.127
+++ mailnews/local/src/nsPop3Sink.cpp 21 Oct 2005 15:52:28 -0000
@@ -803,17 +803,16 @@ nsPop3Sink::IncorporateComplete(nsIMsgWi
m_outFileStream->flush();
m_outFileStream->close();
m_newMailParser->FinishHeader();
// need to re-open the inbox file stream.
if (!m_tmpDownloadFileSpec.Exists())
return HandleTempDownloadFailed(aMsgWindow);
m_outFileStream->Open(m_tmpDownloadFileSpec, (PR_RDWR | PR_CREATE_FILE));
-
m_newMailParser->ApplyFilters(&moved, aMsgWindow, 0);
if (!moved)
{
if (m_outFileStream->is_open())
{
nsFileSpec destFolderSpec;
nsCOMPtr<nsIFileSpec> path;
Index: mime/src/mimedrft.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/mime/src/mimedrft.cpp,v
retrieving revision 1.142
diff -u -w -p -8 -r1.142 mimedrft.cpp
--- mime/src/mimedrft.cpp 20 Jul 2005 11:49:43 -0000 1.142
+++ mailnews/mime/src/mimedrft.cpp 21 Oct 2005 15:52:38 -0000
@@ -2077,16 +2077,20 @@ mime_bridge_create_draft_stream(
goto FAIL;
rv = msgService->GetUrlForUri(turl.get(), getter_AddRefs(aURL), nsnull);
if (NS_FAILED(rv))
goto FAIL;
if (NS_SUCCEEDED(aURL->GetSpec(urlString)))
{
+ PRInt32 typeIndex = urlString.Find("&type=application/x-message-display");
+ if (typeIndex != kNotFound)
+ urlString.Cut(typeIndex, sizeof("&type=application/x-message-display") - 1);
+
mdd->url_name = ToNewCString(urlString);
if (!(mdd->url_name))
goto FAIL;
}
newPluginObj2->GetForwardInline(&mdd->forwardInline);
newPluginObj2->GetIdentity(getter_AddRefs(mdd->identity));
newPluginObj2->GetOriginalMsgURI(&mdd->originalMsgURI);
Index: mime/src/mimei.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/mime/src/mimei.cpp,v
retrieving revision 1.77
diff -u -w -p -8 -r1.77 mimei.cpp
--- mime/src/mimei.cpp 13 Jun 2005 18:34:05 -0000 1.77
+++ mailnews/mime/src/mimei.cpp 21 Oct 2005 15:52:41 -0000
@@ -1367,16 +1367,26 @@ mime_set_url_part(const char *url, const
const char *part_begin = 0;
const char *part_end = 0;
PRBool got_q = PR_FALSE;
const char *s;
char *result;
if (!url || !part) return 0;
+ nsCAutoString urlString(url);
+ PRInt32 typeIndex = urlString.Find("?type=application/x-message-display");
+ if (typeIndex != kNotFound)
+ {
+ urlString.Cut(typeIndex, sizeof("?type=application/x-message-display") - 1);
+ if (urlString.CharAt(typeIndex) == '&')
+ urlString.SetCharAt('?', typeIndex);
+ url = urlString.get();
+ }
+
for (s = url; *s; s++)
{
if (*s == '?')
{
got_q = PR_TRUE;
if (!nsCRT::strncasecmp(s, "?part=", 6))
part_begin = (s += 6);
}
@@ -1665,34 +1675,32 @@ mime_parse_url_options(const char *url,
options->headers = MimeHeadersMicro;
else if (end > value && !nsCRT::strncasecmp ("cite", value, end - value))
options->headers = MimeHeadersCitation;
else if (end > value && !nsCRT::strncasecmp ("citation", value, end-value))
options->headers = MimeHeadersCitation;
else
options->headers = default_headers;
}
- else if (!nsCRT::strncasecmp ("part", q, name_end - q))
+ else if (!nsCRT::strncasecmp ("part", q, name_end - q) &&
+ options->format_out != nsMimeOutput::nsMimeMessageBodyQuoting)
{
PR_FREEIF (options->part_to_load);
if (end > value)
{
options->part_to_load = (char *) PR_MALLOC(end - value + 1);
if (!options->part_to_load)
return MIME_OUT_OF_MEMORY;
memcpy(options->part_to_load, value, end-value);
options->part_to_load[end-value] = 0;
}
}
else if (!nsCRT::strncasecmp ("rot13", q, name_end - q))
{
- if (end <= value || !nsCRT::strncasecmp ("true", value, end - value))
- options->rot13_p = PR_TRUE;
- else
- options->rot13_p = PR_FALSE;
+ options->rot13_p = end <= value || !nsCRT::strncasecmp ("true", value, end - value);
}
q = end;
if (*q)
q++;
}
@@ -1751,16 +1759,17 @@ mime_parse_url_options(const char *url,
and leaves them incompatible for:
= the first part of a top-level multipart
= all elements deeper than the outermost part
Life s#$%s when you don't properly think out things that end up turning
into de-facto standards...
*/
+
if (options->part_to_load &&
!PL_strchr(options->part_to_load, '.')) /* doesn't contain a dot */
{
if (!nsCRT::strcmp(options->part_to_load, "0")) /* 0 */
{
PR_Free(options->part_to_load);
options->part_to_load = nsCRT::strdup("1");
if (!options->part_to_load)
@@ -1774,17 +1783,16 @@ mime_parse_url_options(const char *url,
if (!s) return MIME_OUT_OF_MEMORY;
PL_strcpy(s, prefix);
PL_strcat(s, options->part_to_load);
PR_Free(options->part_to_load);
options->part_to_load = s;
}
}
-
return 0;
}
/* Some output-generation utility functions...
*/
int
@@ -1949,16 +1957,28 @@ MimeObject_output_init(MimeObject *obj,
char *
mime_get_base_url(const char *url)
{
if (!url)
return nsnull;
const char *s = strrchr(url, '?');
+ if (s && !strncmp(s, "?type=application/x-message-display", sizeof("?type=application/x-message-display") - 1))
+ {
+ const char *nextTerm = strchr(s, '&');
+ s = (nextTerm) ? nextTerm : s + strlen(s) - 1;
+ }
+ // we need to keep the ?number part of the url, or we won't know
+ // which local message the part belongs to.
+ if (s && *s && *(s+1) && !strncmp(s + 1, "number=", sizeof("number=") - 1))
+ {
+ const char *nextTerm = strchr(++s, '&');
+ s = (nextTerm) ? nextTerm : s + strlen(s) - 1;
+ }
char *result = (char *) PR_MALLOC(strlen(url) + 1);
NS_ASSERTION(result, "out of memory");
if (!result)
return nsnull;
memcpy(result, url, s - url);
result[s - url] = 0;
return result;
Index: mime/src/nsStreamConverter.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/mime/src/nsStreamConverter.cpp,v
retrieving revision 1.128
diff -u -w -p -8 -r1.128 nsStreamConverter.cpp
--- mime/src/nsStreamConverter.cpp 16 Aug 2005 14:23:00 -0000 1.128
+++ mailnews/mime/src/nsStreamConverter.cpp 21 Oct 2005 15:52:42 -0000
@@ -403,17 +403,17 @@ nsStreamConverter::DetermineOutputFormat
// Don't muck with this data!
*aNewType = nsMimeOutput::nsMimeMessageRaw;
return NS_OK;
}
}
// is this is a part that should just come out raw
const char *part = FindQueryElementData(queryPart, "part=");
- if (part)
+ if (part && !mToType.Equals("application/vnd.mozilla.xul+xml"))
{
// default for parts
mOutputFormat = "raw";
*aNewType = nsMimeOutput::nsMimeMessageRaw;
// if we are being asked to fetch a part....it should have a
// content type appended to it...if it does, we want to remember
// that as mOutputFormat
@@ -1096,16 +1096,19 @@ NS_IMETHODIMP nsStreamConverter::AsyncCo
SetMimeHeadersListener(quoteListener, nsMimeOutput::nsMimeMessageQuoting);
rv = aMsgQuote->GetQuoteChannel(getter_AddRefs(aChannel));
}
else
{
aChannel = do_QueryInterface(aCtxt, &rv);
}
+ mFromType = aFromType;
+ mToType = aToType;
+
NS_ASSERTION(aChannel && NS_SUCCEEDED(rv), "mailnews mime converter has to have the channel passed in...");
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIURI> aUri;
aChannel->GetURI(getter_AddRefs(aUri));
return Init(aUri, aListener, aChannel);
}
Index: mime/src/nsStreamConverter.h
===================================================================
RCS file: /cvsroot/mozilla/mailnews/mime/src/nsStreamConverter.h,v
retrieving revision 1.25
diff -u -w -p -8 -r1.25 nsStreamConverter.h
--- mime/src/nsStreamConverter.h 1 Jun 2004 17:22:01 -0000 1.25
+++ mailnews/mime/src/nsStreamConverter.h 21 Oct 2005 15:52:42 -0000
@@ -102,16 +102,18 @@ private:
nsCString mOverrideFormat; // this is a possible override for emitter creation
PRBool mWrapperOutput; // Should we output the frame split message display
nsCOMPtr<nsIMimeStreamConverterListener> mMimeStreamConverterListener;
PRBool mForwardInline;
nsCOMPtr<nsIMsgIdentity> mIdentity;
nsCString mOriginalMsgURI;
+ nsCString mFromType;
+ nsCString mToType;
#ifdef DEBUG_mscott
PRTime mConvertContentTime;
#endif
nsIRequest * mPendingRequest; // used when we need to delay to fire onStartRequest
nsISupports * mPendingContext; // used when we need to delay to fire onStartRequest
};
#endif /* nsStreamConverter_h_ */
Index: mailWindowOverlay.js
===================================================================
RCS file: /cvsroot/mozilla/mail/base/content/mailWindowOverlay.js,v
retrieving revision 1.103
diff -u -w -p -8 -r1.103 mailWindowOverlay.js
--- mailWindowOverlay.js 12 Oct 2005 21:32:51 -0000 1.103
+++ mail/base/content/mailWindowOverlay.js 27 Oct 2005 16:46:58 -0000
@@ -2391,17 +2391,17 @@ function HandleMDNResponse(aUrl)
if (IsNewsMessage(msgURI))
return;
// if the message is marked as junk, do NOT attempt to process a return receipt
// in order to better protect the user
if (SelectedMessagesAreJunk())
return;
- var msgHdr = messenger.messageServiceFromURI(msgURI).messageURIToMsgHdr(msgURI);
+ var msgHdr = messenger.msgHdrFromURI(msgURI);
var mimeHdr;
try {
mimeHdr = aUrl.mimeHeaders;
} catch (ex) {
return;
}

34
enig-shared.patch Normal file
View File

@ -0,0 +1,34 @@
--- ipc/src/Makefile.in.orig 2005-06-14 09:19:56.000000000 +0200
+++ enigmail/ipc/src/Makefile.in 2005-06-14 09:20:09.000000000 +0200
@@ -74,6 +74,7 @@ EXPORTS = \
LOCAL_INCLUDES = \
-I$(srcdir)/../build \
+ -fPIC \
$(NULL)
CPPSRCS = \
--- enigmail/build/Makefile.in.orig 2005-10-04 20:12:03.000000000 +0200
+++ enigmail/build/Makefile.in 2005-10-04 20:12:35.000000000 +0200
@@ -51,9 +51,10 @@
LIBRARY_NAME = enigmime
SHORT_LIBNAME = enigmime
-MODULE_NAME = EnigModule
+#MODULE_NAME = EnigModule
IS_COMPONENT = 1
+FORCE_SHARED_LIB = 1
ifdef USE_XPCOM_GLUE
# Ensure that the xpcom classes that we build
--- enigmail/src/Makefile.in.orig 2006-01-11 20:54:23.000000000 +0100
+++ enigmail/src/Makefile.in 2006-01-11 20:54:43.000000000 +0100
@@ -94,6 +94,7 @@
LOCAL_INCLUDES = \
-I$(srcdir)/../build \
-I$(srcdir)/../../../mime/src \
+ -fPIC \
$(NULL)
CPPSRCS = \

3
enigmail-0.94.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3584329e4f51e43fbb9028cf47101de8c74651e7607de80cb1f61349424133c1
size 513084

17
enigmail.manifest Normal file
View File

@ -0,0 +1,17 @@
content enigmail jar:chrome/enigmail.jar!/content/enigmail/
locale enigmail en-US jar:chrome/enigmail.jar!/locale/en-US/enigmail/
skin enigmail classic jar:chrome/enigmail-skin-tbird.jar!/skin/classic/enigmail/
overlay chrome://messenger/content/messengercompose/messengercompose.xul chrome://enigmail/content/enigmailCheckLanguage.xul
overlay chrome://messenger/content/messengercompose/messengercompose.xul chrome://enigmail/content/enigmailMsgComposeOverlay.xul
overlay chrome://messenger/content/mailWindowOverlay.xul chrome://enigmail/content/enigmailCheckLanguage.xul
overlay chrome://messenger/content/mailWindowOverlay.xul chrome://enigmail/content/enigmailMessengerOverlay.xul
overlay chrome://messenger/content/msgHdrViewOverlay.xul chrome://enigmail/content/enigmailMsgHdrViewOverlay.xul
overlay chrome://messenger/content/msgPrintEngine.xul chrome://enigmail/content/enigmailMsgPrintOverlay.xul
overlay chrome://messenger/content/am-identity-edit.xul chrome://enigmail/content/enigmailAmIdEditOverlay.xul
overlay chrome://messenger/content/am-identity-edit.xul chrome://enigmail/content/enigmailEditIdentity.xul
overlay chrome://messenger/content/addressbook/addressbook.xul chrome://enigmail/content/enigmailAbCardViewOverlay.xul
overlay chrome://messenger/content/addressbook/abContactsPanel.xul chrome://enigmail/content/enigmailAbContactsPanel.xul
overlay chrome://global/content/customizeToolbar.xul chrome://enigmail/content/enigmailCustToolOverlay.xul
overlay chrome://communicator/content/pref/preftree.xul chrome://enigmail/content/enigmailPrefsOverlay.xul
overlay chrome://enigmail/content/am-enigprefs.xul chrome://enigmail/content/enigmailEditIdentity.xul
overlay chrome://enigmail/content/am-enigprefs-edit.xul chrome://enigmail/content/enigmailEditIdentity.xul

135
file-saver.patch Normal file
View File

@ -0,0 +1,135 @@
From: Robert O'Callahan <rocallahan@novell.com>
Subject: overwrite confirmation behaves strange (we need at least GTK2.8 for this)
References:
https://bugzilla.novell.com/show_bug.cgi?id=179531
https://bugzilla.mozilla.org/show_bug.cgi?id=341218
Index: widget/src/gtk2/nsFilePicker.cpp
===================================================================
RCS file: /home/rocallahan/mozilla-cvs-mirror/mozilla/widget/src/gtk2/nsFilePicker.cpp,v
retrieving revision 1.11
diff -u -t -p -1 -2 -r1.11 nsFilePicker.cpp
--- widget/src/gtk2/nsFilePicker.cpp 17 Aug 2005 13:41:44 -0000 1.11
+++ widget/src/gtk2/nsFilePicker.cpp 12 Jun 2006 08:02:15 -0000
@@ -81,39 +81,41 @@ typedef enum
GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
} GtkFileChooserAction;
typedef gchar* (*_gtk_file_chooser_get_filename_fn)(GtkFileChooser *chooser);
typedef GSList* (*_gtk_file_chooser_get_filenames_fn)(GtkFileChooser *chooser);
typedef GtkWidget* (*_gtk_file_chooser_dialog_new_fn)(const gchar *title,
GtkWindow *parent,
GtkFileChooserAction action,
const gchar *first_button_text,
...);
typedef void (*_gtk_file_chooser_set_select_multiple_fn)(GtkFileChooser* chooser, gboolean truth);
+typedef void (*_gtk_file_chooser_set_do_overwrite_confirmation_fn)(GtkFileChooser* chooser, gboolean do_confirm);
typedef void (*_gtk_file_chooser_set_current_name_fn)(GtkFileChooser* chooser, const gchar* name);
typedef void (*_gtk_file_chooser_set_current_folder_fn)(GtkFileChooser* chooser, const gchar* folder);
typedef void (*_gtk_file_chooser_add_filter_fn)(GtkFileChooser* chooser, GtkFileFilter* filter);
typedef void (*_gtk_file_chooser_set_filter_fn)(GtkFileChooser* chooser, GtkFileFilter* filter);
typedef GtkFileFilter* (*_gtk_file_chooser_get_filter_fn)(GtkFileChooser* chooser);
typedef GSList* (*_gtk_file_chooser_list_filters_fn)(GtkFileChooser* chooser);
typedef GtkFileFilter* (*_gtk_file_filter_new_fn)();
typedef void (*_gtk_file_filter_add_pattern_fn)(GtkFileFilter* filter, const gchar* pattern);
typedef void (*_gtk_file_filter_set_name_fn)(GtkFileFilter* filter, const gchar* name);
DECL_FUNC_PTR(gtk_file_chooser_get_filename);
DECL_FUNC_PTR(gtk_file_chooser_get_filenames);
DECL_FUNC_PTR(gtk_file_chooser_dialog_new);
DECL_FUNC_PTR(gtk_file_chooser_set_select_multiple);
+DECL_FUNC_PTR(gtk_file_chooser_set_do_overwrite_confirmation);
DECL_FUNC_PTR(gtk_file_chooser_set_current_name);
DECL_FUNC_PTR(gtk_file_chooser_set_current_folder);
DECL_FUNC_PTR(gtk_file_chooser_add_filter);
DECL_FUNC_PTR(gtk_file_chooser_set_filter);
DECL_FUNC_PTR(gtk_file_chooser_get_filter);
DECL_FUNC_PTR(gtk_file_chooser_list_filters);
DECL_FUNC_PTR(gtk_file_filter_new);
DECL_FUNC_PTR(gtk_file_filter_add_pattern);
DECL_FUNC_PTR(gtk_file_filter_set_name);
static GtkWindow *
get_gtk_window_for_nsiwidget(nsIWidget *widget)
@@ -175,24 +177,25 @@ nsFilePicker::LoadSymbolsGTK24()
} else {
// XXX hmm, this seems to fail when gtk 2.4 is already loaded...
mGTK24 = LoadVersionedLibrary("gtk-2", ".4");
if (!mGTK24) {
return NS_ERROR_NOT_AVAILABLE;
}
GET_LIBGTK_FUNC(gtk_file_chooser_get_filename);
}
GET_LIBGTK_FUNC(gtk_file_chooser_get_filenames);
GET_LIBGTK_FUNC(gtk_file_chooser_dialog_new);
GET_LIBGTK_FUNC(gtk_file_chooser_set_select_multiple);
+ GET_LIBGTK_FUNC(gtk_file_chooser_set_do_overwrite_confirmation);
GET_LIBGTK_FUNC(gtk_file_chooser_set_current_name);
GET_LIBGTK_FUNC(gtk_file_chooser_set_current_folder);
GET_LIBGTK_FUNC(gtk_file_chooser_add_filter);
GET_LIBGTK_FUNC(gtk_file_chooser_set_filter);
GET_LIBGTK_FUNC(gtk_file_chooser_get_filter);
GET_LIBGTK_FUNC(gtk_file_chooser_list_filters);
GET_LIBGTK_FUNC(gtk_file_filter_new);
GET_LIBGTK_FUNC(gtk_file_filter_add_pattern);
GET_LIBGTK_FUNC(gtk_file_filter_set_name);
// Woot.
return NS_OK;
@@ -555,43 +558,51 @@ nsFilePicker::Show(PRInt16 *aReturn)
const char *filter_pattern = mFilters[i]->get();
_gtk_file_filter_set_name (filter, filter_pattern);
}
_gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (file_chooser), filter);
// Set the initially selected filter
if (mSelectedType == i) {
_gtk_file_chooser_set_filter (GTK_FILE_CHOOSER(file_chooser), filter);
}
}
+ PRBool manualConfirm = PR_TRUE;
+ if (_gtk_file_chooser_set_do_overwrite_confirmation) {
+ manualConfirm = PR_FALSE;
+ // Only available in GTK 2.8
+ _gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(file_chooser), PR_TRUE);
+ }
+
gint response = gtk_dialog_run (GTK_DIALOG (file_chooser));
switch (response) {
case GTK_RESPONSE_ACCEPT:
ReadValuesFromFileChooser(file_chooser);
*aReturn = nsIFilePicker::returnOK;
if (mMode == nsIFilePicker::modeSave) {
nsCOMPtr<nsILocalFile> file;
GetFile(getter_AddRefs(file));
if (file) {
PRBool exists = PR_FALSE;
file->Exists(&exists);
if (exists) {
- PRBool overwrite = confirm_overwrite_file (file_chooser, file);
+ PRBool overwrite = !manualConfirm ||
+ confirm_overwrite_file (file_chooser, file);
if (overwrite) {
*aReturn = nsIFilePicker::returnReplace;
} else {
- *aReturn = nsIFilePicker::returnCancel;
+ *aReturn = nsIFilePicker::returnCancel;
}
}
}
}
break;
case GTK_RESPONSE_CANCEL:
case GTK_RESPONSE_CLOSE:
case GTK_RESPONSE_DELETE_EVENT:
*aReturn = nsIFilePicker::returnCancel;
break;

91
home-download.patch Normal file
View File

@ -0,0 +1,91 @@
From: Wolfgang Rosenauer <stark@suse.de>
Subject: Firefox won't allow me to save downloaded files in my home directory
References:
https://bugzilla.novell.com/show_bug.cgi?id=144894
https://bugzilla.mozilla.org/show_bug.cgi?id=300856
Index: mail/components/preferences/downloads.js
===================================================================
RCS file: /cvsroot/mozilla/mail/components/preferences/downloads.js,v
retrieving revision 1.5
diff -u -p -6 -r1.5 downloads.js
--- mail/components/preferences/downloads.js 13 Sep 2005 18:39:27 -0000 1.5
+++ mail/components/preferences/downloads.js 1 Feb 2006 15:58:51 -0000
@@ -91,22 +91,27 @@ var gDownloadsPane = {
var customDirPref = document.getElementById("browser.download.dir");
return customDirPref.value;
},
_getSpecialFolderKey: function (aFolderType)
{
+ if (aFolderType == "Desktop")
+ return "Desk";
+
+ if (aFolderType != "Downloads")
+ throw "ASSERTION FAILED: folder type should be 'Desktop' or 'Downloads'";
+
#ifdef XP_WIN
- return aFolderType == "Desktop" ? "DeskP" : "Pers";
-#endif
+ return "Pers";
+#else
#ifdef XP_MACOSX
- return aFolderType == "Desktop" ? "UsrDsk" : "UsrDocs";
+ return "UsrDocs";
+#else
+ return "Home";
#endif
-#ifdef XP_OS2
- return aFolderType == "Desktop" ? "Desk" : "Home";
#endif
- return "Home";
},
_getDownloadsFolder: function (aFolder)
{
var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties);
Index: toolkit/mozapps/downloads/content/downloads.js
===================================================================
RCS file: /cvsroot/mozilla/toolkit/mozapps/downloads/content/downloads.js,v
retrieving revision 1.53
diff -u -p -6 -r1.53 downloads.js
--- toolkit/mozapps/downloads/content/downloads.js 9 Jan 2006 20:36:45 -0000 1.53
+++ toolkit/mozapps/downloads/content/downloads.js 1 Feb 2006 15:59:07 -0000
@@ -775,25 +775,27 @@ function initAutoDownloadDisplay()
autodownloadInfo.hidden = false;
var autodownloadSpring = document.getElementById("autodownloadSpring");
autodownloadSpring.hidden = true;
function getSpecialFolderKey(aFolderType)
{
+ if (aFolderType == "Desktop")
+ return "Desk";
+
+ if (aFolderType != "Downloads")
+ throw "ASSERTION FAILED: folder type should be 'Desktop' or 'Downloads'";
+
#ifdef XP_WIN
- return aFolderType == "Desktop" ? "DeskP" : "Pers";
-#endif
+ return "Pers";
+#else
#ifdef XP_MACOSX
- return aFolderType == "Desktop" ? "UsrDsk" : "UsrDocs";
-#endif
-#ifdef XP_OS2
- return aFolderType == "Desktop" ? "Desk" : "Home";
+ return "UsrDocs";
+#else
+ return "Home";
#endif
-#ifdef XP_BEOS
- return aFolderType == "Desktop" ? "Desk" : "Home";
#endif
- return "Home";
}
function getDownloadsFolder(aFolder)
{
var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties);

50
html-compose.patch Normal file
View File

@ -0,0 +1,50 @@
Index: mail/base/content/mailWindowOverlay.js
===================================================================
RCS file: /cvsroot/mozilla/mail/base/content/mailWindowOverlay.js,v
retrieving revision 1.95.2.7
diff -u -p -6 -r1.95.2.7 mailWindowOverlay.js
--- mail/base/content/mailWindowOverlay.js 12 Oct 2005 21:31:50 -0000 1.95.2.7
+++ mail/base/content/mailWindowOverlay.js 29 Dec 2005 19:28:21 -0000
@@ -903,12 +903,19 @@ function MsgNewMessage(event)
if (event && event.shiftKey)
ComposeMessage(msgComposeType.New, msgComposeFormat.OppositeOfDefault, loadedFolder, messageArray);
else
ComposeMessage(msgComposeType.New, msgComposeFormat.Default, loadedFolder, messageArray);
}
+function MsgNewHtmlMessage()
+{
+ var loadedFolder = GetFirstSelectedMsgFolder();
+ var messageArray = GetSelectedMessages();
+ ComposeMessage(msgComposeType.New, msgComposeFormat.HTML, loadedFolder, messageArray);
+}
+
function MsgReplyMessage(event)
{
var loadedFolder = GetLoadedMsgFolder();
if (loadedFolder)
{
var server = loadedFolder.server;
Index: mail/base/content/mailWindowOverlay.xul
===================================================================
RCS file: /cvsroot/mozilla/mail/base/content/mailWindowOverlay.xul,v
retrieving revision 1.116.2.8
diff -u -p -6 -r1.116.2.8 mailWindowOverlay.xul
--- mail/base/content/mailWindowOverlay.xul 24 Oct 2005 04:01:20 -0000 1.116.2.8
+++ mail/base/content/mailWindowOverlay.xul 29 Dec 2005 19:34:25 -0000
@@ -1399,12 +1399,15 @@
<menu id="messageMenu" label="&msgMenu.label;" accesskey="&msgMenu.accesskey;">
<menupopup id="messageMenuPopup" onpopupshowing="InitMessageMenu();">
<menuitem id="newMsgCmd" label="&newMsgCmd.label;"
accesskey="&newMsgCmd.accesskey;"
key="key_newMessage"
oncommand="MsgNewMessage(null);"/>
+ <menuitem id="newHtmlMsgCmd" label="New HTML Message"
+ accesskey="H"
+ oncommand="MsgNewHtmlMessage();"/>
<menuitem id="replyMainMenu" label="&replyMsgCmd.label;"
accesskey="&replyMsgCmd.accesskey;"
key="key_reply"
observes="cmd_reply"/>
<menuitem id="replySenderMainMenu" label="&replySenderCmd.label;"
accesskey="&replySenderCmd.accesskey;"

3
l10n.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b49cbb080c3b8ae19fed8d6da9366c5b970f7cc930cb3fd0aeec6a4f9406d2f9
size 5323798

48
lightning.patch Normal file
View File

@ -0,0 +1,48 @@
Index: extensions/xmlextras/build/src/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/extensions/xmlextras/build/src/Makefile.in,v
retrieving revision 1.42
diff -u -p -r1.42 Makefile.in
--- extensions/xmlextras/build/src/Makefile.in 4 Apr 2005 18:38:18 -0000 1.42
+++ extensions/xmlextras/build/src/Makefile.in 27 Oct 2005 08:17:33 -0000
@@ -52,6 +52,8 @@ IS_COMPONENT = 1
MODULE_NAME = nsXMLExtrasModule
GRE_MODULE = 1
MOZILLA_INTERNAL_API = 1
+# for lightning XPI build
+FORCE_USE_PIC = 1
PACKAGE_FILE = xmlextras.pkg
Index: extensions/xmlextras/base/src/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/extensions/xmlextras/base/src/Makefile.in,v
retrieving revision 1.22
diff -u -r1.22 Makefile.in
--- extensions/xmlextras/base/src/Makefile.in 17 Jun 2005 12:07:48 -0000 1.22
+++ extensions/xmlextras/base/src/Makefile.in 27 Oct 2005 08:44:20 -0000
@@ -45,6 +45,8 @@
MODULE = xmlextras
LIBRARY_NAME = xmlextrasbase_s
MOZILLA_INTERNAL_API = 1
+# needed for lightning XPI
+FORCE_USE_PIC = 1
REQUIRES = xpcom \
string \
Index: extensions/xmlextras/pointers/src/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/extensions/xmlextras/pointers/src/Makefile.in,v
retrieving revision 1.3
diff -u -r1.3 Makefile.in
--- extensions/xmlextras/pointers/src/Makefile.in 4 Apr 2005 18:38:18 -0000 1.3
+++ extensions/xmlextras/pointers/src/Makefile.in 27 Oct 2005 09:13:58 -0000
@@ -45,6 +45,8 @@
MODULE = xmlextras
LIBRARY_NAME = xmlextraspointers_s
MOZILLA_INTERNAL_API = 1
+# needed for lightning XPI
+FORCE_USE_PIC = 1
REQUIRES = xpcom \
string \

141
list-replyto-clobber.patch Normal file
View File

@ -0,0 +1,141 @@
Index: mailnews/mailnews.js
===================================================================
RCS file: /cvsroot/mozilla/mailnews/mailnews.js,v
retrieving revision 3.249
diff -u -r3.249 mailnews.js
--- mailnews/mailnews.js 9 Aug 2005 00:36:31 -0000 3.249
+++ mailnews/mailnews.js 15 Aug 2005 01:12:06 -0000
@@ -196,6 +196,7 @@
pref("mailnews.reply_header_locale", "");
pref("mailnews.reply_header_authorwrote", "chrome://messenger/locale/messengercompose/composeMsgs.properties");
pref("mailnews.reply_header_ondate", "chrome://messenger/locale/messengercompose/composeMsgs.properties");
+pref("mailnews.clobber_list_reply", false);
// separator to separate between date and author
pref("mailnews.reply_header_separator", ", ");
--- mailnews/compose/src/nsMsgCompose.cpp.old 2006-08-14 09:32:18.000000000 +0200
+++ mailnews/compose/src/nsMsgCompose.cpp 2006-08-14 09:44:25.000000000 +0200
@@ -2106,6 +2106,7 @@ NS_IMETHODIMP QuotingOutputStreamListene
nsAutoString messageId;
nsAutoString references;
nsAutoString listPost;
+ PRBool clobberListReply = PR_FALSE;
nsXPIDLCString outCString;
PRBool needToRemoveDup = PR_FALSE;
if (!mMimeConverter)
@@ -2115,6 +2116,77 @@ NS_IMETHODIMP QuotingOutputStreamListene
}
nsXPIDLCString charset;
compFields->GetCharacterSet(getter_Copies(charset));
+
+ nsCOMPtr<nsIPrefBranch> prefBranch (do_GetService(NS_PREFSERVICE_CONTRACTID));
+ if (prefBranch)
+ prefBranch->GetBoolPref("mailnews.clobber_list_reply", &clobberListReply);
+
+ mHeaders->ExtractHeader(HEADER_REPLY_TO, PR_FALSE, getter_Copies(outCString));
+ if (outCString)
+ mMimeConverter->DecodeMimeHeader(outCString, replyTo, charset);
+
+ mHeaders->ExtractHeader(HEADER_MAIL_REPLY_TO, PR_TRUE, getter_Copies(outCString));
+ if (outCString)
+ mMimeConverter->DecodeMimeHeader(outCString, mailReplyTo, charset);
+
+ if (clobberListReply) {
+ /* the 'Al fix'. Try to fake up Mail-Reply-To: and Mail-Followup-To: headers if
+ * we don't have any, and if it looks like it came via a mailing list.
+ *
+ * Currently only supports List-Post header.
+ */
+
+ mHeaders->ExtractHeader(HEADER_MAIL_FOLLOWUP_TO, PR_TRUE, getter_Copies(outCString));
+ if (outCString)
+ mMimeConverter->DecodeMimeHeader(outCString, mailFollowupTo, charset);
+
+ if (mailFollowupTo.IsEmpty()) {
+ nsAutoString mailingList;
+
+ mHeaders->ExtractHeader(HEADER_LIST_POST, PR_TRUE, getter_Copies(outCString));
+ if (outCString)
+ {
+ mMimeConverter->DecodeMimeHeader(outCString, mailingList, charset);
+ /* s/<mailto:(.*)>/$1/; */
+ if (StringBeginsWith(mailingList, NS_LITERAL_STRING("<mailto:")) &&
+ StringEndsWith(mailingList, NS_LITERAL_STRING(">"))) {
+
+ mailingList = Substring(mailingList, 8, mailingList.Length() - 9);
+ }
+ }
+
+ mailFollowupTo = mailingList;
+ }
+
+ if (mailReplyTo.IsEmpty()) {
+ nsAutoString from;
+ nsAutoString xReplyTo;
+
+ mHeaders->ExtractHeader(HEADER_FROM, PR_FALSE, getter_Copies(outCString));
+ if (outCString)
+ {
+ mMimeConverter->DecodeMimeHeader(outCString, from, charset);
+ }
+
+ mHeaders->ExtractHeader(HEADER_X_REPLY_TO, PR_FALSE, getter_Copies(outCString));
+ if (outCString)
+ {
+ mMimeConverter->DecodeMimeHeader(outCString, xReplyTo, charset);
+ }
+
+ if (replyTo == mailFollowupTo) {
+ if (!xReplyTo.IsEmpty()) {
+ mailReplyTo = xReplyTo;
+ }
+ else {
+ mailReplyTo = from;
+ }
+ }
+ else {
+ mailReplyTo = replyTo;
+ }
+ }
+ }
if (type == nsIMsgCompType::ReplyAll)
{
@@ -2129,11 +2201,13 @@ NS_IMETHODIMP QuotingOutputStreamListene
{
mMimeConverter->DecodeMimeHeader(outCString, cc, charset);
}
-
- mHeaders->ExtractHeader(HEADER_MAIL_FOLLOWUP_TO, PR_TRUE, getter_Copies(outCString));
- if (outCString)
- {
- mMimeConverter->DecodeMimeHeader(outCString, mailFollowupTo, charset);
+
+ if (!clobberListReply) { // else we've already looked this up earlier
+ mHeaders->ExtractHeader(HEADER_MAIL_FOLLOWUP_TO, PR_TRUE, getter_Copies(outCString));
+ if (outCString)
+ {
+ mMimeConverter->DecodeMimeHeader(outCString, mailFollowupTo, charset);
+ }
}
if (! mailFollowupTo.IsEmpty())
@@ -2174,18 +2248,6 @@ NS_IMETHODIMP QuotingOutputStreamListene
}
}
- mHeaders->ExtractHeader(HEADER_REPLY_TO, PR_FALSE, getter_Copies(outCString));
- if (outCString)
- {
- mMimeConverter->DecodeMimeHeader(outCString, replyTo, charset);
- }
-
- mHeaders->ExtractHeader(HEADER_MAIL_REPLY_TO, PR_TRUE, getter_Copies(outCString));
- if (outCString)
- {
- mMimeConverter->DecodeMimeHeader(outCString, mailReplyTo, charset);
- }
-
mHeaders->ExtractHeader(HEADER_NEWSGROUPS, PR_FALSE, getter_Copies(outCString));
if (outCString)
{

11
locale.patch Normal file
View File

@ -0,0 +1,11 @@
--- modules/libpref/src/init/all.js.orig 2004-10-15 14:50:11.740865580 +0200
+++ modules/libpref/src/init/all.js 2004-10-15 14:50:34.371625152 +0200
@@ -653,7 +653,7 @@
pref("intl.charset.detector", "chrome://navigator/locale/navigator.properties");
pref("intl.charset.default", "chrome://navigator-platform/locale/navigator.properties");
pref("intl.content.langcode", "chrome://communicator-region/locale/region.properties");
-pref("intl.locale.matchOS", false);
+pref("intl.locale.matchOS", true);
// fallback charset list for Unicode conversion (converting from Unicode)
// currently used for mail send only to handle symbol characters (e.g Euro, trademark, smartquotes)
// for ISO-8859-1

3
mailredirect-0.7.4.xpi Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:29ae7e31d8d611626aa69a1079a45c94b9a40025eaf53e3972a22dcbba8568d1
size 105999

11
mips-buildfix.diff Normal file
View File

@ -0,0 +1,11 @@
--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s.m4.orig 2003-10-31 10:06:36.000000000 +0000
+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s.m4 2003-10-31 10:07:06.000000000 +0000
@@ -36,7 +36,7 @@
LOCALSZ=2 # gp, ra
FRAMESZ=(((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK
-define(STUB_NAME, `Stub'$1`__14nsXPTCStubBase')
+define(STUB_NAME, ```_ZN14nsXPTCStubBase'len(Stub'$1`)Stub'$1`Ev'')
define(STUB_ENTRY,
` .globl 'STUB_NAME($1)`

20
misc.dif Normal file
View File

@ -0,0 +1,20 @@
--- gfx/src/x11shared/nsFT2FontCatalog.cpp
+++ gfx/src/x11shared/nsFT2FontCatalog.cpp
@@ -49,6 +49,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <time.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <dirent.h>
@@ -92,9 +93,6 @@
// Called to get the TrueType font summary from the disk font catalog.
//
-// Solaris is missing a prototype for ctime
-extern "C" {char *ctime(const time_t *timep);}
-
#include <ft2build.h>
#include FT_GLYPH_H
#include FT_FREETYPE_H

141
mozilla.sh.in Normal file
View File

@ -0,0 +1,141 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# 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 Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Wolfgang Rosenauer <wolfgang.rosenauer@suse.de>
#
##
## Usage:
##
## $ mozilla
##
## This script is meant to run a mozilla program from the mozilla
## rpm installation.
##
## The script will setup all the environment voodoo needed to make
## mozilla work.
cmdname=`basename $0`
##
## Variables
##
MOZ_DIST_BIN="%PREFIX"
MOZ_DIST_LIB="%PROGDIR"
MOZ_APPNAME="%APPNAME"
MOZ_PROFILE="%PROFILE"
MOZ_PROGRAM="$MOZ_DIST_LIB/$MOZ_APPNAME-bin"
# enigmail should honor env
export ENIGMAIL_PASS_ENV=http_proxy
# AOSS
AOSS=$(which aoss)
# ignore composite extension
export XLIB_SKIP_ARGB_VISUALS=1
# Pango support
if [ -z "$MOZ_ENABLE_PANGO" -a -z "$MOZ_DISABLE_PANGO" ]; then
case "${LC_ALL-${LC_CTYPE-${LANG-en_US}}}" in
bn*|gu*|hi*|km*|kn*|ml*|mr*|pa*|ta*|te*) # list of languages which need pango
;;
*)
export MOZ_DISABLE_PANGO=1 # disable by default
;;
esac
fi
##
## Set MOZILLA_FIVE_HOME
##
MOZILLA_FIVE_HOME="$MOZ_DIST_LIB"
export MOZILLA_FIVE_HOME
##
## Set LD_LIBRARY_PATH
##
if [ "$LD_LIBRARY_PATH" ]
then
LD_LIBRARY_PATH=$MOZ_DIST_LIB/plugins:$MOZ_DIST_LIB:$LD_LIBRARY_PATH
else
LD_LIBRARY_PATH=$MOZ_DIST_LIB/plugins:$MOZ_DIST_LIB
fi
export LD_LIBRARY_PATH
## Make sure that we set the plugin path for backwards compatibility
## Set MOZ_PLUGIN_PATH to $HOME/.mozilla/plugins if not set
##
if [ -z "$MOZ_PLUGIN_PATH" ]; then
export MOZ_PLUGIN_PATH=$MOZILLA_FIVE_HOME/plugins
if [ "$HOME" ] ; then
export MOZ_PLUGIN_PATH=$HOME/$MOZ_PROFILE/plugins:$MOZ_PLUGIN_PATH
fi
fi
moz_pis_startstop_scripts()
{
MOZ_USER_DIR="$MOZ_PROFILE"
# MOZ_PIS_ is the name space for "Mozilla Plugable Init Scripts"
# These variables and there meaning are specified in
# mozilla/xpfe/bootstrap/init.d/README
MOZ_PIS_API=2
MOZ_PIS_MOZBINDIR="$MOZ_DIST_LIB"
MOZ_PIS_SESSION_PID="$$"
MOZ_PIS_USER_DIR="${MOZ_USER_DIR}"
export MOZ_PIS_API MOZ_PIS_MOZBINDIR MOZ_PIS_SESSION_PID MOZ_PIS_USER_DIR
case "${1}" in
"start")
for curr_pis in "$MOZ_DIST_LIB/init.d"/S* "${HOME}/${MOZ_USER_DIR}/init.d"/S* ; do
if [ -x "${curr_pis}" ] ; then
case "${curr_pis}" in
*.sh) . "${curr_pis}" ;;
*) "${curr_pis}" "start" ;;
esac
fi
done
;;
"stop")
for curr_pis in "${HOME}/${MOZ_USER_DIR}/init.d"/K* "$MOZ_DIST_LIB/init.d"/K* ; do
if [ -x "${curr_pis}" ] ; then
case "${curr_pis}" in
*.sh) . "${curr_pis}" ;;
*) "${curr_pis}" "stop" ;;
esac
fi
done
;;
*)
echo 1>&2 "$0: Internal error in moz_pis_startstop_scripts."
exit 1
;;
esac
}
## Start addon scripts
moz_pis_startstop_scripts "start"
$AOSS $MOZ_PROGRAM $@
## Stop addon scripts
moz_pis_startstop_scripts "stop"
exit 0

32
multi-replyto.patch Normal file
View File

@ -0,0 +1,32 @@
Index: mail/base/content/msgHdrViewOverlay.js
===================================================================
RCS file: /cvsroot/mozilla/mail/base/content/msgHdrViewOverlay.js,v
retrieving revision 1.56.2.4.2.1
diff -u -r1.56.2.4.2.1 msgHdrViewOverlay.js
--- mail/base/content/msgHdrViewOverlay.js 6 Jan 2006 00:55:18 -0000 1.56.2.4.2.1
+++ mail/base/content/msgHdrViewOverlay.js 4 Mar 2006 20:25:42 -0000
@@ -128,7 +128,7 @@
var gExpandedHeaderList = [ {name:"subject"},
{name:"from", outputFunction:OutputEmailAddresses},
{name:"sender", outputFunction:OutputEmailAddresses},
- {name:"reply-to", outputFunction:OutputEmailAddresses},
+ {name:"reply-to", useToggle:true, outputFunction:OutputEmailAddresses},
{name:"date"},
{name:"to", useToggle:true, outputFunction:OutputEmailAddresses},
{name:"cc", useToggle:true, outputFunction:OutputEmailAddresses},
Index: mail/base/content/msgHdrViewOverlay.xul
===================================================================
RCS file: /cvsroot/mozilla/mail/base/content/msgHdrViewOverlay.xul,v
retrieving revision 1.14
diff -u -r1.14 msgHdrViewOverlay.xul
--- mail/base/content/msgHdrViewOverlay.xul 2 Aug 2005 22:31:24 -0000 1.14
+++ mail/base/content/msgHdrViewOverlay.xul 4 Mar 2006 20:26:37 -0000
@@ -147,7 +147,7 @@
<mail-emailheaderfield id="expandedfromBox" label="&fromField.label;" collapsed="true"/>
<mail-emailheaderfield id="expandedsenderBox" label="&senderField.label;" collapsed="true"/>
<mail-headerfield id="expandedorganizationBox" label="&organizationField.label;" collapsed="true"/>
- <mail-emailheaderfield id="expandedreply-toBox" label="&replyToField.label;" collapsed="true"/>
+ <mail-multi-emailHeaderField id="expandedreply-toBox" label="&replyToField.label;" collapsed="true"/>
<mail-headerfield keywordrelated="true" id="expandeddateBox" label="&dateField.label;" collapsed="true"/>

17
nspr-prdtoa.patch Normal file
View File

@ -0,0 +1,17 @@
--- nsprpub/pr/src/misc/Makefile.in.foo Wed Jun 11 15:42:57 2003
+++ nsprpub/pr/src/misc/Makefile.in Wed Jun 11 15:42:49 2003
@@ -82,6 +82,14 @@
include $(topsrcdir)/config/rules.mk
+NONOPT_CFLAGS=$(filter-out -O%, $(CFLAGS))
+
+ifeq ($(OS_ARCH),Linux)
+$(OBJDIR)/prdtoa.$(OBJ_SUFFIX): prdtoa.c
+ @$(MAKE_OBJDIR)
+ $(CC) -o $@ -c $(NONOPT_CFLAGS) -ffloat-store $<
+endif
+
#
# Generate prerr.h, prerr.c, and prerr.properties from prerr.et.
#

25
nss-opt.patch Normal file
View File

@ -0,0 +1,25 @@
From: Wolfgang Rosenauer <stark@suse.de>
Subject: NSS doesn't inherit CFLAGS
References: https://bugzilla.mozilla.org/show_bug.cgi?id=101249
Description:
CFLAGS are not taken from mozilla build
Index: security/manager/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/security/manager/Makefile.in,v
retrieving revision 1.52
diff -u -r1.52 Makefile.in
--- security/manager/Makefile.in 7 Jan 2004 13:36:50 -0000 1.52
+++ security/manager/Makefile.in 10 Mar 2004 09:44:29 -0000
@@ -71,7 +71,10 @@
ifneq ($(ABS_topsrcdir),$(MOZ_BUILD_ROOT))
DEFAULT_GMAKE_FLAGS += BUILD_TREE=$(MOZ_BUILD_ROOT)
endif
-ifndef MOZ_DEBUG
+ifdef MOZ_DEBUG
+DEFAULT_GMAKE_FLAGS += OPTIMIZER="$(MOZ_DEBUG_FLAGS)"
+else
+DEFAULT_GMAKE_FLAGS += OPTIMIZER="$(MOZ_OPTIMIZE_FLAGS)"
DEFAULT_GMAKE_FLAGS += BUILD_OPT=1
endif
ifdef GNU_CC

5556
pango-cairo.patch Normal file

File diff suppressed because it is too large Load Diff

38
postscript.patch Normal file
View File

@ -0,0 +1,38 @@
From: Wolfgang Rosenauer <stark@suse.de>
Subject: make pagesize postscript DSC conform
References:
http://www.cups.org/str.php?L1542
https://bugzilla.mozilla.org/show_bug.cgi?id=334485
Index: gfx/src/ps/nsPostScriptObj.cpp
===================================================================
RCS file: /cvsroot/mozilla/gfx/src/ps/nsPostScriptObj.cpp,v
retrieving revision 1.124
diff -u -p -6 -r1.124 nsPostScriptObj.cpp
--- gfx/src/ps/nsPostScriptObj.cpp 26 Jul 2005 15:54:18 -0000 1.124
+++ gfx/src/ps/nsPostScriptObj.cpp 25 Apr 2006 18:10:34 -0000
@@ -463,20 +463,23 @@ nsPostScriptObj::write_prolog(FILE *aHan
// now begin prolog
fprintf(f, "%%%%BeginProlog\n");
// Tell the printer what size paper it should use
fprintf(f,
+ "%%%%BeginFeature: *PageSize %s\n"
"/setpagedevice where\n" // Test for the feature
"{ pop 2 dict\n"
" dup /PageSize [ %s %s ] put\n" // Paper dimensions
" dup /Policies 1 dict\n"
" dup /PageSize 3 put\n" // Select the nearest page size to fit
" put\n"
" setpagedevice\n" // Install settings
- "} if\n",
+ "} if\n"
+ "%%%%EndFeature\n",
+ mPrintSetup->paper_name,
fpCString(NSTwipsToFloatPoints(paper_width)).get(),
fpCString(NSTwipsToFloatPoints(paper_height)).get());
fprintf(f, "[");
for (i = 0; i < 256; i++){
if (*isotab[i] == '\0'){

23
ppc64.patch Normal file
View File

@ -0,0 +1,23 @@
--- mozilla/security/coreconf/Linux.mk.foo 2003-10-01 13:06:30.000000000 -0400
+++ mozilla/security/coreconf/Linux.mk 2003-10-01 13:07:22.000000000 -0400
@@ -53,7 +53,11 @@
ifeq ($(OS_TEST),m68k)
OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
CPU_ARCH = m68k
-else
+else
+ifeq ($(OS_TEST),ppc64)
+ OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
+ CPU_ARCH = ppc64
+else
ifeq ($(OS_TEST),ppc)
OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE
CPU_ARCH = ppc
@@ -112,6 +116,7 @@
endif
endif
endif
+endif
LIBC_TAG = _glibc

254
print-properties.patch Normal file
View File

@ -0,0 +1,254 @@
Subject: Printer properties are not saved and displayed correctly
References:
https://bugzilla.mozilla.org/show_bug.cgi?id=324072
https://bugzilla.novell.com/show_bug.cgi?id=174082
https://bugzilla.mozilla.org/show_bug.cgi?id=342950
https://bugzilla.novell.com/show_bug.cgi?id=187013
Index: idl/nsIPrintSettingsService.idl
===================================================================
RCS file: /cvsroot/mozilla/gfx/idl/Attic/nsIPrintSettingsService.idl,v
retrieving revision 1.2
diff -p -u -d -8 -r1.2 nsIPrintSettingsService.idl
--- idl/nsIPrintSettingsService.idl 17 Apr 2004 21:52:27 -0000 1.2
+++ gfx/idl/nsIPrintSettingsService.idl 11 May 2006 21:51:04 -0000
@@ -67,17 +67,17 @@ interface nsIPrintSettingsService : nsIS
* then it should use "globalPrintSettings"
*
* Initializes the newPrintSettings from the default printer
*
*/
readonly attribute nsIPrintSettings newPrintSettings;
/**
- * The name of the default printer
+ * The name of the last printer used, or else the system default printer.
*/
readonly attribute wstring defaultPrinterName;
/**
* Initializes certain settings from the native printer into the PrintSettings
* if aPrinterName is null then it uses the default printer name if it can
* These settings include, but are not limited to:
* Page Orientation
@@ -85,28 +85,31 @@ interface nsIPrintSettingsService : nsIS
* Number of Copies
*/
void initPrintSettingsFromPrinter(in wstring aPrinterName, in nsIPrintSettings aPrintSettings);
/**
* Reads PrintSettings values from Prefs,
* the values to be read are indicated by the "flags" arg.
*
- * First it reads in the "generic" set of PrintSetings not associated with any printer
- * then it uses the PrinterName in the PrinterSettings to read any settings that were saved
+ * aPrintSettings should be initialized with the name of a printer. First
+ * it reads in the PrintSettings from the last print job. Then it uses the
+ * PrinterName in the PrinterSettings to read any settings that were saved
* just for that printer.
*
* aPS - PrintSettings to have its settings read
* aUsePrinterNamePrefix - indicates whether to use the printer name as a prefix
- * aFlags - indicates which prefs to read, see nsIPrintSettings.idl for the const values.
+ * aFlags - indicates which prefs to read, see nsIPrintSettings.idl for the
+ * const values.
*
* Items not read:
* startPageRange, endPageRange, scaling, printRange, title
* docURL, howToEnableFrameUI, isCancelled, printFrameTypeUsage
- * printFrameType, printSilent, shrinkToFit, numCopies
+ * printFrameType, printSilent, shrinkToFit, numCopies,
+ * printerName
*
*/
void initPrintSettingsFromPrefs(in nsIPrintSettings aPrintSettings, in boolean aUsePrinterNamePrefix, in unsigned long aFlags);
/**
* Writes PrintSettings values to Prefs,
* the values to be written are indicated by the "flags" arg.
*
Index: gfx/src/nsPrintOptionsImpl.cpp
===================================================================
RCS file: /cvsroot/mozilla/gfx/src/Attic/nsPrintOptionsImpl.cpp,v
retrieving revision 1.76
diff -p -u -d -8 -r1.76 nsPrintOptionsImpl.cpp
--- src/nsPrintOptionsImpl.cpp 9 Aug 2005 01:35:48 -0000 1.76
+++ gfx/src/nsPrintOptionsImpl.cpp 11 May 2006 21:51:05 -0000
@@ -597,23 +597,16 @@ nsPrintOptions::ReadPrefs(nsIPrintSettin
if (aFlags & nsIPrintSettings::kInitSavePrintCommand) {
if (GETSTRPREF(kPrintCommand, str)) {
aPS->SetPrintCommand(str.get());
DUMP_STR(kReadStr, kPrintCommand, str.get());
}
}
- if (aFlags & nsIPrintSettings::kInitSavePrinterName) {
- if (GETSTRPREF(kPrinterName, str)) {
- aPS->SetPrinterName(str.get());
- DUMP_STR(kReadStr, kPrinterName, str.get());
- }
- }
-
if (aFlags & nsIPrintSettings::kInitSavePrintToFile) {
if (GETBOOLPREF(kPrintToFile, &b)) {
aPS->SetPrintToFile(b);
DUMP_BOOL(kReadStr, kPrintToFile, b);
}
}
if (aFlags & nsIPrintSettings::kInitSaveToFileName) {
@@ -865,20 +858,22 @@ nsPrintOptions::WritePrefs(nsIPrintSetti
if (aFlags & nsIPrintSettings::kInitSavePrintCommand) {
if (NS_SUCCEEDED(aPS->GetPrintCommand(&uStr))) {
DUMP_STR(kWriteStr, kPrintCommand, uStr);
WritePrefString(uStr, GetPrefName(kPrintCommand, aPrinterName));
}
}
- if (aFlags & nsIPrintSettings::kInitSavePrinterName) {
+ // Only the general version of this pref is saved
+ if ((aFlags & nsIPrintSettings::kInitSavePrinterName)
+ && aPrinterName.IsEmpty()) {
if (NS_SUCCEEDED(aPS->GetPrinterName(&uStr))) {
DUMP_STR(kWriteStr, kPrinterName, uStr);
- WritePrefString(uStr, GetPrefName(kPrinterName, aPrinterName));
+ WritePrefString(uStr, kPrinterName);
}
}
if (aFlags & nsIPrintSettings::kInitSavePrintToFile) {
if (NS_SUCCEEDED(aPS->GetPrintToFile(&b))) {
DUMP_BOOL(kWriteStr, kPrintToFile, b);
mPrefBranch->SetBoolPref(GetPrefName(kPrintToFile, aPrinterName), b);
}
@@ -965,16 +960,22 @@ NS_IMETHODIMP nsPrintOptions::GetNativeD
nsresult nsPrintOptions::_CreatePrintSettings(nsIPrintSettings **_retval)
{
// does not initially ref count
nsPrintSettings * printSettings = new nsPrintSettings();
NS_ENSURE_TRUE(printSettings, NS_ERROR_OUT_OF_MEMORY);
NS_ADDREF(*_retval = printSettings); // ref count
+
+ nsXPIDLString printerName;
+ nsresult rv = GetDefaultPrinterName(getter_Copies(printerName));
+ NS_ENSURE_SUCCESS(rv, rv);
+ (*_retval)->SetPrinterName(printerName.get());
+
(void)InitPrintSettingsFromPrefs(*_retval, PR_FALSE,
nsIPrintSettings::kInitSaveAll);
return NS_OK;
}
NS_IMETHODIMP nsPrintOptions::CreatePrintSettings(nsIPrintSettings **_retval)
{
@@ -1003,16 +1004,42 @@ nsPrintOptions::GetNewPrintSettings(nsIP
NS_IMETHODIMP
nsPrintOptions::GetDefaultPrinterName(PRUnichar * *aDefaultPrinterName)
{
nsresult rv;
nsCOMPtr<nsIPrinterEnumerator> prtEnum = do_GetService(kPrinterEnumeratorCID,
&rv);
NS_ENSURE_SUCCESS(rv, rv);
+ // Look up the printer from the last print job
+ nsAutoString lastPrinterName;
+ ReadPrefString(kPrinterName, lastPrinterName);
+ if (!lastPrinterName.IsEmpty()) {
+ // Verify it's still a valid printer
+ PRUnichar **printers;
+ PRUint32 ctPrinters;
+ rv = prtEnum->EnumeratePrinters(&ctPrinters, &printers);
+ if (NS_SUCCEEDED(rv)) {
+ PRBool isValid = PR_FALSE;
+ for (PRInt32 ii = ctPrinters - 1; ii >= 0; --ii) {
+ if (lastPrinterName.Equals(printers[ii])) {
+ isValid = PR_TRUE;
+ break;
+ }
+ }
+ NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(ctPrinters, printers);
+ if (isValid) {
+ *aDefaultPrinterName = ToNewUnicode(lastPrinterName);
+ return NS_OK;
+ }
+ }
+ }
+
+ // There is no last printer preference, or it doesn't name a valid printer.
+ // Return the default from the printer enumeration.
return prtEnum->GetDefaultPrinterName(aDefaultPrinterName);
}
NS_IMETHODIMP
nsPrintOptions::InitPrintSettingsFromPrinter(const PRUnichar *aPrinterName,
nsIPrintSettings *aPrintSettings)
{
NS_ENSURE_ARG_POINTER(aPrintSettings);
@@ -1124,49 +1151,50 @@ nsPrintOptions::InitPrintSettingsFromPre
nsAutoString prtName;
// read any non printer specific prefs
// with empty printer name
nsresult rv = ReadPrefs(aPS, prtName, aFlags);
NS_ENSURE_SUCCESS(rv, rv);
// Get the Printer Name from the PrintSettings
// to use as a prefix for Pref Names
- GetAdjustedPrinterName(aPS, aUsePNP, prtName);
- NS_ENSURE_FALSE(prtName.IsEmpty(), NS_OK);
+ rv = GetAdjustedPrinterName(aPS, aUsePNP, prtName);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ if (prtName.IsEmpty()) {
+ NS_WARNING("Caller should supply a printer name.");
+ return NS_OK;
+ }
// Now read any printer specific prefs
rv = ReadPrefs(aPS, prtName, aFlags);
if (NS_SUCCEEDED(rv))
aPS->SetIsInitializedFromPrefs(PR_TRUE);
return NS_OK;
}
-/** ---------------------------------------------------
- * This will save into prefs most all the PrintSettings either generically (not
- * specified printer) or to a specific printer.
+/**
+ * Save all of the printer settings; if we can find a printer name, save
+ * printer-specific preferences. Otherwise, save generic ones.
*/
nsresult
nsPrintOptions::SavePrintSettingsToPrefs(nsIPrintSettings *aPS,
PRBool aUsePrinterNamePrefix,
PRUint32 aFlags)
{
NS_ENSURE_ARG_POINTER(aPS);
nsAutoString prtName;
- // Get the Printer Name from the PrinterSettings
- // to use as a prefix for Pref Names
+ // Get the printer name from the PrinterSettings for an optional prefix.
nsresult rv = GetAdjustedPrinterName(aPS, aUsePrinterNamePrefix, prtName);
NS_ENSURE_SUCCESS(rv, rv);
- // Now write any printer specific prefs
- // XXX but when |prtName| is empty, how can we write printer specific prefs?
- rv = WritePrefs(aPS, prtName, aFlags);
-
- return rv;
+ // Write the prefs, with or without a printer name prefix.
+ return WritePrefs(aPS, prtName, aFlags);
}
//-----------------------------------------------------
//-- Protected Methods --------------------------------
//-----------------------------------------------------
nsresult
nsPrintOptions::ReadPrefString(const char * aPrefId, nsAString& aString)

0
ready Normal file
View File

306
remote.patch Normal file
View File

@ -0,0 +1,306 @@
Index: widget/public/nsIXRemoteClient.idl
===================================================================
RCS file: /cvsroot/mozilla/widget/public/nsIXRemoteClient.idl,v
retrieving revision 1.2
diff -u -p -6 -r1.2 nsIXRemoteClient.idl
--- widget/public/nsIXRemoteClient.idl 8 Apr 2004 14:01:15 -0000 1.2
+++ widget/public/nsIXRemoteClient.idl 22 Feb 2005 08:18:43 -0000
@@ -26,13 +26,13 @@
[scriptable, uuid(0bafc924-1dd2-11b2-8345-b59762ae0df7)]
interface nsIXRemoteClient : nsISupports
{
/**
* Initializes the client
*/
- void init();
+ void init(in string aDisplay);
/**
* Sends a command to a running instance. If it returns false then
* there is no running instance.
*
* @param aProgram This is the preferred program that we want to use
Index: widget/src/xremoteclient/XRemoteClient.cpp
===================================================================
RCS file: /cvsroot/mozilla/widget/src/xremoteclient/XRemoteClient.cpp,v
retrieving revision 1.14
diff -u -p -6 -r1.14 XRemoteClient.cpp
--- widget/src/xremoteclient/XRemoteClient.cpp 8 Apr 2004 14:01:16 -0000 1.14
+++ widget/src/xremoteclient/XRemoteClient.cpp 22 Feb 2005 08:19:31 -0000
@@ -77,20 +77,20 @@ XRemoteClient::~XRemoteClient()
#ifndef XREMOTE_STANDALONE
NS_IMPL_ISUPPORTS1(XRemoteClient, nsIXRemoteClient)
#endif
NS_IMETHODIMP
-XRemoteClient::Init (void)
+XRemoteClient::Init (const char *aDisplay)
{
PR_LOG(sRemoteLm, PR_LOG_DEBUG, ("XRemoteClient::Init"));
if (mInitialized)
return NS_OK;
// try to open the display
- mDisplay = XOpenDisplay(0);
+ mDisplay = XOpenDisplay(aDisplay);
if (!mDisplay)
return NS_ERROR_FAILURE;
// get our atoms
mMozVersionAtom = XInternAtom(mDisplay, MOZILLA_VERSION_PROP, False);
mMozLockAtom = XInternAtom(mDisplay, MOZILLA_LOCK_PROP, False);
Index: widget/src/xremoteclient/mozilla-xremote-client.cpp
===================================================================
RCS file: /cvsroot/mozilla/widget/src/xremoteclient/mozilla-xremote-client.cpp,v
retrieving revision 1.3
diff -u -p -6 -r1.3 mozilla-xremote-client.cpp
--- widget/src/xremoteclient/mozilla-xremote-client.cpp 8 Apr 2004 14:01:16 -0000 1.3
+++ widget/src/xremoteclient/mozilla-xremote-client.cpp 22 Feb 2005 08:21:37 -0000
@@ -37,29 +37,42 @@
* ***** END LICENSE BLOCK ***** */
#include <stdio.h>
#include <stdlib.h>
#include <plgetopt.h>
#include "XRemoteClient.h"
+#include <string.h>
static void print_usage(void);
int main(int argc, char **argv)
{
nsresult rv;
XRemoteClient client;
char *browser = 0;
char *profile = 0;
char *username = 0;
char *command = 0;
+ char *display = 0;
+ PRInt32 i = 0;
if (argc < 2) {
print_usage();
return 4;
}
+ for (i=1; i < argc - 1; i++) {
+ if (strcmp(argv[i], "--display") == 0) {
+ display = argv[i + 1];
+ /* Now remove the --display parameters from the command line */
+ memmove(&argv[i], &argv[i + 2], sizeof(argv[i])*(argc - (i + 2)));
+ argc -= 2;
+ break;
+ }
+ }
+
PLOptStatus os;
PLOptState *opt = PL_CreateOptState(argc, argv, "ha:u:p:");
while (PL_OPT_EOL != (os = PL_GetNextOpt(opt))) {
if (PL_OPT_BAD == os) {
print_usage();
return 4;
@@ -83,13 +96,13 @@ int main(int argc, char **argv)
command = strdup(opt->value);
default:
break;
}
}
- rv = client.Init();
+ rv = client.Init(display);
// failed to connect to the X server
if (NS_FAILED(rv))
return 1;
// send the command - it doesn't get any easier than this
PRBool success = PR_FALSE;
@@ -120,10 +133,11 @@ int main(int argc, char **argv)
// else, everything is fine.
return 0;
}
/* static */
void print_usage(void) {
- fprintf(stderr, "Usage: mozilla-xremote-client [-a firefox|thunderbird|mozilla|any]\n");
+ fprintf(stderr, "Usage: mozilla-xremote-client [--display DISPLAY]\n");
+ fprintf(stderr, " [-a firefox|thunderbird|mozilla|any]\n");
fprintf(stderr, " [-u <username>]\n");
fprintf(stderr, " [-p <profile>] COMMAND\n");
}
Index: toolkit/xre/nsAppRunner.cpp
===================================================================
RCS file: /cvsroot/mozilla/toolkit/xre/nsAppRunner.cpp,v
retrieving revision 1.27.2.1.4.40
diff -u -p -6 -r1.27.2.1.4.40 nsAppRunner.cpp
--- toolkit/xre/nsAppRunner.cpp 2 Nov 2004 23:27:24 -0000 1.27.2.1.4.40
+++ toolkit/xre/nsAppRunner.cpp 25 Feb 2005 07:49:37 -0000
@@ -977,13 +977,13 @@ DumpVersion()
}
#ifdef MOZ_ENABLE_XREMOTE
// use int here instead of a PR type since it will be returned
// from main - just to keep types consistent
static int
-HandleRemoteArgument(const char* remote)
+HandleRemoteArgument(const char* remote, const char* display)
{
nsresult rv;
ArgResult ar;
const char *profile = 0;
nsCAutoString program(gAppData->appName);
@@ -1019,13 +1019,13 @@ HandleRemoteArgument(const char* remote)
{ // scope the comptr so we don't hold on to XPCOM objects beyond shutdown
// try to get the X remote client
nsCOMPtr<nsIXRemoteClient> client (do_CreateInstance(NS_XREMOTECLIENT_CONTRACTID));
NS_ENSURE_TRUE(client, 1);
// try to init - connects to the X server and stuff
- rv = client->Init();
+ rv = client->Init(display);
if (NS_FAILED(rv)) {
PR_fprintf(PR_STDERR, "Error: Failed to connect to X server.\n");
return 1;
}
nsXPIDLCString response;
@@ -1521,12 +1521,13 @@ public:
~ScopedFPHandler() { PR_OS2_UnsetFloatExcpHandler(&excpreg); }
};
#endif
int xre_main(int argc, char* argv[], const nsXREAppData* aAppData)
{
+ ArgResult ar;
nsresult rv;
NS_TIMELINE_MARK("enter main");
#if defined(DEBUG) && defined(XP_WIN32)
// Disable small heap allocator to get heapwalk() giving us
// accurate heap numbers. Win2k non-debug does not use small heap allocator.
@@ -1633,12 +1634,21 @@ int xre_main(int argc, char* argv[], con
em->Register();
}
return 0;
}
+ // save display argument here to reserve it for -remote
+ // handling (it will be removed from gtk_init)
+ const char *display = nsnull;
+ ar = CheckArg("display", &display);
+ if (ar == ARG_BAD) {
+ PR_fprintf(PR_STDERR, "Error: argument --display requires a display number\n");
+ return 1;
+ }
+
#if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GTK2)
// setup for private colormap. Ideally we'd like to do this
// in nsAppShell::Create, but we need to get in before gtk
// has been initialized to make sure everything is running
// consistently.
if (CheckArg("install"))
@@ -1695,19 +1705,19 @@ int xre_main(int argc, char* argv[], con
}
#ifdef MOZ_ENABLE_XREMOTE
// handle -remote now that xpcom is fired up
const char* xremotearg;
- ArgResult ar = CheckArg("remote", &xremotearg);
+ ar = CheckArg("remote", &xremotearg);
if (ar == ARG_BAD) {
PR_fprintf(PR_STDERR, "Error: -remote requires an argument\n");
return 1;
}
if (ar) {
- return HandleRemoteArgument(xremotearg);
+ return HandleRemoteArgument(xremotearg, display);
}
#endif
nsCOMPtr<nsIProfileLock> profileLock;
PRBool startOffline = PR_FALSE;
Index: xpfe/bootstrap/nsAppRunner.cpp
===================================================================
RCS file: /cvsroot/mozilla/xpfe/bootstrap/nsAppRunner.cpp,v
retrieving revision 1.413.2.1.4.1
diff -u -p -6 -r1.413.2.1.4.1 nsAppRunner.cpp
--- xpfe/bootstrap/nsAppRunner.cpp 10 Jun 2004 20:43:39 -0000 1.413.2.1.4.1
+++ xpfe/bootstrap/nsAppRunner.cpp 28 Feb 2005 09:11:26 -0000
@@ -1402,13 +1402,13 @@ static nsresult DumpVersion(char *appnam
return rv;
}
#ifdef MOZ_ENABLE_XREMOTE
// use int here instead of a PR type since it will be returned
// from main - just to keep types consistent
-static int HandleRemoteArguments(int argc, char* argv[], PRBool *aArgUsed)
+static int HandleRemoteArguments(int argc, char* argv[], char* display, PRBool *aArgUsed)
{
int i = 0;
const char *remote = 0;
const char *profile = 0;
const char *program = 0;
@@ -1463,13 +1463,13 @@ static int HandleRemoteArguments(int arg
nsCOMPtr<nsIXRemoteClient> client (do_CreateInstance(NS_XREMOTECLIENT_CONTRACTID));
if (!client)
return 1;
nsresult rv;
// try to init - connects to the X server and stuff
- rv = client->Init();
+ rv = client->Init(display);
if (NS_FAILED(rv)) {
PR_fprintf(PR_STDERR, "Error: Failed to connect to X server.\n");
return 1;
}
// Make sure to set a username if possible
@@ -1656,12 +1656,28 @@ int main(int argc, char* argv[])
fprintf(stderr, "%s: XInitThreads failure.", argv[0]);
exit(EXIT_FAILURE);
}
}
#endif /* MOZ_X11 */
+ // save --display parameter for possible -remote handling
+ // (it will be lost after gtk_init)
+ char *display = 0;
+ char *param = 0;
+ for (int i=1; i<argc; i++) {
+ if ((PL_strncasecmp(argv[i], "-display", 7) == 0)
+ || (PL_strncasecmp(argv[i], "--display", 8) == 0)) {
+ if ((param = PL_strchr(argv[i], '=')) != NULL)
+ display = PL_strdup(++param);
+ else
+ display = PL_strdup(argv[i + 1]);
+ if (! *display)
+ display = nsnull;
+ }
+ }
+
#if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GTK2)
// setup for private colormap. Ideally we'd like to do this
// in nsAppShell::Create, but we need to get in before gtk
// has been initialized to make sure everything is running
// consistently.
for (int i=1; i<argc; i++)
@@ -1749,13 +1765,13 @@ int main(int argc, char* argv[])
#ifdef MOZ_ENABLE_XREMOTE
// handle -remote now that xpcom is fired up
int remoterv;
PRBool argused = PR_FALSE;
// argused will be true if someone tried to use a -remote flag. We
// always exit in that case.
- remoterv = HandleRemoteArguments(argc, argv, &argused);
+ remoterv = HandleRemoteArguments(argc, argv, display, &argused);
if (argused) {
#ifdef XPCOM_GLUE
GRE_Shutdown();
#else
NS_ShutdownXPCOM(nsnull);

190
replytolist.patch Normal file
View File

@ -0,0 +1,190 @@
Index: mail/base/content/mailCommands.js
===================================================================
RCS file: /cvsroot/mozilla/mail/base/content/mailCommands.js,v
retrieving revision 1.25
diff -u -p -r1.25 mailCommands.js
--- mail/base/content/mailCommands.js 26 Jan 2006 23:48:13 -0000 1.25
+++ mail/base/content/mailCommands.js 6 Apr 2006 02:26:56 -0000
@@ -258,7 +258,10 @@ function ComposeMessage(type, format, fo
var messageIDScheme = messageID ? messageID.split(":")[0] : "";
if (messageIDScheme && (messageIDScheme == 'http' || messageIDScheme == 'https') && "openComposeWindowForRSSArticle" in this)
openComposeWindowForRSSArticle(messageID, hdr, type);
- else if (type == msgComposeType.Reply || type == msgComposeType.ReplyAll || type == msgComposeType.ForwardInline ||
+ else if (type == msgComposeType.Reply ||
+ type == msgComposeType.ReplyAll ||
+ type == msgComposeType.ReplyToList ||
+ type == msgComposeType.ForwardInline ||
type == msgComposeType.ReplyToGroup || type == msgComposeType.ReplyToSender ||
type == msgComposeType.ReplyToSenderAndGroup ||
type == msgComposeType.Template || type == msgComposeType.Draft)
Index: mailnews/base/resources/content/mailCommands.js
===================================================================
RCS file: /cvsroot/mozilla/mailnews/base/resources/content/mailCommands.js,v
retrieving revision 1.100
diff -u -p -r1.100 mailCommands.js
--- mailnews/base/resources/content/mailCommands.js 20 Oct 2005 16:03:26 -0000 1.100
+++ mailnews/base/resources/content/mailCommands.js 6 Apr 2006 02:26:57 -0000
@@ -267,7 +267,9 @@ function ComposeMessage(type, format, fo
}
}
- if (type == msgComposeType.Reply || type == msgComposeType.ReplyAll || type == msgComposeType.ForwardInline ||
+ if (type == msgComposeType.Reply || type == msgComposeType.ReplyAll ||
+ type == msgComposeType.ReplyToList ||
+ type == msgComposeType.ForwardInline ||
type == msgComposeType.ReplyToGroup || type == msgComposeType.ReplyToSender ||
type == msgComposeType.ReplyToSenderAndGroup ||
type == msgComposeType.Template || type == msgComposeType.Draft)
Index: mailnews/compose/public/nsIMsgComposeParams.idl
===================================================================
RCS file: /cvsroot/mozilla/mailnews/compose/public/nsIMsgComposeParams.idl,v
retrieving revision 1.8
diff -u -p -r1.8 nsIMsgComposeParams.idl
--- mailnews/compose/public/nsIMsgComposeParams.idl 16 Sep 2005 15:18:32 -0000 1.8
+++ mailnews/compose/public/nsIMsgComposeParams.idl 6 Apr 2006 02:26:57 -0000
@@ -59,6 +59,7 @@ interface nsIMsgCompType {
const long Template = 10;
const long MailToUrl = 11;
const long ReplyWithTemplate = 12;
+ const long ReplyToList = 13;
};
Index: mailnews/compose/src/nsMsgCompose.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/compose/src/nsMsgCompose.cpp,v
retrieving revision 1.481
diff -u -p -r1.481 nsMsgCompose.cpp
--- mailnews/compose/src/nsMsgCompose.cpp 3 Feb 2006 14:18:18 -0000 1.481
+++ mailnews/compose/src/nsMsgCompose.cpp 6 Apr 2006 02:26:58 -0000
@@ -1751,6 +1751,7 @@ nsresult nsMsgCompose::CreateMessage(con
default: break;
case nsIMsgCompType::Reply :
case nsIMsgCompType::ReplyAll:
+ case nsIMsgCompType::ReplyToList:
case nsIMsgCompType::ReplyToGroup:
case nsIMsgCompType::ReplyToSender:
case nsIMsgCompType::ReplyToSenderAndGroup:
@@ -2196,8 +2197,13 @@ NS_IMETHODIMP QuotingOutputStreamListene
if (!mCiteReference.IsEmpty())
compose->SetCiteReference(mCiteReference);
- if (mHeaders && (type == nsIMsgCompType::Reply || type == nsIMsgCompType::ReplyAll || type == nsIMsgCompType::ReplyToSender ||
- type == nsIMsgCompType::ReplyToGroup || type == nsIMsgCompType::ReplyToSenderAndGroup) && mQuoteOriginal)
+ if (mHeaders && (type == nsIMsgCompType::Reply ||
+ type == nsIMsgCompType::ReplyAll ||
+ type == nsIMsgCompType::ReplyToList ||
+ type == nsIMsgCompType::ReplyToSender ||
+ type == nsIMsgCompType::ReplyToGroup ||
+ type == nsIMsgCompType::ReplyToSenderAndGroup) &&
+ mQuoteOriginal)
{
nsCOMPtr<nsIMsgCompFields> compFields;
compose->GetCompFields(getter_AddRefs(compFields));
@@ -2213,6 +2219,7 @@ NS_IMETHODIMP QuotingOutputStreamListene
nsAutoString followUpTo;
nsAutoString messageId;
nsAutoString references;
+ nsAutoString listPost;
nsXPIDLCString outCString;
PRBool needToRemoveDup = PR_FALSE;
if (!mMimeConverter)
@@ -2257,6 +2264,29 @@ NS_IMETHODIMP QuotingOutputStreamListene
needToRemoveDup = PR_TRUE;
}
+
+ mHeaders->ExtractHeader(HEADER_LIST_POST, PR_TRUE, getter_Copies(outCString));
+ if (!outCString.IsEmpty())
+ mMimeConverter->DecodeMimeHeader(outCString, listPost, charset);
+
+ if (type == nsIMsgCompType::ReplyToList && ! listPost.IsEmpty())
+ {
+ nsString::const_iterator mailtoStart, mailtoEnd;
+ listPost.BeginReading(mailtoStart);
+ listPost.EndReading(mailtoEnd);
+ nsAutoString mailtoText(NS_LITERAL_STRING("<mailto:"));
+ PRBool mailtoFound = FindInReadable(mailtoText, mailtoStart, mailtoEnd);
+
+ // Strip off the leading "<mailto:" and trailing ">"
+ if (mailtoFound && listPost.Equals(mailtoStart.get()) &&
+ listPost.RFindChar('>') == listPost.Length() - 1)
+ {
+ listPost.Cut(0, mailtoText.Length());
+ listPost.Cut(listPost.Length() - 1, 1);
+
+ compFields->SetTo(listPost);
+ }
+ }
mHeaders->ExtractHeader(HEADER_REPLY_TO, PR_FALSE, getter_Copies(outCString));
if (outCString)
@@ -2294,7 +2324,8 @@ NS_IMETHODIMP QuotingOutputStreamListene
mMimeConverter->DecodeMimeHeader(outCString, references, charset);
}
- if (! ((type == nsIMsgCompType::ReplyAll) && ! mailFollowupTo.IsEmpty()))
+ if (! ((type == nsIMsgCompType::ReplyAll) && ! mailFollowupTo.IsEmpty()) &&
+ ! ((type == nsIMsgCompType::ReplyToList) && ! listPost.IsEmpty()))
{
if (! mailReplyTo.IsEmpty())
{ // handle Mail-Reply-To (http://cr.yp.to/proto/replyto.html)
@@ -2796,6 +2827,7 @@ NS_IMETHODIMP nsMsgCompose::RememberQueu
// the header that we then look at when we actually send the message.
if (mType == nsIMsgCompType::Reply ||
mType == nsIMsgCompType::ReplyAll ||
+ mType == nsIMsgCompType::ReplyToList ||
mType == nsIMsgCompType::ReplyToGroup ||
mType == nsIMsgCompType::ReplyToSender ||
mType == nsIMsgCompType::ReplyToSenderAndGroup ||
@@ -2834,6 +2866,7 @@ nsresult nsMsgCompose::ProcessReplyFlags
// for this URI.
if (mType == nsIMsgCompType::Reply ||
mType == nsIMsgCompType::ReplyAll ||
+ mType == nsIMsgCompType::ReplyToList ||
mType == nsIMsgCompType::ReplyToGroup ||
mType == nsIMsgCompType::ReplyToSender ||
mType == nsIMsgCompType::ReplyToSenderAndGroup ||
@@ -3745,6 +3778,7 @@ nsMsgCompose::BuildBodyMessageAndSignatu
case nsIMsgCompType::New :
case nsIMsgCompType::Reply : /* should not happen! but just in case */
case nsIMsgCompType::ReplyAll : /* should not happen! but just in case */
+ case nsIMsgCompType::ReplyToList : /* should not happen! but just in case */
case nsIMsgCompType::ForwardAsAttachment : /* should not happen! but just in case */
case nsIMsgCompType::ForwardInline :
case nsIMsgCompType::NewsPost :
Index: mailnews/mime/public/nsMailHeaders.h
===================================================================
RCS file: /cvsroot/mozilla/mailnews/mime/public/nsMailHeaders.h,v
retrieving revision 1.11
diff -u -p -6 -r1.11 nsMailHeaders.h
--- mailnews/mime/public/nsMailHeaders.h 28 Feb 2005 17:10:57 -0000 1.11
+++ mailnews/mime/public/nsMailHeaders.h 14 Aug 2006 07:31:12 -0000
@@ -62,12 +62,13 @@
#define HEADER_DISTRIBUTION "Distribution"
#define HEADER_FCC "FCC"
#define HEADER_FOLLOWUP_TO "Followup-To"
#define HEADER_FROM "From"
#define HEADER_STATUS "Status"
#define HEADER_LINES "Lines"
+#define HEADER_LIST_POST "List-Post"
#define HEADER_MAIL_FOLLOWUP_TO "Mail-Followup-To"
#define HEADER_MAIL_REPLY_TO "Mail-Reply-To"
#define HEADER_MESSAGE_ID "Message-ID"
#define HEADER_MIME_VERSION "MIME-Version"
#define HEADER_NEWSGROUPS "Newsgroups"
#define HEADER_ORGANIZATION "Organization"
@@ -99,12 +100,13 @@
#define HEADER_X_SUN_CONTENT_LINES "X-Sun-Content-Lines"
#define HEADER_X_SUN_DATA_DESCRIPTION "X-Sun-Data-Description"
#define HEADER_X_SUN_DATA_NAME "X-Sun-Data-Name"
#define HEADER_X_SUN_DATA_TYPE "X-Sun-Data-Type"
#define HEADER_X_SUN_ENCODING_INFO "X-Sun-Encoding-Info"
#define HEADER_X_PRIORITY "X-Priority"
+#define HEADER_X_REPLY_TO "X-Reply-To"
#define HEADER_PARM_CHARSET "charset"
#define HEADER_PARM_START "start"
#define HEADER_PARM_BOUNDARY "BOUNDARY"
#define HEADER_PARM_FILENAME "FILENAME"
#define HEADER_PARM_NAME "NAME"

11
suse-default-prefs.js Normal file
View File

@ -0,0 +1,11 @@
pref("general.useragent.vendor", "SUSE");
pref("general.useragent.vendorSub", "RPM_VERSION");
pref("font.default", "sans-serif");
pref("font.default.x-western", "sans-serif");
pref("font.name.monospace.x-western", "monospace");
pref("font.name.monospace.x-unicode", "monospace");
pref("network.negotiate-auth.gsslib", "GSSAPI");
pref("print.print_edge_top", 14); // 1/100 of an inch
pref("print.print_edge_left", 16); // 1/100 of an inch
pref("print.print_edge_right", 16); // 1/100 of an inch
pref("print.print_edge_bottom", 14); // 1/100 of an inch

91
system-extensions.patch Normal file
View File

@ -0,0 +1,91 @@
Index: toolkit/mozapps/extensions/src/nsExtensionManager.js.in
===================================================================
RCS file: /cvsroot/mozilla/toolkit/mozapps/extensions/src/nsExtensionManager.js.in,v
retrieving revision 1.144.2.16
diff -u -p -6 -r1.144.2.16 nsExtensionManager.js.in
--- toolkit/mozapps/extensions/src/nsExtensionManager.js.in 21 Oct 2005 01:27:44 -0000 1.144.2.16
+++ toolkit/mozapps/extensions/src/nsExtensionManager.js.in 28 Dec 2005 06:58:07 -0000
@@ -118,12 +118,13 @@ const OP_NEEDS_UPGRADE =
const OP_NEEDS_UNINSTALL = "needs-uninstall";
const OP_NEEDS_ENABLE = "needs-enable";
const OP_NEEDS_DISABLE = "needs-disable";
const KEY_APP_PROFILE = "app-profile";
const KEY_APP_GLOBAL = "app-global";
+const KEY_APP_SYSTEM = "app-system";
const CATEGORY_INSTALL_LOCATIONS = "extension-install-locations";
const PREFIX_NS_EM = "http://www.mozilla.org/2004/em-rdf#";
const PREFIX_NS_CHROME = "http://www.mozilla.org/rdf/chrome#";
const PREFIX_ITEM_URI = "urn:mozilla:item:";
@@ -2215,12 +2216,22 @@ function ExtensionManager() {
var priority = nsIInstallLocation.PRIORITY_APP_PROFILE;
var profileLocation = new DirectoryInstallLocation(KEY_APP_PROFILE,
appProfileExtensions, false,
priority);
InstallLocations.put(profileLocation);
+ // Register App-System Install Location
+ try {
+ var appSystemExtensions = getDirNoCreate("DrvD", ["usr","lib","browser-extensions","thunderbird"]);
+ var priority = nsIInstallLocation.PRIORITY_APP_PROFILE - 1;
+ var systemLocation = new DirectoryInstallLocation(KEY_APP_SYSTEM,
+ appSystemExtensions, true,
+ priority);
+ InstallLocations.put(systemLocation);
+ } catch (e) {}
+
#ifdef XP_WIN
// Register HKEY_LOCAL_MACHINE Install Location
InstallLocations.put(
new WinRegInstallLocation("winreg-app-global",
nsIWindowsRegKey.ROOT_KEY_LOCAL_MACHINE,
true,
@@ -3236,13 +3247,13 @@ ExtensionManager.prototype = {
"{641d8d09-7dda-4850-8228-ac0ab65e2ac9}"]);
if (profileDOMi && profileDOMi.exists())
removeDirRecursive(profileDOMi);
// Prepare themes for installation
// Only enumerate directories in the app-profile and app-global locations.
- var locations = [KEY_APP_PROFILE, KEY_APP_GLOBAL];
+ var locations = [KEY_APP_PROFILE, KEY_APP_GLOBAL, KEY_APP_SYSTEM];
for (var i = 0; i < locations.length; ++i) {
var location = InstallLocations.get(locations[i]);
if (!location.canAccess)
continue;
var entries = location.itemLocations;
@@ -3300,13 +3311,14 @@ ExtensionManager.prototype = {
if (this._checkForFileChanges()) {
// Create a list of all items that are to be installed so we can migrate
// these items's settings to the new datasource.
var items = PendingOperations.getOperations(OP_NEEDS_INSTALL);
for (i = items.length - 1; i >= 0; --i) {
if (items[i].locationKey == KEY_APP_PROFILE ||
- items[i].locationKey == KEY_APP_GLOBAL)
+ items[i].locationKey == KEY_APP_GLOBAL ||
+ items[i].locationKey == KEY_APP_SYSTEM)
itemsToCheck.push(items[i].id);
}
this._finishOperations();
}
// If there are no items to migrate settings for return early.
@@ -4303,13 +4315,14 @@ ExtensionManager.prototype = {
var restartRequired = this.installRequiresRestart(id, ds.getItemProperty(id, "type"))
this._updateManifests(restartRequired);
return;
}
}
else if (installLocation.name == KEY_APP_PROFILE ||
- installLocation.name == KEY_APP_GLOBAL) {
+ installLocation.name == KEY_APP_GLOBAL ||
+ installLocation.name == KEY_APP_SYSTEM) {
// Check for a pointer file and remove it if it exists
var pointerFile = installLocation.location.clone();
pointerFile.append(id);
if (pointerFile.exists() && !pointerFile.isDirectory())
pointerFile.remove(false);
}

130
system-nspr.patch Normal file
View File

@ -0,0 +1,130 @@
Index: security/coreconf/location.mk
===================================================================
RCS file: /cvsroot/mozilla/security/coreconf/location.mk,v
retrieving revision 1.9
diff -u -r1.9 location.mk
--- security/coreconf/location.mk 25 Apr 2004 15:02:17 -0000 1.9
+++ security/coreconf/location.mk 11 Apr 2005 20:21:57 -0000
@@ -61,6 +61,8 @@
DIST = $(SOURCE_PREFIX)/$(PLATFORM)
+NSPR_LIBDIR = $(DIST)/lib
+
ifdef BUILD_DEBUG_GC
DEFINES += -DDEBUG_GC
endif
Index: security/nss/lib/ckfw/builtins/Makefile
===================================================================
RCS file: /cvsroot/mozilla/security/nss/lib/ckfw/builtins/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- security/nss/lib/ckfw/builtins/Makefile 20 Jan 2005 02:25:46 -0000 1.14
+++ security/nss/lib/ckfw/builtins/Makefile 11 Apr 2005 20:21:57 -0000
@@ -53,23 +53,23 @@
# This is merely an expedient hack and not the right solution.
ifdef NS_USE_GCC
EXTRA_LIBS += \
- -L$(DIST)/lib \
+ -L$(NSPR_LIBDIR) \
-lplc4 \
-lplds4 \
-lnspr4 \
$(NULL)
else
EXTRA_LIBS += \
- $(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4_s.lib \
- $(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4_s.lib \
+ $(NSPR_LIBDIR)/$(NSPR31_LIB_PREFIX)plc4_s.lib \
+ $(NSPR_LIBDIR)/$(NSPR31_LIB_PREFIX)plds4_s.lib \
$(NULL)
endif
else
EXTRA_LIBS += \
- $(DIST)/lib/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \
- $(DIST)/lib/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \
+ $(NSPR_LIBDIR)/nspr/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \
+ $(NSPR_LIBDIR)/nspr/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \
$(NULL)
endif
Index: security/nss/lib/fortcrypt/swfort/pkcs11/Makefile
===================================================================
RCS file: /cvsroot/mozilla/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- security/nss/lib/fortcrypt/swfort/pkcs11/Makefile 25 Apr 2004 15:03:08 -0000 1.18
+++ security/nss/lib/fortcrypt/swfort/pkcs11/Makefile 11 Apr 2005 20:21:57 -0000
@@ -63,7 +63,7 @@
$(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \
$(CRYPTO_LIB) \
$(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \
- -L$(DIST)/lib \
+ -L$(NSPR_LIBDIR) \
-lplc4 \
-lplds4 \
-lnspr4 \
@@ -76,8 +76,8 @@
$(DIST)/lib/softokn.lib \
$(CRYPTO_LIB) \
$(DIST)/lib/secutil.lib \
- $(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4_s.lib \
- $(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4_s.lib \
+ $(NSPR_LIBDIR)/$(NSPR31_LIB_PREFIX)plc4_s.lib \
+ $(NSPR_LIBDIR)/$(NSPR31_LIB_PREFIX)plds4_s.lib \
wsock32.lib \
winmm.lib \
$(NULL)
@@ -98,8 +98,8 @@
$(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \
$(CRYPTO_LIB) \
$(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \
- $(DIST)/lib/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \
- $(DIST)/lib/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \
+ $(NSPR_LIBDIR)/nspr/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \
+ $(NSPR_LIBDIR)/nspr/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \
$(NULL)
endif
Index: security/manager/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/security/manager/Makefile.in,v
retrieving revision 1.57
diff -u -p -6 -r1.57 Makefile.in
--- security/manager/Makefile.in 2 Jun 2005 02:03:05 -0000 1.57
+++ security/manager/Makefile.in 6 Jun 2005 12:56:44 -0000
@@ -73,18 +73,29 @@ FREEBL_PURE32_CHK = libfreebl_pure32_3.c
FREEBL_HYBRID_MODULE = libfreebl_hybrid_3$(DLL_SUFFIX)
FREEBL_HYBRID_CHK = libfreebl_hybrid_3.chk
endif
endif
endif
+ABS_DIST := $(shell cd $(DIST) && pwd)
+ifeq ($(OS_ARCH),WINNT)
+ABS_DIST := $(shell cygpath -w $(ABS_DIST) | sed -e 's|\\\\|/|g')
+endif
+NSPR_LIBDIR = $(firstword $(filter -L%,$(NSPR_LIBS)))
+ifneq (,$(strip $(NSPR_LIBDIR)))
+NSPR_LIBDIR := $(subst -L,,$(subst -L$(DIST),-L$(ABS_DIST),$(NSPR_LIBDIR)))
+else
+NSPR_LIBDIR = $(ABS_DIST)/lib
+endif
# NSS makefiles are not safe for parallel execution.
DEFAULT_GMAKE_FLAGS = MAKE="$(MAKE) -j1" -j1
DEFAULT_GMAKE_FLAGS += CC="$(CC)"
-DEFAULT_GMAKE_FLAGS += MOZILLA_INCLUDES="-I$(MOZ_BUILD_ROOT)/dist/include/nspr -I$(MOZ_BUILD_ROOT)/dist/include/dbm"
-DEFAULT_GMAKE_FLAGS += SOURCE_MD_DIR=$(MOZ_BUILD_ROOT)/dist
-DEFAULT_GMAKE_FLAGS += DIST=$(MOZ_BUILD_ROOT)/dist
+DEFAULT_GMAKE_FLAGS += MOZILLA_INCLUDES="$(subst -I$(DIST),-I$(ABS_DIST),$(NSPR_CFLAGS) -I$(DIST)/include/dbm)"
+DEFAULT_GMAKE_FLAGS += SOURCE_MD_DIR=$(ABS_DIST)
+DEFAULT_GMAKE_FLAGS += DIST=$(ABS_DIST)
+DEFAULT_GMAKE_FLAGS += NSPR_LIBDIR=$(NSPR_LIBDIR)
DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1
DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1
ABS_topsrcdir := $(shell cd $(topsrcdir); pwd)
ifneq ($(ABS_topsrcdir),$(MOZ_BUILD_ROOT))
DEFAULT_GMAKE_FLAGS += BUILD_TREE=$(MOZ_BUILD_ROOT)
endif

627
system-nss.patch Normal file
View File

@ -0,0 +1,627 @@
Index: mozilla/configure.in
===================================================================
RCS file: /cvsroot/mozilla/configure.in,v
retrieving revision 1.1503.2.15
diff -u -r1.1503.2.15 configure.in
--- mozilla/configure.in 4 Oct 2005 05:53:49 -0000 1.1503.2.15
+++ configure.in 15 Dec 2005 05:40:40 -0000
@@ -86,6 +86,7 @@
MOZPNG=10207
MOZZLIB=1.2.3
NSPR_VERSION=4
+NSS_VERSION=3
dnl Set the minimum version of toolkit libs used by mozilla
dnl ========================================================
@@ -3472,6 +3473,19 @@
fi
fi
+dnl ========================================================
+dnl = If NSS was not detected in the system,
+dnl = use the one in the source tree (mozilla/security/nss)
+dnl ========================================================
+
+MOZ_ARG_WITH_BOOL(system-nss,
+[ --with-system-nss Use system installed NSS],
+ _USE_SYSTEM_NSS=1 )
+
+if test -n "$_USE_SYSTEM_NSS"; then
+ AM_PATH_NSS(3.0.0, [MOZ_NATIVE_NSS=1], [MOZ_NATIVE_NSS=])
+fi
+
if test -z "$SKIP_LIBRARY_CHECKS"; then
dnl system JPEG support
dnl ========================================================
@@ -6698,6 +6712,10 @@
AC_SUBST(NSPR_LIBS)
AC_SUBST(MOZ_NATIVE_NSPR)
+AC_SUBST(NSS_CFLAGS)
+AC_SUBST(NSS_LIBS)
+AC_SUBST(MOZ_NATIVE_NSS)
+
AC_SUBST(CFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(CPPFLAGS)
Index: mozilla/aclocal.m4
===================================================================
RCS file: /cvsroot/mozilla/aclocal.m4,v
retrieving revision 1.14
diff -u -r1.14 aclocal.m4
--- mozilla/aclocal.m4 13 May 2004 03:12:47 -0000 1.14
+++ aclocal.m4 15 Dec 2005 05:40:53 -0000
@@ -8,6 +8,7 @@
builtin(include, build/autoconf/libIDL.m4)dnl
builtin(include, build/autoconf/libIDL-2.m4)dnl
builtin(include, build/autoconf/nspr.m4)dnl
+builtin(include, build/autoconf/nss.m4)dnl
builtin(include, build/autoconf/libart.m4)dnl
builtin(include, build/autoconf/pkg.m4)dnl
builtin(include, build/autoconf/freetype2.m4)dnl
Index: mozilla/config/autoconf.mk.in
===================================================================
RCS file: /cvsroot/mozilla/config/autoconf.mk.in,v
retrieving revision 3.363.2.1
diff -u -r3.363.2.1 autoconf.mk.in
--- mozilla/config/autoconf.mk.in 17 Aug 2005 17:17:17 -0000 3.363.2.1
+++ config/autoconf.mk.in 15 Dec 2005 05:40:53 -0000
@@ -229,6 +229,7 @@
MOZ_INSURE_EXCLUDE_DIRS = @MOZ_INSURE_EXCLUDE_DIRS@
MOZ_NATIVE_NSPR = @MOZ_NATIVE_NSPR@
+MOZ_NATIVE_NSS = @MOZ_NATIVE_NSS@
CROSS_COMPILE = @CROSS_COMPILE@
@@ -384,6 +385,48 @@
NSPR_CFLAGS = @NSPR_CFLAGS@
NSPR_LIBS = @NSPR_LIBS@
+NSS_CONFIG = @NSS_CONFIG@
+NSS_CFLAGS = @NSS_CFLAGS@
+NSS_LIBS = @NSS_LIBS@
+
+ifdef MOZ_NATIVE_NSS
+NSS_DEP_LIBS = \
+ $(NULL)
+NSS_LIBS += \
+ -lcrmf \
+ $(NULL)
+else
+NSS_DEP_LIBS = \
+ $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \
+ $(DIST)/lib/$(DLL_PREFIX)smime3$(DLL_SUFFIX) \
+ $(DIST)/lib/$(DLL_PREFIX)ssl3$(DLL_SUFFIX) \
+ $(DIST)/lib/$(DLL_PREFIX)nss3$(DLL_SUFFIX) \
+ $(DIST)/lib/$(DLL_PREFIX)softokn3$(DLL_SUFFIX) \
+ $(NULL)
+NSS_LIBS = \
+ $(LIBS_DIR) \
+ $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \
+ -lsmime3 \
+ -lssl3 \
+ -lnss3 \
+ -lsoftokn3 \
+ $(NULL)
+endif
+
+ifneq (,$(filter OS2 WINNT WINCE, $(OS_ARCH)))
+ifndef GNU_CC
+ifndef MOZ_NATIVE_NSS
+NSS_LIBS = \
+ $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \
+ $(DIST)/lib/$(LIB_PREFIX)smime3.$(IMPORT_LIB_SUFFIX) \
+ $(DIST)/lib/$(LIB_PREFIX)ssl3.$(IMPORT_LIB_SUFFIX) \
+ $(DIST)/lib/$(LIB_PREFIX)nss3.$(IMPORT_LIB_SUFFIX) \
+ $(DIST)/lib/$(LIB_PREFIX)softokn3.$(IMPORT_LIB_SUFFIX) \
+ $(NULL)
+endif
+endif
+endif
+
LDAP_CFLAGS = @LDAP_CFLAGS@
LDAP_LIBS = @LDAP_LIBS@
XPCOM_GLUE_LDOPTS = @XPCOM_GLUE_LDOPTS@
Index: mozilla/config/config.mk
===================================================================
RCS file: /cvsroot/mozilla/config/config.mk,v
retrieving revision 3.337
diff -u -r3.337 config.mk
--- mozilla/config/config.mk 28 Jul 2005 19:48:11 -0000 3.337
+++ config/config.mk 15 Dec 2005 05:40:54 -0000
@@ -138,39 +138,6 @@
FINAL_LINK_COMPS = $(DEPTH)/config/final-link-comps
FINAL_LINK_COMP_NAMES = $(DEPTH)/config/final-link-comp-names
-#
-# NSS libs needed for final link in static build
-#
-
-NSS_LIBS = \
- $(LIBS_DIR) \
- $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \
- -lsmime3 \
- -lssl3 \
- -lnss3 \
- -lsoftokn3 \
- $(NULL)
-
-ifneq (,$(filter OS2 WINNT WINCE, $(OS_ARCH)))
-ifndef GNU_CC
-NSS_LIBS = \
- $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \
- $(DIST)/lib/$(LIB_PREFIX)smime3.$(IMPORT_LIB_SUFFIX) \
- $(DIST)/lib/$(LIB_PREFIX)ssl3.$(IMPORT_LIB_SUFFIX) \
- $(DIST)/lib/$(LIB_PREFIX)nss3.$(IMPORT_LIB_SUFFIX) \
- $(DIST)/lib/$(LIB_PREFIX)softokn3.$(IMPORT_LIB_SUFFIX) \
- $(NULL)
-endif
-endif
-
-NSS_DEP_LIBS = \
- $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \
- $(DIST)/lib/$(DLL_PREFIX)smime3$(DLL_SUFFIX) \
- $(DIST)/lib/$(DLL_PREFIX)ssl3$(DLL_SUFFIX) \
- $(DIST)/lib/$(DLL_PREFIX)nss3$(DLL_SUFFIX) \
- $(DIST)/lib/$(DLL_PREFIX)softokn3$(DLL_SUFFIX) \
- $(NULL)
-
MOZ_UNICHARUTIL_LIBS = $(DIST)/lib/$(LIB_PREFIX)unicharutil_s.$(LIB_SUFFIX)
MOZ_REGISTRY_LIBS = $(DIST)/lib/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX)
MOZ_WIDGET_SUPPORT_LIBS = $(DIST)/lib/$(LIB_PREFIX)widgetsupport_s.$(LIB_SUFFIX)
Index: mozilla/build/autoconf/nss.m4
===================================================================
RCS file: mozilla/build/autoconf/nss.m4
diff -N mozilla/build/autoconf/nss.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ build/autoconf/nss.m4 15 Dec 2005 05:40:54 -0000
@@ -0,0 +1,67 @@
+# -*- tab-width: 4; -*-
+# Configure paths for NSS
+# Public domain - Chris Seawood <cls@seawood.org> 2001-04-05
+# Based upon gtk.m4 (also PD) by Owen Taylor
+
+dnl AM_PATH_NSS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl Test for NSS, and define NSS_CFLAGS and NSS_LIBS
+AC_DEFUN(AM_PATH_NSS,
+[dnl
+
+AC_ARG_WITH(nss-prefix,
+ [ --with-nss-prefix=PFX Prefix where NSS is installed],
+ nss_config_prefix="$withval",
+ nss_config_prefix="")
+
+AC_ARG_WITH(nss-exec-prefix,
+ [ --with-nss-exec-prefix=PFX
+ Exec prefix where NSS is installed],
+ nss_config_exec_prefix="$withval",
+ nss_config_exec_prefix="")
+
+ if test -n "$nss_config_exec_prefix"; then
+ nss_config_args="$nss_config_args --exec-prefix=$nss_config_exec_prefix"
+ if test -z "$NSS_CONFIG"; then
+ NSS_CONFIG=$nss_config_exec_prefix/bin/nss-config
+ fi
+ fi
+ if test -n "$nss_config_prefix"; then
+ nss_config_args="$nss_config_args --prefix=$nss_config_prefix"
+ if test -z "$NSS_CONFIG"; then
+ NSS_CONFIG=$nss_config_prefix/bin/nss-config
+ fi
+ fi
+
+ unset ac_cv_path_NSS_CONFIG
+ AC_PATH_PROG(NSS_CONFIG, nss-config, no)
+ min_nss_version=ifelse([$1], ,3.0.0,$1)
+ AC_MSG_CHECKING(for NSS - version >= $min_nss_version (skipping))
+
+ no_nss=""
+ if test "$NSS_CONFIG" = "no"; then
+ no_nss="yes"
+ else
+ NSS_CFLAGS=`$NSS_CONFIG $nss_config_args --cflags`
+ NSS_LIBS=`$NSS_CONFIG $nss_config_args --libs`
+
+ dnl Skip version check for now
+ nss_config_major_version=`$NSS_CONFIG $nss_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ nss_config_minor_version=`$NSS_CONFIG $nss_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ nss_config_micro_version=`$NSS_CONFIG $nss_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ fi
+
+ if test -z "$no_nss"; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ fi
+
+
+ AC_SUBST(NSS_CFLAGS)
+ AC_SUBST(NSS_LIBS)
+
+])
Index: mozilla/security/manager/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/security/manager/Makefile.in,v
retrieving revision 1.57
diff -u -r1.57 Makefile.in
--- mozilla/security/manager/Makefile.in 2 Jun 2005 02:03:05 -0000 1.57
+++ security/manager/Makefile.in 15 Dec 2005 05:40:54 -0000
@@ -46,6 +46,8 @@
MODULE = psm
PACKAGE_FILE = psm.pkg
+
+ifndef MOZ_NATIVE_NSS
PACKAGE_VARS += \
NSS3_LIB \
SMIME3_LIB \
@@ -57,6 +59,7 @@
$(NULL)
LOADABLE_ROOT_MODULE = $(DLL_PREFIX)nssckbi$(DLL_SUFFIX)
+endif
NSS3_LIB = $(DLL_PREFIX)nss3$(DLL_SUFFIX)
SMIME3_LIB = $(DLL_PREFIX)smime3$(DLL_SUFFIX)
@@ -147,6 +150,7 @@
export:: .nss.cleaned
.nss.cleaned: .nss.checkout
+ifndef MOZ_NATIVE_NSS
$(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS) clean
$(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS) clean
ifndef SKIP_CHK
@@ -154,9 +158,12 @@
$(MAKE) -C $(topsrcdir)/security/nss/cmd/shlibsign $(DEFAULT_GMAKE_FLAGS) clean
endif
touch $@
+endif
.nss.checkout:
+ifndef MOZ_NATIVE_NSS
touch $(srcdir)/$@
+endif
dependclean export packages chrome::
$(MAKE) -C boot $@
@@ -167,12 +174,15 @@
endif
libs::
+ifndef MOZ_NATIVE_NSS
$(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS)
+endif
ifeq ($(OS_ARCH),WINNT)
cd $(DIST)/lib; cp -f $(LIB_PREFIX)dbm$(MOZ_BITS).$(LIB_SUFFIX) $(LIB_PREFIX)dbm.$(LIB_SUFFIX)
else
cd $(DIST)/lib; cp -f $(LIB_PREFIX)mozdbm_s.$(LIB_SUFFIX) $(LIB_PREFIX)dbm.$(LIB_SUFFIX); $(RANLIB) $(LIB_PREFIX)dbm.$(LIB_SUFFIX)
endif
+ifndef MOZ_NATIVE_NSS
$(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS)
ifndef SKIP_CHK
$(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS)
@@ -210,6 +220,7 @@
$(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_HYBRID_MODULE) $(DIST)/bin
endif
endif
+endif
$(MAKE) -C boot $@
$(MAKE) -C ssl $@
$(MAKE) -C locales $@
@@ -218,6 +229,7 @@
endif
install::
+ifndef MOZ_NATIVE_NSS
$(SYSINSTALL) -m 755 $(DIST)/lib/$(LOADABLE_ROOT_MODULE) $(DESTDIR)$(mozappdir)
ifndef SKIP_CHK
$(SYSINSTALL) -m 644 $(DIST)/lib/$(SOFTOKEN3_CHK) $(DESTDIR)$(mozappdir)
@@ -232,6 +244,7 @@
$(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_HYBRID_CHK) $(DESTDIR)$(mozappdir)
$(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_HYBRID_MODULE) $(DESTDIR)$(mozappdir)
endif
+endif
$(MAKE) -C boot $@
$(MAKE) -C ssl $@
$(MAKE) -C locales $@
@@ -246,15 +259,18 @@
ifdef MOZ_XUL
$(MAKE) -C pki $@
endif
+ifndef MOZ_NATIVE_NSS
$(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS) clean
$(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS) clean
ifndef SKIP_CHK
$(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS) clean
$(MAKE) -C $(topsrcdir)/security/nss/cmd/shlibsign $(DEFAULT_GMAKE_FLAGS) clean
endif
+endif
echo-requires-recursive::
$(MAKE) -C boot $@
$(MAKE) -C ssl $@
$(MAKE) -C pki $@
$(MAKE) -C locales $@
+
Index: mozilla/security/manager/ssl/src/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/security/manager/ssl/src/Makefile.in,v
retrieving revision 1.67
diff -u -r1.67 Makefile.in
--- mozilla/security/manager/ssl/src/Makefile.in 3 Aug 2005 05:24:18 -0000 1.67
+++ security/manager/ssl/src/Makefile.in 15 Dec 2005 05:40:56 -0000
@@ -123,8 +123,13 @@
# Use local includes because they are inserted before INCLUDES
# so that Mozilla's nss.h is used, not glibc's
+ifdef MOZ_NATIVE_NSS
+LOCAL_INCLUDES += $(NSS_CFLAGS) \
+ $(NULL)
+else
LOCAL_INCLUDES += -I$(DIST)/public/nss \
$(NULL)
+endif
EXTRA_DSO_LDOPTS += \
$(MOZ_UNICHARUTIL_LIBS) \
Index: mozilla/security/manager/ssl/src/nsNSSComponent.cpp
===================================================================
RCS file: /cvsroot/mozilla/security/manager/ssl/src/nsNSSComponent.cpp,v
retrieving revision 1.126.2.1
diff -u -r1.126.2.1 nsNSSComponent.cpp
--- mozilla/security/manager/ssl/src/nsNSSComponent.cpp 26 Aug 2005 06:41:50 -0000 1.126.2.1
+++ security/manager/ssl/src/nsNSSComponent.cpp 15 Dec 2005 05:41:00 -0000
@@ -488,14 +488,6 @@
}
-#ifdef XP_MAC
-#ifdef DEBUG
-#define LOADABLE_CERTS_MODULE NS_LITERAL_CSTRING("NSSckbiDebug.shlb")
-#else
-#define LOADABLE_CERTS_MODULE NS_LITERAL_CSTRING("NSSckbi.shlb")
-#endif /*DEBUG*/
-#endif /*XP_MAC*/
-
static void setOCSPOptions(nsIPrefBranch * pref);
NS_IMETHODIMP
@@ -689,40 +681,40 @@
const char *possible_ckbi_locations[] = {
NS_GRE_DIR,
- NS_XPCOM_CURRENT_PROCESS_DIR
+ NS_XPCOM_CURRENT_PROCESS_DIR,
+ 0
};
-
+
for (size_t il = 0; il < sizeof(possible_ckbi_locations)/sizeof(const char*); ++il) {
nsCOMPtr<nsILocalFile> mozFile;
- directoryService->Get( possible_ckbi_locations[il],
- NS_GET_IID(nsILocalFile),
- getter_AddRefs(mozFile));
+ char *fullModuleName = nsnull;
+
+ if (!possible_ckbi_locations[il])
+ {
+ fullModuleName = PR_GetLibraryName(nsnull, "nssckbi");
+ }
+ else
+ {
+ directoryService->Get( possible_ckbi_locations[il],
+ NS_GET_IID(nsILocalFile),
+ getter_AddRefs(mozFile));
- if (!mozFile) {
- continue;
+ if (!mozFile) {
+ continue;
+ }
+
+ nsCAutoString processDir;
+ mozFile->GetNativePath(processDir);
+ fullModuleName = PR_GetLibraryName(processDir.get(), "nssckbi");
}
- char *fullModuleName = nsnull;
-#ifdef XP_MAC
- nsCAutoString nativePath;
- mozFile->AppendNative(NS_LITERAL_CSTRING("Essential Files"));
- mozFile->AppendNative(LOADABLE_CERTS_MODULE);
- mozFile->GetNativePath(nativePath);
- fullModuleName = (char *) nativePath.get();
-#else
- nsCAutoString processDir;
- mozFile->GetNativePath(processDir);
- fullModuleName = PR_GetLibraryName(processDir.get(), "nssckbi");
-#endif
/* If a module exists with the same name, delete it. */
NS_ConvertUCS2toUTF8 modNameUTF8(modName);
int modType;
SECMOD_DeleteModule(NS_CONST_CAST(char*, modNameUTF8.get()), &modType);
SECStatus rv_add =
SECMOD_AddNewModule(NS_CONST_CAST(char*, modNameUTF8.get()), fullModuleName, 0, 0);
-#ifndef XP_MAC
- PR_Free(fullModuleName); // allocated by NSPR
-#endif
+ PR_FreeLibraryName(fullModuleName); // allocated by NSPR
if (SECSuccess == rv_add) {
// found a module, no need to try other directories
break;
Index: configure
===================================================================
RCS file: /cvsroot/mozilla/configure,v
retrieving revision 1.1492.2.17.2.3
diff -u -r1.1492.2.17.2.3 configure
--- configure 11 Jan 2006 05:43:03 -0000 1.1492.2.17.2.3
+++ configure 11 Jan 2006 22:12:39 -0000
@@ -44,6 +44,13 @@
--with-nspr-exec-prefix=PFX
Exec prefix where NSPR is installed"
ac_help="$ac_help
+ --with-system-nss Use system installed NSS"
+ac_help="$ac_help
+ --with-nss-prefix=PFX Prefix where NSS is installed"
+ac_help="$ac_help
+ --with-nss-exec-prefix=PFX
+ Exec prefix where NSS is installed"
+ac_help="$ac_help
--with-system-jpeg[=PFX]
Use system libjpeg [installed at prefix PFX]"
ac_help="$ac_help
@@ -1023,6 +1030,7 @@
MOZPNG=10207
MOZZLIB=1.2.3
NSPR_VERSION=4
+NSS_VERSION=3
GLIB_VERSION=1.2.0
GTK_VERSION=1.2.0
@@ -11308,6 +11316,123 @@
fi
fi
+
+# Check whether --with-system-nss or --without-system-nss was given.
+if test "${with_system_nss+set}" = set; then
+ withval="$with_system_nss"
+ if test "$withval" = "yes"; then
+ _USE_SYSTEM_NSS=1
+ elif test "$withval" = "no"; then
+ :
+ else
+ { echo "configure: error: Option, system-nss, does not take an argument ($withval)." 1>&2; exit 1; }
+ fi
+fi
+
+
+if test -n "$_USE_SYSTEM_NSS"; then
+
+# Check whether --with-nss-prefix or --without-nss-prefix was given.
+if test "${with_nss_prefix+set}" = set; then
+ withval="$with_nss_prefix"
+ nss_config_prefix="$withval"
+else
+ nss_config_prefix=""
+fi
+
+
+# Check whether --with-nss-exec-prefix or --without-nss-exec-prefix was given.
+if test "${with_nss_exec_prefix+set}" = set; then
+ withval="$with_nss_exec_prefix"
+ nss_config_exec_prefix="$withval"
+else
+ nss_config_exec_prefix=""
+fi
+
+
+ if test -n "$nss_config_exec_prefix"; then
+ nss_config_args="$nss_config_args --exec-prefix=$nss_config_exec_prefix"
+ if test -z "$NSS_CONFIG"; then
+ NSS_CONFIG=$nss_config_exec_prefix/bin/nss-config
+ fi
+ fi
+ if test -n "$nss_config_prefix"; then
+ nss_config_args="$nss_config_args --prefix=$nss_config_prefix"
+ if test -z "$NSS_CONFIG"; then
+ NSS_CONFIG=$nss_config_prefix/bin/nss-config
+ fi
+ fi
+
+ unset ac_cv_path_NSS_CONFIG
+ # Extract the first word of "nss-config", so it can be a program name with args.
+set dummy nss-config; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:11371: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_NSS_CONFIG'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$NSS_CONFIG" in
+ /*)
+ ac_cv_path_NSS_CONFIG="$NSS_CONFIG" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_NSS_CONFIG="$NSS_CONFIG" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_NSS_CONFIG="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_NSS_CONFIG" && ac_cv_path_NSS_CONFIG="no"
+ ;;
+esac
+fi
+NSS_CONFIG="$ac_cv_path_NSS_CONFIG"
+if test -n "$NSS_CONFIG"; then
+ echo "$ac_t""$NSS_CONFIG" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ min_nss_version=3.0.0
+ echo $ac_n "checking for NSS - version >= $min_nss_version (skipping)""... $ac_c" 1>&6
+echo "configure:11406: checking for NSS - version >= $min_nss_version (skipping)" >&5
+
+ no_nss=""
+ if test "$NSS_CONFIG" = "no"; then
+ no_nss="yes"
+ else
+ NSS_CFLAGS=`$NSS_CONFIG $nss_config_args --cflags`
+ NSS_LIBS=`$NSS_CONFIG $nss_config_args --libs`
+
+ nss_config_major_version=`$NSS_CONFIG $nss_config_args --version | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
+ nss_config_minor_version=`$NSS_CONFIG $nss_config_args --version | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
+ nss_config_micro_version=`$NSS_CONFIG $nss_config_args --version | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
+ fi
+
+ if test -z "$no_nss"; then
+ echo "$ac_t""yes" 1>&6
+ MOZ_NATIVE_NSS=1
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+
+
+
+
+
+
+fi
+
if test -z "$SKIP_LIBRARY_CHECKS"; then
# Check whether --with-system-jpeg or --without-system-jpeg was given.
if test "${with_system_jpeg+set}" = set; then
@@ -19491,6 +19620,9 @@
s%@NSPR_CONFIG@%$NSPR_CONFIG%g
s%@NSPR_CFLAGS@%$NSPR_CFLAGS%g
s%@NSPR_LIBS@%$NSPR_LIBS%g
+s%@NSS_CONFIG@%$NSS_CONFIG%g
+s%@NSS_CFLAGS@%$NSS_CFLAGS%g
+s%@NSS_LIBS@%$NSS_LIBS%g
s%@GTK_CONFIG@%$GTK_CONFIG%g
s%@GTK_CFLAGS@%$GTK_CFLAGS%g
s%@GTK_LIBS@%$GTK_LIBS%g
@@ -19771,6 +19903,7 @@
s%@MOZ_PNG_CFLAGS@%$MOZ_PNG_CFLAGS%g
s%@MOZ_PNG_LIBS@%$MOZ_PNG_LIBS%g
s%@MOZ_NATIVE_NSPR@%$MOZ_NATIVE_NSPR%g
+s%@MOZ_NATIVE_NSS@%$MOZ_NATIVE_NSS%g
s%@COMPILE_CFLAGS@%$COMPILE_CFLAGS%g
s%@COMPILE_CXXFLAGS@%$COMPILE_CXXFLAGS%g
s%@CROSS_COMPILE@%$CROSS_COMPILE%g

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dbe85085d627875f44984529f160bd53e9b7667a134b42c295cba2e6d4691bcb
size 35984263

25
thunderbird-appname.patch Normal file
View File

@ -0,0 +1,25 @@
Index: mail/components/shell/nsMailGNOMEIntegration.cpp
===================================================================
RCS file: /cvsroot/mozilla/mail/components/shell/nsMailGNOMEIntegration.cpp,v
retrieving revision 1.8
diff -u -p -6 -r1.8 nsMailGNOMEIntegration.cpp
--- mail/components/shell/nsMailGNOMEIntegration.cpp 18 Jul 2005 17:51:32 -0000 1.8
+++ mail/components/shell/nsMailGNOMEIntegration.cpp 20 Sep 2005 07:40:47 -0000
@@ -89,12 +89,17 @@ nsMailGNOMEIntegration::Init()
rv = appPath->AppendNative(NS_LITERAL_CSTRING("thunderbird"));
NS_ENSURE_SUCCESS(rv, rv);
rv = appPath->GetNativePath(mAppPath);
NS_ENSURE_SUCCESS(rv, rv);
+ /* This path of thunderbird is hardcoded for the default path setting
+ * And the above code is not used.
+ */
+ mAppPath.Assign ("/usr/bin/thunderbird");
+
PRBool isDefault;
nsMailGNOMEIntegration::GetIsDefaultMailClient(&isDefault);
mShowMailDialog = !isDefault;
nsMailGNOMEIntegration::GetIsDefaultNewsClient(&isDefault);
mShowNewsDialog = !isDefault;

111
thunderbird-no-update.patch Normal file
View File

@ -0,0 +1,111 @@
Index: mail/components/preferences/advanced.js
===================================================================
RCS file: /cvsroot/mozilla/mail/components/preferences/advanced.js,v
retrieving revision 1.13.2.3
diff -u -p -r1.13.2.3 advanced.js
--- mail/components/preferences/advanced.js 14 Sep 2005 21:27:50 -0000 1.13.2.3
+++ mail/components/preferences/advanced.js 25 Oct 2005 04:26:36 -0000
@@ -121,7 +121,8 @@ var gAdvancedPane = {
var enabledPref = document.getElementById("app.update.enabled");
var enableAppUpdate = document.getElementById("enableAppUpdate");
- enableAppUpdate.disabled = !aus.canUpdate || enabledPref.locked;
+ enableAppUpdate.disabled = true;
+ enableAppUpdate.hidden = true;
},
updateAutoItems: function ()
Index: mail/base/content/mailWindowOverlay.xul
===================================================================
RCS file: /cvsroot/mozilla/mail/base/content/mailWindowOverlay.xul,v
retrieving revision 1.116.2.8
diff -u -p -r1.116.2.8 mailWindowOverlay.xul
--- mail/base/content/mailWindowOverlay.xul 24 Oct 2005 04:01:20 -0000 1.116.2.8
+++ mail/base/content/mailWindowOverlay.xul 25 Oct 2005 04:29:18 -0000
@@ -1760,10 +1760,8 @@
#endif
<menuseparator id="menu_HelpAboutSeparator"/>
<menuitem id="checkForUpdates" accesskey="&updateCmd.accesskey;" class="menuitem-iconic"
- label="&updateCmd.label;" oncommand="checkForUpdates();"/>
-#ifndef XP_MACOSX
- <menuseparator/>
-#endif
+ label="&updateCmd.label;" oncommand="checkForUpdates();"
+ hidden="true"/>
<menuitem id="aboutName" accesskey="&aboutCmd.accesskey;"
label="&aboutCmd.label;"
#ifdef XP_MACOSX
Index: mail/app/profile/all-thunderbird.js
===================================================================
RCS file: /cvsroot/mozilla/mail/app/profile/all-thunderbird.js,v
retrieving revision 1.44.2.10
diff -u -p -r1.44.2.10 all-thunderbird.js
--- mail/app/profile/all-thunderbird.js 4 Nov 2005 18:44:59 -0000 1.44.2.10
+++ mail/app/profile/all-thunderbird.js 11 Nov 2005 05:59:54 -0000
@@ -45,66 +45,6 @@ pref("browser.chromeURL", "chrome://mess
pref("mail.biff.animate_dock_icon", false);
#endif
-pref("update.app.enabled", true); // Whether or not app updates are enabled
-pref("update.app.url", "chrome://mozapps/locale/update/update.properties");
-pref("update.extensions.enabled", true);
-
-// App-specific update preferences
-
-// Whether or not app updates are enabled
-pref("app.update.enabled", true);
-
-// This preference turns on app.update.mode and allows automatic download and
-// install to take place. We use a separate boolean toggle for this to make
-// the UI easier to construct.
-pref("app.update.auto", true);
-
-// Defines how the Application Update Service notifies the user about updates:
-//
-// AUM Set to: Minor Releases: Major Releases:
-// 0 download no prompt download no prompt
-// 1 download no prompt download no prompt if no incompatibilities
-// 2 download no prompt prompt
-//
-// See chart in nsUpdateService.js.in for more details
-//
-pref("app.update.mode", 1);
-// If set to true, the Update Service will present no UI for any event.
-pref("app.update.silent", false);
-
-// Update service URL:
-pref("app.update.url", "https://aus2.mozilla.org/update/1/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/update.xml");
-pref("app.update.vendorName.override", "Mozilla");
-
-// URL user can browse to manually if for some reason all update installation
-// attempts fail. TODO: Change this URL
-pref("app.update.url.manual", "http://www.mozilla.org/products/thunderbird/");
-// A default value for the "More information about this update" link
-// supplied in the "An update is available" page of the update wizard.
-pref("app.update.url.details", "chrome://messenger-region/locale/region.properties");
-// User-settable override to app.update.url for testing purposes.
-//pref("app.update.url.override", "");
-
-// Interval: Time between checks for a new version (in seconds)
-// default=1 day
-pref("app.update.interval", 86400);
-// Interval: Time before prompting the user to download a new version that
-// is available (in seconds) default=1 day
-pref("app.update.nagTimer.download", 86400);
-// Interval: Time before prompting the user to restart to install the latest
-// download (in seconds) default=30 minutes
-pref("app.update.nagTimer.restart", 1800);
-// Interval: When all registered timers should be checked (in milliseconds)
-// default=5 seconds
-pref("app.update.timer", 600000);
-
-// Whether or not we show a dialog box informing the user that the update was
-// successfully applied. This is off in Firefox by default since we show a
-// upgrade start page instead! Other apps may wish to show this UI, and supply
-// a whatsNewURL field in their brand.properties that contains a link to a page
-// which tells users what's new in this new update.
-pref("app.update.showInstalledUI", false);
-
// Developers can set this to |true| if they are constantly changing files in their
// extensions directory so that the extension system does not constantly think that
// their extensions are being updated and thus reregistered every time the app is started

31
visibility.patch Normal file
View File

@ -0,0 +1,31 @@
From: Wolfgang Rosenauer <stark@suse.de>
Subject: disable visibility feature
References:
https://bugzilla.novell.com/show_bug.cgi?id=83908
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20297
because of a gcc bug it's not possible to build with that
feature at the moment
Index: configure
===================================================================
RCS file: /cvsroot/mozilla/configure,v
retrieving revision 1.1443
diff -u -p -6 -r1.1443 configure
--- configure 2 Jun 2005 04:00:20 -0000 1.1443
+++ configure 6 Jun 2005 07:34:06 -0000
@@ -7303,13 +7303,13 @@ else
int foo_default = 1;
EOF
ac_cv_visibility_pragma=no
if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
if grep '\.hidden.*foo_hidden' conftest.s >/dev/null; then
if ! grep '\.hidden.*foo_default' conftest.s > /dev/null; then
- ac_cv_visibility_pragma=yes
+ ac_cv_visibility_pragma=no
fi
fi
fi
rm -f conftest.cs
fi

36
xul-picker.patch Normal file
View File

@ -0,0 +1,36 @@
Index: widget/src/gtk2/nsWidgetFactory.cpp
===================================================================
RCS file: /cvsroot/mozilla/widget/src/gtk2/nsWidgetFactory.cpp,v
retrieving revision 1.26.12.1
diff -u -p -6 -r1.26.12.1 nsWidgetFactory.cpp
--- widget/src/gtk2/nsWidgetFactory.cpp 21 Apr 2006 21:43:42 -0000 1.26.12.1
+++ widget/src/gtk2/nsWidgetFactory.cpp 25 Apr 2006 05:05:06 -0000
@@ -52,12 +52,13 @@
#include "nsBidiKeyboard.h"
#include "nsNativeKeyBindings.h"
#include "nsIComponentRegistrar.h"
#include "nsComponentManagerUtils.h"
#include "nsAutoPtr.h"
+#include "prenv.h"
#include <gtk/gtk.h>
/* from nsFilePicker.js */
#define XULFILEPICKER_CID \
{ 0x54ae32f8, 0x1dd2, 0x11b2, \
{ 0xa2, 0x09, 0xdf, 0x7c, 0x50, 0x53, 0x70, 0xf8} }
@@ -83,13 +84,13 @@ nsFilePickerConstructor(nsISupports *aOu
*aResult = nsnull;
if (aOuter != nsnull) {
return NS_ERROR_NO_AGGREGATION;
}
nsCOMPtr<nsIFilePicker> picker;
- if (gtk_check_version(2,6,3) == NULL) {
+ if ( (gtk_check_version(2,6,3) == NULL) && !PR_GetEnv("MOZ_XUL_PICKER") ) {
picker = new nsFilePicker;
} else {
picker = do_CreateInstance(kXULFilePickerCID);
}
if (!picker) {