|
|
@ -819,8 +819,12 @@ void TransferListWidget::displayListMenu(const QPoint&) { |
|
|
|
// Enable/disable pause/start action given the DL state
|
|
|
|
// Enable/disable pause/start action given the DL state
|
|
|
|
QModelIndexList selectedIndexes = selectionModel()->selectedRows(); |
|
|
|
QModelIndexList selectedIndexes = selectionModel()->selectedRows(); |
|
|
|
bool has_pause = false, has_start = false, has_preview = false; |
|
|
|
bool has_pause = false, has_start = false, has_preview = false; |
|
|
|
bool all_same_super_seeding = true, all_same_sequential_download_mode = true, all_same_prio_firstlast = true; |
|
|
|
#ifdef LIBTORRENT_0_15 |
|
|
|
bool super_seeding_mode = false, sequential_download_mode = false, prioritize_first_last = false; |
|
|
|
bool all_same_super_seeding = true; |
|
|
|
|
|
|
|
bool super_seeding_mode = false; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
bool all_same_sequential_download_mode = true, all_same_prio_firstlast = true; |
|
|
|
|
|
|
|
bool sequential_download_mode = false, prioritize_first_last = false; |
|
|
|
bool one_has_metadata = false, one_not_seed = false; |
|
|
|
bool one_has_metadata = false, one_not_seed = false; |
|
|
|
bool first = true; |
|
|
|
bool first = true; |
|
|
|
QTorrentHandle h; |
|
|
|
QTorrentHandle h; |
|
|
@ -846,7 +850,9 @@ void TransferListWidget::displayListMenu(const QPoint&) { |
|
|
|
all_same_prio_firstlast = false; |
|
|
|
all_same_prio_firstlast = false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} |
|
|
|
|
|
|
|
#ifdef LIBTORRENT_0_15 |
|
|
|
|
|
|
|
else { |
|
|
|
if(!one_not_seed && all_same_super_seeding) { |
|
|
|
if(!one_not_seed && all_same_super_seeding) { |
|
|
|
if(first) { |
|
|
|
if(first) { |
|
|
|
super_seeding_mode = h.super_seeding(); |
|
|
|
super_seeding_mode = h.super_seeding(); |
|
|
@ -857,6 +863,7 @@ void TransferListWidget::displayListMenu(const QPoint&) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
if(h.is_paused()) { |
|
|
|
if(h.is_paused()) { |
|
|
|
if(!has_start) { |
|
|
|
if(!has_start) { |
|
|
|
listMenu.addAction(&actionStart); |
|
|
|
listMenu.addAction(&actionStart); |
|
|
@ -880,6 +887,7 @@ void TransferListWidget::displayListMenu(const QPoint&) { |
|
|
|
if(one_not_seed) |
|
|
|
if(one_not_seed) |
|
|
|
listMenu.addAction(&actionSet_download_limit); |
|
|
|
listMenu.addAction(&actionSet_download_limit); |
|
|
|
listMenu.addAction(&actionSet_upload_limit); |
|
|
|
listMenu.addAction(&actionSet_upload_limit); |
|
|
|
|
|
|
|
#ifdef LIBTORRENT_0_15 |
|
|
|
if(!one_not_seed && all_same_super_seeding) { |
|
|
|
if(!one_not_seed && all_same_super_seeding) { |
|
|
|
QIcon ico; |
|
|
|
QIcon ico; |
|
|
|
if(super_seeding_mode) { |
|
|
|
if(super_seeding_mode) { |
|
|
@ -890,6 +898,7 @@ void TransferListWidget::displayListMenu(const QPoint&) { |
|
|
|
actionSuper_seeding_mode.setIcon(ico); |
|
|
|
actionSuper_seeding_mode.setIcon(ico); |
|
|
|
listMenu.addAction(&actionSuper_seeding_mode); |
|
|
|
listMenu.addAction(&actionSuper_seeding_mode); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
listMenu.addSeparator(); |
|
|
|
listMenu.addSeparator(); |
|
|
|
bool added_preview_action = false; |
|
|
|
bool added_preview_action = false; |
|
|
|
if(has_preview) { |
|
|
|
if(has_preview) { |
|
|
|