| 1320 | } |
| 1321 | |
| 1322 | void CKnownFile::SetFileCommentRating(const wxString& strNewComment, int8 iNewRating) |
| 1323 | { |
| 1324 | if (m_strComment != strNewComment || m_iRating != iNewRating) { |
| 1325 | SetLastPublishTimeKadNotes(0); |
| 1326 | wxString strCfgPath = "/" + m_abyFileHash.Encode() + "/"; |
| 1327 | |
| 1328 | wxConfigBase* cfg = wxConfigBase::Get(); |
| 1329 | if (strNewComment.IsEmpty() && iNewRating == 0) { |
| 1330 | cfg->DeleteGroup(strCfgPath); |
| 1331 | } else { |
| 1332 | cfg->Write( strCfgPath + "Comment", strNewComment); |
| 1333 | cfg->Write( strCfgPath + "Rate", (int)iNewRating); |
| 1334 | } |
| 1335 | |
| 1336 | m_strComment = strNewComment; |
| 1337 | m_iRating = iNewRating; |
| 1338 | |
| 1339 | SourceSet::iterator it = m_ClientUploadList.begin(); |
| 1340 | for ( ; it != m_ClientUploadList.end(); ++it ) { |
| 1341 | it->SetCommentDirty(); |
| 1342 | } |
| 1343 | // EC exports both comment and rating. |
| 1344 | MarkECChanged(); |
| 1345 | } |
| 1346 | } |
| 1347 | |
| 1348 | |
| 1349 | void CKnownFile::SetUpPriority(uint8 iNewUpPriority, bool m_bsave){ |
no test coverage detected