diff --git a/retroshare-gui/src/gui/MessengerWindow.cpp b/retroshare-gui/src/gui/MessengerWindow.cpp index 8be78c284..415b8a3dd 100644 --- a/retroshare-gui/src/gui/MessengerWindow.cpp +++ b/retroshare-gui/src/gui/MessengerWindow.cpp @@ -569,13 +569,11 @@ void MessengerWindow::chatfriend() if (!oneLocationConnected) { /* info dialog */ - QMessageBox::StandardButton sb = QMessageBox::question ( NULL, - "Friend Not Online", - "Your Friend is offline \nDo you want to send them a Message instead", - (QMessageBox::Yes | QMessageBox::No)); - if (sb == QMessageBox::Yes) { - sendMessage(); - } + if ((QMessageBox::question(this, tr("Friend Not Online"),tr("Your Friend is offline \nDo you want to send them a Message instead"),QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes))== QMessageBox::Yes) + { + sendMessage(); + } + } return; } diff --git a/retroshare-gui/src/gui/PeersDialog.cpp b/retroshare-gui/src/gui/PeersDialog.cpp index 5720d498b..e74e76d8b 100644 --- a/retroshare-gui/src/gui/PeersDialog.cpp +++ b/retroshare-gui/src/gui/PeersDialog.cpp @@ -623,13 +623,10 @@ void PeersDialog::chatfriend() if (!oneLocationConnected) { /* info dialog */ - QMessageBox::StandardButton sb = QMessageBox::question ( NULL, - "Friend Not Online", - "Your Friend is offline \nDo you want to send them a Message instead", - (QMessageBox::Yes | QMessageBox::No)); - if (sb == QMessageBox::Yes) { - msgfriend(); - } + if ((QMessageBox::question(this, tr("Friend Not Online"),tr("Your Friend is offline \nDo you want to send them a Message instead"),QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes))== QMessageBox::Yes) + { + msgfriend(); + } } return; }