Bug 250637: Remove broken "Power Search" feature that was never really implemented

r=pkwarren, sr=neil
This commit is contained in:
Stefan.Borggraefe%gmx.de 2004-09-09 14:23:12 +00:00
Родитель 9827f3bfec
Коммит a590e4fbda
19 изменённых файлов: 26 добавлений и 171 удалений

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

@ -1,55 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Joe Hewitt <hewitt@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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 ***** */
/* ===== search.css =====================================================
== Styles specific to the Search sidebar panel.
======================================================================= */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#stopButton {
list-style-image: url("chrome://communicator/skin/icons/loading.gif");
}
/* :::: undo regular search listbox selection look :::: */
.searchresult-item[selected="true"] {
border: none !important;
background-color: transparent !important;
color: inherit !important;
}

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

@ -1,55 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Joe Hewitt <hewitt@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of 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 ***** */
/* ===== search.css =====================================================
== Styles specific to the Search sidebar panel.
======================================================================= */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#stopButton {
list-style-image: url("chrome://communicator/skin/icons/loading.gif");
}
/* :::: undo regular search listbox selection look :::: */
.searchresult-item[selected="true"] {
border: none !important;
background-color: transparent !important;
color: inherit !important;
}

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

@ -97,7 +97,6 @@ pref("browser.search.defaulturl", "chrome://navigator-region/locale/region.prope
pref("browser.search.opensidebarsearchpanel", true); pref("browser.search.opensidebarsearchpanel", true);
pref("browser.search.last_search_category", "NC:SearchCategory?category=urn:search:category:1"); pref("browser.search.last_search_category", "NC:SearchCategory?category=urn:search:category:1");
pref("browser.search.mode", 0); pref("browser.search.mode", 0);
pref("browser.search.powermode", 0);
// basic search popup constraint: minimum sherlock plugin version displayed // basic search popup constraint: minimum sherlock plugin version displayed
// (note: must be a string representation of a float or it'll default to 0.0) // (note: must be a string representation of a float or it'll default to 0.0)
pref("browser.search.basic.min_ver", "0.0"); pref("browser.search.basic.min_ver", "0.0");

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

@ -996,7 +996,7 @@ function QualifySearchTerm()
return ""; return "";
} }
function OpenSearch(tabName, forceDialogFlag, searchStr, newWindowFlag) function OpenSearch(tabName, searchStr, newWindowFlag)
{ {
//This function needs to be split up someday. //This function needs to be split up someday.
@ -1031,55 +1031,32 @@ function OpenSearch(tabName, forceDialogFlag, searchStr, newWindowFlag)
if (forceAsURL) { if (forceAsURL) {
BrowserLoadURL() BrowserLoadURL()
} else { } else {
var searchMode = 0; if (searchStr) {
try { var escapedSearchStr = encodeURIComponent(searchStr);
searchMode = pref.getIntPref("browser.search.powermode"); defaultSearchURL += escapedSearchStr;
} catch(ex) { var searchDS = Components.classes["@mozilla.org/rdf/datasource;1?name=internetsearch"]
} .getService(Components.interfaces.nsIInternetSearchService);
if (forceDialogFlag || searchMode == 1) { searchDS.RememberLastSearchText(escapedSearchStr);
// Use a single search dialog try {
var windowManager = Components.classes["@mozilla.org/appshell/window-mediator;1"] var searchEngineURI = pref.getCharPref("browser.search.defaultengine");
.getService(Components.interfaces.nsIWindowMediator); if (searchEngineURI) {
var searchURL = getSearchUrl("actionButton");
var searchWindow = windowManager.getMostRecentWindow("search:window"); if (searchURL) {
if (!searchWindow) { defaultSearchURL = searchURL + escapedSearchStr;
openDialog("chrome://communicator/content/search/search.xul", "SearchWindow", "dialog=no,close,chrome,resizable", tabName, searchStr); } else {
} else { searchURL = searchDS.GetInternetSearchURL(searchEngineURI, escapedSearchStr, 0, 0, {value:0});
// Already had one, focus it and load the page if (searchURL)
searchWindow.focus(); defaultSearchURL = searchURL;
if ("loadPage" in searchWindow)
searchWindow.loadPage(tabName, searchStr);
}
} else {
if (searchStr) {
var escapedSearchStr = encodeURIComponent(searchStr);
defaultSearchURL += escapedSearchStr;
var searchDS = Components.classes["@mozilla.org/rdf/datasource;1?name=internetsearch"]
.getService(Components.interfaces.nsIInternetSearchService);
searchDS.RememberLastSearchText(escapedSearchStr);
try {
var searchEngineURI = pref.getCharPref("browser.search.defaultengine");
if (searchEngineURI) {
var searchURL = getSearchUrl("actionButton");
if (searchURL) {
defaultSearchURL = searchURL + escapedSearchStr;
} else {
searchURL = searchDS.GetInternetSearchURL(searchEngineURI, escapedSearchStr, 0, 0, {value:0});
if (searchURL)
defaultSearchURL = searchURL;
}
} }
} catch (ex) {
} }
} catch (ex) {
if (!newWindowFlag)
loadURI(defaultSearchURL);
else
window.open(defaultSearchURL, "_blank");
} }
if (!newWindowFlag)
loadURI(defaultSearchURL);
else
window.open(defaultSearchURL, "_blank");
} }
} }
} }

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

@ -220,7 +220,7 @@
<button id="search-button" class="button-toolbar chromeclass-location" <button id="search-button" class="button-toolbar chromeclass-location"
label="&searchButton.label;" label="&searchButton.label;"
oncommand="OpenSearch('internet',false, QualifySearchTerm());" oncommand="OpenSearch('internet', QualifySearchTerm());"
ondragover="nsDragAndDrop.dragOver(event, searchButtonObserver);" ondragover="nsDragAndDrop.dragOver(event, searchButtonObserver);"
ondragdrop="nsDragAndDrop.drop(event, searchButtonObserver);" ondragdrop="nsDragAndDrop.drop(event, searchButtonObserver);"
ondragexit="nsDragAndDrop.dragExit(event, searchButtonObserver);" ondragexit="nsDragAndDrop.dragExit(event, searchButtonObserver);"

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

@ -199,7 +199,7 @@ var searchButtonObserver = {
var xferData = aXferData.data.split("\n"); var xferData = aXferData.data.split("\n");
var uri = xferData[1] ? xferData[1] : xferData[0]; var uri = xferData[1] ? xferData[1] : xferData[0];
if (uri) if (uri)
OpenSearch('internet',false, uri); OpenSearch('internet', uri);
}, },
getSupportedFlavours: function () getSupportedFlavours: function ()
{ {

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

@ -187,7 +187,7 @@
<menuseparator id="context-sep-selectall"/> <menuseparator id="context-sep-selectall"/>
<menuitem id="context-searchselect" <menuitem id="context-searchselect"
accesskey="&search.accesskey;" accesskey="&search.accesskey;"
oncommand="OpenSearch('internet', false, gContextMenu.searchSelected(), true);"/> oncommand="OpenSearch('internet', gContextMenu.searchSelected(), true);"/>
<menuseparator id="frame-sep"/> <menuseparator id="frame-sep"/>
<menu id="frame" label="&thisFrameMenu.label;" accesskey="&thisFrameMenu.accesskey;"> <menu id="frame" label="&thisFrameMenu.label;" accesskey="&thisFrameMenu.accesskey;">
<menupopup id="frame_popup"> <menupopup id="frame_popup">

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

@ -66,18 +66,11 @@ comm.jar:
content/communicator/pref/pref-winhooks.js (prefwindow/resources/content/pref-winhooks.js) content/communicator/pref/pref-winhooks.js (prefwindow/resources/content/pref-winhooks.js)
content/communicator/related/related-panel.xul (related/resources/related-panel.xul) content/communicator/related/related-panel.xul (related/resources/related-panel.xul)
content/communicator/related/related-panel.js (related/resources/related-panel.js) content/communicator/related/related-panel.js (related/resources/related-panel.js)
content/communicator/search/search.js (search/resources/search.js)
content/communicator/search/search.xul (search/resources/search.xul)
content/communicator/search/search-editor.js (search/resources/search-editor.js) content/communicator/search/search-editor.js (search/resources/search-editor.js)
content/communicator/search/search-editor.xul (search/resources/search-editor.xul) content/communicator/search/search-editor.xul (search/resources/search-editor.xul)
content/communicator/search/search-panel.js (search/resources/search-panel.js) content/communicator/search/search-panel.js (search/resources/search-panel.js)
content/communicator/search/search-panel.xul (search/resources/search-panel.xul) content/communicator/search/search-panel.xul (search/resources/search-panel.xul)
content/communicator/search/shared.js (search/resources/shared.js) content/communicator/search/shared.js (search/resources/shared.js)
content/communicator/search/find.js (search/resources/find.js)
content/communicator/search/find.xul (search/resources/find.xul)
content/communicator/search/findresults.xul (search/resources/findresults.xul)
content/communicator/search/internet.js (search/resources/internet.js)
content/communicator/search/internet.xul (search/resources/internet.xul)
content/communicator/search/internetresults.js (search/resources/internetresults.js) content/communicator/search/internetresults.js (search/resources/internetresults.js)
content/communicator/search/internetresults.xul (search/resources/internetresults.xul) content/communicator/search/internetresults.xul (search/resources/internetresults.xul)
content/communicator/sidebar/sidebarOverlay.css (sidebar/resources/sidebarOverlay.css) content/communicator/sidebar/sidebarOverlay.css (sidebar/resources/sidebarOverlay.css)
@ -139,11 +132,7 @@ en-US.jar:
locale/en-US/communicator/pref/autocomplete-autofill-off.gif (prefwindow/resources/locale/en-US/autocomplete-autofill-off.gif) locale/en-US/communicator/pref/autocomplete-autofill-off.gif (prefwindow/resources/locale/en-US/autocomplete-autofill-off.gif)
locale/en-US/communicator/pref/autocomplete-showpopup.gif (prefwindow/resources/locale/en-US/autocomplete-showpopup.gif) locale/en-US/communicator/pref/autocomplete-showpopup.gif (prefwindow/resources/locale/en-US/autocomplete-showpopup.gif)
locale/en-US/communicator/pref/autocomplete-showsearch.gif (prefwindow/resources/locale/en-US/autocomplete-showsearch.gif) locale/en-US/communicator/pref/autocomplete-showsearch.gif (prefwindow/resources/locale/en-US/autocomplete-showsearch.gif)
locale/en-US/communicator/search/find.dtd (search/resources/locale/en-US/find.dtd)
locale/en-US/communicator/search/findresults.dtd (search/resources/locale/en-US/findresults.dtd)
locale/en-US/communicator/search/internet.dtd (search/resources/locale/en-US/internet.dtd)
locale/en-US/communicator/search/internetresults.dtd (search/resources/locale/en-US/internetresults.dtd) locale/en-US/communicator/search/internetresults.dtd (search/resources/locale/en-US/internetresults.dtd)
locale/en-US/communicator/search/search.dtd (search/resources/locale/en-US/search.dtd)
locale/en-US/communicator/search/search-editor.dtd (search/resources/locale/en-US/search-editor.dtd) locale/en-US/communicator/search/search-editor.dtd (search/resources/locale/en-US/search-editor.dtd)
locale/en-US/communicator/search/search-editor.properties (search/resources/locale/en-US/search-editor.properties) locale/en-US/communicator/search/search-editor.properties (search/resources/locale/en-US/search-editor.properties)
locale/en-US/communicator/search/search-panel.dtd (search/resources/locale/en-US/search-panel.dtd) locale/en-US/communicator/search/search-panel.dtd (search/resources/locale/en-US/search-panel.dtd)

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

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

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

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

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

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

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

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

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

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

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