diff --git a/retroshare-gui/src/gui/TransfersDialog.cpp b/retroshare-gui/src/gui/TransfersDialog.cpp index 495cdb0fe..406c73613 100644 --- a/retroshare-gui/src/gui/TransfersDialog.cpp +++ b/retroshare-gui/src/gui/TransfersDialog.cpp @@ -207,7 +207,17 @@ void TransfersDialog::downloadListCostumPopupMenu( QPoint point ) clearcompletedAct = new QAction(QIcon(IMAGE_CLEARCOMPLETED), tr( "Clear Completed" ), this ); connect( clearcompletedAct , SIGNAL( triggered() ), this, SLOT( clearcompleted() ) ); + + rootisnotdecoratedAct = new QAction(QIcon(), tr( "Set Root is not Decorated" ), this ); + connect( rootisnotdecoratedAct , SIGNAL( triggered() ), this, SLOT( rootisnotdecorated() ) ); + rootisdecoratedAct = new QAction(QIcon(), tr( "Set Root is Decorated" ), this ); + connect( rootisdecoratedAct , SIGNAL( triggered() ), this, SLOT( rootdecorated() ) ); + + QMenu *viewMenu = new QMenu( tr("View"), this ); + viewMenu->addAction(rootisnotdecoratedAct); + viewMenu->addAction(rootisdecoratedAct); + contextMnu.clear(); if (addPlayOption) { @@ -221,7 +231,10 @@ void TransfersDialog::downloadListCostumPopupMenu( QPoint point ) contextMnu.addAction( pastelinkAct); contextMnu.addSeparator(); contextMnu.addAction( clearcompletedAct); + contextMnu.addSeparator(); + contextMnu.addMenu( viewMenu); contextMnu.exec( mevent->globalPos() ); + } void TransfersDialog::playSelectedTransfer() @@ -822,6 +835,17 @@ void TransfersDialog::clearcompleted() rsFiles->FileClearCompleted(); } +void TransfersDialog::rootdecorated() +{ + ui.downloadList->setRootIsDecorated(true); +} + +void TransfersDialog::rootisnotdecorated() +{ + ui.downloadList->setRootIsDecorated(false); +} + + double TransfersDialog::getProgress(int row, QStandardItemModel *model) { return model->data(model->index(row, PROGRESS), Qt::DisplayRole).toDouble(); diff --git a/retroshare-gui/src/gui/TransfersDialog.h b/retroshare-gui/src/gui/TransfersDialog.h index dbe5d4a74..c13ff52c1 100644 --- a/retroshare-gui/src/gui/TransfersDialog.h +++ b/retroshare-gui/src/gui/TransfersDialog.h @@ -66,6 +66,9 @@ class TransfersDialog : public MainPage void copyLink(); void pasteLink(); + + void rootdecorated(); + void rootisnotdecorated(); signals: void playFiles(QStringList files); @@ -94,6 +97,8 @@ class TransfersDialog : public MainPage QAction* clearcompletedAct; QAction* copylinkAct; QAction* pastelinkAct; + QAction* rootisnotdecoratedAct; + QAction* rootisdecoratedAct; QTreeView *downloadList; @@ -104,7 +109,7 @@ class TransfersDialog : public MainPage Ui::TransfersDialog ui; public slots: - int addItem(QString symbol, QString name, QString coreID, qlonglong size, double progress, double dlspeed, QString sources, QString status, qlonglong completed, qlonglong remaining); + int addItem(QString symbol, QString name, QString coreID, qlonglong size, double progress, double dlspeed, QString sources, QString status, qlonglong completed, qlonglong remaining); bool addPeerToItem(int row, QString symbol, QString name, QString coreID, qlonglong fileSize, double progress, double dlspeed, QString sources, QString status, qlonglong completed, qlonglong remaining); void delItem(int row);