How to highlight in red newsgroup folders that contains watc

User Help for Mozilla Thunderbird
Post Reply
metrocross
Posts: 2
Joined: August 17th, 2021, 1:13 am

How to highlight in red newsgroup folders that contains watc

Post by metrocross »

I was customizing thunderbird using the userChrome.css file; what I am not able to do is to highlight in red the newsgroups that contain messages that are followed (watched) but not yet read
I started from this (which highlights all newsgroups in red because it detects *all* unread messages)

Code: Select all

#folderTree > treechildren::-moz-tree-cell-text(folderNameCol, hasUnreadMessages-true) {
 color: Red !important;
}
I tried this too but it doesn't work

Code: Select all


#folderTree treechildren::-moz-tree-row(hasUnread,watch)
{
color:#F00 !important;
}

Thanks
morat
Posts: 6437
Joined: February 3rd, 2009, 6:29 pm

Re: How to highlight in red newsgroup folders that contains

Post by morat »

There is no "watch" or "hasWatchedThreads-true" folder property so you can't style that.

P.S.

Here is how to show the selected folder properties using the error console.

Thunderbird 78:

Code: Select all

(function () {
  var folder = gFolderDisplay.displayedFolder;
  var properties = getFolderProperties(folder, true /*open*/);
  if (folder.getFlag(Ci.nsMsgFolderFlags.Virtual)) {
    properties += " specialFolder-Smart";
    properties += " specialFolder-" + folder.name.replace(/\s+/g, "");
  }
  var smartFolderName = getSmartFolderName(folder);
  if (smartFolderName) {
    properties += " specialFolder-" + smartFolderName.replace(/\s+/g, "");
  }
  var customColor = gFolderTreeView.getFolderCacheProperty(folder, "folderIconColor");
  if (customColor) {
    properties += ` customColor-${customColor.replace("#", "")}`;
  }
  if (FeedMessageHandler.isFeedFolder(folder)) {
    properties += FeedUtils.getFolderProperties(folder, null);
  }
  console.log(properties.split(" ").join("\n"));
})();
Thunderbird 91:

Code: Select all

(function () {
  var folder = gFolderDisplay.displayedFolder;
  var properties = getFolderProperties(folder, true /*open*/);
  if (folder.getFlag(Ci.nsMsgFolderFlags.Virtual)) {
    properties += " specialFolder-Smart";
    properties += " specialFolder-" + folder.name.replace(/\s+/g, "");
  }
  var smartFolderName = getSmartFolderName(folder);
  if (smartFolderName) {
    properties += " specialFolder-" + smartFolderName.replace(/\s+/g, "");
  }
  var customColor = gFolderTreeView.getFolderCacheProperty(folder, "folderIconColor");
  if (customColor) {
    properties += ` customColor-${customColor.replace("#", "")}`;
  }
  if (FeedUtils.isFeedFolder(folder)) {
    properties += FeedUtils.getFolderProperties(folder, null);
  }
  console.log(properties.split(" ").join("\n"));
})();
Reference
http://searchfox.org/comm-esr78/search? ... Properties (see folderPane.js)
http://searchfox.org/comm-esr91/search? ... Properties (see folderPane.js)
Last edited by morat on October 14th, 2021, 2:25 am, edited 1 time in total.
metrocross
Posts: 2
Joined: August 17th, 2021, 1:13 am

Re: How to highlight in red newsgroup folders that contains

Post by metrocross »

Got it

Thanks
Post Reply