snowl/content/collections.xul

216 строки
9.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!-- ***** 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 Snowl.
-
- The Initial Developer of the Original Code is Mozilla.
- Portions created by the Initial Developer are Copyright (C) 2008
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Myk Melez <myk@mozilla.org>
-
- 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
- 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 ***** -->
<?xml-stylesheet href="chrome://snowl/content/collections.css" type="text/css"?>
<!DOCTYPE overlay [
<!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">
%placesDTD;
<!ENTITY % collectionsDTD SYSTEM "chrome://snowl/locale/collections.dtd">
%collectionsDTD;
]>
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript"
src="chrome://snowl/content/strands.js"/>
<script type="application/x-javascript"
src="chrome://snowl/content/collections.js"/>
<!-- Extend placesContext -->
<popup id="placesContext"
onpopupshowing="this._view = PlacesUIUtils.getViewForNode(document.popupNode);
this._view.buildContextMenu(this);
CollectionsView.buildContextMenu(this);
return;"
onpopuphidden="CollectionsView.onTreeContextPopupHidden(event)">
<menuitem id="placesContext_open"
forcehideselection="Snowl/Collections/Source|Snowl/Collections/Author"/>
<menuitem id="placesContext_open:newwindow"
forcehideselection="Snowl/Collections/Source|Snowl/Collections/Author"/>
<menuitem id="placesContext_open:newtab"
forcehideselection="Snowl/Collections/Source|Snowl/Collections/Author"/>
<menuitem id="placesContext_openContainer:tabs"
forcehideselection="folder|query"/>
<menuitem id="placesContext_openLinks:tabs"
forcehideselection="Snowl/Collections/Source|Snowl/Collections/Author"/>
<menuseparator id="placesContext_openSeparator"
forcehideselection="Snowl/Collections/Source|Snowl/Collections/Author"/>
<menuitem id="placesContext_cut"
forcehideselection="Snowl/Collections|Snowl/User/ViewList"/>
<menuitem id="placesContext_copy"
forcehideselection="Snowl/Collections|Snowl/User/ViewList"/>
<menuitem id="placesContext_delete"
forcehideselection="Snowl/Collections|Snowl/User/ViewList"/>
<menuitem id="placesContext_sortBy:name"
forcehideselection="Snowl/Collections"/>
<menuitem id="snowlCollectionNewViewMenuitem"
insertbefore="placesContext_new:bookmark"
label="&newView.label;"
accesskey="&newView.accesskey;"
selectiontype="any"
selection="any"
oncommand="CollectionsView.newView();"/>
<menuitem id="snowlCollectionRemoveViewMenuitem"
insertbefore="placesContext_show:info"
label="&removeView.label;"
accesskey="&removeView.accesskey;"
selectiontype="single"
selection="Snowl/User/ViewList"
forcehideselection="query"
oncommand="CollectionsView.removeView();"/>
<menuitem id="snowlCollectionMarkRead"
insertbefore="placesContext_show:info"
label="&markRead.label;"
accesskey="&markRead.accesskey;"
selection="Snowl/Collections/Source|Snowl/Collections/Author"
oncommand="CollectionsView.markCollectionRead();"/>
<menuitem id="snowlCollectionMarkAllRead"
insertbefore="placesContext_show:info"
label="&markAllRead.label;"
accesskey="&markRead.accesskey;"
selection="Snowl/Collections"
oncommand="CollectionsView.markCollectionRead();"/>
<menuitem id="snowlCollectionRefreshMenuitem"
insertbefore="placesContext_show:info"
label="&refresh.label;"
accesskey="&refresh.accesskey;"
selectiontype="single"
selection="Snowl/Collections/Source"
oncommand="CollectionsView.refreshSource();"/>
<menuitem id="snowlCollectionRefreshAllMenuitem"
insertbefore="placesContext_show:info"
label="&refreshAll.label;"
accesskey="&refreshAll.accesskey;"
selectiontype="multiple"
selection="any"
oncommand="SnowlService.refreshAllSources();"/>
<menuitem id="snowlCollectionPauseMenuitem"
insertbefore="placesContext_show:info"
label="&pause.label;"
accesskey="&pause.accesskey;"
selectiontype="single"
selection="Snowl/Collections/Source"
oncommand="CollectionsView.setRefreshStatus('paused');"/>
<menuitem id="snowlCollectionResumeMenuitem"
insertbefore="placesContext_show:info"
label="&resume.label;"
accesskey="&resume.accesskey;"
selectiontype="single"
selection="Snowl/Collections/Source"
oncommand="CollectionsView.setRefreshStatus('active');"/>
<menuitem id="snowlCollectionPauseAllMenuitem"
insertbefore="placesContext_show:info"
label="&pauseAll.label;"
accesskey="&pause.accesskey;"
selectiontype="single"
selection="Snowl/Collections"
oncommand="CollectionsView.setRefreshStatus('paused', true);"/>
<menuitem id="snowlCollectionResumeAllMenuitem"
insertbefore="placesContext_show:info"
label="&resumeAll.label;"
accesskey="&resume.accesskey;"
selectiontype="single"
selection="Snowl/Collections"
oncommand="CollectionsView.setRefreshStatus('active', true);"/>
<menuseparator id="snowlPlacesContextRemoveSourceSep"
insertbefore="placesContext_show:info"/>
<menuitem id="snowlCollectionRemoveSourceMenuitem"
insertbefore="placesContext_show:info"
label="&removeSource.label;"
accesskey="&removeSource.accesskey;"
selectiontype="single"
selection="Snowl/Collections/Source"
oncommand="CollectionsView.removeSource();"/>
<menuitem id="snowlCollectionRemoveAuthorMenuitem"
insertbefore="placesContext_show:info"
label="&removeAuthor.label;"
accesskey="&removeAuthor.accesskey;"
selectiontype="single"
selection="Snowl/Collections/Author"
oncommand="CollectionsView.removeAuthor();"/>
<menuitem id="placesContext_sortBy:nameSrcAuth"
label="&cmd.sortby_name.label;"
accesskey="&cmd.context_sortby_name.accesskey;"
closemenu="single"
selection="Snowl/Collections"
forcehideselection="query|Snowl/Collections/System"
oncommand="var view = PlacesUIUtils.getViewForNode(document.popupNode);
view.controller.sortFolderByName();"/>
<menuseparator id="snowlPlacesContextExtensionSep"
insertbefore="placesContext_show:info"/>
</popup>
<vbox id="collectionsViewBox"
flex="1">
<tree id="sourcesView"
flex="1"
editable="true"
class="sidebar-placesTree"
type="places"
persist="itemids"
itemids="-1"
hidecolumnpicker="true"
context="placesContext"
_selectDelay="500"
onkeypress="SidebarUtils.handleTreeKeyPress(event);"
onmousemove="SidebarUtils.handleTreeMouseMove(event);"
onmouseout="SidebarUtils.clearURLFromStatusBar();"
onselect="CollectionsView.onSelect(event)"
onclick="CollectionsView.onClick(event)">
<treecols>
<!-- Don't use label if hideheader=true - label="&nameCol.label;" -->
<treecol id="title"
primary="true"
flex="1"
hideheader="true"/>
</treecols>
<treechildren id="sourcesViewTreeChildren"
flex="1"
view="sourcesView"
class="sidebar-placesTreechildren"
onmousedown="CollectionsView.onCollectionsTreeMouseDown(event)"/>
</tree>
</vbox>
</overlay>