Added new button in ConnectFriendWizard to paste a certificate of your friend from the clipboard.

Updated english translation.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8393 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2015-06-07 18:28:17 +00:00
parent 24a07702f2
commit 31680458bd
5 changed files with 63 additions and 16 deletions

View File

@ -54,7 +54,7 @@ To be done
0017 [X] no tab configuraion for uploads section. no cache transfer disable option comment: cachetransfers will be removed (from noname)
cyril: rename "show cache transfers" into "show file lists transfers"
0018 [ ] add friend dialog - add button for pasting from clipboard.
0018 [X] add friend dialog - add button for pasting from clipboard.
// some ppl dumb to use rightclich or keyboard)) and on the upper window some buttons exist, the lower one feels lonely.(from noname)
comment: teach to use the context menu, else they are lost in RS

View File

@ -303,6 +303,7 @@ void ConnectFriendWizard::initializePage(int id)
connect(ui->userCertIncludeSignaturesButton, SIGNAL(clicked()), this, SLOT(toggleSignatureState()));
connect(ui->userCertOldFormatButton, SIGNAL(clicked()), this, SLOT(toggleFormatState()));
connect(ui->userCertCopyButton, SIGNAL(clicked()), this, SLOT(copyCert()));
connect(ui->userCertPasteButton, SIGNAL(clicked()), this, SLOT(pasteCert()));
connect(ui->userCertSaveButton, SIGNAL(clicked()), this, SLOT(saveCert()));
connect(ui->userCertMailButton, SIGNAL(clicked()), this, SLOT(runEmailClient()));
connect(ui->friendCertEdit, SIGNAL(textChanged()), this, SLOT(friendCertChanged()));
@ -985,6 +986,12 @@ void ConnectFriendWizard::copyCert()
QMessageBox::information(this, "RetroShare", tr("Your Cert is copied to Clipboard, paste and send it to your friend via email or some other way"));
}
void ConnectFriendWizard::pasteCert()
{
QClipboard *clipboard = QApplication::clipboard();
ui->friendCertEdit->setPlainText(clipboard->text());
}
void ConnectFriendWizard::saveCert()
{
QString fileName = QFileDialog::getSaveFileName(this, tr("Save as..."), "", tr("RetroShare Certificate (*.rsc );;All Files (*)"));

View File

@ -64,6 +64,7 @@ private slots:
void runEmailClient();
void showHelpUserCert();
void copyCert();
void pasteCert();
void saveCert();
void friendCertChanged();
void cleanFriendCert();

View File

@ -114,30 +114,36 @@
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QPushButton" name="userCertHelpButton">
<widget class="QToolButton" name="userCertHelpButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>20</horstretch>
<verstretch>20</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/info16.png</normaloff>:/images/info16.png</iconset>
</property>
<property name="flat">
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="userCertIncludeSignaturesButton">
<widget class="QToolButton" name="userCertIncludeSignaturesButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>20</horstretch>
<verstretch>20</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Include signatures</string>
</property>
@ -148,19 +154,22 @@
<property name="checkable">
<bool>true</bool>
</property>
<property name="flat">
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="userCertCopyButton">
<widget class="QToolButton" name="userCertCopyButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>20</horstretch>
<verstretch>20</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Copy your Cert to Clipboard</string>
</property>
@ -168,19 +177,22 @@
<iconset resource="../images.qrc">
<normaloff>:/images/copyrslink.png</normaloff>:/images/copyrslink.png</iconset>
</property>
<property name="flat">
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="userCertSaveButton">
<widget class="QToolButton" name="userCertSaveButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>20</horstretch>
<verstretch>20</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Save your Cert into a File</string>
</property>
@ -188,19 +200,22 @@
<iconset resource="../images.qrc">
<normaloff>:/images/document_save.png</normaloff>:/images/document_save.png</iconset>
</property>
<property name="flat">
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="userCertMailButton">
<widget class="QToolButton" name="userCertMailButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>20</horstretch>
<verstretch>20</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Run Email program</string>
</property>
@ -208,19 +223,22 @@
<iconset resource="../images.qrc">
<normaloff>:/images/mail_send.png</normaloff>:/images/mail_send.png</iconset>
</property>
<property name="flat">
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="userCertOldFormatButton">
<widget class="QToolButton" name="userCertOldFormatButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>20</horstretch>
<verstretch>20</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/ledon1.png</normaloff>:/images/ledon1.png</iconset>
@ -228,7 +246,7 @@
<property name="checkable">
<bool>true</bool>
</property>
<property name="flat">
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
@ -287,18 +305,35 @@
</spacer>
</item>
<item>
<widget class="QLabel" name="friendCertCleanLabel">
<widget class="QToolButton" name="userCertPasteButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>20</horstretch>
<verstretch>20</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Paste Cert of your friend from Clipboard</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/copyrslink.png</normaloff>:/images/copyrslink.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="friendCertCleanLabel">
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/accepted16.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>

View File

@ -2351,6 +2351,10 @@ even if you don&apos;t make friends.</source>
<source>Added with certificate from %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Paste Cert of your friend from Clipboard</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ConnectProgressDialog</name>