[PC-BSD Commits] r104 - in pcbsd/trunk/pcbsdusermanager: . po src

svn at pcbsd.org svn at pcbsd.org
Wed Feb 14 14:19:24 PST 2007


Author: tim
Date: 2007-02-14 23:19:24 +0100 (Wed, 14 Feb 2007)
New Revision: 104

Removed:
   pcbsd/trunk/pcbsdusermanager/pcbsdusermanager.kdevses
Modified:
   pcbsd/trunk/pcbsdusermanager/Makefile.in
   pcbsd/trunk/pcbsdusermanager/pcbsdusermanager.kdevelop
   pcbsd/trunk/pcbsdusermanager/pcbsdusermanager.kdevelop.pcs
   pcbsd/trunk/pcbsdusermanager/po/Makefile.in
   pcbsd/trunk/pcbsdusermanager/src/Makefile.in
   pcbsd/trunk/pcbsdusermanager/src/simpledlgcode.cpp
Log:
Added fullname validation to SimpleDlg

Modified: pcbsd/trunk/pcbsdusermanager/Makefile.in
===================================================================
--- pcbsd/trunk/pcbsdusermanager/Makefile.in	2007-02-14 11:22:57 UTC (rev 103)
+++ pcbsd/trunk/pcbsdusermanager/Makefile.in	2007-02-14 22:19:24 UTC (rev 104)
@@ -817,7 +817,7 @@
 .NOEXPORT:
 
 #>+ 2
-KDE_DIST=add_user.png delete_user.png admin_password.png pcbsdusermanager.kdevses change_password.png configure.files button_ok.png 1rightarrow.png aclocal.m4 Doxyfile delete_group.png stamp-h.in subdirs Makefile.in config.h.in configure.in Makefile.cvs pcbsdusermanager.kdevelop add_group.png pcbsdusermanager.kdevelop.pcs acinclude.m4 Makefile.am configure 1leftarrow.png button_cancel.png 
+KDE_DIST=add_user.png delete_user.png admin_password.png change_password.png configure.files button_ok.png 1rightarrow.png aclocal.m4 Doxyfile delete_group.png stamp-h.in subdirs Makefile.in config.h.in configure.in Makefile.cvs pcbsdusermanager.kdevelop add_group.png pcbsdusermanager.kdevelop.pcs acinclude.m4 Makefile.am configure 1leftarrow.png button_cancel.png 
 
 #>+ 2
 docs-am:

Modified: pcbsd/trunk/pcbsdusermanager/pcbsdusermanager.kdevelop
===================================================================
--- pcbsd/trunk/pcbsdusermanager/pcbsdusermanager.kdevelop	2007-02-14 11:22:57 UTC (rev 103)
+++ pcbsd/trunk/pcbsdusermanager/pcbsdusermanager.kdevelop	2007-02-14 22:19:24 UTC (rev 104)
@@ -72,6 +72,7 @@
     <tree>
       <hidepatterns>*.o,*.lo,CVS</hidepatterns>
       <hidenonprojectfiles>false</hidenonprojectfiles>
+      <showvcsfields>false</showvcsfields>
     </tree>
   </kdevfileview>
   <kdevdoctreeview>

Modified: pcbsd/trunk/pcbsdusermanager/pcbsdusermanager.kdevelop.pcs
===================================================================
(Binary files differ)

Deleted: pcbsd/trunk/pcbsdusermanager/pcbsdusermanager.kdevses

Modified: pcbsd/trunk/pcbsdusermanager/po/Makefile.in
===================================================================
--- pcbsd/trunk/pcbsdusermanager/po/Makefile.in	2007-02-14 11:22:57 UTC (rev 103)
+++ pcbsd/trunk/pcbsdusermanager/po/Makefile.in	2007-02-14 22:19:24 UTC (rev 104)
@@ -481,7 +481,7 @@
 .NOEXPORT:
 
 #>+ 2
-KDE_DIST=kcmpcbsdusermanager.pot Makefile.in Makefile.am 
+KDE_DIST=Makefile.in Makefile.am 
 
 #>+ 2
 docs-am:

Modified: pcbsd/trunk/pcbsdusermanager/src/Makefile.in
===================================================================
--- pcbsd/trunk/pcbsdusermanager/src/Makefile.in	2007-02-14 11:22:57 UTC (rev 103)
+++ pcbsd/trunk/pcbsdusermanager/src/Makefile.in	2007-02-14 22:19:24 UTC (rev 104)
@@ -704,7 +704,7 @@
 
 
 messages: rc.cpp
-	$(EXTRACTRC) * > rc.cpp
+	$(EXTRACTRC) `find -name \*.ui -o -name \*.rc` > rc.cpp
 	$(XGETTEXT) *.cpp -o $(podir)/kcmpcbsdusermanager.pot
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.

Modified: pcbsd/trunk/pcbsdusermanager/src/simpledlgcode.cpp
===================================================================
--- pcbsd/trunk/pcbsdusermanager/src/simpledlgcode.cpp	2007-02-14 11:22:57 UTC (rev 103)
+++ pcbsd/trunk/pcbsdusermanager/src/simpledlgcode.cpp	2007-02-14 22:19:24 UTC (rev 104)
@@ -31,6 +31,7 @@
 #include <qpushbutton.h>
 #include <qcheckbox.h>
 #include <qlineedit.h>
+#include <qtooltip.h>
 
 SimpleDlgCode::SimpleDlgCode(UserManagerBackend *back, QWidget *parent, const char *name)
     :SimpleDlg(parent, name)
@@ -85,15 +86,33 @@
 
 void SimpleDlgCode::fullnameChanged()
 {
-    if (! systemChange)
+    User *user = back->getUser(QStringList::split(" ", userList->currentText())[0]);
+    
+    int fullnameError = back->validateFullname(fullnameBox->text());
+    
+    QColor fullnameBoxColour = white;
+    QToolTip::add(fullnameBox, i18n("Good Input"));
+    
+    switch(fullnameError)
     {
-        User *user = back->getUser(QStringList::split(" ", userList->currentText())[0]);
-        
+    case 1:
+	QToolTip::add(fullnameBox, i18n("The field is empty"));
+	break;
+    case 2:
+	fullnameBoxColour = red;
+	QToolTip::add(fullnameBox, i18n("This field may not contain ! @ or :"));
+	break;
+    }
+    
+    if ((! systemChange) && (fullnameError != 2))
+    {
         user->setFullname(fullnameBox->text());
         user->setChanges();
         userList->changeItem(userImage, user->getUsername() + " (" + fullnameBox->text() + ")", userList->currentItem());
         emit changed();
     }
+    
+    fullnameBox->setPaletteBackgroundColor(fullnameBoxColour);
 }
 
 void SimpleDlgCode::canAdminChanged(bool on)



More information about the Commits mailing list