-
Notifications
You must be signed in to change notification settings - Fork 8
How to add a new bundled "Custom Column" (v5.0)
FOR ADDON VERSION 5.0+
From version 5.0 new columns will be added directly from the addons settings panel.
This page shows how to add a bundled custom column, that is a custom column that is shipped with the extension and cannot be deleted or modified.
The word COLNAME
is a placeholder for the new custom column internal name.
To add a new custom column these files must be modified:
-
prefs.js
to add the new default setting. -
mzcw-customcolumns.js
to add the new handler functions.
Under the en-US
locale folder:
-
overlay.properties
to add the needed text strings. -
settings.dtd
to add the needed text strings.
Add a line like this one:
pref("extensions.ColumnsWizard.CustCols.def.COLNAME", "");
Add to the miczColumnsWizard_CustCols
object the method checkDefaultCustomColumnPrefs
must be modified.
Add a new case
under switch(miczColumnsWizard_CustCols.CustColDefaultIndex[singlecolidx]){
, like the following one.
case 'COLNAME':
dcurrcol.enabled = false;
dcurrcol.def = "";
dcurrcol.dbHeader = "DBHEADER"; //The new dbHeader to show
dcurrcol.isCustom=false;
break;
Finally, add COLNAME
also to the miczColumnsWizard_CustCols.CustColDefaultIndex
array.
Append those lines at the end of the file
ColumnsWizardAddCOLNAME.label=<Write here the column header display name>
ColumnsWizardAddCOLNAMEDesc.label=<Write here the column header tooltip>
Append this line at the end of the file
<!ENTITY ColumnsWizard.AddCOLNAME.label "<Column name>">
Thunderbird source browser: http://lxr.mozilla.org/comm-central/
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIMsgDBHdr