diff --git a/retroshare-gui/src/gui/TransfersDialog.cpp b/retroshare-gui/src/gui/TransfersDialog.cpp index 2ffc8f5b7..d3b30c020 100644 --- a/retroshare-gui/src/gui/TransfersDialog.cpp +++ b/retroshare-gui/src/gui/TransfersDialog.cpp @@ -86,6 +86,8 @@ #define IMAGE_PRIORITYHIGH ":/images/priorityhigh.png" #define IMAGE_PRIORITYAUTO ":/images/priorityauto.png" #define IMAGE_SEARCH ":/images/filefind.png" +#define IMAGE_EXPAND ":/images/edit_add24.png" +#define IMAGE_COLLAPSE ":/images/edit_remove24.png" Q_DECLARE_METATYPE(FileProgressInfo) @@ -414,6 +416,10 @@ TransfersDialog::TransfersDialog(QWidget *parent) connect(renameFileAct, SIGNAL(triggered()), this, SLOT(renameFile())); specifyDestinationDirectoryAct = new QAction(QIcon(IMAGE_SEARCH),tr("Specify..."),this) ; connect(specifyDestinationDirectoryAct,SIGNAL(triggered()),this,SLOT(chooseDestinationDirectory())) ; + expandAllAct= new QAction(QIcon(IMAGE_EXPAND),tr("Expand all"),this); + connect(expandAllAct,SIGNAL(triggered()),this,SLOT(expandAll())) ; + collapseAllAct= new QAction(QIcon(IMAGE_COLLAPSE),tr("Collapse all"),this); + connect(collapseAllAct,SIGNAL(triggered()),this,SLOT(collapseAll())) ; // load settings processSettings(true); @@ -678,6 +684,13 @@ void TransfersDialog::downloadListCustomPopupMenu( QPoint /*point*/ ) contextMnu.addSeparator(); + if (DLListModel->rowCount()>0 ) { + contextMnu.addAction( expandAllAct ) ; + contextMnu.addAction( collapseAllAct ) ; + } + + contextMnu.addSeparator();//----------------------------------------------- + contextMnu.addAction( toggleShowCacheTransfersAct ) ; toggleShowCacheTransfersAct->setChecked(_show_cache_transfers) ; contextMnu.addAction( openCollectionAct ) ; @@ -1756,3 +1769,12 @@ void TransfersDialog::openCollection() Collection.downloadFiles(); } } + +void TransfersDialog::expandAll() +{ + ui.downloadList->expandAll(); +} +void TransfersDialog::collapseAll() +{ + ui.downloadList->collapseAll(); +} diff --git a/retroshare-gui/src/gui/TransfersDialog.h b/retroshare-gui/src/gui/TransfersDialog.h index 29e3ad3ff..5a54d8c2e 100644 --- a/retroshare-gui/src/gui/TransfersDialog.h +++ b/retroshare-gui/src/gui/TransfersDialog.h @@ -90,6 +90,9 @@ private slots: void setDestinationDirectory(); void chooseDestinationDirectory(); + void expandAll(); + void collapseAll(); + // void rootdecorated(); // void rootisnotdecorated(); @@ -174,6 +177,8 @@ private: QAction *openCollectionAct; QAction *renameFileAct; QAction *specifyDestinationDirectoryAct; + QAction *expandAllAct; + QAction *collapseAllAct; bool m_bProcessSettings; void processSettings(bool bLoad); diff --git a/retroshare-gui/src/lang/retroshare_en.ts b/retroshare-gui/src/lang/retroshare_en.ts index cacc42751..d93b1ac38 100644 --- a/retroshare-gui/src/lang/retroshare_en.ts +++ b/retroshare-gui/src/lang/retroshare_en.ts @@ -12794,6 +12794,14 @@ Try to be patient! File Never Seen + + Expand all + + + + Collapse all + + TreeStyle_RDM