Skip to content

Commit

Permalink
change number of custom strings from 4 to 8
Browse files Browse the repository at this point in the history
  • Loading branch information
poohsen committed Nov 13, 2013
1 parent ab71388 commit 997bd9c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
6 changes: 4 additions & 2 deletions chrome/thunderlink/content/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ var ThunderLinkPrefNS = {
var tTextbox = window.document.createElementNS(XUL_NS, "textbox");
tTextbox.setAttribute("id", "prefCustomTlString" + cstrnum + "-title");
tTextbox.setAttribute("preference", "prefs_customTlString" + cstrnum + "title");
tTextbox.setAttribute("size", 51);
var tLabel = window.document.createElementNS(XUL_NS, "label");
tLabel.setAttribute("label", "Custom String title:");
tLabel.setAttribute("control", tTextbox.id);
Expand Down Expand Up @@ -101,7 +102,7 @@ var ThunderLinkPrefNS = {

function createCstrTab(cstrnum) {
var tab = window.document.createElementNS(XUL_NS, "tab");
tab.setAttribute("label", "Custom String " + cstrnum);
tab.setAttribute("label", "String " + cstrnum);
return tab;
}

Expand All @@ -116,7 +117,8 @@ var ThunderLinkPrefNS = {
var tabs = window.document.createElementNS(XUL_NS, "tabs");
var tabpanels = window.document.createElementNS(XUL_NS, "tabpanels");

for (let i = 1; i < 5; i++){
var nrOfCStrings = 8
for (let i = 1; i <= nrOfCStrings; i++){
tabs.appendChild(createCstrTab(i));
tabpanels.appendChild(createCstrTabPanel(i));
}
Expand Down
16 changes: 16 additions & 0 deletions chrome/thunderlink/content/preferences.xul
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,34 @@
<preference id="prefs_customTlString2" name="extensions.thunderlink.custom-tl-string-2" type="string"/>
<preference id="prefs_customTlString3" name="extensions.thunderlink.custom-tl-string-3" type="string"/>
<preference id="prefs_customTlString4" name="extensions.thunderlink.custom-tl-string-4" type="string"/>
<preference id="prefs_customTlString5" name="extensions.thunderlink.custom-tl-string-5" type="string"/>
<preference id="prefs_customTlString6" name="extensions.thunderlink.custom-tl-string-6" type="string"/>
<preference id="prefs_customTlString7" name="extensions.thunderlink.custom-tl-string-7" type="string"/>
<preference id="prefs_customTlString8" name="extensions.thunderlink.custom-tl-string-8" type="string"/>
<preference id="prefs_customTlString1title" name="extensions.thunderlink.custom-tl-string-1-title" type="string"/>
<preference id="prefs_customTlString2title" name="extensions.thunderlink.custom-tl-string-2-title" type="string"/>
<preference id="prefs_customTlString3title" name="extensions.thunderlink.custom-tl-string-3-title" type="string"/>
<preference id="prefs_customTlString4title" name="extensions.thunderlink.custom-tl-string-4-title" type="string"/>
<preference id="prefs_customTlString5title" name="extensions.thunderlink.custom-tl-string-5-title" type="string"/>
<preference id="prefs_customTlString6title" name="extensions.thunderlink.custom-tl-string-6-title" type="string"/>
<preference id="prefs_customTlString7title" name="extensions.thunderlink.custom-tl-string-7-title" type="string"/>
<preference id="prefs_customTlString8title" name="extensions.thunderlink.custom-tl-string-8-title" type="string"/>
<preference id="prefs_customTlString1tagcheckbox" name="extensions.thunderlink.custom-tl-string-1-tagcheckbox" type="bool"/>
<preference id="prefs_customTlString2tagcheckbox" name="extensions.thunderlink.custom-tl-string-2-tagcheckbox" type="bool"/>
<preference id="prefs_customTlString3tagcheckbox" name="extensions.thunderlink.custom-tl-string-3-tagcheckbox" type="bool"/>
<preference id="prefs_customTlString4tagcheckbox" name="extensions.thunderlink.custom-tl-string-4-tagcheckbox" type="bool"/>
<preference id="prefs_customTlString5tagcheckbox" name="extensions.thunderlink.custom-tl-string-5-tagcheckbox" type="bool"/>
<preference id="prefs_customTlString6tagcheckbox" name="extensions.thunderlink.custom-tl-string-6-tagcheckbox" type="bool"/>
<preference id="prefs_customTlString7tagcheckbox" name="extensions.thunderlink.custom-tl-string-7-tagcheckbox" type="bool"/>
<preference id="prefs_customTlString8tagcheckbox" name="extensions.thunderlink.custom-tl-string-8-tagcheckbox" type="bool"/>
<preference id="prefs_customTlString1tag" name="extensions.thunderlink.custom-tl-string-1-tag" type="int"/>
<preference id="prefs_customTlString2tag" name="extensions.thunderlink.custom-tl-string-2-tag" type="int"/>
<preference id="prefs_customTlString3tag" name="extensions.thunderlink.custom-tl-string-3-tag" type="int"/>
<preference id="prefs_customTlString4tag" name="extensions.thunderlink.custom-tl-string-4-tag" type="int"/>
<preference id="prefs_customTlString5tag" name="extensions.thunderlink.custom-tl-string-5-tag" type="int"/>
<preference id="prefs_customTlString6tag" name="extensions.thunderlink.custom-tl-string-6-tag" type="int"/>
<preference id="prefs_customTlString7tag" name="extensions.thunderlink.custom-tl-string-7-tag" type="int"/>
<preference id="prefs_customTlString8tag" name="extensions.thunderlink.custom-tl-string-8-tag" type="int"/>
<preference id="prefs_openTlBehaviour" name="extensions.thunderlink.open-tl-behaviour" type="string"/>
</preferences>
<vbox>
Expand Down
16 changes: 16 additions & 0 deletions defaults/preferences/thunderlink.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,20 @@ pref("extensions.thunderlink.custom-tl-string-4-title", "Custom String 4");
pref("extensions.thunderlink.custom-tl-string-4", "<thunderlink>");
pref("extensions.thunderlink.custom-tl-string-4-tagcheckbox", false);
pref("extensions.thunderlink.custom-tl-string-4-tag", 1);
pref("extensions.thunderlink.custom-tl-string-5-title", "Custom String 5");
pref("extensions.thunderlink.custom-tl-string-5", "<thunderlink>");
pref("extensions.thunderlink.custom-tl-string-5-tagcheckbox", false);
pref("extensions.thunderlink.custom-tl-string-5-tag", 1);
pref("extensions.thunderlink.custom-tl-string-6-title", "Custom String 6");
pref("extensions.thunderlink.custom-tl-string-6", "<thunderlink>");
pref("extensions.thunderlink.custom-tl-string-6-tagcheckbox", false);
pref("extensions.thunderlink.custom-tl-string-6-tag", 1);
pref("extensions.thunderlink.custom-tl-string-7-title", "Custom String 7");
pref("extensions.thunderlink.custom-tl-string-7", "<thunderlink>");
pref("extensions.thunderlink.custom-tl-string-7-tagcheckbox", false);
pref("extensions.thunderlink.custom-tl-string-7-tag", 1);
pref("extensions.thunderlink.custom-tl-string-8-title", "Custom String 8");
pref("extensions.thunderlink.custom-tl-string-8", "<thunderlink>");
pref("extensions.thunderlink.custom-tl-string-8-tagcheckbox", false);
pref("extensions.thunderlink.custom-tl-string-8-tag", 1);
pref("extensions.thunderlink.open-tl-behaviour", "bySelecting");

0 comments on commit 997bd9c

Please sign in to comment.