* options UI: show folder exceptions as "not included"

* bump maxVersion for seamonkey to 2.6.*
This commit is contained in:
foudfou 2011-11-24 22:56:25 +01:00
parent e8556522b9
commit 27360545d3
3 changed files with 14 additions and 7 deletions

View File

@ -133,6 +133,10 @@ firetray.UIOptions = {
}
},
/**
* NOTE: folder exceptions for unread messages count are *stored* in
* preferences as excluded, but *shown* as "not included"
*/
populateExcludedFoldersList: function() {
let excludedFoldersList = document.getElementById('excluded_folders_list');
@ -143,7 +147,7 @@ firetray.UIOptions = {
let item = excludedFoldersList.appendItem(localizedFolderType, folderType);
item.setAttribute("observes", "broadcaster-notification-disabled");
LOG("folder: "+folderType);
if (FLDRS_UNINTERESTING[folderType] & prefExcludedFoldersFlags)
if (!(FLDRS_UNINTERESTING[folderType] & prefExcludedFoldersFlags))
excludedFoldersList.addItemToSelection(item); // doesn't trigger onselect
}
},
@ -153,9 +157,12 @@ firetray.UIOptions = {
LOG("LAST SELECTED: "+excludedFoldersList.currentItem.label);
let excludedFoldersFlags = null;
for(let i = 0; i < excludedFoldersList.selectedCount; i++) {
let folderType = excludedFoldersList.getSelectedItem(i).value;
excludedFoldersFlags |= FLDRS_UNINTERESTING[folderType];
for(let i = 0; i < excludedFoldersList.itemCount; i++) {
let folder = excludedFoldersList.getItemAtIndex(i);
if (folder.selected)
excludedFoldersFlags &= ~FLDRS_UNINTERESTING[folder.value];
else
excludedFoldersFlags |= FLDRS_UNINTERESTING[folder.value];
}
LOG("excluded folders flags: "+excludedFoldersFlags);

View File

@ -29,8 +29,8 @@
<!ENTITY choose "Choose">
<!ENTITY choose.accesskey "O">
<!ENTITY unread_count_folder_exceptions.label "Excluded special folders">
<!ENTITY unread_count_folder_exceptions.tooltip "Excluded special folders for unread message count">
<!ENTITY unread_count_folder_exceptions.label "Included special folders">
<!ENTITY unread_count_folder_exceptions.tooltip "Included special folders for unread message count">
<!ENTITY excluded_folders_list.tooltip "Use CTRL + left click to select/deselect folders for unread message count">
<!ENTITY unread_count_account_exceptions.label "Included accounts">
<!ENTITY unread_count_account_exceptions.tooltip "Included accounts for unread message count">

View File

@ -35,7 +35,7 @@
<Description>
<em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
<em:minVersion>2.1</em:minVersion>
<em:maxVersion>2.4.*</em:maxVersion>
<em:maxVersion>2.6.*</em:maxVersion>
</Description>
</em:targetApplication>