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

svn at pcbsd.org svn at pcbsd.org
Sat Feb 24 05:22:47 PST 2007


Author: tim
Date: 2007-02-24 14:22:47 +0100 (Sat, 24 Feb 2007)
New Revision: 110

Added:
   pcbsd/trunk/pcbsdusermanager/NewLogoSmall.png
   pcbsd/trunk/pcbsdusermanager/src/notroot.ui
Modified:
   pcbsd/trunk/pcbsdusermanager/Makefile.in
   pcbsd/trunk/pcbsdusermanager/pcbsdusermanager.kdevelop
   pcbsd/trunk/pcbsdusermanager/pcbsdusermanager.kdevelop.pcs
   pcbsd/trunk/pcbsdusermanager/src/Makefile.am
   pcbsd/trunk/pcbsdusermanager/src/Makefile.in
   pcbsd/trunk/pcbsdusermanager/src/pcbsdusermanager.cpp
   pcbsd/trunk/pcbsdusermanager/src/pcbsdusermanager.h
   pcbsd/trunk/pcbsdusermanager/src/user.cpp
Log:
Added 'not root' support

Modified: pcbsd/trunk/pcbsdusermanager/Makefile.in
===================================================================
--- pcbsd/trunk/pcbsdusermanager/Makefile.in	2007-02-23 22:10:19 UTC (rev 109)
+++ pcbsd/trunk/pcbsdusermanager/Makefile.in	2007-02-24 13:22:47 UTC (rev 110)
@@ -817,7 +817,7 @@
 .NOEXPORT:
 
 #>+ 2
-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 
+KDE_DIST=add_user.png delete_user.png admin_password.png change_password.png configure.files button_ok.png 1rightarrow.png aclocal.m4 Doxyfile NewLogoSmall.png 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:

Added: pcbsd/trunk/pcbsdusermanager/NewLogoSmall.png


Property changes on: pcbsd/trunk/pcbsdusermanager/NewLogoSmall.png
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Modified: pcbsd/trunk/pcbsdusermanager/pcbsdusermanager.kdevelop
===================================================================
--- pcbsd/trunk/pcbsdusermanager/pcbsdusermanager.kdevelop	2007-02-23 22:10:19 UTC (rev 109)
+++ pcbsd/trunk/pcbsdusermanager/pcbsdusermanager.kdevelop	2007-02-24 13:22:47 UTC (rev 110)
@@ -166,6 +166,7 @@
         <implementation class="AddDlgCode" path="src/adduser.ui" implementationpath="src/adddlgcode.h" />
         <implementation class="ChangePassCode" path="src/changepassdialog.ui" implementationpath="src/changepasscode.h" />
         <implementation class="mainDlgCode" path="src/mainDlg.ui" implementationpath="src/maindlgcode.h" />
+        <implementation class="NotRootCode" path="src/notroot.ui" implementationpath="src/notrootcode.h" />
         <implementation class="SimpleAddCode" path="src/simpleadddlg.ui" implementationpath="src/simpleaddcode.h" />
       </qtdesigner>
     </designerintegration>

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

Modified: pcbsd/trunk/pcbsdusermanager/src/Makefile.am
===================================================================
--- pcbsd/trunk/pcbsdusermanager/src/Makefile.am	2007-02-23 22:10:19 UTC (rev 109)
+++ pcbsd/trunk/pcbsdusermanager/src/Makefile.am	2007-02-24 13:22:47 UTC (rev 110)
@@ -5,9 +5,9 @@
 kde_module_LTLIBRARIES = kcm_pcbsdusermanager.la
 
 kcm_pcbsdusermanager_la_SOURCES = pcbsdusermanager.cpp mainDlg.ui \
-						maindlgcode.cpp usermanagerback.cpp group.cpp user.cpp adduser.ui adddlgcode.cpp \
-			changepasscode.cpp changepassdialog.ui SimpleDlg.ui simpledlgcode.cpp simpleadddlg.ui \
-	simpleaddcode.cpp
+	maindlgcode.cpp usermanagerback.cpp group.cpp user.cpp adduser.ui adddlgcode.cpp \
+	changepasscode.cpp changepassdialog.ui SimpleDlg.ui simpledlgcode.cpp simpleadddlg.ui \
+	simpleaddcode.cpp notroot.ui
 kcm_pcbsdusermanager_la_LIBADD = $(LIB_KDEUI)
 kcm_pcbsdusermanager_la_LDFLAGS = -module -avoid-version $(all_libraries) -no-undefined
 

Modified: pcbsd/trunk/pcbsdusermanager/src/Makefile.in
===================================================================
--- pcbsd/trunk/pcbsdusermanager/src/Makefile.in	2007-02-23 22:10:19 UTC (rev 109)
+++ pcbsd/trunk/pcbsdusermanager/src/Makefile.in	2007-02-24 13:22:47 UTC (rev 110)
@@ -74,7 +74,7 @@
 kcm_pcbsdusermanager_la_nofinal_OBJECTS = pcbsdusermanager.lo \
 	maindlgcode.lo usermanagerback.lo group.lo user.lo \
 	adddlgcode.lo changepasscode.lo simpledlgcode.lo \
-	simpleaddcode.lo mainDlg.lo adduser.lo changepassdialog.lo SimpleDlg.lo simpleadddlg.lo\
+	simpleaddcode.lo mainDlg.lo adduser.lo changepassdialog.lo SimpleDlg.lo simpleadddlg.lo notroot.lo\
 usermanagerback.moc.lo 
 @KDE_USE_FINAL_FALSE at kcm_pcbsdusermanager_la_OBJECTS = $(kcm_pcbsdusermanager_la_nofinal_OBJECTS)
 @KDE_USE_FINAL_TRUE at kcm_pcbsdusermanager_la_OBJECTS = $(kcm_pcbsdusermanager_la_final_OBJECTS)
@@ -359,14 +359,14 @@
 # Install this plugin in the KDE modules directory
 kde_module_LTLIBRARIES = kcm_pcbsdusermanager.la
 #>- kcm_pcbsdusermanager_la_SOURCES = pcbsdusermanager.cpp mainDlg.ui \
-#>- 						maindlgcode.cpp usermanagerback.cpp group.cpp user.cpp adduser.ui adddlgcode.cpp \
-#>- 			changepasscode.cpp changepassdialog.ui SimpleDlg.ui simpledlgcode.cpp simpleadddlg.ui \
-#>- 	simpleaddcode.cpp
+#>- 	maindlgcode.cpp usermanagerback.cpp group.cpp user.cpp adduser.ui adddlgcode.cpp \
+#>- 	changepasscode.cpp changepassdialog.ui SimpleDlg.ui simpledlgcode.cpp simpleadddlg.ui \
+#>- 	simpleaddcode.cpp notroot.ui
 #>+ 4
 kcm_pcbsdusermanager_la_SOURCES=pcbsdusermanager.cpp  \
-						maindlgcode.cpp usermanagerback.cpp group.cpp user.cpp  adddlgcode.cpp \
-			changepasscode.cpp   simpledlgcode.cpp  \
-	simpleaddcode.cpp mainDlg.cpp adduser.cpp changepassdialog.cpp SimpleDlg.cpp simpleadddlg.cpp
+	maindlgcode.cpp usermanagerback.cpp group.cpp user.cpp  adddlgcode.cpp \
+	changepasscode.cpp   simpledlgcode.cpp  \
+	simpleaddcode.cpp  mainDlg.cpp adduser.cpp changepassdialog.cpp SimpleDlg.cpp simpleadddlg.cpp notroot.cpp
 
 kcm_pcbsdusermanager_la_LIBADD = $(LIB_KDEUI)
 #>- kcm_pcbsdusermanager_la_LDFLAGS = -module -avoid-version $(all_libraries) -no-undefined
@@ -773,16 +773,17 @@
 	-rm -f  simpleaddcode.moc simpledlgcode.moc changepasscode.moc adddlgcode.moc pcbsdusermanager.moc usermanagerback.moc.cpp maindlgcode.moc
 
 #>+ 2
-KDE_DIST=adduser.ui mainDlg.ui pcbsdusermanager.h group.h Makefile.in SimpleDlg.ui pcbsdusermanager.desktop changepassdialog.ui simpleadddlg.ui user.h usermanagerback.h Makefile.am 
+KDE_DIST=adduser.ui notroot.ui mainDlg.ui pcbsdusermanager.h group.h Makefile.in SimpleDlg.ui pcbsdusermanager.desktop changepassdialog.ui simpleadddlg.ui user.h usermanagerback.h Makefile.am 
 
-#>+ 8
+#>+ 9
 clean-ui:
 	-rm -f \
 	mainDlg.cpp mainDlg.h mainDlg.moc \
 	adduser.cpp adduser.h adduser.moc \
 	changepassdialog.cpp changepassdialog.h changepassdialog.moc \
 	SimpleDlg.cpp SimpleDlg.h SimpleDlg.moc \
-	simpleadddlg.cpp simpleadddlg.h simpleadddlg.moc 
+	simpleadddlg.cpp simpleadddlg.h simpleadddlg.moc \
+	notroot.cpp notroot.h notroot.moc 
 
 #>+ 3
 clean-closures:
@@ -830,11 +831,11 @@
 
 
 #>+ 11
-kcm_pcbsdusermanager_la.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/pcbsdusermanager.cpp $(srcdir)/maindlgcode.cpp $(srcdir)/usermanagerback.cpp $(srcdir)/group.cpp $(srcdir)/user.cpp $(srcdir)/adddlgcode.cpp $(srcdir)/changepasscode.cpp $(srcdir)/simpledlgcode.cpp $(srcdir)/simpleaddcode.cpp mainDlg.cpp adduser.cpp changepassdialog.cpp SimpleDlg.cpp simpleadddlg.cpp usermanagerback.moc.cpp  simpledlgcode.moc adduser.moc adddlgcode.moc pcbsdusermanager.moc simpleadddlg.moc SimpleDlg.moc mainDlg.moc simpleaddcode.moc changepasscode.moc maindlgcode.moc changepassdialog.moc
+kcm_pcbsdusermanager_la.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/pcbsdusermanager.cpp $(srcdir)/maindlgcode.cpp $(srcdir)/usermanagerback.cpp $(srcdir)/group.cpp $(srcdir)/user.cpp $(srcdir)/adddlgcode.cpp $(srcdir)/changepasscode.cpp $(srcdir)/simpledlgcode.cpp $(srcdir)/simpleaddcode.cpp mainDlg.cpp adduser.cpp changepassdialog.cpp SimpleDlg.cpp simpleadddlg.cpp notroot.cpp usermanagerback.moc.cpp  simpledlgcode.moc adduser.moc adddlgcode.moc pcbsdusermanager.moc simpleadddlg.moc notroot.moc SimpleDlg.moc mainDlg.moc simpleaddcode.moc changepasscode.moc maindlgcode.moc changepassdialog.moc
 	@echo 'creating kcm_pcbsdusermanager_la.all_cpp.cpp ...'; \
 	rm -f kcm_pcbsdusermanager_la.all_cpp.files kcm_pcbsdusermanager_la.all_cpp.final; \
 	echo "#define KDE_USE_FINAL 1" >> kcm_pcbsdusermanager_la.all_cpp.final; \
-	for file in pcbsdusermanager.cpp maindlgcode.cpp usermanagerback.cpp group.cpp user.cpp adddlgcode.cpp changepasscode.cpp simpledlgcode.cpp simpleaddcode.cpp mainDlg.cpp adduser.cpp changepassdialog.cpp SimpleDlg.cpp simpleadddlg.cpp usermanagerback.moc.cpp ; do \
+	for file in pcbsdusermanager.cpp maindlgcode.cpp usermanagerback.cpp group.cpp user.cpp adddlgcode.cpp changepasscode.cpp simpledlgcode.cpp simpleaddcode.cpp mainDlg.cpp adduser.cpp changepassdialog.cpp SimpleDlg.cpp simpleadddlg.cpp notroot.cpp usermanagerback.moc.cpp ; do \
 	  echo "#include \"$$file\"" >> kcm_pcbsdusermanager_la.all_cpp.files; \
 	  test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> kcm_pcbsdusermanager_la.all_cpp.final; \
 	done; \
@@ -867,30 +868,30 @@
 
 #>+ 24
 pcbsdusermanager.lo: pcbsdusermanager.moc 
-$(srcdir)/group.cpp: mainDlg.h adduser.h changepassdialog.h SimpleDlg.h simpleadddlg.h 
+$(srcdir)/group.cpp: mainDlg.h adduser.h changepassdialog.h SimpleDlg.h simpleadddlg.h notroot.h 
 adddlgcode.o: adddlgcode.moc 
-$(srcdir)/simpledlgcode.cpp: mainDlg.h adduser.h changepassdialog.h SimpleDlg.h simpleadddlg.h 
+$(srcdir)/simpledlgcode.cpp: mainDlg.h adduser.h changepassdialog.h SimpleDlg.h simpleadddlg.h notroot.h 
 maindlgcode.lo: maindlgcode.moc 
 changepasscode.lo: changepasscode.moc 
 simpleaddcode.lo: simpleaddcode.moc 
 maindlgcode.o: maindlgcode.moc 
-$(srcdir)/adddlgcode.cpp: mainDlg.h adduser.h changepassdialog.h SimpleDlg.h simpleadddlg.h 
+$(srcdir)/adddlgcode.cpp: mainDlg.h adduser.h changepassdialog.h SimpleDlg.h simpleadddlg.h notroot.h 
 simpledlgcode.o: simpledlgcode.moc 
-$(srcdir)/maindlgcode.cpp: mainDlg.h adduser.h changepassdialog.h SimpleDlg.h simpleadddlg.h 
-$(srcdir)/simpleaddcode.cpp: mainDlg.h adduser.h changepassdialog.h SimpleDlg.h simpleadddlg.h 
-$(srcdir)/pcbsdusermanager.cpp: mainDlg.h adduser.h changepassdialog.h SimpleDlg.h simpleadddlg.h 
-$(srcdir)/user.cpp: mainDlg.h adduser.h changepassdialog.h SimpleDlg.h simpleadddlg.h 
+$(srcdir)/maindlgcode.cpp: mainDlg.h adduser.h changepassdialog.h SimpleDlg.h simpleadddlg.h notroot.h 
+$(srcdir)/simpleaddcode.cpp: mainDlg.h adduser.h changepassdialog.h SimpleDlg.h simpleadddlg.h notroot.h 
+$(srcdir)/pcbsdusermanager.cpp: mainDlg.h adduser.h changepassdialog.h SimpleDlg.h simpleadddlg.h notroot.h 
+$(srcdir)/user.cpp: mainDlg.h adduser.h changepassdialog.h SimpleDlg.h simpleadddlg.h notroot.h 
 nmcheck: 
-$(srcdir)/usermanagerback.cpp: mainDlg.h adduser.h changepassdialog.h SimpleDlg.h simpleadddlg.h 
+$(srcdir)/usermanagerback.cpp: mainDlg.h adduser.h changepassdialog.h SimpleDlg.h simpleadddlg.h notroot.h 
 nmcheck-am: nmcheck
 simpledlgcode.lo: simpledlgcode.moc 
 adddlgcode.lo: adddlgcode.moc 
-$(srcdir)/changepasscode.cpp: mainDlg.h adduser.h changepassdialog.h SimpleDlg.h simpleadddlg.h 
+$(srcdir)/changepasscode.cpp: mainDlg.h adduser.h changepassdialog.h SimpleDlg.h simpleadddlg.h notroot.h 
 simpleaddcode.o: simpleaddcode.moc 
 pcbsdusermanager.o: pcbsdusermanager.moc 
 changepasscode.o: changepasscode.moc 
 
-#>+ 75
+#>+ 90
 simpleadddlg.cpp: $(srcdir)/simpleadddlg.ui simpleadddlg.h simpleadddlg.moc
 	rm -f simpleadddlg.cpp
 	echo '#include <kdialog.h>' > simpleadddlg.cpp
@@ -921,6 +922,21 @@
 changepassdialog.moc: changepassdialog.h
 	$(MOC) changepassdialog.h -o changepassdialog.moc
 
+notroot.cpp: $(srcdir)/notroot.ui notroot.h notroot.moc
+	rm -f notroot.cpp
+	echo '#include <kdialog.h>' > notroot.cpp
+	echo '#include <klocale.h>' >> notroot.cpp
+	$(UIC) -tr ${UIC_TR} -i notroot.h $(srcdir)/notroot.ui > notroot.cpp.temp ; ret=$$?; \
+	$(PERL) -pe "s,${UIC_TR}( \"\" ),QString::null,g" notroot.cpp.temp | $(PERL) -pe "s,${UIC_TR}( \"\"\, \"\" ),QString::null,g" | $(PERL) -pe "s,image([0-9][0-9]*)_data,img\$$1_notroot,g" | $(PERL) -pe "s,: QWizard\(,: KWizard(,g" >> notroot.cpp ;\
+	rm -f notroot.cpp.temp ;\
+	if test "$$ret" = 0; then echo '#include "notroot.moc"' >> notroot.cpp; else rm -f notroot.cpp ; exit $$ret ; fi
+
+notroot.h: $(srcdir)/notroot.ui
+	rm -rf notroot.h;
+	$(UIC) $(srcdir)/notroot.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <qwizard.h>,#include <kwizard.h>,g" >> notroot.h ;
+notroot.moc: notroot.h
+	$(MOC) notroot.h -o notroot.moc
+
 SimpleDlg.cpp: $(srcdir)/SimpleDlg.ui SimpleDlg.h SimpleDlg.moc
 	rm -f SimpleDlg.cpp
 	echo '#include <kdialog.h>' > SimpleDlg.cpp

Added: pcbsd/trunk/pcbsdusermanager/src/notroot.ui


Property changes on: pcbsd/trunk/pcbsdusermanager/src/notroot.ui
___________________________________________________________________
Name: svn:executable
   + *

Modified: pcbsd/trunk/pcbsdusermanager/src/pcbsdusermanager.cpp
===================================================================
--- pcbsd/trunk/pcbsdusermanager/src/pcbsdusermanager.cpp	2007-02-23 22:10:19 UTC (rev 109)
+++ pcbsd/trunk/pcbsdusermanager/src/pcbsdusermanager.cpp	2007-02-24 13:22:47 UTC (rev 110)
@@ -53,13 +53,21 @@
     layout->setAutoAdd(true);
     advancedGui = new mainDlgCode(back);
     simpleGui = new SimpleDlgCode(back);
-    simpleGui->reparent(this, QPoint());
     load();
-    
-    connect(advancedGui, SIGNAL(changed( bool )), this, SLOT(configChanged()));
-    connect(simpleGui, SIGNAL(advancedView()), this, SLOT(switchToAdvanced()));
-    connect(advancedGui, SIGNAL(simpleView()), this, SLOT(switchToSimple()));
-    connect(simpleGui, SIGNAL(changed()), this, SLOT(configChanged()));
+    if (getuid() == 0) //Check for root
+    {
+        simpleGui->reparent(this, QPoint());
+        
+        connect(advancedGui, SIGNAL(changed( bool )), this, SLOT(configChanged()));
+        connect(simpleGui, SIGNAL(advancedView()), this, SLOT(switchToAdvanced()));
+        connect(advancedGui, SIGNAL(simpleView()), this, SLOT(switchToSimple()));
+        connect(simpleGui, SIGNAL(changed()), this, SLOT(configChanged()));
+    }
+    else
+    {
+        notRootGui = new NotRoot();
+        notRootGui->reparent(this, QPoint());
+    }
 };
 
 

Modified: pcbsd/trunk/pcbsdusermanager/src/pcbsdusermanager.h
===================================================================
--- pcbsd/trunk/pcbsdusermanager/src/pcbsdusermanager.h	2007-02-23 22:10:19 UTC (rev 109)
+++ pcbsd/trunk/pcbsdusermanager/src/pcbsdusermanager.h	2007-02-24 13:22:47 UTC (rev 110)
@@ -32,6 +32,7 @@
 #include "maindlgcode.h"
 #include "usermanagerback.h"
 #include "simpledlgcode.h"
+#include "notroot.h"
 
 class PCBSDUserManager: public KCModule
 {
@@ -57,6 +58,7 @@
     mainDlgCode *advancedGui;
     UserManagerBackend *back;
     SimpleDlgCode *simpleGui;
+    NotRoot *notRootGui;
 };
 
 #endif

Modified: pcbsd/trunk/pcbsdusermanager/src/user.cpp
===================================================================
--- pcbsd/trunk/pcbsdusermanager/src/user.cpp	2007-02-23 22:10:19 UTC (rev 109)
+++ pcbsd/trunk/pcbsdusermanager/src/user.cpp	2007-02-24 13:22:47 UTC (rev 110)
@@ -127,6 +127,7 @@
 void User::setPassword(QString password)
 {
     this->password = crypt(password, "KG");
+    setChanges();
 }
 
 QString User::getPassword()



More information about the Commits mailing list