places.xul 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  1. <?xml version="1.0"?>
  2. <!-- This Source Code Form is subject to the terms of the Mozilla Public
  3. License, v. 2.0. If a copy of the MPL was not distributed with this
  4. file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
  5. <?xml-stylesheet href="chrome://browser/content/places/places.css"?>
  6. <?xml-stylesheet href="chrome://browser/content/places/organizer.css"?>
  7. <?xml-stylesheet href="chrome://global/skin/"?>
  8. <?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
  9. <?xml-stylesheet href="chrome://browser/skin/places/organizer.css"?>
  10. <?xul-overlay href="chrome://browser/content/places/editBookmarkOverlay.xul"?>
  11. <?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
  12. <?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
  13. <?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
  14. <!DOCTYPE window [
  15. <!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">
  16. %placesDTD;
  17. <!ENTITY % editMenuOverlayDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
  18. %editMenuOverlayDTD;
  19. <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
  20. %browserDTD;
  21. ]>
  22. <window id="places"
  23. title="&places.library.title;"
  24. windowtype="Places:Organizer"
  25. xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  26. xmlns:html="http://www.w3.org/1999/xhtml"
  27. onload="PlacesOrganizer.init();"
  28. onunload="PlacesOrganizer.destroy();"
  29. width="&places.library.width;" height="&places.library.height;"
  30. screenX="10" screenY="10"
  31. toggletoolbar="true"
  32. persist="width height screenX screenY sizemode">
  33. <script type="application/javascript"
  34. src="chrome://browser/content/places/places.js"/>
  35. <script type="application/javascript"
  36. src="chrome://browser/content/utilityOverlay.js"/>
  37. <script type="application/javascript"
  38. src="chrome://browser/content/places/editBookmarkOverlay.js"/>
  39. <stringbundleset id="placesStringSet">
  40. <stringbundle id="brandStrings" src="chrome://branding/locale/brand.properties"/>
  41. </stringbundleset>
  42. <commandset id="editMenuCommands"/>
  43. <commandset id="placesCommands"/>
  44. <keyset id="placesCommandKeys"/>
  45. <commandset id="organizerCommandSet">
  46. <command id="OrganizerCommand_find:all"
  47. oncommand="PlacesSearchBox.findAll();"/>
  48. <command id="OrganizerCommand_export"
  49. oncommand="PlacesOrganizer.exportBookmarks();"/>
  50. <command id="OrganizerCommand_import"
  51. oncommand="PlacesOrganizer.importFromFile();"/>
  52. <command id="OrganizerCommand_backup"
  53. oncommand="PlacesOrganizer.backupBookmarks();"/>
  54. <command id="OrganizerCommand_restoreFromFile"
  55. oncommand="PlacesOrganizer.onRestoreBookmarksFromFile();"/>
  56. <command id="OrganizerCommand_search:save"
  57. oncommand="PlacesOrganizer.saveSearch();"/>
  58. <command id="OrganizerCommand_search:moreCriteria"
  59. oncommand="PlacesQueryBuilder.addRow();"/>
  60. <command id="OrganizerCommand:Back"
  61. oncommand="PlacesOrganizer.back();"/>
  62. <command id="OrganizerCommand:Forward"
  63. oncommand="PlacesOrganizer.forward();"/>
  64. </commandset>
  65. <keyset id="placesOrganizerKeyset">
  66. <!-- Instantiation Keys -->
  67. <key id="placesKey_close" key="&cmd.close.key;" modifiers="accel"
  68. oncommand="close();"/>
  69. <!-- Command Keys -->
  70. <key id="placesKey_find:all"
  71. command="OrganizerCommand_find:all"
  72. key="&cmd.find.key;"
  73. modifiers="accel"/>
  74. <!-- Back/Forward Keys Support -->
  75. <key id="placesKey_goBackKb"
  76. keycode="VK_LEFT"
  77. command="OrganizerCommand:Back"
  78. modifiers="alt"/>
  79. <key id="placesKey_goForwardKb"
  80. keycode="VK_RIGHT"
  81. command="OrganizerCommand:Forward"
  82. modifiers="alt"/>
  83. #ifdef XP_UNIX
  84. <key id="placesKey_goBackKb2"
  85. key="&goBackCmd.commandKey;"
  86. command="OrganizerCommand:Back"
  87. modifiers="accel"/>
  88. <key id="placesKey_goForwardKb2"
  89. key="&goForwardCmd.commandKey;"
  90. command="OrganizerCommand:Forward"
  91. modifiers="accel"/>
  92. #endif
  93. </keyset>
  94. <keyset id="editMenuKeys">
  95. </keyset>
  96. <popupset id="placesPopupset">
  97. <menupopup id="placesContext"/>
  98. <menupopup id="placesColumnsContext"
  99. onpopupshowing="ViewMenu.fillWithColumns(event, null, null, 'checkbox', null);"
  100. oncommand="ViewMenu.showHideColumn(event.target); event.stopPropagation();"/>
  101. </popupset>
  102. <toolbox id="placesToolbox">
  103. <toolbar class="chromeclass-toolbar" id="placesToolbar" align="center">
  104. <toolbarbutton id="back-button"
  105. command="OrganizerCommand:Back"
  106. tooltiptext="&backButton.tooltip;"
  107. disabled="true"/>
  108. <toolbarbutton id="forward-button"
  109. command="OrganizerCommand:Forward"
  110. tooltiptext="&forwardButton.tooltip;"
  111. disabled="true"/>
  112. #ifdef MOZ_WIDGET_GTK
  113. <menubar id="placesMenu" _moz-menubarkeeplocal="true">
  114. #else
  115. <menubar id="placesMenu">
  116. #endif
  117. <menu accesskey="&organize.accesskey;" class="menu-iconic"
  118. id="organizeButton" label="&organize.label;"
  119. tooltiptext="&organize.tooltip;">
  120. <menupopup id="organizeButtonPopup">
  121. <menuitem id="newbookmark"
  122. command="placesCmd_new:bookmark"
  123. label="&cmd.new_bookmark.label;"
  124. accesskey="&cmd.new_bookmark.accesskey;"/>
  125. <menuitem id="newfolder"
  126. command="placesCmd_new:folder"
  127. label="&cmd.new_folder.label;"
  128. accesskey="&cmd.new_folder.accesskey;"/>
  129. <menuitem id="newseparator"
  130. command="placesCmd_new:separator"
  131. label="&cmd.new_separator.label;"
  132. accesskey="&cmd.new_separator.accesskey;"/>
  133. <menuseparator id="orgUndoSeparator"/>
  134. <menuitem id="orgUndo"
  135. command="cmd_undo"
  136. label="&undoCmd.label;"
  137. key="key_undo"
  138. accesskey="&undoCmd.accesskey;"/>
  139. <menuitem id="orgRedo"
  140. command="cmd_redo"
  141. label="&redoCmd.label;"
  142. key="key_redo"
  143. accesskey="&redoCmd.accesskey;"/>
  144. <menuseparator id="orgCutSeparator"/>
  145. <menuitem id="orgCut"
  146. command="cmd_cut"
  147. label="&cutCmd.label;"
  148. key="key_cut"
  149. accesskey="&cutCmd.accesskey;"
  150. selection="separator|link|folder|mixed"/>
  151. <menuitem id="orgCopy"
  152. command="cmd_copy"
  153. label="&copyCmd.label;"
  154. key="key_copy"
  155. accesskey="&copyCmd.accesskey;"
  156. selection="separator|link|folder|mixed"/>
  157. <menuitem id="orgPaste"
  158. command="cmd_paste"
  159. label="&pasteCmd.label;"
  160. key="key_paste"
  161. accesskey="&pasteCmd.accesskey;"
  162. selection="mutable"/>
  163. <menuitem id="orgDelete"
  164. command="cmd_delete"
  165. label="&deleteCmd.label;"
  166. key="key_delete"
  167. accesskey="&deleteCmd.accesskey;"/>
  168. <menuseparator id="selectAllSeparator"/>
  169. <menuitem id="orgSelectAll"
  170. command="cmd_selectAll"
  171. label="&selectAllCmd.label;"
  172. key="key_selectAll"
  173. accesskey="&selectAllCmd.accesskey;"/>
  174. <menuseparator id="orgMoveSeparator"/>
  175. <menuitem id="orgMoveBookmarks"
  176. command="placesCmd_moveBookmarks"
  177. label="&cmd.moveBookmarks.label;"
  178. accesskey="&cmd.moveBookmarks.accesskey;"/>
  179. <menuseparator id="orgCloseSeparator"/>
  180. <menuitem id="orgClose"
  181. key="placesKey_close"
  182. label="&file.close.label;"
  183. accesskey="&file.close.accesskey;"
  184. oncommand="close();"/>
  185. </menupopup>
  186. </menu>
  187. <menu accesskey="&views.accesskey;" class="menu-iconic"
  188. id="viewMenu" label="&views.label;"
  189. tooltiptext="&views.tooltip;">
  190. <menupopup id="viewMenuPopup">
  191. <menu id="viewColumns"
  192. label="&view.columns.label;" accesskey="&view.columns.accesskey;">
  193. <menupopup onpopupshowing="ViewMenu.fillWithColumns(event, null, null, 'checkbox', null);"
  194. oncommand="ViewMenu.showHideColumn(event.target); event.stopPropagation();"/>
  195. </menu>
  196. <menu id="viewSort" label="&view.sort.label;"
  197. accesskey="&view.sort.accesskey;">
  198. <menupopup onpopupshowing="ViewMenu.populateSortMenu(event);"
  199. oncommand="ViewMenu.setSortColumn(event.target.column, null);">
  200. <menuitem id="viewUnsorted" type="radio" name="columns"
  201. label="&view.unsorted.label;" accesskey="&view.unsorted.accesskey;"
  202. oncommand="ViewMenu.setSortColumn(null, null);"/>
  203. <menuseparator id="directionSeparator"/>
  204. <menuitem id="viewSortAscending" type="radio" name="direction"
  205. label="&view.sortAscending.label;" accesskey="&view.sortAscending.accesskey;"
  206. oncommand="ViewMenu.setSortColumn(null, 'ascending'); event.stopPropagation();"/>
  207. <menuitem id="viewSortDescending" type="radio" name="direction"
  208. label="&view.sortDescending.label;" accesskey="&view.sortDescending.accesskey;"
  209. oncommand="ViewMenu.setSortColumn(null, 'descending'); event.stopPropagation();"/>
  210. </menupopup>
  211. </menu>
  212. </menupopup>
  213. </menu>
  214. <menu accesskey="&maintenance.accesskey;" class="menu-iconic"
  215. id="maintenanceButton" label="&maintenance.label;"
  216. tooltiptext="&maintenance.tooltip;">
  217. <menupopup id="maintenanceButtonPopup">
  218. <menuitem id="backupBookmarks"
  219. command="OrganizerCommand_backup"
  220. label="&cmd.backup.label;"
  221. accesskey="&cmd.backup.accesskey;"/>
  222. <menu id="fileRestoreMenu" label="&cmd.restore2.label;"
  223. accesskey="&cmd.restore2.accesskey;">
  224. <menupopup id="fileRestorePopup" onpopupshowing="PlacesOrganizer.populateRestoreMenu();">
  225. <menuitem id="restoreFromFile"
  226. command="OrganizerCommand_restoreFromFile"
  227. label="&cmd.restoreFromFile.label;"
  228. accesskey="&cmd.restoreFromFile.accesskey;"/>
  229. </menupopup>
  230. </menu>
  231. <menuseparator/>
  232. <menuitem id="fileImport"
  233. command="OrganizerCommand_import"
  234. label="&importBookmarksFromHTML.label;"
  235. accesskey="&importBookmarksFromHTML.accesskey;"/>
  236. <menuitem id="fileExport"
  237. command="OrganizerCommand_export"
  238. label="&exportBookmarksToHTML.label;"
  239. accesskey="&exportBookmarksToHTML.accesskey;"/>
  240. </menupopup>
  241. </menu>
  242. </menubar>
  243. <spacer id="libraryToolbarSpacer" flex="1"/>
  244. <textbox id="searchFilter"
  245. clickSelectsAll="true"
  246. type="search"
  247. aria-controls="placeContent"
  248. oncommand="PlacesSearchBox.search(this.value);"
  249. collection="bookmarks">
  250. </textbox>
  251. </toolbar>
  252. </toolbox>
  253. <hbox flex="1" id="placesView">
  254. <tree id="placesList"
  255. class="plain placesTree"
  256. type="places"
  257. hidecolumnpicker="true" context="placesContext"
  258. onselect="PlacesOrganizer.onPlaceSelected(true);"
  259. onclick="PlacesOrganizer.onPlacesListClick(event);"
  260. onfocus="PlacesOrganizer.updateDetailsPane(event);"
  261. seltype="single"
  262. persist="width"
  263. width="200"
  264. minwidth="100"
  265. maxwidth="400">
  266. <treecols>
  267. <treecol anonid="title" flex="1" primary="true" hideheader="true"/>
  268. </treecols>
  269. <treechildren flex="1"/>
  270. </tree>
  271. <splitter collapse="none" persist="state"></splitter>
  272. <vbox id="contentView" flex="4">
  273. <toolbox id="searchModifiers" hidden="true">
  274. <toolbar id="organizerScopeBar" class="chromeclass-toolbar" align="center">
  275. <label id="scopeBarTitle" value="&search.in.label;"/>
  276. <toolbarbutton id="scopeBarAll" class="small-margin"
  277. type="radio" group="scopeBar"
  278. oncommand="PlacesQueryBuilder.onScopeSelected(this);"
  279. label="&search.scopeBookmarks.label;"
  280. accesskey="&search.scopeBookmarks.accesskey;"/>
  281. <toolbarbutton id="scopeBarHistory" class="small-margin"
  282. type="radio" group="scopeBar"
  283. oncommand="PlacesQueryBuilder.onScopeSelected(this);"
  284. label="&search.scopeHistory.label;"
  285. accesskey="&search.scopeHistory.accesskey;"/>
  286. <toolbarbutton id="scopeBarDownloads" class="small-margin"
  287. type="radio" group="scopeBar"
  288. oncommand="PlacesQueryBuilder.onScopeSelected(this);"
  289. label="&search.scopeDownloads.label;"
  290. accesskey="&search.scopeDownloads.accesskey;"/>
  291. <toolbarbutton id="scopeBarFolder" class="small-margin"
  292. type="radio" group="scopeBar"
  293. oncommand="PlacesQueryBuilder.onScopeSelected(this);"
  294. accesskey="&search.scopeFolder.accesskey;"
  295. emptytitle="&search.scopeFolder.label;" flex="1"/>
  296. <!-- The folder scope button should flex but not take up more room
  297. than its label needs. The only simple way to do that is to
  298. set a really big flex on the spacer, e.g., 2^31 - 1. -->
  299. <spacer flex="2147483647"/>
  300. <button id="saveSearch" class="small-margin"
  301. label="&saveSearch.label;" accesskey="&saveSearch.accesskey;"
  302. command="OrganizerCommand_search:save"/>
  303. </toolbar>
  304. </toolbox>
  305. <deck id="placesViewsDeck"
  306. selectedIndex="0"
  307. flex="1">
  308. <tree id="placeContent"
  309. class="plain placesTree"
  310. context="placesContext"
  311. hidecolumnpicker="true"
  312. flex="1"
  313. type="places"
  314. flatList="true"
  315. selectfirstnode="true"
  316. enableColumnDrag="true"
  317. onfocus="PlacesOrganizer.updateDetailsPane(event)"
  318. onselect="PlacesOrganizer.updateDetailsPane(event)"
  319. onkeypress="ContentTree.onKeyPress(event);"
  320. onopenflatcontainer="PlacesOrganizer.openFlatContainer(aContainer);">
  321. <treecols id="placeContentColumns" context="placesColumnsContext">
  322. <treecol label="&col.name.label;" id="placesContentTitle" anonid="title" flex="5" primary="true" ordinal="1"
  323. persist="width hidden ordinal sortActive sortDirection"/>
  324. <splitter class="tree-splitter"/>
  325. <treecol label="&col.tags.label;" id="placesContentTags" anonid="tags" flex="2"
  326. persist="width hidden ordinal sortActive sortDirection"/>
  327. <splitter class="tree-splitter"/>
  328. <treecol label="&col.url.label;" id="placesContentUrl" anonid="url" flex="5"
  329. persist="width hidden ordinal sortActive sortDirection"/>
  330. <splitter class="tree-splitter"/>
  331. <treecol label="&col.lastvisit.label;" id="placesContentDate" anonid="date" flex="1" hidden="true"
  332. persist="width hidden ordinal sortActive sortDirection"/>
  333. <splitter class="tree-splitter"/>
  334. <treecol label="&col.visitcount.label;" id="placesContentVisitCount" anonid="visitCount" flex="1" hidden="true"
  335. persist="width hidden ordinal sortActive sortDirection"/>
  336. <splitter class="tree-splitter"/>
  337. <treecol label="&col.keyword.label;" id="placesContentKeyword" anonid="keyword" flex="1" hidden="true"
  338. persist="width hidden ordinal sortActive sortDirection"/>
  339. <splitter class="tree-splitter"/>
  340. <treecol label="&col.description.label;" id="placesContentDescription" anonid="description" flex="1" hidden="true"
  341. persist="width hidden ordinal sortActive sortDirection"/>
  342. <splitter class="tree-splitter"/>
  343. <treecol label="&col.dateadded.label;" id="placesContentDateAdded" anonid="dateAdded" flex="1" hidden="true"
  344. persist="width hidden ordinal sortActive sortDirection"/>
  345. <splitter class="tree-splitter"/>
  346. <treecol label="&col.lastmodified.label;" id="placesContentLastModified" anonid="lastModified" flex="1" hidden="true"
  347. persist="width hidden ordinal sortActive sortDirection"/>
  348. <splitter class="tree-splitter"/>
  349. <treecol label="&col.parentfolder.label;" id="placesContentParentFolder" anonid="parentFolder" flex="1" hidden="true"
  350. persist="width hidden ordinal"/>
  351. <splitter class="tree-splitter"/>
  352. <treecol label="&col.parentfolderpath.label;" id="placesContentParentFolderPath" anonid="parentFolderPath" flex="1" hidden="true"
  353. persist="width hidden ordinal"/>
  354. </treecols>
  355. <treechildren flex="1" onclick="ContentTree.onClick(event);"/>
  356. </tree>
  357. </deck>
  358. <deck id="detailsDeck" style="height: 11em;">
  359. <vbox id="itemsCountBox" align="center">
  360. <spacer flex="3"/>
  361. <label id="itemsCountText"/>
  362. <spacer flex="1"/>
  363. <description id="selectItemDescription">
  364. &detailsPane.selectAnItemText.description;
  365. </description>
  366. <spacer flex="3"/>
  367. </vbox>
  368. <vbox id="infoBox" minimal="true">
  369. <vbox id="editBookmarkPanelContent" flex="1"/>
  370. <hbox id="infoBoxExpanderWrapper" align="center">
  371. <button type="image" id="infoBoxExpander"
  372. class="expander-down"
  373. oncommand="PlacesOrganizer.toggleAdditionalInfoFields();"
  374. observes="paneElementsBroadcaster"/>
  375. <label id="infoBoxExpanderLabel"
  376. lesslabel="&detailsPane.less.label;"
  377. lessaccesskey="&detailsPane.less.accesskey;"
  378. morelabel="&detailsPane.more.label;"
  379. moreaccesskey="&detailsPane.more.accesskey;"
  380. value="&detailsPane.more.label;"
  381. accesskey="&detailsPane.more.accesskey;"
  382. control="infoBoxExpander"/>
  383. </hbox>
  384. </vbox>
  385. </deck>
  386. </vbox>
  387. </hbox>
  388. </window>