Rip out the page holder completely.

This commit is contained in:
hyatt%mozilla.org 2003-08-04 23:51:38 +00:00
Родитель e91555797e
Коммит c20da37f7d
9 изменённых файлов: 1 добавлений и 204 удалений

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

@ -178,10 +178,6 @@
type="checkbox" group="sidebar" sidebarurl="chrome://browser/content/history/history-panel.xul"
oncommand="toggleSidebar('viewHistorySidebar');"/>
<broadcaster id="viewPageHolderSidebar" autoCheck="false" label="&pageHolderButton.label;"
type="checkbox" group="sidebar" sidebarurl="chrome://browser/content/page-drawer.xul"
oncommand="toggleSidebar('viewPageHolderSidebar');"/>
<broadcaster id="viewWebPanelsSidebar" autoCheck="false"
type="checkbox" group="sidebar" sidebarurl="chrome://browser/content/web-panels.xul"
oncommand="toggleSidebar('viewWebPanelsSidebar');"/>
@ -254,8 +250,7 @@
<key id="viewBookmarksSidebarKb" key="&manBookmarksCmd.commandkey;" command="viewBookmarksSidebar" modifiers="accel"/>
<key id="key_stop" keycode="VK_ESCAPE" command="Browser:Stop"/>
<key id="key_gotoHistory" key="&history.commandKey;" command="viewHistorySidebar" modifiers="accel"/>
<key id="key_pageHolderSidebar" key="&pageHolder.commandKey;" command="viewPageHolderSidebar" modifiers="accel"/>
<key id="key_textZoomReduce" key="&textZoomReduceCmd.commandkey;" command="cmd_textZoomReduce" modifiers="accel"/>
<key id="key_textZoomEnlarge" key="&textZoomEnlargeCmd.commandkey;" command="cmd_textZoomEnlarge" modifiers="accel"/>
<key key="&textZoomEnlargeCmd.commandkey2;" command="cmd_textZoomEnlarge" modifiers="accel"/>
@ -664,7 +659,6 @@
<menuitem key="key_openDownloadsSidebar" observes="viewDownloadsSidebar"/>
<menuitem key="viewBookmarksSidebarKb" observes="viewBookmarksSidebar"/>
<menuitem key="key_gotoHistory" observes="viewHistorySidebar"/>
<menuitem key="key_pageHolderSidebar" observes="viewPageHolderSidebar"/>
</menupopup>
</menu>
<menuseparator/>
@ -1005,10 +999,6 @@
observes="viewBookmarksSidebar"
tooltiptext="&bookmarksButton.tooltip;"/>
<toolbarbutton id="webpanels-button" class="toolbarbutton-1"
observes="viewPageHolderSidebar"
tooltiptext="&pageHolderButton.tooltip;"/>
<toolbarbutton id="new-tab-button" class="toolbarbutton-1"
label="&tabCmd.label;"
command="cmd_newNavigatorTab"

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

@ -1,111 +0,0 @@
var panelProgressListener = {
onProgressChange : function (aWebProgress, aRequest,
aCurSelfProgress, aMaxSelfProgress,
aCurTotalProgress, aMaxTotalProgress) {
},
onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus)
{
if (!aRequest)
return;
//ignore local/resource:/chrome: files
if (aStatus == NS_NET_STATUS_READ_FROM || aStatus == NS_NET_STATUS_WROTE_TO)
return;
const nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;
const nsIChannel = Components.interfaces.nsIChannel;
if (aStateFlags & nsIWebProgressListener.STATE_START &&
aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {
parent.document.getElementById('sidebar-throbber').setAttribute("loading", "true");
}
else if (aStateFlags & nsIWebProgressListener.STATE_STOP &&
aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {
parent.document.getElementById('sidebar-throbber').removeAttribute("loading");
}
}
,
onLocationChange : function(aWebProgress, aRequest, aLocation) {
},
onStatusChange : function(aWebProgress, aRequest, aStatus, aMessage) {
},
onSecurityChange : function(aWebProgress, aRequest, aState) {
},
QueryInterface : function(aIID)
{
if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
aIID.equals(Components.interfaces.nsISupports))
return this;
throw Components.results.NS_NOINTERFACE;
}
};
var panelAreaDNDObserver = {
onDrop: function (aEvent, aXferData, aDragSession)
{
var url = transferUtils.retrieveURLFromData(aXferData.data, aXferData.flavour.contentType);
// valid urls don't contain spaces ' '; if we have a space it isn't a valid url so bail out
if (!url || !url.length || url.indexOf(" ", 0) != -1)
return;
var uri = getShortcutOrURI(url);
try {
document.getElementById('pageholder-browser').webNavigation.loadURI(uri, nsIWebNavigation.LOAD_FLAGS_NONE, null, null, null);
var addButton = document.getElementById('addpanel-button');
addButton.disabled = false;
} catch (e) {}
// keep the event from being handled by the dragDrop listeners
// built-in to gecko if they happen to be above us.
aEvent.preventDefault();
},
getSupportedFlavours: function ()
{
var flavourSet = new FlavourSet();
flavourSet.appendFlavour("text/x-moz-url");
flavourSet.appendFlavour("text/unicode");
flavourSet.appendFlavour("application/x-moz-file", "nsIFile");
return flavourSet;
}
};
function load()
{
document.getElementById('pageholder-browser').webProgress.addProgressListener(panelProgressListener, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
loadPlaceholderPage();
}
function unload()
{
document.getElementById('pageholder-browser').webProgress.removeProgressListener(panelProgressListener);
}
function loadPlaceholderPage() {
var panelBrowser = document.getElementById('pageholder-browser');
var addButton = document.getElementById('addpanel-button');
panelBrowser.setAttribute("src", "chrome://browser/content/page-drawer.xml");
addButton.disabled = true;
}
function grabPage()
{
var panelBrowser = document.getElementById('pageholder-browser');
try {
panelBrowser.webNavigation.loadURI(window.parent.gBrowser.currentURI.spec, nsIWebNavigation.LOAD_FLAGS_NONE, null, null, null);
var addButton = document.getElementById('addpanel-button');
addButton.disabled = false;
} catch (e) {}
}
function addWebPanel()
{
window.parent.addBookmarkAs(document.getElementById('pageholder-browser'), true);
}

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

@ -1,14 +0,0 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="stylesheet" href="chrome://browser/skin/web-panels-drop-page.css"/>
</head>
<body>
Drop a link here to view it.
You can also click on the <i>Grab Page</i> button above to
view the current page.
</body>
</html>

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

@ -1,26 +0,0 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % webPanelsDTD SYSTEM "chrome://browser/locale/page-drawer.dtd" >
%webPanelsDTD;
]>
<page id="webpanels-window"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="load()" onunload="unload()">
<script type="application/x-javascript" src="chrome://browser/content/browser.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
<script type="application/x-javascript" src="chrome://browser/content/contentAreaUtils.js"/>
<script type="application/x-javascript" src="chrome://browser/content/page-drawer.js"/>
<hbox align="center">
<toolbarbutton id="addpanel-button" label="&addPanel.label;" oncommand="addWebPanel()"/>
<spacer flex="1"/>
<toolbarbutton label="&viewPage.label;" oncommand="grabPage()"/>
</hbox>
<browser id="pageholder-browser" type="content" flex="1"
onclick="return window.parent.contentAreaClick(event, true);"
ondragdrop="nsDragAndDrop.drop(event, panelAreaDNDObserver);"/>
</page>

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

@ -19,9 +19,6 @@ browser.jar:
content/browser/pageInfo.css (content/pageInfo.css)
content/browser/web-panels.js (content/web-panels.js)
content/browser/web-panels.xul (content/web-panels.xul)
content/browser/page-drawer.xml (content/page-drawer.xml)
content/browser/page-drawer.js (content/page-drawer.js)
content/browser/page-drawer.xul (content/page-drawer.xul)
classic.jar:
skin/classic/browser/aboutDialog.css (skin/aboutDialog.css)
@ -43,8 +40,6 @@ classic.jar:
skin/classic/browser/Toolbar.png (skin/Toolbar.png)
skin/classic/browser/lock-insecure.gif (skin/lock-insecure.gif)
skin/classic/browser/lock-mixed.gif (skin/lock-mixed.gif)
skin/classic/browser/web-panels-drop-page.css (skin/web-panels-drop-page.css)
skin/classic/browser/web-panels-bg.png (skin/web-panels-bg.png)
en-US.jar:
locale/en-US/browser/contents.rdf (locale/contents.rdf)

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

@ -104,8 +104,6 @@
<!ENTITY downloadManagerCmd.label "Download Manager">
<!ENTITY pageHolder.commandKey "j">
<!ENTITY downloadManagerCmd.accesskey "D">
<!ENTITY javaConsoleCmd.label "Java Console">
@ -253,9 +251,6 @@
<!ENTITY historyButton.label "History">
<!ENTITY historyButton.tooltip "Displays pages you've viewed recently">
<!ENTITY pageHolderButton.label "Page Holder">
<!ENTITY pageHolderButton.tooltip "Displays pages in a sidebar panel">
<!ENTITY newTabButton.tooltip "Opens a new tab">
<!ENTITY newWindowButton.tooltip "Opens a new window">

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

@ -302,18 +302,6 @@ toolbar[mode="text"] .toolbarbutton-text {
-moz-image-region: rect(64px 224px 96px 192px);
}
/* FIXME: Bogus placeholder (using bookmarks image) until we have an icon in this theme for web panels */
#webpanels-button {
-moz-image-region: rect(0px 256px 32px 224px);
}
#webpanels-button:hover,
#webpanels-button[checked="true"] {
-moz-image-region: rect(32px 256px 64px 224px);
}
#webpanels-button[disabled="true"] {
-moz-image-region: rect(64px 256px 96px 224px);
}
#cut-button {
-moz-image-region: rect(0px 384px 32px 352px);
}
@ -454,20 +442,6 @@ toolbar[iconsize="small"] #bookmarks-button[disabled="true"] {
-moz-image-region: rect(40px 160px 60px 140px) !important;
}
/* FIXME: Bogus placeholder for Web Panels. Using the small Bookmarks button image
until we get an image. */
toolbar[iconsize="small"] #webpanels-button {
-moz-image-region: rect(0px 160px 20px 140px);
}
toolbar[iconsize="small"] #webpanels-button:hover,
toolbar[iconsize="small"] #webpanels-button[checked="true"] {
-moz-image-region: rect(20px 160px 40px 140px);
}
toolbar[iconsize="small"] #webpanels-button[disabled="true"] {
-moz-image-region: rect(40px 160px 60px 140px) !important;
}
toolbar[iconsize="small"] #history-button {
-moz-image-region: rect(0px 140px 20px 120px);
}

Двоичные данные
browser/base/skin/web-panels-bg.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 442 B

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

@ -1,6 +0,0 @@
html {
width:100%;
height:100%;
background: url(chrome://browser/skin/web-panels-bg.png) repeat-y;
display: block;
}