------------------------------------------------------------
revno: 250
committer: Alan Alvarez <aalva...@aliensoft.net>
branch nick: login-system
timestamp: Mon 2010-12-06 14:33:16 -0400
message:
  Don't attempt to send IM when not in ONLINE mode
modified:
  mira-client/src/gui/qt/ChatDockWidget.cpp
  mira-client/src/gui/qt/MainWindow.cpp


--
lp:~mira-dev/mira/login-system
https://code.launchpad.net/~mira-dev/mira/login-system

You are subscribed to branch lp:~mira-dev/mira/login-system.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mira-dev/mira/login-system/+edit-subscription
=== modified file 'mira-client/src/gui/qt/ChatDockWidget.cpp'
--- mira-client/src/gui/qt/ChatDockWidget.cpp	2010-05-14 03:21:41 +0000
+++ mira-client/src/gui/qt/ChatDockWidget.cpp	2010-12-06 18:33:16 +0000
@@ -50,8 +50,11 @@
 
 void ChatDockWidget::sendMessage()
 {
-    if (m_currentUser.isEmpty() == false)
-    {
+    if (Application::mode != Application::ONLINE)
+        QMessageBox::warning(this, tr("Cannot send Instant Message!"), tr("You need to be online to be able to send an Instant Message"));
+
+    if (m_currentUser.isEmpty() == false && m_lineEdit->displayText().isEmpty() == false)
+    {   
         std::string message = m_lineEdit->displayText().toStdString() + '\"';
         m_currentBrowser->insertHtml("<b><font color=\"#0000ff\">Me: </font></b>"+m_lineEdit->displayText()+"<br />");
         QScrollBar *sb = m_currentBrowser->verticalScrollBar();

=== modified file 'mira-client/src/gui/qt/MainWindow.cpp'
--- mira-client/src/gui/qt/MainWindow.cpp	2010-08-24 20:10:25 +0000
+++ mira-client/src/gui/qt/MainWindow.cpp	2010-12-06 18:33:16 +0000
@@ -349,7 +349,7 @@
     }
     else
     {
-        QMessageBox::critical(this, "Cannot find Server settings", "Mira cannot find the settings for this configured server.\nPlease remove and add the server.", QMessageBox::Ok);
+        QMessageBox::critical(this, tr("Cannot find Server settings"), tr("Mira cannot find the settings for this configured server.\nPlease remove and add the server."), QMessageBox::Ok);
         settings.endGroup();
         return;
     }

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Mira-development mailing list
Mira-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mira-development

Reply via email to