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

svn at pcbsd.org svn at pcbsd.org
Thu Sep 27 09:06:27 PDT 2012


Author: kenmoore
Date: 2012-09-27 16:06:27 +0000 (Thu, 27 Sep 2012)
New Revision: 19554

Modified:
   pcbsd-projects/PCDM/main.cpp
   pcbsd-projects/PCDM/pcdm-gui.cpp
   pcbsd-projects/PCDM/pcdm-gui.h
Log:
Now change over the main GUI to use the new XProcess class for starting up a DE




Modified: pcbsd-projects/PCDM/main.cpp
===================================================================
--- pcbsd-projects/PCDM/main.cpp	2012-09-27 15:48:47 UTC (rev 19553)
+++ pcbsd-projects/PCDM/main.cpp	2012-09-27 16:06:27 UTC (rev 19554)
@@ -51,7 +51,7 @@
     QString user = Backend::getALUsername();
     QString dcmd = Backend::getALDesktopCmd();
     if( user.isEmpty() || dcmd.isEmpty() ){
-	    
+	 goodAL=FALSE;   
     }else{
 	desktop.setXUsername(user);
 	desktop.setXCommand(dcmd);
@@ -60,8 +60,7 @@
 	splash.close();
 	goodAL=TRUE; //flag this as a good login to skip the GUI
     }
-    //Backend::startAutoLogin();
-    //splash.close();
+
   }
   
   if(!goodAL){
@@ -107,7 +106,13 @@
       // 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)) );
+    QObject::connect( &w,SIGNAL(xHomeFound(QString)), &desktop,SLOT(setXHomeDir(QString)) );
+    QObject::connect( &w,SIGNAL(xSessionStart()), &desktop,SLOT(startXSession()) );
+    
+    
     w.show();
     splash.finish(&w);
     returnCode = a.exec();

Modified: pcbsd-projects/PCDM/pcdm-gui.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-gui.cpp	2012-09-27 15:48:47 UTC (rev 19553)
+++ pcbsd-projects/PCDM/pcdm-gui.cpp	2012-09-27 16:06:27 UTC (rev 19554)
@@ -183,7 +183,11 @@
   //Try to login
   bool success = Backend::startUserLogin(username, password, binary); 
   if(success){
-    slotClosePCDM();
+    emit xUserFound(username);
+    emit xCmdFound(binary);
+    emit xHomeFound( Backend::getUserHomeDir(username) );
+    emit xSessionStart(); //start the desktop environment
+    slotClosePCDM(); //now start to close down the PCDM GUI
   }else{
     pwline->setText("");
     //Display an info box that the login failed

Modified: pcbsd-projects/PCDM/pcdm-gui.h
===================================================================
--- pcbsd-projects/PCDM/pcdm-gui.h	2012-09-27 15:48:47 UTC (rev 19553)
+++ pcbsd-projects/PCDM/pcdm-gui.h	2012-09-27 16:06:27 UTC (rev 19554)
@@ -65,6 +65,11 @@
     //Functions
     void createGUIfromTheme();
 
+signals:
+    void xUserFound(QString);
+    void xCmdFound(QString);
+    void xHomeFound(QString);
+    void xSessionStart();
 };
 
 #endif // PCDMGUI_H



More information about the Commits mailing list