mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-15 00:28:58 -05:00
Fixed online time in profile widget.
Fixed width of settings dialog. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6329 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
fea35e1e3c
commit
dd0ef691c5
6 changed files with 76 additions and 40 deletions
|
|
@ -26,6 +26,7 @@
|
|||
#include <QTextStream>
|
||||
#include <QTextCodec>
|
||||
|
||||
#include "rshare.h"
|
||||
#include "CryptoPage.h"
|
||||
#include "util/misc.h"
|
||||
#include "util/DateTime.h"
|
||||
|
|
@ -57,8 +58,9 @@ CryptoPage::CryptoPage(QWidget * parent, Qt::WFlags flags)
|
|||
#endif
|
||||
connect(ui.profile_Button,SIGNAL(clicked()), this, SLOT(profilemanager()));
|
||||
|
||||
ui.onlinesince->setText(DateTime::formatLongDateTime(QDateTime::currentDateTime()));
|
||||
ui.onlinesince->setText(DateTime::formatLongDateTime(Rshare::startupTime()));
|
||||
}
|
||||
|
||||
void CryptoPage::profilemanager()
|
||||
{
|
||||
ProfileManager profilemanager;
|
||||
|
|
@ -111,12 +113,7 @@ void
|
|||
CryptoPage::load()
|
||||
{
|
||||
/* Loads ouer default Puplickey */
|
||||
QFont font("Courier New",9,50,false) ;
|
||||
ui.certtextEdit->setFont(font) ;
|
||||
|
||||
ui.certtextEdit->setPlainText(QString::fromUtf8(rsPeers->GetRetroshareInvite(ui._includeSignatures_CB->isChecked(),ui._useOldFormat_CB->isChecked()).c_str()));
|
||||
ui.certtextEdit->setReadOnly(true);
|
||||
ui.certtextEdit->setMinimumHeight(200);
|
||||
ui.certplainTextEdit->setPlainText(QString::fromUtf8(rsPeers->GetRetroshareInvite(ui._includeSignatures_CB->isChecked(),ui._useOldFormat_CB->isChecked()).c_str()));
|
||||
}
|
||||
void
|
||||
CryptoPage::copyRSLink()
|
||||
|
|
@ -148,7 +145,7 @@ CryptoPage::copyPublicKey()
|
|||
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());
|
||||
clipboard->setText(ui.certplainTextEdit->toPlainText());
|
||||
}
|
||||
|
||||
bool CryptoPage::fileSave()
|
||||
|
|
@ -161,8 +158,7 @@ bool CryptoPage::fileSave()
|
|||
return false;
|
||||
QTextStream ts(&file);
|
||||
ts.setCodec(QTextCodec::codecForName("UTF-8"));
|
||||
ts << ui.certtextEdit->document()->toPlainText();
|
||||
ui.certtextEdit->document()->setModified(false);
|
||||
ts << ui.certplainTextEdit->document()->toPlainText();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -170,16 +166,8 @@ bool CryptoPage::fileSaveAs()
|
|||
{
|
||||
QString fn;
|
||||
if (misc::getSaveFileName(this, RshareSettings::LASTDIR_CERT, tr("Save as..."), tr("RetroShare Certificate (*.rsc );;All Files (*)"), fn)) {
|
||||
setCurrentFileName(fn);
|
||||
fileName = fn;
|
||||
return fileSave();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void CryptoPage::setCurrentFileName(const QString &fileName)
|
||||
{
|
||||
this->fileName = fileName;
|
||||
ui.certtextEdit->document()->setModified(false);
|
||||
|
||||
setWindowModified(false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,8 +52,6 @@ class CryptoPage : public ConfigPage
|
|||
bool fileSaveAs();
|
||||
|
||||
private:
|
||||
void setCurrentFileName(const QString &fileName);
|
||||
|
||||
QString fileName;
|
||||
|
||||
/** Qt Designer generated object */
|
||||
|
|
|
|||
|
|
@ -440,17 +440,60 @@
|
|||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTextEdit" name="certtextEdit">
|
||||
<widget class="QPlainTextEdit" name="certplainTextEdit">
|
||||
<property name="font">
|
||||
<font>
|
||||
<kerning>false</kerning>
|
||||
<family>Courier New</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="acceptRichText">
|
||||
<bool>false</bool>
|
||||
<property name="tabChangesFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="lineWrapMode">
|
||||
<enum>QPlainTextEdit::NoWrap</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="_includeSignatures_CB">
|
||||
<property name="text">
|
||||
<string>Include signatures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="_useOldFormat_CB">
|
||||
<property name="text">
|
||||
<string>Use old key format</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
|
|
@ -471,21 +514,17 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="_useOldFormat_CB">
|
||||
<property name="text">
|
||||
<string>Use old key format</string>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="_includeSignatures_CB">
|
||||
<property name="text">
|
||||
<string>Include signatures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue