Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label custom names not working #43

Open
Du-St opened this issue Dec 7, 2018 · 3 comments
Open

Label custom names not working #43

Du-St opened this issue Dec 7, 2018 · 3 comments

Comments

@Du-St
Copy link

Du-St commented Dec 7, 2018

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:

  1. 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?
  2. 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
@mike-kfed
Copy link
Owner

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.

@532910
Copy link

532910 commented Nov 21, 2019

  1. Thunderbird allows any number of label, not exactly five.
  2. I have custom labels: not $Label1, but $1:todo, $2:reply_awaiting that I set manually via user.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.

@mike-kfed
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants