mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-08 14:42:51 -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
|
@ -4,29 +4,40 @@
|
|||
#include <QDialogButtonBox>
|
||||
#include "FriendSelectionDialog.h"
|
||||
|
||||
std::list<std::string> FriendSelectionDialog::selectFriends()
|
||||
std::list<std::string> FriendSelectionDialog::selectFriends(QWidget *parent,const QString& caption,const QString& header_text,
|
||||
FriendSelectionWidget::Modus modus,
|
||||
FriendSelectionWidget::ShowTypes show_type,
|
||||
FriendSelectionWidget::IdType pre_selected_id_type,
|
||||
const std::list<std::string>& pre_selected_ids)
|
||||
{
|
||||
FriendSelectionDialog dialog ;
|
||||
FriendSelectionDialog dialog(parent,header_text,modus,show_type,pre_selected_id_type,pre_selected_ids) ;
|
||||
|
||||
dialog.friends_widget->start() ;
|
||||
dialog.setWindowTitle(tr("Choose some friends")) ;
|
||||
dialog.friends_widget->setSelectedIds(pre_selected_id_type,pre_selected_ids,true) ;
|
||||
|
||||
dialog.setWindowTitle(caption) ;
|
||||
|
||||
if(QDialog::Rejected == dialog.exec())
|
||||
return std::list<std::string>() ;
|
||||
|
||||
std::list<std::string> ids ;
|
||||
dialog.friends_widget->selectedSslIds(ids,false) ;
|
||||
dialog.friends_widget->selectedIds(pre_selected_id_type,ids,false) ;
|
||||
|
||||
return ids ;
|
||||
}
|
||||
|
||||
FriendSelectionDialog::FriendSelectionDialog(QWidget *parent)
|
||||
FriendSelectionDialog::FriendSelectionDialog(QWidget *parent,const QString& header_text,
|
||||
FriendSelectionWidget::Modus modus,
|
||||
FriendSelectionWidget::ShowTypes show_type,
|
||||
FriendSelectionWidget::IdType pre_selected_id_type,
|
||||
const std::list<std::string>& pre_selected_ids)
|
||||
: QDialog(parent)
|
||||
{
|
||||
friends_widget = new FriendSelectionWidget(this) ;
|
||||
|
||||
friends_widget->setHeaderText(tr("Contacts:"));
|
||||
friends_widget->setModus(FriendSelectionWidget::MODUS_CHECK);
|
||||
friends_widget->setShowType(FriendSelectionWidget::SHOW_GROUP | FriendSelectionWidget::SHOW_SSL);
|
||||
friends_widget->setHeaderText(header_text);
|
||||
friends_widget->setModus(modus) ;
|
||||
friends_widget->setShowType(show_type) ;
|
||||
|
||||
QLayout *l = new QVBoxLayout ;
|
||||
setLayout(l) ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue