From 030c69d95b1223be962b0e6801e99438fad287c4 Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 7 Feb 2015 09:53:33 +0000 Subject: [PATCH] restored some code removed by mistakein 7904 git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7921 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/connect/ConfCertDialog.cpp | 15 +++++++++++++++ retroshare-gui/src/gui/connect/ConfCertDialog.h | 1 + 2 files changed, 16 insertions(+) diff --git a/retroshare-gui/src/gui/connect/ConfCertDialog.cpp b/retroshare-gui/src/gui/connect/ConfCertDialog.cpp index ad095f1e8..0fe72988d 100644 --- a/retroshare-gui/src/gui/connect/ConfCertDialog.cpp +++ b/retroshare-gui/src/gui/connect/ConfCertDialog.cpp @@ -135,6 +135,16 @@ ConfCertDialog::~ConfCertDialog() } } + +void ConfCertDialog::setServiceFlags() +{ + ServicePermissionFlags flags(0) ; + + if( ui._direct_transfer_CB->isChecked()) flags = flags | RS_SERVICE_PERM_DIRECT_DL ; + + rsPeers->setServicePermissionFlags(pgpId,flags) ; +} + void ConfCertDialog::loadAll() { for(QMap::iterator it = instances_ssl.begin(); it != instances_ssl.end(); ++it) it.value()->load(); @@ -165,6 +175,8 @@ void ConfCertDialog::load() ui.make_friend_button->setToolTip("") ; } + ui._direct_transfer_CB->setChecked( detail.service_perm_flags & RS_SERVICE_PERM_DIRECT_DL ) ; + ui.name->setText(QString::fromUtf8(detail.name.c_str())); ui.peerid->setText(QString::fromStdString(detail.id.toStdString())); @@ -478,6 +490,8 @@ void ConfCertDialog::applyDialog() emit configChanged(); } + setServiceFlags() ; + loadAll(); close(); } @@ -489,6 +503,7 @@ void ConfCertDialog::makeFriend() } rsPeers->addFriend(peerId, pgpId); + setServiceFlags() ; loadAll(); emit configChanged(); diff --git a/retroshare-gui/src/gui/connect/ConfCertDialog.h b/retroshare-gui/src/gui/connect/ConfCertDialog.h index b83365dc2..90a3d7260 100644 --- a/retroshare-gui/src/gui/connect/ConfCertDialog.h +++ b/retroshare-gui/src/gui/connect/ConfCertDialog.h @@ -80,6 +80,7 @@ private slots: void denyFriend(); void signGPGKey(); void loadInvitePage(); + void setServiceFlags(); void showHelpDialog(); /** Called when a child window requests the given help topic. */