Monitoring log to show notification and made icon change while transfering $4745

This commit is contained in:
Jerry (Xinyu Hou)
2015-06-01 15:59:59 -07:00
parent 5cbcd74028
commit d1ca021002
3 changed files with 24 additions and 8 deletions

View File

@@ -38,15 +38,18 @@ DropHelper::writeToDir(const String& destination, DragFileList& fileList, String
file.open(dropTarget.c_str(), std::ios::out | std::ios::binary);
if (!file.is_open()) {
LOG((CLOG_ERR "drop file failed: can not open %s", dropTarget.c_str()));
LOG((CLOG_NOTIFY "File Transmission Failed: Can not open %s", dropTarget.c_str()));
}
file.write(data.c_str(), data.size());
file.close();
LOG((CLOG_NOTIFY "File Transmission Complete: %s is saved to %s", fileList.at(0).getFilename(), destination.c_str()));
fileList.clear();
}
else {
LOG((CLOG_ERR "drop file failed: drop target is empty"));
LOG((CLOG_NOTIFY "File Transmission Failed: Drop target is empty"));
}
}