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

svn at pcbsd.org svn at pcbsd.org
Thu Apr 4 09:17:05 PDT 2013


Author: kenmoore
Date: 2013-04-04 16:17:05 +0000 (Thu, 04 Apr 2013)
New Revision: 22063

Modified:
   pcbsd-projects/PCDM/loginWidget.cpp
   pcbsd-projects/PCDM/loginWidget.h
   pcbsd-projects/PCDM/pcdm-gui.cpp
Log:
Try to fix the widget resizing issue with long user names



Modified: pcbsd-projects/PCDM/loginWidget.cpp
===================================================================
--- pcbsd-projects/PCDM/loginWidget.cpp	2013-04-04 15:54:05 UTC (rev 22062)
+++ pcbsd-projects/PCDM/loginWidget.cpp	2013-04-04 16:17:05 UTC (rev 22063)
@@ -16,6 +16,7 @@
   idL.clear(); //Clear the login names available
   userSelected = FALSE; //focus on the username first
   pwVisible = FALSE; //Have the password box hide the input behind dots
+  allowPWVisible = TRUE; //Allow the password button to show the password text
   
   //Create the Grid layout
   QHBoxLayout* hlayout1 = new QHBoxLayout();
@@ -66,7 +67,7 @@
   connect(listUsers,SIGNAL(activated(int)),this,SLOT(slotChooseUser(int)));
   connect(listUserBig,SIGNAL(itemClicked(QListWidgetItem*)),this,SLOT(slotUserClicked(QListWidgetItem*)) );
   connect(listUserBig,SIGNAL(currentRowChanged(int)),this,SLOT(slotUserHighlighted(int)) );
-  allowPasswordView(TRUE); //setup signal/slots for pushViewPassword
+  allowPasswordView(allowPWVisible); //setup signal/slots for pushViewPassword
   //Set this layout for the loginWidget
   this->setLayout(vlayout);
   
@@ -269,7 +270,11 @@
   pushLogin->setText(tr("Login"));
   pushLogin->setToolTip(tr("Login to the system with the current user and password"));
   pushViewPassword->setText(tr("Password"));
-  pushViewPassword->setToolTip(tr("Hold to view the currently entered password"));
+  if(allowPWVisible){
+    pushViewPassword->setToolTip(tr("Hold to view the currently entered password"));
+  }else{
+    pushViewPassword->setToolTip(tr("Login password for the selected user"));	  
+  }
   listUsers->setToolTip(tr("Available users"));
   listUserBig->setToolTip(tr("Available users"));
   linePassword->setToolTip(tr("Login password for the selected user"));
@@ -300,6 +305,7 @@
 
 void LoginWidget::allowPasswordView(bool allow){
   //Enable/disable the password view button as desired
+  allowPWVisible = allow;
   pushViewPassword->disconnect(); //disconnect the signal/slot (keep nice appearance)
   if(allow){
     connect(pushViewPassword,SIGNAL(pressed()),this,SLOT(slotChangePWView()));

Modified: pcbsd-projects/PCDM/loginWidget.h
===================================================================
--- pcbsd-projects/PCDM/loginWidget.h	2013-04-04 15:54:05 UTC (rev 22062)
+++ pcbsd-projects/PCDM/loginWidget.h	2013-04-04 16:17:05 UTC (rev 22063)
@@ -62,7 +62,7 @@
 
 	QStringList idL;
         QString hostName;
-	bool userSelected, pwVisible;
+	bool userSelected, pwVisible, allowPWVisible;
 
 	void updateWidget();
 

Modified: pcbsd-projects/PCDM/pcdm-gui.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-gui.cpp	2013-04-04 15:54:05 UTC (rev 22062)
+++ pcbsd-projects/PCDM/pcdm-gui.cpp	2013-04-04 16:17:05 UTC (rev 22063)
@@ -432,6 +432,8 @@
   }
     //Set the switcher to the last used desktop environment
     if( !lastDE.isEmpty() ){ deSwitcher->setCurrentItem(lastDE); }
+    
+  this->updateGeometry(); //make sure all the widgets are the proper size
 
 }
 



More information about the Commits mailing list