mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-27 15:57:08 -05:00
Removed buttons to create a new identity
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7789 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
810a5cacc0
commit
417f66a566
@ -258,38 +258,6 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="GxsIdChooser" name="idChooser"/>
|
<widget class="GxsIdChooser" name="idChooser"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="toolButton_NewId">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Create new Identity</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>New ID</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images.qrc">
|
|
||||||
<normaloff>:/images/identity/identity_create_32.png</normaloff>:/images/identity/identity_create_32.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
#include "ui_PostedCreatePostDialog.h"
|
#include "ui_PostedCreatePostDialog.h"
|
||||||
|
|
||||||
#include "util/TokenQueue.h"
|
#include "util/TokenQueue.h"
|
||||||
#include "gui/Identity/IdDialog.h"
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
@ -39,7 +38,6 @@ PostedCreatePostDialog::PostedCreatePostDialog(TokenQueue* tokenQ, RsPosted *pos
|
|||||||
|
|
||||||
connect(ui->submitButton, SIGNAL(clicked()), this, SLOT(createPost()));
|
connect(ui->submitButton, SIGNAL(clicked()), this, SLOT(createPost()));
|
||||||
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(close()));
|
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(close()));
|
||||||
connect(ui->toolButton_NewId, SIGNAL(clicked()), this, SLOT(createNewGxsId()));
|
|
||||||
|
|
||||||
ui->headerFrame->setHeaderImage(QPixmap(":/images/posted_64.png"));
|
ui->headerFrame->setHeaderImage(QPixmap(":/images/posted_64.png"));
|
||||||
ui->headerFrame->setHeaderText(tr("Submit a new Post"));
|
ui->headerFrame->setHeaderText(tr("Submit a new Post"));
|
||||||
@ -58,20 +56,20 @@ PostedCreatePostDialog::~PostedCreatePostDialog()
|
|||||||
void PostedCreatePostDialog::createPost()
|
void PostedCreatePostDialog::createPost()
|
||||||
{
|
{
|
||||||
RsGxsId authorId;
|
RsGxsId authorId;
|
||||||
switch (ui->idChooser->getChosenId(authorId)) {
|
switch (ui->idChooser->getChosenId(authorId)) {
|
||||||
case GxsIdChooser::KnowId:
|
case GxsIdChooser::KnowId:
|
||||||
case GxsIdChooser::UnKnowId:
|
case GxsIdChooser::UnKnowId:
|
||||||
break;
|
break;
|
||||||
case GxsIdChooser::NoId:
|
case GxsIdChooser::NoId:
|
||||||
case GxsIdChooser::None:
|
case GxsIdChooser::None:
|
||||||
default:
|
default:
|
||||||
std::cerr << "PostedCreatePostDialog::createPost() ERROR GETTING AuthorId!, Post Failed";
|
std::cerr << "PostedCreatePostDialog::createPost() ERROR GETTING AuthorId!, Post Failed";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
QMessageBox::warning(this, tr("RetroShare"),tr("Please create or choose a Signing Id first"), QMessageBox::Ok, QMessageBox::Ok);
|
QMessageBox::warning(this, tr("RetroShare"),tr("Please create or choose a Signing Id first"), QMessageBox::Ok, QMessageBox::Ok);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}//switch (ui->idChooser->getChosenId(authorId))
|
}//switch (ui->idChooser->getChosenId(authorId))
|
||||||
|
|
||||||
RsPostedPost post;
|
RsPostedPost post;
|
||||||
post.mMeta.mGroupId = mGrpId;
|
post.mMeta.mGroupId = mGrpId;
|
||||||
@ -84,7 +82,7 @@ void PostedCreatePostDialog::createPost()
|
|||||||
/* error message */
|
/* error message */
|
||||||
QMessageBox::warning(this, "RetroShare", tr("Please add a Title"), QMessageBox::Ok, QMessageBox::Ok);
|
QMessageBox::warning(this, "RetroShare", tr("Please add a Title"), QMessageBox::Ok, QMessageBox::Ok);
|
||||||
return; //Don't add a empty title!!
|
return; //Don't add a empty title!!
|
||||||
}//if(ui->titleEdit->text().isEmpty())
|
}//if(ui->titleEdit->text().isEmpty())
|
||||||
|
|
||||||
uint32_t token;
|
uint32_t token;
|
||||||
mPosted->createPost(token, post);
|
mPosted->createPost(token, post);
|
||||||
@ -92,11 +90,3 @@ void PostedCreatePostDialog::createPost()
|
|||||||
|
|
||||||
accept();
|
accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PostedCreatePostDialog::createNewGxsId()
|
|
||||||
{
|
|
||||||
IdEditDialog dlg(this);
|
|
||||||
dlg.setupNewId(false);
|
|
||||||
dlg.exec();
|
|
||||||
ui->idChooser->setDefaultId(dlg.getLastIdName());
|
|
||||||
}
|
|
||||||
|
@ -47,7 +47,6 @@ public:
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void createPost();
|
void createPost();
|
||||||
void createNewGxsId();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString mLink;
|
QString mLink;
|
||||||
|
@ -171,38 +171,6 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="GxsIdChooser" name="idChooser"/>
|
<widget class="GxsIdChooser" name="idChooser"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="toolButton_NewId">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Create new Identity</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>New ID</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images.qrc">
|
|
||||||
<normaloff>:/images/identity/identity_create_32.png</normaloff>:/images/identity/identity_create_32.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="3">
|
<item row="3" column="0" colspan="3">
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
|
|
||||||
#include "PostedCreatePostDialog.h"
|
#include "PostedCreatePostDialog.h"
|
||||||
#include "PostedItem.h"
|
#include "PostedItem.h"
|
||||||
#include "gui/Identity/IdDialog.h"
|
|
||||||
#include "gui/common/UIStateHelper.h"
|
#include "gui/common/UIStateHelper.h"
|
||||||
|
|
||||||
#include <retroshare/rsposted.h>
|
#include <retroshare/rsposted.h>
|
||||||
@ -63,8 +62,6 @@ PostedListWidget::PostedListWidget(const RsGxsGroupId &postedId, QWidget *parent
|
|||||||
connect(ui->prevButton, SIGNAL(clicked()), this, SLOT(showPrev()));
|
connect(ui->prevButton, SIGNAL(clicked()), this, SLOT(showPrev()));
|
||||||
connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool)));
|
connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool)));
|
||||||
|
|
||||||
connect(ui->toolButton_NewId, SIGNAL(clicked()), this, SLOT(createNewGxsId()));
|
|
||||||
|
|
||||||
// default sort method.
|
// default sort method.
|
||||||
mSortMethod = RsPosted::HotRankType;
|
mSortMethod = RsPosted::HotRankType;
|
||||||
mLastSortMethod = RsPosted::TopRankType; // to be different.
|
mLastSortMethod = RsPosted::TopRankType; // to be different.
|
||||||
@ -273,14 +270,6 @@ void PostedListWidget::submitVote(const RsGxsGrpMsgIdPair &msgId, bool up)
|
|||||||
mTokenQueue->queueRequest(token, TOKENREQ_MSGINFO, RS_TOKREQ_ANSTYPE_ACK, mTokenTypeVote);
|
mTokenQueue->queueRequest(token, TOKENREQ_MSGINFO, RS_TOKREQ_ANSTYPE_ACK, mTokenTypeVote);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PostedListWidget::createNewGxsId()
|
|
||||||
{
|
|
||||||
IdEditDialog dlg(this);
|
|
||||||
dlg.setupNewId(false);
|
|
||||||
dlg.exec();
|
|
||||||
ui->idChooser->setDefaultId(dlg.getLastIdName());
|
|
||||||
}
|
|
||||||
|
|
||||||
void PostedListWidget::subscribeGroup(bool subscribe)
|
void PostedListWidget::subscribeGroup(bool subscribe)
|
||||||
{
|
{
|
||||||
if (groupId().isNull()) {
|
if (groupId().isNull()) {
|
||||||
|
@ -67,7 +67,6 @@ protected:
|
|||||||
virtual bool navigatePostItem(const RsGxsMessageId& msgId);
|
virtual bool navigatePostItem(const RsGxsMessageId& msgId);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void createNewGxsId();
|
|
||||||
void newPost();
|
void newPost();
|
||||||
|
|
||||||
void submitVote(const RsGxsGrpMsgIdPair& msgId, bool up);
|
void submitVote(const RsGxsGrpMsgIdPair& msgId, bool up);
|
||||||
|
@ -175,38 +175,6 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="GxsIdChooser" name="idChooser"/>
|
<widget class="GxsIdChooser" name="idChooser"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="toolButton_NewId">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Create new Identity</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>New ID</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images.qrc">
|
|
||||||
<normaloff>:/images/identity/identity_create_32.png</normaloff>:/images/identity/identity_create_32.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include "gui/gxs/GxsCommentDialog.h"
|
#include "gui/gxs/GxsCommentDialog.h"
|
||||||
#include "ui_GxsCommentDialog.h"
|
#include "ui_GxsCommentDialog.h"
|
||||||
#include "gui/Identity/IdDialog.h"
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@ -48,7 +47,6 @@ GxsCommentDialog::GxsCommentDialog(QWidget *parent, RsTokenService *token_servic
|
|||||||
|
|
||||||
connect(ui->refreshButton, SIGNAL(clicked()), this, SLOT(refresh()));
|
connect(ui->refreshButton, SIGNAL(clicked()), this, SLOT(refresh()));
|
||||||
connect(ui->idChooser, SIGNAL(currentIndexChanged( int )), this, SLOT(voterSelectionChanged( int )));
|
connect(ui->idChooser, SIGNAL(currentIndexChanged( int )), this, SLOT(voterSelectionChanged( int )));
|
||||||
connect(ui->toolButton_NewId, SIGNAL(clicked()), this, SLOT(createNewGxsId()));
|
|
||||||
|
|
||||||
/* force voterId through - first time */
|
/* force voterId through - first time */
|
||||||
voterSelectionChanged( 0 );
|
voterSelectionChanged( 0 );
|
||||||
@ -143,11 +141,3 @@ void GxsCommentDialog::setCommentHeader(QWidget *header)
|
|||||||
ui->notesBrowser->setPlainText(QString::fromStdString(mCurrentPost.mNotes));
|
ui->notesBrowser->setPlainText(QString::fromStdString(mCurrentPost.mNotes));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void GxsCommentDialog::createNewGxsId()
|
|
||||||
{
|
|
||||||
IdEditDialog dlg(this);
|
|
||||||
dlg.setupNewId(false);
|
|
||||||
dlg.exec();
|
|
||||||
ui->idChooser->setDefaultId(dlg.getLastIdName());
|
|
||||||
}
|
|
||||||
|
@ -47,7 +47,6 @@ public:
|
|||||||
private slots:
|
private slots:
|
||||||
void refresh();
|
void refresh();
|
||||||
void voterSelectionChanged( int index );
|
void voterSelectionChanged( int index );
|
||||||
void createNewGxsId();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RsGxsGroupId mGrpId;
|
RsGxsGroupId mGrpId;
|
||||||
|
@ -102,38 +102,6 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="GxsIdChooser" name="idChooser"/>
|
<widget class="GxsIdChooser" name="idChooser"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="toolButton_NewId">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Create new Identity</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>New ID</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset>
|
|
||||||
<normaloff>:/images/identity/identity_create_32.png</normaloff>:/images/identity/identity_create_32.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="refreshButton">
|
<widget class="QPushButton" name="refreshButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
|
|
||||||
#include "GxsCreateCommentDialog.h"
|
#include "GxsCreateCommentDialog.h"
|
||||||
#include "ui_GxsCreateCommentDialog.h"
|
#include "ui_GxsCreateCommentDialog.h"
|
||||||
#include "gui/Identity/IdDialog.h"
|
|
||||||
|
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -36,7 +35,6 @@ GxsCreateCommentDialog::GxsCreateCommentDialog(TokenQueue *tokQ, RsGxsCommentSer
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(createComment()));
|
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(createComment()));
|
||||||
connect(ui->toolButton_NewId, SIGNAL(clicked()), this, SLOT(createNewGxsId()));
|
|
||||||
|
|
||||||
/* fill in the available OwnIds for signing */
|
/* fill in the available OwnIds for signing */
|
||||||
ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId());
|
ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId());
|
||||||
@ -60,17 +58,17 @@ void GxsCreateCommentDialog::createComment()
|
|||||||
|
|
||||||
|
|
||||||
RsGxsId authorId;
|
RsGxsId authorId;
|
||||||
switch (ui->idChooser->getChosenId(authorId)) {
|
switch (ui->idChooser->getChosenId(authorId)) {
|
||||||
case GxsIdChooser::KnowId:
|
case GxsIdChooser::KnowId:
|
||||||
case GxsIdChooser::UnKnowId:
|
case GxsIdChooser::UnKnowId:
|
||||||
comment.mMeta.mAuthorId = authorId;
|
comment.mMeta.mAuthorId = authorId;
|
||||||
std::cerr << "AuthorId : " << comment.mMeta.mAuthorId << std::endl;
|
std::cerr << "AuthorId : " << comment.mMeta.mAuthorId << std::endl;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case GxsIdChooser::NoId:
|
case GxsIdChooser::NoId:
|
||||||
case GxsIdChooser::None:
|
case GxsIdChooser::None:
|
||||||
default:
|
default:
|
||||||
std::cerr << "GxsCreateCommentDialog::createComment() ERROR GETTING AuthorId!";
|
std::cerr << "GxsCreateCommentDialog::createComment() ERROR GETTING AuthorId!";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
@ -78,9 +76,9 @@ void GxsCreateCommentDialog::createComment()
|
|||||||
tr("You need to create an Identity\n"
|
tr("You need to create an Identity\n"
|
||||||
"before you can comment"),
|
"before you can comment"),
|
||||||
QMessageBox::Ok);
|
QMessageBox::Ok);
|
||||||
Q_UNUSED(ret)
|
Q_UNUSED(ret)
|
||||||
return;
|
return;
|
||||||
}//switch (ui->idChooser->getChosenId(authorId))
|
}//switch (ui->idChooser->getChosenId(authorId))
|
||||||
|
|
||||||
uint32_t token;
|
uint32_t token;
|
||||||
mCommentService->createComment(token, comment);
|
mCommentService->createComment(token, comment);
|
||||||
@ -88,14 +86,6 @@ void GxsCreateCommentDialog::createComment()
|
|||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GxsCreateCommentDialog::createNewGxsId()
|
|
||||||
{
|
|
||||||
IdEditDialog dlg(this);
|
|
||||||
dlg.setupNewId(false);
|
|
||||||
dlg.exec();
|
|
||||||
ui->idChooser->setDefaultId(dlg.getLastIdName());
|
|
||||||
}
|
|
||||||
|
|
||||||
GxsCreateCommentDialog::~GxsCreateCommentDialog()
|
GxsCreateCommentDialog::~GxsCreateCommentDialog()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
|
@ -38,13 +38,11 @@ class GxsCreateCommentDialog : public QDialog
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit GxsCreateCommentDialog(TokenQueue* tokQ, RsGxsCommentService *service,
|
explicit GxsCreateCommentDialog(TokenQueue* tokQ, RsGxsCommentService *service,
|
||||||
const RsGxsGrpMsgIdPair& parentId, const RsGxsMessageId& threadId, QWidget *parent = 0);
|
const RsGxsGrpMsgIdPair& parentId, const RsGxsMessageId& threadId, QWidget *parent = 0);
|
||||||
~GxsCreateCommentDialog();
|
~GxsCreateCommentDialog();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
void createComment();
|
void createComment();
|
||||||
void createNewGxsId();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::GxsCreateCommentDialog *ui;
|
Ui::GxsCreateCommentDialog *ui;
|
||||||
|
@ -26,65 +26,37 @@ p, li { white-space: pre-wrap; }
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item row="1" column="0" colspan="6">
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<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>
|
||||||
|
<widget class="QLabel" name="subjectLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Signed by</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="GxsIdChooser" name="idChooser"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
<widget class="QTextEdit" name="commentTextEdit"/>
|
<widget class="QTextEdit" name="commentTextEdit"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<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="2">
|
|
||||||
<widget class="QLabel" name="subjectLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Signed by</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3">
|
|
||||||
<widget class="GxsIdChooser" name="idChooser"/>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="4">
|
|
||||||
<widget class="QToolButton" name="toolButton_NewId">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Create new Identity</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>New ID</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images.qrc">
|
|
||||||
<normaloff>:/images/identity/identity_create_32.png</normaloff>:/images/identity/identity_create_32.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
#include "util/misc.h"
|
#include "util/misc.h"
|
||||||
#include "GxsGroupDialog.h"
|
#include "GxsGroupDialog.h"
|
||||||
#include "gui/common/PeerDefs.h"
|
#include "gui/common/PeerDefs.h"
|
||||||
#include "gui/Identity/IdDialog.h"
|
|
||||||
#include "retroshare/rsgxsflags.h"
|
#include "retroshare/rsgxsflags.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@ -93,8 +92,6 @@ void GxsGroupDialog::init()
|
|||||||
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(cancelDialog()));
|
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(cancelDialog()));
|
||||||
connect(ui.pubKeyShare_cb, SIGNAL(clicked()), this, SLOT(setShareList()));
|
connect(ui.pubKeyShare_cb, SIGNAL(clicked()), this, SLOT(setShareList()));
|
||||||
|
|
||||||
connect(ui.toolButton_NewId, SIGNAL(clicked()), this, SLOT(createNewGxsId()));
|
|
||||||
|
|
||||||
connect(ui.groupLogo, SIGNAL(clicked() ), this , SLOT(addGroupLogo()));
|
connect(ui.groupLogo, SIGNAL(clicked() ), this , SLOT(addGroupLogo()));
|
||||||
connect(ui.addLogoButton, SIGNAL(clicked() ), this , SLOT(addGroupLogo()));
|
connect(ui.addLogoButton, SIGNAL(clicked() ), this , SLOT(addGroupLogo()));
|
||||||
|
|
||||||
@ -189,14 +186,6 @@ void GxsGroupDialog::initMode()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GxsGroupDialog::createNewGxsId()
|
|
||||||
{
|
|
||||||
IdEditDialog dlg(this);
|
|
||||||
dlg.setupNewId(false);
|
|
||||||
dlg.exec();
|
|
||||||
ui.idChooser->setDefaultId(dlg.getLastIdName());
|
|
||||||
}
|
|
||||||
|
|
||||||
void GxsGroupDialog::clearForm()
|
void GxsGroupDialog::clearForm()
|
||||||
{
|
{
|
||||||
ui.groupName->clear();
|
ui.groupName->clear();
|
||||||
|
@ -154,7 +154,6 @@ private:
|
|||||||
void newGroup();
|
void newGroup();
|
||||||
void init();
|
void init();
|
||||||
void initMode();
|
void initMode();
|
||||||
void createNewGxsId();
|
|
||||||
|
|
||||||
// Functions that can be overloaded for specific stuff.
|
// Functions that can be overloaded for specific stuff.
|
||||||
|
|
||||||
|
@ -145,38 +145,6 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="GxsIdChooser" name="idChooser"/>
|
<widget class="GxsIdChooser" name="idChooser"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="toolButton_NewId">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Create new Identity</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>New ID</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images.qrc">
|
|
||||||
<normaloff>:/images/identity/identity_create_32.png</normaloff>:/images/identity/identity_create_32.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="pubKeyShare_cb">
|
<widget class="QCheckBox" name="pubKeyShare_cb">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
@ -53,6 +53,9 @@ GxsIdChooser::GxsIdChooser(QWidget *parent)
|
|||||||
mBase = new RsGxsUpdateBroadcastBase(rsIdentity, this);
|
mBase = new RsGxsUpdateBroadcastBase(rsIdentity, this);
|
||||||
connect(mBase, SIGNAL(fillDisplay(bool)), this, SLOT(fillDisplay(bool)));
|
connect(mBase, SIGNAL(fillDisplay(bool)), this, SLOT(fillDisplay(bool)));
|
||||||
|
|
||||||
|
/* Initialize ui */
|
||||||
|
setSizeAdjustPolicy(QComboBox::AdjustToContents);
|
||||||
|
|
||||||
mIdQueue = NULL;
|
mIdQueue = NULL;
|
||||||
mFirstLoad = true;
|
mFirstLoad = true;
|
||||||
|
|
||||||
@ -172,15 +175,6 @@ void GxsIdChooser::loadPrivateIds(uint32_t token)
|
|||||||
setItemData(count() - 1, QString("%1_%2").arg(TYPE_NO_ID).arg(str), ROLE_SORT);
|
setItemData(count() - 1, QString("%1_%2").arg(TYPE_NO_ID).arg(str), ROLE_SORT);
|
||||||
setItemData(count() - 1, TYPE_NO_ID, ROLE_TYPE);
|
setItemData(count() - 1, TYPE_NO_ID, ROLE_TYPE);
|
||||||
}
|
}
|
||||||
if (!(mFlags & IDCHOOSER_NO_CREATE)) {
|
|
||||||
/* add Create Identity option */
|
|
||||||
QString str = tr("Create new Identity");
|
|
||||||
QString id = "";
|
|
||||||
|
|
||||||
addItem(str, id);
|
|
||||||
setItemData(count() - 1, QString("%1_%2").arg(TYPE_CREATE_ID).arg(str), ROLE_SORT);
|
|
||||||
setItemData(count() - 1, TYPE_CREATE_ID, ROLE_TYPE);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
for (int idx = 0; idx < count(); ++idx) {
|
for (int idx = 0; idx < count(); ++idx) {
|
||||||
QVariant type = itemData(idx, ROLE_TYPE);
|
QVariant type = itemData(idx, ROLE_TYPE);
|
||||||
@ -203,9 +197,8 @@ void GxsIdChooser::loadPrivateIds(uint32_t token)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mFirstLoad = false;
|
|
||||||
|
|
||||||
if (ids.empty()) {
|
if (ids.empty()) {
|
||||||
|
mFirstLoad = false;
|
||||||
std::cerr << "GxsIdChooser::loadPrivateIds() ERROR no ids";
|
std::cerr << "GxsIdChooser::loadPrivateIds() ERROR no ids";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
return;
|
return;
|
||||||
@ -216,6 +209,20 @@ void GxsIdChooser::loadPrivateIds(uint32_t token)
|
|||||||
GxsIdDetails::process(*it, loadPrivateIdsCallback, this);
|
GxsIdDetails::process(*it, loadPrivateIdsCallback, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mFirstLoad) {
|
||||||
|
if (!(mFlags & IDCHOOSER_NO_CREATE)) {
|
||||||
|
/* add Create Identity option */
|
||||||
|
QString str = tr("Create new Identity");
|
||||||
|
QString id = "";
|
||||||
|
|
||||||
|
addItem(str, id);
|
||||||
|
setItemData(count() - 1, QString("%1_%2").arg(TYPE_CREATE_ID).arg(str), ROLE_SORT);
|
||||||
|
setItemData(count() - 1, TYPE_CREATE_ID, ROLE_TYPE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mFirstLoad = false;
|
||||||
|
|
||||||
setDefaultItem();
|
setDefaultItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,8 +233,10 @@ void GxsIdChooser::setDefaultItem()
|
|||||||
if ((mFlags & IDCHOOSER_ANON_DEFAULT) && !(mFlags & IDCHOOSER_ID_REQUIRED)) {
|
if ((mFlags & IDCHOOSER_ANON_DEFAULT) && !(mFlags & IDCHOOSER_ID_REQUIRED)) {
|
||||||
def = findData(TYPE_NO_ID, ROLE_TYPE);
|
def = findData(TYPE_NO_ID, ROLE_TYPE);
|
||||||
} else {
|
} else {
|
||||||
QString id = QString::fromStdString(mDefaultId.toStdString());
|
if (!mDefaultId.isNull()) {
|
||||||
def = findData(id);
|
QString id = QString::fromStdString(mDefaultId.toStdString());
|
||||||
|
def = findData(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (def >= 0) {
|
if (def >= 0) {
|
||||||
@ -293,7 +302,7 @@ void GxsIdChooser::indexActivated(int index)
|
|||||||
IdEditDialog dlg(this);
|
IdEditDialog dlg(this);
|
||||||
dlg.setupNewId(false);
|
dlg.setupNewId(false);
|
||||||
dlg.exec();
|
dlg.exec();
|
||||||
// ui.idChooser->setDefaultId(dlg.getLastIdName());
|
setDefaultId(dlg.getLastIdName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
#include "gui/RetroShareLink.h"
|
#include "gui/RetroShareLink.h"
|
||||||
#include "gui/common/Emoticons.h"
|
#include "gui/common/Emoticons.h"
|
||||||
#include "gui/common/UIStateHelper.h"
|
#include "gui/common/UIStateHelper.h"
|
||||||
#include "gui/Identity/IdDialog.h"
|
|
||||||
|
|
||||||
#include "util/HandleRichText.h"
|
#include "util/HandleRichText.h"
|
||||||
#include "util/misc.h"
|
#include "util/misc.h"
|
||||||
@ -90,7 +89,6 @@ CreateGxsForumMsg::CreateGxsForumMsg(const RsGxsGroupId &fId, const RsGxsMessage
|
|||||||
connect(ui.emoticonButton, SIGNAL(clicked()), this, SLOT(smileyWidgetForums()));
|
connect(ui.emoticonButton, SIGNAL(clicked()), this, SLOT(smileyWidgetForums()));
|
||||||
connect(ui.attachFileButton, SIGNAL(clicked()), this, SLOT(addFile()));
|
connect(ui.attachFileButton, SIGNAL(clicked()), this, SLOT(addFile()));
|
||||||
connect(ui.generateCheckBox, SIGNAL(toggled(bool)), ui.generateSpinBox, SLOT(setEnabled(bool)));
|
connect(ui.generateCheckBox, SIGNAL(toggled(bool)), ui.generateSpinBox, SLOT(setEnabled(bool)));
|
||||||
connect(ui.toolButton_NewId, SIGNAL(clicked()), this, SLOT(createNewGxsId()));
|
|
||||||
|
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
ui.hashBox->setDropWidget(this);
|
ui.hashBox->setDropWidget(this);
|
||||||
@ -337,14 +335,6 @@ void CreateGxsForumMsg::createMsg()
|
|||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateGxsForumMsg::createNewGxsId()
|
|
||||||
{
|
|
||||||
IdEditDialog dlg(this);
|
|
||||||
dlg.setupNewId(false);
|
|
||||||
dlg.exec();
|
|
||||||
ui.idChooser->setDefaultId(dlg.getLastIdName());
|
|
||||||
}
|
|
||||||
|
|
||||||
void CreateGxsForumMsg::closeEvent (QCloseEvent * /*event*/)
|
void CreateGxsForumMsg::closeEvent (QCloseEvent * /*event*/)
|
||||||
{
|
{
|
||||||
Settings->saveWidgetInformation(this);
|
Settings->saveWidgetInformation(this);
|
||||||
|
@ -45,7 +45,6 @@ private slots:
|
|||||||
void fileHashingFinished(QList<HashedFile> hashedFiles);
|
void fileHashingFinished(QList<HashedFile> hashedFiles);
|
||||||
/* actions to take.... */
|
/* actions to take.... */
|
||||||
void createMsg();
|
void createMsg();
|
||||||
void createNewGxsId();
|
|
||||||
|
|
||||||
void smileyWidgetForums();
|
void smileyWidgetForums();
|
||||||
void addSmileys();
|
void addSmileys();
|
||||||
|
@ -185,46 +185,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="GxsIdChooser" name="idChooser">
|
<widget class="GxsIdChooser" name="idChooser"/>
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="toolButton_NewId">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Create new Identity</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>New ID</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images.qrc">
|
|
||||||
<normaloff>:/images/identity/identity_create_32.png</normaloff>:/images/identity/identity_create_32.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>24</width>
|
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user