[Marble-commits] KDE/kdeedu/marble/src

Dennis Nienhüser earthwings at gentoo.org
Wed Mar 31 18:23:22 CEST 2010


SVN commit 1109652 by nienhueser:

Add work offline and fullscreen actions for small devices. Fix operator usage to determine running profile (need bitwise, not boolean).

 M  +7 -5      QtMainWindow.cpp  


--- trunk/KDE/kdeedu/marble/src/QtMainWindow.cpp #1109651:1109652
@@ -215,7 +215,9 @@
 {
     // Do not create too many menu entries on a MID
     // FIXME: Some of these options should come back.
-    if( MarbleGlobal::getInstance()->profiles() && MarbleGlobal::SmallScreen ) {
+    if( MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen ) {
+        menuBar()->addAction(m_workOfflineAct);
+        menuBar()->addAction(m_fullScreenAct);
         return;
     }
     
@@ -293,7 +295,7 @@
     
     // Do not create too many menu entries on a MID
     // FIXME: Set up another way of switching the plugins on and off.
-    if( MarbleGlobal::getInstance()->profiles() && MarbleGlobal::SmallScreen ) {
+    if( MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen ) {
         return;
     }
     
@@ -316,7 +318,7 @@
     
     // Do not create too many menu entries on a MID
     // FIXME: Set up another way of switching the plugins on and off.
-    if( MarbleGlobal::getInstance()->profiles() && MarbleGlobal::SmallScreen ) {
+    if( MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen ) {
         return;
     }
     
@@ -345,7 +347,7 @@
     
     // Do not create too many menu entries on a MID
     // FIXME: Set up another way of switching the plugins on and off.
-    if( MarbleGlobal::getInstance()->profiles() && MarbleGlobal::SmallScreen ) {
+    if( MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen ) {
         return;
     }
 
@@ -707,7 +709,7 @@
          resize(settings.value("size", QSize(640, 480)).toSize());
          move(settings.value("pos", QPoint(200, 200)).toPoint());
          showFullScreen(settings.value("fullScreen", false ).toBool());
-         if( MarbleGlobal::getInstance()->profiles() && MarbleGlobal::SmallScreen ) {
+         if( MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen ) {
              showSideBar(settings.value("sideBar", false ).toBool());
          }
          else {


More information about the Marble-commits mailing list