mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 08:59:37 -05:00
directly export current profile instead of showing profile manager, since profile manager only allows to export anyway
This commit is contained in:
parent
3d958a7592
commit
141bfa2ec9
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
<width>654</width>
|
||||
<height>677</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -284,7 +284,7 @@
|
||||
<string>Email</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/mail_128.png</normaloff>:/icons/mail_128.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "CryptoPage.h"
|
||||
#include "util/misc.h"
|
||||
#include "util/DateTime.h"
|
||||
#include "retroshare/rsinit.h"
|
||||
#include <gui/RetroShareLink.h>
|
||||
#include <gui/connect/ConfCertDialog.h>
|
||||
#include <gui/profile/ProfileManager.h>
|
||||
@ -57,16 +58,38 @@ CryptoPage::CryptoPage(QWidget * parent, Qt::WindowFlags flags)
|
||||
// hide profile manager as it causes bugs when generating a new profile.
|
||||
//ui.profile_Button->hide() ;
|
||||
|
||||
connect(ui.exportprofile,SIGNAL(clicked()), this, SLOT(profilemanager()));
|
||||
//connect(ui.exportprofile,SIGNAL(clicked()), this, SLOT(profilemanager()));
|
||||
connect(ui.exportprofile,SIGNAL(clicked()), this, SLOT(exportProfile()));
|
||||
|
||||
|
||||
ui.onlinesince->setText(DateTime::formatLongDateTime(Rshare::startupTime()));
|
||||
}
|
||||
|
||||
#ifdef UNUSED_CODE
|
||||
void CryptoPage::profilemanager()
|
||||
{
|
||||
ProfileManager().exec();
|
||||
}
|
||||
#endif
|
||||
|
||||
void CryptoPage::exportProfile()
|
||||
{
|
||||
RsPgpId gpgId(rsPeers->getGPGOwnId());
|
||||
|
||||
QString fname = QFileDialog::getSaveFileName(this, tr("Export Identity"), "", tr("RetroShare Identity files (*.asc)"));
|
||||
|
||||
if (fname.isNull())
|
||||
return;
|
||||
|
||||
if (fname.right(4).toUpper() != ".ASC") fname += ".asc";
|
||||
|
||||
if (RsAccounts::ExportIdentity(fname.toUtf8().constData(), gpgId))
|
||||
QMessageBox::information(this, tr("Identity saved"), tr("Your identity was successfully saved\nIt is encrypted\n\nYou can now copy it to another computer\nand use the import button to load it"));
|
||||
else
|
||||
QMessageBox::information(this, tr("Identity not saved"), tr("Your identity was not saved. An error occurred."));
|
||||
}
|
||||
|
||||
|
||||
void CryptoPage::showEvent ( QShowEvent * /*event*/ )
|
||||
{
|
||||
RsPeerDetails detail;
|
||||
|
@ -42,11 +42,12 @@ class CryptoPage : public ConfigPage
|
||||
virtual QString helpText() const { return ""; }
|
||||
|
||||
private slots:
|
||||
void exportProfile();
|
||||
virtual void load();
|
||||
void copyPublicKey();
|
||||
void copyRSLink() ;
|
||||
virtual void showEvent ( QShowEvent * event );
|
||||
void profilemanager();
|
||||
// void profilemanager();
|
||||
bool fileSave();
|
||||
bool fileSaveAs();
|
||||
void showStats();
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>644</width>
|
||||
<height>459</height>
|
||||
<width>869</width>
|
||||
<height>487</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
@ -246,6 +246,9 @@
|
||||
</item>
|
||||
<item row="14" column="1">
|
||||
<widget class="QPushButton" name="exportprofile">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Use this to export your profile key. You can then import it in a different computer and make a new node with the same profile. Doing so, existing friends that you also add to the new node will automatically recognise that new node as friend.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Export</string>
|
||||
</property>
|
||||
|
Loading…
Reference in New Issue
Block a user