This commit is contained in:
blakeross%telocity.com 2004-02-16 08:44:50 +00:00
Родитель 41ebdd0573
Коммит 57bf873b61
5 изменённых файлов: 25 добавлений и 59 удалений

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

@ -266,8 +266,9 @@ tier_50_dirs += toolkit
endif
ifdef MOZ_PHOENIX
# xpfe/components/search depends on nsIBookmarksService.idl
tier_50_dirs += browser/components/bookmarks/public
#xpfe/components/search depends on nsIBookmarksService.idl
#XXXBlake this winhooks path is a temp hack; toolkit shouldn't depend on browser
tier_50_dirs += browser/components/bookmarks/public browser/components/winhooks/public
endif
# toolkit/xre/ depends on xpinstall, so it must be in tier 50

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

@ -42,7 +42,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = bookmarks history prefwindow security sidebar cookieviewer build
DIRS = bookmarks history prefwindow security sidebar cookieviewer
ifdef MIGRATION_ENABLED
DIRS += migration
@ -52,4 +52,6 @@ ifeq ($(OS_ARCH),WINNT)
DIRS += winhooks
endif
DIRS += build
include $(topsrcdir)/config/rules.mk

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

@ -1,38 +1,33 @@
#
# The contents of this file are subject to the Mozilla Public
# 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/MPL/
#
# 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 Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# Contributor(s):
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = winhooks
XPIDL_MODULE = winhooks
LIBRARY_NAME = winhooks_s
XPIDLSRCS = nsIWindowsHooks.idl
CPPSRCS = nsWindowsHooks.cpp
LIBRARY_NAME = winhooks_s
REQUIRES = \
xpcom \
@ -50,6 +45,8 @@ REQUIRES = \
locale \
$(NULL)
CPPSRCS = nsWindowsHooks.cpp
FORCE_STATIC_LIB = 1
include $(topsrcdir)/config/rules.mk
@ -61,4 +58,4 @@ libs::
clobber::
rm -f $(DIST)/lib/$(LIBRARY_NAME).lib
rm -f $(DIST)/bin/components/$(JS_SET_BROWSER_COMPONENT)
rm -f $(DIST)/bin/components/$(JS_SET_BROWSER_COMPONENT)

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

@ -22,6 +22,7 @@
* Contributor(s):
* Bill Law <law@netscape.com>
* Dean Tessman <dean_tessman@hotmail.com>
* Blake Ross <blake@blakeross.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
@ -260,17 +261,6 @@ struct FileTypeRegistryEntry : public ProtocolRegistryEntry {
nsresult reset();
};
// EditableFileTypeRegistryEntry
//
// Extends FileTypeRegistryEntry by setting an additional handler for an "edit" command.
struct EditableFileTypeRegistryEntry : public FileTypeRegistryEntry {
EditableFileTypeRegistryEntry( const char **ext, const char *fileType,
const char *desc, const char *defDescKey, const char *iconFile )
: FileTypeRegistryEntry( ext, fileType, desc, defDescKey, iconFile ) {
}
nsresult set();
};
// Generate the "full" name of this registry entry.
nsCString RegistryEntry::fullName() const {
nsCString result;
@ -799,30 +789,6 @@ nsresult FileTypeRegistryEntry::reset() {
return rv;
}
// Do inherited set() and also set key for edit (with -edit option).
//
// Note: We make the rash assumption that we "own" this filetype (aka "protocol").
// If we ever start commandeering some other file type then this may have to be
// rethought. The solution is to override reset() and undo this (and make the
// "edit" entry a SavedRegistryEntry).
nsresult EditableFileTypeRegistryEntry::set() {
nsresult rv = FileTypeRegistryEntry::set();
if ( NS_SUCCEEDED( rv ) ) {
// only set this if we support "-edit" on the command-line
nsCOMPtr<nsICmdLineHandler> editorService =
do_GetService( "@mozilla.org/commandlinehandler/general-startup;1?type=edit", &rv );
if ( NS_SUCCEEDED( rv) ) {
nsCAutoString editKey( "Software\\Classes\\" );
editKey += protocol;
editKey += "\\shell\\edit\\command";
nsCAutoString editor( thisApplication() );
editor += " -edit \"%1\"";
rv = RegistryEntry( HKEY_LOCAL_MACHINE, editKey.get(), "", editor.get() ).set();
}
}
return rv;
}
// Convert current registry setting to boolean.
BoolRegistryEntry::operator PRBool() {
return currentSetting().Equals( "1" ) ? PR_TRUE : PR_FALSE;