mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04: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>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>600</width>
|
<width>654</width>
|
||||||
<height>400</height>
|
<height>677</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -284,7 +284,7 @@
|
|||||||
<string>Email</string>
|
<string>Email</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../icons.qrc">
|
<iconset>
|
||||||
<normaloff>:/icons/mail_128.png</normaloff>:/icons/mail_128.png</iconset>
|
<normaloff>:/icons/mail_128.png</normaloff>:/icons/mail_128.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include "CryptoPage.h"
|
#include "CryptoPage.h"
|
||||||
#include "util/misc.h"
|
#include "util/misc.h"
|
||||||
#include "util/DateTime.h"
|
#include "util/DateTime.h"
|
||||||
|
#include "retroshare/rsinit.h"
|
||||||
#include <gui/RetroShareLink.h>
|
#include <gui/RetroShareLink.h>
|
||||||
#include <gui/connect/ConfCertDialog.h>
|
#include <gui/connect/ConfCertDialog.h>
|
||||||
#include <gui/profile/ProfileManager.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.
|
// hide profile manager as it causes bugs when generating a new profile.
|
||||||
//ui.profile_Button->hide() ;
|
//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()));
|
ui.onlinesince->setText(DateTime::formatLongDateTime(Rshare::startupTime()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef UNUSED_CODE
|
||||||
void CryptoPage::profilemanager()
|
void CryptoPage::profilemanager()
|
||||||
{
|
{
|
||||||
ProfileManager().exec();
|
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*/ )
|
void CryptoPage::showEvent ( QShowEvent * /*event*/ )
|
||||||
{
|
{
|
||||||
RsPeerDetails detail;
|
RsPeerDetails detail;
|
||||||
|
@ -42,11 +42,12 @@ class CryptoPage : public ConfigPage
|
|||||||
virtual QString helpText() const { return ""; }
|
virtual QString helpText() const { return ""; }
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
void exportProfile();
|
||||||
virtual void load();
|
virtual void load();
|
||||||
void copyPublicKey();
|
void copyPublicKey();
|
||||||
void copyRSLink() ;
|
void copyRSLink() ;
|
||||||
virtual void showEvent ( QShowEvent * event );
|
virtual void showEvent ( QShowEvent * event );
|
||||||
void profilemanager();
|
// void profilemanager();
|
||||||
bool fileSave();
|
bool fileSave();
|
||||||
bool fileSaveAs();
|
bool fileSaveAs();
|
||||||
void showStats();
|
void showStats();
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>644</width>
|
<width>869</width>
|
||||||
<height>459</height>
|
<height>487</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
@ -246,6 +246,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="14" column="1">
|
<item row="14" column="1">
|
||||||
<widget class="QPushButton" name="exportprofile">
|
<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">
|
<property name="text">
|
||||||
<string>Export</string>
|
<string>Export</string>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user