From 763b290f0123855a1d9e8fde0583297e0ce5941b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Mon, 22 Jul 2013 01:21:51 +0200 Subject: Rename kdepasswd -> tdepasswd --- CMakeLists.txt | 4 +- README | 2 +- kdepasswd/CMakeLists.txt | 37 ---- kdepasswd/LICENSE.readme | 124 ------------ kdepasswd/Makefile.am | 17 -- kdepasswd/README | 3 - kdepasswd/kcm/CMakeLists.txt | 44 ---- kdepasswd/kcm/Makefile.am | 20 -- kdepasswd/kcm/README | 27 --- kdepasswd/kcm/chfacedlg.cpp | 188 ----------------- kdepasswd/kcm/chfacedlg.h | 69 ------- kdepasswd/kcm/chfnprocess.cpp | 100 ---------- kdepasswd/kcm/chfnprocess.h | 33 --- kdepasswd/kcm/kcm_useraccount.desktop | 203 ------------------- kdepasswd/kcm/kcm_useraccount.kcfg | 44 ---- kdepasswd/kcm/kcm_useraccount_pass.kcfg | 21 -- kdepasswd/kcm/main.cpp | 343 -------------------------------- kdepasswd/kcm/main.h | 79 -------- kdepasswd/kcm/main_widget.ui | 294 --------------------------- kdepasswd/kcm/pass.kcfgc | 5 - kdepasswd/kcm/pics/Apple.png | Bin 3749 -> 0 bytes kdepasswd/kcm/pics/BeachBall.png | Bin 4104 -> 0 bytes kdepasswd/kcm/pics/Blowfish.png | Bin 5031 -> 0 bytes kdepasswd/kcm/pics/Bug.png | Bin 4304 -> 0 bytes kdepasswd/kcm/pics/Butterfly.png | Bin 4952 -> 0 bytes kdepasswd/kcm/pics/CMakeLists.txt | 19 -- kdepasswd/kcm/pics/CREDITS | 21 -- kdepasswd/kcm/pics/Car.png | Bin 4602 -> 0 bytes kdepasswd/kcm/pics/Cow.png | Bin 6275 -> 0 bytes kdepasswd/kcm/pics/Daemon.png | Bin 5642 -> 0 bytes kdepasswd/kcm/pics/Dog.png | Bin 5637 -> 0 bytes kdepasswd/kcm/pics/Elephant.png | Bin 6384 -> 0 bytes kdepasswd/kcm/pics/Flower.png | Bin 4423 -> 0 bytes kdepasswd/kcm/pics/Frog.png | Bin 4511 -> 0 bytes kdepasswd/kcm/pics/Ghost.png | Bin 4752 -> 0 bytes kdepasswd/kcm/pics/Guitar.png | Bin 4622 -> 0 bytes kdepasswd/kcm/pics/Heart.png | Bin 3778 -> 0 bytes kdepasswd/kcm/pics/Konqui.png | Bin 5652 -> 0 bytes kdepasswd/kcm/pics/Lion.png | Bin 7820 -> 0 bytes kdepasswd/kcm/pics/Makefile.am | 10 - kdepasswd/kcm/pics/Monkey.png | Bin 5479 -> 0 bytes kdepasswd/kcm/pics/Penguin.png | Bin 4829 -> 0 bytes kdepasswd/kcm/pics/Pig.png | Bin 6057 -> 0 bytes kdepasswd/kcm/pics/Rabbit.png | Bin 4834 -> 0 bytes kdepasswd/kcm/pics/Ring.png | Bin 5143 -> 0 bytes kdepasswd/kcm/pics/Scream.png | Bin 5543 -> 0 bytes kdepasswd/kcm/pics/Shark.png | Bin 4224 -> 0 bytes kdepasswd/kcm/pics/Splash.png | Bin 4847 -> 0 bytes kdepasswd/kcm/pics/Star.png | Bin 2991 -> 0 bytes kdepasswd/kcm/pics/Teddybear.png | Bin 5580 -> 0 bytes kdepasswd/kcm/pics/Turtle.png | Bin 5208 -> 0 bytes kdepasswd/kcm/settings.kcfgc | 5 - kdepasswd/kdepasswd.cpp | 79 -------- kdepasswd/kdepasswd.desktop | 80 -------- kdepasswd/passwd.cpp | 284 -------------------------- kdepasswd/passwd.h | 43 ---- kdepasswd/passwddlg.cpp | 169 ---------------- kdepasswd/passwddlg.h | 49 ----- tdepasswd/CMakeLists.txt | 37 ++++ tdepasswd/LICENSE.readme | 124 ++++++++++++ tdepasswd/Makefile.am | 17 ++ tdepasswd/README | 3 + tdepasswd/kcm/CMakeLists.txt | 44 ++++ tdepasswd/kcm/Makefile.am | 20 ++ tdepasswd/kcm/README | 27 +++ tdepasswd/kcm/chfacedlg.cpp | 188 +++++++++++++++++ tdepasswd/kcm/chfacedlg.h | 69 +++++++ tdepasswd/kcm/chfnprocess.cpp | 100 ++++++++++ tdepasswd/kcm/chfnprocess.h | 33 +++ tdepasswd/kcm/kcm_useraccount.desktop | 203 +++++++++++++++++++ tdepasswd/kcm/kcm_useraccount.kcfg | 44 ++++ tdepasswd/kcm/kcm_useraccount_pass.kcfg | 21 ++ tdepasswd/kcm/main.cpp | 343 ++++++++++++++++++++++++++++++++ tdepasswd/kcm/main.h | 79 ++++++++ tdepasswd/kcm/main_widget.ui | 294 +++++++++++++++++++++++++++ tdepasswd/kcm/pass.kcfgc | 5 + tdepasswd/kcm/pics/Apple.png | Bin 0 -> 3749 bytes tdepasswd/kcm/pics/BeachBall.png | Bin 0 -> 4104 bytes tdepasswd/kcm/pics/Blowfish.png | Bin 0 -> 5031 bytes tdepasswd/kcm/pics/Bug.png | Bin 0 -> 4304 bytes tdepasswd/kcm/pics/Butterfly.png | Bin 0 -> 4952 bytes tdepasswd/kcm/pics/CMakeLists.txt | 19 ++ tdepasswd/kcm/pics/CREDITS | 21 ++ tdepasswd/kcm/pics/Car.png | Bin 0 -> 4602 bytes tdepasswd/kcm/pics/Cow.png | Bin 0 -> 6275 bytes tdepasswd/kcm/pics/Daemon.png | Bin 0 -> 5642 bytes tdepasswd/kcm/pics/Dog.png | Bin 0 -> 5637 bytes tdepasswd/kcm/pics/Elephant.png | Bin 0 -> 6384 bytes tdepasswd/kcm/pics/Flower.png | Bin 0 -> 4423 bytes tdepasswd/kcm/pics/Frog.png | Bin 0 -> 4511 bytes tdepasswd/kcm/pics/Ghost.png | Bin 0 -> 4752 bytes tdepasswd/kcm/pics/Guitar.png | Bin 0 -> 4622 bytes tdepasswd/kcm/pics/Heart.png | Bin 0 -> 3778 bytes tdepasswd/kcm/pics/Konqui.png | Bin 0 -> 5652 bytes tdepasswd/kcm/pics/Lion.png | Bin 0 -> 7820 bytes tdepasswd/kcm/pics/Makefile.am | 10 + tdepasswd/kcm/pics/Monkey.png | Bin 0 -> 5479 bytes tdepasswd/kcm/pics/Penguin.png | Bin 0 -> 4829 bytes tdepasswd/kcm/pics/Pig.png | Bin 0 -> 6057 bytes tdepasswd/kcm/pics/Rabbit.png | Bin 0 -> 4834 bytes tdepasswd/kcm/pics/Ring.png | Bin 0 -> 5143 bytes tdepasswd/kcm/pics/Scream.png | Bin 0 -> 5543 bytes tdepasswd/kcm/pics/Shark.png | Bin 0 -> 4224 bytes tdepasswd/kcm/pics/Splash.png | Bin 0 -> 4847 bytes tdepasswd/kcm/pics/Star.png | Bin 0 -> 2991 bytes tdepasswd/kcm/pics/Teddybear.png | Bin 0 -> 5580 bytes tdepasswd/kcm/pics/Turtle.png | Bin 0 -> 5208 bytes tdepasswd/kcm/settings.kcfgc | 5 + tdepasswd/passwd.cpp | 284 ++++++++++++++++++++++++++ tdepasswd/passwd.h | 43 ++++ tdepasswd/passwddlg.cpp | 169 ++++++++++++++++ tdepasswd/passwddlg.h | 49 +++++ tdepasswd/tdepasswd.cpp | 79 ++++++++ tdepasswd/tdepasswd.desktop | 80 ++++++++ tdmlib/kgreeterplugin.h | 2 +- 115 files changed, 2414 insertions(+), 2414 deletions(-) delete mode 100644 kdepasswd/CMakeLists.txt delete mode 100644 kdepasswd/LICENSE.readme delete mode 100644 kdepasswd/Makefile.am delete mode 100644 kdepasswd/README delete mode 100644 kdepasswd/kcm/CMakeLists.txt delete mode 100644 kdepasswd/kcm/Makefile.am delete mode 100644 kdepasswd/kcm/README delete mode 100644 kdepasswd/kcm/chfacedlg.cpp delete mode 100644 kdepasswd/kcm/chfacedlg.h delete mode 100644 kdepasswd/kcm/chfnprocess.cpp delete mode 100644 kdepasswd/kcm/chfnprocess.h delete mode 100644 kdepasswd/kcm/kcm_useraccount.desktop delete mode 100644 kdepasswd/kcm/kcm_useraccount.kcfg delete mode 100644 kdepasswd/kcm/kcm_useraccount_pass.kcfg delete mode 100644 kdepasswd/kcm/main.cpp delete mode 100644 kdepasswd/kcm/main.h delete mode 100644 kdepasswd/kcm/main_widget.ui delete mode 100644 kdepasswd/kcm/pass.kcfgc delete mode 100644 kdepasswd/kcm/pics/Apple.png delete mode 100644 kdepasswd/kcm/pics/BeachBall.png delete mode 100644 kdepasswd/kcm/pics/Blowfish.png delete mode 100644 kdepasswd/kcm/pics/Bug.png delete mode 100644 kdepasswd/kcm/pics/Butterfly.png delete mode 100644 kdepasswd/kcm/pics/CMakeLists.txt delete mode 100644 kdepasswd/kcm/pics/CREDITS delete mode 100644 kdepasswd/kcm/pics/Car.png delete mode 100644 kdepasswd/kcm/pics/Cow.png delete mode 100644 kdepasswd/kcm/pics/Daemon.png delete mode 100644 kdepasswd/kcm/pics/Dog.png delete mode 100644 kdepasswd/kcm/pics/Elephant.png delete mode 100644 kdepasswd/kcm/pics/Flower.png delete mode 100644 kdepasswd/kcm/pics/Frog.png delete mode 100644 kdepasswd/kcm/pics/Ghost.png delete mode 100644 kdepasswd/kcm/pics/Guitar.png delete mode 100644 kdepasswd/kcm/pics/Heart.png delete mode 100644 kdepasswd/kcm/pics/Konqui.png delete mode 100644 kdepasswd/kcm/pics/Lion.png delete mode 100644 kdepasswd/kcm/pics/Makefile.am delete mode 100644 kdepasswd/kcm/pics/Monkey.png delete mode 100644 kdepasswd/kcm/pics/Penguin.png delete mode 100644 kdepasswd/kcm/pics/Pig.png delete mode 100644 kdepasswd/kcm/pics/Rabbit.png delete mode 100644 kdepasswd/kcm/pics/Ring.png delete mode 100644 kdepasswd/kcm/pics/Scream.png delete mode 100644 kdepasswd/kcm/pics/Shark.png delete mode 100644 kdepasswd/kcm/pics/Splash.png delete mode 100644 kdepasswd/kcm/pics/Star.png delete mode 100644 kdepasswd/kcm/pics/Teddybear.png delete mode 100644 kdepasswd/kcm/pics/Turtle.png delete mode 100644 kdepasswd/kcm/settings.kcfgc delete mode 100644 kdepasswd/kdepasswd.cpp delete mode 100644 kdepasswd/kdepasswd.desktop delete mode 100644 kdepasswd/passwd.cpp delete mode 100644 kdepasswd/passwd.h delete mode 100644 kdepasswd/passwddlg.cpp delete mode 100644 kdepasswd/passwddlg.h create mode 100644 tdepasswd/CMakeLists.txt create mode 100644 tdepasswd/LICENSE.readme create mode 100644 tdepasswd/Makefile.am create mode 100644 tdepasswd/README create mode 100644 tdepasswd/kcm/CMakeLists.txt create mode 100644 tdepasswd/kcm/Makefile.am create mode 100644 tdepasswd/kcm/README create mode 100644 tdepasswd/kcm/chfacedlg.cpp create mode 100644 tdepasswd/kcm/chfacedlg.h create mode 100644 tdepasswd/kcm/chfnprocess.cpp create mode 100644 tdepasswd/kcm/chfnprocess.h create mode 100644 tdepasswd/kcm/kcm_useraccount.desktop create mode 100644 tdepasswd/kcm/kcm_useraccount.kcfg create mode 100644 tdepasswd/kcm/kcm_useraccount_pass.kcfg create mode 100644 tdepasswd/kcm/main.cpp create mode 100644 tdepasswd/kcm/main.h create mode 100644 tdepasswd/kcm/main_widget.ui create mode 100644 tdepasswd/kcm/pass.kcfgc create mode 100644 tdepasswd/kcm/pics/Apple.png create mode 100644 tdepasswd/kcm/pics/BeachBall.png create mode 100644 tdepasswd/kcm/pics/Blowfish.png create mode 100644 tdepasswd/kcm/pics/Bug.png create mode 100644 tdepasswd/kcm/pics/Butterfly.png create mode 100644 tdepasswd/kcm/pics/CMakeLists.txt create mode 100644 tdepasswd/kcm/pics/CREDITS create mode 100644 tdepasswd/kcm/pics/Car.png create mode 100644 tdepasswd/kcm/pics/Cow.png create mode 100644 tdepasswd/kcm/pics/Daemon.png create mode 100644 tdepasswd/kcm/pics/Dog.png create mode 100644 tdepasswd/kcm/pics/Elephant.png create mode 100644 tdepasswd/kcm/pics/Flower.png create mode 100644 tdepasswd/kcm/pics/Frog.png create mode 100644 tdepasswd/kcm/pics/Ghost.png create mode 100644 tdepasswd/kcm/pics/Guitar.png create mode 100644 tdepasswd/kcm/pics/Heart.png create mode 100644 tdepasswd/kcm/pics/Konqui.png create mode 100644 tdepasswd/kcm/pics/Lion.png create mode 100644 tdepasswd/kcm/pics/Makefile.am create mode 100644 tdepasswd/kcm/pics/Monkey.png create mode 100644 tdepasswd/kcm/pics/Penguin.png create mode 100644 tdepasswd/kcm/pics/Pig.png create mode 100644 tdepasswd/kcm/pics/Rabbit.png create mode 100644 tdepasswd/kcm/pics/Ring.png create mode 100644 tdepasswd/kcm/pics/Scream.png create mode 100644 tdepasswd/kcm/pics/Shark.png create mode 100644 tdepasswd/kcm/pics/Splash.png create mode 100644 tdepasswd/kcm/pics/Star.png create mode 100644 tdepasswd/kcm/pics/Teddybear.png create mode 100644 tdepasswd/kcm/pics/Turtle.png create mode 100644 tdepasswd/kcm/settings.kcfgc create mode 100644 tdepasswd/passwd.cpp create mode 100644 tdepasswd/passwd.h create mode 100644 tdepasswd/passwddlg.cpp create mode 100644 tdepasswd/passwddlg.h create mode 100644 tdepasswd/tdepasswd.cpp create mode 100644 tdepasswd/tdepasswd.desktop diff --git a/CMakeLists.txt b/CMakeLists.txt index e717aad37..2339436cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,7 +153,7 @@ option( BUILD_KLIPPER "Build klipper" ${BUILD_ALL} ) option( BUILD_KMENUEDIT "Build kmenuedit" ${BUILD_ALL} ) option( BUILD_TDEPRINT "Build tdeprint" ${BUILD_ALL} ) option( BUILD_KPERSONALIZER "Build kpersonalizer" ${BUILD_ALL} ) -option( BUILD_KDEPASSWD "Build kdepasswd" ${BUILD_ALL} ) +option( BUILD_TDEPASSWD "Build tdepasswd" ${BUILD_ALL} ) option( BUILD_KTIP "Build ktip" ${BUILD_ALL} ) option( BUILD_KDEEJECT "Build kdeeject" ${BUILD_ALL} ) option( BUILD_KDIALOG "Build kdialog" ${BUILD_ALL} ) @@ -232,7 +232,7 @@ tde_conditional_add_subdirectory( BUILD_KLIPPER klipper ) tde_conditional_add_subdirectory( BUILD_KMENUEDIT kmenuedit ) tde_conditional_add_subdirectory( BUILD_TDEPRINT tdeprint ) tde_conditional_add_subdirectory( BUILD_KPERSONALIZER kpersonalizer ) -tde_conditional_add_subdirectory( BUILD_KDEPASSWD kdepasswd ) +tde_conditional_add_subdirectory( BUILD_TDEPASSWD tdepasswd ) tde_conditional_add_subdirectory( BUILD_KTIP ktip ) tde_conditional_add_subdirectory( BUILD_KDEEJECT kdeeject ) tde_conditional_add_subdirectory( BUILD_KDIALOG kdialog ) diff --git a/README b/README index c429c4be9..01e295240 100644 --- a/README +++ b/README @@ -114,7 +114,7 @@ libraries. Here is an overview of the directories: The KDE session manager (saves program status on login, restarts those program at the next login). -* kdepasswd +* tdepasswd A KDE frontend for passwd. Also contains the "Password & User Information" KCM. * ksplashml diff --git a/kdepasswd/CMakeLists.txt b/kdepasswd/CMakeLists.txt deleted file mode 100644 index 887362b28..000000000 --- a/kdepasswd/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_subdirectory( kcm ) - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR} - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### other data ################################ - -install( FILES kdepasswd.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) - - -##### kdepasswd (executable) #################### - -tde_add_executable( kdepasswd AUTOMOC - SOURCES kdepasswd.cpp passwd.cpp passwddlg.cpp - LINK tdeio-shared - DESTINATION ${BIN_INSTALL_DIR} -) diff --git a/kdepasswd/LICENSE.readme b/kdepasswd/LICENSE.readme deleted file mode 100644 index 23b7877d0..000000000 --- a/kdepasswd/LICENSE.readme +++ /dev/null @@ -1,124 +0,0 @@ -kdepasswd - a KDE front end to passwd - -Copyright (c) 1999,2000 by Geert Jansen - - The "Artistic License" - - Preamble - - The intent of this document is to state the conditions under which a - Package may be copied, such that the Copyright Holder maintains some - semblance of artistic control over the development of the package, - while giving the users of the package the right to use and - distribute the Package in a more-or-less customary fashion, plus the - right to make reasonable modifications. - - Definitions: - - * "Package" refers to the collection of files distributed by the - Copyright Holder, and derivatives of that collection of files - created through textual modification. - - * "Standard Version" refers to such a Package if it has not been - modified, or has been modified in accordance with the wishes of - the Copyright Holder. - - * "Copyright Holder" is whoever is named in the copyright or - copyrights for the package. - - * "You" is you, if you're thinking about copying or distributing - this Package. - - * "Reasonable copying fee" is whatever you can justify on the - basis of media cost, duplication charges, time of people - involved, and so on. (You will not be required to justify it to - the Copyright Holder, but only to the computing community at - large as a market that must bear the fee.) - - * "Freely Available" means that no fee is charged for the item - itself, though there may be fees involved in handling the item. - It also means that recipients of the item may redistribute it - under the same conditions they received it. - - 1. You may make and give away verbatim copies of the source form of - the Standard Version of this Package without restriction, provided - that you duplicate all of the original copyright notices and - associated disclaimers. - - 2. You may apply bug fixes, portability fixes and other - modifications derived from the Public Domain or from the Copyright - Holder. A Package modified in such a way shall still be considered - the Standard Version. - - 3. You may otherwise modify your copy of this Package in any way, - provided that you insert a prominent notice in each changed file - stating how and when you changed that file, and provided that you do - at least ONE of the following: - - a) place your modifications in the Public Domain or - otherwise make them Freely Available, such as by posting - said modifications to Usenet or an equivalent medium, or - placing the modifications on a major archive site such as - ftp.uu.net, or by allowing the Copyright Holder to include - your modifications in the Standard Version of the Package. - - b) use the modified Package only within your corporation - or organization. - - c) rename any non-standard executables so the names do not - conflict with standard executables, which must also be - provided, and provide a separate manual page for each - non-standard executable that clearly documents how it - differs from the Standard Version. - - d) make other distribution arrangements with the Copyright - Holder. - - 4. You may distribute the programs of this Package in object code or - executable form, provided that you do at least ONE of the following: - - a) distribute a Standard Version of the executables and - library files, together with instructions (in the manual - page or equivalent) on where to get the Standard Version. - - b) accompany the distribution with the machine-readable - source of the Package with your modifications. - - c) accompany any non-standard executables with their - corresponding Standard Version executables, giving the - non-standard executables non-standard names, and clearly - documenting the differences in manual pages (or - equivalent), together with instructions on where to get - the Standard Version. - - d) make other distribution arrangements with the Copyright - Holder. - - 5. You may charge a reasonable copying fee for any distribution of - this Package. You may charge any fee you choose for support of this - Package. You may not charge a fee for this Package itself. However, - you may distribute this Package in aggregate with other (possibly - commercial) programs as part of a larger (possibly commercial) - software distribution provided that you do not advertise this - Package as a product of your own. - - 6. The scripts and library files supplied as input to or produced as - output from the programs of this Package do not automatically fall - under the copyright of this Package, but belong to whomever - generated them, and may be sold commercially, and may be aggregated - with this Package. - - 7. C or perl subroutines supplied by you and linked into this - Package shall not be considered part of this Package. - - 8. The name of the Copyright Holder may not be used to endorse or - promote products derived from this software without specific prior - written permission. - - 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - The End - - diff --git a/kdepasswd/Makefile.am b/kdepasswd/Makefile.am deleted file mode 100644 index 3a5c6e626..000000000 --- a/kdepasswd/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ - -SUBDIRS = kcm - -bin_PROGRAMS = kdepasswd -kdepasswd_SOURCES = kdepasswd.cpp passwd.cpp passwddlg.cpp -kdepasswd_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -kdepasswd_LDADD = $(LIB_KIO) - -METASOURCES = AUTO -AM_CPPFLAGS= -I$(top_srcdir)/libkonq $(all_includes) -noinst_HEADERS = passwd.h passwddlg.h - -xdg_apps_DATA = kdepasswd.desktop - -messages: - $(XGETTEXT) $(kdepasswd_SOURCES) -o $(podir)/kdepasswd.pot - diff --git a/kdepasswd/README b/kdepasswd/README deleted file mode 100644 index 50bbe54fd..000000000 --- a/kdepasswd/README +++ /dev/null @@ -1,3 +0,0 @@ -kdepasswd: A KDE front end to the Unix passwd command. - -Please report bugs to Geert Jansen diff --git a/kdepasswd/kcm/CMakeLists.txt b/kdepasswd/kcm/CMakeLists.txt deleted file mode 100644 index 338a4f4cb..000000000 --- a/kdepasswd/kcm/CMakeLists.txt +++ /dev/null @@ -1,44 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -if( NOT BUILD_LIBKONQ ) - include( "${TDE_CMAKE_DIR}/libkonq.cmake" ) -endif( NOT BUILD_LIBKONQ ) - -add_subdirectory( pics ) - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/libkonq - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### other data ################################ - -install( FILES kcm_useraccount.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) -install( FILES kcm_useraccount.kcfg kcm_useraccount_pass.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) - - -##### kcm_useraccount (module) ################## - -tde_add_kpart( kcm_useraccount AUTOMOC - SOURCES - main_widget.ui chfnprocess.cpp main.cpp - chfacedlg.cpp settings.kcfgc pass.kcfgc - LINK konq-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kdepasswd/kcm/Makefile.am b/kdepasswd/kcm/Makefile.am deleted file mode 100644 index fee3b3cd2..000000000 --- a/kdepasswd/kcm/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -SUBDIRS = pics -kde_module_LTLIBRARIES = kcm_useraccount.la -kcm_useraccount_la_SOURCES = main_widget.ui chfnprocess.cpp \ - main.cpp chfacedlg.cpp settings.kcfgc pass.kcfgc -kcm_useraccount_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined -kcm_useraccount_la_LIBADD = $(top_builddir)/libkonq/libkonq.la - -AM_CPPFLAGS = -I$(top_srcdir)/libkonq $(all_includes) - -kde_kcfg_DATA = kcm_useraccount.kcfg kcm_useraccount_pass.kcfg - -METASOURCES = AUTO - -noinst_HEADERS = main.h chfnprocess.h chfacedlg.h - -xdg_apps_DATA = kcm_useraccount.desktop - - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/useraccount.pot diff --git a/kdepasswd/kcm/README b/kdepasswd/kcm/README deleted file mode 100644 index 467862f48..000000000 --- a/kdepasswd/kcm/README +++ /dev/null @@ -1,27 +0,0 @@ - -Thu Jan 29 00:34:49 CET 2004 -Frans Englich - -KCM useraccount is a merge of the former tdebase/kcontrol/email -and tdeutils/kdepasswd/userinfo/. They existed in KDE 3.1, at least. - -As a bonus, on top of saving the stuff with KEMailSettings it tries -also to save the realname to /etc/passwd. This is done via chfn, wrapped -in ChfnProcess, chfnprocess.h - which is the place to ifdef/modify so -other systems/ychfn/whatever works. -/etc/passwd is not the primary goal, the focus is on KDE's settings. The KCM -tries to hide the implementation differences and play nice with the -user - keep that in mind. - -The "face" term is rather scary.. For example I don't think the user immediately -associate to the login image when a phrase such as this is thrown in the face: -"Your administrator has disallowed changing your face". Keep it in mind.. - -Some information which was available in userinfo is left out - the home -folder and shell info. A typical user is not interested in the info nor -knows what it means. And the advanced users already knows it. - -If further information is added, think twice if it should not be -added in a "Details..." dialog - is it useful for the majority or not? -The SMTP setting as well as UID should be moved to that dialog too, IMO. - diff --git a/kdepasswd/kcm/chfacedlg.cpp b/kdepasswd/kcm/chfacedlg.cpp deleted file mode 100644 index 0a3dbfb78..000000000 --- a/kdepasswd/kcm/chfacedlg.cpp +++ /dev/null @@ -1,188 +0,0 @@ -/** - * Copyright 2003 Braden MacDonald - * Copyright 2003 Ravikiran Rajagopal - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * - * - * Please see the README - * - */ - -/** - * @file UserInfo's Dialog for changing your face. - * @author Braden MacDonald - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "chfacedlg.h" -#include "settings.h" // TDEConfigXT - - - -/** - * TODO: It would be nice if the widget were in a .ui - */ -ChFaceDlg::ChFaceDlg(const TQString& picsdir, TQWidget *parent, const char *name, bool modal) - : KDialogBase( parent, name, modal, i18n("Change your Face"), Ok|Cancel, Ok, true ) -{ - TQWidget *page = new TQWidget(this); - setMainWidget( page ); - - TQVBoxLayout *top = new TQVBoxLayout(page, 0, spacingHint()); - - TQLabel *header = new TQLabel( i18n("Select a new face:"), page ); - top->addWidget( header ); - - m_FacesWidget = new TDEIconView( page ); - m_FacesWidget->setSelectionMode( TQIconView::Single ); - m_FacesWidget->setItemsMovable( false ); - m_FacesWidget->setMinimumSize( 400, 200 ); - - connect( m_FacesWidget, TQT_SIGNAL( selectionChanged( TQIconViewItem * ) ), TQT_SLOT( slotFaceWidgetSelectionChanged( TQIconViewItem * ) ) ); - - connect( m_FacesWidget, TQT_SIGNAL( doubleClicked( TQIconViewItem *, const TQPoint & ) ), TQT_SLOT( slotOk() ) ); - - top->addWidget( m_FacesWidget ); - - // Buttons to get more pics - TQHBoxLayout * morePics = new TQHBoxLayout( 0, 0, spacingHint() ); - TQPushButton *browseBtn = new TQPushButton( i18n("Custom &Image..."), page ); - connect( browseBtn, TQT_SIGNAL( clicked() ), TQT_SLOT( slotGetCustomImage() ) ); - morePics->addWidget( browseBtn ); -#if 0 - TQPushButton *acquireBtn = new TQPushButton( i18n("&Acquire Image..."), page ); - acquireBtn->setEnabled( false ); - morePics->addWidget( acquireBtn ); -#endif - morePics->addStretch(); - top->addLayout( morePics ); - - // Filling the icon view - TQDir facesDir( picsdir ); - if ( facesDir.exists() ) - { - TQStringList picslist = facesDir.entryList( TQDir::Files ); - for ( TQStringList::Iterator it = picslist.begin(); it != picslist.end(); ++it ) - new TQIconViewItem( m_FacesWidget, (*it).section(".",0,0), TQPixmap( picsdir + *it ) ); - } - facesDir.setPath( KCFGUserAccount::userFaceDir() ); - if ( facesDir.exists() ) - { - TQStringList picslist = facesDir.entryList( TQDir::Files ); - for ( TQStringList::Iterator it = picslist.begin(); it != picslist.end(); ++it ) - new TQIconViewItem( m_FacesWidget, "/"+(*it) == KCFGUserAccount::customFaceFile() ? - i18n("(Custom)") : (*it).section(".",0,0), - TQPixmap( KCFGUserAccount::userFaceDir() + *it ) ); - } - - m_FacesWidget->setResizeMode( TQIconView::Adjust ); - //m_FacesWidget->setGridX( FACE_PIX_SIZE - 10 ); - m_FacesWidget->arrangeItemsInGrid(); - - enableButtonOK( false ); - //connect( this, TQT_SIGNAL( okClicked() ), TQT_SLOT( slotSaveCustomImage() ) ); - - resize( 420, 400 ); -} - -void ChFaceDlg::addCustomPixmap( TQString imPath, bool saveCopy ) -{ - TQImage pix( imPath ); - // TODO: save pix to TMPDIR/userinfo-tmp, - // then scale and copy *that* to ~/.faces - - if (pix.isNull()) - { - KMessageBox::sorry( this, i18n("There was an error loading the image.") ); - return; - } - if ( (pix.width() > KCFGUserAccount::faceSize()) - || (pix.height() > KCFGUserAccount::faceSize()) ) - pix = pix.scale( KCFGUserAccount::faceSize(), KCFGUserAccount::faceSize(), TQ_ScaleMin );// Should be no bigger than certain size. - - if ( saveCopy ) - { - // If we should save a copy: - TQDir userfaces( KCFGUserAccount::userFaceDir() ); - if ( !userfaces.exists( ) ) - userfaces.mkdir( userfaces.absPath() ); - - pix.save( userfaces.absPath() + "/.userinfo-tmp" , "PNG" ); - KonqOperations::copy( this, KonqOperations::COPY, KURL::List( KURL( userfaces.absPath() + "/.userinfo-tmp" ) ), KURL( userfaces.absPath() + "/" + TQFileInfo(imPath).fileName().section(".",0,0) ) ); -#if 0 - if ( !pix.save( userfaces.absPath() + "/" + imPath , "PNG" ) ) - KMessageBox::sorry(this, i18n("There was an error saving the image:\n%1").arg( userfaces.absPath() ) ); -#endif - } - - TQIconViewItem* newface = new TQIconViewItem( m_FacesWidget, TQFileInfo(imPath).fileName().section(".",0,0) , pix ); - newface->setKey( KCFGUserAccount::customKey() );// Add custom items to end - m_FacesWidget->ensureItemVisible( newface ); - m_FacesWidget->setCurrentItem( newface ); -} - -void ChFaceDlg::slotGetCustomImage( ) -{ - TQCheckBox* checkWidget = new TQCheckBox( i18n("&Save copy in custom faces folder for future use"), 0 ); - - KFileDialog *dlg = new KFileDialog( TQDir::homeDirPath(), KImageIO::pattern( KImageIO::Reading ), - this, 0, true, checkWidget); - - dlg->setOperationMode( KFileDialog::Opening ); - dlg->setCaption( i18n("Choose Image") ); - dlg->setMode( KFile::File | KFile::LocalOnly ); - - KImageFilePreview *ip = new KImageFilePreview( dlg ); - dlg->setPreviewWidget( ip ); - if (dlg->exec() == TQDialog::Accepted) - addCustomPixmap( dlg->selectedFile(), checkWidget->isChecked() ); - // Because we give it a parent we have to close it ourselves. - dlg->close(true); -} - -#if 0 -void ChFaceDlg::slotSaveCustomImage() -{ - if ( m_FacesWidget->currentItem()->key() == USER_CUSTOM_KEY) - { - TQDir userfaces( TQDir::homeDirPath() + USER_FACES_DIR ); - if ( !userfaces.exists( ) ) - userfaces.mkdir( userfaces.absPath() ); - - if ( !m_FacesWidget->currentItem()->pixmap()->save( userfaces.absPath() + USER_CUSTOM_FILE , "PNG" ) ) - KMessageBox::sorry(this, i18n("There was an error saving the image:\n%1").arg( userfaces.absPath() ) ); - } -} -#endif - -#include "chfacedlg.moc" diff --git a/kdepasswd/kcm/chfacedlg.h b/kdepasswd/kcm/chfacedlg.h deleted file mode 100644 index f96d50084..000000000 --- a/kdepasswd/kcm/chfacedlg.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright 2003 Braden MacDonald - * Copyright 2003 Ravikiran Rajagopal - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * - * - * Please see the README - * - */ - -/** - * @file UserInfo-chface: Dialog for choosing a new face for your user. - * @author Braden MacDonald - */ - -#ifndef CHFACEDLG_H -#define CHFACEDLG_H - -#include - -#include // declaration below - -enum FacePerm { adminOnly = 1, adminFirst = 2, userFirst = 3, userOnly = 4}; - -class KDialogBase; - -class ChFaceDlg : public KDialogBase -{ - Q_OBJECT -public: - - - ChFaceDlg(const TQString& picsdirs, TQWidget *parent=0, const char *name=0, bool modal=true); - - - TQPixmap getFaceImage() const - { - if(m_FacesWidget->currentItem()) - return *(m_FacesWidget->currentItem()->pixmap()); - else - return TQPixmap(); - } - -private slots: - void slotFaceWidgetSelectionChanged( TQIconViewItem *item ) - { enableButtonOK( !item->pixmap()->isNull() ); } - - void slotGetCustomImage(); - //void slotSaveCustomImage(); - -private: - void addCustomPixmap( TQString imPath, bool saveCopy ); - - TDEIconView *m_FacesWidget; -}; - -#endif // CHFACEDLG_H diff --git a/kdepasswd/kcm/chfnprocess.cpp b/kdepasswd/kcm/chfnprocess.cpp deleted file mode 100644 index 56bd546da..000000000 --- a/kdepasswd/kcm/chfnprocess.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/*************************************************************************** - * Copyright 2003 Braden MacDonald * - * Copyright 2003 Ravikiran Rajagopal * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License (version 2) as * - * published by the Free Software Foundation. * - * * - ***************************************************************************/ - -/** - * @file Change a user's 'finger' information, specifically their full name. - * derived from kdepasswd. - */ - -#include -#include - -#include - -#include -#include -#include -#include "chfnprocess.h" - - -int ChfnProcess::exec(const char *pass, const char *name) -{ - // Try to set the default locale to make the parsing of the output - // of `chfn' easier. - putenv((char*)"LC_ALL=C"); - - QCStringList args; - args += "-f"; - args += name; - int ret = PtyProcess::exec("chfn", args); - if (ret < 0) - return ChfnNotFound; - - ret = ConverseChfn(pass); - - waitForChild(); - return ret; -} - - -/* - * The actual work. - * Return values: -1 = unknown error, 0 = ok, >0 = error code. - */ -int ChfnProcess::ConverseChfn(const char *pass) -{ - int status=-1; - - TQCString line; - while(1) - { - line = readLine(); - - if ( line.isEmpty() ) - continue;// discard line - - if ( line.contains( "Password: " )/*isPrompt( line, "password" )*/ ) - { - WaitSlave(); - write(m_Fd, pass, strlen(pass)); - write(m_Fd, "\n", 1); - } - - line = readLine(); // Let's see what the outcome was - - if ( line.contains( "Changing finger info" ) ) - { - // do nothing - } - else if ( line.contains( "information changed" ) ) - { - status=0; - break; - } - else if ( line.isEmpty() ) - { - status=0; - break; - } - else if ( line.contains( "Password error" ) || line.contains("Incorrect password") ) - { - status=PasswordError; - break; - } - else - { - status=MiscError; - m_Error=line; - break; - } - } - return status; -} - diff --git a/kdepasswd/kcm/chfnprocess.h b/kdepasswd/kcm/chfnprocess.h deleted file mode 100644 index d29ccc538..000000000 --- a/kdepasswd/kcm/chfnprocess.h +++ /dev/null @@ -1,33 +0,0 @@ -/*************************************************************************** - * Copyright 2003 Braden MacDonald * - * Copyright 2003 Ravikiran Rajagopal * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License (version 2) as * - * published by the Free Software Foundation. * - * * - ***************************************************************************/ - -#ifndef CHFNPROC_H -#define CHFNPROC_H - -#include -#include - -class ChfnProcess : public PtyProcess -{ -public: - - enum Errors { ChfnNotFound=1, PasswordError=2, MiscError=3 }; - - int exec(const char *pass, const char *name); - - TQCString error() { return m_Error; } - -private: - int ConverseChfn(const char *pass); - - TQCString m_Error; -}; - -#endif diff --git a/kdepasswd/kcm/kcm_useraccount.desktop b/kdepasswd/kcm/kcm_useraccount.desktop deleted file mode 100644 index 51c168bd5..000000000 --- a/kdepasswd/kcm/kcm_useraccount.desktop +++ /dev/null @@ -1,203 +0,0 @@ -[Desktop Entry] -Icon=personal -Categories=Qt;TDE;X-TDE-settings-security; -X-TDE-ParentApp=kcontrol -X-TDE-Library=useraccount -Type=Application -Exec=tdecmshell kcm_useraccount -Name=Password & User Account -Name[af]=Gebruiker rekening en Wagwoord -Name[ar]=كلمة المرور و حساب المستخدم -Name[be]=Пароль і ўліковы запіс карыстальніка -Name[bg]=Потребител -Name[bn]=পাসওয়ার্ড এবং ব্যবহারকারী অ্যাকাউন্ট -Name[br]=Tremenger ha gont an arveriad -Name[bs]=Šifra i korisnički račun -Name[ca]=Contrasenya i compte d'usuari -Name[cs]=Heslo a uživatelský účet -Name[csb]=Parola ë kònto brëkòwnika -Name[cy]=Cyfrinair a Chyfrif Defnyddiwr -Name[da]=Kodeord og brugerkonto -Name[de]=Passwort & Benutzerzugang -Name[el]=Κωδικός πρόσβασης & Πληροφορίες χρήστη -Name[eo]=Pasvorto kaj uzanta konto -Name[es]=Contraseña y cuenta de usuario -Name[et]=Parool ja kasutaja konto -Name[eu]=Pasahitza eta erabiltzaile kontua -Name[fa]=اسم رمز و حساب کاربری -Name[fi]=Salasanat ja käyttäjätilit -Name[fr]=Compte utilisateur et mot de passe -Name[fy]=Wachtwurd en brûkersbehear -Name[ga]=Focal Faire & Cuntas Úsáideora -Name[gl]=Contrasinal e Conta de Usuario -Name[he]=ססמה ומידע על החשבון משתמש -Name[hi]=पासवर्ड तथा उपयोक्ता खाता -Name[hr]=Lozinka i korisnički nalozi -Name[hu]=Név és jelszó -Name[is]=Lykilorð og notandaaðgangur -Name[it]=Password e account utente -Name[ja]=パスワード & ユーザアカウント -Name[ka]=მომხმარებლის ანგარიშები და პაროლები -Name[kk]=Пароль мен тіркелгі -Name[km]=ពាក្យ​សម្ងាត់ & គណនី​អ្នក​ប្រើ -Name[ko]=비밀번호와 사용자 계정 -Name[lt]=Slaptažodis ir naudotojo paskyra -Name[lv]=Paroles un lietotāju konti -Name[mk]=Лозинка и корисничка сметка -Name[ms]=Kata Laluan & Akaun Pengguna -Name[mt]=Password u kont tal-user -Name[nb]=Passord og brukerkonto -Name[nds]=Passwoort & Brukerkonto -Name[ne]=पासवर्ड र प्रयोगकर्ता खाता -Name[nl]=Wachtwoord en gebruikerbeheer -Name[nn]=Passord og brukarkonto -Name[pa]=ਉਪਭੋਗੀ ਖਾਤਾ ਅਤੇ ਗੁਪਤ-ਕੋਡ -Name[pl]=Hasło i konto użytkownika -Name[pt]=Senha e Conta do Utilizador -Name[pt_BR]=Senha & Conta do Usuário -Name[ro]=Parolă și cont utilizator -Name[ru]=Профиль пользователя -Name[rw]=Ijambobanga & Konti Ukoresha -Name[se]=Beassansánit ja geavaheaddjekontut -Name[sk]=Heslo a účet -Name[sl]=Geslo in uporabniški račun -Name[sr]=Лозинка и кориснички налог -Name[sr@Latn]=Lozinka i korisnički nalog -Name[sv]=Lösenord och användarkonto -Name[ta]=கடவுச்சொல் & பயனர் கணக்கு -Name[te]=పాస్ వర్డ్ & యూజర్ ఖాతా -Name[tg]=Гузарвожа ва номи истифодакунанда -Name[th]=รหัสผ่านและบัญชีผู้ใช้ -Name[tr]=Parola ve Kullanıcı Hesabı -Name[tt]=Sersüz & Qullanuçı Xisabı -Name[uk]=Пароль і рахунок користувача -Name[uz]=Maxfiy soʻz va foydalanuvchi hisobi -Name[uz@cyrillic]=Махфий сўз ва фойдаланувчи ҳисоби -Name[vi]=Mật khẩu & Tài khoản Người dùng -Name[wa]=Sicret et conte uzeu -Name[zh_CN]=密码和用户信息 -Name[zh_TW]=密碼與帳號資訊 -Keywords=password,email,name,organization,realname,login image,face,echo mode -Keywords[ar]=كلمة المرور,البريد الإلكتروني,الإسم,المنظمة/الشركة,الإسم الحقيقي,صورة تسجيل الدخول,الوجه,نمط الصدى -Keywords[be]=Пароль,Электроннай пошта,Імя,Назва,Арганізацыя,Сапраўднае імя,Твар,Малюнак уваходу,password,email,name,organization,realname,login image,face,echo mode -Keywords[bg]=парола, е-поща, организация, сметка, потребител, вход, включване, password, email, name, organization, realname, login image, face, echo mode -Keywords[bs]=password,email,name,organization,realname,login image,face,echo mode,šifra,e-mail,ime,organizacija,pravo ime,stvarno ime,slika,lice -Keywords[ca]=contrasenya,correu,nom,organització,nom real,imatge de connexió,aspecte,mode d'eco -Keywords[cs]=heslo,email,jméno,organizace,přihlašovací obrázek,režim odezvy -Keywords[csb]=parola,e-maila,miono,nôzwëskò,òrganizacëjô,logòwanié,brëkòwnik,miono brëkòwnika,òbrôzk,skarń,gwiôzdczi,wëskrzëniwanié parolów -Keywords[da]=kodeord,email,e-mail,organisation,rigtigt navn,login-billede,hoved, ekkotilstand -Keywords[de]=Passwort,E-Mail,Name,Organisation,Tatsächlicher Name,Login,Anmeldebild,Bild,Echomodus -Keywords[el]=κωδικός πρόσβασης;email;όνομα;οργανισμός;πραγματικό όνομα;εικόνα σύνδεσης;πρόσωπο; τρόπος εμφάνισης -Keywords[en_GB]=password,email,name,organisation,realname,login image,face,echo mode -Keywords[eo]=pasvorto,retpoŝto,nomo,organizaĵo,realnomo,salutbildo,vizaĝo,eĥo moduso -Keywords[es]=contraseña;correo electrónico;nombre;organización;nombre real;imagen de acceso;cara;modo de eco -Keywords[et]=parool;email;nimi;organisatsioon;pärisnimi;kasutaja pilt;nägu; echo režiim -Keywords[eu]=pasahitza;helb-elek;izena;erakundea;benetako izena;sarrerako irudia,aurpegia,echo modua -Keywords[fa]=اسم رمز، رایانامه، نام، سازمان، نام واقعی، تصویر ورود، چهره، حالت پژواک -Keywords[fi]=salasana,sähköposti,nimi,organisaatio,oikea nimi,kirjautumiskuva,naama,kaiutustilanus,kaiutustapa -Keywords[fr]=mot de passe,email,courrier électronique,adresse électronique,organisation,non complet,image d'identification,mode d'affichage,face -Keywords[fy]=wachtwoord,wachtwurd,e-mail,e-post,organisatie,organisaasje,naam,namme,login,aanmelden,oanmelde,afbeelding,ôfbyldings,gezicht,echo,asterisk -Keywords[ga]=focal faire,ríomhphost,ainm,eagras,fíorainm,íomhá logála isteach,aghaidh,mód macalla -Keywords[gl]=contrasinal,correo-e,nome,organización,nome real,imaxe de início,cara, modo eco -Keywords[he]=ססמאות, דוא"ל, שם, ארגון, שם אמתי,תמונת כניסה, מצב echo, password,email,name,organization,realname,login image,face,echo mode -Keywords[hr]=password,email,name,organization,realname,login image,face,echo mode,lozinka,e-pošta,naziv,ime,organizacija,pravo ime,slika prijave,lice,odzivnik -Keywords[hu]=jelszó,e-mail,név,szervezet,valódi név,bejelentkezési kép,arc,kiírási mód -Keywords[it]=password,email,nome,organizzazione,nome vero,immagine login,icona login,immagine accesso,faccia,modo echo -Keywords[ja]=パスワード;Eメール;名前;組織;本名;ログイン画像;顔;エコーモード -Keywords[km]=ពាក្យ​សម្ងាត់; អ៊ីមែល; ឈ្មោះ; អង្គការ; ឈ្មោះ​ពិត; រូបភាព​ពេល​ចូល; មុខ; របៀបបង្ហាញ -Keywords[lt]=password,email,name,organization,realname,login image,face,echo mode,slaptažodis,e. paštas,el.paštas,vardas,organizacija,tikrasis vardas,veidas -Keywords[mk]=password,email,name,organization,realname,login,image,face,echo mode,лозинка,е-пошта,електронска пошта,име,организација,вистинско име,слика за најава,лице -Keywords[nb]=passord,e-post,navn,organisasjon,fullt navn,innloggingsbilde,ansikt,ekkomodus -Keywords[nds]=Passwoort,EMail,Nettpost,Nettbreef,Organisatschoon,Naam,echte Naam,Anmellenbild,Loginbild,Gesicht,Echometood -Keywords[ne]=पासवर्ड, इमेल, नाम, सङ्गठन, वास्तविकनाम, लागइन छवि, मोहडा, प्रतिध्वनि मोड -Keywords[nl]=wachtwoord,e-mail,organisatie,naam,login,aanmelden,afbeelding,gezicht,echo,asterisk -Keywords[nn]=passord;e-post;namn;organisasjon;fullt namn;innloggingsbilete;fjes;ekkomodus -Keywords[pa]=ਗੁਪਤ-ਕੋਡ,ਈ-ਮੇਲ,ਨਾਂ,ਸੰਗਠਨ,ਅਸਲੀ ਨਾਂ,login image,face,echo mode -Keywords[pl]=hasło,e-mail,imię,nazwisko,organizacja,login,użytkownik,nazwa użytkownika,obrazek,twarz,gwiazdki,pokazywanie haseł -Keywords[pt]=senha,e-mail,nome,organização,nome real,imagem de ligação,cara,modo de eco -Keywords[pt_BR]=senha,e-mail,nome,organização,nome real,imagem de login,aparência,modo de ecoar -Keywords[ro]=parolă,email,nume,organizație,nume real,imagine de logare,față,mod ecou -Keywords[ru]=password,email,name,organization,realname,login image,face,echo mode,пароль,имя,организация,электронная почта -Keywords[se]=beassansátni,e-boasta,namma,organisašuvdna,olles namma,sisačálihangovva,amadádju,skájahanmodus -Keywords[sl]=geslo;e-pošta;ime;organizacija;pravo ime;slika prijave;prijavna slika,obraz;način odmeva -Keywords[sr]=password,email,name,organization,realname,login image,face,echo mode,лозинка,е-пошта,име,организација,ехо,режим,лице -Keywords[sr@Latn]=password,email,name,organization,realname,login image,face,echo mode,lozinka,e-pošta,ime,organizacija,eho,režim,lice -Keywords[sv]=lösenord;e-post;namn;organisation;verkligt namn;inloggningsbild;bild;ekoläge -Keywords[th]=รหัสผ่าน, อีเมล,ชื่อ,องค์กร,ชื่อจริง,ภาพสำหรับล็อกอิน,ใบหน้า,โหมดแสดงอักษร -Keywords[tr]=parola,e-posta,isim,gerçek isim,giriş resmi,yüz -Keywords[uk]=пароль,адреса електронної пошти,організація,ім'я,фотографія,зображення -Keywords[uz]=maxfiy soʻz,elektron pochta,foydalanuvchi,haqiqiy ismi,nishoncha,tashkilot, echo mode -Keywords[uz@cyrillic]=махфий сўз,электрон почта,фойдаланувчи,ҳақиқий исми,нишонча,ташкилот, echo mode -Keywords[vi]=mật khẩu,email,tên,cơ quan,tên thật,hình đăng nhập,mặt cười,chế độ báo lại -Keywords[wa]=sicret,motd di passe,emile,no,soce,vray no,imådje d' elodjaedje,face,tiesse,echo mode,mode echo -Keywords[zh_CN]=password,email,name,organization,realname,login image,face,echo mode,密码,电子邮件,姓名,组织,真实姓名,登陆图像,头像,回显 -Keywords[zh_TW]=password,email,name,organization,realname,login image,face,echo mode,密碼,電子郵件,組織,真名,登入圖片,面貌,回音模式 -Comment=User information such as password, name and email -Comment[af]=Gebruiker informasie, soos naam, wagwoord en e-pos -Comment[ar]=معلومات عن المستخدم مثل كلمة المرور ، الإسم و عنوان البريد الإلكتروني -Comment[be]=Інфармацыя аб карыстальніку, напр. пароль, імя і электронны адрас -Comment[bg]=Настройване на потребителската сметка, паролата, името и е-пощата -Comment[bn]=ব্যবহারকারী তথ্য, যথা পাসওয়ার্ড, নাম এবং ই-মেইল -Comment[br]=Titouroù diwar-benn an arveriad (tremenger, anv, chomlec'h postel) -Comment[bs]=Informacije o korisniku kao što su šifra, ime i e-mail -Comment[ca]=Informació de l'usuari com ara contrasenya, nom i correu -Comment[cs]=Informace o uživateli, jako heslo, jméno nebo email -Comment[csb]=Wëdowiédzô ò kònce brëkòwnika: parola, miono ë nôzwëskò, e-maila ëtd. -Comment[cy]=Gwybodaeth ddefnyddiwr fel cyfrinair, enw ac ebost -Comment[da]=Brugerinformation såsom kodeord, navn og e-mail -Comment[de]=Benutzerinformation wie Passwort, Name, E-Mail-Adresse -Comment[el]=Πληροφορίες χρήστη όπως ο κωδικός πρόσβασης, το όνομα και το email -Comment[eo]=Uzantaj informoj kiel pasvorto, nomo kaj retpoŝto -Comment[es]=Información del usuario como la contraseña, el nombre o el correo electrónico -Comment[et]=Kasutajainfo, nt. parool, nimi ja e-posti aadress -Comment[eu]=Erabiltzaileari buruzko informazioa; pasahitza, izena eta posta-helbidea, adibidez. -Comment[fa]=استفاده از اطلاعاتی نظیر اسم رمز، نام و رایانامه -Comment[fi]=Käyttäjien tiedot, kuten salasanat, nimet ja sähköpostiosoite -Comment[fr]=Informations sur l'utilisateur, comme le mot de passe, le nom, et l'adresse électronique -Comment[fy]=Brûkersynformaasje sa as wachtwurd, namme en e-adres -Comment[gl]=Información do usuario como contrasinal, nome e correo-e -Comment[he]=מידע אישי כגון ססמה, שם וכתובת דוא"ל -Comment[hi]=उपयोक्ता जानकारी जैसे कि पासवर्ड, नाम तथा ई-मेल -Comment[hr]=Korisnički podaci poput lozinke, imena i e-pošte -Comment[hu]=A felhasználójellemzők, például az e-mail cím vagy a jelszó beállítása -Comment[is]=Upplýsingar um notandann eins og til dæmis póstfang, lykilorð og nafn -Comment[it]=Informazioni utente come password, nome ed email -Comment[ja]=パスワード、名前、Eメールなどのユーザ情報 -Comment[ka]=ცნობები მომხმარებლების შესახებ, როგორიცაა პაროლი, სახელი და ელ-ფოსტა -Comment[kk]=Паролі, аты және эл.пошта адресі секілді пайдаланушының мәліметі -Comment[km]=ព័ត៌មាន​អ្នក​ប្រើ​ដូចជា ពាក្យ​សម្ងាត់,ឈ្មោះ និង​អ៊ីមែល -Comment[ko]=비밀번호, 이름, 전자우편 주소 같은 개인 정보 -Comment[lt]=Naudotojo informacija, tokia, kaip slaptažodis, vardas ir e. pašto adresas -Comment[lv]=Lietotāja informācija kā parole, vārds un e-pasts -Comment[mk]=Кориснички информации како лозинка, име и е-пошта -Comment[ms]=Maklumat pengguna seperti kata laluan, nama dan e-mel -Comment[mt]=Informazzjoni dwar il-user, bħal isem, password u email -Comment[nb]=Brukerinformasjon som passord, navn og e-postadresse -Comment[nds]=Brukerinformatschonen, as t.B. Passwoort, Naam un Nettpostadress -Comment[ne]=पासवर्ड, नाम, र इमेल जस्तो प्रयोगकर्ता सूचना -Comment[nl]=Gebruikerinformatie zoals wachtwoord, naam en e-mailadres -Comment[nn]=Brukarinformasjon som passord, namn og e-postadresse -Comment[pa]=ਉਪਭੋਗੀ ਜਾਣਕਾਰੀ ਜਿਵੇਂ ਕਿ ਗੁਪਤ-ਕੋਡ, ਨਾਂ ਅਤੇ ਈ-ਮੇਲ -Comment[pl]=Informacje o koncie użytkownika: hasło, imię i nazwisko, e-mail itd. -Comment[pt]=Informações do utilizador, como a senha, o nome e o e-mail -Comment[pt_BR]=Informações do usuário tais como senha, nome e e-mail -Comment[ro]=Informații despre utilizator, precum parola, numele și adresa de e-mail -Comment[ru]=Сведения о пользователе, такие как пароль, имя и e-mail -Comment[rw]=Amakuru y'ukoresha nk'ijambobanga,izina na imeli -Comment[se]=Geavaheaddjedieđut nugo beassansátni, namma ja e-boasta -Comment[sk]=Informácie o používateľovi, ako heslo, meno a e-mail -Comment[sl]=Uporabniške informacije, kot so geslo, ime in e-pošta -Comment[sr]=Информације о кориснику као што је лозинка, име и е-пошта -Comment[sr@Latn]=Informacije o korisniku kao što je lozinka, ime i e-pošta -Comment[sv]=Användarinformation som lösenord, namn och e-post -Comment[ta]=பயனர் தகவல் கடவுச்சொல்லைப் போல, பெயர் மற்றும் மிண்ணஞ்சல் -Comment[th]=ข้อมูลของผู้ใช้ เช่น รหัสผ่าน, ชื่อ และอีเมล -Comment[tr]=Parola, isim ve e-posta gibi kullanıcı bilgisi -Comment[tt]=Qullanuçı caylawı: sersüz, isem, email kebek närsälär -Comment[uk]=Інформація про користувача така як: пароль, ім'я та адреса електронної пошти -Comment[uz]=Foydalanuvchining ismi, maxfiy soʻzi va elektron pochtasi kabi maʼlumot -Comment[uz@cyrillic]=Фойдаланувчининг исми, махфий сўзи ва электрон почтаси каби маълумот -Comment[vi]=Thông tin về người dùng như mật khẩu, tên và email -Comment[wa]=Informåcion d' uzeus come les sicrets, nos et emiles -Comment[zh_CN]=像密码、姓名和电子邮件这样的用户信息 -Comment[zh_TW]=使用者資訊如密碼、名稱和電子郵件 diff --git a/kdepasswd/kcm/kcm_useraccount.kcfg b/kdepasswd/kcm/kcm_useraccount.kcfg deleted file mode 100644 index 549afdb1e..000000000 --- a/kdepasswd/kcm/kcm_useraccount.kcfg +++ /dev/null @@ -1,44 +0,0 @@ - - - tdeglobal.h - kstandarddirs.h - - - - - TDEGlobal::dirs()->resourceDirs("data").last() + "tdm/faces" + '/' - - - - $HOME/.faces/ - - - PreferAdmin - - - - - 64 - - - - .default.face.icon - - - - Custom.png - - - - $HOME/.face.icon - - - - Zz_custom - - - diff --git a/kdepasswd/kcm/kcm_useraccount_pass.kcfg b/kdepasswd/kcm/kcm_useraccount_pass.kcfg deleted file mode 100644 index c76e4a657..000000000 --- a/kdepasswd/kcm/kcm_useraccount_pass.kcfg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - OneStar - - - diff --git a/kdepasswd/kcm/main.cpp b/kdepasswd/kcm/main.cpp deleted file mode 100644 index 18ecbb445..000000000 --- a/kdepasswd/kcm/main.cpp +++ /dev/null @@ -1,343 +0,0 @@ - -/** - * Copyright (C) 2004 Frans Englich - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * - * - * Please see the README - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "settings.h" -#include "pass.h" -#include "chfnprocess.h" -#include "chfacedlg.h" -#include "main.h" - -typedef KGenericFactory Factory; -K_EXPORT_COMPONENT_FACTORY( kcm_useraccount, Factory("useraccount") ) - -KCMUserAccount::KCMUserAccount( TQWidget *parent, const char *name, - const TQStringList &) - : TDECModule( parent, name) -{ - TQVBoxLayout *topLayout = new TQVBoxLayout(this); - _mw = new MainWidget(this); - topLayout->addWidget( _mw ); - - connect( _mw->btnChangeFace, TQT_SIGNAL(clicked()), TQT_SLOT(slotFaceButtonClicked())); - connect( _mw->btnChangePassword, TQT_SIGNAL(clicked()), TQT_SLOT(slotChangePassword())); - _mw->btnChangePassword->setGuiItem( KGuiItem( i18n("Change &Password..."), "password" )); - - connect( _mw->leRealname, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(changed())); - connect( _mw->leOrganization, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(changed())); - connect( _mw->leEmail, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(changed())); - connect( _mw->leSMTP, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(changed())); - - _ku = new KUser(); - _kes = new KEMailSettings(); - - _mw->lblUsername->setText( _ku->loginName() ); - _mw->lblUID->setText( TQString().number(_ku->uid()) ); - - TDEAboutData *about = new TDEAboutData(I18N_NOOP("kcm_useraccount"), - I18N_NOOP("Password & User Information"), 0, 0, - TDEAboutData::License_GPL, - I18N_NOOP("(C) 2002, Braden MacDonald, " - "(C) 2004 Ravikiran Rajagopal")); - - about->addAuthor("Frans Englich", I18N_NOOP("Maintainer"), "frans.englich@telia.com"); - about->addAuthor("Ravikiran Rajagopal", 0, "ravi@kde.org"); - about->addAuthor("Michael H\303\244ckel", "haeckel@kde.org" ); - - about->addAuthor("Braden MacDonald", I18N_NOOP("Face editor"), "bradenm_k@shaw.ca"); - about->addAuthor("Geert Jansen", I18N_NOOP("Password changer"), "jansen@kde.org", - "http://www.stack.nl/~geertj/"); - about->addAuthor("Daniel Molkentin"); - about->addAuthor("Alex Zepeda"); - about->addAuthor("Hans Karlsson", I18N_NOOP("Icons"), "karlsson.h@home.se"); - about->addAuthor("Hermann Thomas", I18N_NOOP("Icons"), "h.thomas@gmx.de"); - setAboutData(about); - - setQuickHelp( i18n("Here you can change your personal information, which " - "will be used in mail programs and word processors, for example. You can " - "change your login password by clicking Change Password.") ); - - addConfig( KCFGPassword::self(), this ); - load(); -} - -void KCMUserAccount::slotChangePassword() -{ - TDEProcess *proc = new TDEProcess; - TQString bin = TDEGlobal::dirs()->findExe("kdepasswd"); - if ( !bin ) - { - kdDebug() << "kcm_useraccount: kdepasswd was not found." << endl; - KMessageBox::sorry ( this, i18n( "A program error occurred: the internal " - "program 'kdepasswd' could not be found. You will " - "not be able to change your password.")); - - _mw->btnChangePassword->setEnabled(false); - delete proc; - return; - } - - *proc << bin << _ku->loginName() ; - proc->start(TDEProcess::DontCare); - - delete proc; - -} - - -KCMUserAccount::~KCMUserAccount() -{ - delete _ku; - delete _kes; -} - -void KCMUserAccount::load() -{ - _mw->lblUsername->setText(_ku->loginName()); - - _kes->setProfile(_kes->defaultProfileName()); - - _mw->leRealname->setText( _kes->getSetting( KEMailSettings::RealName )); - _mw->leEmail->setText( _kes->getSetting( KEMailSettings::EmailAddress )); - _mw->leOrganization->setText( _kes->getSetting( KEMailSettings::Organization )); - _mw->leSMTP->setText( _kes->getSetting( KEMailSettings::OutServer )); - - TQString _userPicsDir = KCFGUserAccount::faceDir() + - TDEGlobal::dirs()->resourceDirs("data").last() + "tdm/faces/"; - - TQString fs = KCFGUserAccount::faceSource(); - if (fs == TQString::fromLatin1("UserOnly")) - _facePerm = userOnly; - else if (fs == TQString::fromLatin1("PreferUser")) - _facePerm = userFirst; - else if (fs == TQString::fromLatin1("PreferAdmin")) - _facePerm = adminFirst; - else - _facePerm = adminOnly; // Admin Only - - if ( _facePerm == adminFirst ) - { // If the administrator's choice takes preference - _facePixmap = TQPixmap( _userPicsDir + _ku->loginName() + ".face.icon" ); - - if ( _facePixmap.isNull() ) - _facePerm = userFirst; - else - _mw->btnChangeFace->setPixmap( _facePixmap ); - } - - if ( _facePerm == userFirst ) - { - // If the user's choice takes preference - _facePixmap = TQPixmap( KCFGUserAccount::faceFile() ); - - // The user has no face, should we check for the admin's setting? - if ( _facePixmap.isNull() ) - _facePixmap = TQPixmap( _userPicsDir + _ku->loginName() + ".face.icon" ); - - if ( _facePixmap.isNull() ) - _facePixmap = TQPixmap( _userPicsDir + KCFGUserAccount::defaultFile() ); - - _mw->btnChangeFace->setPixmap( _facePixmap ); - } - else if ( _facePerm == adminOnly ) - { - // Admin only - _facePixmap = TQPixmap( _userPicsDir + _ku->loginName() + ".face.icon" ); - if ( _facePixmap.isNull() ) - _facePixmap = TQPixmap( _userPicsDir + KCFGUserAccount::defaultFile() ); - _mw->btnChangeFace->setPixmap( _facePixmap ); - } - - TDECModule::load(); /* TDEConfigXT */ - -} - -void KCMUserAccount::save() -{ - TDECModule::save(); /* TDEConfigXT */ - - /* Save KDE's homebrewn settings */ - _kes->setSetting( KEMailSettings::RealName, _mw->leRealname->text() ); - _kes->setSetting( KEMailSettings::EmailAddress, _mw->leEmail->text() ); - _kes->setSetting( KEMailSettings::Organization, _mw->leOrganization->text() ); - _kes->setSetting( KEMailSettings::OutServer, _mw->leSMTP->text() ); - - /* Save realname to /etc/passwd */ - if ( _mw->leRealname->isModified() ) - { - TQCString password; - int ret = KPasswordDialog::getPassword( password, i18n("Please enter " - "your password in order to save your settings:")); - - if ( !ret ) - { - KMessageBox::sorry( this, i18n("You must enter " - "your password in order to change your information.")); - return; - } - - ChfnProcess *proc = new ChfnProcess(); - ret = proc->exec(password, _mw->leRealname->text().ascii() ); - if ( ret ) - { - if ( ret == ChfnProcess::PasswordError ) - KMessageBox::sorry( this, i18n("You must enter a correct password.")); - - else - { - KMessageBox::sorry( this, i18n("An error occurred and your password has " - "probably not been changed. The error " - "message was:\n%1").arg(static_cast(proc->error()))); - kdDebug() << "ChfnProcess->exec() failed. Error code: " << ret - << "\nOutput:" << proc->error() << endl; - } - } - - delete proc; - } - - /* Save the image */ - if( !_facePixmap.save( KCFGUserAccount::faceFile(), "PNG" )) - KMessageBox::error( this, i18n("There was an error saving the image: %1" ).arg( - KCFGUserAccount::faceFile()) ); - -} - -void KCMUserAccount::changeFace(const TQPixmap &pix) -{ - if ( _facePerm != userFirst ) - return; // If the user isn't allowed to change their face, don't! - - if ( pix.isNull() ) { - KMessageBox::sorry( this, i18n("There was an error loading the image.") ); - return; - } - - _facePixmap = pix; - _mw->btnChangeFace->setPixmap( _facePixmap ); - emit changed( true ); -} - -void KCMUserAccount::slotFaceButtonClicked() -{ - if ( _facePerm != userFirst ) - { - KMessageBox::sorry( this, i18n("Your administrator has disallowed changing your image.") ); - return; - } - - ChFaceDlg* pDlg = new ChFaceDlg( TDEGlobal::dirs()->resourceDirs("data").last() + - "/tdm/pics/users/" ); - - if ( pDlg->exec() == TQDialog::Accepted && !pDlg->getFaceImage().isNull() ) - changeFace( pDlg->getFaceImage() ); - - delete pDlg; -} - -/** - * I merged faceButtonDropEvent into this /Frans - * The function was called after checking event type and - * the code is now below that if statement - */ -bool KCMUserAccount::eventFilter(TQObject *, TQEvent *e) -{ - if (e->type() == TQEvent::DragEnter) - { - TQDragEnterEvent *ee = (TQDragEnterEvent *) e; - ee->accept( KURLDrag::canDecode(ee) ); - return true; - } - - if (e->type() == TQEvent::Drop) - { - if ( _facePerm != userFirst ) - { - KMessageBox::sorry( this, i18n("Your administrator has disallowed changing your image.") ); - return true; - } - - KURL *url = decodeImgDrop( (TQDropEvent *) e, this); - if (url) - { - TQString pixPath; - TDEIO::NetAccess::download(*url, pixPath, this); - changeFace( TQPixmap( pixPath ) ); - TDEIO::NetAccess::removeTempFile(pixPath); - delete url; - } - return true; - } - return false; -} - -inline KURL *KCMUserAccount::decodeImgDrop(TQDropEvent *e, TQWidget *wdg) -{ - KURL::List uris; - - if (KURLDrag::decode(e, uris) && (uris.count() > 0)) - { - KURL *url = new KURL(uris.first()); - - KImageIO::registerFormats(); - if( KImageIO::canRead(KImageIO::type(url->fileName())) ) - return url; - - TQStringList qs = TQStringList::split('\n', KImageIO::pattern()); - qs.remove(qs.begin()); - - TQString msg = i18n( "%1 does not appear to be an image file.\n" - "Please use files with these extensions:\n" - "%2").arg(url->fileName()).arg(qs.join("\n")); - KMessageBox::sorry( wdg, msg); - delete url; - } - return 0; -} - -#include "main.moc" - diff --git a/kdepasswd/kcm/main.h b/kdepasswd/kcm/main.h deleted file mode 100644 index 350c42820..000000000 --- a/kdepasswd/kcm/main.h +++ /dev/null @@ -1,79 +0,0 @@ - -/** - * Copyright (C) 2004 Frans Englich - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - */ - -#ifndef MAIN_H -#define MAIN_H - -#include - -#include "main_widget.h" - -class TDEAboutData; -class KUser; -class KEmailSettings; -class TQEvent; -class TQObject; -class KURL; -class Config; - -/** - * Please see the README - */ -class KCMUserAccount : public TDECModule -{ - Q_OBJECT - -public: - KCMUserAccount(TQWidget* parent, const char* name = "KCMUserAccount", - const TQStringList& list=TQStringList()); - ~KCMUserAccount(); - - /** - * The user data is loaded from chfn(/etc/password) and then - * written back as well as to KDE's own(KEmailSettings). - * The user won't notice this(assuming they change the KDE settings via - * this KCM) and will make KDE play nice with enviroments which uses - * /etc/password. - */ - void load(); - - void save(); - - /** - * For the face button - */ - bool eventFilter(TQObject *, TQEvent *e); - -private slots: - void slotChangePassword(); - //void configChanged() { emit changed(true); }; - void slotFaceButtonClicked(); - -private: - void changeFace(const TQPixmap& pix); - inline KURL* decodeImgDrop(TQDropEvent *e, TQWidget *wdg); - - KEMailSettings *_kes; - KUser *_ku; - MainWidget *_mw; - FacePerm _facePerm; - TQPixmap _facePixmap; - -}; - -#endif // MAIN_H diff --git a/kdepasswd/kcm/main_widget.ui b/kdepasswd/kcm/main_widget.ui deleted file mode 100644 index b1933f592..000000000 --- a/kdepasswd/kcm/main_widget.ui +++ /dev/null @@ -1,294 +0,0 @@ - -MainWidget -Frans Englich <frans.englich@telia.com> - - - MainWidget - - - - 0 - 0 - 518 - 561 - - - - KCMUserAccount - - - - unnamed - - - - btnChangeFace - - - - 0 - 0 - 0 - 0 - - - - - 74 - 74 - - - - - 74 - 74 - - - - true - - - - - - - - grpUserInformation - - - User Information - - - - unnamed - - - - lblOrganisation - - - &Organization: - - - leOrganization - - - - - leRealname - - - - - lblRealName - - - &Name: - - - leRealname - - - - - leOrganization - - - - - lblEmail - - - &Email address: - - - leEmail - - - - - leEmail - - - - - textLabel3 - - - &SMTP server: - - - leSMTP - - - - - leSMTP - - - - - lblUIDTell - - - User ID: - - - - - lblUID - - - - - - - - - - spacer3 - - - Vertical - - - Expanding - - - - 20 - 16 - - - - - - layout1 - - - - unnamed - - - - lblUsername - - - - Bitstream Charter - 14 - - - - - - - AlignVCenter - - - - - lblClickButtonInfo - - - <i>(Click the button to change your image)</i> - - - AlignVCenter - - - - - - - btnChangePassword - - - Change Password... - - - - - spacer2 - - - Horizontal - - - Expanding - - - - 111 - 20 - - - - - - kcfg_EchoMode - - - At Password Prompt - - - false - - - false - - - false - - - 0 - - - - unnamed - - - - rdbOneStar - - - Show one star for each letter - - - - - rdbThreeStars - - - Show three stars for each letter - - - - - rdbShowPassword - - - Show nothing - - - - - - - - btnChangeFace - leRealname - leOrganization - leEmail - leSMTP - rdbOneStar - rdbThreeStars - rdbShowPassword - btnChangePassword - - - kdialog.h - - - - diff --git a/kdepasswd/kcm/pass.kcfgc b/kdepasswd/kcm/pass.kcfgc deleted file mode 100644 index 21b4bb781..000000000 --- a/kdepasswd/kcm/pass.kcfgc +++ /dev/null @@ -1,5 +0,0 @@ -File=kcm_useraccount_pass.kcfg -ClassName=KCFGPassword -Singleton=true -Mutators=true - diff --git a/kdepasswd/kcm/pics/Apple.png b/kdepasswd/kcm/pics/Apple.png deleted file mode 100644 index b383578bb..000000000 Binary files a/kdepasswd/kcm/pics/Apple.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/BeachBall.png b/kdepasswd/kcm/pics/BeachBall.png deleted file mode 100644 index e8c748332..000000000 Binary files a/kdepasswd/kcm/pics/BeachBall.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Blowfish.png b/kdepasswd/kcm/pics/Blowfish.png deleted file mode 100644 index 51cb16013..000000000 Binary files a/kdepasswd/kcm/pics/Blowfish.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Bug.png b/kdepasswd/kcm/pics/Bug.png deleted file mode 100644 index b431cc138..000000000 Binary files a/kdepasswd/kcm/pics/Bug.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Butterfly.png b/kdepasswd/kcm/pics/Butterfly.png deleted file mode 100644 index 88012a7ed..000000000 Binary files a/kdepasswd/kcm/pics/Butterfly.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/CMakeLists.txt b/kdepasswd/kcm/pics/CMakeLists.txt deleted file mode 100644 index 1bfe832db..000000000 --- a/kdepasswd/kcm/pics/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -install( FILES - Apple.png BeachBall.png Blowfish.png Bug.png - Butterfly.png Car.png Cow.png Daemon.png Dog.png - Elephant.png Flower.png Frog.png Ghost.png Guitar.png - Heart.png Konqui.png Lion.png Monkey.png Penguin.png - Pig.png Rabbit.png Ring.png Scream.png Shark.png - Splash.png Star.png Teddybear.png Turtle.png - DESTINATION ${DATA_INSTALL_DIR}/tdm/pics/users ) diff --git a/kdepasswd/kcm/pics/CREDITS b/kdepasswd/kcm/pics/CREDITS deleted file mode 100644 index ccd9126b4..000000000 --- a/kdepasswd/kcm/pics/CREDITS +++ /dev/null @@ -1,21 +0,0 @@ -Butterfly.png, Konqui.png: - KDE Graphics Team - -BeachBall.png BlueMarble1.png Flower.png Night.png Star2.png Star3.png -Star4.png Star.png Stars2.png Stars.png: - Braden MacDonald - -Apple.png Cheese.png Ghost.png Pearl.png Skull.png Blowfish.png Cow.png -Guitar.png Penguin.png Smiley.png Bug.png Daemon.png Lion.png Pig.png -Splash.png Burger.png Dog.png Man.png Scream.png Turtle.png Car.png -Elephant.png Monkey.png Shark.png Watch.png Astronaut.png Heart.png -Ring.png Rabbit.png Speakers.png UFO.png : - Hans Karlsson -License: free for commercial and noncommercial usage, distribution and -modification - -Arch.png BeachBall2.png Butterfly2.png Cactus.png Car2.png Clock.png -Dice.png Dog2.png Dragon.png Fish.png Flower2.png Flower3.png Frog.png -Kiwi.png Lava.png Pineapple.png Teddybear.png Tiger.png Tukan.png -Wind.png : - Hermann Thomas diff --git a/kdepasswd/kcm/pics/Car.png b/kdepasswd/kcm/pics/Car.png deleted file mode 100644 index 95ec0278f..000000000 Binary files a/kdepasswd/kcm/pics/Car.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Cow.png b/kdepasswd/kcm/pics/Cow.png deleted file mode 100644 index 2f0ced863..000000000 Binary files a/kdepasswd/kcm/pics/Cow.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Daemon.png b/kdepasswd/kcm/pics/Daemon.png deleted file mode 100644 index 4bbc42a55..000000000 Binary files a/kdepasswd/kcm/pics/Daemon.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Dog.png b/kdepasswd/kcm/pics/Dog.png deleted file mode 100644 index 78de93340..000000000 Binary files a/kdepasswd/kcm/pics/Dog.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Elephant.png b/kdepasswd/kcm/pics/Elephant.png deleted file mode 100644 index 8f4b2d2aa..000000000 Binary files a/kdepasswd/kcm/pics/Elephant.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Flower.png b/kdepasswd/kcm/pics/Flower.png deleted file mode 100644 index d414e736c..000000000 Binary files a/kdepasswd/kcm/pics/Flower.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Frog.png b/kdepasswd/kcm/pics/Frog.png deleted file mode 100644 index 2186975a9..000000000 Binary files a/kdepasswd/kcm/pics/Frog.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Ghost.png b/kdepasswd/kcm/pics/Ghost.png deleted file mode 100644 index bf95150da..000000000 Binary files a/kdepasswd/kcm/pics/Ghost.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Guitar.png b/kdepasswd/kcm/pics/Guitar.png deleted file mode 100644 index 6a315b0c7..000000000 Binary files a/kdepasswd/kcm/pics/Guitar.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Heart.png b/kdepasswd/kcm/pics/Heart.png deleted file mode 100644 index b41a027e3..000000000 Binary files a/kdepasswd/kcm/pics/Heart.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Konqui.png b/kdepasswd/kcm/pics/Konqui.png deleted file mode 100644 index 4db7ae5e3..000000000 Binary files a/kdepasswd/kcm/pics/Konqui.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Lion.png b/kdepasswd/kcm/pics/Lion.png deleted file mode 100644 index 373b3f8c8..000000000 Binary files a/kdepasswd/kcm/pics/Lion.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Makefile.am b/kdepasswd/kcm/pics/Makefile.am deleted file mode 100644 index 7c2cca099..000000000 --- a/kdepasswd/kcm/pics/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -picsdir = $(kde_datadir)/tdm/pics/users -pics_DATA = Apple.png BeachBall.png Blowfish.png Bug.png \ - Butterfly.png Car.png Cow.png Daemon.png Dog.png Elephant.png \ - Flower.png Frog.png Ghost.png Guitar.png Heart.png Konqui.png \ - Lion.png Monkey.png Penguin.png Pig.png Rabbit.png \ - Ring.png Scream.png Shark.png Splash.png Star.png Teddybear.png \ - Turtle.png - -EXTRA_DIST = $(pics_DATA) - diff --git a/kdepasswd/kcm/pics/Monkey.png b/kdepasswd/kcm/pics/Monkey.png deleted file mode 100644 index 72a241006..000000000 Binary files a/kdepasswd/kcm/pics/Monkey.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Penguin.png b/kdepasswd/kcm/pics/Penguin.png deleted file mode 100644 index 33ed3619a..000000000 Binary files a/kdepasswd/kcm/pics/Penguin.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Pig.png b/kdepasswd/kcm/pics/Pig.png deleted file mode 100644 index c10a34c7f..000000000 Binary files a/kdepasswd/kcm/pics/Pig.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Rabbit.png b/kdepasswd/kcm/pics/Rabbit.png deleted file mode 100644 index a7c5f3f10..000000000 Binary files a/kdepasswd/kcm/pics/Rabbit.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Ring.png b/kdepasswd/kcm/pics/Ring.png deleted file mode 100644 index 29daf4c63..000000000 Binary files a/kdepasswd/kcm/pics/Ring.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Scream.png b/kdepasswd/kcm/pics/Scream.png deleted file mode 100644 index 46abbd2f8..000000000 Binary files a/kdepasswd/kcm/pics/Scream.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Shark.png b/kdepasswd/kcm/pics/Shark.png deleted file mode 100644 index a11a352cb..000000000 Binary files a/kdepasswd/kcm/pics/Shark.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Splash.png b/kdepasswd/kcm/pics/Splash.png deleted file mode 100644 index ec8e68a18..000000000 Binary files a/kdepasswd/kcm/pics/Splash.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Star.png b/kdepasswd/kcm/pics/Star.png deleted file mode 100644 index 2b3988860..000000000 Binary files a/kdepasswd/kcm/pics/Star.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Teddybear.png b/kdepasswd/kcm/pics/Teddybear.png deleted file mode 100644 index 823adb56d..000000000 Binary files a/kdepasswd/kcm/pics/Teddybear.png and /dev/null differ diff --git a/kdepasswd/kcm/pics/Turtle.png b/kdepasswd/kcm/pics/Turtle.png deleted file mode 100644 index 1eee29591..000000000 Binary files a/kdepasswd/kcm/pics/Turtle.png and /dev/null differ diff --git a/kdepasswd/kcm/settings.kcfgc b/kdepasswd/kcm/settings.kcfgc deleted file mode 100644 index 772c87a6b..000000000 --- a/kdepasswd/kcm/settings.kcfgc +++ /dev/null @@ -1,5 +0,0 @@ -File=kcm_useraccount.kcfg -ClassName=KCFGUserAccount -Singleton=true -Mutators=false - diff --git a/kdepasswd/kdepasswd.cpp b/kdepasswd/kdepasswd.cpp deleted file mode 100644 index 6f1c38aa3..000000000 --- a/kdepasswd/kdepasswd.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* vi: ts=8 sts=4 sw=4 - * - * $Id$ - * - * This file is part of the KDE project, module tdesu. - * Copyright (C) 2000 Geert Jansen - */ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "passwd.h" -#include "passwddlg.h" - -static TDECmdLineOptions options[] = -{ - { "+[user]", I18N_NOOP("Change password of this user"), 0 }, - TDECmdLineLastOption -}; - - -int main(int argc, char **argv) -{ - TDEAboutData aboutData("kdepasswd", I18N_NOOP("TDE passwd"), - VERSION, I18N_NOOP("Changes a UNIX password."), - TDEAboutData::License_Artistic, "Copyright (c) 2000 Geert Jansen"); - aboutData.addAuthor("Geert Jansen", I18N_NOOP("Maintainer"), - "jansen@kde.org", "http://www.stack.nl/~geertj/"); - - TDECmdLineArgs::init(argc, argv, &aboutData); - TDECmdLineArgs::addCmdLineOptions(options); - KUniqueApplication::addCmdLineOptions(); - - - if (!KUniqueApplication::start()) { - kdDebug() << "kdepasswd is already running" << endl; - return 0; - } - - KUniqueApplication app; - - KUser ku; - TQCString user; - bool bRoot = ku.isSuperUser(); - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - if (args->count()) - user = args->arg(0); - - /* You must be able to run "kdepasswd loginName" */ - if ( !user.isEmpty() && user!=KUser().loginName().utf8() && !bRoot) - { - KMessageBox::sorry(0, i18n("You need to be root to change the password of other users.")); - return 0; - } - - TQCString oldpass; - if (!bRoot) - { - int result = KDEpasswd1Dialog::getPassword(oldpass); - if (result != KDEpasswd1Dialog::Accepted) - return 0; - } - - KDEpasswd2Dialog *dlg = new KDEpasswd2Dialog(oldpass, user); - - - dlg->exec(); - - return 0; -} - diff --git a/kdepasswd/kdepasswd.desktop b/kdepasswd/kdepasswd.desktop deleted file mode 100644 index 98a22b359..000000000 --- a/kdepasswd/kdepasswd.desktop +++ /dev/null @@ -1,80 +0,0 @@ -[Desktop Entry] -Exec=kdepasswd -Icon=password -Type=Application -Categories=Qt;TDE;Settings; -NoDisplay=true -X-DCOP-ServiceType=Unique -Name=Change Password -Name[af]=Verander Wagwoord -Name[ar]=غيير كلمة المرور -Name[be]=Змяніць пароль -Name[bg]=Промяна на парола -Name[bn]=পাসওয়ার্ড পরিবর্তন -Name[br]=Kemmañ an Tremenger -Name[bs]=Promijenite šifru -Name[ca]=Canvia contrasenya -Name[cs]=Změna hesla -Name[csb]=Zmieni parolã -Name[cy]=Newid Cyfrinair -Name[da]=Ændr kodeord -Name[de]=Passwort ändern -Name[el]=Αλλαγή κωδικού πρόσβασης -Name[eo]=Ŝanĝi pasvorton -Name[es]=Cambiar la contraseña -Name[et]=Parooli muutmine -Name[eu]=Aldatu pasahitza -Name[fa]=تغییر اسم رمز -Name[fi]=Vaihda salasanaa -Name[fr]=Modifier le mot de passe -Name[fy]=Wachtwurd wizigje -Name[ga]=Athraigh Focal Faire -Name[gl]=Trocar Contrasinal -Name[he]=שנה ססמאות -Name[hi]=पासवर्ड बदलें -Name[hr]=Promjena lozinke -Name[hu]=Jelszóváltoztatás -Name[is]=Breyta lykilorði -Name[it]=Cambia password -Name[ja]=パスワードを変更 -Name[ka]=პაროლის შეცვლა -Name[kk]=Парольді өзгерту -Name[km]=ផ្លាស់ប្ដូរ​ពាក្យ​សម្ងាត់ -Name[ko]=비밀번호 변경 -Name[lo]=เปลี่ยนรหัสผ่าน -Name[lt]=Pakeiskite slaptažodį -Name[lv]=Mainīt paroli -Name[mk]=Измени лозинка -Name[ms]=Ubah Kata Laluan -Name[mt]=Ibdel Password -Name[nb]=Endre passord -Name[nds]=Passwoort ännern -Name[ne]=पासवर्ड परिवर्तन गर्नुहोस् -Name[nl]=Wachtwoord wijzigen -Name[nn]=Endra passord -Name[pa]=ਗੁਪਤ-ਕੋਡ ਤਬਦੀਲ -Name[pl]=Zmień hasło -Name[pt]=Mudar a Senha -Name[pt_BR]=Modificar Senha -Name[ro]=Schimbare parolă -Name[ru]=Изменить пароль -Name[rw]=Guhindura Ijambobanga -Name[se]=Rievdat beassansáni -Name[sk]=Zmena heslahesla -Name[sl]=Spremeni geslo -Name[sr]=Промени лозинку -Name[sr@Latn]=Promeni lozinku -Name[sv]=Ändra lösenord -Name[ta]=கடவுச்சொல்லை மாற்று -Name[te]=పాస్ వర్డు మార్చండి -Name[tg]=Гузарвожаҳо -Name[th]=เปลี่ยนรหัสผ่าน -Name[tr]=Parola Değiştir -Name[tt]=Sersüz Üzgärtü -Name[uk]=Зміна пароля -Name[uz]=Maxfiy soʻzni oʻzgartirish -Name[uz@cyrillic]=Махфий сўзни ўзгартириш -Name[vi]=Thay đổi Mật khẩu -Name[wa]=Candjî d' sicret -Name[zh_CN]=更改密码 -Name[zh_TW]=改變密碼 diff --git a/kdepasswd/passwd.cpp b/kdepasswd/passwd.cpp deleted file mode 100644 index 9d29333fc..000000000 --- a/kdepasswd/passwd.cpp +++ /dev/null @@ -1,284 +0,0 @@ -/* vi: ts=8 sts=4 sw=4 - * - * $Id$ - * - * This file is part of the KDE project, module tdesu. - * Copyright (C) 1999,2000 Geert Jansen - * - * passwd.cpp: Change a user's password. - */ - -#include // setenv - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include - -#include -#include "passwd.h" - - -PasswdProcess::PasswdProcess(TQCString user) -{ - struct passwd *pw; - - if (user.isEmpty()) - { - pw = getpwuid(getuid()); - if (pw == 0L) - { - kdDebug(1512) << "You don't exist!\n"; - return; - } - m_User = pw->pw_name; - } else - { - pw = getpwnam(user); - if (pw == 0L) - { - kdDebug(1512) << k_lineinfo << "User " << user << "does not exist.\n"; - return; - } - m_User = user; - } - bOtherUser = (pw->pw_uid != getuid()); -} - - -PasswdProcess::~PasswdProcess() -{ -} - - -int PasswdProcess::checkCurrent(const char *oldpass) -{ - return exec(oldpass, 0L, 1); -} - - -int PasswdProcess::exec(const char *oldpass, const char *newpass, - int check) -{ - if (m_User.isEmpty()) - return -1; -// if (check) -// setTerminal(true); - - // Try to set the default locale to make the parsing of the output - // of `passwd' easier. - setenv("LANG","C", true /* override */); - - QCStringList args; - if(bOtherUser) - args += m_User; - int ret = PtyProcess::exec("passwd", args); - if (ret < 0) - { - kdDebug(1512) << k_lineinfo << "Passwd not found!\n"; - return PasswdNotFound; - } - - ret = ConversePasswd(oldpass, newpass, check); - if (ret < 0) - kdDebug(1512) << k_lineinfo << "Conversation with passwd failed. pid = " << pid() << endl; - - if ((waitForChild() != 0) && !check) - return PasswordNotGood; - - return ret; -} - - -/* - * The tricky thing is to make this work with a lot of different passwd - * implementations. We _don't_ want implementation specific routines. - * Return values: -1 = unknown error, 0 = ok, >0 = error code. - */ - -int PasswdProcess::ConversePasswd(const char *oldpass, const char *newpass, - int check) -{ - TQCString line, errline; - int state = 0; - - while (state != 7) - { - line = readLine(); - if (line.isNull()) - { - return -1; - } - - if (state == 0 && isPrompt(line, "new")) - // If root is changing a user's password, - // passwd can't prompt for the original password. - // Therefore, we have to start at state=2. - state=2; - - switch (state) - { - case 0: - // Eat garbage, wait for prompt - m_Error += line+"\n"; - if (isPrompt(line, "password")) - { - WaitSlave(); - write(m_Fd, oldpass, strlen(oldpass)); - write(m_Fd, "\n", 1); - state++; - break; - } - if (m_bTerminal) - fputs(line, stdout); - break; - - case 1: case 3: case 6: - // Wait for \n - if (line.isEmpty()) - { - state++; - break; - } - // error - return -1; - - case 2: - m_Error = ""; - if( line.contains("again")) - { - m_Error = line; - kill(m_Pid, SIGKILL); - waitForChild(); - return PasswordIncorrect; - } - // Wait for second prompt. - errline = line; // use first line for error message - while (!isPrompt(line, "new")) - { - line = readLine(); - if (line.isNull()) - { - // We didn't get the new prompt so assume incorrect password. - if (m_bTerminal) - fputs(errline, stdout); - m_Error = errline; - return PasswordIncorrect; - } - } - - // we have the new prompt - if (check) - { - kill(m_Pid, SIGKILL); - waitForChild(); - return 0; - } - WaitSlave(); - write(m_Fd, newpass, strlen(newpass)); - write(m_Fd, "\n", 1); - state++; - break; - - case 4: - // Wait for third prompt - if (isPrompt(line, "re")) - { - WaitSlave(); - write(m_Fd, newpass, strlen(newpass)); - write(m_Fd, "\n", 1); - state += 2; - break; - } - // Warning or error about the new password - if (m_bTerminal) - fputs(line, stdout); - m_Error = line + "\n"; - state++; - break; - - case 5: - // Wait for either a "Reenter password" or a "Enter password" prompt - if (isPrompt(line, "re")) - { - WaitSlave(); - write(m_Fd, newpass, strlen(newpass)); - write(m_Fd, "\n", 1); - state++; - break; - } - else if (isPrompt(line, "password")) - { - kill(m_Pid, SIGKILL); - waitForChild(); - return PasswordNotGood; - } - if (m_bTerminal) - fputs(line, stdout); - m_Error += line + "\n"; - break; - } - } - - // Are we ok or do we still get an error thrown at us? - m_Error = ""; - state = 0; - while (state != 1) - { - line = readLine(); - if (line.isNull()) - { - // No more input... OK - return 0; - } - if (isPrompt(line, "password")) - { - // Uh oh, another prompt. Not good! - kill(m_Pid, SIGKILL); - waitForChild(); - return PasswordNotGood; - } - m_Error += line + "\n"; // Collect error message - } - - kdDebug(1512) << k_lineinfo << "Conversation ended successfully.\n"; - return 0; -} - - -bool PasswdProcess::isPrompt(TQCString line, const char *word) -{ - unsigned i, j, colon; - unsigned int lineLength(line.length()); - for (i=0,j=0,colon=0; i - */ - -#ifndef __Passwd_h_Included__ -#define __Passwd_h_Included__ - -#include -#include - -/** - * A C++ API to passwd. - */ - -class PasswdProcess - : public PtyProcess -{ -public: - PasswdProcess(TQCString user=0); - ~PasswdProcess(); - - enum Errors { PasswdNotFound=1, PasswordIncorrect, PasswordNotGood }; - - int checkCurrent(const char *oldpass); - int exec(const char *oldpass, const char *newpass, int check=0); - - TQCString error() { return m_Error; } - -private: - bool isPrompt(TQCString line, const char *word=0L); - int ConversePasswd(const char *oldpass, const char *newpass, - int check); - - TQCString m_User, m_Error; - bool bOtherUser; -}; - - -#endif // __Passwd_h_Included__ diff --git a/kdepasswd/passwddlg.cpp b/kdepasswd/passwddlg.cpp deleted file mode 100644 index 7aee3fe52..000000000 --- a/kdepasswd/passwddlg.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/* vi: ts=8 sts=4 sw=4 - * - * $Id$ - * - * This file is part of the KDE project, module tdesu. - * Copyright (C) 2000 Geert Jansen - */ - -#include -#include - -#include "passwd.h" -#include "passwddlg.h" - - -KDEpasswd1Dialog::KDEpasswd1Dialog() - : KPasswordDialog(Password, false, 0) -{ - setCaption(i18n("Change Password")); - setPrompt(i18n("Please enter your current password:")); -} - - -KDEpasswd1Dialog::~KDEpasswd1Dialog() -{ -} - - -bool KDEpasswd1Dialog::checkPassword(const char *password) -{ - PasswdProcess proc(0); - - int ret = proc.checkCurrent(password); - switch (ret) - { - case -1: - { - TQString msg = TQString::fromLocal8Bit(proc.error()); - if (!msg.isEmpty()) - msg = "

\"" + msg + "\""; - msg = "" + i18n("Conversation with 'passwd' failed.") + msg; - KMessageBox::error(this, msg); - done(Rejected); - return false; - } - - case 0: - return true; - - case PasswdProcess::PasswdNotFound: - KMessageBox::error(this, i18n("Could not find the program 'passwd'.")); - done(Rejected); - return false; - - case PasswdProcess::PasswordIncorrect: - KMessageBox::sorry(this, i18n("Incorrect password. Please try again.")); - return false; - - default: - KMessageBox::error(this, i18n("Internal error: illegal return value " - "from PasswdProcess::checkCurrent.")); - done(Rejected); - return false; - } -} - - -// static -int KDEpasswd1Dialog::getPassword(TQCString &password) -{ - KDEpasswd1Dialog *dlg = new KDEpasswd1Dialog(); - int res = dlg->exec(); - if (res == Accepted) - password = dlg->password(); - delete dlg; - return res; -} - - - -KDEpasswd2Dialog::KDEpasswd2Dialog(const char *oldpass, TQCString user) - : KPasswordDialog(NewPassword, false, 0) -{ - m_Pass = oldpass; - m_User = user; - - setCaption(i18n("Change Password")); - if (m_User.isEmpty()) - setPrompt(i18n("Please enter your new password:")); - else - setPrompt(i18n("Please enter the new password for user %1:").arg(static_cast(m_User))); -} - - -KDEpasswd2Dialog::~KDEpasswd2Dialog() -{ -} - - -bool KDEpasswd2Dialog::checkPassword(const char *password) -{ - PasswdProcess proc(m_User); - - if (strlen(password) > 8) - { - switch(KMessageBox::warningYesNoCancel(this, - m_User.isEmpty() ? - i18n("Your password is longer than 8 characters. On some " - "systems, this can cause problems. You can truncate " - "the password to 8 characters, or leave it as it is.") : - i18n("The password is longer than 8 characters. On some " - "systems, this can cause problems. You can truncate " - "the password to 8 characters, or leave it as it is.") - , - i18n("Password Too Long"), - i18n("Truncate"), - i18n("Use as Is"), - "truncatePassword")) - { - case KMessageBox::Yes : - const_cast(password)[8] = '\000'; - break; - case KMessageBox::No : - break; - default : return false; - } - } - - int ret = proc.exec(m_Pass, password); - switch (ret) - { - case 0: - { - hide(); - TQString msg = TQString::fromLocal8Bit(proc.error()); - if (!msg.isEmpty()) - msg = "

\"" + msg + "\""; - msg = "" + i18n("Your password has been changed.") + msg; - KMessageBox::information(0L, msg); - return true; - } - - case PasswdProcess::PasswordNotGood: - { - TQString msg = TQString::fromLocal8Bit(proc.error()); - if (!msg.isEmpty()) - msg = "

\"" + msg + "\""; - msg = "" + i18n("Your password has not been changed.") + msg; - - // The pw change did not succeed. Print the error. - KMessageBox::sorry(this, msg); - return false; - } - - default: - TQString msg = TQString::fromLocal8Bit(proc.error()); - if (!msg.isEmpty()) - msg = "

\"" + msg + "\""; - msg = "" + i18n("Conversation with 'passwd' failed.") + msg; - KMessageBox::sorry(this, msg); - done(Rejected); - return true; - } - - return true; -} - - -#include "passwddlg.moc" diff --git a/kdepasswd/passwddlg.h b/kdepasswd/passwddlg.h deleted file mode 100644 index 3e81856e9..000000000 --- a/kdepasswd/passwddlg.h +++ /dev/null @@ -1,49 +0,0 @@ -/* vi: ts=8 sts=4 sw=4 - * - * $Id$ - * - * This file is part of the KDE project, module tdesu. - * Copyright (C) 2000 Geert Jansen - */ - -#ifndef __PasswdDlg_h_Incluced__ -#define __PasswdDlg_h_Incluced__ - -#include - -class KDEpasswd1Dialog - : public KPasswordDialog -{ - Q_OBJECT - -public: - KDEpasswd1Dialog(); - ~KDEpasswd1Dialog(); - - static int getPassword(TQCString &password); - -protected: - bool checkPassword(const char *password); -}; - - -class KDEpasswd2Dialog - : public KPasswordDialog -{ - Q_OBJECT - -public: - KDEpasswd2Dialog(const char *oldpass, TQCString user); - ~KDEpasswd2Dialog(); - -protected: - bool checkPassword(const char *password); - -private: - const char *m_Pass; - TQCString m_User; -}; - - - -#endif // __PasswdDlg_h_Incluced__ diff --git a/tdepasswd/CMakeLists.txt b/tdepasswd/CMakeLists.txt new file mode 100644 index 000000000..c711ea628 --- /dev/null +++ b/tdepasswd/CMakeLists.txt @@ -0,0 +1,37 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_subdirectory( kcm ) + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +install( FILES tdepasswd.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) + + +##### tdepasswd (executable) #################### + +tde_add_executable( tdepasswd AUTOMOC + SOURCES tdepasswd.cpp passwd.cpp passwddlg.cpp + LINK tdeio-shared + DESTINATION ${BIN_INSTALL_DIR} +) diff --git a/tdepasswd/LICENSE.readme b/tdepasswd/LICENSE.readme new file mode 100644 index 000000000..d3840e950 --- /dev/null +++ b/tdepasswd/LICENSE.readme @@ -0,0 +1,124 @@ +tdepasswd - a KDE front end to passwd + +Copyright (c) 1999,2000 by Geert Jansen + + The "Artistic License" + + Preamble + + The intent of this document is to state the conditions under which a + Package may be copied, such that the Copyright Holder maintains some + semblance of artistic control over the development of the package, + while giving the users of the package the right to use and + distribute the Package in a more-or-less customary fashion, plus the + right to make reasonable modifications. + + Definitions: + + * "Package" refers to the collection of files distributed by the + Copyright Holder, and derivatives of that collection of files + created through textual modification. + + * "Standard Version" refers to such a Package if it has not been + modified, or has been modified in accordance with the wishes of + the Copyright Holder. + + * "Copyright Holder" is whoever is named in the copyright or + copyrights for the package. + + * "You" is you, if you're thinking about copying or distributing + this Package. + + * "Reasonable copying fee" is whatever you can justify on the + basis of media cost, duplication charges, time of people + involved, and so on. (You will not be required to justify it to + the Copyright Holder, but only to the computing community at + large as a market that must bear the fee.) + + * "Freely Available" means that no fee is charged for the item + itself, though there may be fees involved in handling the item. + It also means that recipients of the item may redistribute it + under the same conditions they received it. + + 1. You may make and give away verbatim copies of the source form of + the Standard Version of this Package without restriction, provided + that you duplicate all of the original copyright notices and + associated disclaimers. + + 2. You may apply bug fixes, portability fixes and other + modifications derived from the Public Domain or from the Copyright + Holder. A Package modified in such a way shall still be considered + the Standard Version. + + 3. You may otherwise modify your copy of this Package in any way, + provided that you insert a prominent notice in each changed file + stating how and when you changed that file, and provided that you do + at least ONE of the following: + + a) place your modifications in the Public Domain or + otherwise make them Freely Available, such as by posting + said modifications to Usenet or an equivalent medium, or + placing the modifications on a major archive site such as + ftp.uu.net, or by allowing the Copyright Holder to include + your modifications in the Standard Version of the Package. + + b) use the modified Package only within your corporation + or organization. + + c) rename any non-standard executables so the names do not + conflict with standard executables, which must also be + provided, and provide a separate manual page for each + non-standard executable that clearly documents how it + differs from the Standard Version. + + d) make other distribution arrangements with the Copyright + Holder. + + 4. You may distribute the programs of this Package in object code or + executable form, provided that you do at least ONE of the following: + + a) distribute a Standard Version of the executables and + library files, together with instructions (in the manual + page or equivalent) on where to get the Standard Version. + + b) accompany the distribution with the machine-readable + source of the Package with your modifications. + + c) accompany any non-standard executables with their + corresponding Standard Version executables, giving the + non-standard executables non-standard names, and clearly + documenting the differences in manual pages (or + equivalent), together with instructions on where to get + the Standard Version. + + d) make other distribution arrangements with the Copyright + Holder. + + 5. You may charge a reasonable copying fee for any distribution of + this Package. You may charge any fee you choose for support of this + Package. You may not charge a fee for this Package itself. However, + you may distribute this Package in aggregate with other (possibly + commercial) programs as part of a larger (possibly commercial) + software distribution provided that you do not advertise this + Package as a product of your own. + + 6. The scripts and library files supplied as input to or produced as + output from the programs of this Package do not automatically fall + under the copyright of this Package, but belong to whomever + generated them, and may be sold commercially, and may be aggregated + with this Package. + + 7. C or perl subroutines supplied by you and linked into this + Package shall not be considered part of this Package. + + 8. The name of the Copyright Holder may not be used to endorse or + promote products derived from this software without specific prior + written permission. + + 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + The End + + diff --git a/tdepasswd/Makefile.am b/tdepasswd/Makefile.am new file mode 100644 index 000000000..65261086d --- /dev/null +++ b/tdepasswd/Makefile.am @@ -0,0 +1,17 @@ + +SUBDIRS = kcm + +bin_PROGRAMS = tdepasswd +tdepasswd_SOURCES = tdepasswd.cpp passwd.cpp passwddlg.cpp +tdepasswd_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +tdepasswd_LDADD = $(LIB_KIO) + +METASOURCES = AUTO +AM_CPPFLAGS= -I$(top_srcdir)/libkonq $(all_includes) +noinst_HEADERS = passwd.h passwddlg.h + +xdg_apps_DATA = tdepasswd.desktop + +messages: + $(XGETTEXT) $(tdepasswd_SOURCES) -o $(podir)/tdepasswd.pot + diff --git a/tdepasswd/README b/tdepasswd/README new file mode 100644 index 000000000..bac44cd6a --- /dev/null +++ b/tdepasswd/README @@ -0,0 +1,3 @@ +tdepasswd: A KDE front end to the Unix passwd command. + +Please report bugs to Geert Jansen diff --git a/tdepasswd/kcm/CMakeLists.txt b/tdepasswd/kcm/CMakeLists.txt new file mode 100644 index 000000000..338a4f4cb --- /dev/null +++ b/tdepasswd/kcm/CMakeLists.txt @@ -0,0 +1,44 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +if( NOT BUILD_LIBKONQ ) + include( "${TDE_CMAKE_DIR}/libkonq.cmake" ) +endif( NOT BUILD_LIBKONQ ) + +add_subdirectory( pics ) + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/libkonq + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +install( FILES kcm_useraccount.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) +install( FILES kcm_useraccount.kcfg kcm_useraccount_pass.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) + + +##### kcm_useraccount (module) ################## + +tde_add_kpart( kcm_useraccount AUTOMOC + SOURCES + main_widget.ui chfnprocess.cpp main.cpp + chfacedlg.cpp settings.kcfgc pass.kcfgc + LINK konq-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/tdepasswd/kcm/Makefile.am b/tdepasswd/kcm/Makefile.am new file mode 100644 index 000000000..fee3b3cd2 --- /dev/null +++ b/tdepasswd/kcm/Makefile.am @@ -0,0 +1,20 @@ +SUBDIRS = pics +kde_module_LTLIBRARIES = kcm_useraccount.la +kcm_useraccount_la_SOURCES = main_widget.ui chfnprocess.cpp \ + main.cpp chfacedlg.cpp settings.kcfgc pass.kcfgc +kcm_useraccount_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined +kcm_useraccount_la_LIBADD = $(top_builddir)/libkonq/libkonq.la + +AM_CPPFLAGS = -I$(top_srcdir)/libkonq $(all_includes) + +kde_kcfg_DATA = kcm_useraccount.kcfg kcm_useraccount_pass.kcfg + +METASOURCES = AUTO + +noinst_HEADERS = main.h chfnprocess.h chfacedlg.h + +xdg_apps_DATA = kcm_useraccount.desktop + + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/useraccount.pot diff --git a/tdepasswd/kcm/README b/tdepasswd/kcm/README new file mode 100644 index 000000000..b6c9f28ef --- /dev/null +++ b/tdepasswd/kcm/README @@ -0,0 +1,27 @@ + +Thu Jan 29 00:34:49 CET 2004 +Frans Englich + +KCM useraccount is a merge of the former tdebase/kcontrol/email +and tdeutils/tdepasswd/userinfo/. They existed in KDE 3.1, at least. + +As a bonus, on top of saving the stuff with KEMailSettings it tries +also to save the realname to /etc/passwd. This is done via chfn, wrapped +in ChfnProcess, chfnprocess.h - which is the place to ifdef/modify so +other systems/ychfn/whatever works. +/etc/passwd is not the primary goal, the focus is on KDE's settings. The KCM +tries to hide the implementation differences and play nice with the +user - keep that in mind. + +The "face" term is rather scary.. For example I don't think the user immediately +associate to the login image when a phrase such as this is thrown in the face: +"Your administrator has disallowed changing your face". Keep it in mind.. + +Some information which was available in userinfo is left out - the home +folder and shell info. A typical user is not interested in the info nor +knows what it means. And the advanced users already knows it. + +If further information is added, think twice if it should not be +added in a "Details..." dialog - is it useful for the majority or not? +The SMTP setting as well as UID should be moved to that dialog too, IMO. + diff --git a/tdepasswd/kcm/chfacedlg.cpp b/tdepasswd/kcm/chfacedlg.cpp new file mode 100644 index 000000000..0a3dbfb78 --- /dev/null +++ b/tdepasswd/kcm/chfacedlg.cpp @@ -0,0 +1,188 @@ +/** + * Copyright 2003 Braden MacDonald + * Copyright 2003 Ravikiran Rajagopal + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * + * + * Please see the README + * + */ + +/** + * @file UserInfo's Dialog for changing your face. + * @author Braden MacDonald + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "chfacedlg.h" +#include "settings.h" // TDEConfigXT + + + +/** + * TODO: It would be nice if the widget were in a .ui + */ +ChFaceDlg::ChFaceDlg(const TQString& picsdir, TQWidget *parent, const char *name, bool modal) + : KDialogBase( parent, name, modal, i18n("Change your Face"), Ok|Cancel, Ok, true ) +{ + TQWidget *page = new TQWidget(this); + setMainWidget( page ); + + TQVBoxLayout *top = new TQVBoxLayout(page, 0, spacingHint()); + + TQLabel *header = new TQLabel( i18n("Select a new face:"), page ); + top->addWidget( header ); + + m_FacesWidget = new TDEIconView( page ); + m_FacesWidget->setSelectionMode( TQIconView::Single ); + m_FacesWidget->setItemsMovable( false ); + m_FacesWidget->setMinimumSize( 400, 200 ); + + connect( m_FacesWidget, TQT_SIGNAL( selectionChanged( TQIconViewItem * ) ), TQT_SLOT( slotFaceWidgetSelectionChanged( TQIconViewItem * ) ) ); + + connect( m_FacesWidget, TQT_SIGNAL( doubleClicked( TQIconViewItem *, const TQPoint & ) ), TQT_SLOT( slotOk() ) ); + + top->addWidget( m_FacesWidget ); + + // Buttons to get more pics + TQHBoxLayout * morePics = new TQHBoxLayout( 0, 0, spacingHint() ); + TQPushButton *browseBtn = new TQPushButton( i18n("Custom &Image..."), page ); + connect( browseBtn, TQT_SIGNAL( clicked() ), TQT_SLOT( slotGetCustomImage() ) ); + morePics->addWidget( browseBtn ); +#if 0 + TQPushButton *acquireBtn = new TQPushButton( i18n("&Acquire Image..."), page ); + acquireBtn->setEnabled( false ); + morePics->addWidget( acquireBtn ); +#endif + morePics->addStretch(); + top->addLayout( morePics ); + + // Filling the icon view + TQDir facesDir( picsdir ); + if ( facesDir.exists() ) + { + TQStringList picslist = facesDir.entryList( TQDir::Files ); + for ( TQStringList::Iterator it = picslist.begin(); it != picslist.end(); ++it ) + new TQIconViewItem( m_FacesWidget, (*it).section(".",0,0), TQPixmap( picsdir + *it ) ); + } + facesDir.setPath( KCFGUserAccount::userFaceDir() ); + if ( facesDir.exists() ) + { + TQStringList picslist = facesDir.entryList( TQDir::Files ); + for ( TQStringList::Iterator it = picslist.begin(); it != picslist.end(); ++it ) + new TQIconViewItem( m_FacesWidget, "/"+(*it) == KCFGUserAccount::customFaceFile() ? + i18n("(Custom)") : (*it).section(".",0,0), + TQPixmap( KCFGUserAccount::userFaceDir() + *it ) ); + } + + m_FacesWidget->setResizeMode( TQIconView::Adjust ); + //m_FacesWidget->setGridX( FACE_PIX_SIZE - 10 ); + m_FacesWidget->arrangeItemsInGrid(); + + enableButtonOK( false ); + //connect( this, TQT_SIGNAL( okClicked() ), TQT_SLOT( slotSaveCustomImage() ) ); + + resize( 420, 400 ); +} + +void ChFaceDlg::addCustomPixmap( TQString imPath, bool saveCopy ) +{ + TQImage pix( imPath ); + // TODO: save pix to TMPDIR/userinfo-tmp, + // then scale and copy *that* to ~/.faces + + if (pix.isNull()) + { + KMessageBox::sorry( this, i18n("There was an error loading the image.") ); + return; + } + if ( (pix.width() > KCFGUserAccount::faceSize()) + || (pix.height() > KCFGUserAccount::faceSize()) ) + pix = pix.scale( KCFGUserAccount::faceSize(), KCFGUserAccount::faceSize(), TQ_ScaleMin );// Should be no bigger than certain size. + + if ( saveCopy ) + { + // If we should save a copy: + TQDir userfaces( KCFGUserAccount::userFaceDir() ); + if ( !userfaces.exists( ) ) + userfaces.mkdir( userfaces.absPath() ); + + pix.save( userfaces.absPath() + "/.userinfo-tmp" , "PNG" ); + KonqOperations::copy( this, KonqOperations::COPY, KURL::List( KURL( userfaces.absPath() + "/.userinfo-tmp" ) ), KURL( userfaces.absPath() + "/" + TQFileInfo(imPath).fileName().section(".",0,0) ) ); +#if 0 + if ( !pix.save( userfaces.absPath() + "/" + imPath , "PNG" ) ) + KMessageBox::sorry(this, i18n("There was an error saving the image:\n%1").arg( userfaces.absPath() ) ); +#endif + } + + TQIconViewItem* newface = new TQIconViewItem( m_FacesWidget, TQFileInfo(imPath).fileName().section(".",0,0) , pix ); + newface->setKey( KCFGUserAccount::customKey() );// Add custom items to end + m_FacesWidget->ensureItemVisible( newface ); + m_FacesWidget->setCurrentItem( newface ); +} + +void ChFaceDlg::slotGetCustomImage( ) +{ + TQCheckBox* checkWidget = new TQCheckBox( i18n("&Save copy in custom faces folder for future use"), 0 ); + + KFileDialog *dlg = new KFileDialog( TQDir::homeDirPath(), KImageIO::pattern( KImageIO::Reading ), + this, 0, true, checkWidget); + + dlg->setOperationMode( KFileDialog::Opening ); + dlg->setCaption( i18n("Choose Image") ); + dlg->setMode( KFile::File | KFile::LocalOnly ); + + KImageFilePreview *ip = new KImageFilePreview( dlg ); + dlg->setPreviewWidget( ip ); + if (dlg->exec() == TQDialog::Accepted) + addCustomPixmap( dlg->selectedFile(), checkWidget->isChecked() ); + // Because we give it a parent we have to close it ourselves. + dlg->close(true); +} + +#if 0 +void ChFaceDlg::slotSaveCustomImage() +{ + if ( m_FacesWidget->currentItem()->key() == USER_CUSTOM_KEY) + { + TQDir userfaces( TQDir::homeDirPath() + USER_FACES_DIR ); + if ( !userfaces.exists( ) ) + userfaces.mkdir( userfaces.absPath() ); + + if ( !m_FacesWidget->currentItem()->pixmap()->save( userfaces.absPath() + USER_CUSTOM_FILE , "PNG" ) ) + KMessageBox::sorry(this, i18n("There was an error saving the image:\n%1").arg( userfaces.absPath() ) ); + } +} +#endif + +#include "chfacedlg.moc" diff --git a/tdepasswd/kcm/chfacedlg.h b/tdepasswd/kcm/chfacedlg.h new file mode 100644 index 000000000..f96d50084 --- /dev/null +++ b/tdepasswd/kcm/chfacedlg.h @@ -0,0 +1,69 @@ +/** + * Copyright 2003 Braden MacDonald + * Copyright 2003 Ravikiran Rajagopal + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * + * + * Please see the README + * + */ + +/** + * @file UserInfo-chface: Dialog for choosing a new face for your user. + * @author Braden MacDonald + */ + +#ifndef CHFACEDLG_H +#define CHFACEDLG_H + +#include + +#include // declaration below + +enum FacePerm { adminOnly = 1, adminFirst = 2, userFirst = 3, userOnly = 4}; + +class KDialogBase; + +class ChFaceDlg : public KDialogBase +{ + Q_OBJECT +public: + + + ChFaceDlg(const TQString& picsdirs, TQWidget *parent=0, const char *name=0, bool modal=true); + + + TQPixmap getFaceImage() const + { + if(m_FacesWidget->currentItem()) + return *(m_FacesWidget->currentItem()->pixmap()); + else + return TQPixmap(); + } + +private slots: + void slotFaceWidgetSelectionChanged( TQIconViewItem *item ) + { enableButtonOK( !item->pixmap()->isNull() ); } + + void slotGetCustomImage(); + //void slotSaveCustomImage(); + +private: + void addCustomPixmap( TQString imPath, bool saveCopy ); + + TDEIconView *m_FacesWidget; +}; + +#endif // CHFACEDLG_H diff --git a/tdepasswd/kcm/chfnprocess.cpp b/tdepasswd/kcm/chfnprocess.cpp new file mode 100644 index 000000000..72c1599fc --- /dev/null +++ b/tdepasswd/kcm/chfnprocess.cpp @@ -0,0 +1,100 @@ +/*************************************************************************** + * Copyright 2003 Braden MacDonald * + * Copyright 2003 Ravikiran Rajagopal * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License (version 2) as * + * published by the Free Software Foundation. * + * * + ***************************************************************************/ + +/** + * @file Change a user's 'finger' information, specifically their full name. + * derived from tdepasswd. + */ + +#include +#include + +#include + +#include +#include +#include +#include "chfnprocess.h" + + +int ChfnProcess::exec(const char *pass, const char *name) +{ + // Try to set the default locale to make the parsing of the output + // of `chfn' easier. + putenv((char*)"LC_ALL=C"); + + QCStringList args; + args += "-f"; + args += name; + int ret = PtyProcess::exec("chfn", args); + if (ret < 0) + return ChfnNotFound; + + ret = ConverseChfn(pass); + + waitForChild(); + return ret; +} + + +/* + * The actual work. + * Return values: -1 = unknown error, 0 = ok, >0 = error code. + */ +int ChfnProcess::ConverseChfn(const char *pass) +{ + int status=-1; + + TQCString line; + while(1) + { + line = readLine(); + + if ( line.isEmpty() ) + continue;// discard line + + if ( line.contains( "Password: " )/*isPrompt( line, "password" )*/ ) + { + WaitSlave(); + write(m_Fd, pass, strlen(pass)); + write(m_Fd, "\n", 1); + } + + line = readLine(); // Let's see what the outcome was + + if ( line.contains( "Changing finger info" ) ) + { + // do nothing + } + else if ( line.contains( "information changed" ) ) + { + status=0; + break; + } + else if ( line.isEmpty() ) + { + status=0; + break; + } + else if ( line.contains( "Password error" ) || line.contains("Incorrect password") ) + { + status=PasswordError; + break; + } + else + { + status=MiscError; + m_Error=line; + break; + } + } + return status; +} + diff --git a/tdepasswd/kcm/chfnprocess.h b/tdepasswd/kcm/chfnprocess.h new file mode 100644 index 000000000..d29ccc538 --- /dev/null +++ b/tdepasswd/kcm/chfnprocess.h @@ -0,0 +1,33 @@ +/*************************************************************************** + * Copyright 2003 Braden MacDonald * + * Copyright 2003 Ravikiran Rajagopal * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License (version 2) as * + * published by the Free Software Foundation. * + * * + ***************************************************************************/ + +#ifndef CHFNPROC_H +#define CHFNPROC_H + +#include +#include + +class ChfnProcess : public PtyProcess +{ +public: + + enum Errors { ChfnNotFound=1, PasswordError=2, MiscError=3 }; + + int exec(const char *pass, const char *name); + + TQCString error() { return m_Error; } + +private: + int ConverseChfn(const char *pass); + + TQCString m_Error; +}; + +#endif diff --git a/tdepasswd/kcm/kcm_useraccount.desktop b/tdepasswd/kcm/kcm_useraccount.desktop new file mode 100644 index 000000000..51c168bd5 --- /dev/null +++ b/tdepasswd/kcm/kcm_useraccount.desktop @@ -0,0 +1,203 @@ +[Desktop Entry] +Icon=personal +Categories=Qt;TDE;X-TDE-settings-security; +X-TDE-ParentApp=kcontrol +X-TDE-Library=useraccount +Type=Application +Exec=tdecmshell kcm_useraccount +Name=Password & User Account +Name[af]=Gebruiker rekening en Wagwoord +Name[ar]=كلمة المرور و حساب المستخدم +Name[be]=Пароль і ўліковы запіс карыстальніка +Name[bg]=Потребител +Name[bn]=পাসওয়ার্ড এবং ব্যবহারকারী অ্যাকাউন্ট +Name[br]=Tremenger ha gont an arveriad +Name[bs]=Šifra i korisnički račun +Name[ca]=Contrasenya i compte d'usuari +Name[cs]=Heslo a uživatelský účet +Name[csb]=Parola ë kònto brëkòwnika +Name[cy]=Cyfrinair a Chyfrif Defnyddiwr +Name[da]=Kodeord og brugerkonto +Name[de]=Passwort & Benutzerzugang +Name[el]=Κωδικός πρόσβασης & Πληροφορίες χρήστη +Name[eo]=Pasvorto kaj uzanta konto +Name[es]=Contraseña y cuenta de usuario +Name[et]=Parool ja kasutaja konto +Name[eu]=Pasahitza eta erabiltzaile kontua +Name[fa]=اسم رمز و حساب کاربری +Name[fi]=Salasanat ja käyttäjätilit +Name[fr]=Compte utilisateur et mot de passe +Name[fy]=Wachtwurd en brûkersbehear +Name[ga]=Focal Faire & Cuntas Úsáideora +Name[gl]=Contrasinal e Conta de Usuario +Name[he]=ססמה ומידע על החשבון משתמש +Name[hi]=पासवर्ड तथा उपयोक्ता खाता +Name[hr]=Lozinka i korisnički nalozi +Name[hu]=Név és jelszó +Name[is]=Lykilorð og notandaaðgangur +Name[it]=Password e account utente +Name[ja]=パスワード & ユーザアカウント +Name[ka]=მომხმარებლის ანგარიშები და პაროლები +Name[kk]=Пароль мен тіркелгі +Name[km]=ពាក្យ​សម្ងាត់ & គណនី​អ្នក​ប្រើ +Name[ko]=비밀번호와 사용자 계정 +Name[lt]=Slaptažodis ir naudotojo paskyra +Name[lv]=Paroles un lietotāju konti +Name[mk]=Лозинка и корисничка сметка +Name[ms]=Kata Laluan & Akaun Pengguna +Name[mt]=Password u kont tal-user +Name[nb]=Passord og brukerkonto +Name[nds]=Passwoort & Brukerkonto +Name[ne]=पासवर्ड र प्रयोगकर्ता खाता +Name[nl]=Wachtwoord en gebruikerbeheer +Name[nn]=Passord og brukarkonto +Name[pa]=ਉਪਭੋਗੀ ਖਾਤਾ ਅਤੇ ਗੁਪਤ-ਕੋਡ +Name[pl]=Hasło i konto użytkownika +Name[pt]=Senha e Conta do Utilizador +Name[pt_BR]=Senha & Conta do Usuário +Name[ro]=Parolă și cont utilizator +Name[ru]=Профиль пользователя +Name[rw]=Ijambobanga & Konti Ukoresha +Name[se]=Beassansánit ja geavaheaddjekontut +Name[sk]=Heslo a účet +Name[sl]=Geslo in uporabniški račun +Name[sr]=Лозинка и кориснички налог +Name[sr@Latn]=Lozinka i korisnički nalog +Name[sv]=Lösenord och användarkonto +Name[ta]=கடவுச்சொல் & பயனர் கணக்கு +Name[te]=పాస్ వర్డ్ & యూజర్ ఖాతా +Name[tg]=Гузарвожа ва номи истифодакунанда +Name[th]=รหัสผ่านและบัญชีผู้ใช้ +Name[tr]=Parola ve Kullanıcı Hesabı +Name[tt]=Sersüz & Qullanuçı Xisabı +Name[uk]=Пароль і рахунок користувача +Name[uz]=Maxfiy soʻz va foydalanuvchi hisobi +Name[uz@cyrillic]=Махфий сўз ва фойдаланувчи ҳисоби +Name[vi]=Mật khẩu & Tài khoản Người dùng +Name[wa]=Sicret et conte uzeu +Name[zh_CN]=密码和用户信息 +Name[zh_TW]=密碼與帳號資訊 +Keywords=password,email,name,organization,realname,login image,face,echo mode +Keywords[ar]=كلمة المرور,البريد الإلكتروني,الإسم,المنظمة/الشركة,الإسم الحقيقي,صورة تسجيل الدخول,الوجه,نمط الصدى +Keywords[be]=Пароль,Электроннай пошта,Імя,Назва,Арганізацыя,Сапраўднае імя,Твар,Малюнак уваходу,password,email,name,organization,realname,login image,face,echo mode +Keywords[bg]=парола, е-поща, организация, сметка, потребител, вход, включване, password, email, name, organization, realname, login image, face, echo mode +Keywords[bs]=password,email,name,organization,realname,login image,face,echo mode,šifra,e-mail,ime,organizacija,pravo ime,stvarno ime,slika,lice +Keywords[ca]=contrasenya,correu,nom,organització,nom real,imatge de connexió,aspecte,mode d'eco +Keywords[cs]=heslo,email,jméno,organizace,přihlašovací obrázek,režim odezvy +Keywords[csb]=parola,e-maila,miono,nôzwëskò,òrganizacëjô,logòwanié,brëkòwnik,miono brëkòwnika,òbrôzk,skarń,gwiôzdczi,wëskrzëniwanié parolów +Keywords[da]=kodeord,email,e-mail,organisation,rigtigt navn,login-billede,hoved, ekkotilstand +Keywords[de]=Passwort,E-Mail,Name,Organisation,Tatsächlicher Name,Login,Anmeldebild,Bild,Echomodus +Keywords[el]=κωδικός πρόσβασης;email;όνομα;οργανισμός;πραγματικό όνομα;εικόνα σύνδεσης;πρόσωπο; τρόπος εμφάνισης +Keywords[en_GB]=password,email,name,organisation,realname,login image,face,echo mode +Keywords[eo]=pasvorto,retpoŝto,nomo,organizaĵo,realnomo,salutbildo,vizaĝo,eĥo moduso +Keywords[es]=contraseña;correo electrónico;nombre;organización;nombre real;imagen de acceso;cara;modo de eco +Keywords[et]=parool;email;nimi;organisatsioon;pärisnimi;kasutaja pilt;nägu; echo režiim +Keywords[eu]=pasahitza;helb-elek;izena;erakundea;benetako izena;sarrerako irudia,aurpegia,echo modua +Keywords[fa]=اسم رمز، رایانامه، نام، سازمان، نام واقعی، تصویر ورود، چهره، حالت پژواک +Keywords[fi]=salasana,sähköposti,nimi,organisaatio,oikea nimi,kirjautumiskuva,naama,kaiutustilanus,kaiutustapa +Keywords[fr]=mot de passe,email,courrier électronique,adresse électronique,organisation,non complet,image d'identification,mode d'affichage,face +Keywords[fy]=wachtwoord,wachtwurd,e-mail,e-post,organisatie,organisaasje,naam,namme,login,aanmelden,oanmelde,afbeelding,ôfbyldings,gezicht,echo,asterisk +Keywords[ga]=focal faire,ríomhphost,ainm,eagras,fíorainm,íomhá logála isteach,aghaidh,mód macalla +Keywords[gl]=contrasinal,correo-e,nome,organización,nome real,imaxe de início,cara, modo eco +Keywords[he]=ססמאות, דוא"ל, שם, ארגון, שם אמתי,תמונת כניסה, מצב echo, password,email,name,organization,realname,login image,face,echo mode +Keywords[hr]=password,email,name,organization,realname,login image,face,echo mode,lozinka,e-pošta,naziv,ime,organizacija,pravo ime,slika prijave,lice,odzivnik +Keywords[hu]=jelszó,e-mail,név,szervezet,valódi név,bejelentkezési kép,arc,kiírási mód +Keywords[it]=password,email,nome,organizzazione,nome vero,immagine login,icona login,immagine accesso,faccia,modo echo +Keywords[ja]=パスワード;Eメール;名前;組織;本名;ログイン画像;顔;エコーモード +Keywords[km]=ពាក្យ​សម្ងាត់; អ៊ីមែល; ឈ្មោះ; អង្គការ; ឈ្មោះ​ពិត; រូបភាព​ពេល​ចូល; មុខ; របៀបបង្ហាញ +Keywords[lt]=password,email,name,organization,realname,login image,face,echo mode,slaptažodis,e. paštas,el.paštas,vardas,organizacija,tikrasis vardas,veidas +Keywords[mk]=password,email,name,organization,realname,login,image,face,echo mode,лозинка,е-пошта,електронска пошта,име,организација,вистинско име,слика за најава,лице +Keywords[nb]=passord,e-post,navn,organisasjon,fullt navn,innloggingsbilde,ansikt,ekkomodus +Keywords[nds]=Passwoort,EMail,Nettpost,Nettbreef,Organisatschoon,Naam,echte Naam,Anmellenbild,Loginbild,Gesicht,Echometood +Keywords[ne]=पासवर्ड, इमेल, नाम, सङ्गठन, वास्तविकनाम, लागइन छवि, मोहडा, प्रतिध्वनि मोड +Keywords[nl]=wachtwoord,e-mail,organisatie,naam,login,aanmelden,afbeelding,gezicht,echo,asterisk +Keywords[nn]=passord;e-post;namn;organisasjon;fullt namn;innloggingsbilete;fjes;ekkomodus +Keywords[pa]=ਗੁਪਤ-ਕੋਡ,ਈ-ਮੇਲ,ਨਾਂ,ਸੰਗਠਨ,ਅਸਲੀ ਨਾਂ,login image,face,echo mode +Keywords[pl]=hasło,e-mail,imię,nazwisko,organizacja,login,użytkownik,nazwa użytkownika,obrazek,twarz,gwiazdki,pokazywanie haseł +Keywords[pt]=senha,e-mail,nome,organização,nome real,imagem de ligação,cara,modo de eco +Keywords[pt_BR]=senha,e-mail,nome,organização,nome real,imagem de login,aparência,modo de ecoar +Keywords[ro]=parolă,email,nume,organizație,nume real,imagine de logare,față,mod ecou +Keywords[ru]=password,email,name,organization,realname,login image,face,echo mode,пароль,имя,организация,электронная почта +Keywords[se]=beassansátni,e-boasta,namma,organisašuvdna,olles namma,sisačálihangovva,amadádju,skájahanmodus +Keywords[sl]=geslo;e-pošta;ime;organizacija;pravo ime;slika prijave;prijavna slika,obraz;način odmeva +Keywords[sr]=password,email,name,organization,realname,login image,face,echo mode,лозинка,е-пошта,име,организација,ехо,режим,лице +Keywords[sr@Latn]=password,email,name,organization,realname,login image,face,echo mode,lozinka,e-pošta,ime,organizacija,eho,režim,lice +Keywords[sv]=lösenord;e-post;namn;organisation;verkligt namn;inloggningsbild;bild;ekoläge +Keywords[th]=รหัสผ่าน, อีเมล,ชื่อ,องค์กร,ชื่อจริง,ภาพสำหรับล็อกอิน,ใบหน้า,โหมดแสดงอักษร +Keywords[tr]=parola,e-posta,isim,gerçek isim,giriş resmi,yüz +Keywords[uk]=пароль,адреса електронної пошти,організація,ім'я,фотографія,зображення +Keywords[uz]=maxfiy soʻz,elektron pochta,foydalanuvchi,haqiqiy ismi,nishoncha,tashkilot, echo mode +Keywords[uz@cyrillic]=махфий сўз,электрон почта,фойдаланувчи,ҳақиқий исми,нишонча,ташкилот, echo mode +Keywords[vi]=mật khẩu,email,tên,cơ quan,tên thật,hình đăng nhập,mặt cười,chế độ báo lại +Keywords[wa]=sicret,motd di passe,emile,no,soce,vray no,imådje d' elodjaedje,face,tiesse,echo mode,mode echo +Keywords[zh_CN]=password,email,name,organization,realname,login image,face,echo mode,密码,电子邮件,姓名,组织,真实姓名,登陆图像,头像,回显 +Keywords[zh_TW]=password,email,name,organization,realname,login image,face,echo mode,密碼,電子郵件,組織,真名,登入圖片,面貌,回音模式 +Comment=User information such as password, name and email +Comment[af]=Gebruiker informasie, soos naam, wagwoord en e-pos +Comment[ar]=معلومات عن المستخدم مثل كلمة المرور ، الإسم و عنوان البريد الإلكتروني +Comment[be]=Інфармацыя аб карыстальніку, напр. пароль, імя і электронны адрас +Comment[bg]=Настройване на потребителската сметка, паролата, името и е-пощата +Comment[bn]=ব্যবহারকারী তথ্য, যথা পাসওয়ার্ড, নাম এবং ই-মেইল +Comment[br]=Titouroù diwar-benn an arveriad (tremenger, anv, chomlec'h postel) +Comment[bs]=Informacije o korisniku kao što su šifra, ime i e-mail +Comment[ca]=Informació de l'usuari com ara contrasenya, nom i correu +Comment[cs]=Informace o uživateli, jako heslo, jméno nebo email +Comment[csb]=Wëdowiédzô ò kònce brëkòwnika: parola, miono ë nôzwëskò, e-maila ëtd. +Comment[cy]=Gwybodaeth ddefnyddiwr fel cyfrinair, enw ac ebost +Comment[da]=Brugerinformation såsom kodeord, navn og e-mail +Comment[de]=Benutzerinformation wie Passwort, Name, E-Mail-Adresse +Comment[el]=Πληροφορίες χρήστη όπως ο κωδικός πρόσβασης, το όνομα και το email +Comment[eo]=Uzantaj informoj kiel pasvorto, nomo kaj retpoŝto +Comment[es]=Información del usuario como la contraseña, el nombre o el correo electrónico +Comment[et]=Kasutajainfo, nt. parool, nimi ja e-posti aadress +Comment[eu]=Erabiltzaileari buruzko informazioa; pasahitza, izena eta posta-helbidea, adibidez. +Comment[fa]=استفاده از اطلاعاتی نظیر اسم رمز، نام و رایانامه +Comment[fi]=Käyttäjien tiedot, kuten salasanat, nimet ja sähköpostiosoite +Comment[fr]=Informations sur l'utilisateur, comme le mot de passe, le nom, et l'adresse électronique +Comment[fy]=Brûkersynformaasje sa as wachtwurd, namme en e-adres +Comment[gl]=Información do usuario como contrasinal, nome e correo-e +Comment[he]=מידע אישי כגון ססמה, שם וכתובת דוא"ל +Comment[hi]=उपयोक्ता जानकारी जैसे कि पासवर्ड, नाम तथा ई-मेल +Comment[hr]=Korisnički podaci poput lozinke, imena i e-pošte +Comment[hu]=A felhasználójellemzők, például az e-mail cím vagy a jelszó beállítása +Comment[is]=Upplýsingar um notandann eins og til dæmis póstfang, lykilorð og nafn +Comment[it]=Informazioni utente come password, nome ed email +Comment[ja]=パスワード、名前、Eメールなどのユーザ情報 +Comment[ka]=ცნობები მომხმარებლების შესახებ, როგორიცაა პაროლი, სახელი და ელ-ფოსტა +Comment[kk]=Паролі, аты және эл.пошта адресі секілді пайдаланушының мәліметі +Comment[km]=ព័ត៌មាន​អ្នក​ប្រើ​ដូចជា ពាក្យ​សម្ងាត់,ឈ្មោះ និង​អ៊ីមែល +Comment[ko]=비밀번호, 이름, 전자우편 주소 같은 개인 정보 +Comment[lt]=Naudotojo informacija, tokia, kaip slaptažodis, vardas ir e. pašto adresas +Comment[lv]=Lietotāja informācija kā parole, vārds un e-pasts +Comment[mk]=Кориснички информации како лозинка, име и е-пошта +Comment[ms]=Maklumat pengguna seperti kata laluan, nama dan e-mel +Comment[mt]=Informazzjoni dwar il-user, bħal isem, password u email +Comment[nb]=Brukerinformasjon som passord, navn og e-postadresse +Comment[nds]=Brukerinformatschonen, as t.B. Passwoort, Naam un Nettpostadress +Comment[ne]=पासवर्ड, नाम, र इमेल जस्तो प्रयोगकर्ता सूचना +Comment[nl]=Gebruikerinformatie zoals wachtwoord, naam en e-mailadres +Comment[nn]=Brukarinformasjon som passord, namn og e-postadresse +Comment[pa]=ਉਪਭੋਗੀ ਜਾਣਕਾਰੀ ਜਿਵੇਂ ਕਿ ਗੁਪਤ-ਕੋਡ, ਨਾਂ ਅਤੇ ਈ-ਮੇਲ +Comment[pl]=Informacje o koncie użytkownika: hasło, imię i nazwisko, e-mail itd. +Comment[pt]=Informações do utilizador, como a senha, o nome e o e-mail +Comment[pt_BR]=Informações do usuário tais como senha, nome e e-mail +Comment[ro]=Informații despre utilizator, precum parola, numele și adresa de e-mail +Comment[ru]=Сведения о пользователе, такие как пароль, имя и e-mail +Comment[rw]=Amakuru y'ukoresha nk'ijambobanga,izina na imeli +Comment[se]=Geavaheaddjedieđut nugo beassansátni, namma ja e-boasta +Comment[sk]=Informácie o používateľovi, ako heslo, meno a e-mail +Comment[sl]=Uporabniške informacije, kot so geslo, ime in e-pošta +Comment[sr]=Информације о кориснику као што је лозинка, име и е-пошта +Comment[sr@Latn]=Informacije o korisniku kao što je lozinka, ime i e-pošta +Comment[sv]=Användarinformation som lösenord, namn och e-post +Comment[ta]=பயனர் தகவல் கடவுச்சொல்லைப் போல, பெயர் மற்றும் மிண்ணஞ்சல் +Comment[th]=ข้อมูลของผู้ใช้ เช่น รหัสผ่าน, ชื่อ และอีเมล +Comment[tr]=Parola, isim ve e-posta gibi kullanıcı bilgisi +Comment[tt]=Qullanuçı caylawı: sersüz, isem, email kebek närsälär +Comment[uk]=Інформація про користувача така як: пароль, ім'я та адреса електронної пошти +Comment[uz]=Foydalanuvchining ismi, maxfiy soʻzi va elektron pochtasi kabi maʼlumot +Comment[uz@cyrillic]=Фойдаланувчининг исми, махфий сўзи ва электрон почтаси каби маълумот +Comment[vi]=Thông tin về người dùng như mật khẩu, tên và email +Comment[wa]=Informåcion d' uzeus come les sicrets, nos et emiles +Comment[zh_CN]=像密码、姓名和电子邮件这样的用户信息 +Comment[zh_TW]=使用者資訊如密碼、名稱和電子郵件 diff --git a/tdepasswd/kcm/kcm_useraccount.kcfg b/tdepasswd/kcm/kcm_useraccount.kcfg new file mode 100644 index 000000000..549afdb1e --- /dev/null +++ b/tdepasswd/kcm/kcm_useraccount.kcfg @@ -0,0 +1,44 @@ + + + tdeglobal.h + kstandarddirs.h + + + + + TDEGlobal::dirs()->resourceDirs("data").last() + "tdm/faces" + '/' + + + + $HOME/.faces/ + + + PreferAdmin + + + + + 64 + + + + .default.face.icon + + + + Custom.png + + + + $HOME/.face.icon + + + + Zz_custom + + + diff --git a/tdepasswd/kcm/kcm_useraccount_pass.kcfg b/tdepasswd/kcm/kcm_useraccount_pass.kcfg new file mode 100644 index 000000000..c76e4a657 --- /dev/null +++ b/tdepasswd/kcm/kcm_useraccount_pass.kcfg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + OneStar + + + diff --git a/tdepasswd/kcm/main.cpp b/tdepasswd/kcm/main.cpp new file mode 100644 index 000000000..48478c306 --- /dev/null +++ b/tdepasswd/kcm/main.cpp @@ -0,0 +1,343 @@ + +/** + * Copyright (C) 2004 Frans Englich + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * + * + * Please see the README + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "settings.h" +#include "pass.h" +#include "chfnprocess.h" +#include "chfacedlg.h" +#include "main.h" + +typedef KGenericFactory Factory; +K_EXPORT_COMPONENT_FACTORY( kcm_useraccount, Factory("useraccount") ) + +KCMUserAccount::KCMUserAccount( TQWidget *parent, const char *name, + const TQStringList &) + : TDECModule( parent, name) +{ + TQVBoxLayout *topLayout = new TQVBoxLayout(this); + _mw = new MainWidget(this); + topLayout->addWidget( _mw ); + + connect( _mw->btnChangeFace, TQT_SIGNAL(clicked()), TQT_SLOT(slotFaceButtonClicked())); + connect( _mw->btnChangePassword, TQT_SIGNAL(clicked()), TQT_SLOT(slotChangePassword())); + _mw->btnChangePassword->setGuiItem( KGuiItem( i18n("Change &Password..."), "password" )); + + connect( _mw->leRealname, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(changed())); + connect( _mw->leOrganization, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(changed())); + connect( _mw->leEmail, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(changed())); + connect( _mw->leSMTP, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(changed())); + + _ku = new KUser(); + _kes = new KEMailSettings(); + + _mw->lblUsername->setText( _ku->loginName() ); + _mw->lblUID->setText( TQString().number(_ku->uid()) ); + + TDEAboutData *about = new TDEAboutData(I18N_NOOP("kcm_useraccount"), + I18N_NOOP("Password & User Information"), 0, 0, + TDEAboutData::License_GPL, + I18N_NOOP("(C) 2002, Braden MacDonald, " + "(C) 2004 Ravikiran Rajagopal")); + + about->addAuthor("Frans Englich", I18N_NOOP("Maintainer"), "frans.englich@telia.com"); + about->addAuthor("Ravikiran Rajagopal", 0, "ravi@kde.org"); + about->addAuthor("Michael H\303\244ckel", "haeckel@kde.org" ); + + about->addAuthor("Braden MacDonald", I18N_NOOP("Face editor"), "bradenm_k@shaw.ca"); + about->addAuthor("Geert Jansen", I18N_NOOP("Password changer"), "jansen@kde.org", + "http://www.stack.nl/~geertj/"); + about->addAuthor("Daniel Molkentin"); + about->addAuthor("Alex Zepeda"); + about->addAuthor("Hans Karlsson", I18N_NOOP("Icons"), "karlsson.h@home.se"); + about->addAuthor("Hermann Thomas", I18N_NOOP("Icons"), "h.thomas@gmx.de"); + setAboutData(about); + + setQuickHelp( i18n("Here you can change your personal information, which " + "will be used in mail programs and word processors, for example. You can " + "change your login password by clicking Change Password.") ); + + addConfig( KCFGPassword::self(), this ); + load(); +} + +void KCMUserAccount::slotChangePassword() +{ + TDEProcess *proc = new TDEProcess; + TQString bin = TDEGlobal::dirs()->findExe("tdepasswd"); + if ( !bin ) + { + kdDebug() << "kcm_useraccount: tdepasswd was not found." << endl; + KMessageBox::sorry ( this, i18n( "A program error occurred: the internal " + "program 'tdepasswd' could not be found. You will " + "not be able to change your password.")); + + _mw->btnChangePassword->setEnabled(false); + delete proc; + return; + } + + *proc << bin << _ku->loginName() ; + proc->start(TDEProcess::DontCare); + + delete proc; + +} + + +KCMUserAccount::~KCMUserAccount() +{ + delete _ku; + delete _kes; +} + +void KCMUserAccount::load() +{ + _mw->lblUsername->setText(_ku->loginName()); + + _kes->setProfile(_kes->defaultProfileName()); + + _mw->leRealname->setText( _kes->getSetting( KEMailSettings::RealName )); + _mw->leEmail->setText( _kes->getSetting( KEMailSettings::EmailAddress )); + _mw->leOrganization->setText( _kes->getSetting( KEMailSettings::Organization )); + _mw->leSMTP->setText( _kes->getSetting( KEMailSettings::OutServer )); + + TQString _userPicsDir = KCFGUserAccount::faceDir() + + TDEGlobal::dirs()->resourceDirs("data").last() + "tdm/faces/"; + + TQString fs = KCFGUserAccount::faceSource(); + if (fs == TQString::fromLatin1("UserOnly")) + _facePerm = userOnly; + else if (fs == TQString::fromLatin1("PreferUser")) + _facePerm = userFirst; + else if (fs == TQString::fromLatin1("PreferAdmin")) + _facePerm = adminFirst; + else + _facePerm = adminOnly; // Admin Only + + if ( _facePerm == adminFirst ) + { // If the administrator's choice takes preference + _facePixmap = TQPixmap( _userPicsDir + _ku->loginName() + ".face.icon" ); + + if ( _facePixmap.isNull() ) + _facePerm = userFirst; + else + _mw->btnChangeFace->setPixmap( _facePixmap ); + } + + if ( _facePerm == userFirst ) + { + // If the user's choice takes preference + _facePixmap = TQPixmap( KCFGUserAccount::faceFile() ); + + // The user has no face, should we check for the admin's setting? + if ( _facePixmap.isNull() ) + _facePixmap = TQPixmap( _userPicsDir + _ku->loginName() + ".face.icon" ); + + if ( _facePixmap.isNull() ) + _facePixmap = TQPixmap( _userPicsDir + KCFGUserAccount::defaultFile() ); + + _mw->btnChangeFace->setPixmap( _facePixmap ); + } + else if ( _facePerm == adminOnly ) + { + // Admin only + _facePixmap = TQPixmap( _userPicsDir + _ku->loginName() + ".face.icon" ); + if ( _facePixmap.isNull() ) + _facePixmap = TQPixmap( _userPicsDir + KCFGUserAccount::defaultFile() ); + _mw->btnChangeFace->setPixmap( _facePixmap ); + } + + TDECModule::load(); /* TDEConfigXT */ + +} + +void KCMUserAccount::save() +{ + TDECModule::save(); /* TDEConfigXT */ + + /* Save KDE's homebrewn settings */ + _kes->setSetting( KEMailSettings::RealName, _mw->leRealname->text() ); + _kes->setSetting( KEMailSettings::EmailAddress, _mw->leEmail->text() ); + _kes->setSetting( KEMailSettings::Organization, _mw->leOrganization->text() ); + _kes->setSetting( KEMailSettings::OutServer, _mw->leSMTP->text() ); + + /* Save realname to /etc/passwd */ + if ( _mw->leRealname->isModified() ) + { + TQCString password; + int ret = KPasswordDialog::getPassword( password, i18n("Please enter " + "your password in order to save your settings:")); + + if ( !ret ) + { + KMessageBox::sorry( this, i18n("You must enter " + "your password in order to change your information.")); + return; + } + + ChfnProcess *proc = new ChfnProcess(); + ret = proc->exec(password, _mw->leRealname->text().ascii() ); + if ( ret ) + { + if ( ret == ChfnProcess::PasswordError ) + KMessageBox::sorry( this, i18n("You must enter a correct password.")); + + else + { + KMessageBox::sorry( this, i18n("An error occurred and your password has " + "probably not been changed. The error " + "message was:\n%1").arg(static_cast(proc->error()))); + kdDebug() << "ChfnProcess->exec() failed. Error code: " << ret + << "\nOutput:" << proc->error() << endl; + } + } + + delete proc; + } + + /* Save the image */ + if( !_facePixmap.save( KCFGUserAccount::faceFile(), "PNG" )) + KMessageBox::error( this, i18n("There was an error saving the image: %1" ).arg( + KCFGUserAccount::faceFile()) ); + +} + +void KCMUserAccount::changeFace(const TQPixmap &pix) +{ + if ( _facePerm != userFirst ) + return; // If the user isn't allowed to change their face, don't! + + if ( pix.isNull() ) { + KMessageBox::sorry( this, i18n("There was an error loading the image.") ); + return; + } + + _facePixmap = pix; + _mw->btnChangeFace->setPixmap( _facePixmap ); + emit changed( true ); +} + +void KCMUserAccount::slotFaceButtonClicked() +{ + if ( _facePerm != userFirst ) + { + KMessageBox::sorry( this, i18n("Your administrator has disallowed changing your image.") ); + return; + } + + ChFaceDlg* pDlg = new ChFaceDlg( TDEGlobal::dirs()->resourceDirs("data").last() + + "/tdm/pics/users/" ); + + if ( pDlg->exec() == TQDialog::Accepted && !pDlg->getFaceImage().isNull() ) + changeFace( pDlg->getFaceImage() ); + + delete pDlg; +} + +/** + * I merged faceButtonDropEvent into this /Frans + * The function was called after checking event type and + * the code is now below that if statement + */ +bool KCMUserAccount::eventFilter(TQObject *, TQEvent *e) +{ + if (e->type() == TQEvent::DragEnter) + { + TQDragEnterEvent *ee = (TQDragEnterEvent *) e; + ee->accept( KURLDrag::canDecode(ee) ); + return true; + } + + if (e->type() == TQEvent::Drop) + { + if ( _facePerm != userFirst ) + { + KMessageBox::sorry( this, i18n("Your administrator has disallowed changing your image.") ); + return true; + } + + KURL *url = decodeImgDrop( (TQDropEvent *) e, this); + if (url) + { + TQString pixPath; + TDEIO::NetAccess::download(*url, pixPath, this); + changeFace( TQPixmap( pixPath ) ); + TDEIO::NetAccess::removeTempFile(pixPath); + delete url; + } + return true; + } + return false; +} + +inline KURL *KCMUserAccount::decodeImgDrop(TQDropEvent *e, TQWidget *wdg) +{ + KURL::List uris; + + if (KURLDrag::decode(e, uris) && (uris.count() > 0)) + { + KURL *url = new KURL(uris.first()); + + KImageIO::registerFormats(); + if( KImageIO::canRead(KImageIO::type(url->fileName())) ) + return url; + + TQStringList qs = TQStringList::split('\n', KImageIO::pattern()); + qs.remove(qs.begin()); + + TQString msg = i18n( "%1 does not appear to be an image file.\n" + "Please use files with these extensions:\n" + "%2").arg(url->fileName()).arg(qs.join("\n")); + KMessageBox::sorry( wdg, msg); + delete url; + } + return 0; +} + +#include "main.moc" + diff --git a/tdepasswd/kcm/main.h b/tdepasswd/kcm/main.h new file mode 100644 index 000000000..350c42820 --- /dev/null +++ b/tdepasswd/kcm/main.h @@ -0,0 +1,79 @@ + +/** + * Copyright (C) 2004 Frans Englich + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + */ + +#ifndef MAIN_H +#define MAIN_H + +#include + +#include "main_widget.h" + +class TDEAboutData; +class KUser; +class KEmailSettings; +class TQEvent; +class TQObject; +class KURL; +class Config; + +/** + * Please see the README + */ +class KCMUserAccount : public TDECModule +{ + Q_OBJECT + +public: + KCMUserAccount(TQWidget* parent, const char* name = "KCMUserAccount", + const TQStringList& list=TQStringList()); + ~KCMUserAccount(); + + /** + * The user data is loaded from chfn(/etc/password) and then + * written back as well as to KDE's own(KEmailSettings). + * The user won't notice this(assuming they change the KDE settings via + * this KCM) and will make KDE play nice with enviroments which uses + * /etc/password. + */ + void load(); + + void save(); + + /** + * For the face button + */ + bool eventFilter(TQObject *, TQEvent *e); + +private slots: + void slotChangePassword(); + //void configChanged() { emit changed(true); }; + void slotFaceButtonClicked(); + +private: + void changeFace(const TQPixmap& pix); + inline KURL* decodeImgDrop(TQDropEvent *e, TQWidget *wdg); + + KEMailSettings *_kes; + KUser *_ku; + MainWidget *_mw; + FacePerm _facePerm; + TQPixmap _facePixmap; + +}; + +#endif // MAIN_H diff --git a/tdepasswd/kcm/main_widget.ui b/tdepasswd/kcm/main_widget.ui new file mode 100644 index 000000000..b1933f592 --- /dev/null +++ b/tdepasswd/kcm/main_widget.ui @@ -0,0 +1,294 @@ + +MainWidget +Frans Englich <frans.englich@telia.com> + + + MainWidget + + + + 0 + 0 + 518 + 561 + + + + KCMUserAccount + + + + unnamed + + + + btnChangeFace + + + + 0 + 0 + 0 + 0 + + + + + 74 + 74 + + + + + 74 + 74 + + + + true + + + + + + + + grpUserInformation + + + User Information + + + + unnamed + + + + lblOrganisation + + + &Organization: + + + leOrganization + + + + + leRealname + + + + + lblRealName + + + &Name: + + + leRealname + + + + + leOrganization + + + + + lblEmail + + + &Email address: + + + leEmail + + + + + leEmail + + + + + textLabel3 + + + &SMTP server: + + + leSMTP + + + + + leSMTP + + + + + lblUIDTell + + + User ID: + + + + + lblUID + + + + + + + + + + spacer3 + + + Vertical + + + Expanding + + + + 20 + 16 + + + + + + layout1 + + + + unnamed + + + + lblUsername + + + + Bitstream Charter + 14 + + + + + + + AlignVCenter + + + + + lblClickButtonInfo + + + <i>(Click the button to change your image)</i> + + + AlignVCenter + + + + + + + btnChangePassword + + + Change Password... + + + + + spacer2 + + + Horizontal + + + Expanding + + + + 111 + 20 + + + + + + kcfg_EchoMode + + + At Password Prompt + + + false + + + false + + + false + + + 0 + + + + unnamed + + + + rdbOneStar + + + Show one star for each letter + + + + + rdbThreeStars + + + Show three stars for each letter + + + + + rdbShowPassword + + + Show nothing + + + + + + + + btnChangeFace + leRealname + leOrganization + leEmail + leSMTP + rdbOneStar + rdbThreeStars + rdbShowPassword + btnChangePassword + + + kdialog.h + + + + diff --git a/tdepasswd/kcm/pass.kcfgc b/tdepasswd/kcm/pass.kcfgc new file mode 100644 index 000000000..21b4bb781 --- /dev/null +++ b/tdepasswd/kcm/pass.kcfgc @@ -0,0 +1,5 @@ +File=kcm_useraccount_pass.kcfg +ClassName=KCFGPassword +Singleton=true +Mutators=true + diff --git a/tdepasswd/kcm/pics/Apple.png b/tdepasswd/kcm/pics/Apple.png new file mode 100644 index 000000000..b383578bb Binary files /dev/null and b/tdepasswd/kcm/pics/Apple.png differ diff --git a/tdepasswd/kcm/pics/BeachBall.png b/tdepasswd/kcm/pics/BeachBall.png new file mode 100644 index 000000000..e8c748332 Binary files /dev/null and b/tdepasswd/kcm/pics/BeachBall.png differ diff --git a/tdepasswd/kcm/pics/Blowfish.png b/tdepasswd/kcm/pics/Blowfish.png new file mode 100644 index 000000000..51cb16013 Binary files /dev/null and b/tdepasswd/kcm/pics/Blowfish.png differ diff --git a/tdepasswd/kcm/pics/Bug.png b/tdepasswd/kcm/pics/Bug.png new file mode 100644 index 000000000..b431cc138 Binary files /dev/null and b/tdepasswd/kcm/pics/Bug.png differ diff --git a/tdepasswd/kcm/pics/Butterfly.png b/tdepasswd/kcm/pics/Butterfly.png new file mode 100644 index 000000000..88012a7ed Binary files /dev/null and b/tdepasswd/kcm/pics/Butterfly.png differ diff --git a/tdepasswd/kcm/pics/CMakeLists.txt b/tdepasswd/kcm/pics/CMakeLists.txt new file mode 100644 index 000000000..1bfe832db --- /dev/null +++ b/tdepasswd/kcm/pics/CMakeLists.txt @@ -0,0 +1,19 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +install( FILES + Apple.png BeachBall.png Blowfish.png Bug.png + Butterfly.png Car.png Cow.png Daemon.png Dog.png + Elephant.png Flower.png Frog.png Ghost.png Guitar.png + Heart.png Konqui.png Lion.png Monkey.png Penguin.png + Pig.png Rabbit.png Ring.png Scream.png Shark.png + Splash.png Star.png Teddybear.png Turtle.png + DESTINATION ${DATA_INSTALL_DIR}/tdm/pics/users ) diff --git a/tdepasswd/kcm/pics/CREDITS b/tdepasswd/kcm/pics/CREDITS new file mode 100644 index 000000000..ccd9126b4 --- /dev/null +++ b/tdepasswd/kcm/pics/CREDITS @@ -0,0 +1,21 @@ +Butterfly.png, Konqui.png: + KDE Graphics Team + +BeachBall.png BlueMarble1.png Flower.png Night.png Star2.png Star3.png +Star4.png Star.png Stars2.png Stars.png: + Braden MacDonald + +Apple.png Cheese.png Ghost.png Pearl.png Skull.png Blowfish.png Cow.png +Guitar.png Penguin.png Smiley.png Bug.png Daemon.png Lion.png Pig.png +Splash.png Burger.png Dog.png Man.png Scream.png Turtle.png Car.png +Elephant.png Monkey.png Shark.png Watch.png Astronaut.png Heart.png +Ring.png Rabbit.png Speakers.png UFO.png : + Hans Karlsson +License: free for commercial and noncommercial usage, distribution and +modification + +Arch.png BeachBall2.png Butterfly2.png Cactus.png Car2.png Clock.png +Dice.png Dog2.png Dragon.png Fish.png Flower2.png Flower3.png Frog.png +Kiwi.png Lava.png Pineapple.png Teddybear.png Tiger.png Tukan.png +Wind.png : + Hermann Thomas diff --git a/tdepasswd/kcm/pics/Car.png b/tdepasswd/kcm/pics/Car.png new file mode 100644 index 000000000..95ec0278f Binary files /dev/null and b/tdepasswd/kcm/pics/Car.png differ diff --git a/tdepasswd/kcm/pics/Cow.png b/tdepasswd/kcm/pics/Cow.png new file mode 100644 index 000000000..2f0ced863 Binary files /dev/null and b/tdepasswd/kcm/pics/Cow.png differ diff --git a/tdepasswd/kcm/pics/Daemon.png b/tdepasswd/kcm/pics/Daemon.png new file mode 100644 index 000000000..4bbc42a55 Binary files /dev/null and b/tdepasswd/kcm/pics/Daemon.png differ diff --git a/tdepasswd/kcm/pics/Dog.png b/tdepasswd/kcm/pics/Dog.png new file mode 100644 index 000000000..78de93340 Binary files /dev/null and b/tdepasswd/kcm/pics/Dog.png differ diff --git a/tdepasswd/kcm/pics/Elephant.png b/tdepasswd/kcm/pics/Elephant.png new file mode 100644 index 000000000..8f4b2d2aa Binary files /dev/null and b/tdepasswd/kcm/pics/Elephant.png differ diff --git a/tdepasswd/kcm/pics/Flower.png b/tdepasswd/kcm/pics/Flower.png new file mode 100644 index 000000000..d414e736c Binary files /dev/null and b/tdepasswd/kcm/pics/Flower.png differ diff --git a/tdepasswd/kcm/pics/Frog.png b/tdepasswd/kcm/pics/Frog.png new file mode 100644 index 000000000..2186975a9 Binary files /dev/null and b/tdepasswd/kcm/pics/Frog.png differ diff --git a/tdepasswd/kcm/pics/Ghost.png b/tdepasswd/kcm/pics/Ghost.png new file mode 100644 index 000000000..bf95150da Binary files /dev/null and b/tdepasswd/kcm/pics/Ghost.png differ diff --git a/tdepasswd/kcm/pics/Guitar.png b/tdepasswd/kcm/pics/Guitar.png new file mode 100644 index 000000000..6a315b0c7 Binary files /dev/null and b/tdepasswd/kcm/pics/Guitar.png differ diff --git a/tdepasswd/kcm/pics/Heart.png b/tdepasswd/kcm/pics/Heart.png new file mode 100644 index 000000000..b41a027e3 Binary files /dev/null and b/tdepasswd/kcm/pics/Heart.png differ diff --git a/tdepasswd/kcm/pics/Konqui.png b/tdepasswd/kcm/pics/Konqui.png new file mode 100644 index 000000000..4db7ae5e3 Binary files /dev/null and b/tdepasswd/kcm/pics/Konqui.png differ diff --git a/tdepasswd/kcm/pics/Lion.png b/tdepasswd/kcm/pics/Lion.png new file mode 100644 index 000000000..373b3f8c8 Binary files /dev/null and b/tdepasswd/kcm/pics/Lion.png differ diff --git a/tdepasswd/kcm/pics/Makefile.am b/tdepasswd/kcm/pics/Makefile.am new file mode 100644 index 000000000..7c2cca099 --- /dev/null +++ b/tdepasswd/kcm/pics/Makefile.am @@ -0,0 +1,10 @@ +picsdir = $(kde_datadir)/tdm/pics/users +pics_DATA = Apple.png BeachBall.png Blowfish.png Bug.png \ + Butterfly.png Car.png Cow.png Daemon.png Dog.png Elephant.png \ + Flower.png Frog.png Ghost.png Guitar.png Heart.png Konqui.png \ + Lion.png Monkey.png Penguin.png Pig.png Rabbit.png \ + Ring.png Scream.png Shark.png Splash.png Star.png Teddybear.png \ + Turtle.png + +EXTRA_DIST = $(pics_DATA) + diff --git a/tdepasswd/kcm/pics/Monkey.png b/tdepasswd/kcm/pics/Monkey.png new file mode 100644 index 000000000..72a241006 Binary files /dev/null and b/tdepasswd/kcm/pics/Monkey.png differ diff --git a/tdepasswd/kcm/pics/Penguin.png b/tdepasswd/kcm/pics/Penguin.png new file mode 100644 index 000000000..33ed3619a Binary files /dev/null and b/tdepasswd/kcm/pics/Penguin.png differ diff --git a/tdepasswd/kcm/pics/Pig.png b/tdepasswd/kcm/pics/Pig.png new file mode 100644 index 000000000..c10a34c7f Binary files /dev/null and b/tdepasswd/kcm/pics/Pig.png differ diff --git a/tdepasswd/kcm/pics/Rabbit.png b/tdepasswd/kcm/pics/Rabbit.png new file mode 100644 index 000000000..a7c5f3f10 Binary files /dev/null and b/tdepasswd/kcm/pics/Rabbit.png differ diff --git a/tdepasswd/kcm/pics/Ring.png b/tdepasswd/kcm/pics/Ring.png new file mode 100644 index 000000000..29daf4c63 Binary files /dev/null and b/tdepasswd/kcm/pics/Ring.png differ diff --git a/tdepasswd/kcm/pics/Scream.png b/tdepasswd/kcm/pics/Scream.png new file mode 100644 index 000000000..46abbd2f8 Binary files /dev/null and b/tdepasswd/kcm/pics/Scream.png differ diff --git a/tdepasswd/kcm/pics/Shark.png b/tdepasswd/kcm/pics/Shark.png new file mode 100644 index 000000000..a11a352cb Binary files /dev/null and b/tdepasswd/kcm/pics/Shark.png differ diff --git a/tdepasswd/kcm/pics/Splash.png b/tdepasswd/kcm/pics/Splash.png new file mode 100644 index 000000000..ec8e68a18 Binary files /dev/null and b/tdepasswd/kcm/pics/Splash.png differ diff --git a/tdepasswd/kcm/pics/Star.png b/tdepasswd/kcm/pics/Star.png new file mode 100644 index 000000000..2b3988860 Binary files /dev/null and b/tdepasswd/kcm/pics/Star.png differ diff --git a/tdepasswd/kcm/pics/Teddybear.png b/tdepasswd/kcm/pics/Teddybear.png new file mode 100644 index 000000000..823adb56d Binary files /dev/null and b/tdepasswd/kcm/pics/Teddybear.png differ diff --git a/tdepasswd/kcm/pics/Turtle.png b/tdepasswd/kcm/pics/Turtle.png new file mode 100644 index 000000000..1eee29591 Binary files /dev/null and b/tdepasswd/kcm/pics/Turtle.png differ diff --git a/tdepasswd/kcm/settings.kcfgc b/tdepasswd/kcm/settings.kcfgc new file mode 100644 index 000000000..772c87a6b --- /dev/null +++ b/tdepasswd/kcm/settings.kcfgc @@ -0,0 +1,5 @@ +File=kcm_useraccount.kcfg +ClassName=KCFGUserAccount +Singleton=true +Mutators=false + diff --git a/tdepasswd/passwd.cpp b/tdepasswd/passwd.cpp new file mode 100644 index 000000000..9d29333fc --- /dev/null +++ b/tdepasswd/passwd.cpp @@ -0,0 +1,284 @@ +/* vi: ts=8 sts=4 sw=4 + * + * $Id$ + * + * This file is part of the KDE project, module tdesu. + * Copyright (C) 1999,2000 Geert Jansen + * + * passwd.cpp: Change a user's password. + */ + +#include // setenv + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include + +#include +#include "passwd.h" + + +PasswdProcess::PasswdProcess(TQCString user) +{ + struct passwd *pw; + + if (user.isEmpty()) + { + pw = getpwuid(getuid()); + if (pw == 0L) + { + kdDebug(1512) << "You don't exist!\n"; + return; + } + m_User = pw->pw_name; + } else + { + pw = getpwnam(user); + if (pw == 0L) + { + kdDebug(1512) << k_lineinfo << "User " << user << "does not exist.\n"; + return; + } + m_User = user; + } + bOtherUser = (pw->pw_uid != getuid()); +} + + +PasswdProcess::~PasswdProcess() +{ +} + + +int PasswdProcess::checkCurrent(const char *oldpass) +{ + return exec(oldpass, 0L, 1); +} + + +int PasswdProcess::exec(const char *oldpass, const char *newpass, + int check) +{ + if (m_User.isEmpty()) + return -1; +// if (check) +// setTerminal(true); + + // Try to set the default locale to make the parsing of the output + // of `passwd' easier. + setenv("LANG","C", true /* override */); + + QCStringList args; + if(bOtherUser) + args += m_User; + int ret = PtyProcess::exec("passwd", args); + if (ret < 0) + { + kdDebug(1512) << k_lineinfo << "Passwd not found!\n"; + return PasswdNotFound; + } + + ret = ConversePasswd(oldpass, newpass, check); + if (ret < 0) + kdDebug(1512) << k_lineinfo << "Conversation with passwd failed. pid = " << pid() << endl; + + if ((waitForChild() != 0) && !check) + return PasswordNotGood; + + return ret; +} + + +/* + * The tricky thing is to make this work with a lot of different passwd + * implementations. We _don't_ want implementation specific routines. + * Return values: -1 = unknown error, 0 = ok, >0 = error code. + */ + +int PasswdProcess::ConversePasswd(const char *oldpass, const char *newpass, + int check) +{ + TQCString line, errline; + int state = 0; + + while (state != 7) + { + line = readLine(); + if (line.isNull()) + { + return -1; + } + + if (state == 0 && isPrompt(line, "new")) + // If root is changing a user's password, + // passwd can't prompt for the original password. + // Therefore, we have to start at state=2. + state=2; + + switch (state) + { + case 0: + // Eat garbage, wait for prompt + m_Error += line+"\n"; + if (isPrompt(line, "password")) + { + WaitSlave(); + write(m_Fd, oldpass, strlen(oldpass)); + write(m_Fd, "\n", 1); + state++; + break; + } + if (m_bTerminal) + fputs(line, stdout); + break; + + case 1: case 3: case 6: + // Wait for \n + if (line.isEmpty()) + { + state++; + break; + } + // error + return -1; + + case 2: + m_Error = ""; + if( line.contains("again")) + { + m_Error = line; + kill(m_Pid, SIGKILL); + waitForChild(); + return PasswordIncorrect; + } + // Wait for second prompt. + errline = line; // use first line for error message + while (!isPrompt(line, "new")) + { + line = readLine(); + if (line.isNull()) + { + // We didn't get the new prompt so assume incorrect password. + if (m_bTerminal) + fputs(errline, stdout); + m_Error = errline; + return PasswordIncorrect; + } + } + + // we have the new prompt + if (check) + { + kill(m_Pid, SIGKILL); + waitForChild(); + return 0; + } + WaitSlave(); + write(m_Fd, newpass, strlen(newpass)); + write(m_Fd, "\n", 1); + state++; + break; + + case 4: + // Wait for third prompt + if (isPrompt(line, "re")) + { + WaitSlave(); + write(m_Fd, newpass, strlen(newpass)); + write(m_Fd, "\n", 1); + state += 2; + break; + } + // Warning or error about the new password + if (m_bTerminal) + fputs(line, stdout); + m_Error = line + "\n"; + state++; + break; + + case 5: + // Wait for either a "Reenter password" or a "Enter password" prompt + if (isPrompt(line, "re")) + { + WaitSlave(); + write(m_Fd, newpass, strlen(newpass)); + write(m_Fd, "\n", 1); + state++; + break; + } + else if (isPrompt(line, "password")) + { + kill(m_Pid, SIGKILL); + waitForChild(); + return PasswordNotGood; + } + if (m_bTerminal) + fputs(line, stdout); + m_Error += line + "\n"; + break; + } + } + + // Are we ok or do we still get an error thrown at us? + m_Error = ""; + state = 0; + while (state != 1) + { + line = readLine(); + if (line.isNull()) + { + // No more input... OK + return 0; + } + if (isPrompt(line, "password")) + { + // Uh oh, another prompt. Not good! + kill(m_Pid, SIGKILL); + waitForChild(); + return PasswordNotGood; + } + m_Error += line + "\n"; // Collect error message + } + + kdDebug(1512) << k_lineinfo << "Conversation ended successfully.\n"; + return 0; +} + + +bool PasswdProcess::isPrompt(TQCString line, const char *word) +{ + unsigned i, j, colon; + unsigned int lineLength(line.length()); + for (i=0,j=0,colon=0; i + */ + +#ifndef __Passwd_h_Included__ +#define __Passwd_h_Included__ + +#include +#include + +/** + * A C++ API to passwd. + */ + +class PasswdProcess + : public PtyProcess +{ +public: + PasswdProcess(TQCString user=0); + ~PasswdProcess(); + + enum Errors { PasswdNotFound=1, PasswordIncorrect, PasswordNotGood }; + + int checkCurrent(const char *oldpass); + int exec(const char *oldpass, const char *newpass, int check=0); + + TQCString error() { return m_Error; } + +private: + bool isPrompt(TQCString line, const char *word=0L); + int ConversePasswd(const char *oldpass, const char *newpass, + int check); + + TQCString m_User, m_Error; + bool bOtherUser; +}; + + +#endif // __Passwd_h_Included__ diff --git a/tdepasswd/passwddlg.cpp b/tdepasswd/passwddlg.cpp new file mode 100644 index 000000000..0406f75b2 --- /dev/null +++ b/tdepasswd/passwddlg.cpp @@ -0,0 +1,169 @@ +/* vi: ts=8 sts=4 sw=4 + * + * $Id$ + * + * This file is part of the KDE project, module tdesu. + * Copyright (C) 2000 Geert Jansen + */ + +#include +#include + +#include "passwd.h" +#include "passwddlg.h" + + +TDEpasswd1Dialog::TDEpasswd1Dialog() + : KPasswordDialog(Password, false, 0) +{ + setCaption(i18n("Change Password")); + setPrompt(i18n("Please enter your current password:")); +} + + +TDEpasswd1Dialog::~TDEpasswd1Dialog() +{ +} + + +bool TDEpasswd1Dialog::checkPassword(const char *password) +{ + PasswdProcess proc(0); + + int ret = proc.checkCurrent(password); + switch (ret) + { + case -1: + { + TQString msg = TQString::fromLocal8Bit(proc.error()); + if (!msg.isEmpty()) + msg = "

\"" + msg + "\""; + msg = "" + i18n("Conversation with 'passwd' failed.") + msg; + KMessageBox::error(this, msg); + done(Rejected); + return false; + } + + case 0: + return true; + + case PasswdProcess::PasswdNotFound: + KMessageBox::error(this, i18n("Could not find the program 'passwd'.")); + done(Rejected); + return false; + + case PasswdProcess::PasswordIncorrect: + KMessageBox::sorry(this, i18n("Incorrect password. Please try again.")); + return false; + + default: + KMessageBox::error(this, i18n("Internal error: illegal return value " + "from PasswdProcess::checkCurrent.")); + done(Rejected); + return false; + } +} + + +// static +int TDEpasswd1Dialog::getPassword(TQCString &password) +{ + TDEpasswd1Dialog *dlg = new TDEpasswd1Dialog(); + int res = dlg->exec(); + if (res == Accepted) + password = dlg->password(); + delete dlg; + return res; +} + + + +TDEpasswd2Dialog::TDEpasswd2Dialog(const char *oldpass, TQCString user) + : KPasswordDialog(NewPassword, false, 0) +{ + m_Pass = oldpass; + m_User = user; + + setCaption(i18n("Change Password")); + if (m_User.isEmpty()) + setPrompt(i18n("Please enter your new password:")); + else + setPrompt(i18n("Please enter the new password for user %1:").arg(static_cast(m_User))); +} + + +TDEpasswd2Dialog::~TDEpasswd2Dialog() +{ +} + + +bool TDEpasswd2Dialog::checkPassword(const char *password) +{ + PasswdProcess proc(m_User); + + if (strlen(password) > 8) + { + switch(KMessageBox::warningYesNoCancel(this, + m_User.isEmpty() ? + i18n("Your password is longer than 8 characters. On some " + "systems, this can cause problems. You can truncate " + "the password to 8 characters, or leave it as it is.") : + i18n("The password is longer than 8 characters. On some " + "systems, this can cause problems. You can truncate " + "the password to 8 characters, or leave it as it is.") + , + i18n("Password Too Long"), + i18n("Truncate"), + i18n("Use as Is"), + "truncatePassword")) + { + case KMessageBox::Yes : + const_cast(password)[8] = '\000'; + break; + case KMessageBox::No : + break; + default : return false; + } + } + + int ret = proc.exec(m_Pass, password); + switch (ret) + { + case 0: + { + hide(); + TQString msg = TQString::fromLocal8Bit(proc.error()); + if (!msg.isEmpty()) + msg = "

\"" + msg + "\""; + msg = "" + i18n("Your password has been changed.") + msg; + KMessageBox::information(0L, msg); + return true; + } + + case PasswdProcess::PasswordNotGood: + { + TQString msg = TQString::fromLocal8Bit(proc.error()); + if (!msg.isEmpty()) + msg = "

\"" + msg + "\""; + msg = "" + i18n("Your password has not been changed.") + msg; + + // The pw change did not succeed. Print the error. + KMessageBox::sorry(this, msg); + return false; + } + + default: + TQString msg = TQString::fromLocal8Bit(proc.error()); + if (!msg.isEmpty()) + msg = "

\"" + msg + "\""; + msg = "" + i18n("Conversation with 'passwd' failed.") + msg; + KMessageBox::sorry(this, msg); + done(Rejected); + return true; + } + + return true; +} + + +#include "passwddlg.moc" diff --git a/tdepasswd/passwddlg.h b/tdepasswd/passwddlg.h new file mode 100644 index 000000000..88d3be2da --- /dev/null +++ b/tdepasswd/passwddlg.h @@ -0,0 +1,49 @@ +/* vi: ts=8 sts=4 sw=4 + * + * $Id$ + * + * This file is part of the KDE project, module tdesu. + * Copyright (C) 2000 Geert Jansen + */ + +#ifndef __PasswdDlg_h_Incluced__ +#define __PasswdDlg_h_Incluced__ + +#include + +class TDEpasswd1Dialog + : public KPasswordDialog +{ + Q_OBJECT + +public: + TDEpasswd1Dialog(); + ~TDEpasswd1Dialog(); + + static int getPassword(TQCString &password); + +protected: + bool checkPassword(const char *password); +}; + + +class TDEpasswd2Dialog + : public KPasswordDialog +{ + Q_OBJECT + +public: + TDEpasswd2Dialog(const char *oldpass, TQCString user); + ~TDEpasswd2Dialog(); + +protected: + bool checkPassword(const char *password); + +private: + const char *m_Pass; + TQCString m_User; +}; + + + +#endif // __PasswdDlg_h_Incluced__ diff --git a/tdepasswd/tdepasswd.cpp b/tdepasswd/tdepasswd.cpp new file mode 100644 index 000000000..7df4aaf47 --- /dev/null +++ b/tdepasswd/tdepasswd.cpp @@ -0,0 +1,79 @@ +/* vi: ts=8 sts=4 sw=4 + * + * $Id$ + * + * This file is part of the KDE project, module tdesu. + * Copyright (C) 2000 Geert Jansen + */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "passwd.h" +#include "passwddlg.h" + +static TDECmdLineOptions options[] = +{ + { "+[user]", I18N_NOOP("Change password of this user"), 0 }, + TDECmdLineLastOption +}; + + +int main(int argc, char **argv) +{ + TDEAboutData aboutData("tdepasswd", I18N_NOOP("TDE passwd"), + VERSION, I18N_NOOP("Changes a UNIX password."), + TDEAboutData::License_Artistic, "Copyright (c) 2000 Geert Jansen"); + aboutData.addAuthor("Geert Jansen", I18N_NOOP("Maintainer"), + "jansen@kde.org", "http://www.stack.nl/~geertj/"); + + TDECmdLineArgs::init(argc, argv, &aboutData); + TDECmdLineArgs::addCmdLineOptions(options); + KUniqueApplication::addCmdLineOptions(); + + + if (!KUniqueApplication::start()) { + kdDebug() << "tdepasswd is already running" << endl; + return 0; + } + + KUniqueApplication app; + + KUser ku; + TQCString user; + bool bRoot = ku.isSuperUser(); + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + + if (args->count()) + user = args->arg(0); + + /* You must be able to run "tdepasswd loginName" */ + if ( !user.isEmpty() && user!=KUser().loginName().utf8() && !bRoot) + { + KMessageBox::sorry(0, i18n("You need to be root to change the password of other users.")); + return 0; + } + + TQCString oldpass; + if (!bRoot) + { + int result = TDEpasswd1Dialog::getPassword(oldpass); + if (result != TDEpasswd1Dialog::Accepted) + return 0; + } + + TDEpasswd2Dialog *dlg = new TDEpasswd2Dialog(oldpass, user); + + + dlg->exec(); + + return 0; +} + diff --git a/tdepasswd/tdepasswd.desktop b/tdepasswd/tdepasswd.desktop new file mode 100644 index 000000000..5f76f8a85 --- /dev/null +++ b/tdepasswd/tdepasswd.desktop @@ -0,0 +1,80 @@ +[Desktop Entry] +Exec=tdepasswd +Icon=password +Type=Application +Categories=Qt;TDE;Settings; +NoDisplay=true +X-DCOP-ServiceType=Unique +Name=Change Password +Name[af]=Verander Wagwoord +Name[ar]=غيير كلمة المرور +Name[be]=Змяніць пароль +Name[bg]=Промяна на парола +Name[bn]=পাসওয়ার্ড পরিবর্তন +Name[br]=Kemmañ an Tremenger +Name[bs]=Promijenite šifru +Name[ca]=Canvia contrasenya +Name[cs]=Změna hesla +Name[csb]=Zmieni parolã +Name[cy]=Newid Cyfrinair +Name[da]=Ændr kodeord +Name[de]=Passwort ändern +Name[el]=Αλλαγή κωδικού πρόσβασης +Name[eo]=Ŝanĝi pasvorton +Name[es]=Cambiar la contraseña +Name[et]=Parooli muutmine +Name[eu]=Aldatu pasahitza +Name[fa]=تغییر اسم رمز +Name[fi]=Vaihda salasanaa +Name[fr]=Modifier le mot de passe +Name[fy]=Wachtwurd wizigje +Name[ga]=Athraigh Focal Faire +Name[gl]=Trocar Contrasinal +Name[he]=שנה ססמאות +Name[hi]=पासवर्ड बदलें +Name[hr]=Promjena lozinke +Name[hu]=Jelszóváltoztatás +Name[is]=Breyta lykilorði +Name[it]=Cambia password +Name[ja]=パスワードを変更 +Name[ka]=პაროლის შეცვლა +Name[kk]=Парольді өзгерту +Name[km]=ផ្លាស់ប្ដូរ​ពាក្យ​សម្ងាត់ +Name[ko]=비밀번호 변경 +Name[lo]=เปลี่ยนรหัสผ่าน +Name[lt]=Pakeiskite slaptažodį +Name[lv]=Mainīt paroli +Name[mk]=Измени лозинка +Name[ms]=Ubah Kata Laluan +Name[mt]=Ibdel Password +Name[nb]=Endre passord +Name[nds]=Passwoort ännern +Name[ne]=पासवर्ड परिवर्तन गर्नुहोस् +Name[nl]=Wachtwoord wijzigen +Name[nn]=Endra passord +Name[pa]=ਗੁਪਤ-ਕੋਡ ਤਬਦੀਲ +Name[pl]=Zmień hasło +Name[pt]=Mudar a Senha +Name[pt_BR]=Modificar Senha +Name[ro]=Schimbare parolă +Name[ru]=Изменить пароль +Name[rw]=Guhindura Ijambobanga +Name[se]=Rievdat beassansáni +Name[sk]=Zmena heslahesla +Name[sl]=Spremeni geslo +Name[sr]=Промени лозинку +Name[sr@Latn]=Promeni lozinku +Name[sv]=Ändra lösenord +Name[ta]=கடவுச்சொல்லை மாற்று +Name[te]=పాస్ వర్డు మార్చండి +Name[tg]=Гузарвожаҳо +Name[th]=เปลี่ยนรหัสผ่าน +Name[tr]=Parola Değiştir +Name[tt]=Sersüz Üzgärtü +Name[uk]=Зміна пароля +Name[uz]=Maxfiy soʻzni oʻzgartirish +Name[uz@cyrillic]=Махфий сўзни ўзгартириш +Name[vi]=Thay đổi Mật khẩu +Name[wa]=Candjî d' sicret +Name[zh_CN]=更改密码 +Name[zh_TW]=改變密碼 diff --git a/tdmlib/kgreeterplugin.h b/tdmlib/kgreeterplugin.h index edf67f141..925828455 100644 --- a/tdmlib/kgreeterplugin.h +++ b/tdmlib/kgreeterplugin.h @@ -106,7 +106,7 @@ public: * - Unlock: tdm unlock dialog (TODO) * - ChangeTok: tdm password change dialog (TODO) * - ExUnlock: kdesktop_lock unlock dialog - * - ExChangeTok: kdepasswd password change dialog (TODO) + * - ExChangeTok: tdepasswd password change dialog (TODO) * * The Ex* contexts exist within a running session; the talker must know * how to obtain the currently logged in user (+ domain/realm, etc.) -- cgit v1.2.3