From 997bd9c0ae6afaf07a16412530a18cf319a21688 Mon Sep 17 00:00:00 2001 From: poohsen Date: Wed, 13 Nov 2013 23:37:01 +0100 Subject: [PATCH] change number of custom strings from 4 to 8 --- chrome/thunderlink/content/preferences.js | 6 ++++-- chrome/thunderlink/content/preferences.xul | 16 ++++++++++++++++ defaults/preferences/thunderlink.js | 16 ++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/chrome/thunderlink/content/preferences.js b/chrome/thunderlink/content/preferences.js index 0923719..44bc0d0 100644 --- a/chrome/thunderlink/content/preferences.js +++ b/chrome/thunderlink/content/preferences.js @@ -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); @@ -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; } @@ -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)); } diff --git a/chrome/thunderlink/content/preferences.xul b/chrome/thunderlink/content/preferences.xul index 182d1aa..4bea34b 100644 --- a/chrome/thunderlink/content/preferences.xul +++ b/chrome/thunderlink/content/preferences.xul @@ -8,18 +8,34 @@ + + + + + + + + + + + + + + + + diff --git a/defaults/preferences/thunderlink.js b/defaults/preferences/thunderlink.js index f14dfb1..b6c228b 100644 --- a/defaults/preferences/thunderlink.js +++ b/defaults/preferences/thunderlink.js @@ -14,4 +14,20 @@ pref("extensions.thunderlink.custom-tl-string-4-title", "Custom String 4"); pref("extensions.thunderlink.custom-tl-string-4", ""); 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", ""); +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", ""); +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", ""); +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", ""); +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");