mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-24 23:19:29 -05:00
Add expand all/collapse all on download list (Patch from Phenom)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6485 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
dc29793da6
commit
71413bc325
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -12794,6 +12794,14 @@ Try to be patient!</source>
|
||||
<source>File Never Seen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Expand all</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Collapse all</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TreeStyle_RDM</name>
|
||||
|
Loading…
Reference in New Issue
Block a user