From d6870b45e96b27372e7ceee891f35700d707936c Mon Sep 17 00:00:00 2001 From: RetroPooh Date: Sat, 4 Mar 2017 00:12:36 +0300 Subject: [PATCH] homepage - add friend from cert file button --- retroshare-gui/src/gui/HomePage.cpp | 11 ++++++++- retroshare-gui/src/gui/HomePage.h | 1 + retroshare-gui/src/gui/HomePage.ui | 23 +++++++++++++++++++ .../src/gui/connect/ConnectFriendWizard.cpp | 2 ++ 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/HomePage.cpp b/retroshare-gui/src/gui/HomePage.cpp index cf034cb1c..af7e600ca 100644 --- a/retroshare-gui/src/gui/HomePage.cpp +++ b/retroshare-gui/src/gui/HomePage.cpp @@ -52,7 +52,8 @@ HomePage::HomePage(QWidget *parent) : updateOwnCert(); connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addFriend())); - + connect(ui->LoadCertFileButton, SIGNAL(clicked()), this, SLOT(loadCert())); + QAction *CopyAction = new QAction(QIcon(),tr("Copy your Cert to Clipboard"), this); connect(CopyAction, SIGNAL(triggered()), this, SLOT(copyCert())); @@ -187,6 +188,14 @@ void HomePage::webMail() connwiz.exec (); } +void HomePage::loadCert() +{ + ConnectFriendWizard connwiz (this); + + connwiz.setStartId(ConnectFriendWizard::Page_Cert); + connwiz.exec (); +} + void HomePage::runStartWizard() { QuickStartWizard(this).exec(); diff --git a/retroshare-gui/src/gui/HomePage.h b/retroshare-gui/src/gui/HomePage.h index 44a8bbc67..22937f821 100644 --- a/retroshare-gui/src/gui/HomePage.h +++ b/retroshare-gui/src/gui/HomePage.h @@ -54,6 +54,7 @@ private slots: void saveCert(); void addFriend(); void webMail(); + void loadCert(); void runStartWizard() ; void openWebHelp() ; void recommendFriends(); diff --git a/retroshare-gui/src/gui/HomePage.ui b/retroshare-gui/src/gui/HomePage.ui index 9ed8a4ff1..d2aba3dfc 100644 --- a/retroshare-gui/src/gui/HomePage.ui +++ b/retroshare-gui/src/gui/HomePage.ui @@ -58,6 +58,29 @@ + + + + Add certificate file + + + + :/icons/svg/folders1.svg:/icons/svg/folders1.svg + + + + 24 + 24 + + + + Qt::ToolButtonTextBesideIcon + + + false + + + diff --git a/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp b/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp index 488ea159c..b652debaf 100755 --- a/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp +++ b/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp @@ -81,6 +81,8 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) : // (csoler) I'm hiding this, since it is not needed anymore with the new Home page. ui->userFrame->hide(); + + ui->userFileFrame->hide(); // in homepage dropmenu now // this define comes from Qt example. I don't have mac, so it wasn't tested #ifndef Q_OS_MAC