Skip to content

Commit 2c6e460

Browse files
committed
Compatibility with Thunderbird 68
1 parent 7ed49e9 commit 2c6e460

7 files changed

+80
-138
lines changed

Makefile

+3-16
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
1-
SED = $(shell which gsed >/dev/null 2>&1 && echo gsed || echo sed)
21
EXCLUDES = $(addprefix --exclude , $(shell find . -iname '.*.sw*'))
32

4-
all: debug_template dist
5-
6-
release: release_template dist
3+
all: dist
74

5+
.PHONY: dist
86
dist:
97
rm -f tblatex.xpi
10-
zip tblatex.xpi $(EXCLUDES) --exclude Makefile --exclude TODO --exclude icon.xcf --exclude install.rdf.template --exclude tblatex.xpi -r *
11-
12-
upload:
13-
echo "cd jonathan/files\nput tblatex.xpi\nput TODO TODO_tblatex\nput Changelog Changelog_tblatex" | ftp [email protected]
14-
15-
debug_template:
16-
cp -f install.rdf.template install.rdf
17-
$(SED) -i s/__REPLACEME__/\.$(shell date +%y%m%d)pre/ install.rdf
18-
19-
release_template:
20-
cp -f install.rdf.template install.rdf
21-
$(SED) -i s/__REPLACEME__// install.rdf
8+
zip tblatex.xpi $(EXCLUDES) --exclude Makefile --exclude TODO --exclude icon.xcf --exclude tblatex.xpi -r *

content/insert.xul

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<dialog id="tblatex-dialog-insert"
55
title="Insert a LaTeX expression"
66
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
7+
xmlns:html="http://www.w3.org/1999/xhtml"
78
buttons="accept,cancel"
89
buttonlabelcancel="Cancel"
910
buttonlabelaccept="Ok"
@@ -15,7 +16,7 @@
1516
<groupbox>
1617
<description>Edit the default document below and the visible parts will be
1718
inserted in your email</description>
18-
<textbox id="tblatex-expr" multiline="true" rows="24" />
19+
<html:textarea id="tblatex-expr" multiline="true" rows="24" />
1920
<hbox>
2021
<button label="Load default template" oncommand="on_reset();" />
2122
<spacer flex="1" />

content/options.xul

+51-61
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,68 @@
11
<?xml version="1.0"?>
22
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
33
<?xml-stylesheet href="chrome://messenger/skin/preferences/preferences.css" type="text/css"?>
4-
<prefwindow id="tblatex-prefs"
5-
title="TBLaTeX options"
6-
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
4+
<!DOCTYPE dialog>
5+
<dialog id="tblatex-prefs"
6+
title="TBLaTeX options"
7+
buttons="accept"
8+
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
9+
xmlns:html="http://www.w3.org/1999/xhtml"
10+
>
711
<script type="application/javascript" src="chrome://tblatex/content/options.js" />
812

9-
<prefpane id="tblatex-paths" label="Files and Paths" image="chrome://messenger/skin/preferences/general.png">
10-
<preferences>
11-
<preference id="latex_path" name="tblatex.latex_path" type="string" />
12-
<preference id="dvips_path" name="tblatex.dvips_path" type="string" />
13-
<preference id="convert_path" name="tblatex.convert_path" type="string" />
14-
<preference id="dpi" name="tblatex.dpi" type="int" />
15-
<preference id="log" name="tblatex.log" type="bool" />
16-
<preference id="debug" name="tblatex.debug" type="bool" />
17-
</preferences>
18-
19-
<grid align="center">
20-
<columns>
21-
<column />
22-
<column />
23-
<column />
24-
</columns>
25-
<rows>
26-
<row>
27-
<label control="latex_textbox" value="Path to latex executable" />
28-
<textbox preference="latex_path" id="latex_textbox" />
29-
<button label="Browse..." oncommand="pick_file(document.getElementsByTagName('preference')[0], 'latex');" />
30-
</row>
31-
<row>
32-
<label control="dvips_textbox" value="Path to dvips executable" />
33-
<textbox preference="dvips_path" id="dvips_textbox" />
34-
<button label="Browse..." oncommand="pick_file(document.getElementsByTagName('preference')[1], 'dvips');" />
35-
</row>
36-
<row>
37-
<label control="convert_textbox" value="Path to convert executable" />
38-
<textbox preference="convert_path" id="convert_textbox" />
39-
<button label="Browse..." oncommand="pick_file(document.getElementsByTagName('preference')[2], 'convert');" />
40-
</row>
41-
<row>
42-
<label control="dpi_textbox" value="Resolution (dpi)" />
43-
<textbox preference="dpi" id="dpi_textbox" />
44-
<spacer />
45-
</row>
46-
<row>
47-
<label control="log_checkbox" value="Generate a log report" />
48-
<checkbox preference="log" id="log_checkbox" />
49-
<spacer />
50-
</row>
51-
<row>
52-
<label control="debug_checkbox" value="Generate debug info" />
53-
<checkbox preference="debug" id="debug_checkbox" />
54-
<spacer />
55-
</row>
56-
</rows>
57-
</grid>
13+
<vbox>
14+
<hbox>
15+
<label control="latex_textbox" value="Path to latex executable" />
16+
<textbox preference="tblatex.latex_path" id="latex_textbox" />
17+
<button label="Browse..." oncommand="pick_file(document.getElementsByTagName('preference')[0], 'latex');" />
18+
</hbox>
19+
<hbox>
20+
<label control="dvips_textbox" value="Path to dvips executable" />
21+
<textbox preference="tblatex.dvips_path" id="dvips_textbox" />
22+
<button label="Browse..." oncommand="pick_file(document.getElementsByTagName('preference')[1], 'dvips');" />
23+
</hbox>
24+
<hbox>
25+
<label control="convert_textbox" value="Path to convert executable" />
26+
<textbox preference="tblatex.convert_path" id="convert_textbox" />
27+
<button label="Browse..." oncommand="pick_file(document.getElementsByTagName('preference')[2], 'convert');" />
28+
</hbox>
29+
<hbox>
30+
<label control="dpi_textbox" value="Resolution (dpi)" />
31+
<textbox preference="tblatex.dpi" id="dpi_textbox" />
32+
<spacer />
33+
</hbox>
34+
<hbox>
35+
<label control="log_checkbox" value="Generate a log report" />
36+
<checkbox preference="tblatex.log" id="log_checkbox" />
37+
<spacer />
38+
</hbox>
39+
<hbox>
40+
<label control="debug_checkbox" value="Generate debug info" />
41+
<checkbox preference="tblatex.debug" id="debug_checkbox" />
42+
<spacer />
43+
</hbox>
5844
<label style="text-decoration: underline; color: navy; margin-top: 2em;
5945
cursor: pointer" value="Open the autodetection dialog"
6046
onclick="open_autodetect();" />
61-
</prefpane>
47+
</vbox>
6248

63-
<prefpane id="tblatex-template" label="LaTeX template to use" image="chrome://messenger/skin/preferences/advanced.png">
64-
<preferences>
65-
<preference id="latex_template" name="tblatex.template" type="string" />
66-
</preferences>
67-
49+
<vbox>
6850
<hbox>
6951
<label control="template_textbox" value="Template to use to generate LaTeX parts "/>
7052
<label style="text-decoration: underline; color: navy; cursor: pointer" value="Help ?"
7153
onclick="window.openDialog('chrome://tblatex/content/help.html', '',
7254
'all,chrome,dialog=no,status,toolbar,width=640,height=480');" />
7355
</hbox>
74-
<textbox preference="latex_template" id="template_textbox" multiline="true"
56+
<html:textarea preference="tblatex.template" id="template_textbox" multiline="true"
7557
rows="12" />
76-
</prefpane>
58+
</vbox>
59+
60+
<script
61+
src="chrome://global/content/preferencesBindings.js"
62+
type="application/javascript"/>
63+
64+
<script
65+
src="chrome://tblatex/content/preferences.js"
66+
type="application/javascript"/>
7767

78-
</prefwindow>
68+
</dialog>

content/preferences.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Preferences.addAll([
2+
{ id: "tblatex.latex_path", type: "string" },
3+
{ id: "tblatex.dvips_path", type: "string" },
4+
{ id: "tblatex.convert_path", type: "string" },
5+
{ id: "tblatex.dpi", type: "int" },
6+
{ id: "tblatex.log", type: "bool" },
7+
{ id: "tblatex.debug", type: "bool" },
8+
{ id: "tblatex.template", type: "string" },
9+
]);

install.rdf

-30
This file was deleted.

install.rdf.template

-30
This file was deleted.

manifest.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"manifest_version": 2,
3+
"applications": {
4+
"gecko": {
5+
6+
"strict_min_version": "68.0a1"
7+
}
8+
},
9+
"author": "Jonathan Protzenko",
10+
"name": "LaTeX It!",
11+
"description": "Automatically change $\\LaTeX$ into images in your HTML mails.",
12+
"version": "0.6.8",
13+
"homepage_url": "https://github.com/protz/LatexIt/wiki",
14+
"legacy": true
15+
}

0 commit comments

Comments
 (0)