Open MonoS opened 1 month ago
Why don't you browse the code at: https://searchfox.org/comm-central/source
Because i didn't know it existed, i've downloaded the code and searched with np++ so I guess is kind of the same thing? maybe i've searched the latest commit instead of a specific version
Searchfox is much more convenient, it has cross references, history, logs, etc.
Oh, nice, i'll recheck everything with it and edit my post with new finding then, thanks.
From my research that should be all, i hope to not have missed something
It would be easier if you submitted a patch. Looks like you also need to add some strings for the UI. BTW, IDL files define interfaces, they are not auto-generated, but include files are generated from them.
It would be easier if you submitted a patch
I could do that, i just hope I won't struggle with the build system like all the time :)
Depending on your OS, the one-liner ./build.sh 128
might just work. README.md has a bit of information. Also, you don't necessarily need to build it. Just make the code changes you described and submit a patch.
Depending on your OS, the one-liner
./build.sh 128
might just work.
Well, what i'm most interested in is downloading the correct version, would this download the correct version i should diff to? BTW i'm on windows.
You should follow https://github.com/Betterbird/thunderbird-patches/blob/main/README.md for Windows.
At the end you can issue ./build.sh 128 apply
. That just makes the source code ready without compiling it.
If you don't want to build, you can just download the comm-central or comm-esr128 repository. That's much smaller than the Mozilla repository which you need to build.
As the title says, a new retention policy option to not delete unread message. I've already checked inside the codebase, downloaded here https://hg.mozilla.org/comm-central/archive/tip.zip , so here some pointers:
\mailnews\base\content\folderProps.xhtml and \mailnews\base\prefs\content\am-offline.xhtml Here a new checkbox should be added after the "retention.applyToFlagged" element's hbox
\mailnews\base\content\retention.js Here initCommonRetentionSettings and saveCommonRetentionSettings should be modified to get/set the new option
\mailnews\base\prefs\content\am-offline.js Here in onLockPreference the new option should be added, in onPreInit the option should be set to hidden like the "retention.applyToFlagged" option
\mailnews\db\msgdb\public\nsMsgDatabase.h Here a new boolean protected attribute should be add to structure nsMsgRetentionSettings
\mailnews\db\msgdb\public\nsIMsgDatabase.idl I don't know if this file is autogenerated, but if it's not the new attribute should be added at the end of interface nsIMsgRetentionSettings
\mailnews\base\src\nsMsgIncomingServer.cpp Here method nsMsgIncomingServer::SetRetentionSettings and nsMsgIncomingServer::GetRetentionSettings should be modified to use the new attribute
\mailnews\db\msgdb\src\nsMsgDatabase.cpp Here the constructor should be changed to set a default value to the new member attribute, also setter and getter should be created like the ones for m_applyToFlaggedMessages, then method nsMsgDatabase::SetMsgRetentionSettings and nsMsgDatabase::GetMsgRetentionSettings should be modified to use the new attribute. After that method signature of nsMsgDatabase::FindMessagesOlderThan and nsMsgDatabase::FindExcessMessages should be changed to include the new parameter after applyToFlaggedMessages, then, after the code that skip the message if is nsMsgMessageFlags::Marked, a new check should be implemented, like the one for Marked, to check flag nsMsgMessageFlags::Read. In the end method nsMsgDatabase::ApplyRetentionSettings should call the new getter and pass the new flag to the other two method.
From my research that should be all, i hope to not have missed something