added for Network menu Create new Profile action to can generate more Profiles without need to run Login Window.

disabled from Profile Generator Dialog not used the optional Cert loading sections.
fixed startdialogs layout

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1493 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2009-08-04 23:37:01 +00:00
parent 2bf94b909a
commit 01935af39b
7 changed files with 532 additions and 560 deletions

View file

@ -32,7 +32,6 @@
#define DATETIME_FMT "MMM dd hh:mm:ss" #define DATETIME_FMT "MMM dd hh:mm:ss"
/** Default constructor */ /** Default constructor */
GenCertDialog::GenCertDialog(QWidget *parent, Qt::WFlags flags) GenCertDialog::GenCertDialog(QWidget *parent, Qt::WFlags flags)
: QDialog(parent, flags) : QDialog(parent, flags)
@ -44,8 +43,8 @@ GenCertDialog::GenCertDialog(QWidget *parent, Qt::WFlags flags)
connect(ui.genButton, SIGNAL(clicked()), this, SLOT(genPerson())); connect(ui.genButton, SIGNAL(clicked()), this, SLOT(genPerson()));
connect(ui.selectButton, SIGNAL(clicked()), this, SLOT(selectFriend())); //connect(ui.selectButton, SIGNAL(clicked()), this, SLOT(selectFriend()));
connect(ui.friendBox, SIGNAL(stateChanged(int)), this, SLOT(checkChanged(int))); //connect(ui.friendBox, SIGNAL(stateChanged(int)), this, SLOT(checkChanged(int)));
ui.genName->setFocus(Qt::OtherFocusReason); ui.genName->setFocus(Qt::OtherFocusReason);

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>GenCertDialog</class> <class>GenCertDialog</class>
<widget class="QDialog" name="GenCertDialog"> <widget class="QDialog" name="GenCertDialog">
@ -6,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>394</width> <width>394</width>
<height>457</height> <height>408</height>
</rect> </rect>
</property> </property>
<property name="palette"> <property name="palette">
@ -972,12 +973,12 @@
</palette> </palette>
</property> </property>
<property name="text"> <property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal;"> &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-size:16pt;">Generate a new profile&lt;/span>&lt;br />&lt;br />&lt;span style=" font-size:9pt;">Please fill in the information which will&lt;br />allow your RetroShare to connect to&lt;/span>&lt;/p> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:16pt;&quot;&gt;Generate a new profile&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot; font-size:9pt;&quot;&gt;Please fill in the information which will&lt;br /&gt;allow your RetroShare to connect to&lt;/span&gt;&lt;/p&gt;
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;">Friends.&lt;/p>&lt;/body>&lt;/html></string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;&quot;&gt;Friends.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
@ -1077,59 +1078,14 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item row="12" column="0" colspan="3" > <item row="12" column="2">
<widget class="QCheckBox" name="friendBox" >
<property name="text" >
<string>Load Trusted Certificate (Optional)</string>
</property>
</widget>
</item>
<item row="13" column="0" colspan="2" >
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="label_10" >
<property name="text" >
<string>Friend</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="genFriend" >
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2" >
<widget class="QPushButton" name="selectButton" >
<property name="text" >
<string>Select File</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="14" column="0" colspan="3" >
<widget class="Line" name="line_3" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="15" column="2" >
<widget class="QPushButton" name="genButton"> <widget class="QPushButton" name="genButton">
<property name="text"> <property name="text">
<string>Generate New Certificate</string> <string>Generate New Profil</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="15" column="0" colspan="2" > <item row="12" column="0" colspan="2">
<spacer> <spacer>
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -1173,7 +1129,7 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="2" > <item row="2" column="1" colspan="2">
<widget class="Line" name="line_6"> <widget class="Line" name="line_6">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -1196,10 +1152,9 @@ p, li { white-space: pre-wrap; }
</spacer> </spacer>
</item> </item>
</layout> </layout>
<zorder></zorder>
<zorder></zorder>
<zorder>loginLabel</zorder> <zorder>loginLabel</zorder>
<zorder></zorder>
<zorder></zorder>
<zorder></zorder>
</widget> </widget>
<tabstops> <tabstops>
<tabstop>genName</tabstop> <tabstop>genName</tabstop>
@ -1208,9 +1163,6 @@ p, li { white-space: pre-wrap; }
<tabstop>genOrg</tabstop> <tabstop>genOrg</tabstop>
<tabstop>genLoc</tabstop> <tabstop>genLoc</tabstop>
<tabstop>genCountry</tabstop> <tabstop>genCountry</tabstop>
<tabstop>friendBox</tabstop>
<tabstop>genFriend</tabstop>
<tabstop>selectButton</tabstop>
<tabstop>genButton</tabstop> <tabstop>genButton</tabstop>
</tabstops> </tabstops>
<resources> <resources>

View file

@ -29,6 +29,7 @@
#include "NetworkView.h" #include "NetworkView.h"
#include "TrustView.h" #include "TrustView.h"
#include "connect/ConnectDialog.h" #include "connect/ConnectDialog.h"
#include "GenCertDialog.h"
#include "rsiface/rsiface.h" #include "rsiface/rsiface.h"
#include "rsiface/rspeers.h" #include "rsiface/rspeers.h"
@ -141,6 +142,7 @@ NetworkDialog::NetworkDialog(QWidget *parent)
menu->addAction(ui.actionAddFriend); menu->addAction(ui.actionAddFriend);
//menu->addAction(ui.actionCopyKey); //menu->addAction(ui.actionCopyKey);
menu->addAction(ui.actionExportKey); menu->addAction(ui.actionExportKey);
menu->addAction(ui.actionCreate_New_Profile);
menu->addSeparator(); menu->addSeparator();
menu->addAction(ui.actionTabsright); menu->addAction(ui.actionTabsright);
menu->addAction(ui.actionTabswest); menu->addAction(ui.actionTabswest);
@ -702,6 +704,14 @@ void NetworkDialog::on_actionClearLog_triggered() {
ui.infoLog->clear(); ui.infoLog->clear();
} }
void NetworkDialog::on_actionCreate_New_Profile_activated()
{
static GenCertDialog *gencertdialog = new GenCertDialog();
gencertdialog->show();
}
void NetworkDialog::displayInfoLogMenu(const QPoint& pos) { void NetworkDialog::displayInfoLogMenu(const QPoint& pos) {
// Log Menu // Log Menu
QMenu myLogMenu(this); QMenu myLogMenu(this);

View file

@ -73,6 +73,9 @@ private slots:
//void on_actionCopyKey_activated(); //void on_actionCopyKey_activated();
void on_actionExportKey_activated(); void on_actionExportKey_activated();
void on_actionCreate_New_Profile_activated();
void on_actionClearLog_triggered(); void on_actionClearLog_triggered();
void displayInfoLogMenu(const QPoint& pos); void displayInfoLogMenu(const QPoint& pos);

View file

@ -554,6 +554,14 @@ p, li { white-space: pre-wrap; }
<string>Export My Key</string> <string>Export My Key</string>
</property> </property>
</action> </action>
<action name="actionCreate_New_Profile">
<property name="text">
<string>Create New Profile</string>
</property>
<property name="toolTip">
<string>Create a new Profile</string>
</property>
</action>
</widget> </widget>
<resources> <resources>
<include location="images.qrc"/> <include location="images.qrc"/>

View file

@ -240,8 +240,8 @@ void StartDialog::createnewaccount()
//gencertdialog->show(); //gencertdialog->show();
QMessageBox::StandardButton sb = QMessageBox::question ( NULL, QMessageBox::StandardButton sb = QMessageBox::question ( NULL,
"Create New Certificate", "Create a New Profil",
"This will delete your existing Certificate\n Are you sure you want to continue", "This will generate a new Profile\n Are you sure you want to continue",
(QMessageBox::Ok | QMessageBox::No)); (QMessageBox::Ok | QMessageBox::No));
if (sb == QMessageBox::Ok) if (sb == QMessageBox::Ok)

View file

@ -600,10 +600,10 @@ p, li { white-space: pre-wrap; }
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;You can login with your Default&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt;&quot;&gt;You can login with your&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;RetroShare profile.&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt;&quot;&gt;RetroShare profile.&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;You have a Profile?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt;&quot;&gt;You want a new Profile?&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>