mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-15 09:27:09 -05:00
show new identity dialog when creating a forum post and no identities exist
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8334 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0eddd419f0
commit
da722292f6
@ -33,6 +33,7 @@
|
|||||||
#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/IdEditDialog.h"
|
||||||
|
|
||||||
#include "util/HandleRichText.h"
|
#include "util/HandleRichText.h"
|
||||||
#include "util/misc.h"
|
#include "util/misc.h"
|
||||||
@ -294,12 +295,26 @@ void CreateGxsForumMsg::createMsg()
|
|||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case GxsIdChooser::NoId:
|
|
||||||
case GxsIdChooser::None:
|
case GxsIdChooser::None:
|
||||||
|
{
|
||||||
|
// This is ONLY for the case where no id exists yet
|
||||||
|
// If an id exists, the chooser would not return None
|
||||||
|
IdEditDialog dlg(this);
|
||||||
|
dlg.setupNewId(false);
|
||||||
|
dlg.exec();
|
||||||
|
// fetch new id, we will then see if the identity creation was successful
|
||||||
|
std::list<RsGxsId> own_ids;
|
||||||
|
if(!rsIdentity->getOwnIds(own_ids) || own_ids.size() != 1)
|
||||||
|
return;
|
||||||
|
// we have only a single id, so we can use the first one
|
||||||
|
authorId = own_ids.front();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case GxsIdChooser::NoId:
|
||||||
default:
|
default:
|
||||||
std::cerr << "CreateGxsForumMsg::createMsg() ERROR GETTING AuthorId!";
|
std::cerr << "CreateGxsForumMsg::createMsg() ERROR GETTING AuthorId!";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
QMessageBox::warning(this, tr("RetroShare"),tr("Please choose Signing Id"), QMessageBox::Ok, QMessageBox::Ok);
|
QMessageBox::warning(this, tr("RetroShare"),tr("Congrats, you found a bug! ")+QString(__FILE__)+":"+QString(__LINE__), QMessageBox::Ok, QMessageBox::Ok);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}//switch (ui.idChooser->getChosenId(authorId))
|
}//switch (ui.idChooser->getChosenId(authorId))
|
||||||
|
Loading…
Reference in New Issue
Block a user