From ffb5938a034bfc30b4297008bb2ba729347d8aef Mon Sep 17 00:00:00 2001 From: defnax Date: Sun, 17 Jan 2010 12:34:33 +0000 Subject: [PATCH] Added Sort Status to Display menu git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2063 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/PeersDialog.cpp | 13 +++++++++++++ retroshare-gui/src/gui/PeersDialog.h | 3 +++ retroshare-gui/src/gui/PeersDialog.ui | 13 +++++++++++++ 3 files changed, 29 insertions(+) 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 + +