Merge branch 'master' into contact_dialog
[situare] / src / ui / mainwindow.cpp
index 23f452b..e418b85 100644 (file)
@@ -51,6 +51,7 @@
 #include "userinfopanel.h"
 #include "zoombuttonpanel.h"
 
+
 #include "mainwindow.h"
 
 // These MUST BE HERE, compiling for Maemo fails if moved
 #include <X11/Xlib.h>
 #endif // Q_WS_MAEMO_5
 
+#if defined(Q_WS_MAEMO_5) & defined(ARMEL)
+#include "ossoabookdialog.h"
+#endif
+
 MainWindow::MainWindow(QWidget *parent)
     : QMainWindow(parent),
       m_errorShown(false),
@@ -182,6 +187,9 @@ void MainWindow::buildFriendListPanel()
 
     connect(m_friendsListPanel, SIGNAL(routeToFriend(const GeoCoordinate&)),
             this, SIGNAL(routeTo(const GeoCoordinate&)));
+
+    connect(m_friendsListPanel, SIGNAL(requestContactDialog(const QString &)),
+            this, SIGNAL(requestContactDialog(const QString &)));
 }
 
 void MainWindow::buildFullScreenButton()
@@ -937,6 +945,18 @@ void MainWindow::setUsername(const QString &username)
     m_email = username;
 }
 
+void MainWindow::showContactDialog(const QString &guid)
+{
+    qDebug() << __PRETTY_FUNCTION__;
+
+#if defined(Q_WS_MAEMO_5) & defined(ARMEL)
+    OssoABookDialog::showContactDialog(guid);
+#else
+    Q_UNUSED(guid);
+    buildInformationBox(tr("Contact dialog works only on phone!"), true);
+#endif
+}
+
 void MainWindow::showEnableAutomaticUpdateLocationDialog(const QString &text)
 {
     qDebug() << __PRETTY_FUNCTION__;