diff --git a/retroshare-gui/src/gui/PeersDialog.cpp b/retroshare-gui/src/gui/PeersDialog.cpp index 0066123ae..0ee689a79 100644 --- a/retroshare-gui/src/gui/PeersDialog.cpp +++ b/retroshare-gui/src/gui/PeersDialog.cpp @@ -187,6 +187,9 @@ PeersDialog::PeersDialog(QWidget *parent) ui.menupushButton->setMenu(menu); QMenu *lookmenu = new QMenu(); + lookmenu->addAction(ui.actionSort_Status_Descending_Order); + lookmenu->addAction(ui.actionSort_Status_Ascending_Order); + lookmenu->addSeparator(); lookmenu->addAction(ui.actionSet_Tabs_Right); lookmenu->addAction(ui.actionSet_Tabs_Left); lookmenu->addAction(ui.actionSet_Tabs_North); @@ -1538,3 +1541,13 @@ void PeersDialog::loadtabsettings() _settings->endGroup(); } + +void PeersDialog::on_actionSort_Status_Descending_Order_activated() +{ + ui.peertreeWidget->sortItems ( 1, Qt::DescendingOrder ); +} + +void PeersDialog::on_actionSort_Status_Ascending_Order_activated() +{ + ui.peertreeWidget->sortItems ( 1, Qt::AscendingOrder ); +} \ No newline at end of file diff --git a/retroshare-gui/src/gui/PeersDialog.h b/retroshare-gui/src/gui/PeersDialog.h index 8a46561a1..96df3f6f3 100644 --- a/retroshare-gui/src/gui/PeersDialog.h +++ b/retroshare-gui/src/gui/PeersDialog.h @@ -137,6 +137,9 @@ class PeersDialog : public RsAutoUpdatePage void on_actionSet_Tabs_Triangular_activated(); void on_actionSet_Tabs_Rounded_activated(); + + void on_actionSort_Status_Descending_Order_activated(); + void on_actionSort_Status_Ascending_Order_activated(); signals: void friendsUpdated() ; diff --git a/retroshare-gui/src/gui/PeersDialog.ui b/retroshare-gui/src/gui/PeersDialog.ui index 74feeb931..53d11fac7 100644 --- a/retroshare-gui/src/gui/PeersDialog.ui +++ b/retroshare-gui/src/gui/PeersDialog.ui @@ -600,6 +600,9 @@ p, li { white-space: pre-wrap; } + + Display + QPushButton::menu-indicator { subcontrol-origin: padding; @@ -1255,6 +1258,16 @@ background: white;} Set Tabs Rounded + + + Sort Status Descending Order + + + + + Sort Status Ascending Order + +