mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-29 09:26:18 -05:00
using GxsIdChooser in message composition dialog
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7636 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c5e65486aa
commit
6488f5a9f4
@ -235,28 +235,28 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WindowFlags flags)
|
||||
|
||||
setupFormatActions();
|
||||
|
||||
std::list<RsGxsId> own_ids ;
|
||||
rsIdentity->getOwnIds(own_ids) ;
|
||||
|
||||
ui.respond_to_CB->addItem(tr("[no identity]"), QVariant(QString::fromStdString(RsGxsId().toStdString()))) ;
|
||||
|
||||
for(std::list<RsGxsId>::const_iterator it(own_ids.begin());it!=own_ids.end();++it)
|
||||
{
|
||||
RsIdentityDetails details ;
|
||||
rsIdentity->getIdDetails(*it,details) ;
|
||||
|
||||
std::cerr << "Adding identity: id=" << (*it) << ", name=" << details.mNickname << std::endl;
|
||||
|
||||
if(details.mNickname.empty()) // I don't know why, but that happens
|
||||
ui.respond_to_CB->addItem(QString::fromStdString((*it).toStdString()), QString::fromStdString((*it).toStdString())) ;
|
||||
else
|
||||
ui.respond_to_CB->addItem(QString::fromUtf8(details.mNickname.c_str()), QString::fromStdString((*it).toStdString())) ;
|
||||
}
|
||||
// std::list<RsGxsId> own_ids ;
|
||||
// rsIdentity->getOwnIds(own_ids) ;
|
||||
//
|
||||
// ui.respond_to_CB->addItem(tr("[no identity]"), QVariant(QString::fromStdString(RsGxsId().toStdString()))) ;
|
||||
//
|
||||
// for(std::list<RsGxsId>::const_iterator it(own_ids.begin());it!=own_ids.end();++it)
|
||||
// {
|
||||
// RsIdentityDetails details ;
|
||||
// rsIdentity->getIdDetails(*it,details) ;
|
||||
//
|
||||
// std::cerr << "Adding identity: id=" << (*it) << ", name=" << details.mNickname << std::endl;
|
||||
//
|
||||
// if(details.mNickname.empty()) // I don't know why, but that happens
|
||||
// ui.respond_to_CB->addItem(QString::fromStdString((*it).toStdString()), QString::fromStdString((*it).toStdString())) ;
|
||||
// else
|
||||
// ui.respond_to_CB->addItem(QString::fromUtf8(details.mNickname.c_str()), QString::fromStdString((*it).toStdString())) ;
|
||||
// }
|
||||
|
||||
QObject::connect(ui.respond_to_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(updateSigningButton(int))) ;
|
||||
|
||||
if(!own_ids.empty())
|
||||
ui.respond_to_CB->setCurrentIndex(1) ;
|
||||
// if(!own_ids.empty())
|
||||
// ui.respond_to_CB->setCurrentIndex(1) ;
|
||||
|
||||
/*ui.comboStyle->addItem("Standard");
|
||||
ui.comboStyle->addItem("Bullet List (Disc)");
|
||||
|
@ -768,7 +768,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="QComboBox" name="respond_to_CB"/>
|
||||
<widget class="GxsIdChooser" name="respond_to_CB"/>
|
||||
</item>
|
||||
<item row="1" column="6">
|
||||
<widget class="QPushButton" name="signMessage_CB">
|
||||
@ -992,6 +992,11 @@
|
||||
<header>gui/common/FriendSelectionWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>GxsIdChooser</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>gui/gxs/GxsIdChooser.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>recipientWidget</tabstop>
|
||||
|
Loading…
Reference in New Issue
Block a user