[PC-BSD Commits] r21695 - pcbsd-projects/PCDM

svn at pcbsd.org svn at pcbsd.org
Mon Mar 4 11:37:41 PST 2013


Author: kenmoore
Date: 2013-03-04 19:37:41 +0000 (Mon, 04 Mar 2013)
New Revision: 21695

Modified:
   pcbsd-projects/PCDM/main.cpp
Log:
Clean up the PCDM main.cpp function



Modified: pcbsd-projects/PCDM/main.cpp
===================================================================
--- pcbsd-projects/PCDM/main.cpp	2013-03-04 18:27:37 UTC (rev 21694)
+++ pcbsd-projects/PCDM/main.cpp	2013-03-04 19:37:41 UTC (rev 21695)
@@ -99,22 +99,9 @@
     //qDebug() << "Main GUI Created:" << QString::number(clock.elapsed())+" ms";
     splash.finish(&w); //close the splash when the GUI starts up
     //Set the proper size on the Application
-    //if(Theme::isFullScreen() ){
       w.setWindowFlags(w.windowFlags() ^Qt::WindowSoftkeysVisibleHint);
       w.setWindowState(Qt::WindowFullScreen);
-    /*}else{
-      //Get the screen and desired geometries
-      QRect dimensions = QApplication::desktop()->screenGeometry();
-      int wid = dimensions.width();     // returns desktop width
-      int hig = dimensions.height();    // returns desktop height
-      int thHig = Theme::windowHeight(); // desired height
-      int thWid = Theme::windowWidth();  //desired width
-      //Sanity check the desired geometry versus the actual screen resolution
-      if(thHig > hig){ thHig = hig; }
-      if(thWid > wid){ thWid = wid; }
-      // Center the Application
-      w.setGeometry((wid/2) - (thWid/2), (hig/2) - (thHig/2), thWid, thHig);
-    }*/
+
     //Setup the signals/slots to startup the desktop session
     QObject::connect( &w,SIGNAL(xUserFound(QString)), &desktop,SLOT(setXUsername(QString)) );
     QObject::connect( &w,SIGNAL(xCmdFound(QString)), &desktop,SLOT(setXCommand(QString)) );
@@ -124,14 +111,11 @@
     //qDebug() << "Showing GUI:" << QString::number(clock.elapsed())+" ms";
     w.show();
     returnCode = a.exec();
-    //Return Codes: 0=normal, 1=restart computer, 2=shutdown computer
-    //if(returnCode==0){ Backend::startXSession(); }
+
   }  // end of PCDM GUI running
   
   //Wait for the desktop session to finish before exiting
-  if(returnCode == 0){
-    desktop.waitForFinished();
-  }
+  desktop.waitForFinished();
   
   return returnCode;
 }



More information about the Commits mailing list