mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-13 11:32:48 -04: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
3 changed files with 63 additions and 123 deletions
|
@ -43,7 +43,6 @@ CryptoPage::CryptoPage(QWidget * parent, Qt::WFlags flags)
|
||||||
_settings = new RshareSettings();
|
_settings = new RshareSettings();
|
||||||
|
|
||||||
connect(ui.copykeyButton, SIGNAL(clicked()), this, SLOT(copyPublicKey()));
|
connect(ui.copykeyButton, SIGNAL(clicked()), this, SLOT(copyPublicKey()));
|
||||||
connect(ui.exportkeyButton, SIGNAL(clicked()), this, SLOT(exportPublicKey()));
|
|
||||||
connect(ui.saveButton, SIGNAL(clicked()), this, SLOT(fileSaveAs()));
|
connect(ui.saveButton, SIGNAL(clicked()), this, SLOT(fileSaveAs()));
|
||||||
|
|
||||||
|
|
||||||
|
@ -81,7 +80,7 @@ CryptoPage::load()
|
||||||
void
|
void
|
||||||
CryptoPage::loadPublicKey()
|
CryptoPage::loadPublicKey()
|
||||||
{
|
{
|
||||||
ui.certtextEdit->setText(QString::fromStdString(rsPeers->GetRetroshareInvite()));
|
ui.certtextEdit->setPlainText(QString::fromStdString(rsPeers->GetRetroshareInvite()));
|
||||||
ui.certtextEdit->setReadOnly(true);
|
ui.certtextEdit->setReadOnly(true);
|
||||||
ui.certtextEdit->setMinimumHeight(200);
|
ui.certtextEdit->setMinimumHeight(200);
|
||||||
}
|
}
|
||||||
|
@ -91,37 +90,13 @@ CryptoPage::copyPublicKey()
|
||||||
{
|
{
|
||||||
QMessageBox::information(this,
|
QMessageBox::information(this,
|
||||||
tr("RetroShare"),
|
tr("RetroShare"),
|
||||||
tr("Your Public Key is copied to Clipbard, paste and send it to your"
|
tr("Your Public Key is copied to Clipboard, paste and send it to your"
|
||||||
" friend via email or some other way"));
|
" friend via email or some other way"));
|
||||||
QClipboard *clipboard = QApplication::clipboard();
|
QClipboard *clipboard = QApplication::clipboard();
|
||||||
clipboard->setText(ui.certtextEdit->toPlainText());
|
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()
|
bool CryptoPage::fileSave()
|
||||||
{
|
{
|
||||||
if (fileName.isEmpty())
|
if (fileName.isEmpty())
|
||||||
|
@ -140,7 +115,7 @@ bool CryptoPage::fileSave()
|
||||||
bool CryptoPage::fileSaveAs()
|
bool CryptoPage::fileSaveAs()
|
||||||
{
|
{
|
||||||
QString fn = QFileDialog::getSaveFileName(this, tr("Save as..."),
|
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())
|
if (fn.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
setCurrentFileName(fn);
|
setCurrentFileName(fn);
|
||||||
|
|
|
@ -53,8 +53,6 @@ class CryptoPage : public ConfigPage
|
||||||
|
|
||||||
void copyPublicKey();
|
void copyPublicKey();
|
||||||
|
|
||||||
void exportPublicKey();
|
|
||||||
|
|
||||||
bool fileSave();
|
bool fileSave();
|
||||||
bool fileSaveAs();
|
bool fileSaveAs();
|
||||||
|
|
||||||
|
|
|
@ -499,10 +499,8 @@
|
||||||
<property name="contextMenuPolicy">
|
<property name="contextMenuPolicy">
|
||||||
<enum>Qt::NoContextMenu</enum>
|
<enum>Qt::NoContextMenu</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_5">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0" colspan="3">
|
||||||
<layout class="QGridLayout" name="gridLayout_4">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Public Key</string>
|
<string>Public Key</string>
|
||||||
|
@ -512,34 +510,18 @@
|
||||||
<widget class="QTextEdit" name="certtextEdit">
|
<widget class="QTextEdit" name="certtextEdit">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>7</pointsize>
|
|
||||||
<kerning>false</kerning>
|
<kerning>false</kerning>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="acceptRichText">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="1" column="0">
|
||||||
<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">
|
<widget class="QPushButton" name="copykeyButton">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
|
@ -553,49 +535,34 @@ p, li { white-space: pre-wrap; }
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="1">
|
||||||
<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">
|
<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">
|
<property name="text">
|
||||||
<string>Save Key</string>
|
<string>Save Key</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="1" column="2">
|
||||||
</item>
|
<spacer name="horizontalSpacer">
|
||||||
<item row="1" column="0">
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>58</width>
|
<width>278</width>
|
||||||
<height>298</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue