diff --git a/retroshare-gui/src/gui/ChatLobbyWidget.cpp b/retroshare-gui/src/gui/ChatLobbyWidget.cpp index 9e0dd1eff..f9ef755da 100644 --- a/retroshare-gui/src/gui/ChatLobbyWidget.cpp +++ b/retroshare-gui/src/gui/ChatLobbyWidget.cpp @@ -1076,11 +1076,21 @@ void ChatLobbyWidget::readChatLobbyInvites() tr("%1 invites you to chat lobby named %2").arg(QString::fromUtf8(rsPeers->getPeerName((*it).peer_id).c_str())).arg(RsHtml::plainText(it->lobby_name)), QMessageBox::Question, QMessageBox::Yes,QMessageBox::No, 0); + + QLabel *label = new QLabel(tr("Choose an identity for this lobby:")); GxsIdChooser *idchooser = new GxsIdChooser ; idchooser->loadIds(IDCHOOSER_ID_REQUIRED,default_id) ; - mb.layout()->addWidget(new QLabel(tr("Choose an identity for this lobby:"))) ; - mb.layout()->addWidget(idchooser) ; + + QGridLayout* layout = qobject_cast(mb.layout()); + if (layout) { + layout->addWidget(label, layout->rowCount(), 0, 1, layout->columnCount(), Qt::AlignHCenter ) ; + layout->addWidget(idchooser, layout->rowCount(), 0, 1, layout->columnCount(), Qt::AlignRight ) ; + } else { + //Not QGridLayout so add at end + mb.layout()->addWidget(label) ; + mb.layout()->addWidget(idchooser) ; + } int res = mb.exec() ; diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index 12050615e..b53137047 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -1410,7 +1410,14 @@ void MainWindow::externalLinkActivated(const QUrl &url) QMessageBox mb(QObject::tr("Confirmation"), QObject::tr("Do you want this link to be handled by your system?")+"

"+ url.toString()+"

"+tr("Make sure this link has not been forged to drag you to a malicious website."), QMessageBox::Question, QMessageBox::Yes,QMessageBox::No, 0); QCheckBox *checkbox = new QCheckBox(tr("Don't ask me again")) ; - mb.layout()->addWidget(checkbox) ; + QGridLayout* layout = qobject_cast(mb.layout()); + if (layout) + { + layout->addWidget(checkbox,layout->rowCount(),0,1, layout->columnCount(), Qt::AlignLeft); + } else { + //Not QGridLayout so add at end + mb.layout()->addWidget(checkbox) ; + } int res = mb.exec() ;