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

svn at pcbsd.org svn at pcbsd.org
Wed Mar 13 10:33:07 PDT 2013


Author: kenmoore
Date: 2013-03-13 17:33:07 +0000 (Wed, 13 Mar 2013)
New Revision: 21846

Modified:
   pcbsd-projects/PCDM/pcdm-gui.cpp
Log:
Ok, now the de selection should be auto-selected as well for a single user system



Modified: pcbsd-projects/PCDM/pcdm-gui.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-gui.cpp	2013-03-13 17:24:56 UTC (rev 21845)
+++ pcbsd-projects/PCDM/pcdm-gui.cpp	2013-03-13 17:33:07 UTC (rev 21846)
@@ -156,14 +156,11 @@
     
     //Username/Password/Login widget
     loginW = new LoginWidget;
-    //Connect the signals/slots
-    connect(loginW,SIGNAL(loginRequested(QString,QString)),this,SLOT(slotStartLogin(QString,QString)));
-    connect(loginW,SIGNAL(escapePressed()),this,SLOT(slotShutdownComputer()));
-    connect(loginW,SIGNAL(UserSelected(QString)), this, SLOT(slotUserSelected(QString)) );
-    connect(loginW,SIGNAL(UserChanged(QString)), this, SLOT(slotUserChanged(QString)) );
-    //Set the available users
     loginW->setUsernames(Backend::getSystemUsers()); //add in the detected users
-    if(!lastUser.isEmpty()){ loginW->setCurrentUser(lastUser); } //set the previously used user
+    if(!lastUser.isEmpty()){ //set the previously used user
+    	loginW->setCurrentUser(lastUser); 
+    	loadLastDE(lastUser); //make sure the DE switcher reflects the last user choice
+    } 
     //Set Icons from theme
     tmpIcon = currentTheme->itemIcon("login");
     if(!QFile::exists(tmpIcon) || tmpIcon.isEmpty() ){ tmpIcon=":/images/next.png"; }
@@ -181,6 +178,11 @@
                       currentTheme->itemLocation("login","col"), \
                       currentTheme->itemLocation("login","rowspan"), \
                       currentTheme->itemLocation("login","colspan"), Qt::AlignCenter);
+    //Connect the signals/slots
+    connect(loginW,SIGNAL(loginRequested(QString,QString)),this,SLOT(slotStartLogin(QString,QString)));
+    connect(loginW,SIGNAL(escapePressed()),this,SLOT(slotShutdownComputer()));
+    connect(loginW,SIGNAL(UserSelected(QString)), this, SLOT(slotUserSelected(QString)) );
+    connect(loginW,SIGNAL(UserChanged(QString)), this, SLOT(slotUserChanged(QString)) );
     
     //----Desktop Environment Switcher
     //Create the switcher



More information about the Commits mailing list