Skip to content

Commit

Permalink
GH #99 chrome.manifest update for skin to use resources
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevatkm committed Oct 1, 2020
1 parent 71114f5 commit 7bd26c7
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 44 deletions.
4 changes: 2 additions & 2 deletions chrome.manifest
Expand Up @@ -8,9 +8,9 @@
#

content replywithheader chrome/content/
resource replywithheader chrome/resource/
#resource replywithheader chrome/resource/

skin replywithheader default/1.0 skin/
resource replywithheader default/1.0 skin/

# messengercompose.xul [MailCompose Window]
overlay chrome://messenger/content/messengercompose/messengercompose.xul chrome://replywithheader/content/messengerComposeOverlay.xul
20 changes: 10 additions & 10 deletions chrome/content/core.js
Expand Up @@ -13,8 +13,8 @@ var EXPORTED_SYMBOLS = ['ReplyWithHeader'];

var { XPCOMUtils } = ChromeUtils.import('resource://gre/modules/XPCOMUtils.jsm');
var { AddonManager } = ChromeUtils.import('resource://gre/modules/AddonManager.jsm');
var { rwhlog } = ChromeUtils.import('resource://replywithheader/log.jsm');
var { rwhhost } = ChromeUtils.import('resource://replywithheader/host.jsm');
var { rwhlog } = ChromeUtils.import('chrome://replywithheader/content/log.jsm');
var { rwhhost } = ChromeUtils.import('chrome://replywithheader/content/host.jsm');

// ReplyWithHeader Add-On ID
const ReplyWithHeaderAddOnID = 'replywithheader@myjeeva.com';
Expand Down Expand Up @@ -357,7 +357,7 @@ var ReplyWithHeader = {

// for HTML emails
if (this.isHtmlMail) {
let fontFace = this.Prefs.headerFontFace;
let fontFace = this.Prefs.headerFontFace;
let fontSize = this.Prefs.headerFontSize;
let fontSizeUnit = this.Prefs.headerFontSizeUnit;
let fontColor = this.Prefs.headerFontColor;
Expand Down Expand Up @@ -850,7 +850,7 @@ var ReplyWithHeader = {
try {
ReplyWithHeader.handleMailCompose();
} catch(ex) {
rwhlog.errorWithException('An error occurred, please report an issue to add-on author here '
rwhlog.errorWithException('An error occurred, please report an issue to add-on author here '
+ '- https://github.com/jeevatkm/ReplyWithHeaderMozilla/issues', ex);
}
},
Expand All @@ -861,17 +861,17 @@ var ReplyWithHeader = {
handleMailCompose: function() {
let prefs = this.Prefs;
rwhlog.enableDebug = prefs.isDebugEnabled;
rwhlog.debug('Initializing ' + ReplyWithHeader.addOnName + ' v' + ReplyWithHeader.addOnVersion
+ ' (' + rwhhost.app + ' ' + rwhhost.version

rwhlog.debug('Initializing ' + ReplyWithHeader.addOnName + ' v' + ReplyWithHeader.addOnVersion
+ ' (' + rwhhost.app + ' ' + rwhhost.version
+ ', ' + rwhhost.OS + ', ' + rwhhost.buildID + ')');

/*
* ReplyWithHeader has to be enabled; extensions.replywithheader.enable=true and
* ReplyWithHeader.isOkayToMoveOn must return true
* Add-On comes into play :)
*/

if (prefs.isEnabled && this.isOkayToMoveOn) {
this.hdrCnt = 4; // From, To, Subject, Date

Expand Down Expand Up @@ -918,7 +918,7 @@ var ReplyWithHeader = {
showAlert: function(str) {
if (str) {
try {
this.alerts.showAlertNotification('chrome://replywithheader/skin/icon-64.png',
this.alerts.showAlertNotification('resource://replywithheader/icon-64.png',
'ReplyWithHeader', str, false, '', null, '');
} catch (ex) {
rwhlog.errorWithException('Unable to show RWH notify alert.', ex);
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions chrome/content/prefs.js
Expand Up @@ -12,8 +12,8 @@
/* globals ReplyWithHeader */
var { XPCOMUtils } = ChromeUtils.import('resource://gre/modules/XPCOMUtils.jsm');
var { Services } = ChromeUtils.import('resource://gre/modules/Services.jsm');
var { rwhlog } = ChromeUtils.import('resource://replywithheader/log.jsm');
var { rwhhost } = ChromeUtils.import('resource://replywithheader/host.jsm');
var { rwhlog } = ChromeUtils.import('chrome://replywithheader/content/log.jsm');
var { rwhhost } = ChromeUtils.import('chrome://replywithheader/content/host.jsm');

ReplyWithHeader.Prefs = {
prefService: Services.prefs,
Expand Down
58 changes: 29 additions & 29 deletions chrome/content/rwh-prefs.xul
Expand Up @@ -25,20 +25,20 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="RWH Preferences" style="width:525px"
onload="ReplyWithHeader.Prefs.init();">

<script src="chrome://global/content/globalOverlay.js"/>
<script src="chrome://global/content/editMenuOverlay.js"/>
<script type="application/javascript" src="chrome://replywithheader/content/i18n.js"/>
<script type="application/javascript" src="chrome://replywithheader/content/core.js"/>
<script type="application/javascript" src="chrome://replywithheader/content/prefs.js"/>
<script type="application/javascript" src="chrome://replywithheader/content/prefs.js"/>

<prefpane id="rwhPane" orient="vertical">
<hbox align="center">
<checkbox id="enableRwh" label="Enable"
<checkbox id="enableRwh" label="Enable"
preference="extensions.replywithheader.enable"
oncommand="ReplyWithHeader.Prefs.toggleRwh();" />
<spacer flex="1" />
<image src='chrome://replywithheader/skin/language.png' width='21' height='21' style="margin-right:3px;margin-top:3px;" />
<image src='resource://replywithheader/language.png' width='21' height='21' style="margin-right:3px;margin-top:3px;" />
<menulist id="hdrLocale" style="margin-right:4px;"
preference="extensions.replywithheader.header.locale" >
<menupopup id="hdrLocalePopup">
Expand All @@ -58,7 +58,7 @@
<label id="lblFromAttribution" value="Header 'From' attribution style" />
</hbox>
<hbox align="center">
<radiogroup id="fromAttributionStyle"
<radiogroup id="fromAttributionStyle"
preference="extensions.replywithheader.header.from.style">
<radio value="0" label="Default" />
<radio value="1" label="Outlook Simple (From: Name)" />
Expand All @@ -69,7 +69,7 @@
<label id="lblHeaderToCcAttrib" value="Header 'To' &amp; 'Cc' attribution style" style="margin-top:2px" />
</hbox>
<hbox align="center">
<radiogroup id="toccAttributionStyle"
<radiogroup id="toccAttributionStyle"
preference="extensions.replywithheader.header.tocc.style">
<radio value="0" label="Default (To: Name1 &lt;email-address1&gt;, ...)" />
<radio value="1" label="Outlook (To: Name1; Name2; ...)" />
Expand All @@ -79,7 +79,7 @@
<label id="lblHeaderQuotSeq" value="Header quoting sequence and labels" style="margin-top:2px" />
</hbox>
<hbox align="center">
<radiogroup id="quotSeqAttributionStyle"
<radiogroup id="quotSeqAttributionStyle"
preference="extensions.replywithheader.header.lblseq.style">
<radio value="0" label="Default (Subject, Date, From, To, Cc)" />
<radio value="1" label="Outlook (From, Sent, To, Cc, Subject)" />
Expand All @@ -91,39 +91,39 @@
<label id="lblHdrDate" value="Header date format" style="margin-top:2px" />
</hbox>
<hbox align="center">
<radiogroup id="quotDateAttributionStyle"
<radiogroup id="quotDateAttributionStyle"
preference="extensions.replywithheader.header.date.format"
class="horizontal">
<radio value="0" label="Locale timezone" />
<radio value="1" label="International timezone (UTC)" />
</radiogroup>
</hbox>
<hbox align="center" style="margin-top:-2px">
<radiogroup id="quotTimeAttributionStyle"
<radiogroup id="quotTimeAttributionStyle"
preference="extensions.replywithheader.header.time.format"
class="horizontal">
<radio value="0" label="12 hours format" />
<radio value="1" label="24 hours format" />
</radiogroup>
</hbox>
<hbox align="center" style="margin-left:20px;">
<checkbox id="quotDateIncludeTimezone" label="Include short timezone info"
preference="extensions.replywithheader.header.date.timezone"
<checkbox id="quotDateIncludeTimezone" label="Include short timezone info"
preference="extensions.replywithheader.header.date.timezone"
style="font-size: 12px; margin-top:-3px;" />
</hbox>
<hbox align="center">
<label id="lblTypography" value="Header typography" style="margin-top:2px" />
</hbox>
<hbox align="center" style="margin-left:30px">
<label id="lblFontface" value="Font face:" />
<menulist id="hdrFontface" style="width:275px"
<menulist id="hdrFontface" style="width:275px"
preference="extensions.replywithheader.header.font.face" />
</hbox>
<hbox align="center" style="margin-left:30px">
<label id="lblFontsize" value="Font size:" />
<menulist id="hdrFontsize" style="width:60px;margin-left:.35em;"
<menulist id="hdrFontsize" style="width:60px;margin-left:.35em;"
preference="extensions.replywithheader.header.font.size" />
<menulist id="hdrFontsizeUnit" style="width:80px;"
<menulist id="hdrFontsizeUnit" style="width:80px;"
preference="extensions.replywithheader.header.font.size.unit">
<menupopup>
<menuitem label="Pixel" value="px" />
Expand All @@ -141,7 +141,7 @@
<hbox align="center" style="margin-left:30px">
<label id="lblBeforeHeader" value="Before header:" />
<spacer width="16px" />
<menulist id="spaceBeforeHdr" style="width:65px"
<menulist id="spaceBeforeHdr" style="width:65px"
preference="extensions.replywithheader.header.space.before">
<menupopup>
<menuitem label="0" value="0" />
Expand All @@ -154,7 +154,7 @@
</menulist>
<spacer width="20px" />
<label id="lblAfterHeader" value="After header:" />
<menulist id="spaceAfterHdr" style="width:65px"
<menulist id="spaceAfterHdr" style="width:65px"
preference="extensions.replywithheader.header.space.after">
<menupopup>
<menuitem label="0" value="0" />
Expand All @@ -168,7 +168,7 @@
</hbox>
<hbox align="center" style="margin-left:30px">
<label id="lblBeforeSeparator" value="Before separator:" />
<menulist id="spaceBeforeSep" style="width:65px;margin-left:.25em;"
<menulist id="spaceBeforeSep" style="width:65px;margin-left:.25em;"
preference="extensions.replywithheader.header.separator.space.before">
<menupopup>
<menuitem label="0" value="0" />
Expand All @@ -183,7 +183,7 @@
</hbox>
<hbox align="center" style="margin-left:30px">
<label id="lblSepLineSize" value="Line size:" />
<menulist id="hdrSepLineSize" style="width:65px;margin-left:3.9em;"
<menulist id="hdrSepLineSize" style="width:65px;margin-left:3.9em;"
preference="extensions.replywithheader.header.separator.line.size">
<menupopup>
<menuitem label="1px" value="1" />
Expand All @@ -205,41 +205,41 @@
<label id="lblCntFormat" value="Content formatting and cleanups" />
</hbox>
<hbox align="center" style="margin-left:15px">
<checkbox id="cleanBlockQuote" label="Cleanup the blockquote colors"
<checkbox id="cleanBlockQuote" label="Cleanup the blockquote colors"
preference="extensions.replywithheader.clean.blockquote"
oncommand="ReplyWithHeader.Prefs.toggleBlockQuote();" />
</hbox>
<hbox align="center" style="margin-left:35px">
<checkbox id="cleanNewBlockQuote" label="Cleanup only new blockquote color"
<checkbox id="cleanNewBlockQuote" label="Cleanup only new blockquote color"
preference="extensions.replywithheader.clean.new.blockquote" />
</hbox>
<hbox align="center" style="margin-left:15px">
<checkbox id="cleanGreaterThanChar" label="Cleanup the quote character '>'"
<checkbox id="cleanGreaterThanChar" label="Cleanup the quote character '>'"
preference="extensions.replywithheader.clean.char.greaterthan"
oncommand="ReplyWithHeader.Prefs.toggleQuoteChar();" />
</hbox>
<hbox align="center" style="margin-left:35px">
<checkbox id="cleanOnlyNewQuoteChar" label="Cleanup only new quote character"
<checkbox id="cleanOnlyNewQuoteChar" label="Cleanup only new quote character"
preference="extensions.replywithheader.clean.only.new.quote.char" />
</hbox>
<hbox align="center" style="margin-top:5px">
<label id="lblHeaderFormat" value="Subject reformatting" />
</hbox>
<hbox align="center" style="margin-left:15px">
<checkbox id="transSubjectPrefix" label="Transform subject prefix (Re -> RE and Fwd -> FW)"
<checkbox id="transSubjectPrefix" label="Transform subject prefix (Re -> RE and Fwd -> FW)"
preference="extensions.replywithheader.trans.subject.prefix" />
</hbox>
<hbox align="center" style="margin-top:5px">
<label id="lblHeaderCleanups" value="Header cleanups" />
</hbox>
<hbox align="center" style="margin-left:15px">
<checkbox id="excludePlainTextHdrPrefix" label="Don't include plain text header prefix"
<checkbox id="excludePlainTextHdrPrefix" label="Don't include plain text header prefix"
preference="extensions.replywithheader.clean.pln.hdr.prefix" />
</hbox>
</tabpanel>
<tabpanel orient="vertical">
<vbox align="center" style="margin-top: 30px">
<image id="abtRwhLogo" src='chrome://replywithheader/skin/icon-64.png' width='64' height='64' />
<image id="abtRwhLogo" src='resource://replywithheader/icon-64.png' width='64' height='64' />
<label id="abtRwhCaption" value="ReplyWithHeader" style="font-weight:bold;" />
<label id="abtRwhCopyrights" value="&#169; Jeevanandam M." style="font-size:12px;" />
<label id="abtRwhCopyrightsNotes" value="All rights reserved." style="font-size:12px;" />
Expand All @@ -250,9 +250,9 @@
<button label="Write a Review" oncommand="ReplyWithHeader.Prefs.openReviews();" />
<button label="Report Issues" oncommand="ReplyWithHeader.Prefs.reportIssues();" />
</hbox>
</vbox>
</vbox>
<vbox id="hboxEnableRwhDebugMode" align="center" style="margin: 15px 0">
<checkbox id="enableRwhDebugMode" label="Enable debug mode"
<checkbox id="enableRwhDebugMode" label="Enable debug mode"
preference="extensions.replywithheader.debug"
tooltiptext="Add-on logs useful debug details in the Error Console" />
</vbox>
Expand All @@ -261,14 +261,14 @@
</vbox>
<vbox align="center" style="margin-top:10px;">
<hbox id="hboxDonateBtn" align="center" style="margin-bottom:10px;margin-top:5px">
<image src='chrome://replywithheader/skin/bitcoin-24.png' width='24' height='24'
<image src='resource://replywithheader/bitcoin-24.png' width='24' height='24'
onclick="ReplyWithHeader.Prefs.copyBtcAddress();"
tooltiptext="Click here to copy BTC address."
style="cursor: pointer" />
<label value="1FG6G5tCmFm7vrc7BzUyRxr3RBrMDJA6zp" style="font-size:11px;cursor:pointer"
onclick="ReplyWithHeader.Prefs.copyBtcAddress();"
tooltiptext="Click here to copy BTC address." />
<image src='chrome://replywithheader/skin/paypal-btn.png' width='142' height='27'
<image src='resource://replywithheader/paypal-btn.png' width='142' height='27'
onclick="ReplyWithHeader.Prefs.openPaypal();"
style="cursor: pointer;margin-left:15px"
tooltiptext="Click here to Donate via Paypal." />
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "ReplyWithHeader",
"description": "Outlook style headers and few goodies for Thunderbird",
"version": "2.2.1",
"version": "2.3.0-beta",
"author": "Jeevanandam M.",
"homepage_url": "https://myjeeva.com/replywithheader-mozilla",
"applications": {
Expand Down

0 comments on commit 7bd26c7

Please sign in to comment.