зеркало из https://github.com/mozilla/pjs.git
Bug 250637: Remove broken "Power Search" feature that was never really implemented
r=pkwarren, sr=neil
This commit is contained in:
Родитель
9827f3bfec
Коммит
a590e4fbda
|
@ -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.last_search_category", "NC:SearchCategory?category=urn:search:category:1");
|
||||
pref("browser.search.mode", 0);
|
||||
pref("browser.search.powermode", 0);
|
||||
// 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)
|
||||
pref("browser.search.basic.min_ver", "0.0");
|
||||
|
|
|
@ -996,7 +996,7 @@ function QualifySearchTerm()
|
|||
return "";
|
||||
}
|
||||
|
||||
function OpenSearch(tabName, forceDialogFlag, searchStr, newWindowFlag)
|
||||
function OpenSearch(tabName, searchStr, newWindowFlag)
|
||||
{
|
||||
//This function needs to be split up someday.
|
||||
|
||||
|
@ -1031,55 +1031,32 @@ function OpenSearch(tabName, forceDialogFlag, searchStr, newWindowFlag)
|
|||
if (forceAsURL) {
|
||||
BrowserLoadURL()
|
||||
} else {
|
||||
var searchMode = 0;
|
||||
try {
|
||||
searchMode = pref.getIntPref("browser.search.powermode");
|
||||
} catch(ex) {
|
||||
}
|
||||
if (searchStr) {
|
||||
var escapedSearchStr = encodeURIComponent(searchStr);
|
||||
defaultSearchURL += escapedSearchStr;
|
||||
var searchDS = Components.classes["@mozilla.org/rdf/datasource;1?name=internetsearch"]
|
||||
.getService(Components.interfaces.nsIInternetSearchService);
|
||||
|
||||
if (forceDialogFlag || searchMode == 1) {
|
||||
// Use a single search dialog
|
||||
var windowManager = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
|
||||
var searchWindow = windowManager.getMostRecentWindow("search:window");
|
||||
if (!searchWindow) {
|
||||
openDialog("chrome://communicator/content/search/search.xul", "SearchWindow", "dialog=no,close,chrome,resizable", tabName, searchStr);
|
||||
} else {
|
||||
// Already had one, focus it and load the page
|
||||
searchWindow.focus();
|
||||
|
||||
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;
|
||||
}
|
||||
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) {
|
||||
}
|
||||
|
||||
if (!newWindowFlag)
|
||||
loadURI(defaultSearchURL);
|
||||
else
|
||||
window.open(defaultSearchURL, "_blank");
|
||||
} catch (ex) {
|
||||
}
|
||||
|
||||
if (!newWindowFlag)
|
||||
loadURI(defaultSearchURL);
|
||||
else
|
||||
window.open(defaultSearchURL, "_blank");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -220,7 +220,7 @@
|
|||
|
||||
<button id="search-button" class="button-toolbar chromeclass-location"
|
||||
label="&searchButton.label;"
|
||||
oncommand="OpenSearch('internet',false, QualifySearchTerm());"
|
||||
oncommand="OpenSearch('internet', QualifySearchTerm());"
|
||||
ondragover="nsDragAndDrop.dragOver(event, searchButtonObserver);"
|
||||
ondragdrop="nsDragAndDrop.drop(event, searchButtonObserver);"
|
||||
ondragexit="nsDragAndDrop.dragExit(event, searchButtonObserver);"
|
||||
|
|
|
@ -199,7 +199,7 @@ var searchButtonObserver = {
|
|||
var xferData = aXferData.data.split("\n");
|
||||
var uri = xferData[1] ? xferData[1] : xferData[0];
|
||||
if (uri)
|
||||
OpenSearch('internet',false, uri);
|
||||
OpenSearch('internet', uri);
|
||||
},
|
||||
getSupportedFlavours: function ()
|
||||
{
|
||||
|
|
|
@ -187,7 +187,7 @@
|
|||
<menuseparator id="context-sep-selectall"/>
|
||||
<menuitem id="context-searchselect"
|
||||
accesskey="&search.accesskey;"
|
||||
oncommand="OpenSearch('internet', false, gContextMenu.searchSelected(), true);"/>
|
||||
oncommand="OpenSearch('internet', gContextMenu.searchSelected(), true);"/>
|
||||
<menuseparator id="frame-sep"/>
|
||||
<menu id="frame" label="&thisFrameMenu.label;" accesskey="&thisFrameMenu.accesskey;">
|
||||
<menupopup id="frame_popup">
|
||||
|
|
|
@ -66,18 +66,11 @@ comm.jar:
|
|||
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.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.xul (search/resources/search-editor.xul)
|
||||
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/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.xul (search/resources/internetresults.xul)
|
||||
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-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/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/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.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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче