mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-22 07:49:56 -05:00
prevent GXS id chooser from emitting signals when initialised
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-LobbiesWithGXSIds@7984 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7c3ad32436
commit
48b16a068f
@ -1630,7 +1630,7 @@ bool DistributedChatService::setIdentityForChatLobby(const ChatLobbyId& lobby_id
|
||||
return false;
|
||||
}
|
||||
|
||||
if (it->second.gxs_id != nick)
|
||||
if (!it->second.gxs_id.isNull() && it->second.gxs_id != nick)
|
||||
{
|
||||
changed = true;
|
||||
}
|
||||
|
@ -100,11 +100,11 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
|
||||
ownIdChooser = new GxsIdChooser() ;
|
||||
ownIdChooser->loadIds(IDCHOOSER_ID_REQUIRED,current_id) ;
|
||||
|
||||
connect(ownIdChooser,SIGNAL(currentIndexChanged(int)),this,SLOT(changeNickname())) ;
|
||||
|
||||
getChatWidget()->addChatBarWidget(ownIdChooser) ;
|
||||
|
||||
unsubscribeButton = new QToolButton ;
|
||||
connect(ownIdChooser,SIGNAL(currentIndexChanged(int)),this,SLOT(changeNickname())) ;
|
||||
|
||||
unsubscribeButton = new QToolButton ;
|
||||
unsubscribeButton->setMinimumSize(QSize(28,28)) ;
|
||||
unsubscribeButton->setMaximumSize(QSize(28,28)) ;
|
||||
unsubscribeButton->setText(QString()) ;
|
||||
|
@ -122,6 +122,10 @@ static void loadPrivateIdsCallback(GxsIdDetailsType type, const RsIdentityDetail
|
||||
return;
|
||||
}
|
||||
|
||||
// this prevents the objects that depend on what's in the combo-box to activate and
|
||||
// perform any change.Only user-changes should cause this.
|
||||
chooser->blockSignals(true) ;
|
||||
|
||||
QString text = GxsIdDetails::getNameForType(type, details);
|
||||
QString id = QString::fromStdString(details.mId.toStdString());
|
||||
|
||||
@ -156,7 +160,9 @@ static void loadPrivateIdsCallback(GxsIdDetailsType type, const RsIdentityDetail
|
||||
chooser->setItemData(index, (type == GXS_ID_DETAILS_TYPE_DONE) ? TYPE_FOUND_ID : TYPE_UNKNOWN_ID, ROLE_TYPE);
|
||||
chooser->setItemIcon(index, icons.empty() ? QIcon() : icons[0]);
|
||||
|
||||
chooser->model()->sort(0);
|
||||
chooser->model()->sort(0);
|
||||
|
||||
chooser->blockSignals(false) ;
|
||||
}
|
||||
|
||||
void GxsIdChooser::loadPrivateIds(uint32_t token)
|
||||
|
Loading…
x
Reference in New Issue
Block a user