mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 22:21:09 -04:00
moved file hashing and download count to new notification system
This commit is contained in:
parent
10bee9f26b
commit
81c1eb227c
12 changed files with 163 additions and 24 deletions
|
@ -1091,6 +1091,28 @@ TransfersDialog::TransfersDialog(QWidget *parent)
|
|||
|
||||
|
||||
registerHelpButton(ui.helpButton,help_str,"TransfersDialog") ;
|
||||
|
||||
mEventHandlerId=0;
|
||||
rsEvents->registerEventsHandler(RsEventType::FILE_TRANSFER, [this](std::shared_ptr<const RsEvent> event) { handleEvent(event); }, mEventHandlerId );
|
||||
}
|
||||
|
||||
void TransfersDialog::handleEvent(std::shared_ptr<const RsEvent> event)
|
||||
{
|
||||
if(event->mType != RsEventType::FILE_TRANSFER)
|
||||
return;
|
||||
|
||||
const RsFileTransferEvent *fe = dynamic_cast<const RsFileTransferEvent*>(event.get());
|
||||
if(!fe)
|
||||
return;
|
||||
|
||||
switch (fe->mFileTransferEventCode)
|
||||
{
|
||||
case RsFileTransferEventCode::DOWNLOAD_COMPLETE:
|
||||
case RsFileTransferEventCode::COMPLETED_FILES_REMOVED:
|
||||
getUserNotify()->updateIcon();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
TransfersDialog::~TransfersDialog()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue