Merge branch 'master' into map_double_click_zoom
authorJussi Laitinen <jupe@l3l7588.ixonos.local>
Fri, 18 Jun 2010 12:38:41 +0000 (15:38 +0300)
committerJussi Laitinen <jupe@l3l7588.ixonos.local>
Fri, 18 Jun 2010 12:38:41 +0000 (15:38 +0300)
Conflicts:
src/src.pro

1  2 
src/src.pro
src/ui/mainwindow.cpp

diff --combined src/src.pro
@@@ -21,6 -21,7 +21,7 @@@ SOURCES += main.cpp 
      map/mapengine.cpp \
      map/mapfetcher.cpp \
      map/mapscene.cpp \
+     map/mapscroller.cpp \
      map/maptile.cpp \
      map/maptilerequest.cpp \
      map/mapview.cpp \
@@@ -51,7 -52,6 +52,6 @@@
      ui/zoombutton.cpp \
      ui/zoombuttonpanel.cpp \
      user/user.cpp \
-     map/mapscroller.cpp \
      ui/fullscreenbutton.cpp
  HEADERS += common.h \
      engine/engine.h \
@@@ -69,6 -69,7 +69,7 @@@
      map/mapengine.h \
      map/mapfetcher.h \
      map/mapscene.h \
+     map/mapscroller.h \
      map/maptile.h \
      map/maptilerequest.h \
      map/mapview.h \
      ui/zoombutton.h \
      ui/zoombuttonpanel.h \
      user/user.h \
-     map/mapscroller.h \
      ui/fullscreenbutton.h
  QT += network \
      webkit
@@@ -122,19 -122,18 +122,20 @@@ simulator 
          SOURCES += network/networkhandlerprivate.cpp
          HEADERS += network/networkhandlerprivate.h
          QT += dbus
 -        CONFIG += icd2 qdbus
 -        SOURCES += gps/gpspositionprivateliblocation.cpp \
 -                   gps/liblocationwrapper.cpp \
 -                   gps/geopositioninfo.cpp \
 -                   gps/geocoordinate.cpp
 -        HEADERS += gps/gpspositionprivateliblocation.h \
 -                   gps/liblocationwrapper.h \
 -                   gps/geopositioninfo.h \
 -                   gps/geocoordinate.h
 -        CONFIG += link_pkgconfig
 -        PKGCONFIG += glib-2.0 liblocation
 -        LIBS += -llocation
 +        CONFIG += icd2
 +#        SOURCES += gps/gpspositionprivateliblocation.cpp \
 +#                   gps/liblocationwrapper.cpp \
 +#                   gps/geopositioninfo.cpp \
 +#                   gps/geocoordinate.cpp
 +#        HEADERS += gps/gpspositionprivateliblocation.h \
 +#                   gps/liblocationwrapper.h \
 +#                   gps/geopositioninfo.h \
 +#                   gps/geocoordinate.h
 +#        CONFIG += link_pkgconfig
 +#        PKGCONFIG += glib-2.0 liblocation
++#        LIBS += -llocation
 +        SOURCES += gps/gpspositionprivatestub.cpp
 +        HEADERS += gps/gpspositionprivatestub.h
      } else {
          SOURCES += gps/gpspositionprivatestub.cpp \
                     network/networkhandlerprivatestub.cpp
diff --combined src/ui/mainwindow.cpp
@@@ -55,6 -55,7 +55,7 @@@ MainWindow::MainWindow(QWidget *parent
      m_errorShown(false),
      m_loggedIn(false),
      m_refresh(false),
+     m_progressIndicatorCount(0),
      m_ownLocationCrosshair(0),
      m_email(),    
      m_password(),
@@@ -254,9 -255,6 +255,9 @@@ void MainWindow::buildMap(
  
      connect(m_mapView, SIGNAL(viewZoomFinished()),
              this, SIGNAL(viewZoomFinished()));
 +
 +    connect(m_mapView, SIGNAL(zoomIn()),
 +            this, SIGNAL(zoomIn()));
  }
  
  void MainWindow::buildMapScale()
@@@ -672,9 -670,6 +673,6 @@@ void MainWindow::loginFailed(
      qDebug() << __PRETTY_FUNCTION__;
  
      clearCookieJar();
-     toggleProgressIndicator(false);
      startLoginProcess();
  }
  
@@@ -881,6 -876,23 +879,23 @@@ void MainWindow::showInformationBox(
      }
  }
  
+ void MainWindow::showPanels()
+ {
+     qDebug() << __PRETTY_FUNCTION__;
+     if(m_loggedIn) {
+         if(!m_friendsListPanel->isVisible()) {
+             m_friendsListPanel->show();
+             m_friendsListPanelSidebar->show();
+         }
+         if(!m_userPanel->isVisible()) {
+             m_userPanel->show();
+             m_userPanelSidebar->show();
+         }
+     }
+ }
  void MainWindow::startLoginProcess()
  {
      qDebug() << __PRETTY_FUNCTION__;
@@@ -902,7 -914,16 +917,16 @@@ void MainWindow::toggleProgressIndicato
      qDebug() << __PRETTY_FUNCTION__;
  
  #ifdef Q_WS_MAEMO_5
-     setAttribute(Qt::WA_Maemo5ShowProgressIndicator, value);
+     if(value) {
+         m_progressIndicatorCount++;
+         setAttribute(Qt::WA_Maemo5ShowProgressIndicator, true);
+     } else {
+         if(m_progressIndicatorCount > 0)
+             m_progressIndicatorCount--;
+         if(m_progressIndicatorCount == 0)
+             setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
+     }
  #else
      Q_UNUSED(value);
  #endif // Q_WS_MAEMO_5
@@@ -912,11 -933,7 +936,7 @@@ void MainWindow::updateItemVisibility(
  {
      qDebug() << __PRETTY_FUNCTION__;
      
-     if(m_loggedIn) {
-         m_friendsListPanel->show();
-         m_friendsListPanelSidebar->show();
-         m_userPanel->show();
-         m_userPanelSidebar->show();
+     if(m_loggedIn) {       
  
          if(!m_gpsToggleAct->isChecked())
              setOwnLocationCrosshairVisibility(true);
@@@ -948,7 -965,6 +968,6 @@@ void MainWindow::webViewRequestFinished
      if(reply->error() != QNetworkReply::OperationCanceledError &&
         reply->error() != QNetworkReply::NoError) {
          emit error(reply->error());
-         toggleProgressIndicator(false);
      }
  }