From d490f6b0fec77114c24658f0e0196d691db2a856 Mon Sep 17 00:00:00 2001 From: defnax Date: Thu, 4 Feb 2010 23:12:35 +0000 Subject: [PATCH] fixes on QMessagesBox's to show a default window icon git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2196 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/MessengerWindow.cpp | 12 +++++------- retroshare-gui/src/gui/PeersDialog.cpp | 11 ++++------- 2 files changed, 9 insertions(+), 14 deletions(-) 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; }