mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-03-07 06:06:18 -05:00
removed not used Export Button
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2155 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f12bad3d51
commit
353a93df62
@ -43,7 +43,6 @@ CryptoPage::CryptoPage(QWidget * parent, Qt::WFlags flags)
|
||||
_settings = new RshareSettings();
|
||||
|
||||
connect(ui.copykeyButton, SIGNAL(clicked()), this, SLOT(copyPublicKey()));
|
||||
connect(ui.exportkeyButton, SIGNAL(clicked()), this, SLOT(exportPublicKey()));
|
||||
connect(ui.saveButton, SIGNAL(clicked()), this, SLOT(fileSaveAs()));
|
||||
|
||||
|
||||
@ -81,7 +80,7 @@ CryptoPage::load()
|
||||
void
|
||||
CryptoPage::loadPublicKey()
|
||||
{
|
||||
ui.certtextEdit->setText(QString::fromStdString(rsPeers->GetRetroshareInvite()));
|
||||
ui.certtextEdit->setPlainText(QString::fromStdString(rsPeers->GetRetroshareInvite()));
|
||||
ui.certtextEdit->setReadOnly(true);
|
||||
ui.certtextEdit->setMinimumHeight(200);
|
||||
}
|
||||
@ -91,37 +90,13 @@ CryptoPage::copyPublicKey()
|
||||
{
|
||||
QMessageBox::information(this,
|
||||
tr("RetroShare"),
|
||||
tr("Your Public Key is copied to Clipbard, paste and send it to your"
|
||||
"friend via email or some other way"));
|
||||
tr("Your Public Key is copied to Clipboard, paste and send it to your"
|
||||
" friend via email or some other way"));
|
||||
QClipboard *clipboard = QApplication::clipboard();
|
||||
clipboard->setText(ui.certtextEdit->toPlainText());
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
CryptoPage::exportPublicKey()
|
||||
{
|
||||
qDebug() << " exportPulicKey";
|
||||
|
||||
QString qdir = QFileDialog::getSaveFileName(this,
|
||||
"Please choose a filename",
|
||||
QDir::homePath(),
|
||||
"RetroShare Certificate (*.pqi)");
|
||||
|
||||
if ( rsPeers->saveCertificateToFile(rsPeers->getOwnId(), qdir.toStdString()) )
|
||||
{
|
||||
QMessageBox::information(this, tr("RetroShare"),
|
||||
tr("Certificate file successfully created"),
|
||||
QMessageBox::Ok, QMessageBox::Ok);
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information(this, tr("RetroShare"),
|
||||
tr("Sorry, certificate file creation failed"),
|
||||
QMessageBox::Ok, QMessageBox::Ok);
|
||||
}
|
||||
}
|
||||
|
||||
bool CryptoPage::fileSave()
|
||||
{
|
||||
if (fileName.isEmpty())
|
||||
@ -140,7 +115,7 @@ bool CryptoPage::fileSave()
|
||||
bool CryptoPage::fileSaveAs()
|
||||
{
|
||||
QString fn = QFileDialog::getSaveFileName(this, tr("Save as..."),
|
||||
QString(), tr("TXT-Files (*.pqi *.pem *.txt);;All Files (*)"));
|
||||
QString(), tr("RetroShare Certificate (*.retroshare );;All Files (*)"));
|
||||
if (fn.isEmpty())
|
||||
return false;
|
||||
setCurrentFileName(fn);
|
||||
@ -153,4 +128,4 @@ void CryptoPage::setCurrentFileName(const QString &fileName)
|
||||
ui.certtextEdit->document()->setModified(false);
|
||||
|
||||
setWindowModified(false);
|
||||
}
|
||||
}
|
||||
|
@ -52,8 +52,6 @@ class CryptoPage : public ConfigPage
|
||||
void loadPublicKey();
|
||||
|
||||
void copyPublicKey();
|
||||
|
||||
void exportPublicKey();
|
||||
|
||||
bool fileSave();
|
||||
bool fileSaveAs();
|
||||
|
@ -499,101 +499,68 @@
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::NoContextMenu</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Public Key</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTextEdit" name="certtextEdit">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>7</pointsize>
|
||||
<kerning>false</kerning>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="4" column="0">
|
||||
<widget class="QPushButton" name="exportkeyButton">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export my Key as file</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Export Key</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="copykeyButton">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0" colspan="3">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Public Key</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTextEdit" name="certtextEdit">
|
||||
<property name="font">
|
||||
<font>
|
||||
<kerning>false</kerning>
|
||||
</font>
|
||||
</property>
|
||||
<property name="acceptRichText">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="copykeyButton">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Copy my Key to Clipboard</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Copy Key</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QPushButton" name="saveButton">
|
||||
<property name="text">
|
||||
<string>Save Key</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>58</width>
|
||||
<height>298</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Copy Key</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="saveButton">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Save Key into a file</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save Key</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>278</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
Loading…
x
Reference in New Issue
Block a user