MozillaZine


How to highlight in red newsgroup folders that contains watc

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

Post Posted August 17th, 2021, 6:27 am

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: 4851
Joined: February 3rd, 2009, 6:29 pm

Post Posted August 22nd, 2021, 5:45 pm

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?q=getFolderProperties (see folderPane.js)
http://searchfox.org/comm-esr91/search?q=getFolderProperties (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

Post Posted August 23rd, 2021, 11:14 am

Got it

Thanks

Return to Thunderbird Support


Who is online

Users browsing this forum: tanstaafl and 9 guests