split snowl.xul up into a file for the list view and a file for the browser integration points, and localize both of them; also, localize collections

--HG--
rename : content/snowl.css => content/list.css
rename : content/snowl.js => content/list.js
rename : content/snowl.xul => content/list.xul
This commit is contained in:
Myk Melez 2008-08-04 16:58:54 -07:00
Родитель 0819503dcf
Коммит e873eb2c2f
9 изменённых файлов: 110 добавлений и 40 удалений

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

@ -1,5 +1,8 @@
content snowl content/
locale snowl en-US locale/en-US/
overlay chrome://browser/content/browser.xul chrome://snowl/content/snowl.xul
overlay chrome://browser/content/browser.xul chrome://snowl/content/browser.xul
overlay chrome://browser/content/browser.xul chrome://snowl/content/list.xul
overlay chrome://snowl/content/sidebar.xul chrome://snowl/content/collections.xul
resource snowl ./

66
content/browser.xul Normal file
Просмотреть файл

@ -0,0 +1,66 @@
<?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 ***** -->
<!DOCTYPE overlay SYSTEM "chrome://snowl/locale/browser.dtd">
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="snowlBrowserOverlay">
<menupopup id="menu_viewPopup">
<!-- Since these both get inserted after viewSidebarMenuMenu, they appear
- in the reverse of the order below. -->
<menuitem insertafter="viewSidebarMenuMenu"
label="&riverView.label;" accesskey="&riverView.accesskey;"
oncommand="gBrowser.selectedTab = gBrowser.addTab('chrome://snowl/content/river.xul')"/>
<menuitem observes="viewSnowlSidebar" insertafter="viewSidebarMenuMenu"
accesskey="&listView.accesskey;"/>
</menupopup>
<broadcasterset id="mainBroadcasterSet">
<broadcaster id="viewSnowlSidebar"
label="&listView.label;"
autoCheck="false"
type="checkbox"
group="sidebar"
sidebarurl="chrome://snowl/content/sidebar.xul"
sidebartitle="&sidebar.label;"
oncommand="toggleSidebar('viewSnowlSidebar')"/>
</broadcasterset>
</overlay>

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

@ -38,19 +38,17 @@
<?xml-stylesheet href="chrome://snowl/content/collections.css" type"text/css"?>
<!DOCTYPE overlay SYSTEM "chrome://snowl/locale/collections.dtd">
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="chrome://snowl/content/collections.js"/>
<vbox id="collectionsViewBox">
<menupopup id="sourcesContextMenu">
<menuitem label="Unsubscribe" oncommand="SourcesView.unsubscribe(event)"/>
</menupopup>
<tree id="sourcesView" flex="1" context="sourcesContextMenu" editable="true"
onselect="SourcesView.onSelect(event)">
<treecols>
<treecol id="nameCol" label="Name" primary="true" flex="1"/>
<treecol id="nameCol" label="&nameCol.label;" primary="true" flex="1"/>
</treecols>
<treechildren flex="1"/>
@ -59,16 +57,20 @@
<toolbar>
<toolbarbutton id="snowlSubscribeButton"
image="chrome://snowl/content/icons/add.png"
oncommand="SourcesView.subscribe()"/>
oncommand="SourcesView.subscribe()"
tooltiptext="&subscribeButton.tooltip;"/>
<toolbarbutton id="snowlUnsubscribeButton"
image="chrome://snowl/content/icons/delete.png"
oncommand="SourcesView.unsubscribe()"/>
oncommand="SourcesView.unsubscribe()"
tooltiptext="&unsubscribeButton.tooltip;"/>
<toolbarbutton id="snowlRefreshButton"
image="chrome://snowl/content/icons/arrow_refresh_small.png"
oncommand="SnowlService.refreshAllSources()"/>
oncommand="SnowlService.refreshAllSources()"
tooltiptext="&refreshButton.tooltip;"/>
<toolbarbutton id="snowlExportOPMLButton"
image="chrome://snowl/content/icons/opml-icon-16x16.png"
oncommand="SourcesView.exportOPML()"/>
oncommand="SourcesView.exportOPML()"
tooltiptext="&exportButton.tooltip;"/>
</toolbar>
</vbox>

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

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

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

@ -39,34 +39,14 @@
<!-- XXX Do we need references to the global and browser skins in an overlay? -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://snowl/content/snowl.css" type="text/css"?>
<?xml-stylesheet href="chrome://snowl/content/list.css" type="text/css"?>
<!DOCTYPE overlay SYSTEM "chrome://snowl/locale/list.dtd">
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="snowlOverlay">
<script type="application/x-javascript" src="snowl.js"/>
<menupopup id="menu_viewPopup">
<!-- Since these both get inserted after viewSidebarMenuMenu, they appear
- in the reverse of the order below. -->
<menuitem insertafter="viewSidebarMenuMenu"
label="Message River" accesskey="v"
oncommand="gBrowser.selectedTab = gBrowser.addTab('chrome://snowl/content/river.xul')"/>
<menuitem observes="viewSnowlSidebar" insertafter="viewSidebarMenuMenu"
accesskey="m"/>
</menupopup>
<broadcasterset id="mainBroadcasterSet">
<broadcaster id="viewSnowlSidebar"
label="Message List"
autoCheck="false"
type="checkbox"
group="sidebar"
sidebarurl="chrome://snowl/content/sidebar.xul"
sidebartitle="Snowl"
oncommand="toggleSidebar('viewSnowlSidebar')"/>
</broadcasterset>
<script type="application/x-javascript" src="list.js"/>
<vbox id="appcontent">
<vbox id="snowlViewContainer" insertbefore="content" placement="top"
@ -74,7 +54,7 @@
<toolbar id="snowlViewToolbar" pack="end" align="center">
<toolbarbutton id="snowlPlacementButton" class="snowlToolbarButton"
oncommand="SnowlMessageView.switchPlacement()"
tooltiptext="Switch placement."/>
tooltiptext="&placementButton.tooltip;"/>
<toolbarspring/>
@ -82,13 +62,13 @@
type="checkbox"
image="chrome://snowl/content/icons/newspaper.png"
oncommand="SnowlMessageView.onCommandCurrentButton(event)"
tooltiptext="Only show current messages."/>
tooltiptext="&currentButton.tooltip;"/>
<toolbarbutton id="snowlUnreadButton" class="snowlToolbarButton"
type="checkbox"
image="chrome://snowl/content/icons/new.png"
oncommand="SnowlMessageView.onCommandUnreadButton(event)"
tooltiptext="Only show unread messages."/>
tooltiptext="&unreadButton.tooltip;"/>
<textbox id="snowlFilter" type="timed" timeout="200"
oncommand="SnowlMessageView.onFilter()"/>
@ -100,17 +80,17 @@
onselect="SnowlMessageView.onSelect(event)"
onkeypress="SnowlMessageView.onKeyPress(event)">
<treecols>
<treecol id="snowlAuthorCol" label="Author" flex="1"
<treecol id="snowlAuthorCol" label="&authorCol.label;" flex="1"
persist="width ordinal hidden sortDirection"
class="sortDirectionIndicator"
onclick="SnowlMessageView.onClickColumnHeader(event)"/>
<splitter class="tree-splitter"/>
<treecol id="snowlSubjectCol" label="Subject" flex="5"
<treecol id="snowlSubjectCol" label="&subjectCol.label;" flex="5"
persist="width ordinal hidden sortDirection"
class="sortDirectionIndicator"
onclick="SnowlMessageView.onClickColumnHeader(event)"/>
<splitter class="tree-splitter"/>
<treecol id="snowlTimestampCol" label="Date" flex="1"
<treecol id="snowlTimestampCol" label="&timestampCol.label;" flex="1"
persist="width ordinal hidden sortDirection"
class="sortDirectionIndicator"
onclick="SnowlMessageView.onClickColumnHeader(event)"/>

6
locale/en-US/browser.dtd Normal file
Просмотреть файл

@ -0,0 +1,6 @@
<!ENTITY riverView.label "River of Messages">
<!ENTITY riverView.accesskey "v">
<!ENTITY listView.label "Message List">
<!ENTITY listView.accesskey "m">
<!ENTITY sidebar.label "Snowl">

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

@ -0,0 +1,6 @@
<!ENTITY nameCol.label "Name">
<!ENTITY subscribeButton.tooltip "Subscribe to message sources.">
<!ENTITY unsubscribeButton.tooltip "Unsubscribe from message sources.">
<!ENTITY refreshButton.tooltip "Refresh sources.">
<!ENTITY exportButton.tooltip "Export sources as OPML.">

7
locale/en-US/list.dtd Normal file
Просмотреть файл

@ -0,0 +1,7 @@
<!ENTITY placementButton.tooltip "Switch placement.">
<!ENTITY currentButton.tooltip "Only show current messages.">
<!ENTITY unreadButton.tooltip "Only show unread messages.">
<!ENTITY authorCol.label "Author">
<!ENTITY subjectCol.label "Subject">
<!ENTITY timestampCol.label "Date">