1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/components/places/content/placesOverlay.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,224 @@ 1.4 +<!-- This Source Code Form is subject to the terms of the Mozilla Public 1.5 + - License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> 1.7 + 1.8 +<!DOCTYPE overlay [ 1.9 +<!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd"> 1.10 +%placesDTD; 1.11 +<!ENTITY % editMenuOverlayDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd"> 1.12 +%editMenuOverlayDTD; 1.13 +]> 1.14 + 1.15 +<overlay id="placesOverlay" 1.16 + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 1.17 + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 1.18 + 1.19 + <script type="application/javascript" 1.20 + src="chrome://global/content/globalOverlay.js"/> 1.21 + <script type="application/javascript" 1.22 + src="chrome://browser/content/utilityOverlay.js"/> 1.23 + <script type="application/javascript"><![CDATA[ 1.24 + // TODO: Bug 406371. 1.25 + // A bunch of browser code depends on us defining these, sad but true :( 1.26 + var Cc = Components.classes; 1.27 + var Ci = Components.interfaces; 1.28 + var Cr = Components.results; 1.29 + 1.30 + Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); 1.31 + Components.utils.import("resource://gre/modules/Task.jsm"); 1.32 + Components.utils.import("resource://gre/modules/PlacesUtils.jsm"); 1.33 + XPCOMUtils.defineLazyModuleGetter(window, 1.34 + "PlacesUIUtils", "resource:///modules/PlacesUIUtils.jsm"); 1.35 + XPCOMUtils.defineLazyModuleGetter(window, 1.36 + "PlacesTransactions", "resource://gre/modules/PlacesTransactions.jsm"); 1.37 + ]]></script> 1.38 + <script type="application/javascript" 1.39 + src="chrome://browser/content/places/controller.js"/> 1.40 + <script type="application/javascript" 1.41 + src="chrome://browser/content/places/treeView.js"/> 1.42 + 1.43 + <!-- Bookmarks and history tooltip --> 1.44 + <tooltip id="bhTooltip" noautohide="true" 1.45 + onpopupshowing="return window.top.BookmarksEventHandler.fillInBHTooltip(document, event)"> 1.46 + <vbox id="bhTooltipTextBox" flex="1"> 1.47 + <label id="bhtTitleText" class="tooltip-label" /> 1.48 + <label id="bhtUrlText" crop="center" class="tooltip-label" /> 1.49 + </vbox> 1.50 + </tooltip> 1.51 + 1.52 + <commandset id="placesCommands" 1.53 + commandupdater="true" 1.54 + events="focus,sort,places" 1.55 + oncommandupdate="goUpdatePlacesCommands();"> 1.56 + <command id="placesCmd_open" 1.57 + oncommand="goDoPlacesCommand('placesCmd_open');"/> 1.58 + <command id="placesCmd_open:window" 1.59 + oncommand="goDoPlacesCommand('placesCmd_open:window');"/> 1.60 + <command id="placesCmd_open:tab" 1.61 + oncommand="goDoPlacesCommand('placesCmd_open:tab');"/> 1.62 + 1.63 + <command id="placesCmd_new:bookmark" 1.64 + oncommand="goDoPlacesCommand('placesCmd_new:bookmark');"/> 1.65 + <command id="placesCmd_new:folder" 1.66 + oncommand="goDoPlacesCommand('placesCmd_new:folder');"/> 1.67 + <command id="placesCmd_new:separator" 1.68 + oncommand="goDoPlacesCommand('placesCmd_new:separator');"/> 1.69 + <command id="placesCmd_show:info" 1.70 + oncommand="goDoPlacesCommand('placesCmd_show:info');"/> 1.71 + <command id="placesCmd_rename" 1.72 + oncommand="goDoPlacesCommand('placesCmd_show:info');" 1.73 + observes="placesCmd_show:info"/> 1.74 + <command id="placesCmd_reload" 1.75 + oncommand="goDoPlacesCommand('placesCmd_reload');"/> 1.76 + <command id="placesCmd_sortBy:name" 1.77 + oncommand="goDoPlacesCommand('placesCmd_sortBy:name');"/> 1.78 + <command id="placesCmd_moveBookmarks" 1.79 + oncommand="goDoPlacesCommand('placesCmd_moveBookmarks');"/> 1.80 + <command id="placesCmd_deleteDataHost" 1.81 + oncommand="goDoPlacesCommand('placesCmd_deleteDataHost');"/> 1.82 + <command id="placesCmd_createBookmark" 1.83 + oncommand="goDoPlacesCommand('placesCmd_createBookmark');"/> 1.84 + 1.85 + <!-- Special versions of cut/copy/paste/delete which check for an open context menu. --> 1.86 + <command id="placesCmd_cut" 1.87 + oncommand="goDoPlacesCommand('placesCmd_cut');"/> 1.88 + <command id="placesCmd_copy" 1.89 + oncommand="goDoPlacesCommand('placesCmd_copy');"/> 1.90 + <command id="placesCmd_paste" 1.91 + oncommand="goDoPlacesCommand('placesCmd_paste');"/> 1.92 + <command id="placesCmd_delete" 1.93 + oncommand="goDoPlacesCommand('placesCmd_delete');"/> 1.94 + </commandset> 1.95 + 1.96 + <menupopup id="placesContext" 1.97 + onpopupshowing="this._view = PlacesUIUtils.getViewForNode(document.popupNode); 1.98 + return this._view.buildContextMenu(this);" 1.99 + onpopuphiding="this._view.destroyContextMenu();"> 1.100 + <menuitem id="placesContext_open" 1.101 + command="placesCmd_open" 1.102 + label="&cmd.open.label;" 1.103 + accesskey="&cmd.open.accesskey;" 1.104 + default="true" 1.105 + selectiontype="single" 1.106 + selection="link"/> 1.107 + <menuitem id="placesContext_open:newtab" 1.108 + command="placesCmd_open:tab" 1.109 + label="&cmd.open_tab.label;" 1.110 + accesskey="&cmd.open_tab.accesskey;" 1.111 + selectiontype="single" 1.112 + selection="link"/> 1.113 + <menuitem id="placesContext_openContainer:tabs" 1.114 + oncommand="var view = PlacesUIUtils.getViewForNode(document.popupNode); 1.115 + view.controller.openSelectionInTabs(event);" 1.116 + onclick="checkForMiddleClick(this, event);" 1.117 + label="&cmd.open_all_in_tabs.label;" 1.118 + accesskey="&cmd.open_all_in_tabs.accesskey;" 1.119 + selectiontype="single" 1.120 + selection="folder|host|query"/> 1.121 + <menuitem id="placesContext_openLinks:tabs" 1.122 + oncommand="var view = PlacesUIUtils.getViewForNode(document.popupNode); 1.123 + view.controller.openSelectionInTabs(event);" 1.124 + onclick="checkForMiddleClick(this, event);" 1.125 + label="&cmd.open_all_in_tabs.label;" 1.126 + accesskey="&cmd.open_all_in_tabs.accesskey;" 1.127 + selectiontype="multiple" 1.128 + selection="link"/> 1.129 + <menuitem id="placesContext_open:newwindow" 1.130 + command="placesCmd_open:window" 1.131 + label="&cmd.open_window.label;" 1.132 + accesskey="&cmd.open_window.accesskey;" 1.133 + selectiontype="single" 1.134 + selection="link"/> 1.135 + <menuseparator id="placesContext_openSeparator"/> 1.136 + <menuitem id="placesContext_new:bookmark" 1.137 + command="placesCmd_new:bookmark" 1.138 + label="&cmd.new_bookmark.label;" 1.139 + accesskey="&cmd.new_bookmark.accesskey;" 1.140 + selection="any" 1.141 + hideifnoinsertionpoint="true"/> 1.142 + <menuitem id="placesContext_new:folder" 1.143 + command="placesCmd_new:folder" 1.144 + label="&cmd.new_folder.label;" 1.145 + accesskey="&cmd.context_new_folder.accesskey;" 1.146 + selection="any" 1.147 + hideifnoinsertionpoint="true"/> 1.148 + <menuitem id="placesContext_new:separator" 1.149 + command="placesCmd_new:separator" 1.150 + label="&cmd.new_separator.label;" 1.151 + accesskey="&cmd.new_separator.accesskey;" 1.152 + closemenu="single" 1.153 + selection="any" 1.154 + hideifnoinsertionpoint="true"/> 1.155 + <menuseparator id="placesContext_newSeparator"/> 1.156 + <menuitem id="placesContext_createBookmark" 1.157 + command="placesCmd_createBookmark" 1.158 + label="&cmd.bookmarkLink.label;" 1.159 + accesskey="&cmd.bookmarkLink.accesskey;" 1.160 + selection="link" 1.161 + forcehideselection="bookmark|tagChild"/> 1.162 + <menuitem id="placesContext_cut" 1.163 + command="placesCmd_cut" 1.164 + label="&cutCmd.label;" 1.165 + accesskey="&cutCmd.accesskey;" 1.166 + closemenu="single" 1.167 + selection="bookmark|folder|separator|query" 1.168 + forcehideselection="tagChild|livemarkChild"/> 1.169 + <menuitem id="placesContext_copy" 1.170 + command="placesCmd_copy" 1.171 + label="©Cmd.label;" 1.172 + closemenu="single" 1.173 + accesskey="©Cmd.accesskey;" 1.174 + selection="any"/> 1.175 + <menuitem id="placesContext_paste" 1.176 + command="placesCmd_paste" 1.177 + label="&pasteCmd.label;" 1.178 + closemenu="single" 1.179 + accesskey="&pasteCmd.accesskey;" 1.180 + selection="any" 1.181 + hideifnoinsertionpoint="true"/> 1.182 + <menuseparator id="placesContext_editSeparator"/> 1.183 + <menuitem id="placesContext_delete" 1.184 + command="placesCmd_delete" 1.185 + label="&deleteCmd.label;" 1.186 + accesskey="&deleteCmd.accesskey;" 1.187 + closemenu="single" 1.188 + selection="bookmark|tagChild|folder|query|dynamiccontainer|separator|host"/> 1.189 + <menuitem id="placesContext_delete_history" 1.190 + command="placesCmd_delete" 1.191 + label="&cmd.delete.label;" 1.192 + accesskey="&cmd.delete.accesskey;" 1.193 + closemenu="single" 1.194 + selection="link" 1.195 + forcehideselection="bookmark"/> 1.196 + <menuitem id="placesContext_deleteHost" 1.197 + command="placesCmd_deleteDataHost" 1.198 + label="&cmd.deleteDomainData.label;" 1.199 + accesskey="&cmd.deleteDomainData.accesskey;" 1.200 + closemenu="single" 1.201 + selection="link|host" 1.202 + selectiontype="single" 1.203 + hideifprivatebrowsing="true" 1.204 + forcehideselection="bookmark"/> 1.205 + <menuseparator id="placesContext_deleteSeparator"/> 1.206 + <menuitem id="placesContext_sortBy:name" 1.207 + command="placesCmd_sortBy:name" 1.208 + label="&cmd.sortby_name.label;" 1.209 + accesskey="&cmd.context_sortby_name.accesskey;" 1.210 + closemenu="single" 1.211 + selection="folder"/> 1.212 + <menuitem id="placesContext_reload" 1.213 + command="placesCmd_reload" 1.214 + label="&cmd.reloadLivebookmark.label;" 1.215 + accesskey="&cmd.reloadLivebookmark.accesskey;" 1.216 + closemenu="single" 1.217 + selection="livemark/feedURI"/> 1.218 + <menuseparator id="placesContext_sortSeparator"/> 1.219 + <menuitem id="placesContext_show:info" 1.220 + command="placesCmd_show:info" 1.221 + label="&cmd.properties.label;" 1.222 + accesskey="&cmd.properties.accesskey;" 1.223 + selection="bookmark|folder|query" 1.224 + forcehideselection="livemarkChild"/> 1.225 + </menupopup> 1.226 + 1.227 +</overlay>