From cbe71d171e47693f4d05fefddc25051f5b948134 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 7 Aug 2020 18:00:33 -0400 Subject: [PATCH] [Navigator] Remove Shell Service and Windows Installer This will be replaced with more contemporary versions in a future series of commits. tl;dr NOW I HAVE TO DO IT, DAMN IT! --- navigator/Makefile.in | 2 + navigator/components/build/nsModule.cpp | 36 - navigator/components/moz.build | 2 +- .../shell/content/defaultClientDialog.js | 62 - .../shell/content/defaultClientDialog.xul | 37 - .../shell/content/setDesktopBackground.js | 73 -- .../shell/content/setDesktopBackground.xul | 50 - navigator/components/shell/jar.mn | 14 - .../shell/locale/defaultClientDialog.dtd | 14 - .../shell/locale/setDesktopBackground.dtd | 19 - .../shell/locale/shellservice.properties | 7 - navigator/components/shell/moz.build | 40 - .../components/shell/nsSetDefault.manifest | 3 - .../shell/public/nsIShellService.idl | 113 -- .../shell/public/nsIWindowsShellService.idl | 18 - .../shell/src/nsGNOMEShellService.cpp | 498 -------- .../shell/src/nsGNOMEShellService.h | 39 - .../shell/src/nsMacShellService.cpp | 457 -------- .../components/shell/src/nsMacShellService.h | 39 - .../components/shell/src/nsSetDefault.js | 54 - .../components/shell/src/nsShellService.h | 13 - .../shell/src/nsWindowsShellService.cpp | 939 --------------- .../shell/src/nsWindowsShellService.h | 45 - navigator/installer/package-manifest.in | 17 +- navigator/installer/windows/Makefile.in | 74 -- navigator/installer/windows/app.tag | 4 - .../windows/locale/custom.properties | 90 -- .../installer/windows/locale/mui.properties | 64 - .../windows/locale/override.properties | 86 -- navigator/installer/windows/moz.build | 13 - navigator/installer/windows/nsis/custom.nsi | 137 --- .../installer/windows/nsis/defines.nsi.in | 46 - .../installer/windows/nsis/installer.nsi | 1042 ---------------- navigator/installer/windows/nsis/shared.nsh | 1044 ----------------- .../installer/windows/nsis/uninstaller.nsi | 573 --------- .../installer/windows/nsis/updater_append.ini | 16 - navigator/moz.build | 4 +- 37 files changed, 7 insertions(+), 5777 deletions(-) delete mode 100644 navigator/components/shell/content/defaultClientDialog.js delete mode 100644 navigator/components/shell/content/defaultClientDialog.xul delete mode 100644 navigator/components/shell/content/setDesktopBackground.js delete mode 100644 navigator/components/shell/content/setDesktopBackground.xul delete mode 100644 navigator/components/shell/jar.mn delete mode 100644 navigator/components/shell/locale/defaultClientDialog.dtd delete mode 100644 navigator/components/shell/locale/setDesktopBackground.dtd delete mode 100644 navigator/components/shell/locale/shellservice.properties delete mode 100644 navigator/components/shell/moz.build delete mode 100644 navigator/components/shell/nsSetDefault.manifest delete mode 100644 navigator/components/shell/public/nsIShellService.idl delete mode 100644 navigator/components/shell/public/nsIWindowsShellService.idl delete mode 100644 navigator/components/shell/src/nsGNOMEShellService.cpp delete mode 100644 navigator/components/shell/src/nsGNOMEShellService.h delete mode 100644 navigator/components/shell/src/nsMacShellService.cpp delete mode 100644 navigator/components/shell/src/nsMacShellService.h delete mode 100644 navigator/components/shell/src/nsSetDefault.js delete mode 100644 navigator/components/shell/src/nsShellService.h delete mode 100644 navigator/components/shell/src/nsWindowsShellService.cpp delete mode 100644 navigator/components/shell/src/nsWindowsShellService.h delete mode 100644 navigator/installer/windows/Makefile.in delete mode 100644 navigator/installer/windows/app.tag delete mode 100644 navigator/installer/windows/locale/custom.properties delete mode 100644 navigator/installer/windows/locale/mui.properties delete mode 100644 navigator/installer/windows/locale/override.properties delete mode 100644 navigator/installer/windows/moz.build delete mode 100644 navigator/installer/windows/nsis/custom.nsi delete mode 100644 navigator/installer/windows/nsis/defines.nsi.in delete mode 100644 navigator/installer/windows/nsis/installer.nsi delete mode 100644 navigator/installer/windows/nsis/shared.nsh delete mode 100644 navigator/installer/windows/nsis/uninstaller.nsi delete mode 100644 navigator/installer/windows/nsis/updater_append.ini diff --git a/navigator/Makefile.in b/navigator/Makefile.in index 0afeeea4..a1035b04 100644 --- a/navigator/Makefile.in +++ b/navigator/Makefile.in @@ -5,12 +5,14 @@ include $(topsrcdir)/config/rules.mk +ifdef 0 ifdef MAKENSISU # For Windows build the uninstaller during the application build since the # uninstaller is included with the application for mar file generation. libs:: $(MAKE) -C installer/windows uninstaller endif +endif # As a fallout from bug 1247162, the sourcestamp in application.ini and diff --git a/navigator/components/build/nsModule.cpp b/navigator/components/build/nsModule.cpp index c6d2df49..f14b7da4 100644 --- a/navigator/components/build/nsModule.cpp +++ b/navigator/components/build/nsModule.cpp @@ -9,59 +9,23 @@ #include "nsRDFCID.h" #include "nsFeedSniffer.h" -#if defined(XP_WIN) -#include "nsWindowsShellService.h" -#elif defined(XP_MACOSX) -#include "nsMacShellService.h" -#elif defined(MOZ_WIDGET_GTK) -#include "nsGNOMEShellService.h" -#endif - ///////////////////////////////////////////////////////////////////////////// -#if defined(XP_WIN) -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowsShellService, Init) -#elif defined(XP_MACOSX) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService) -#elif defined(MOZ_WIDGET_GTK) -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init) -#endif NS_GENERIC_FACTORY_CONSTRUCTOR(nsSuiteDirectoryProvider) NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer) -#if defined(NS_SUITEWININTEGRATION_CID) -NS_DEFINE_NAMED_CID(NS_SUITEWININTEGRATION_CID); -#elif defined(NS_SUITEMACINTEGRATION_CID) -NS_DEFINE_NAMED_CID(NS_SUITEMACINTEGRATION_CID); -#elif defined(NS_SUITEGNOMEINTEGRATION_CID) -NS_DEFINE_NAMED_CID(NS_SUITEGNOMEINTEGRATION_CID); -#endif NS_DEFINE_NAMED_CID(NS_SUITEDIRECTORYPROVIDER_CID); NS_DEFINE_NAMED_CID(NS_FEEDSNIFFER_CID); ///////////////////////////////////////////////////////////////////////////// static const mozilla::Module::CIDEntry kSuiteCIDs[] = { -#if defined(NS_SUITEWININTEGRATION_CID) - { &kNS_SUITEWININTEGRATION_CID, false, NULL, nsWindowsShellServiceConstructor }, -#elif defined(NS_SUITEMACINTEGRATION_CID) - { &kNS_SUITEMACINTEGRATION_CID, false, NULL, nsMacShellServiceConstructor }, -#elif defined(NS_SUITEGNOMEINTEGRATION_CID) - { &kNS_SUITEGNOMEINTEGRATION_CID, false, NULL, nsGNOMEShellServiceConstructor }, -#endif { &kNS_SUITEDIRECTORYPROVIDER_CID, false, NULL, nsSuiteDirectoryProviderConstructor }, { &kNS_FEEDSNIFFER_CID, false, NULL, nsFeedSnifferConstructor }, { NULL } }; static const mozilla::Module::ContractIDEntry kSuiteContracts[] = { -#if defined(NS_SUITEWININTEGRATION_CID) - { NS_SUITESHELLSERVICE_CONTRACTID, &kNS_SUITEWININTEGRATION_CID }, -#elif defined(NS_SUITEMACINTEGRATION_CID) - { NS_SUITESHELLSERVICE_CONTRACTID, &kNS_SUITEMACINTEGRATION_CID }, -#elif defined(NS_SUITEGNOMEINTEGRATION_CID) - { NS_SUITESHELLSERVICE_CONTRACTID, &kNS_SUITEGNOMEINTEGRATION_CID }, -#endif { NS_SUITEDIRECTORYPROVIDER_CONTRACTID, &kNS_SUITEDIRECTORYPROVIDER_CID }, { NS_FEEDSNIFFER_CONTRACTID, &kNS_FEEDSNIFFER_CID }, { NULL } diff --git a/navigator/components/moz.build b/navigator/components/moz.build index 70961fbe..5ee13dea 100644 --- a/navigator/components/moz.build +++ b/navigator/components/moz.build @@ -16,7 +16,7 @@ DIRS += [ 'preferences', 'search', 'sessionstore', - 'shell', +# 'shell', 'sidebar', 'smile', ] diff --git a/navigator/components/shell/content/defaultClientDialog.js b/navigator/components/shell/content/defaultClientDialog.js deleted file mode 100644 index 06ff137c..00000000 --- a/navigator/components/shell/content/defaultClientDialog.js +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -// this dialog can only be opened if we have a shell service -const nsIShellService = Components.interfaces.nsIShellService; -const nsIPrefBranch = Components.interfaces.nsIPrefBranch; - -function onLoad() -{ - var shellSvc = Components.classes["@binaryoutcast.com/navigator/shell-service;1"] - .getService(nsIShellService); - var defaultList = document.getElementById("defaultList"); - var appTypes = shellSvc.shouldBeDefaultClientFor; - /* Iterate through the list of possible default client types and check for - each list item if we want to be the default for that type using the AND - conjunction */ - for (var i = 0; i < defaultList.getRowCount(); i++) { - var currentItem = defaultList.getItemAtIndex(i); - try { - if (shellSvc.isDefaultClient(false, nsIShellService[currentItem.value])) { - currentItem.checked = true; - currentItem.disabled = true; - } - else if (nsIShellService[currentItem.value] & appTypes) - currentItem.checked = true; - } catch (e) { - currentItem.hidden = true; - } - } -} - -function onAccept() -{ - // for each checked item, if we aren't already the default, make us the default. - var shellSvc = Components.classes["@binaryoutcast.com/navigator/shell-service;1"] - .getService(nsIShellService); - var appTypes = 0; - var appTypesCheck = 0; - var defaultList = document.getElementById("defaultList"); - - for (var i = 0; i < defaultList.getRowCount(); i++) { - var currentItem = defaultList.getItemAtIndex(i); - var currentAppType = nsIShellService[currentItem.value]; - - if (currentItem.checked) { - appTypesCheck |= currentAppType; - - if (!currentItem.disabled) - appTypes |= currentAppType; - } - } - - if (appTypes) - shellSvc.setDefaultClient(false, true, appTypes); - - // Update the pref for which app types we should check if we are the default app - shellSvc.shouldBeDefaultClientFor = appTypesCheck; - - shellSvc.shouldCheckDefaultClient = document.getElementById('checkOnStartup').checked; -} diff --git a/navigator/components/shell/content/defaultClientDialog.xul b/navigator/components/shell/content/defaultClientDialog.xul deleted file mode 100644 index fb9acf2d..00000000 --- a/navigator/components/shell/content/defaultClientDialog.xul +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - %brandDTD; - - %defaultClientDTD; -]> - - - -