mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-11 18:45:17 -04:00
- Added a drop-down item to allow removing unused keys, in the Network dialog.
- added key removal method in OpenPGP-SDK - improved FriendSelectionDialog/Widget to enable select all/none keys, and show non friend keys - added safe key removal method in PGPHandler. Removed keys from other locations will not cause errors. - added backup system to public keyring, impossibility to remove public parts of owned secret keys, etc. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6382 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
02890c737a
commit
0266329dc8
17 changed files with 314 additions and 81 deletions
|
@ -89,6 +89,8 @@ FriendSelectionWidget::FriendSelectionWidget(QWidget *parent) :
|
|||
connect(ui->friendList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuRequested(QPoint)));
|
||||
connect(ui->friendList, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(itemDoubleClicked(QTreeWidgetItem*,int)));
|
||||
connect(ui->friendList, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(itemChanged(QTreeWidgetItem*,int)));
|
||||
connect(ui->selectAll_PB, SIGNAL(clicked()), this, SLOT(selectAll()));
|
||||
connect(ui->deselectAll_PB, SIGNAL(clicked()), this, SLOT(deselectAll()));
|
||||
connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterItems(QString)));
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(groupsChanged(int)), this, SLOT(fillList()));
|
||||
|
@ -148,6 +150,17 @@ void FriendSelectionWidget::setModus(Modus modus)
|
|||
break;
|
||||
}
|
||||
|
||||
if(modus == MODUS_CHECK)
|
||||
{
|
||||
ui->selectAll_PB->setHidden(false) ;
|
||||
ui->deselectAll_PB->setHidden(false) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->selectAll_PB->setHidden(true) ;
|
||||
ui->deselectAll_PB->setHidden(true) ;
|
||||
}
|
||||
|
||||
fillList();
|
||||
}
|
||||
|
||||
|
@ -221,7 +234,7 @@ void FriendSelectionWidget::fillList()
|
|||
}
|
||||
|
||||
std::list<std::string> gpgIdsSelected;
|
||||
if (mShowTypes & SHOW_GPG) {
|
||||
if (mShowTypes & (SHOW_GPG | SHOW_NON_FRIEND_GPG)) {
|
||||
selectedGpgIds(gpgIdsSelected, true);
|
||||
}
|
||||
|
||||
|
@ -235,10 +248,15 @@ void FriendSelectionWidget::fillList()
|
|||
|
||||
std::list<std::string> gpgIds;
|
||||
std::list<std::string>::iterator gpgIt;
|
||||
rsPeers->getGPGAcceptedList(gpgIds);
|
||||
|
||||
if(mShowTypes & SHOW_NON_FRIEND_GPG)
|
||||
rsPeers->getGPGAllList(gpgIds);
|
||||
else
|
||||
rsPeers->getGPGAcceptedList(gpgIds);
|
||||
|
||||
std::list<std::string> sslIds;
|
||||
std::list<std::string>::iterator sslIt;
|
||||
|
||||
if ((mShowTypes & (SHOW_SSL | SHOW_GPG)) == SHOW_SSL) {
|
||||
rsPeers->getFriendList(sslIds);
|
||||
}
|
||||
|
@ -295,7 +313,7 @@ void FriendSelectionWidget::fillList()
|
|||
}
|
||||
}
|
||||
|
||||
if (mShowTypes & SHOW_GPG) {
|
||||
if (mShowTypes & (SHOW_GPG | SHOW_NON_FRIEND_GPG)) {
|
||||
// iterate through gpg ids
|
||||
for (gpgIt = gpgIds.begin(); gpgIt != gpgIds.end(); gpgIt++) {
|
||||
if (groupInfo) {
|
||||
|
@ -466,7 +484,7 @@ void FriendSelectionWidget::peerStatusChanged(const QString& peerId, int status)
|
|||
QString gpgId;
|
||||
int gpgStatus = RS_STATUS_OFFLINE;
|
||||
|
||||
if (mShowTypes & SHOW_GPG) {
|
||||
if (mShowTypes & (SHOW_GPG | SHOW_NON_FRIEND_GPG)) {
|
||||
/* need gpg id and online state */
|
||||
RsPeerDetails detail;
|
||||
if (rsPeers->getPeerDetails(peerId.toStdString(), detail)) {
|
||||
|
@ -763,6 +781,17 @@ void FriendSelectionWidget::selectedIds(IdType idType, std::list<std::string> &i
|
|||
}
|
||||
}
|
||||
|
||||
void FriendSelectionWidget::deselectAll()
|
||||
{
|
||||
for(QTreeWidgetItemIterator itemIterator(ui->friendList);*itemIterator!=NULL;++itemIterator)
|
||||
setSelected(mListModus, *itemIterator, false);
|
||||
}
|
||||
void FriendSelectionWidget::selectAll()
|
||||
{
|
||||
for(QTreeWidgetItemIterator itemIterator(ui->friendList);*itemIterator!=NULL;++itemIterator)
|
||||
setSelected(mListModus, *itemIterator, true);
|
||||
}
|
||||
|
||||
void FriendSelectionWidget::setSelectedIds(IdType idType, const std::list<std::string> &ids, bool add)
|
||||
{
|
||||
QTreeWidgetItemIterator itemIterator(ui->friendList);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue