mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-03-02 11:49:36 -05:00
fixed QUEUE menu to work on multiple languages
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5.0@2540 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
66c334e3fb
commit
db97b6acd9
@ -362,14 +362,14 @@ void TransfersDialog::downloadListCostumPopupMenu( QPoint point )
|
||||
|
||||
for (int i = 0; i < lst.count (); i++)
|
||||
{
|
||||
if ( lst[i].column() == 0 && info.downloadStatus == FT_STATE_PAUSED )
|
||||
if ( lst[i].column() == 0 && info.downloadStatus == FT_STATE_WAITING )
|
||||
all_downld = false ;
|
||||
if ( lst[i].column() == 0 && info.downloadStatus == FT_STATE_DOWNLOADING )
|
||||
all_paused = false ;
|
||||
|
||||
if ( lst[i].column() == 0)
|
||||
{
|
||||
if(lst[i].model ()->data (lst[i].model ()->index (lst[i].row (), STATUS )).toString() == "Queued")
|
||||
if(info.downloadStatus == FT_STATE_QUEUED)
|
||||
all_downloading = false ;
|
||||
else
|
||||
all_queued = false ;
|
||||
@ -384,6 +384,10 @@ void TransfersDialog::downloadListCostumPopupMenu( QPoint point )
|
||||
if(all_downloading)
|
||||
contextMnu.addMenu( chunkMenu);
|
||||
|
||||
if(!all_paused)
|
||||
contextMnu.addAction( pauseAct);
|
||||
if(!all_downld)
|
||||
contextMnu.addAction( resumeAct);
|
||||
|
||||
if(info.downloadStatus != FT_STATE_COMPLETE)
|
||||
contextMnu.addAction( cancelAct);
|
||||
@ -402,11 +406,6 @@ void TransfersDialog::downloadListCostumPopupMenu( QPoint point )
|
||||
contextMnu.addAction( openfolderAct);
|
||||
contextMnu.addAction( detailsfileAct);
|
||||
contextMnu.addSeparator();
|
||||
|
||||
if(info.downloadStatus == FT_STATE_PAUSED)
|
||||
contextMnu.addAction( resumeAct);
|
||||
else if(info.downloadStatus != FT_STATE_COMPLETE)
|
||||
contextMnu.addAction( pauseAct);
|
||||
}
|
||||
|
||||
contextMnu.addAction( clearcompletedAct);
|
||||
@ -671,7 +670,7 @@ void TransfersDialog::insertTransfers()
|
||||
QString fileName = QString::fromUtf8(info.fname.c_str());
|
||||
QString fileHash = QString::fromStdString(info.hash);
|
||||
qlonglong fileSize = info.size;
|
||||
double fileDlspeed = (info.downloadStatus==FT_STATE_PAUSED)?0.0:(info.tfRate * 1024.0);
|
||||
double fileDlspeed = info.tfRate * 1024.0;
|
||||
|
||||
/* get the sources (number of online peers) */
|
||||
int online = 0;
|
||||
@ -691,7 +690,6 @@ void TransfersDialog::insertTransfers()
|
||||
case FT_STATE_DOWNLOADING: status = tr("Downloading"); break;
|
||||
case FT_STATE_COMPLETE: status = tr("Complete"); break;
|
||||
case FT_STATE_QUEUED: status = tr("Queued"); break;
|
||||
case FT_STATE_PAUSED: status = tr("Paused"); break;
|
||||
default: status = tr("Unknown"); break;
|
||||
}
|
||||
|
||||
@ -753,8 +751,10 @@ void TransfersDialog::insertTransfers()
|
||||
default: status = tr(""); break;
|
||||
}
|
||||
double peerDlspeed = 0;
|
||||
if ((uint32_t)pit->status == FT_STATE_DOWNLOADING && info.downloadStatus != FT_STATE_PAUSED)
|
||||
if ((uint32_t)pit->status == FT_STATE_DOWNLOADING)
|
||||
{
|
||||
peerDlspeed = pit->tfRate * 1024.0;
|
||||
}
|
||||
|
||||
FileProgressInfo peerpinfo ;
|
||||
peerpinfo.cmap = fcinfo.compressed_peer_availability_maps[pit->peerId];
|
||||
@ -1125,7 +1125,6 @@ bool TransfersDialog::controlTransferFile(uint32_t flags)
|
||||
std::set<QStandardItem *>::iterator it;
|
||||
getIdOfSelectedItems(items);
|
||||
for (it = items.begin(); it != items.end(); it ++) {
|
||||
std::cerr << "changing file mode for hash " << (*it)->data(Qt::DisplayRole).toString().toStdString() << " to " << flags << std::endl;
|
||||
result &= rsFiles->FileControl((*it)->data(Qt::DisplayRole).toString().toStdString(), flags);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user