mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
moved passphrase box into start dialog, and removed blank logo, replaced it by RS splash logo
This commit is contained in:
parent
84c81588bb
commit
de0f8b9595
@ -19,11 +19,13 @@
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
#include <rshare.h>
|
||||
#include <retroshare/rsinit.h>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "rshare.h"
|
||||
#include "retroshare/rsinit.h"
|
||||
#include "StartDialog.h"
|
||||
#include "LogoBar.h"
|
||||
#include <QMessageBox>
|
||||
#include "retroshare/rsnotify.h"
|
||||
#include "settings/rsharesettings.h"
|
||||
|
||||
#include <iostream>
|
||||
@ -43,10 +45,6 @@ StartDialog::StartDialog(QWidget *parent)
|
||||
|
||||
Settings->loadWidgetInformation(this);
|
||||
|
||||
ui.loadButton->setFocus();
|
||||
|
||||
connect(ui.loadButton, SIGNAL(clicked()), this, SLOT(loadPerson()));
|
||||
|
||||
/* get all available pgp private certificates....
|
||||
* mark last one as default.
|
||||
*/
|
||||
@ -75,12 +73,21 @@ StartDialog::StartDialog(QWidget *parent)
|
||||
}
|
||||
}
|
||||
|
||||
QObject::connect(ui.loadName,SIGNAL(currentIndexChanged(int)),this,SLOT(updateSelectedProfile(int))) ;
|
||||
QObject::connect(ui.password_input,SIGNAL(returnPressed()),this,SLOT(loadPerson())) ;
|
||||
|
||||
if (pidx > 0)
|
||||
{
|
||||
ui.loadName->setCurrentIndex(pidx);
|
||||
}
|
||||
}
|
||||
|
||||
void StartDialog::updateSelectedProfile(int)
|
||||
{
|
||||
ui.password_input->clear();
|
||||
ui.password_input->setFocus();
|
||||
}
|
||||
|
||||
void StartDialog::closeEvent (QCloseEvent * event)
|
||||
{
|
||||
Settings->saveWidgetInformation(this);
|
||||
@ -101,18 +108,22 @@ void StartDialog::loadPerson()
|
||||
QVariant data = ui.loadName->itemData(pgpidx);
|
||||
RsPeerId accountId = RsPeerId((data.toString()).toStdString());
|
||||
|
||||
if (Rshare::loadCertificate(accountId, ui.autologin_checkbox->isChecked())) {
|
||||
// Cache the passphrase, so that it is not asked again.
|
||||
|
||||
rsNotify->cachePgpPassphrase(ui.password_input->text().toUtf8().constData()) ;
|
||||
|
||||
bool res = Rshare::loadCertificate(accountId, ui.autologin_checkbox->isChecked()) ;
|
||||
|
||||
rsNotify->clearPgpPassphrase();
|
||||
|
||||
if(res)
|
||||
accept();
|
||||
}
|
||||
}
|
||||
|
||||
void StartDialog::on_labelProfile_linkActivated(QString /*link*/)
|
||||
{
|
||||
// if ((QMessageBox::question(this, tr("Create a New Profile"),tr("This will generate a new Profile\n Are you sure you want to continue?"),QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes))== QMessageBox::Yes)
|
||||
// {
|
||||
reqNewCert = true;
|
||||
accept();
|
||||
// }
|
||||
}
|
||||
|
||||
bool StartDialog::requestedNewCert()
|
||||
|
@ -39,6 +39,7 @@ protected:
|
||||
|
||||
private slots:
|
||||
void loadPerson();
|
||||
void updateSelectedProfile(int);
|
||||
|
||||
#ifdef RS_AUTOLOGIN
|
||||
/**
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>430</width>
|
||||
<height>552</height>
|
||||
<width>656</width>
|
||||
<height>645</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -42,76 +42,6 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="4">
|
||||
<layout class="QGridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QToolButton" name="toolButton">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolButton {
|
||||
border-image: url(:/images/avatar_background.png);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/user/personal64.png</normaloff>:/images/user/personal64.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
<height>96</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer>
|
||||
<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 row="1" column="0" colspan="4">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<spacer name="horizontalSpacer">
|
||||
@ -134,12 +64,6 @@
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
@ -183,7 +107,10 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Login</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="images.qrc">:/images/logo/logo_splash.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -202,7 +129,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="1" rowspan="2" colspan="2">
|
||||
<item row="2" column="1" rowspan="2" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
@ -220,13 +147,27 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Profile - Location</string>
|
||||
<string>Profile - Location:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="loadName"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Password:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="password_input">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="autologin_checkbox">
|
||||
<property name="text">
|
||||
@ -240,56 +181,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="4">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="loadButton">
|
||||
<property name="text">
|
||||
<string>Log In</string>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>61</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>71</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="6" column="1" colspan="2">
|
||||
<item row="4" column="1" colspan="2">
|
||||
<widget class="QLabel" name="labelProfile">
|
||||
<property name="toolTip">
|
||||
<string>Opens a dialog for creating a new profile or
|
||||
@ -305,7 +197,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="4">
|
||||
<item row="5" column="0" colspan="4">
|
||||
<widget class="LogoBar" name="callBarFrame">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@ -333,10 +225,6 @@ p, li { white-space: pre-wrap; }
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>loadButton</tabstop>
|
||||
<tabstop>toolButton</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="images.qrc"/>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user