roundcube-thunderbird_labels
roundcube-thunderbird_labels copied to clipboard
Label custom names not working
Hi,
I am facing weird behavior when I am trying to set custom names of labels using RC Settings section and displaying them afterwards.
The input fields in the Settings section are empty by default. When I fill some values into and save them, the values are saved to a database, but input fields are empty again. And the label names presented in pop up menu or in the message detail are unchanged.
I created patch which fixes the problems (see attachment). May be I did not understand all ideas in the original code well.
Brief patch description:
- Line 98: condition for $c[3] causes always using default values, when is set. And it is always set, because during first run of the code, the $c is empty, so tb_label_custom_labels is saved to user profile (and causes setting of $c[3] for next run). May be I am missing something?
- Custom label names are saved to user profile having integer key (1 to 5), but default label names having string key (LABEL1 to LABEL5) which causes weird behavior when setting custom names and when displaying them (the string 'undefined' shows up instead of custom label name). thunderbird_labels-custom-label-names.zip
yeah the code has many places where label1-5 are hardcoded. The settings section is a first step to allow arbritrary labels, but it's far from implemented correctly. If you want to help implement that you are welcome, please use the rc1.4beta
branch as a starting point and with a merge request we can work together on it.
- Thunderbird allows any number of label, not exactly five.
- I have custom labels: not
$Label1
, but$1:todo
,$2:reply_awaiting
that I set manually viauser.js
:
user_pref("mailnews.tags.$1:todo.tag", "ToDo");
user_pref("mailnews.tags.$1:todo.color", "#FF6666");
So this plugin doesn't work for me at all.
renaming the default 5 labels is a feature now.
using any IMAP labels doesn't work, because upstream roundcube mangles their names see roundcube/roundcubemail#4986