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

svn at pcbsd.org svn at pcbsd.org
Wed Feb 27 13:27:51 PST 2013


Author: kenmoore
Date: 2013-02-27 21:27:50 +0000 (Wed, 27 Feb 2013)
New Revision: 21669

Modified:
   pcbsd-projects/PCDM/loginWidget.cpp
   pcbsd-projects/PCDM/loginWidget.h
   pcbsd-projects/PCDM/pcdm-gui.cpp
Log:
Clean up how the login widget can get focus set



Modified: pcbsd-projects/PCDM/loginWidget.cpp
===================================================================
--- pcbsd-projects/PCDM/loginWidget.cpp	2013-02-27 19:34:50 UTC (rev 21668)
+++ pcbsd-projects/PCDM/loginWidget.cpp	2013-02-27 21:27:50 UTC (rev 21669)
@@ -252,7 +252,14 @@
   }
 }
 
-void LoginWidget::resetFocus(){
-  //Set the Keyboard focus on the list of users
-  listUsers->setFocus();	
+void LoginWidget::resetFocus(QString item){
+  if(item == "userlist"){
+    listUsers->setFocus();
+  }else if(item == "password"){
+    linePassword->setFocus();
+  }else{
+    //By default, de-select the user and set focus on the user selection
+    listUsers->setFocus();
+    slotUserUnselected();
+  }
 }

Modified: pcbsd-projects/PCDM/loginWidget.h
===================================================================
--- pcbsd-projects/PCDM/loginWidget.h	2013-02-27 19:34:50 UTC (rev 21668)
+++ pcbsd-projects/PCDM/loginWidget.h	2013-02-27 21:27:50 UTC (rev 21669)
@@ -47,7 +47,7 @@
         void keyPressEvent(QKeyEvent *e);
 	void setBackgroundFade(bool verticalFade, int percentfade, QString colorTL, QString colorBR);
         void retranslateUi();
-        void resetFocus();
+        void resetFocus(QString item="");
   
   private:
   	QComboBox* listUsers;

Modified: pcbsd-projects/PCDM/pcdm-gui.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-gui.cpp	2013-02-27 19:34:50 UTC (rev 21668)
+++ pcbsd-projects/PCDM/pcdm-gui.cpp	2013-02-27 21:27:50 UTC (rev 21669)
@@ -360,6 +360,7 @@
 // Start xvkbd
 void PCDMgui::slotPushVirtKeyboard(){
    system("killall -9 xvkbd; xvkbd -compact &");
+   loginW->resetFocus("password");
 }
 
 void PCDMgui::retranslateUi(){



More information about the Commits mailing list