Initial import of kiosktool

This source tree will most likely not even compile yet--stay tuned for updates!


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kiosktool@1258966 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
commit 281b2113b2

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
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
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

@ -0,0 +1,71 @@
2005-04-25 Waldo Bastian <bastian@kde.org>
* Release of v1.0
* Improved work flow
* Made background graphics optional
* Fix screensaver handling
2004-09-15 Waldo Bastian <bastian@kde.org>
* Release of v0.9
* Fixed lookup of UNIX-groups in kiosktool-kdedirs
* Removed "Lock down system wide Desktop icons", it was not implemented
* Removed duplicate "Disable Menu Editing" entry
2004-08-21 Waldo Bastian <bastian@kde.org>
* Release of v0.8
* Fixed problems setting up buttons in panel
* Added Desktop Sharing
* Added File Associations
* Adjusted workflow
* Support for renaming profiles / profile directories
2004-07-12 Waldo Bastian <bastian@kde.org>
* Release of v0.7
* Fixed problems running kiosktool as root
* Added --check option to kiosktool-kdedirs
2004-07-06 Waldo Bastian <bastian@kde.org>
* Release of v0.6
* Make it possible to upload changes to remote server
* Fixed some problems with first time use
* Better error handling
* Now possible to disable file-browsing outside home-directory
2004-06-09 Waldo Bastian <bastian@kde.org>
* Release of v0.5
* Added some configuration options for kiosktool itself
* Save any pending changes on exit
2004-06-07 Waldo Bastian <bastian@kde.org>
* Fixed reading of settings ("settings don't stick" problem)
* Reduce interference between profile being edited and active
profile of the user that runs kiosktool
2004-05-24 Waldo Bastian <bastian@kde.org>
* Release of v0.4
* Added user management
2004-05-05 Waldo Bastian <bastian@kde.org>
* Release of v0.3
* Fix grave problem of kiosktool terminating
kdeinit/klauncher of the main session. (BR80436)
2004-04-28 Waldo Bastian <bastian@kde.org>
* Release of v0.2
* Profiles are now stored in /etc/kderc
* Components are shown in icon view
* Added more components
2004-04-14 Waldo Bastian <bastian@kde.org>
* Release of v0.1

@ -0,0 +1,8 @@
AUTOMAKE_OPTIONS = foreign 1.5
include admin/deps.am
include admin/Doxyfile.am
$(top_srcdir)/acinclude.m4:
SUBDIRS=$(TOPSUBDIRS)

@ -0,0 +1,7 @@
AUTOMAKE_OPTIONS = foreign 1.5
include admin/deps.am
include admin/Doxyfile.am
$(top_srcdir)/acinclude.m4: $(top_srcdir)/*/*.m4

@ -0,0 +1,13 @@
KIOSK Admin Tool is a graphical tool for system administrators to manage on
a system wide level KDE usage restrictions (KIOSK features) and default
settings.
Please report bugs via http://bugs.kde.org under "kiosktool" component.
For question you can use the kde-kiosk@kde.org mailinglist.
See https://mail.kde.org/mailman/listinfo/kde-kiosk for subscription info.
Enjoy,
Waldo Bastian
bastian@kde.org

19
TODO

@ -0,0 +1,19 @@
Kiosktool:
* Make it possible to select targeted KDE version
(e.g. in order to use KDE 3.4 only features)
* Add editor for URL (file) restrictions
* Finish docu
* Add section for kcontroledit (KDE 3.3 and later)
* Add autostart editor
* Make it possible to inherit profiles by using <MergeFile type="parent">
instead of copying the profile.
* Change to kcontrol-style header graphics.
kmenuedit:
* Add config option that starts kicker->configure panel->menus
* Use <MergeFile type="parent"> in applications.menu instead of applications-kmenuedit.menu
General:
* Sidebar configuration isn't kiosk friendly
* No way to specify global bookmarks
* Add commandline tool to manipulate settings & lockdown attributes in profiles

@ -0,0 +1 @@
kiosktool version 1.0

File diff suppressed because it is too large Load Diff

12251
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

@ -0,0 +1,270 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Define if you have the CoreAudio API */
#undef HAVE_COREAUDIO
/* Define to 1 if you have the <crt_externs.h> header file. */
#undef HAVE_CRT_EXTERNS_H
/* Defines if your system has the crypt function */
#undef HAVE_CRYPT
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define if you have libjpeg */
#undef HAVE_LIBJPEG
/* Define if you have libpng */
#undef HAVE_LIBPNG
/* Define if you have a working libpthread (will enable threaded code) */
#undef HAVE_LIBPTHREAD
/* Define if you have libz */
#undef HAVE_LIBZ
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define if your system needs _NSGetEnviron to set up the environment */
#undef HAVE_NSGETENVIRON
/* Define if you have res_init */
#undef HAVE_RES_INIT
/* Define if you have the res_init prototype */
#undef HAVE_RES_INIT_PROTO
/* Define if you have setenv */
#undef HAVE_SETENV
/* Define if you have the setenv prototype */
#undef HAVE_SETENV_PROTO
/* Define if you have a STL implementation by SGI */
#undef HAVE_SGI_STL
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have strlcat */
#undef HAVE_STRLCAT
/* Define if you have the strlcat prototype */
#undef HAVE_STRLCAT_PROTO
/* Define if you have strlcpy */
#undef HAVE_STRLCPY
/* Define if you have the strlcpy prototype */
#undef HAVE_STRLCPY_PROTO
/* Define to 1 if you have the <sys/bitypes.h> header file. */
#undef HAVE_SYS_BITYPES_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have unsetenv */
#undef HAVE_UNSETENV
/* Define if you have the unsetenv prototype */
#undef HAVE_UNSETENV_PROTO
/* Define to 1 if you have the `vsnprintf' function. */
#undef HAVE_VSNPRINTF
/* Suffix for lib directories */
#undef KDELIBSUFF
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* The size of `char *', as computed by sizeof. */
#undef SIZEOF_CHAR_P
/* The size of `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* The size of `short', as computed by sizeof. */
#undef SIZEOF_SHORT
/* The size of `size_t', as computed by sizeof. */
#undef SIZEOF_SIZE_T
/* The size of `unsigned long', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_LONG
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
/* Defined if compiling without arts */
#undef WITHOUT_ARTS
/*
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
* headers and I'm too lazy to write a configure test as long as only
* unixware is related
*/
#ifdef _UNIXWARE
#define HAVE_BOOLEAN
#endif
/*
* AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
* that defines bzero.
*/
#if defined(_AIX)
#include <strings.h>
#endif
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
# include <sys/time.h>
# include <crt_externs.h>
# define environ (*_NSGetEnviron())
#endif
#if !defined(HAVE_RES_INIT_PROTO)
#ifdef __cplusplus
extern "C" {
#endif
int res_init(void);
#ifdef __cplusplus
}
#endif
#endif
#if !defined(HAVE_SETENV_PROTO)
#ifdef __cplusplus
extern "C" {
#endif
int setenv (const char *, const char *, int);
#ifdef __cplusplus
}
#endif
#endif
#if !defined(HAVE_STRLCAT_PROTO)
#ifdef __cplusplus
extern "C" {
#endif
unsigned long strlcat(char*, const char*, unsigned long);
#ifdef __cplusplus
}
#endif
#endif
#if !defined(HAVE_STRLCPY_PROTO)
#ifdef __cplusplus
extern "C" {
#endif
unsigned long strlcpy(char*, const char*, unsigned long);
#ifdef __cplusplus
}
#endif
#endif
#if !defined(HAVE_UNSETENV_PROTO)
#ifdef __cplusplus
extern "C" {
#endif
void unsetenv (const char *);
#ifdef __cplusplus
}
#endif
#endif
/*
* On HP-UX, the declaration of vsnprintf() is needed every time !
*/
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
#if __STDC__
#include <stdarg.h>
#include <stdlib.h>
#else
#include <varargs.h>
#endif
#ifdef __cplusplus
extern "C"
#endif
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
#ifdef __cplusplus
extern "C"
#endif
int snprintf(char *str, size_t n, char const *fmt, ...);
#endif
#if defined(__SVR4) && !defined(__svr4__)
#define __svr4__ 1
#endif
/* type to use in place of socklen_t if not defined */
#undef kde_socklen_t
/* type to use in place of socklen_t if not defined (deprecated, use
kde_socklen_t) */
#undef ksize_t

@ -0,0 +1,3 @@
./admin/configure.in.min
configure.in.in
./kiosktool/configure.in.in

@ -0,0 +1,149 @@
dnl =======================================================
dnl FILE: ./admin/configure.in.min
dnl =======================================================
dnl This file is part of the KDE libraries/packages
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
dnl This file is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Library General Public
dnl License as published by the Free Software Foundation; either
dnl version 2 of the License, or (at your option) any later version.
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Library General Public License for more details.
dnl You should have received a copy of the GNU Library General Public License
dnl along with this library; see the file COPYING.LIB. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
# Original Author was Kalle@kde.org
# I lifted it in some mater. (Stephan Kulow)
# I used much code from Janos Farkas
dnl Process this file with autoconf to produce a configure script.
AC_INIT(acinclude.m4) dnl a source file from your sub dir
dnl This is so we can use kde-common
AC_CONFIG_AUX_DIR(admin)
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
unset CDPATH
dnl Checking host/target/build systems, for make, install etc.
AC_CANONICAL_SYSTEM
dnl Perform program name transformation
AC_ARG_PROGRAM
dnl Automake doc recommends to do this only here. (Janos)
AM_INIT_AUTOMAKE(kiosktool-1.0, "3.3.0") dnl searches for some needed programs
KDE_SET_PREFIX
dnl generate the config header
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
dnl Checks for programs.
AC_CHECK_COMPILERS
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
KDE_PROG_LIBTOOL
dnl for NLS support. Call them in this order!
dnl WITH_NLS is for the po files
AM_KDE_WITH_NLS
KDE_USE_QT(3.2)
AC_PATH_KDE
dnl =======================================================
dnl FILE: configure.in.in
dnl =======================================================
#MIN_CONFIG(3.2)
KDE_INIT_DOXYGEN([The API Reference], [Version $VERSION])
dnl =======================================================
dnl FILE: ./kiosktool/configure.in.in
dnl =======================================================
AC_CHECK_SETENV
AC_CHECK_UNSETENV
KDE_CREATE_SUBDIRSLIST
AM_CONDITIONAL(doc_SUBDIR_included, test "x$doc_SUBDIR_included" = xyes)
AM_CONDITIONAL(kiosktool_SUBDIR_included, test "x$kiosktool_SUBDIR_included" = xyes)
AM_CONDITIONAL(po_SUBDIR_included, test "x$po_SUBDIR_included" = xyes)
AC_CONFIG_FILES([ Makefile ])
AC_CONFIG_FILES([ doc/Makefile ])
AC_CONFIG_FILES([ doc/da/Makefile ])
AC_CONFIG_FILES([ doc/it/Makefile ])
AC_CONFIG_FILES([ doc/kiosktool/Makefile ])
AC_CONFIG_FILES([ doc/nl/Makefile ])
AC_CONFIG_FILES([ doc/pt/Makefile ])
AC_CONFIG_FILES([ doc/sv/Makefile ])
AC_CONFIG_FILES([ kiosktool/Makefile ])
AC_CONFIG_FILES([ kiosktool/kcms/Makefile ])
AC_CONFIG_FILES([ kiosktool/kcms/autostart/Makefile ])
AC_CONFIG_FILES([ po/Makefile ])
AC_CONFIG_FILES([ po/bg/Makefile ])
AC_CONFIG_FILES([ po/br/Makefile ])
AC_CONFIG_FILES([ po/ca/Makefile ])
AC_CONFIG_FILES([ po/cs/Makefile ])
AC_CONFIG_FILES([ po/cy/Makefile ])
AC_CONFIG_FILES([ po/da/Makefile ])
AC_CONFIG_FILES([ po/de/Makefile ])
AC_CONFIG_FILES([ po/en_GB/Makefile ])
AC_CONFIG_FILES([ po/es/Makefile ])
AC_CONFIG_FILES([ po/et/Makefile ])
AC_CONFIG_FILES([ po/fr/Makefile ])
AC_CONFIG_FILES([ po/ga/Makefile ])
AC_CONFIG_FILES([ po/is/Makefile ])
AC_CONFIG_FILES([ po/it/Makefile ])
AC_CONFIG_FILES([ po/lt/Makefile ])
AC_CONFIG_FILES([ po/mt/Makefile ])
AC_CONFIG_FILES([ po/nl/Makefile ])
AC_CONFIG_FILES([ po/pt/Makefile ])
AC_CONFIG_FILES([ po/pt_BR/Makefile ])
AC_CONFIG_FILES([ po/ro/Makefile ])
AC_CONFIG_FILES([ po/ru/Makefile ])
AC_CONFIG_FILES([ po/sr/Makefile ])
AC_CONFIG_FILES([ po/sr@Latn/Makefile ])
AC_CONFIG_FILES([ po/sv/Makefile ])
AC_CONFIG_FILES([ po/ta/Makefile ])
AC_CONFIG_FILES([ po/tr/Makefile ])
AC_CONFIG_FILES([ po/xx/Makefile ])
AC_OUTPUT
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
# And if so, warn when they don't match
if test "$kde_libs_prefix" != "$given_prefix"; then
# And if kde doesn't know about the prefix yet
echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
if test $? -ne 0; then
echo ""
echo "Warning: you chose to install this package in $given_prefix,"
echo "but KDE was found in $kde_libs_prefix."
echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
echo "Then restart KDE."
echo ""
fi
fi
fi
if test "$all_tests" = "bad"; then
if test ! "$cache_file" = "/dev/null"; then
echo ""
echo "Please remove the file $cache_file after changing your setup"
echo "so that configure will find the changes next time."
echo ""
fi
else
echo ""
echo "Good - your configure finished. Start make now"
echo ""
fi

@ -0,0 +1,4 @@
#MIN_CONFIG(3.2)
KDE_INIT_DOXYGEN([The API Reference], [Version $VERSION])

@ -0,0 +1,3 @@
KDE_LANG = en
KDE_DOCS = AUTO
SUBDIRS = $(AUTODIRS)

@ -0,0 +1,6 @@
<chapter id="extra-steps">
<title
>Brug af profiler med ældre KDE-versioner</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,120 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY kiosktool "<application
>KIOSK Admin Tool</application
>">
<!ENTITY kappname "&kiosktool;">
<!ENTITY TODO "Yet to be written.">
<!ENTITY etc_kderc "/etc/kderc">
<!ENTITY kiosktool-introduction SYSTEM "introduction.docbook">
<!ENTITY kiosktool-profiles SYSTEM "profiles.docbook">
<!ENTITY kiosktool-profile-create SYSTEM "profile-create.docbook">
<!ENTITY kiosktool-profile-setup SYSTEM "profile-setup.docbook">
<!ENTITY kiosktool-profile-assign SYSTEM "profile-assign.docbook">
<!ENTITY kiosktool-extra-steps SYSTEM "extra-steps.docbook">
<!ENTITY kiosktool-settings SYSTEM "settings.docbook">
<!ENTITY % Danish "INCLUDE"
> <!-- change language only here -->
<!ENTITY % addindex "IGNORE">
]>
<book lang="&language;"
>
<bookinfo>
<title
>&kiosktool;'s brugermanual</title>
<authorgroup>
<author
><firstname
>Waldo</firstname
> <surname
>Bastian</surname
> <affiliation
> <address
><email
>bastian@kde.org</email
></address>
</affiliation>
</author>
&erik.kjaer.pedersen.role;
</authorgroup>
<copyright>
<year
>2004</year>
<holder
>bastian@kde.org</holder>
</copyright>
<legalnotice
>&FDLNotice;</legalnotice>
<date
>2004-11-12</date>
<releaseinfo
>1.0</releaseinfo>
<abstract>
<para
><ulink url="http://extragear.kde.org/apps/kiosktool.php"
>&kiosktool;</ulink
> er et administrationsværktøj for &kde; som tilbyder en nem måde for systemadministratorer at oprette fordefinerede desktopindstillinger for grupper af brugere, låse indstillinger eller på anden måde begrænse funktionerne af &kde;'s desktopmiljø.</para>
</abstract>
<keywordset>
<keyword
>KDE</keyword>
<keyword
>KIOSK</keyword>
<keyword
>kiosktool</keyword>
<keyword
>administration</keyword>
<keyword
>lås ned</keyword>
<keyword
>politik</keyword>
<keyword
>politikker</keyword>
<keyword
>profil</keyword>
</keywordset>
</bookinfo>
&kiosktool-introduction;
&kiosktool-profiles;
&kiosktool-profile-create;
&kiosktool-profile-assign;
&kiosktool-profile-setup;
&kiosktool-extra-steps;
&kiosktool-settings;
<chapter id="credits">
<title
>Medvirkende og licens</title>
<para
>&kiosktool; </para>
<para
>Program ophavsret 2004 Waldo Bastian <email
>bastian@kde.org</email
> </para>
<para
>Dokumentation ophavsret 2004 Waldo Bastian <email
>bastian@kde.org</email
> </para>
&erik.kjaer.pedersen.credit;
&underFDL; </chapter>
&documentation.index;
</book>
<!--
vim:tabstop=2:shiftwidth=2:expandtab
-->

@ -0,0 +1,27 @@
<chapter id="introduction">
<title
>Overblik</title>
<para
>&kiosktool; er et administrationsværktøj for &kde; som tilbyder en nem måde for systemadministratorer at oprette fordefinerede desktopindstillinger for grupper af brugere, låse indstillinger eller på anden måde begrænse funktionerne af &kde;'s desktopmiljø.</para>
<para
>&kiosktool; drage fordel af KDE's skelet for begrænsning, KIOSK. Det er baseret på <link linkend="profiles"
>profiler</link
>. En profil er en samling standardindstillinger og begrænsninger som enten kan bruges for individuelle brugere eller grupper af brugere.</para>
<para
>Typisk brug af &kiosktool; er at <link linkend="profile-create"
>oprette en ny profil</link
>, derefter <link linkend="profile-setup"
>indstille profilen</link
> med ønskede standardindstillinger og begrænsninger, og til sidst aktivere den ved at <link linkend="profile-assign"
>tilknytte profilen</link
> til en eller flere brugere. </para>
<para
>Når &kiosktool; bruges sammen med ældre versioner af &kde; (KDE 3.2 eller ældre) kræves et antal <link linkend="extra-steps"
>yderligere skridt</link
> for at aktivere profiler rigtigt. </para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="profile-assign">
<title
>Tilknyt profiler</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="profile-create">
<title
>Opret en ny profil</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="profile-setup">
<title
>Indstil en profil</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,29 @@
<chapter id="profiles">
<title
>Profiler</title>
<para
>En profil er en samling standardindstillinger og begrænsninger som enten kan bruges for individuelle brugere eller grupper af brugere.</para>
<para
>KDE desktoppen så vel som alle KDE-programmer bruger en specifik <ulink url="http://www.kde.org/areas/sysadmin/fsh.php#dir_structure"
>mappestruktur</ulink
> til at slå konfigurationsindstillinger og diverse anden information op. KDE kender til flere <ulink url="http://www.kde.org/areas/sysadmin/fsh.php#dir_location"
>steder</ulink
> for mappestrukturerne. Al information og <ulink url="http://www.kde.org/areas/sysadmin/config_file.php"
>konfigurationsindstillinger</ulink
> som findes på de forskellige steder <ulink url="http://www.kde.org/areas/sysadmin/config_file.php#cascading"
>kombineres</ulink
> inden de bruges. Funktionen <ulink url="http://www.kde.org/areas/sysadmin/config_file.php#lock_down"
>låsning</ulink
> kontrollerer om indstillinger i brugerens hjemmemappe ($KDEHOME eller ~/.kde) tages i betragtning eller ej. </para>
<para
>En profil består af en almindelig KDE-mappestruktur på sit eget sted med indstillinger og information som vælges af dig. </para>
<para
>&kiosktool; lader dig vælge på hvilket sted en profil skal opbevares. Information om tilgængelige profiler opbevares i filen &etc_kderc;. </para>
<para
>Det anbefales at alle profiler opbevares under en enkelt mappe. I dette tilfælde behøver filen &etc_kderc; kun at indeholde en reference til denne ene mappe, så henter KDE og &kiosktool; automatisk alle profiler som opbevares under mappen. Se kapitlet <xref linkend="settings"/> for mere information. </para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="settings">
<title
>Opsætning af &kiosktool;</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="extra-steps">
<title
>Usare i profili con versioni precedenti di KDE</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,138 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY kiosktool "<application
>KIOSK Admin Tool</application
>">
<!ENTITY kappname "&kiosktool;">
<!ENTITY TODO "Yet to be written.">
<!ENTITY etc_kderc "/etc/kderc">
<!ENTITY kiosktool-introduction SYSTEM "introduction.docbook">
<!ENTITY kiosktool-profiles SYSTEM "profiles.docbook">
<!ENTITY kiosktool-profile-create SYSTEM "profile-create.docbook">
<!ENTITY kiosktool-profile-setup SYSTEM "profile-setup.docbook">
<!ENTITY kiosktool-profile-assign SYSTEM "profile-assign.docbook">
<!ENTITY kiosktool-extra-steps SYSTEM "extra-steps.docbook">
<!ENTITY kiosktool-settings SYSTEM "settings.docbook">
<!ENTITY % Italian "INCLUDE"
> <!-- change language only here -->
<!ENTITY % addindex "IGNORE">
]>
<book lang="&language;"
>
<bookinfo>
<title
>Manuale di &kiosktool;</title>
<authorgroup>
<author
><firstname
>Waldo</firstname
> <surname
>Bastian</surname
> <affiliation
> <address
><email
>bastian@kde.org</email
></address>
</affiliation>
</author>
<othercredit role="translator"
><firstname
>Federico</firstname
><surname
>Zenith</surname
><affiliation
><address
><email
>zenith@chemeng.ntnu.no</email
></address
></affiliation
><contrib
>Traduzione della documentazione</contrib
></othercredit
>
</authorgroup>
<copyright>
<year
>2004</year>
<holder
>bastian@kde.org</holder>
</copyright>
<legalnotice
>&FDLNotice;</legalnotice>
<date
>2004-11-12</date>
<releaseinfo
>1.0</releaseinfo>
<abstract>
<para
><ulink url="http://extragear.kde.org/apps/kiosktool.php"
>&kiosktool;</ulink
> è uno strumento di amministrazione di &kde; che offre agli amministratori di sistema un modo semplice di predefinire configurazioni desktop per gruppi di utenti, bloccare impostazioni o altrimenti restringere l'accesso a funzionalità dell'ambiente desktop &kde;.</para>
</abstract>
<keywordset>
<keyword
>KDE</keyword>
<keyword
>KIOSK</keyword>
<keyword
>kiosktool</keyword>
<keyword
>amministrazione</keyword>
<keyword
>blocco</keyword>
<keyword
>linea guida</keyword>
<keyword
>linee guida</keyword>
<keyword
>profilo</keyword>
</keywordset>
</bookinfo>
&kiosktool-introduction;
&kiosktool-profiles;
&kiosktool-profile-create;
&kiosktool-profile-assign;
&kiosktool-profile-setup;
&kiosktool-extra-steps;
&kiosktool-settings;
<chapter id="credits">
<title
>Riconoscimenti e licenza</title>
<para
>&kiosktool; </para>
<para
>Copyright del programma 2004 di Waldo Bastian <email
>bastian@kde.org</email
> </para>
<para
>Copyright della documentazione 2004 di Waldo Bastian <email
>bastian@kde.org</email
> </para>
<para
>Federico Zenith<email
>zenith@chemeng.ntnu.no</email
></para
>
&underFDL; </chapter>
&documentation.index;
</book>
<!--
vim:tabstop=2:shiftwidth=2:expandtab
-->

@ -0,0 +1,27 @@
<chapter id="introduction">
<title
>Panoramica</title>
<para
>&kiosktool; è uno strumento di amministrazione di &kde; che offre agli amministratori di sistema un modo facile di predefinire configurazioni desktop per gruppi di utenti, bloccare impostazioni o altrimenti restringere l'accesso a funzionalità dell'ambiente desktop &kde;.</para>
<para
>&kiosktool; sfrutta l'infrastruttura KIOSK di KDE. È incentrata sui <link linkend="profiles"
>profili</link
>. Un profilo è una raccolta di impostazioni e restrizioni predefinite che possono essere applicate a utenti individuali o gruppi di utenti.</para>
<para
>L'uso tipico di &kiosktool; è per <link linkend="profile-create"
>creare un nuovo profilo</link
>, quindi per <link linkend="profile-setup"
>impostare il profilo</link
> con le impostazioni e restrizioni predefinite desiderate, e infine attivare il profilo <link linkend="profile-assign"
>assegnandolo</link
> a uno o più utenti. </para>
<para
>Usando &kiosktool; insieme a versioni precedenti di &kde; (KDE 3.2 e precedenti) sono necessari alcune <link linkend="extra-steps"
>misure aggiuntive</link
> per attivare correttamente i profili. </para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="profile-assign">
<title
>Assegnare i profili</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="profile-create">
<title
>Creare un nuovo profilo</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="profile-setup">
<title
>Impostare un profilo</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,29 @@
<chapter id="profiles">
<title
>Profili</title>
<para
>Un profilo è una raccolta di impostazioni e restrizioni predefinite che possono essere applicate a utenti individuali o gruppi di utenti.</para>
<para
>L'ambiente desktop KDE, come tutte le applicazioni di KDE, usa una <ulink url="http://www.kde.org/areas/sysadmin/fsh.php#dir_structure"
>struttura delle cartelle</ulink
> specifica per ritrovare le impostazioni della configurazione e varie altre informazioni. KDE sa di varie <ulink url="http://www.kde.org/areas/sysadmin/fsh.php#dir_location"
>posizioni</ulink
> di queste strutture delle cartelle. Tutte le informazioni e le <ulink url="http://www.kde.org/areas/sysadmin/config_file.php"
>impostazioni di configurazione</ulink
> trovate nelle varie posizioni sono <ulink url="http://www.kde.org/areas/sysadmin/config_file.php#cascading"
>combinate</ulink
> prima di essere usate. Le funzionalità di <ulink url="http://www.kde.org/areas/sysadmin/config_file.php#lock_down"
>blocco</ulink
> regolano se le impostazioni nella cartella dell'utente ($KDEHOME o ~/.kde) sono tenute in conto o meno. </para>
<para
>Un profilo consiste di una struttura delle cartelle standard di KDE in una posizione personalizzata con impostazioni e informazioni che scegli tu. </para>
<para
>&kiosktool; ti permette di scegliere in quale posizione dovrebbe essere salvato un profilo. Le informazioni sui profili disponibili sono salvate nel file &etc_kderc;. </para>
<para
>Si raccomanda di salvare tutti i profili in una sola cartella. In questo caso il file &etc_kderc; deve contenere solo un riferimento a quest'unica cartella, e KDE e &kiosktool; raccoglieranno automaticamente tutti i profili salvati in questa cartella. Vedi il capitolo <xref linkend="settings"/> per maggiori informazioni. </para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="settings">
<title
>Impostazioni di &kiosktool;</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,2 @@
KDE_LANG = en
KDE_DOCS = kiosktool

@ -0,0 +1,4 @@
<chapter id="extra-steps">
<title>Using Profiles with Older KDE Versions</title>
<para>&TODO;</para>
</chapter>

@ -0,0 +1,98 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY kiosktool "<application>KIOSK Admin Tool</application>">
<!ENTITY kappname "&kiosktool;">
<!ENTITY TODO "Yet to be written.">
<!ENTITY etc_kderc "/etc/kderc">
<!ENTITY kiosktool-introduction SYSTEM "introduction.docbook">
<!ENTITY kiosktool-profiles SYSTEM "profiles.docbook">
<!ENTITY kiosktool-profile-create SYSTEM "profile-create.docbook">
<!ENTITY kiosktool-profile-setup SYSTEM "profile-setup.docbook">
<!ENTITY kiosktool-profile-assign SYSTEM "profile-assign.docbook">
<!ENTITY kiosktool-extra-steps SYSTEM "extra-steps.docbook">
<!ENTITY kiosktool-settings SYSTEM "settings.docbook">
<!ENTITY % English "INCLUDE" > <!-- change language only here -->
<!ENTITY % addindex "IGNORE">
]>
<book lang="&language;">
<bookinfo>
<title>&kiosktool; user manual</title>
<authorgroup>
<author>
<firstname>Waldo</firstname>
<surname>Bastian</surname>
<affiliation>
<address><email>bastian@kde.org</email></address>
</affiliation>
</author>
<!-- TRANS:ROLES_OF_TRANSLATORS -->
</authorgroup>
<copyright>
<year>2004</year>
<holder>bastian@kde.org</holder>
</copyright>
<legalnotice>&FDLNotice;</legalnotice>
<date>2004-11-12</date>
<releaseinfo>1.0</releaseinfo>
<abstract>
<para><ulink url="http://extragear.kde.org/apps/kiosktool.php">&kiosktool;</ulink>
is a &kde; administration tool that offers system administrators an easy way to
predefine desktop configurations for groups of users, lock down settings or otherwise
restrict features of the &kde; desktop environment.</para>
</abstract>
<keywordset>
<keyword>KDE</keyword>
<keyword>KIOSK</keyword>
<keyword>kiosktool</keyword>
<keyword>administration</keyword>
<keyword>lock down</keyword>
<keyword>policy</keyword>
<keyword>policies</keyword>
<keyword>profile</keyword>
</keywordset>
</bookinfo>
&kiosktool-introduction;
&kiosktool-profiles;
&kiosktool-profile-create;
&kiosktool-profile-assign;
&kiosktool-profile-setup;
&kiosktool-extra-steps;
&kiosktool-settings;
<chapter id="credits">
<title>Credits and License</title>
<para>
&kiosktool;
</para>
<para>
Program copyright 2004 Waldo Bastian <email>bastian@kde.org</email>
</para>
<para>
Documentation copyright 2004 Waldo Bastian <email>bastian@kde.org</email>
</para>
<!-- TRANS:CREDIT_FOR_TRANSLATORS -->
&underFDL; <!-- FDL: do not remove -->
</chapter>
&documentation.index;
</book>
<!--
vim:tabstop=2:shiftwidth=2:expandtab
-->

@ -0,0 +1,25 @@
<chapter id="introduction">
<title>Overview</title>
<para>&kiosktool; is a &kde; administration tool that offers system administrators an easy way to
predefine desktop configurations for groups of users, lock down settings or otherwise
restrict features of the &kde; desktop environment.</para>
<para>&kiosktool; takes advantage of KDE's KIOSK restrictions framework. It is centered around
<link linkend="profiles">profiles</link>. A profile is a collection of default settings and
restrictions that can be applied to either individual users or groups of users.</para>
<para>Typical usage of &kiosktool; is to
<link linkend="profile-create">create a new profile</link>,
then to <link linkend="profile-setup">set up the profile</link> with the desired
default settings and restrictions, and finally to activate the profile by
<link linkend="profile-assign">assigning the profile</link> to one or more users.
</para>
<para>
When using &kiosktool; in combination with older versions of &kde; (KDE 3.2 or older)
some <link linkend="extra-steps">additional steps</link> need to be taken in order
to properly activate the profiles.
</para>
</chapter>

@ -0,0 +1,4 @@
<chapter id="profile-assign">
<title>Assigning Profiles</title>
<para>&TODO;</para>
</chapter>

@ -0,0 +1,4 @@
<chapter id="profile-create">
<title>Creating a New Profile</title>
<para>&TODO;</para>
</chapter>

@ -0,0 +1,4 @@
<chapter id="profile-setup">
<title>Setting up a Profile</title>
<para>&TODO;</para>
</chapter>

@ -0,0 +1,39 @@
<chapter id="profiles">
<title>Profiles</title>
<para>A profile is a collection of default settings and restrictions
that can be applied to either individual users or groups of users.</para>
<para>The KDE desktop environment as well as all KDE applications use
a specific
<ulink url="http://www.kde.org/areas/sysadmin/fsh.php#dir_structure">directory structure</ulink>
to lookup configuration settings and various other information.
KDE knows about several
<ulink url="http://www.kde.org/areas/sysadmin/fsh.php#dir_location">locations</ulink>
for these directory structures.
All the information and
<ulink url="http://www.kde.org/areas/sysadmin/config_file.php">configuration settings</ulink>
found in the various locations are
<ulink url="http://www.kde.org/areas/sysadmin/config_file.php#cascading">combined</ulink>
before they are used.
<ulink url="http://www.kde.org/areas/sysadmin/config_file.php#lock_down">Lock down</ulink>
features control whether settings in the user's home folder ($KDEHOME or ~/.kde)
are taken into account or not.
</para>
<para>
A profile consists of a standard KDE directory structure in a custom location with
settings and information chosen by you.
</para>
<para>&kiosktool; lets you chose in which location
a profile should be stored. Information about available profiles is stored in
the file &etc_kderc;.
</para>
<para>It is recommended to store all profiles under a single
directory. In this case the &etc_kderc; file only needs to contain a reference to this
single directory and KDE and &kiosktool; will automatically pick up all profiles stored
under this directory. See the <xref linkend="settings" /> chapter for more information.
</para>
</chapter>

@ -0,0 +1,4 @@
<chapter id="settings">
<title>&kiosktool; Settings</title>
<para>&TODO;</para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="extra-steps">
<title
>Profielen gebruiken met oudere versies van KDE</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,120 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY kiosktool "<application
>KIOSK Admin Tool</application
>">
<!ENTITY kappname "&kiosktool;">
<!ENTITY TODO "Yet to be written.">
<!ENTITY etc_kderc "/etc/kderc">
<!ENTITY kiosktool-introduction SYSTEM "introduction.docbook">
<!ENTITY kiosktool-profiles SYSTEM "profiles.docbook">
<!ENTITY kiosktool-profile-create SYSTEM "profile-create.docbook">
<!ENTITY kiosktool-profile-setup SYSTEM "profile-setup.docbook">
<!ENTITY kiosktool-profile-assign SYSTEM "profile-assign.docbook">
<!ENTITY kiosktool-extra-steps SYSTEM "extra-steps.docbook">
<!ENTITY kiosktool-settings SYSTEM "settings.docbook">
<!ENTITY % Dutch "INCLUDE"
> <!-- change language only here -->
<!ENTITY % addindex "IGNORE">
]>
<book lang="&language;"
>
<bookinfo>
<title
>Het handboek van &kiosktool;</title>
<authorgroup>
<author
><firstname
>Waldo</firstname
> <surname
>Bastian</surname
> <affiliation
> <address
><email
>bastian@kde.org</email
></address>
</affiliation>
</author>
&Rinse.Devries;
</authorgroup>
<copyright>
<year
>2004</year>
<holder
>bastian@kde.org</holder>
</copyright>
<legalnotice
>&FDLNotice;</legalnotice>
<date
>2004-11-12</date>
<releaseinfo
>1.0</releaseinfo>
<abstract>
<para
><ulink url="http://extragear.kde.org/apps/kiosktool.php"
>&kiosktool;</ulink
> is een beheerprogramma voor &kde; dat systeembeheerders een eenvoudige manier biedt om desktopconfiguraties voor gebruikersgroepen voor te definiëren, instellingen vast te zetten of op andere wijze de functionaliteit van de &kde; Desktop Environment te beperken.</para>
</abstract>
<keywordset>
<keyword
>KDE</keyword>
<keyword
>KIOSK</keyword>
<keyword
>kiosktool</keyword>
<keyword
>beheer</keyword>
<keyword
>vergrendelen</keyword>
<keyword
>beleid</keyword>
<keyword
>beleid</keyword>
<keyword
>profiel</keyword>
</keywordset>
</bookinfo>
&kiosktool-introduction;
&kiosktool-profiles;
&kiosktool-profile-create;
&kiosktool-profile-assign;
&kiosktool-profile-setup;
&kiosktool-extra-steps;
&kiosktool-settings;
<chapter id="credits">
<title
>Dankbetuigingen en licentie</title>
<para
>&kiosktool; </para>
<para
>Programma copyright 2004 Waldo Bastian <email
>bastian@kde.org</email
> </para>
<para
>Documentatie copyright 2004 Waldo Bastian <email
>bastian@kde.org</email
> </para>
&meld.fouten;&vertaling.rinse;
&underFDL; </chapter>
&documentation.index;
</book>
<!--
vim:tabstop=2:shiftwidth=2:expandtab
-->

@ -0,0 +1,27 @@
<chapter id="introduction">
<title
>Overzicht</title>
<para
>&kiosktool; is een beheerprogramma voor &kde; dat systeembeheerders een eenvoudige manier biedt om desktopconfiguraties voor gebruikersgroepen te definiëren, instellingen te vergrendelen of op andere wijze de functionaliteit van de &kde; Desktop Environment te beperken.</para>
<para
>&kiosktool; maakt gebruik van KDE's KIOSK restrictions framework, welke gebruik maakt van <link linkend="profiles"
>profielen</link
>. Een profiel is een verzameling standaardinstellingen en beperkingen die kunnen worden toegepast op individuele of groepen gebruikers.</para>
<para
>In &kiosktool; maakt u eenvoudigweg een <link linkend="profile-create"
>nieuw profiel aan</link
>, waarna u deze <link linkend="profile-setup"
>inricht</link
> met de gewenste standaardinstellingen en beperkingen. Tot slot activeert u het profiel door <link linkend="profile-assign"
>deze toe te wijzen</link
> aan één of meer gebruikers. </para>
<para
>Als u &kiosktool; gebruikt in combinatie met oudere versies van &kde; (KDE 3.2 of ouder), dan dient u enkele <link linkend="extra-steps"
>aanvullende stappen</link
> uit te voeren om de profielen te kunnen activeren. </para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="profile-assign">
<title
>Profielen toewijzen</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="profile-create">
<title
>Een nieuw profiel aanmaken</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="profile-setup">
<title
>Een profiel opzetten</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,29 @@
<chapter id="profiles">
<title
>Profielen</title>
<para
>Een profiel is een verzameling standaardinstellingen en -beperkingen die kunnen worden toegepast op individuele of groepen gebruikers.</para>
<para
>De KDE Desktop Environment en alle KDE-programma's maken gebruik van een specifieke <ulink url="http://www.kde.org/areas/sysadmin/fsh.php#dir_structure"
>mappenstructuur</ulink
> voor het opzoeken van configuratie-instellingen en andere programma-informatie. KDE kent verschillende <ulink url="http://www.kde.org/areas/sysadmin/fsh.php#dir_location"
>locaties</ulink
> voor deze mappenstructuren. Alle informatie en <ulink url="http://www.kde.org/areas/sysadmin/config_file.php"
>configuratie-instellingen</ulink
> gevonden op deze locaties worden <ulink url="http://www.kde.org/areas/sysadmin/config_file.php#cascading"
>gecombineerd</ulink
> voordat ze worden gebruikt. Het <ulink url="http://www.kde.org/areas/sysadmin/config_file.php#lock_down"
>vergrendelen</ulink
> van instellingen bepaalt of instellingen uit de persoonlijke map van de gebruiker ($KDEHOME of ~/.kde) hierbij worden meegenomen of niet. </para>
<para
>Een profiel bestaat uit een standaard KDE-mappenstructuur op een gebruikergedefinieerde locatie met instellingen en informatie die door u is gekozen. </para>
<para
>&kiosktool; laat u kiezen op welke locatie een profiel zal worden opgeslagen. Informatie over beschikbare profielen is opgeslagen in het bestand &etc_kderc;. </para>
<para
>Het is aan te raden om alle profielen in één map op te slaan. In dat geval hoeft het bestand &etc_kderc; alleen een referentie naar die map te bevatten en zal KDE en &kiosktool; automatisch alle profielen uit die map oppikken. Zie het hoofdstuk <xref linkend="settings"/> voor meer informatie. </para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="settings">
<title
>&kiosktool;-instellingen</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="extra-steps">
<title
>Usar os Perfis com Outras Versões do KDE</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,138 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY kiosktool "<application
>KIOSK Admin Tool</application
>">
<!ENTITY kappname "&kiosktool;">
<!ENTITY TODO "Yet to be written.">
<!ENTITY etc_kderc "/etc/kderc">
<!ENTITY kiosktool-introduction SYSTEM "introduction.docbook">
<!ENTITY kiosktool-profiles SYSTEM "profiles.docbook">
<!ENTITY kiosktool-profile-create SYSTEM "profile-create.docbook">
<!ENTITY kiosktool-profile-setup SYSTEM "profile-setup.docbook">
<!ENTITY kiosktool-profile-assign SYSTEM "profile-assign.docbook">
<!ENTITY kiosktool-extra-steps SYSTEM "extra-steps.docbook">
<!ENTITY kiosktool-settings SYSTEM "settings.docbook">
<!ENTITY % Portuguese "INCLUDE"
> <!-- change language only here -->
<!ENTITY % addindex "IGNORE">
]>
<book lang="&language;"
>
<bookinfo>
<title
>Manual de utilizador do &kiosktool;</title>
<authorgroup>
<author
><firstname
>Waldo</firstname
> <surname
>Bastian</surname
> <affiliation
> <address
><email
>bastian@kde.org</email
></address>
</affiliation>
</author>
<othercredit role="translator"
><firstname
>José</firstname
><surname
>Pires</surname
><affiliation
><address
><email
>jncp@netcabo.pt</email
></address
></affiliation
><contrib
>Tradução</contrib
></othercredit
>
</authorgroup>
<copyright>
<year
>2004</year>
<holder
>bastian@kde.org</holder>
</copyright>
<legalnotice
>&FDLNotice;</legalnotice>
<date
>2004-11-12</date>
<releaseinfo
>1.0</releaseinfo>
<abstract>
<para
>O <ulink url="http://extragear.kde.org/apps/kiosktool.php"
>&kiosktool;</ulink
> é uma ferramenta de administração do &kde; que oferece aos administradores de sistema uma forma simples de predefinir configurações do ambiente de trabalho para os grupos de utilizadores, bloquear as opções ou restringir de outra forma as funcionalidades do ambiente de trabalho do &kde;.</para>
</abstract>
<keywordset>
<keyword
>KDE</keyword>
<keyword
>KIOSK</keyword>
<keyword
>kiosktool</keyword>
<keyword
>administração</keyword>
<keyword
>bloquear</keyword>
<keyword
>política</keyword>
<keyword
>políticas</keyword>
<keyword
>perfil</keyword>
</keywordset>
</bookinfo>
&kiosktool-introduction;
&kiosktool-profiles;
&kiosktool-profile-create;
&kiosktool-profile-assign;
&kiosktool-profile-setup;
&kiosktool-extra-steps;
&kiosktool-settings;
<chapter id="credits">
<title
>Créditos e Licença</title>
<para
>&kiosktool; </para>
<para
>Programa copyright 2004 Waldo Bastian <email
>bastian@kde.org</email
> </para>
<para
>Documentação copyright 2004 Waldo Bastian <email
>bastian@kde.org</email
> </para>
<para
>Tradução de José Nuno Pires <email
>jncp@netcabo.pt</email
></para
>
&underFDL; </chapter>
&documentation.index;
</book>
<!--
vim:tabstop=2:shiftwidth=2:expandtab
-->

@ -0,0 +1,27 @@
<chapter id="introduction">
<title
>Introdução</title>
<para
>O &kiosktool; é uma ferramenta de administração do &kde; que oferece aos administradores do sistema uma forma simples de predefinir as configurações do ambiente de trabalho para grupos de utilizadores, para bloquear algumas opções ou para restringir algumas funcionalidades do ambiente de trabalho do &kde;.</para>
<para
>O &kiosktool; tira partido da plataforma de restrições KIOSK do KDE. Está centrada em torno do conceito de <link linkend="profiles"
>perfis</link
>. Um perfil é uma colecção de opções predefinidas e restrições que podem ser aplicadas a utilizadores individuais ou a grupos de utilizadores.</para>
<para
>Uma utilização típica do &kiosktool; é a <link linkend="profile-create"
>criação de um novo perfil</link
>, depois a <link linkend="profile-setup"
>configuração do perfil</link
> com as opções e restrições desejadas e finalmente a activação do perfil com a <link linkend="profile-assign"
>atribuição do mesmo</link
> a um ou mais utilizadores. </para>
<para
>Ao usar o &kiosktool; em conjunto com outras versões mais antigas do &kde; (KDE 3.2 ou anterior), alguns <link linkend="extra-steps"
>passos adicionais</link
> terão de ser efectuados para activar adequadamente os perfis. </para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="profile-assign">
<title
>Atribuir Perfis</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="profile-create">
<title
>Criar um Novo Perfil</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="profile-setup">
<title
>Configurar um Perfil</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,29 @@
<chapter id="profiles">
<title
>Perfis</title>
<para
>Um perfil é uma colecção de opções e restrições predefinidas que podem ser aplicadas a utilizadores individuais ou a grupos de utilizadores.</para>
<para
>O ambiente de trabalho do KDE, assim como todas as aplicações do KDE, usam uma <ulink url="http://www.kde.org/areas/sysadmin/fsh.php#dir_structure"
>estrutura de pastas</ulink
> para procurar as opções de configuração e outras informações variadas. O KDE sabe de várias <ulink url="http://www.kde.org/areas/sysadmin/fsh.php#dir_location"
>localizações</ulink
> para essas estruturas de pastas. Toda a informação e as <ulink url="http://www.kde.org/areas/sysadmin/config_file.php"
>opções de configuração</ulink
> que se encontram nos vários locais são <ulink url="http://www.kde.org/areas/sysadmin/config_file.php#cascading"
>combinados</ulink
> antes de poderem ser usados. As <ulink url="http://www.kde.org/areas/sysadmin/config_file.php#lock_down"
>Lock funcionalidades bloqueadas</ulink
> controlam se as opções na pasta pessoal do utilizador (a $KDEHOME ou a ~/.kde) são tidas em conta ou não. </para>
<para
>Um perfil consiste numa estrutura de pastas normal do KDE numa localização personalizada com opções e informações escolhidas para si. </para>
<para
>O &kiosktool; permite-lhe escolher em que localização deverá ser gravado um perfil. A informação sobre os perfis disponíveis é guardada no ficheiro &etc_kderc;. </para>
<para
>Recomenda-se que grave todos os perfis numa única pasta. Neste caso, o ficheiro &etc_kderc; só necessita de conter uma referência a esta pasta única, e o KDE e o &kiosktool; irão automaticamente pegar em todos os perfis guardados nesta pasta. Veja o capítulo de <xref linkend="settings"/> para mais informações. </para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="settings">
<title
>Configuração do &kiosktool;</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="extra-steps">
<title
>Använda profiler med äldre KDE-versioner</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,138 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY kiosktool "<application
>KIOSK Admin Tool</application
>">
<!ENTITY kappname "&kiosktool;">
<!ENTITY TODO "Yet to be written.">
<!ENTITY etc_kderc "/etc/kderc">
<!ENTITY kiosktool-introduction SYSTEM "introduction.docbook">
<!ENTITY kiosktool-profiles SYSTEM "profiles.docbook">
<!ENTITY kiosktool-profile-create SYSTEM "profile-create.docbook">
<!ENTITY kiosktool-profile-setup SYSTEM "profile-setup.docbook">
<!ENTITY kiosktool-profile-assign SYSTEM "profile-assign.docbook">
<!ENTITY kiosktool-extra-steps SYSTEM "extra-steps.docbook">
<!ENTITY kiosktool-settings SYSTEM "settings.docbook">
<!ENTITY % Swedish "INCLUDE"
> <!-- change language only here -->
<!ENTITY % addindex "IGNORE">
]>
<book lang="&language;"
>
<bookinfo>
<title
>Handbok &kiosktool;</title>
<authorgroup>
<author
><firstname
>Waldo</firstname
> <surname
>Bastian</surname
> <affiliation
> <address
><email
>bastian@kde.org</email
></address>
</affiliation>
</author>
<othercredit role="translator"
> <firstname
>Stefan</firstname
> <surname
>Asserhäll</surname
> <affiliation
><address
><email
>stefan.asserhall@comhem.se</email
></address
></affiliation
> <contrib
>Översättare</contrib
></othercredit
>
</authorgroup>
<copyright>
<year
>2004</year>
<holder
>bastian@kde.org</holder>
</copyright>
<legalnotice
>&FDLNotice;</legalnotice>
<date
>2004-11-12</date>
<releaseinfo
>1.0</releaseinfo>
<abstract>
<para
><ulink url="http://extragear.kde.org/apps/kiosktool.php"
>&kiosktool;</ulink
> är ett administrationsverktyg för &kde; som erbjuder ett enkelt sätt för systemadministratörer att skapa fördefinierade skrivbordsinställningar för grupper av användare, låsa inställningar eller på andra sätt begränsa funktionerna hos &kde;:s skrivbordsmiljö.</para>
</abstract>
<keywordset>
<keyword
>KDE</keyword>
<keyword
>KIOSK</keyword>
<keyword
>kiosktool</keyword>
<keyword
>administration</keyword>
<keyword
>låsa</keyword>
<keyword
>policy</keyword>
<keyword
>policier</keyword>
<keyword
>profil</keyword>
</keywordset>
</bookinfo>
&kiosktool-introduction;
&kiosktool-profiles;
&kiosktool-profile-create;
&kiosktool-profile-assign;
&kiosktool-profile-setup;
&kiosktool-extra-steps;
&kiosktool-settings;
<chapter id="credits">
<title
>Tack till och licens</title>
<para
>&kiosktool; </para>
<para
>Program copyright 2004 Waldo Bastian <email
>bastian@kde.org</email
> </para>
<para
>Dokumentation copyright 2004 Waldo Bastian <email
>bastian@kde.org</email
> </para>
<para
>Översättning Stefan Asserhäll <email
>stefan.asserhall@comhem.se</email
></para
>
&underFDL; </chapter>
&documentation.index;
</book>
<!--
vim:tabstop=2:shiftwidth=2:expandtab
-->

@ -0,0 +1,27 @@
<chapter id="introduction">
<title
>Översikt</title>
<para
>&kiosktool; är ett administrationsverktyg för &kde; som erbjuder ett enkelt sätt för systemadministratörer att skapa fördefinierade skrivbordsinställningar för grupper av användare, låsa inställningar eller på andra sätt begränsa funktionerna hos &kde;:s skrivbordsmiljö.</para>
<para
>&kiosktool; drar fördel av KDE:s ramverk för begränsning, KIOSK. Det är baserat på <link linkend="profiles"
>profiler</link
>. En profil är en samling förvalda inställningar och begränsningar som antingen kan användas för individuella användare eller grupper av användare.</para>
<para
>Typisk användning av &kiosktool; är att <link linkend="profile-create"
>skapa en ny profil</link
>, därefter <link linkend="profile-setup"
>ställa in profilen</link
> med önskade förvalda inställningar och begränsningar, och till sist aktivera den genom att <link linkend="profile-assign"
>tilldela profilen</link
> till en eller flera användare. </para>
<para
>När &kiosktool; används tillsammans med äldre versioner av &kde; (KDE 3.2 eller äldre) krävs ett antal <link linkend="extra-steps"
>ytterligare steg</link
> för att aktivera profiler på ett riktigt sätt. </para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="profile-assign">
<title
>Tilldela profiler</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="profile-create">
<title
>Skapa en ny profil</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="profile-setup">
<title
>Ställa in en profil</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,29 @@
<chapter id="profiles">
<title
>Profiler</title>
<para
>En profil är en samling förvalda inställningar och begränsningar som antingen kan användas för individuella användare eller grupper av användare.</para>
<para
>KDE skrivbordsmiljön samt alla KDE-program använder en specifik <ulink url="http://www.kde.org/areas/sysadmin/fsh.php#dir_structure"
>katalogstruktur</ulink
> för att slå upp konfigurationsinställningar och diverse annan information. KDE känner till flera <ulink url="http://www.kde.org/areas/sysadmin/fsh.php#dir_location"
>platser</ulink
> för katalogstrukturerna. All information och <ulink url="http://www.kde.org/areas/sysadmin/config_file.php"
>konfigurationsinställningar</ulink
> som hittas på de olika platserna <ulink url="http://www.kde.org/areas/sysadmin/config_file.php#cascading"
>kombineras</ulink
> innan de används. Funktionen <ulink url="http://www.kde.org/areas/sysadmin/config_file.php#lock_down"
>låsning</ulink
> styr om inställningar i användarens hemkatalog ($KDEHOME eller ~/.kde) tas hänsyn till eller inte. </para>
<para
>En profil består av en vanlig KDE-katalogstruktur på en egen plats med inställningar och information som väljes av dig. </para>
<para
>&kiosktool; låter dig välja på vilken plats en profil ska lagras. Information om tillgängliga profiler lagras i filen &etc_kderc;. </para>
<para
>Det rekommenderas att alla profiler lagras under en enda katalog. I det fallet behöver filen &etc_kderc; bara innehålla en referens till denna enda katalog, så hämtar KDE och &kiosktool; automatiskt alla profiler som lagras under katalogen. Se kapitlet <xref linkend="settings"/> för mer information. </para>
</chapter>

@ -0,0 +1,6 @@
<chapter id="settings">
<title
>Inställningar av &kiosktool;</title>
<para
>&TODO;</para>
</chapter>

@ -0,0 +1,62 @@
## Makefile.am for kiosktool
# this has all of the subdirectories that make will recurse into. if
# there are none, comment this out
SUBDIRS = . kcms
# this is the program that gets installed. it's name is used for all
# of the other Makefile.am variables
bin_PROGRAMS = kiosktool kiosktool-kdedirs
# set the include path for X, qt and KDE
INCLUDES = $(all_includes)
# the library search path.
kiosktool_LDFLAGS = $(KDE_RPATH) $(all_libraries)
# the libraries to link against.
kiosktool_LDADD = $(LIB_KFILE) -lkdeprint
# which sources should be compiled for kiosktool
kiosktool_SOURCES = main.cpp kioskgui.cpp kioskdata.cpp kioskrun.cpp \
mainview.ui profileSelectionPage_ui.ui \
profilePropsPage.cpp profilePropsPage_ui.ui \
pageWidget.cpp component.cpp \
desktopComponent.cpp menueditComponent.cpp screensaverComponent.cpp \
panelComponent.cpp filetypeeditComponent.cpp \
componentSelectionPage.cpp componentSelectionPage_ui.ui \
componentPage.cpp componentPage_ui.ui \
userManagement.cpp userManagement_ui.ui userManagementGroup_ui.ui \
userManagementUser_ui.ui \
kioskConfigDialog.cpp kioskConfigDialog_ui.ui \
kiosksync.cpp
# the library search path.
kiosktool_kdedirs_LDFLAGS = $(KDE_RPATH) $(all_libraries)
# the libraries to link against.
kiosktool_kdedirs_LDADD = $(LIB_KDECORE)
# which sources should be compiled for kiosktool
kiosktool_kdedirs_SOURCES = kiosktool-kdedirs.cpp
# these are the headers for your project
noinst_HEADERS = kioskgui.h
# let automoc handle all of the meta source files (moc)
METASOURCES = AUTO
messages: rc.cpp
./extractxml kiosk_data.xml > kiosk_data.cpp
$(XGETTEXT) *.cpp -o $(podir)/kiosktool.pot
rm kiosk_data.cpp
KDE_ICON = kiosktool
xdg_apps_DATA = kiosktool.desktop
# this is where the XML-GUI resource file goes
rcdir = $(kde_datadir)/kiosktool
rc_DATA = kiosktoolui.rc kiosk_data.xml caption.png background.png logo.png \
caption-da.png caption-empty.png caption-et.png caption-pt.png caption-pt_BR.png \
caption-sv.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@ -0,0 +1,52 @@
/*
* component.cpp
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "component.h"
Component::Component( QObject *parent)
: QObject(parent)
{
}
Component::~Component()
{
}
void
Component::slotSetupPrepare()
{
}
void
Component::slotSetupStarted()
{
}
void
Component::slotPreviewStarted()
{
}
bool
Component::setupFinished()
{
return true;
}
#include "component.moc"

@ -0,0 +1,40 @@
/*
* component.h
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _COMPONENT_H_
#define _COMPONENT_H_
#include <qobject.h>
class Component : public QObject
{
Q_OBJECT
public:
Component( QObject *parent);
virtual ~Component();
virtual bool setupFinished();
public slots:
virtual void slotSetupPrepare();
virtual void slotSetupStarted();
virtual void slotPreviewStarted();
};
#endif

@ -0,0 +1,306 @@
/*
* componentPage.cpp
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "componentPage.h"
#include <qcursor.h>
#include <qfileinfo.h>
#include <qlabel.h>
#include <qstylesheet.h>
#include <qtextedit.h>
#include <qpushbutton.h>
#include <dcopref.h>
#include <kapplication.h>
#include <kdebug.h>
#include <klistview.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kprocess.h>
#include <kstdguiitem.h>
#include "component.h"
#include "kioskdata.h"
#include "kioskrun.h"
ComponentPage::ComponentPage( ComponentData *data, Component *component, QWidget* parent, const char* name, WFlags fl )
: ComponentPageUI(parent, name, fl), PageWidget(this), m_data(data), m_component(component)
{
m_process = 0;
connect(pbSetup, SIGNAL(clicked()), this, SLOT(slotSetup()));
connect(pbPreview, SIGNAL(clicked()), this, SLOT(slotPreview()));
pbSetup->setText(i18n("&Setup %1").arg(m_data->caption));
pbPreview->setText(i18n("&Preview %1").arg(m_data->caption));
if (m_data->preview.exec.isEmpty())
pbPreview->hide();
if (m_data->setup.exec.isEmpty())
pbSetup->hide();
if (!pbPreview->isHidden() && !pbSetup->isHidden())
{
static bool firstTime = true;
if (firstTime)
{
firstTime = false;
QTimer::singleShot(0, this, SLOT(slotShowNotice()));
}
}
fillActionList(listComponentConfig, m_data);
connect(listComponentConfig, SIGNAL(currentChanged(QListViewItem *)),
this, SLOT(slotShowAction(QListViewItem *)));
slotShowAction(listComponentConfig->currentItem());
}
ComponentPage::~ComponentPage()
{
delete m_component;
}
void ComponentPage::slotShowNotice()
{
KMessageBox::information(this,
i18n("Selecting the Setup or Preview option may cause the panel and/or the desktop to be temporarily shut down. "
"To prevent data loss please make sure you are not actively using these components."),
i18n("Attention"), "shutdown_notice");
}
void ComponentPage::load()
{
}
bool ComponentPage::save()
{
return saveActionListChanges(listComponentConfig);
}
void ComponentPage::setFocus()
{
listComponentConfig->setFocus();
}
QString ComponentPage::subCaption()
{
return i18n("Setup %1").arg(m_data->caption);
}
void ComponentPage::slotSetup()
{
if (m_process)
{
m_process->kill();
delete m_process;
}
QCString dcopApp = m_data->setup.dcop.utf8();
QCString dcopObj = "qt/" + dcopApp;
if (!dcopApp.isEmpty() && m_data->setup.hasOption("restart"))
DCOPRef(dcopApp, dcopObj).call("quit");
QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) );
if (!KioskRun::self()->prepare())
{
QApplication::restoreOverrideCursor();
KMessageBox::sorry(this,
i18n("<qt>There was an unexpected problem with the runtime environment.</qt>"));
return;
}
KioskRun::self()->makeMutable(true);
if (!save())
{
QApplication::restoreOverrideCursor();
return;
}
if (m_component)
m_component->slotSetupPrepare();
KioskRun::self()->updateSycoca();
QApplication::restoreOverrideCursor();
if (!dcopApp.isEmpty())
{
KioskRun::self()->dcopClient()->setNotifications(true);
connect(KioskRun::self()->dcopClient(), SIGNAL(applicationRegistered( const QCString& )),
this, SLOT(slotSetupAppRegistered( const QCString& )));
}
QStringList args;
if (m_data->setup.hasOption("nofork"))
args << "--nofork";
args += m_data->setup.args;
m_process = KioskRun::self()->run(m_data->setup.exec, args);
int result = KMessageBox::questionYesNo(this,
i18n("<qt>You can now configure %1. "
"When you are finished click <b>Save</b> to make the new configuration permanent.")
.arg(m_data->caption), i18n("%1 Setup").arg(m_data->caption),
KStdGuiItem::save(), KStdGuiItem::discard());
m_saveSettings = (result == KMessageBox::Yes);
if (!dcopApp.isEmpty())
KioskRun::self()->dcopRef(dcopApp, dcopObj).call("quit");
if (m_process->isRunning())
{
connect(m_process, SIGNAL(processExited(KProcess *)), this, SLOT(slotPreviewDone()));
}
else
{
slotSetupDone();
}
}
void ComponentPage::slotSetupDone()
{
delete m_process;
m_process = 0;
KioskRun::self()->dcopClient()->setNotifications(false);
disconnect(KioskRun::self()->dcopClient(), SIGNAL(applicationRegistered( const QCString& )),
this, SLOT(slotSetupAppRegistered( const QCString& )));
KioskRun::self()->makeMutable(false);
if (m_saveSettings)
{
bool result = true;
if (m_component)
result = m_component->setupFinished();
if (!result) return;
// Find new config files.
QStringList newFiles = KioskRun::self()->newConfigFiles();
for(QStringList::ConstIterator it = newFiles.begin();
it != newFiles.end(); ++it)
{
if (m_data->ignoreFiles.contains(*it))
{
kdDebug() << "Ignoring new config file " << (*it) << endl;
continue;
}
KioskRun::self()->mergeConfigFile(*it);
}
}
KioskRun::self()->flushConfigCache();
if (m_data->setup.hasOption("restart"))
KApplication::kdeinitExec(m_data->setup.exec);
}
void ComponentPage::slotSetupAppRegistered( const QCString &appid)
{
QCString dcopApp = m_data->setup.dcop.utf8();
if (dcopApp == appid)
{
kdDebug() << appid << " is up and running" << endl;
if (m_component)
m_component->slotSetupStarted();
}
}
void ComponentPage::slotPreview()
{
if (m_process)
{
m_process->kill();
delete m_process;
}
QCString dcopApp = m_data->preview.dcop.utf8();
QCString dcopObj = "qt/" + dcopApp;
if (!dcopApp.isEmpty() && m_data->preview.hasOption("restart"))
DCOPRef(dcopApp, dcopObj).call("quit");
QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) );
KioskRun::self()->prepare();
save();
KioskRun::self()->updateSycoca();
QApplication::restoreOverrideCursor();
if (!dcopApp.isEmpty())
{
KioskRun::self()->dcopClient()->setNotifications(true);
connect(KioskRun::self()->dcopClient(), SIGNAL(applicationRegistered( const QCString& )),
this, SLOT(slotPreviewAppRegistered( const QCString& )));
}
QStringList args;
if (m_data->preview.hasOption("nofork"))
args << "--nofork";
args += m_data->preview.args;
m_process = KioskRun::self()->run(m_data->preview.exec, args);
KMessageBox::information(this,
i18n("<qt>This is how %1 will behave and look with the new settings. "
"Any changes you now make to the settings will not be saved.<p>"
"Click <b>Ok</b> to return to your own personal %2 configuration.")
.arg(m_data->caption, m_data->caption), i18n("%1 Preview").arg(m_data->caption));
if (!dcopApp.isEmpty())
KioskRun::self()->dcopRef(dcopApp, dcopObj).call("quit");
if (m_process->isRunning())
{
connect(m_process, SIGNAL(processExited(KProcess *)), this, SLOT(slotPreviewDone()));
}
else
{
slotPreviewDone();
}
}
void ComponentPage::slotPreviewAppRegistered( const QCString &appid)
{
QCString dcopApp = m_data->preview.dcop.utf8();
if (dcopApp == appid)
{
kdDebug() << appid << " is up and running" << endl;
if (m_component)
m_component->slotPreviewStarted();
}
}
void ComponentPage::slotPreviewDone()
{
KioskRun::self()->dcopClient()->setNotifications(false);
disconnect(KioskRun::self()->dcopClient(), SIGNAL(applicationRegistered( const QCString& )),
this, SLOT(slotPreviewAppRegistered( const QCString& )));
delete m_process;
m_process = 0;
if (m_data->preview.hasOption("restart"))
KApplication::kdeinitExec(m_data->preview.exec);
}
void ComponentPage::slotShowAction(QListViewItem *item)
{
ComponentActionItem *actionItem = dynamic_cast<ComponentActionItem*>(item);
QString description;
if (actionItem)
{
description = "<h2>"+QStyleSheet::escape(actionItem->action()->caption)+"</h2>\n";
description += actionItem->action()->description;
}
componentDescription->setText(description);
}
#include "componentPage.moc"

@ -0,0 +1,65 @@
/*
* componentPage.h
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _COMPONENTPAGE_H_
#define _COMPONENTPAGE_H_
#include "componentPage_ui.h"
#include "pageWidget.h"
class KProcess;
class Component;
class ComponentData;
class ComponentPage : public ComponentPageUI, public PageWidget
{
Q_OBJECT
public:
ComponentPage( ComponentData *data, Component *component, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~ComponentPage();
virtual void load();
virtual bool save();
virtual void setFocus();
virtual QString subCaption();
public slots:
void slotSetup();
void slotPreview();
protected slots:
void slotShowNotice();
void slotSetupDone();
void slotPreviewDone();
void slotShowAction(QListViewItem *item);
void slotSetupAppRegistered( const QCString &appid);
void slotPreviewAppRegistered( const QCString &appid);
protected:
void prepareMutableFiles();
private:
KProcess *m_process;
ComponentData *m_data;
Component *m_component;
bool m_saveSettings;
};
#endif

@ -0,0 +1,195 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ComponentPageUI</class>
<widget class="QWidget">
<property name="name">
<cstring>ComponentPageUI</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>559</width>
<height>372</height>
</rect>
</property>
<property name="backgroundOrigin">
<enum>WindowOrigin</enum>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="3" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>componentDescription</cstring>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>140</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>32767</width>
<height>140</height>
</size>
</property>
<property name="frameShape">
<enum>StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>Sunken</enum>
</property>
<property name="alignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
<spacer row="2" column="1">
<property name="name">
<cstring>spacer8</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>16</height>
</size>
</property>
</spacer>
<widget class="QLayoutWidget" row="1" column="3">
<property name="name">
<cstring>layout1</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QPushButton">
<property name="name">
<cstring>pbSetup</cstring>
</property>
<property name="text">
<string>&amp;Setup XXX</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer8_2</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>16</height>
</size>
</property>
</spacer>
<widget class="QPushButton">
<property name="name">
<cstring>pbPreview</cstring>
</property>
<property name="text">
<string>&amp;Preview XXX</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer8_3</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>21</width>
<height>171</height>
</size>
</property>
</spacer>
</vbox>
</widget>
<spacer row="1" column="2">
<property name="name">
<cstring>spacer7</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="KListView" row="1" column="0" rowspan="1" colspan="2">
<column>
<property name="text">
<string>Restriction</string>
</property>
<property name="clickable">
<bool>true</bool>
</property>
<property name="resizable">
<bool>true</bool>
</property>
</column>
<property name="name">
<cstring>listComponentConfig</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>1</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>150</height>
</size>
</property>
<property name="backgroundOrigin">
<enum>WindowOrigin</enum>
</property>
<property name="allColumnsShowFocus">
<bool>true</bool>
</property>
<property name="fullWidth">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="text">
<string>Enable &amp;restrictions:</string>
</property>
<property name="buddy" stdset="0">
<cstring>listComponentConfig</cstring>
</property>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -0,0 +1,143 @@
/*
* componentSelectionPage.cpp
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "componentSelectionPage.h"
#include <qpushbutton.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kiconloader.h>
#include <kiconview.h>
#include <klocale.h>
#include "kioskdata.h"
class ComponentViewItem : public QIconViewItem
{
public:
ComponentViewItem( QIconView * parent, const QString & text, const QPixmap & icon, const QString & _id )
: QIconViewItem( parent, text, icon), id(_id)
{
}
QString id;
};
ComponentSelectionPage::ComponentSelectionPage( KioskData *data, QWidget* parent, const char* name, WFlags fl )
: ComponentSelectionPageUI(parent, name, fl), PageWidget(this), m_data(data)
{
listComponent->setSelectionMode(QIconView::Single);
listComponent->setItemsMovable(false);
listComponent->setSpacing(20);
listComponent->setGridX(110);
listComponent->setGridY(75);
loadComponentList();
connect(listComponent, SIGNAL(clicked(QIconViewItem *)), this, SLOT(slotComponentActivated(QIconViewItem *)));
connect(listComponent, SIGNAL(returnPressed (QIconViewItem *)), this, SLOT(slotComponentActivated(QIconViewItem *)));
connect(pbSetup, SIGNAL(clicked()), this, SLOT(slotComponentActivated()));
}
ComponentSelectionPage::~ComponentSelectionPage()
{
}
void ComponentSelectionPage::load()
{
}
bool ComponentSelectionPage::save()
{
KConfig *config = kapp->config();
config->setGroup("General");
config->writeEntry("CurrentComponent", currentComponent());
config->sync();
return true;
}
void ComponentSelectionPage::setFocus()
{
}
QString ComponentSelectionPage::subCaption()
{
return QString::null;
}
void ComponentSelectionPage::loadComponentList()
{
listComponent->clear();
for(QStringList::ConstIterator it = m_data->m_componentList.begin();
it != m_data->m_componentList.end(); ++it)
{
ComponentData *data = m_data->m_componentData.find(*it);
Q_ASSERT(data);
if (!data) continue;
QPixmap icon = DesktopIcon( data->icon, KIcon::SizeMedium );
new ComponentViewItem(listComponent, data->caption, icon, data->id);
}
}
bool ComponentSelectionPage::hasSelection()
{
return !currentComponent().isEmpty();
}
QString ComponentSelectionPage::currentComponent()
{
ComponentViewItem *item = static_cast<ComponentViewItem *>(listComponent->firstItem());
while(item)
{
if (item->isSelected())
return item->id;
item = static_cast<ComponentViewItem *>(item->nextItem());
}
return QString::null;
}
void ComponentSelectionPage::setCurrentComponent(const QString &id)
{
ComponentViewItem *item = static_cast<ComponentViewItem *>(listComponent->firstItem());
while(item)
{
if (item->id == id)
{
listComponent->setSelected(item, true);
return;
}
item = static_cast<ComponentViewItem *>(item->nextItem());
}
if (listComponent->firstItem())
listComponent->setSelected(listComponent->firstItem(), true);
}
void ComponentSelectionPage::slotComponentActivated(QIconViewItem *item)
{
if (item)
emit componentActivated();
}
void ComponentSelectionPage::slotComponentActivated()
{
if (!currentComponent().isEmpty())
emit componentActivated();
}
#include "componentSelectionPage.moc"

@ -0,0 +1,59 @@
/*
* componentSelectionPage.h
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _COMPONENTSELECTIONPAGE_H_
#define _COMPONENTSELECTIONPAGE_H_
#include "componentSelectionPage_ui.h"
#include "pageWidget.h"
class KioskData;
class ComponentSelectionPage : public ComponentSelectionPageUI, public PageWidget
{
Q_OBJECT
public:
ComponentSelectionPage( KioskData *data, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~ComponentSelectionPage();
virtual void load();
virtual bool save();
virtual void setFocus();
virtual QString subCaption();
void setCurrentComponent(const QString &);
QString currentComponent();
signals:
void componentActivated();
protected:
void loadComponentList();
bool hasSelection();
protected slots:
void slotComponentActivated(QIconViewItem *item);
void slotComponentActivated();
private:
KioskData *m_data;
};
#endif

@ -0,0 +1,124 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ComponentSelectionPageUI</class>
<widget class="QWidget">
<property name="name">
<cstring>ComponentSelectionPageUI</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>682</width>
<height>373</height>
</rect>
</property>
<property name="backgroundOrigin">
<enum>WindowOrigin</enum>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer row="1" column="2">
<property name="name">
<cstring>spacer2_2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<spacer row="2" column="1">
<property name="name">
<cstring>spacer5</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QLayoutWidget" row="1" column="3">
<property name="name">
<cstring>layout1</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QPushButton">
<property name="name">
<cstring>pbSetup</cstring>
</property>
<property name="text">
<string>&amp;Setup Component</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer5_2</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>211</height>
</size>
</property>
</spacer>
</vbox>
</widget>
<widget class="QIconView" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>listComponent</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>400</width>
<height>200</height>
</size>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="text">
<string>Select &amp;component:</string>
</property>
<property name="buddy" stdset="0">
<cstring>listComponent</cstring>
</property>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -0,0 +1,2 @@
AC_CHECK_SETENV
AC_CHECK_UNSETENV

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -0,0 +1,239 @@
/*
* desktopComponent.cpp
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "desktopComponent.h"
#include <qdir.h>
#include <qfileinfo.h>
#include <kdebug.h>
#include <kmimetype.h>
#include <kprocess.h>
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
#include <ktempfile.h>
#include <kurl.h>
#include "kioskrun.h"
DesktopComponent::DesktopComponent( QObject *parent)
: Component(parent)
{
}
DesktopComponent::~DesktopComponent()
{
}
void
DesktopComponent::slotSetupPrepare()
{
m_iconPositionsFile = KioskRun::self()->locateLocal("data", "kdesktop/IconPositions");
::unlink(QFile::encodeName(m_iconPositionsFile));
connect(&m_timer, SIGNAL(timeout()), this, SLOT(slotSetupStarted()));
}
void
DesktopComponent::slotSetupStarted()
{
QString desktop = KioskRun::self()->desktopPath();
QFileInfo info(desktop);
if (info.exists())
{
disconnect(&m_timer, SIGNAL(timeout()), this, SLOT(slotSetupStarted()));
connect(&m_timer, SIGNAL(timeout()), this, SLOT(slotSetupReady()));
m_timer.start(1000, true);
}
else
{
m_timer.start(500, true);
}
}
void filterFileList(const QString &path, QStringList *files, QStringList *oldFiles)
{
files->remove(".");
files->remove("..");
QStringList::Iterator next;
for(QStringList::Iterator it = files->begin();
it != files->end(); it = next)
{
next = it;
next++;
KURL u;
u.setPath(path+*it);
KMimeType::Ptr mime = KMimeType::findByURL(u, 0, true);
if (mime->name() == "application/x-desktop")
{
KSimpleConfig cfg(path+*it);
cfg.setDesktopGroup();
if (cfg.readBoolEntry("Hidden", false))
{
if (oldFiles)
oldFiles->append(*it);
files->remove(it);
continue;
}
}
}
}
void
DesktopComponent::slotSetupReady()
{
QString desktop = KioskRun::self()->desktopPath();
QDir dir(desktop);
m_origDesktopFiles = dir.entryList(QDir::All, QDir::Unsorted);
filterFileList(desktop, &m_origDesktopFiles, 0);
}
bool
DesktopComponent::setupFinished()
{
bool result = true;
disconnect(&m_timer, SIGNAL(timeout()), this, SLOT(slotSetupStarted()));
disconnect(&m_timer, SIGNAL(timeout()), this, SLOT(slotSetupReady()));
m_timer.stop();
KSimpleConfig newCfg(m_iconPositionsFile, true);
QString desktop = KioskRun::self()->desktopPath();
QDir dir(desktop);
QStringList newDesktopFiles = dir.entryList(QDir::All, QDir::Unsorted);
filterFileList(desktop, &newDesktopFiles, &m_origDesktopFiles);
KTempFile positionsFile;
positionsFile.close();
KSimpleConfig positions(positionsFile.name());
QStringList newGroups = newCfg.groupList();
QString prefix = "IconPosition::";
// Save icon positions
for(QStringList::Iterator it = newGroups.begin();
it != newGroups.end(); ++it)
{
if (!(*it).startsWith(prefix))
continue;
newCfg.setGroup(*it);
positions.setGroup(*it);
if (newCfg.hasKey("X"))
{
positions.writeEntry("X", newCfg.readEntry("X"));
positions.writeEntry("Y", newCfg.readEntry("Y"));
}
}
// Remove old icons from new list
QStringList::Iterator next;
for(QStringList::Iterator it = m_origDesktopFiles.begin();
it != m_origDesktopFiles.end(); it = next)
{
next = it;
next++;
if (newDesktopFiles.remove(*it))
{
m_origDesktopFiles.remove(it);
continue;
}
}
QString installPath = KioskRun::self()->locateSave("data", "kdesktop/Desktop/");
QString installPath2 = KioskRun::self()->locateSave("data", "kdesktop/DesktopLinks/");
// Remove all icons that are no longer
for(QStringList::Iterator it = m_origDesktopFiles.begin();
it != m_origDesktopFiles.end(); ++it)
{
QString file;
if (QFile::exists(installPath + *it))
file = installPath + *it;
else if (QFile::exists(installPath2 + *it))
file = installPath2 + *it;
if (!file.isEmpty())
{
result = KioskRun::self()->remove(file);
if (!result) return false;
positions.deleteGroup(prefix+*it);
}
else
{
QString installFile = installPath + *it;
file = KioskRun::self()->locate("data", "kdesktop/Desktop/" + *it);
if (file.isEmpty())
{
installFile = installPath2 + *it;
file = KioskRun::self()->locate("data", "kdesktop/DesktopLinks/" + *it);
}
if (!file.isEmpty())
{
// Hide via "Hidden=True", not sure if this works
KTempFile tmp;
tmp.close();
KSimpleConfig cfg(tmp.name());
cfg.setDesktopGroup();
cfg.writeEntry("Hidden", true);
cfg.sync();
result = KioskRun::self()->install(tmp.name(), installFile);
if (!result) return false;
positions.deleteGroup(prefix+*it);
}
else
{
kdWarning() << "DesktopComponent: Can't remove " << (*it) << endl;
}
}
}
positions.sync();
result = KioskRun::self()->install(positionsFile.name(), KioskRun::self()->locateSave("data", "kdesktop/Desktop/.directory"));
if (!result) return false;
// Add all icons that have been added
for(QStringList::Iterator it = newDesktopFiles.begin();
it != newDesktopFiles.end(); ++it)
{
QString file = KioskRun::self()->desktopPath() + *it;
if (QFile::exists(file))
{
result = KioskRun::self()->install(file, installPath + *it);
if (!result) return false;
}
else
{
kdWarning() << "DesktopComponent: Can't find new file " << file << endl;
}
}
return true;
}
#include "desktopComponent.moc"

@ -0,0 +1,50 @@
/*
* desktopComponent.h
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _DESKTOPCOMPONENT_H_
#define _DESKTOPCOMPONENT_H_
#include "component.h"
#include <qstringlist.h>
#include <qtimer.h>
class DesktopComponent: public Component
{
Q_OBJECT
public:
DesktopComponent( QObject *parent = 0);
virtual ~DesktopComponent();
virtual bool setupFinished();
public slots:
virtual void slotSetupPrepare();
virtual void slotSetupStarted();
protected slots:
void slotSetupReady();
private:
QTimer m_timer;
QString m_iconPositionsFile;
QStringList m_origDesktopFiles;
};
#endif

@ -0,0 +1,120 @@
#! /usr/bin/perl
#
# This script extracts messages from kiosk_data.xml
# and writes on standard output (usually redirected to rc.cpp)
# the equivalent i18n() calls so that xgettext can parse them.
#
# It is based on extractrc but differs in the following ways:
# *) Extracts <caption> and <description> tags
# *) Performs equivalent of QString::simplifyWhiteSpace on all strings
#
# known flags:
# --tag=name : extract also the tag name
# --context=name : give all i18n calls a context name: i18n( "name",...)
$filename = "";
@filenames = ();
sub writeoutstring
{
print STDOUT "i18n(\"";
if (@_[0])
{
# We have a I18N context
print STDOUT @_[0];
print STDOUT "\",\"";
}
print STDOUT @_[1];
print STDOUT "\"); // $filename \n";
}
$extratags = "";
$context = ""; # I18N context
ARGUMENTS: while (defined ($ARGV[0]))
{
$_ = shift;
if (/^--tag=(\w+)/) # --tag=name
{
$extratags .= "|" . $1;
next ARGUMENTS;
}
elsif (/^--context=(\w+)/) # --context=name
{
$context = $1;
next ARGUMENTS;
}
$filename = $_; # maybe check for more options
if (! $filename) {
print STDERR "no file to open\n";
exit 1;
}
$string = "";
$intext = 0;
$linenr = 0;
$inskippedprop = 0;
open(FILE, $filename);
READING: while ( <FILE> ) {
$linenr++;
if ($linenr == 1 && ($_ !~ /^<!DOCTYPE/) && ($_ !~ /^<\?xml/)) {
last READING;
}
$string .= "\\n" . $_;
chomp($string);
$textstring = '(caption|description' . $extratags .')>';
# The 'database' property contains strings that shouldn't be translated
if ($inskippedprop == 0 && ($string =~ /<property name=\"database\"/ || $string=~ /<property name=\"associations\"/)) {
$inskippedprop = 1;
} elsif ($inskippedprop == 1 && ($string =~ /<\/property/)) {
$inskippedprop = 0;
$string = "";
}
if ($inskippedprop == 0 && $intext == 0) {
if ($string =~ /<$textstring/) {
$string =~ s/^.*<$textstring//;
$intext = 1;
$starting_linenr = $linenr;
} else {
$string = "";
}
}
if (($intext == 1) && ($string =~ /<\/$textstring/)) {
my $text = $string;
$text =~ s/<\/$textstring.*$//;
$text =~ s/&lt;/</g;
$text =~ s/&gt;/>/g;
$text =~ s/&amp;/&/g;
$text =~ s/\\n/ /g;
$text =~ s/\\([^n])/\\\\$1/g;
$text =~ s/\"/\\\"/g;
$text =~ s/ +/ /g;
$text =~ s/^ //g;
$text =~ s/ $//g;
writeoutstring($context, $text);
$string =~ s/^.*<\/$textstring//;
$intext = 0;
# Text can be multiline in .ui files (possibly), but we warn about it in XMLGUI .rc files.
if ($linenr != $starting_linenr && $filename =~ m/\.rc$/) {
print STDERR "there is <text> floating $filename\n";
}
}
}
if ($intext == 1) {
print STDERR "parsing error in $filename $linenr\n";
exit 1;
}
}

@ -0,0 +1,133 @@
/*
* filetypeeditComponent.cpp
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "filetypeeditComponent.h"
#include <qdir.h>
#include <qdom.h>
#include <qfileinfo.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kmimetype.h>
#include <kprocess.h>
#include <ksavefile.h>
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
#include <kurl.h>
#include "kioskrun.h"
#include "kiosksync.h"
FileTypeEditComponent::FileTypeEditComponent( QObject *parent)
: Component(parent)
{
}
FileTypeEditComponent::~FileTypeEditComponent()
{
}
void
FileTypeEditComponent::slotSetupPrepare()
{
}
void
FileTypeEditComponent::slotSetupStarted()
{
}
bool
FileTypeEditComponent::setupFinished()
{
bool result;
// Install mimetype files
{
QString mimetypeFiles = KioskRun::self()->locateLocal("mime", QString::null);
QString mimetypeSaveFiles = KioskRun::self()->locateSave("mime", QString::null);
KioskSync mimeDir(kapp->mainWidget());
mimeDir.addDir(mimetypeFiles, KURL());
QStringList newMimetypeFiles = mimeDir.listFiles();
for(QStringList::ConstIterator it = newMimetypeFiles.begin();
it != newMimetypeFiles.end(); ++it)
{
if ((*it).endsWith(".desktop"))
{
kdDebug() << "FileTypeEditComponent: New mimetype file %s" << (mimetypeFiles+(*it)) << endl;
result = KioskRun::self()->install(mimetypeFiles+(*it), mimetypeSaveFiles+(*it));
if (!result) return false;
}
}
}
// Install legacy .desktop files
{
QString legacyApplications = KioskRun::self()->locateLocal("apps", QString::null);
QString legacySaveApplications = KioskRun::self()->locateSave("apps", QString::null);
KioskSync legacyDir(kapp->mainWidget());
legacyDir.addDir(legacyApplications, KURL());
QStringList newLegacyApplications = legacyDir.listFiles();
for(QStringList::ConstIterator it = newLegacyApplications.begin();
it != newLegacyApplications.end(); ++it)
{
if ((*it).endsWith(".desktop") || (*it).endsWith(".kdelnk") || (*it).endsWith(".directory"))
{
kdDebug() << "MenueditComponent: New legacy file %s" << (legacyApplications+(*it)) << endl;
result = KioskRun::self()->install(legacyApplications+(*it), legacySaveApplications+(*it));
if (!result) return false;
}
}
}
// Install .desktop files
{
QString xdgApplications = KioskRun::self()->locateLocal("xdgdata-apps", QString::null);
QString xdgSaveApplications = KioskRun::self()->locateSave("xdgdata-apps", QString::null);
QDir dir(xdgApplications);
QStringList newXdgApplications = dir.entryList(QDir::All, QDir::Unsorted);
newXdgApplications.remove(".");
newXdgApplications.remove("..");
for(QStringList::ConstIterator it = newXdgApplications.begin();
it != newXdgApplications.end(); ++it)
{
if ((*it).endsWith(".desktop") || (*it).endsWith(".kdelnk"))
{
kdDebug() << "MenueditComponent: New .desktop file %s" << (xdgApplications+(*it)) << endl;
result = KioskRun::self()->install(xdgApplications+(*it), xdgSaveApplications+(*it));
if (!result) return false;
}
}
}
KioskRun::self()->forceSycocaUpdate();
return true;
}
#include "filetypeeditComponent.moc"

@ -0,0 +1,42 @@
/*
* filetypeeditComponent.h
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _FILETYPEEDITCOMPONENT_H_
#define _FILETYPEEDITCOMPONENT_H_
#include "component.h"
#include <qstringlist.h>
#include <qtimer.h>
class FileTypeEditComponent: public Component
{
Q_OBJECT
public:
FileTypeEditComponent( QObject *parent = 0);
virtual ~FileTypeEditComponent();
virtual bool setupFinished();
public slots:
virtual void slotSetupPrepare();
virtual void slotSetupStarted();
};
#endif

@ -0,0 +1,6 @@
## Makefile.am for kiosktool's additional KCMs
# this has all of the subdirectories that make will recurse into. if
# there are none, comment this out
#SUBDIRS = autostart

@ -0,0 +1,17 @@
kde_module_LTLIBRARIES = kcm_autostart.la
kcm_autostart_la_SOURCES = kcmautostart.cpp
kcm_autostart_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined
kcm_autostart_la_LIBADD = $(LIB_KIO)
INCLUDES= $(all_includes)
kcm_autostart_la_METASOURCES = AUTO
KDE_ICON = autostart
messages: rc.cpp
$(XGETTEXT) *.cpp -o $(podir)/kcmautostart.pot
xdg_apps_DATA = kcmautostart.desktop

@ -0,0 +1,202 @@
/*
This file is part of the KDE project
Copyright (C) 2004 Martijn Klingens <klingens@kde.org>
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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <qlayout.h>
#include <qwhatsthis.h>
#include <qvgroupbox.h>
#include <qpushbutton.h>
#include <qheader.h>
#include <qtimer.h>
#include <qfileinfo.h>
#include <kaboutdata.h>
#include <kapplication.h>
#include <kdesktopfile.h>
#include <kdialog.h>
#include <kgenericfactory.h>
#include <klistview.h>
#include <kmessagebox.h>
#include <kservice.h>
#include <kstandarddirs.h>
#include <dcopclient.h>
#include <dcopref.h>
#include <kdebug.h>
#include "kcmautostart.h"
#include "kcmautostart.moc"
typedef KGenericFactory<AutoStartConfig, QWidget> AutoStartFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_autostart, AutoStartFactory( "kcmautostart" ) )
AutoStartConfig::AutoStartConfig(QWidget* parent, const char* name, const QStringList &) :
KCModule( AutoStartFactory::instance(), parent, name )
{
KGlobal::dirs()->addResourceType("autostart", "share/autostart");
KAboutData *about =
new KAboutData( I18N_NOOP( "kcmautostart" ), I18N_NOOP( "KDE Service Manager" ),
0, 0, KAboutData::License_GPL, I18N_NOOP( "(c) 2004 Martijn Klingens" ) );
about->addAuthor( "Martijn Klingens", 0, "klingens@kde.org" );
#if KDE_IS_VERSION(3,2,91)
setAboutData( about );
#endif
QVBoxLayout *lay = new QVBoxLayout( this, 0, KDialog::spacingHint() );
QGroupBox *gb = new QVGroupBox( i18n( "Startup Services" ), this );
QWhatsThis::add(gb, i18n("This shows all KDE services that can be loaded "
"on KDE startup. Checked services will be invoked on next startup. "
"Be careful with deactivation of unknown services."));
lay->addWidget( gb );
_lvStartup = new KListView( gb );
_lvStartup->addColumn(i18n("Use"));
_lvStartup->addColumn(i18n("Service"));
_lvStartup->addColumn(i18n("Description"));
_lvStartup->setAllColumnsShowFocus(true);
_lvStartup->header()->setStretchEnabled(true, 2);
load();
}
void setModuleGroup(KConfig *config, const QString &filename)
{
QString module = filename;
int i = module.findRev('/');
if (i != -1)
module = module.mid(i+1);
i = module.findRev('.');
if (i != -1)
module = module.left(i);
config->setGroup(QString("Module-%1").arg(module));
}
bool AutoStartConfig::autoloadEnabled(KConfig *config, const QString &filename)
{
setModuleGroup(config, filename);
return config->readBoolEntry("autoload", true);
}
void AutoStartConfig::setAutoloadEnabled(KConfig *config, const QString &filename, bool b)
{
setModuleGroup(config, filename);
return config->writeEntry("autoload", b);
}
void AutoStartConfig::load() {
_lvStartup->clear();
QStringList files = KGlobal::dirs()->findAllResources( "autostart", QString::fromLatin1( "*.desktop" ), false, true );
for ( QStringList::ConstIterator it = files.begin(); it != files.end(); it++ )
{
if ( KDesktopFile::isDesktopFile( QFileInfo( *it ).fileName() ) )
{
KDesktopFile file( QFileInfo( *it ).fileName(), true, "autostart" );
QString name = file.readName();
if ( !name.isEmpty() )
{
CheckListItem *clitem = new CheckListItem( _lvStartup, QString::null );
connect( clitem, SIGNAL( changed( QCheckListItem * ) ), SLOT( slotItemChecked( QCheckListItem * ) ) );
clitem->setText( 1, name );
clitem->setText( 2, file.readComment() );
clitem->setText( 3, *it );
clitem->setOn( !file.readBoolEntry( "Hidden", false ) );
}
}
}
}
void AutoStartConfig::save()
{
QListViewItemIterator it( _lvStartup );
while ( it.current() )
{
if ( KDesktopFile::isDesktopFile( it.current()->text( 3 ) ) )
{
// Determine whether we need to change the file on a readonly desktop file
// by giving a full path first
QString path = it.current()->text( 3 );
KDesktopFile file( path, true, "services" );
bool shouldBeHidden = !( static_cast<QCheckListItem *>( it.current() )->isOn() );
if ( file.readBoolEntry( "Hidden", false ) != shouldBeHidden )
{
KDesktopFile outFile( QFileInfo( path ).fileName(), false, "autostart" );
kdDebug() << "************** Writing out " << path << endl;
outFile.writeEntry( "Hidden", shouldBeHidden );
outFile.sync();
}
}
++it;
}
//QTimer::singleShot(0, this, SLOT(slotServiceRunningToggled()));
}
void AutoStartConfig::defaults()
{
QListViewItemIterator it( _lvStartup);
while ( it.current() != 0 ) {
if (it.current()->rtti()==1) {
QCheckListItem *item = static_cast<QCheckListItem *>(it.current());
item->setOn(false);
}
++it;
}
}
void AutoStartConfig::slotReload()
{
QString current = _lvStartup->currentItem()->text(4);
load();
QListViewItem *item = _lvStartup->findItem(current, 4);
if (item)
_lvStartup->setCurrentItem(item);
}
void AutoStartConfig::slotItemChecked(QCheckListItem*)
{
emit changed(true);
}
QString AutoStartConfig::quickHelp() const
{
return i18n("<h1>Service Manager</h1><p>This module allows you to have an overview of all plugins of the "
"KDE Daemon, also referred to as KDE Services. Generally, there are two types of service:</p>"
"<ul><li>Services invoked at startup</li><li>Services called on demand</li></ul>"
"<p>The latter are only listed for convenience. The startup services can be started and stopped. "
"In Administrator mode, you can also define whether services should be loaded at startup.</p>"
"<p><b> Use this with care: some services are vital for KDE; do not deactivate services if you"
" do not know what you are doing.</b></p>");
}
CheckListItem::CheckListItem(QListView *parent, const QString &text)
: QObject(parent),
QCheckListItem(parent, text, CheckBox)
{ }
void CheckListItem::stateChange(bool on)
{
QCheckListItem::stateChange(on);
emit changed(this);
}

@ -0,0 +1,56 @@
[Desktop Entry]
Encoding=UTF-8
Exec=kcmshell kcmautostart
Icon=autostart
Type=Application
X-KDE-ModuleType=Library
X-KDE-Library=autostart
X-KDE-Factoryname=autostart
X-KDE-ParentApp=kcontrol
Name=AutoStart Manager
Name[da]=Autostarthåndtering
Name[es]=Gestor de arranque automático
Name[et]=Autostardi haldur
Name[fr]=Gestion du lancement automatique
Name[it]=Gestore di avvio automatico
Name[nl]=Autostartbeheer
Name[pt]=Gestor de Arranque Automático
Name[pt_BR]=Gestor de Arranque Automático
Name[sr]=Менаџер аутоматског покретања
Name[sr@Latn]=Menadžer automatskog pokretanja
Name[ta]=தானாக துவங்கும் மேலாளர்
Name[xx]=xxAutoStart Managerxx
Comment=AutoStart Configuration
Comment[da]=Indstilling for autostart
Comment[es]=Configuración de arranque automático
Comment[et]=Autostardi seadistamine
Comment[fr]=Configuration du lancement automatique
Comment[it]=Configurazione dell'avvio automatico
Comment[nl]=Autostartconfiguratie
Comment[pt]=Configuração de Arranque Automático
Comment[pt_BR]=Configuração de Arranque Automático
Comment[ru]=Настройка служб
Comment[sr]=Подешавање аутоматског покретања
Comment[sr@Latn]=Podešavanje automatskog pokretanja
Comment[sv]=Inställning av automatisk start
Comment[ta]=தானாகவே துவங்கும் வடிவமைப்பு
Comment[xx]=xxAutoStart Configurationxx
Keywords=AutoStart,Services
Keywords[da]=AutoStart, Tjenester
Keywords[es]=Arranque automático,Servicios
Keywords[et]=AutoStart,Teenused
Keywords[fr]=Lancement automatique, Services
Keywords[it]=Avvio automatico,Servizi
Keywords[nl]=autoStart,services,diensten
Keywords[pt]=Arranque Automático,Serviços
Keywords[pt_BR]=Arranque Automático,Serviços
Keywords[ru]=AutoStart,Services,Службы,Автозапуск
Keywords[sr]=AutoStart,Services,аутоматско,покретање,сервиси
Keywords[sr@Latn]=AutoStart,Services,automatsko,pokretanje,servisi
Keywords[sv]=automatisk start,tjänster
Keywords[ta]=தானாக துவங்கும், சேவைகள்
Keywords[xx]=xxAutoStart,Servicesxx
Categories=Qt;KDE;X-KDE-settings-components;

@ -0,0 +1,66 @@
/*
This file is part of the KDE project
Copyright (C) 2004 Martijn Klingens <klingens@kde.org>
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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef KCMAUTOSTART_H
#define KCMAUTOSTART_H
#include <qlistview.h>
#include <kcmodule.h>
class KListView;
class QStringList;
class QPushButton;
class AutoStartConfig : public KCModule
{
Q_OBJECT
public:
AutoStartConfig(QWidget* parent, const char* name= 0L, const QStringList& foo = QStringList());
~AutoStartConfig() {};
void load();
void save();
void defaults();
QString quickHelp() const;
protected slots:
void slotReload();
void slotItemChecked(QCheckListItem *item);
bool autoloadEnabled(KConfig *config, const QString &filename);
void setAutoloadEnabled(KConfig *config, const QString &filename, bool b);
private:
KListView *_lvStartup;
};
class CheckListItem : public QObject, public QCheckListItem
{
Q_OBJECT
public:
CheckListItem(QListView* parent, const QString &text);
~CheckListItem() { }
signals:
void changed(QCheckListItem*);
protected:
virtual void stateChange(bool);
};
#endif // KCMAUTOSTART_H

@ -0,0 +1,149 @@
/*
* kioskConfigDialog.cpp
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "kioskConfigDialog.h"
#include <qcheckbox.h>
#include <qtextedit.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kfiledialog.h>
#include <knuminput.h>
#include <klineedit.h>
#include <klocale.h>
#include <kurlrequester.h>
#include "kioskrun.h"
#include "kioskConfigDialog_ui.h"
KioskConfigDialog::KioskConfigDialog(QWidget *parent)
: KDialogBase(parent, "KioskConfigDialog", true, i18n("Configure Kiosk Admin Tool"),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true )
{
w = new KioskConfigDialogUI(this);
w->lineProfilePrefix->setMode(KFile::Directory | KFile::LocalOnly);
w->lineUpload->setMode(KFile::Directory);
setMainWidget(w);
init();
connect(w->lineProfilePrefix, SIGNAL(textChanged( const QString& )), SLOT(updateExample()));
connect(w->lineUpload, SIGNAL(textChanged( const QString& )), SLOT(updateExample()));
connect(w->lineUploadPrefix, SIGNAL(textChanged( const QString& )), SLOT(updateExample()));
}
KioskConfigDialog::~KioskConfigDialog()
{
}
void KioskConfigDialog::init()
{
QString prefix = KioskRun::self()->getProfilePrefix();
if (prefix.isEmpty())
{
w->checkProfilePrefix->setChecked(false);
w->lineProfilePrefix->setURL("/etc/kde-profile/");
}
else
{
w->checkProfilePrefix->setChecked(true);
w->lineProfilePrefix->setURL(prefix);
}
KConfig *config = kapp->config();
config->setGroup("General");
QString uploadURL = config->readEntry("uploadURL");
if (uploadURL.isEmpty())
{
w->checkUpload->setChecked(false);
w->lineUpload->setURL("fish://root@host/");
}
else
{
w->checkUpload->setChecked(true);
w->lineUpload->setURL(uploadURL);
}
w->lineUploadPrefix->setText(config->readEntry("uploadPrefix"));
int minUID = config->readNumEntry("FirstUIDShown", 500);
if (!minUID)
{
w->checkUID->setChecked(false);
w->numUID->setValue(500);
}
else
{
w->checkUID->setChecked(true);
w->numUID->setValue(minUID);
}
updateExample();
}
void KioskConfigDialog::updateExample()
{
QString uploadPrefix = w->lineUploadPrefix->text();
QString file1 = w->lineProfilePrefix->url()+"default";
QString file2 = file1;
if (file2.startsWith(uploadPrefix))
file2 = file2.mid(uploadPrefix.length());
if (file2.startsWith("/"))
file2 = file2.mid(1);
QString url = w->lineUpload->url();
if (!url.endsWith("/"))
url += "/";
url += file2;
QString example = QString("<qt><center><b>%1</b><br>--><br><b>%2</b></center>").arg(file1, url);
w->lblUploadExample->setText(example);
w->lblUploadExample->setFixedSize(QSize(500,fontMetrics().lineSpacing()*3 + 6));
}
bool KioskConfigDialog::save()
{
QString uploadURL;
QString uploadPrefix;
QString prefix;
int minUID = 0;
uploadPrefix = w->lineUploadPrefix->text();
if (w->checkUpload->isChecked())
uploadURL = w->lineUpload->url();
if (w->checkProfilePrefix->isChecked())
prefix = w->lineProfilePrefix->url();
if (w->checkUID->isChecked())
minUID = w->numUID->value();
KConfig *config = kapp->config();
config->setGroup("General");
config->writeEntry("uploadURL", uploadURL);
config->writeEntry("uploadPrefix", uploadPrefix);
config->writeEntry("FirstUIDShown", minUID);
config->sync();
return KioskRun::self()->setProfilePrefix(prefix);
}
#include "kioskConfigDialog.moc"

@ -0,0 +1,46 @@
/*
* kioskConfigDialog.h
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _KIOSKCONFIGDIALOG_H_
#define _KIOSKCONFIGDIALOG_H_
#include <kdialogbase.h>
class KioskConfigDialogUI;
class KioskConfigDialog : public KDialogBase
{
Q_OBJECT
public:
KioskConfigDialog(QWidget *parent);
~KioskConfigDialog();
bool save();
protected slots:
void updateExample();
protected:
void init();
private:
KioskConfigDialogUI *w;
};
#endif

@ -0,0 +1,329 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>KioskConfigDialogUI</class>
<widget class="QWidget">
<property name="name">
<cstring>KioskConfigDialogUI</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>551</width>
<height>501</height>
</rect>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<property name="name">
<cstring>checkProfilePrefix</cstring>
</property>
<property name="text">
<string>Store all &amp;profiles under the same base directory</string>
</property>
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer>
<property name="name">
<cstring>spacer1</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout2</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="text">
<string>&amp;Base directory:</string>
</property>
<property name="buddy" stdset="0">
<cstring>lineProfilePrefix</cstring>
</property>
</widget>
<widget class="KURLRequester">
<property name="name">
<cstring>lineProfilePrefix</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</vbox>
</widget>
</hbox>
</widget>
<widget class="QCheckBox">
<property name="name">
<cstring>checkUpload</cstring>
</property>
<property name="text">
<string>On exit, &amp;upload profiles to remote server</string>
</property>
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout8</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer>
<property name="name">
<cstring>spacer1_2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout7</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
<property name="text">
<string>&amp;Server URL:</string>
</property>
<property name="buddy" stdset="0">
<cstring>lineUpload</cstring>
</property>
</widget>
<widget class="KURLRequester">
<property name="name">
<cstring>lineUpload</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
</widget>
<widget class="QLabel">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
<property name="text">
<string>Strip off the following directory prefix when uploading:</string>
</property>
</widget>
<widget class="KLineEdit">
<property name="name">
<cstring>lineUploadPrefix</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
</widget>
<widget class="QLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
<property name="text">
<string>Example:</string>
</property>
</widget>
<widget class="QTextEdit">
<property name="name">
<cstring>lblUploadExample</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>500</width>
<height>10</height>
</size>
</property>
<property name="vScrollBarMode">
<enum>AlwaysOff</enum>
</property>
<property name="hScrollBarMode">
<enum>AlwaysOff</enum>
</property>
<property name="text">
<string></string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</vbox>
</widget>
</hbox>
</widget>
<widget class="QCheckBox">
<property name="name">
<cstring>checkUID</cstring>
</property>
<property name="text">
<string>Do not show users with a UID lower than</string>
</property>
<property name="accel">
<string></string>
</property>
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout6</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer>
<property name="name">
<cstring>spacer1_2_2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="KIntNumInput">
<property name="name">
<cstring>numUID</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="minValue">
<number>1</number>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer4</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>60</width>
<height>20</height>
</size>
</property>
</spacer>
</hbox>
</widget>
<spacer>
<property name="name">
<cstring>spacer2</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</vbox>
</widget>
<customwidgets>
</customwidgets>
<connections>
<connection>
<sender>checkProfilePrefix</sender>
<signal>toggled(bool)</signal>
<receiver>lineProfilePrefix</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>checkUpload</sender>
<signal>toggled(bool)</signal>
<receiver>lineUpload</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>checkUID</sender>
<signal>toggled(bool)</signal>
<receiver>numUID</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>checkUpload</sender>
<signal>toggled(bool)</signal>
<receiver>lineUploadPrefix</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>checkUpload</sender>
<signal>toggled(bool)</signal>
<receiver>lblUploadExample</receiver>
<slot>setEnabled(bool)</slot>
</connection>
</connections>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
</includehints>
</UI>

@ -0,0 +1,778 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kiosk SYSTEM "kiosk.dtd">
<kiosk>
<group name="general" icon="package_settings">
<caption>General</caption>
<description>
Generic restrictions
</description>
<actions>
<action type="action restriction" key="action/kwin_rmb">
<caption>Disable Window Manager context menu (Alt-F3)</caption>
<description>
The Window Manager context menu is normally shown when Alt-F3 is pressed
or when the menu button on the window frame is pressed.
</description>
</action>
<action type="action restriction" key="action/bookmarks">
<caption>Disable Bookmarks</caption>
<description>Disable Bookmarks in all applications.</description>
</action>
<action type="action restriction" key="user/root">
<caption>Disable all tasks and applications that require root access</caption>
<description>
In multi-user
environments the users normally do not know the root password; in such a case, it
may be desirable to use this option to remove the tasks and applications
from the menus that the users cannot use.
</description>
</action>
<action type="action restriction" key="shell_access">
<caption>Disable access to a command shell</caption>
<description>
In an environment where the desktop is dedicated
to a defined set of tasks it may be desirable to disable access to a command shell to
prevent users from engaging in tasks that were not intended or authorized; hence, it is
strongly recommended to disable access to a command shell if the desktop is to act
as a public terminal.
</description>
</action>
<action type="action restriction" key="logout">
<caption>Disable Logout option</caption>
<description>
This prevents the user from logging out. To make this option
effective it is important to ensure that key-combinations to terminate the X-server,
such as Alt-Ctrl-Backspace, are disabled in the configuration of the X-server.
</description>
</action>
<action type="action restriction" key="lock_screen">
<caption>Disable Lock Screen option</caption>
<description>
When the desktop is to act as a public terminal or is to be
shared by different users it may be desirable to prevent locking of the screen to ensure that
the system remains accessible if a user leaves the terminal.
</description>
</action>
<action type="action restriction" key="run_command">
<caption>Disable "Run Command" option (Alt-F2)</caption>
<description>
The "Run Command" option can normally be used to execute arbitrary commands; however, when
access to a command shell is restricted only applications and services defined by a .desktop file
can be started this way. Disabling "Run Command" here hides the option completely.
</description>
</action>
<action type="action restriction" key="movable_toolbars">
<caption>Disable toolbar moving</caption>
<description>
Normally toolbars in applications can be moved around; when this option is chosen
all toolbars are fixed in their original positions.
</description>
</action>
<action type="action restriction" key="run_desktop_files">
<caption>Disable execution of arbitrary .desktop files.</caption>
<description>
This option defines whether users may execute .desktop files that are not
part of the system-wide desktop icons, KDE menu, registered services or
autostart services. When access to a command shell is restricted it is recommended to
to disable the execution of arbitrary .desktop files as well since such .desktop files
can be used to circumvent the command shell restriction.
</description>
</action>
<action type="action restriction" key="start_new_session">
<caption>Disable starting of a second X session.</caption>
<description>
KDM has the possibility to login a second user in parallel to the current session.
Note that this can also be configured as part of the KDM settings in which case
the setting here should be left enabled.
</description>
</action>
<action type="action restriction" key="lineedit_text_completion">
<caption>Disable input line history</caption>
<description>
If a single account is used by multiple people it may be desirable to disable
the input line history out of privacy considerations.
</description>
</action>
</actions>
</group>
<group name="kdesktop" icon="desktop">
<caption>Desktop Icons</caption>
<description>
Desktop Icons are provided by "kdesktop".
</description>
<preview binary="kdesktop" dcop="kdesktop" options="restart">
</preview>
<setup binary="kdesktop" dcop="kdesktop" options="restart">
<mutable file="kdesktoprc" />
<mutable file="kdeglobals" />
</setup>
<actions>
<action type="immutable" file="kdesktoprc">
<caption>Lock down Desktop Settings</caption>
<description>
When the desktop settings are locked down the user can no longer change how the desktop
behaves or look like. This does not affect the ability to add new files or shortcuts to the
desktop.
</description>
</action>
<action type="action restriction" key="action/kdesktop_rmb">
<caption>Disable context menus</caption>
<description>
When checked the user will no longer get any context menu. Normally the user
can get a context menu by clicking with the right mouse button.
</description>
</action>
<action type="action restriction" key="editable_desktop_icons">
<caption>Lock down all Desktop icons</caption>
<description>
When checked the user will not be able to remove or edit any existing
icon or file on the Desktop or add any new icon or file.
</description>
</action>
<!-- Not implemented yet
<action type="action restriction" key="editable_system_desktop_icons">
<caption>Lock down system wide Desktop icons</caption>
<description>
When checked the user will not be able to remove or edit any of
the system wide icons but will still be able to add, remove or edit
personal icons or files on the desktop.
</description>
</action>
-->
<action type="config" file="kdesktoprc" group="General" key="CopyDesktopLinks" default="true">
<caption>Add additional vendor specific icons</caption>
<description>
When this option is checked users will get additional icons
copied to their Desktop when they first log in. These icons
do not appear in the preview.
</description>
</action>
</actions>
</group>
<group name="background" icon="background">
<caption>Desktop Background</caption>
<description>
Set up the Desktop Background also known as Wallpaper.
</description>
<preview binary="kdesktop" dcop="kdesktop" options="restart">
</preview>
<setup binary="kcmshell" args="kde-background.desktop">
<mutable file="kdesktoprc" />
<mutable file="kdeglobals" />
</setup>
<actions>
<action type="module" key="kde-background.desktop">
<caption>Lock down Desktop Background Settings</caption>
<description>
When the desktop background settings are locked down the user can no longer change them.
</description>
<action type="immutable" file="kdesktoprc" group="Desktop0"/>
<action type="immutable" file="kdesktoprc" group="Desktop1"/>
<action type="immutable" file="kdesktoprc" group="Desktop2"/>
<action type="immutable" file="kdesktoprc" group="Desktop3"/>
<action type="immutable" file="kdesktoprc" group="Desktop4"/>
<action type="immutable" file="kdesktoprc" group="Desktop5"/>
<action type="immutable" file="kdesktoprc" group="Desktop6"/>
<action type="immutable" file="kdesktoprc" group="Desktop7"/>
</action>
</actions>
</group>
<group name="screensaver" icon="kscreensaver">
<caption>Screen Saver</caption>
<description>
Set up Screen Saver
</description>
<preview binary="kdesktop" dcop="kdesktop" options="restart">
</preview>
<setup binary="kcmshell" args="kde-screensaver.desktop">
<mutable file="kdesktoprc" />
<mutable file="kdeglobals" />
</setup>
<actions>
<action type="module" key="kde-screensaver.desktop">
<caption>Lock down Screen Saver Settings</caption>
<description>
When the Screen Saver settings are locked down the user can no longer change them.
</description>
<action type="immutable" file="kdesktoprc" group="ScreenSaver"/>
</action>
<action type="action restriction" key="opengl_screensavers">
<caption>Disable OpenGL-based Screen Savers</caption>
<description>
OpenGL-based screen savers may cause problems on systems without decent OpenGL
support; with this option all such screensavers can be disabled.
</description>
</action>
<action type="action restriction" key="manipulatescreen_screensavers">
<caption>Discreet Screen Savers Only</caption>
<description>
Some screensavers do not hide the complete screen content and may leave possible
sensitive information visible. This option disables all such screensavers and only
enables those screensavers that completely hide the original content of the screen.
</description>
</action>
</actions>
</group>
<group name="kdemenu" icon="kmenuedit">
<caption>KDE Menu</caption>
<description>
The KDE Application menu
</description>
<preview binary="kicker" dcop="kicker" options="restart">
</preview>
<setup binary="kmenuedit" options="nofork">
<ignore file="kmenueditrc" />
</setup>
<actions>
<action type="action restriction" key="user/root">
<caption>Disable all tasks and applications that require root access</caption>
<description>
This option disables all menu items that require root access and that will ask the user for the root password.
</description>
</action>
<action type="action restriction" key="action/menuedit">
<caption>Disable menu editing</caption>
<description>
This disables the menu-option to edit the KDE Application Menu. When disabled, users will no longer be
able to make changes to their personal application menu.
</description>
<action type="resource restriction" key="xdgconf-menu" />
</action>
</actions>
</group>
<group name="theming" icon="style">
<caption>Theming</caption>
<description>
Set up of Fonts, Colors and Style
</description>
<!--
<preview binary="kdesktop" dcop="kdesktop" options="restart">
</preview>
-->
<setup binary="kcmshell" args="kde-style.desktop,kde-colors.desktop,kde-fonts.desktop,kde-kwindecoration.desktop">
<mutable file="kdesktoprc" />
<mutable file="kdeglobals" />
</setup>
<actions>
<action type="module" key="kde-style.desktop">
<caption>Lock down Style Settings</caption>
<description>
When the Style settings are locked down the user can no longer change them.
</description>
</action>
<action type="module" key="kde-colors.desktop">
<caption>Lock down Color Settings</caption>
<description>
When the Color settings are locked down the user can no longer change them.
</description>
</action>
<action type="module" key="kde-fonts.desktop">
<caption>Lock down Font Settings</caption>
<description>
When the Font settings are locked down the user can no longer change them.
</description>
</action>
<action type="module" key="kde-kwindecoration.desktop">
<caption>Lock down Window Decoration Settings</caption>
<description>
When the Window Decoration settings are locked down the user can no longer change them.
</description>
</action>
</actions>
</group>
<group name="kicker" icon="kcmkicker">
<caption>Panel</caption>
<description>
The KDE panel "kicker" is normally found at the bottom of the screen.
</description>
<preview binary="kicker" dcop="kicker" options="restart">
</preview>
<setup binary="kicker" dcop="kicker" options="restart">
<mutable file="kickerrc" />
<ignore file="kdeglobals" />
</setup>
<actions>
<action type="immutable" file="kickerrc">
<caption>Lock down panel</caption>
<description>
This option can be used to lock down the panel. The user will then no longer be able to add, remove or change
any of the permanent panel items.
</description>
</action>
<action type="action restriction" key="action/kicker_rmb">
<caption>Disable Context Menus</caption>
<description>
This option disables the context menus that one normally gets when pressing the right mouse button in the panel.
</description>
</action>
</actions>
</group>
<group name="proxy" icon="proxy">
<caption>Network Proxy</caption>
<description>
Set up of Network Proxy settings
</description>
<setup binary="kcmshell" args="kde-proxy.desktop">
<mutable file="kdesktoprc" />
<mutable file="kdeglobals" />
</setup>
<actions>
<action type="module" key="kde-proxy.desktop">
<caption>Lock down Proxy Settings</caption>
<description>
When the Proxy settings are locked down the user can no longer change them.
</description>
</action>
</actions>
</group>
<group name="konqueror" icon="konqueror">
<caption>Konqueror</caption>
<description>
Konqueror is a combined web- and filebrowser.
</description>
<actions>
<action type="action restriction" key="action/properties">
<caption>Disable Properties in context menu</caption>
<description>
This option can be used to disable the &lt;i&gt;Properties&lt;/i&gt; option in the context menu for files.
</description>
</action>
<action type="action restriction" key="action/openwith">
<caption>Disable Open With action</caption>
<description>
This option can be used to disable the &lt;i&gt;Open With&lt;/i&gt; menu option.
</description>
</action>
<action type="action restriction" key="action/openintab">
<caption>Disable Open In New Tab action</caption>
<description>
This option can be used to disable the &lt;i&gt;Open In New Tab&lt;/i&gt; menu option.
</description>
</action>
<action type="custom" key="restrict_file_browsing">
<caption>Disable file-browsing outside home directory</caption>
<description>
This option can be used to prevent the user from browsing the
file system outside his or her own home directory.
</description>
</action>
</actions>
</group>
<group name="menus">
<caption>Menu Actions</caption>
<description>
Common menu actions found in applications.
</description>
<actions>
<action type="action restriction" key="action/file_new">
<caption>Disable File -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;File -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/file_open">
<caption>Disable File -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;File -&gt; %action&lt;/i&gt; menu-option from all applications.
See also &lt;i&gt;Open Recent&lt;/i&gt;
</description>
</action>
<action type="action restriction" key="action/file_open_recent">
<caption>Disable File -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;File -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/file_save">
<caption>Disable File -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;File -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/file_save_as">
<caption>Disable File -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;File -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/file_revert">
<caption>Disable File -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;File -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/file_close">
<caption>Disable File -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;File -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/file_print">
<caption>Disable File -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;File -&gt; %action&lt;/i&gt; menu-option from all applications.
See also &lt;i&gt;Print Preview&lt;/i&gt;
</description>
</action>
<action type="action restriction" key="action/file_print_preview">
<caption>Disable File -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;File -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/file_mail">
<caption>Disable File -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;File -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/file_quit">
<caption>Disable File -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;File -&gt; %action&lt;/i&gt; menu-option from all applications.
This option has been added for completeness.
Usually the application can be terminated via the window manager as well.
</description>
</action>
<action type="action restriction" key="action/edit_undo">
<caption>Disable Edit -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Edit -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/edit_redo">
<caption>Disable Edit -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Edit -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/edit_cut">
<caption>Disable Edit -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Edit -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/edit_copy">
<caption>Disable Edit -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Edit -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/edit_paste">
<caption>Disable Edit -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Edit -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/edit_select_all">
<caption>Disable Edit -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Edit -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/edit_deselect">
<caption>Disable Edit -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Edit -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/edit_find">
<caption>Disable Edit -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Edit -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/edit_find_next">
<caption>Disable Edit -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Edit -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/edit_find_last">
<caption>Disable Edit -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Edit -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/edit_replace">
<caption>Disable Edit -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Edit -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/view_actual_size">
<caption>Disable View -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;View -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/view_fit_to_page">
<caption>Disable View -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;View -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/view_fit_to_width">
<caption>Disable View -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;View -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/view_fit_to_height">
<caption>Disable View -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;View -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/view_zoom_in">
<caption>Disable View -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;View -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/view_zoom_out">
<caption>Disable View -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;View -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/view_zoom">
<caption>Disable View -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;View -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/view_redisplay">
<caption>Disable View -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;View -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/go_up">
<caption>Disable Go -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Go -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/go_back">
<caption>Disable Go -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Go -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/go_forward">
<caption>Disable Go -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Go -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/go_home">
<caption>Disable Go -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Go -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/go_previous">
<caption>Disable Go -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Go -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/go_next">
<caption>Disable Go -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Go -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/go_goto">
<caption>Disable Go -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Go -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/go_goto_page">
<caption>Disable Go -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Go -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/go_goto_line">
<caption>Disable Go -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Go -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/go_first">
<caption>Disable Go -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Go -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/go_last">
<caption>Disable Go -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Go -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/bookmarks">
<caption>Disable Bookmarks</caption>
<description>
This option can be used to completely disable bookmarks in all applications.
</description>
</action>
<action type="action restriction" key="action/bookmark_add">
<caption>Disable Bookmarks -&gt; %action</caption>
<description>
This option can be used to prevent users from creating new bookmarks.
</description>
</action>
<action type="action restriction" key="action/bookmark_edit">
<caption>Disable Bookmarks -&gt; %action</caption>
<description>
This option can be used to prevent users from editing bookmarks.
</description>
</action>
<action type="action restriction" key="action/tools_spelling">
<caption>Disable Tools -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Tools -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/options_show_menubar">
<caption>Disable Settings -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Settings -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/options_show_toolbar">
<caption>Disable Settings -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Settings -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/options_show_statusbar">
<caption>Disable Settings -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Settings -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/fullscreen">
<caption>Disable Settings -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Settings -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/options_save_options">
<caption>Disable Settings -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Settings -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/options_configure">
<caption>Disable Settings -&gt; Configure &lt;Application&gt;</caption>
<description>
This option can be used to remove the &lt;i&gt;Settings -&gt; Configure &amp;lt;Application&amp;gt;&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/options_configure_keybinding">
<caption>Disable Settings -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Settings -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/options_configure_toolbars">
<caption>Disable Settings -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Settings -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/options_configure_notifications">
<caption>Disable Settings -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Settings -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/help">
<caption>Disable Help</caption>
<description>
You can use this to completely disable the help menu
</description>
</action>
<action type="action restriction" key="action/help_contents">
<caption>Disable Help -&gt; &lt;Application&gt; Handbook</caption>
<description>
This option can be used to remove the &lt;i&gt;Help -&gt; &amp;lt;Application&amp;gt; Handbook&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/help_whats_this">
<caption>Disable Help -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Help -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/help_report_bug">
<caption>Disable Help -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Help -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/help_about_app">
<caption>Disable Help -&gt; About &lt;Application&gt;</caption>
<description>
This option can be used to remove the &lt;i&gt;Help -&gt; About &amp;lt;Application&amp;gt;&lt;/i&gt; menu-option from all applications.
</description>
</action>
<action type="action restriction" key="action/help_about_kde">
<caption>Disable Help -&gt; %action</caption>
<description>
This option can be used to remove the &lt;i&gt;Help -&gt; %action&lt;/i&gt; menu-option from all applications.
</description>
</action>
</actions>
</group>
<group name="krfb" icon="krfb">
<caption>Desktop Sharing</caption>
<description>
Remote Desktop Sharing
</description>
<setup binary="kcmshell" args="kcmkrfb">
</setup>
<actions>
<action type="immutable" file="krfbrc">
<caption>Lock down Desktop Sharing Settings</caption>
<description>
When the setting for remote desktop sharing are locked down the user can no longer change them.
</description>
</action>
</actions>
</group>
<group name="filetypes" icon="filetypes">
<caption>File Associations</caption>
<description>
Configure the applications used for opening files.
</description>
<setup binary="kcmshell" args="filetypes">
</setup>
<actions>
<action type="module" key="kde-filetypes.desktop">
<caption>Lock down File Associations Settings</caption>
<description>
When the setting for file associations are locked down the user can no longer change
the default applications used for opening files.
</description>
<action type="action restriction" key="action/editfiletype"></action>
<action type="immutable" file="profilerc"></action>
</action>
<!--
<action type="action restriction" key="action/editfiletype">
<caption>Disable "Edit file type" in properties dialog</caption>
<description>
The "Edit file type" can be used to change how files are recognized and with which
applications such files are opened.
</description>
</action>
-->
</actions>
</group>
</kiosk>

@ -0,0 +1,309 @@
/*
* kioskdata.cpp
*
* Copyright (C) 2003, 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "kioskdata.h"
#include <qdom.h>
#include <qfile.h>
#include <kaction.h>
#include <kdebug.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kstdaction.h>
QDict<QString> *ComponentAction::s_stdActionCaptions = 0;
ComponentAction::ComponentAction()
{
}
ComponentAction::~ComponentAction()
{
}
static QDict<QString> *readStdActionCaptions()
{
QDict<QString> *captions = new QDict<QString>;
for(int i = KStdAction::ActionNone; true;)
{
i++;
KAction *action = KStdAction::create((KStdAction::StdAction) i, 0, 0, 0, 0);
if (!action)
break;
QString caption = action->text();
caption.replace("&","");
captions->insert(QString::fromLatin1(action->name()), new QString(caption));
}
return captions;
}
QString
ComponentAction::expand(const QString &s)
{
if (s.contains("%action"))
{
if (!s_stdActionCaptions)
s_stdActionCaptions= readStdActionCaptions();
QString action = key;
action.replace("action/", "");
QString *caption = s_stdActionCaptions->find(action);
if (caption)
{
QString result = s;
result.replace("%action", *caption);
return result;
}
}
return s;
}
bool
ComponentAction::load(const QDomElement &docElem)
{
QString _type = docElem.attribute("type");
if (_type == "immutable")
type = ActImmutable;
else if (_type == "action restriction")
type = ActRestrict;
else if (_type == "resource restriction")
type = ActResource;
else if (_type == "module")
type = ActModule;
else if (_type == "custom")
type = ActCustom;
else if (_type == "config")
type = ActConfig;
else
{
#ifndef NDEBUG
if (_type.isEmpty())
kdFatal() << "'type' attribute missing or empty in action." << endl;
else
kdFatal() << "Unknown 'type' attribute '" << _type << "' in action." << endl;
#endif
return false;
}
file = docElem.attribute("file");
group = docElem.attribute("group");
key = docElem.attribute("key");
defaultValue = (docElem.attribute("default").lower() == "true");
QDomNode n = docElem.firstChild();
while( !n.isNull() )
{
QDomElement e = n.toElement(); // try to convert the node to an element.
if (e.tagName() == "caption")
caption = expand(i18n(e.text().simplifyWhiteSpace().utf8()));
else if (e.tagName() == "description")
description = expand(i18n(e.text().simplifyWhiteSpace().utf8()));
else if (e.tagName() == "action")
{
ComponentAction *subAction = new ComponentAction;
if (subAction->load(e))
{
subActions.append(subAction);
}
else
{
delete subAction;
}
}
n = n.nextSibling();
}
return true;
}
ComponentData::ComponentData()
{
actions.setAutoDelete(true);
}
ComponentData::~ComponentData()
{
}
bool ComponentData::loadActions(const QDomElement &docElem)
{
QDomNode n = docElem.firstChild();
while( !n.isNull() )
{
QDomElement e = n.toElement(); // try to convert the node to an element.
if (e.tagName() != "action")
return false;
ComponentAction *action = new ComponentAction;
if (action->load(e))
{
actions.append(action);
}
else
{
delete action;
}
n = n.nextSibling();
}
return true;
}
void
ComponentExecData::load(const QDomElement &e)
{
exec = e.attribute("binary");
dcop = e.attribute("dcop");
options = QStringList::split(',', e.attribute("options"));
args = QStringList::split(',', e.attribute("args"));
}
void
ComponentData::loadSetup(const QDomElement &docElem)
{
QDomNode n = docElem.firstChild();
while( !n.isNull() )
{
QDomElement e = n.toElement(); // try to convert the node to an element.
if (e.tagName() == "mutable")
{
QString f = e.attribute("file");
if (!f.isEmpty())
mutableFiles.append(f);
}
else if (e.tagName() == "ignore")
{
QString f = e.attribute("file");
if (!f.isEmpty())
ignoreFiles.append(f);
}
n = n.nextSibling();
}
}
bool ComponentData::load(const QDomElement &docElem)
{
id = docElem.attribute("name");
icon = docElem.attribute("icon");
if (id.isEmpty())
return false;
QDomNode n = docElem.firstChild();
while( !n.isNull() )
{
QDomElement e = n.toElement(); // try to convert the node to an element.
if (e.tagName() == "caption")
{
caption = i18n(e.text().simplifyWhiteSpace().utf8());
}
#if 0
else if (e.tagName() == "description")
{
description = i18n(e.text().simplifyWhiteSpace().utf8());
}
#endif
else if (e.tagName() == "actions")
{
loadActions(e);
}
else if (e.tagName() == "setup")
{
setup.load(e);
loadSetup(e);
}
else if (e.tagName() == "preview")
{
preview.load(e);
}
n = n.nextSibling();
}
return true;
}
KioskData::KioskData()
{
m_componentData.setAutoDelete(true);
}
KioskData::~KioskData()
{
}
bool KioskData::load()
{
QString filename = locate("appdata", "kiosk_data.xml");
if (filename.isEmpty())
{
m_errorMsg = i18n("<qt>Could not find <b>kiosk_data.xml</b></qt>");
return false;
}
QDomDocument doc;
QFile file( filename );
if ( !file.open( IO_ReadOnly ) )
{
m_errorMsg = i18n("<qt>Could not open <b>%1</b></qt>").arg(filename);
return false;
}
QString errorMsg;
int errorRow;
int errorCol;
if ( !doc.setContent( &file, &errorMsg, &errorRow, &errorCol ) )
{
m_errorMsg = i18n("<qt>Syntax error in <b>%1</b><br>Line %3, column %4: %2</qt>").arg(filename, errorMsg).arg(errorRow).arg(errorCol);
file.close();
return false;
}
file.close();
QDomElement docElem = doc.documentElement();
QDomNode n = docElem.firstChild();
while( !n.isNull() )
{
QDomElement e = n.toElement(); // try to convert the node to an element.
if (e.tagName() == "group")
{
ComponentData *componentData = new ComponentData;
if (componentData->load(e))
{
m_componentData.insert(componentData->id, componentData);
m_componentList.append(componentData->id);
}
else
{
delete componentData;
}
}
n = n.nextSibling();
}
return true;
}

@ -0,0 +1,105 @@
/*
* kioskdata.h
*
* Copyright (C) 2003, 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _KIOSKDATA_H_
#define _KIOSKDATA_H_
#include <qdict.h>
#include <qptrlist.h>
#include <qstringlist.h>
class QDomElement;
class ComponentAction
{
public:
ComponentAction();
~ComponentAction();
bool load(const QDomElement &docElem);
private:
QString expand(const QString &);
public:
QString caption;
QString description;
typedef enum {ActImmutable, ActRestrict, ActCustom, ActModule, ActConfig, ActResource } ActionType;
ActionType type;
QString file;
QString group;
QString key;
QPtrList<ComponentAction> subActions;
bool defaultValue;
static QDict<QString> *s_stdActionCaptions;
};
class ComponentExecData
{
public:
void load(const QDomElement &docElem);
bool hasOption(const QString &option) { return options.contains(option); }
public:
QString exec;
QString dcop;
QStringList options;
QStringList args;
};
class ComponentData
{
public:
ComponentData();
~ComponentData();
bool load(const QDomElement &docElem);
bool loadActions(const QDomElement &docElem);
protected:
void loadSetup(const QDomElement &docElem);
public:
QString id;
QString caption;
// QString description;
QString icon;
QPtrList<ComponentAction> actions;
QStringList mutableFiles;
QStringList ignoreFiles;
ComponentExecData setup;
ComponentExecData preview;
};
class KioskData
{
public:
KioskData();
~KioskData();
QString errorMsg() { return m_errorMsg; }
bool load();
public:
QStringList m_componentList;
QDict<ComponentData> m_componentData;
protected:
QString m_errorMsg;
};
#endif

@ -0,0 +1,727 @@
/*
* kioskgui.cpp
*
* Copyright (C) 2003,2004 Waldo Bastian <bastian@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License versin 2 as
* published by the Free Software Foundation.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "kioskgui.h"
#include <qdir.h>
#include <qlineedit.h>
#include <qobjectlist.h>
#include <qwidgetstack.h>
#include <qpushbutton.h>
#include <kapplication.h>
#include <kaction.h>
#include <kcombobox.h>
#include <kconfig.h>
#include <kfiledialog.h>
#include <kglobal.h>
#include <kiconloader.h>
#include <kiconview.h>
#include <klocale.h>
#include <kmenubar.h>
#include <kmessagebox.h>
#include <kstatusbar.h>
#include <kstdaccel.h>
#include <kstdaction.h>
#include <kstandarddirs.h>
#include <kurlrequester.h>
#include "mainview.h"
#include "profileSelectionPage_ui.h"
#include "profilePropsPage.h"
#include "componentSelectionPage.h"
#include "desktopComponent.h"
#include "menueditComponent.h"
#include "screensaverComponent.h"
#include "panelComponent.h"
#include "filetypeeditComponent.h"
#include "componentPage.h"
#include "pageWidget.h"
#include "userManagement.h"
#include "kioskConfigDialog.h"
#include "kioskdata.h"
#include "kioskrun.h"
#include "kiosksync.h"
KioskGui::KioskGui()
: KMainWindow( 0, "kioskgui" ), m_profileSelectionPage(0),
m_componentSelectionPage(0), m_componentPage(0), m_profileAssignPage(0),
m_profilePropsPage(0), m_data(0),
m_activePage(0), m_profile(0), m_componentData(0)
{
m_run = new KioskRun;
m_view = new MainView(this);
setupActions();
updateBackground();
// tell the KMainWindow that this is indeed the main widget
setCentralWidget(m_view);
setWidgetBackground(m_view);
m_view->setBackgroundOrigin(WindowOrigin);
createGUI();
// apply the saved mainwindow settings, if any, and ask the mainwindow
// to automatically save settings if changed: window size, toolbar
// position, icon size, etc.
setAutoSaveSettings();
m_view->pbHelp->hide(); // TODO, write help :)
connect(m_view->pbDiscard, SIGNAL(clicked()), this, SLOT(discardPage()));
connect(m_view->pbFinished, SIGNAL(clicked()), this, SLOT(finishedPage()));
KConfig *config = kapp->config();
config->setGroup("General");
m_profile = config->readEntry("CurrentProfile", "default");
m_component = config->readEntry("CurrentComponent");
selectPage(PAGE_PROFILE_SELECTION, true);
QTimer::singleShot(0, this, SLOT(slotCheckEtcSkel()));
}
KioskGui::~KioskGui()
{
delete m_data;
delete m_run;
}
void KioskGui::slotCheckEtcSkel()
{
QString etcSkel = "/etc/skel/.kde";
KioskSync skelDir;
skelDir.addDir(etcSkel, KURL());
QStringList skelFiles = skelDir.listFiles();
if (!skelFiles.isEmpty())
{
KMessageBox::informationList(this,
i18n("<qt>Your system contains KDE configuration settings in the "
"skeleton directory <b>%1</b>. These files are copied to the "
"personal KDE settings directory of newly created users.<p>"
"This may interfere with the correct operation of user profiles.<p>"
"Unless a setting has been locked down, settings that have been copied "
"to the personal KDE settings directory of a user will override "
"a default setting configured in a profile.<p>"
"<b>If this is not the intended behavior, please remove the offending "
"files from the skeleton folder on all systems that you want to "
"administer with user profiles.</b><p>"
"The following files were found under <b>%2</b>:").arg(etcSkel).arg(etcSkel),
skelFiles,
QString::null,
"etc_skel_warning");
}
}
void KioskGui::setWidgetBackground(QWidget *w)
{
QObjectList *l = w->queryList( "QWidget" );
QObjectListIt it( *l );
for(QWidget *wid=0; (wid = (QWidget*)it.current()); ++it)
{
wid->setBackgroundOrigin(WindowOrigin);
if (::qt_cast<QPushButton*>(wid))
wid->setAutoMask(true);
}
w->setBackgroundOrigin(WindowOrigin);
delete l;
}
void KioskGui::setSubCaption(const QString &subCaption)
{
m_view->subCaptionLabel->setText("<h1>"+subCaption+"</h1>");
}
void KioskGui::setupActions()
{
// KStdAction::open(this, SLOT(fileOpen()), actionCollection());
// KStdAction::save(this, SLOT(fileSave()), actionCollection());
// KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
KStdAction::quit(this, SLOT(close()), actionCollection());
// KStdAction::back(this, SLOT(previousPage()), actionCollection(), "previousPage");
// KStdAction::forward(this, SLOT(nextPage()), actionCollection(), "nextPage");
// createStandardStatusBarAction();
// setStandardToolBarMenuEnabled(true);
// KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
// KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
KStdAction::preferences(this, SLOT(slotConfig()), actionCollection());
m_uploadAction = new KAction(i18n("Upload &All Profiles"), QString::null, 0, this, SLOT(uploadAllProfiles()), actionCollection(), "upload_all");
m_backgroundAction = new KToggleAction(i18n("Background Graphics"), QString::null, 0, this, SLOT(slotUpdateBackground()), actionCollection(), "show_background");
updateActions();
}
void KioskGui::updateActions()
{
KConfig *config = kapp->config();
config->setGroup("General");
bool uploadEnabled = !config->readEntry("uploadURL").isEmpty();
m_uploadAction->setEnabled(uploadEnabled);
m_backgroundAction->setChecked(config->readBoolEntry("FancyBackground", true));
}
void KioskGui::saveProperties(KConfig * /*config*/ )
{
// the 'config' object points to the session managed
// config file. anything you write here will be available
// later when this app is restored
}
void KioskGui::readProperties(KConfig * /*config*/ )
{
// the 'config' object points to the session managed
// config file. this function is automatically called whenever
// the app is being restored. read in here whatever you wrote
// in 'saveProperties'
}
void KioskGui::slotAddProfile()
{
selectPage(PAGE_PROFILE_NEW, true);
}
void KioskGui::slotProfileProperties()
{
selectPage(PAGE_PROFILE_PROPS, true);
#if 0
savePage(PAGE_PROFILE_SELECTION);
ProfileConfigDialog dlg(this, m_profile);
if (dlg.exec())
{
loadPage(PAGE_PROFILE_SELECTION);
updateActions();
}
#endif
}
void KioskGui::slotProfileSetup()
{
selectPage(PAGE_COMPONENT_SELECTION, true);
}
void KioskGui::slotDeleteProfile(QListViewItem *item)
{
if (!m_profileSelectionPage)
return;
if (!item)
item = m_profileSelectionPage->listProfile->selectedItem();
if (!item)
return;
QString profile = item->text(0);
int result = KMessageBox::warningContinueCancel(this,
i18n("<qt>You are about to delete the profile <b>%1</b>.<p>"
"Are you sure you want to do this?").arg(profile),
QString::null, KGuiItem(i18n("Delete"),"editdelete"));
if (result == KMessageBox::Continue)
{
if (KioskRun::self()->deleteProfile(profile))
{
delete item;
item = m_profileSelectionPage->listProfile->currentItem();
if (item)
m_profileSelectionPage->listProfile->setSelected(item, true);
}
}
}
void KioskGui::slotManageUsers()
{
selectPage(PAGE_PROFILE_ASSIGN, true);
}
void KioskGui::slotProfileContextMenu(QListViewItem *item, const QPoint &p)
{
if (!item) return; // No item selected
QPopupMenu menu(this);
menu.insertItem(i18n("&Delete Profile"), 1);
int result = menu.exec( p );
if (result == 1)
slotDeleteProfile(item);
}
void KioskGui::selectPage(int page, bool save)
{
if (save && !savePage(m_activePage))
return;
m_activePage = page;
if ((m_activePage == PAGE_PROFILE_SELECTION) && !m_profileSelectionPage)
{
m_profileSelectionPage = new ProfileSelectionPageUI(this);
setWidgetBackground(m_profileSelectionPage);
connect(m_profileSelectionPage->listProfile,
SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)),
this, SLOT(slotProfileContextMenu(QListViewItem *, const QPoint &)));
connect(m_profileSelectionPage->listProfile,
SIGNAL(doubleClicked (QListViewItem *, const QPoint &, int )),
this, SLOT(nextPage()));
connect(m_profileSelectionPage->buttonDelete, SIGNAL(clicked()),
this, SLOT(slotDeleteProfile()));
connect(m_profileSelectionPage->buttonAdd, SIGNAL(clicked()),
this, SLOT(slotAddProfile()));
connect(m_profileSelectionPage->buttonProperty, SIGNAL(clicked()),
this, SLOT(slotProfileProperties()));
connect(m_profileSelectionPage->buttonSetup, SIGNAL(clicked()),
this, SLOT(slotProfileSetup()));
connect(m_profileSelectionPage->buttonUsers, SIGNAL(clicked()),
this, SLOT(slotManageUsers()));
m_view->widgetStack->addWidget(m_profileSelectionPage, PAGE_PROFILE_SELECTION);
m_profileSelectionPage->listProfile->setFocus();
}
if ((m_activePage == PAGE_COMPONENT_SELECTION) && !m_componentSelectionPage)
{
m_data = new KioskData;
if (!m_data->load())
{
KMessageBox::error(this, m_data->errorMsg(), i18n("Error accessing Kiosk data"));
}
m_componentSelectionPage = new ComponentSelectionPage(m_data, this);
connect(m_componentSelectionPage, SIGNAL(componentActivated()), this, SLOT(nextPage()));
m_componentSelectionPage->setCurrentComponent(m_component);
setWidgetBackground(m_componentSelectionPage);
m_view->widgetStack->addWidget(m_componentSelectionPage, PAGE_COMPONENT_SELECTION);
m_componentSelectionPage->listComponent->setFocus();
}
if (m_activePage == PAGE_PROFILE_NEW)
{
delete m_profilePropsPage;
m_profilePropsPage = new ProfilePropsPage(this, QString::null);
setWidgetBackground(m_profilePropsPage->widget());
m_view->widgetStack->addWidget(m_profilePropsPage->widget(), PAGE_PROFILE_NEW);
m_profilePropsPage->setFocus();
}
if (m_activePage == PAGE_PROFILE_PROPS)
{
delete m_profilePropsPage;
m_profilePropsPage = new ProfilePropsPage(this, m_profile);
setWidgetBackground(m_profilePropsPage->widget());
m_view->widgetStack->addWidget(m_profilePropsPage->widget(), PAGE_PROFILE_PROPS);
m_profilePropsPage->setFocus();
}
if ((m_activePage == PAGE_PROFILE_ASSIGN) && !m_profileAssignPage)
{
m_profileAssignPage = new UserManagementPage(this);
setWidgetBackground(m_profileAssignPage->widget());
m_view->widgetStack->addWidget(m_profileAssignPage->widget(), PAGE_PROFILE_ASSIGN);
m_profileAssignPage->setFocus();
}
if (m_activePage == PAGE_COMPONENT)
{
delete m_componentPage;
Component *component = 0;
if (m_component == "kdesktop")
component = new DesktopComponent;
else if (m_component == "kdemenu")
component = new MenuEditComponent;
else if (m_component == "screensaver")
component = new ScreenSaverComponent;
else if (m_component == "kicker")
component = new PanelComponent;
else if (m_component == "filetypes")
component = new FileTypeEditComponent;
m_componentPage = new ComponentPage(m_componentData, component, m_view->widgetStack);
setWidgetBackground(m_componentPage->widget());
m_view->widgetStack->addWidget(m_componentPage->widget(), PAGE_COMPONENT);
m_componentPage->setFocus();
}
m_view->widgetStack->raiseWidget(m_activePage);
switch (m_activePage)
{
case PAGE_PROFILE_SELECTION:
setSubCaption(i18n("Main Menu"));
setCaption(i18n("Main Menu"));
break;
case PAGE_PROFILE_NEW:
setSubCaption(i18n("Add New Profile"));
setCaption(i18n("Add New Profile"));
break;
case PAGE_PROFILE_PROPS:
setSubCaption(i18n("Profile Properties"));
setCaption(i18n("Profile Properties"));
break;
case PAGE_COMPONENT_SELECTION:
setSubCaption(i18n("Setup Profile \"%1\"").arg(m_profile));
setCaption(m_profile);
break;
case PAGE_COMPONENT:
setSubCaption(m_componentPage->subCaption());
break;
case PAGE_PROFILE_ASSIGN:
setSubCaption(i18n("Assign Profiles"));
break;
}
loadPage(m_activePage);
updateButtons();
}
void KioskGui::updateButtons()
{
switch(m_activePage)
{
case PAGE_PROFILE_SELECTION:
{
m_view->pbDiscard->hide();
m_view->pbFinished->hide();
break;
}
case PAGE_COMPONENT_SELECTION:
{
m_view->pbDiscard->hide();
m_view->pbFinished->show();
break;
}
case PAGE_COMPONENT:
{
m_view->pbDiscard->hide();
m_view->pbFinished->show();
break;
}
case PAGE_PROFILE_NEW:
{
m_view->pbDiscard->show();
m_view->pbFinished->show();
break;
}
case PAGE_PROFILE_PROPS:
{
m_view->pbDiscard->show();
m_view->pbFinished->show();
break;
}
case PAGE_PROFILE_ASSIGN:
{
m_view->pbDiscard->show();
m_view->pbFinished->show();
break;
}
}
if (m_activePage == PAGE_PROFILE_NEW)
{
m_view->pbDiscard->setText(i18n("&Cancel"));
m_view->pbFinished->setText(i18n("&Add"));
}
else
{
m_view->pbDiscard->setText(i18n("&Discard Changes"));
m_view->pbFinished->setText(i18n("&Finished"));
}
}
void KioskGui::loadProfiles()
{
m_profileSelectionPage->listProfile->clear();
QStringList profiles = KioskRun::self()->allProfiles();
for(QStringList::ConstIterator it = profiles.begin();
it != profiles.end(); ++it)
{
QString profile = *it;
QString description;
QString installUser;
QString installDir;
KioskRun::self()->getProfileInfo(profile, description, installDir, installUser);
QListViewItem *item = new QListViewItem(m_profileSelectionPage->listProfile, profile, description);
if (m_profile == profile)
m_profileSelectionPage->listProfile->setSelected(item, true);
}
if (!m_profileSelectionPage->listProfile->selectedItem())
m_profileSelectionPage->listProfile->setSelected(m_profileSelectionPage->listProfile->firstChild(), true);
}
void KioskGui::loadPage(int page)
{
switch(page)
{
case PAGE_PROFILE_SELECTION:
{
loadProfiles();
break;
}
case PAGE_COMPONENT:
{
m_componentPage->load();
break;
}
case PAGE_PROFILE_NEW:
{
m_profilePropsPage->load();
break;
}
case PAGE_PROFILE_PROPS:
{
m_profilePropsPage->load();
break;
}
case PAGE_PROFILE_ASSIGN:
{
m_profileAssignPage->load();
break;
}
}
}
bool KioskGui::savePage(int page)
{
switch(page)
{
case PAGE_PROFILE_SELECTION:
{
m_profile = m_profileSelectionPage->listProfile->selectedItem() ?
m_profileSelectionPage->listProfile->selectedItem()->text(0) : QString::null;
KConfig *config = kapp->config();
config->setGroup("General");
config->writeEntry("CurrentProfile", m_profile);
config->sync();
QString description;
QString installDir;
QString installUser;
KioskRun::self()->getProfileInfo(m_profile, description, installDir, installUser);
QStringList kdeDirs;
kdeDirs << installDir;
m_run->setKdeDirs(kdeDirs);
m_run->setUser(installUser);
break;
}
case PAGE_COMPONENT_SELECTION:
{
m_component = m_componentSelectionPage->currentComponent();
m_componentData = m_data->m_componentData.find(m_component);
if (!m_componentData)
return false;
return m_componentSelectionPage->save();
}
case PAGE_COMPONENT:
{
if (m_componentPage)
return m_componentPage->save();
}
case PAGE_PROFILE_NEW:
{
if (m_profilePropsPage)
{
m_profile = m_profilePropsPage->profile();
return m_profilePropsPage->save();
}
}
case PAGE_PROFILE_PROPS:
{
if (m_profilePropsPage)
{
m_profile = m_profilePropsPage->profile();
return m_profilePropsPage->save();
}
}
case PAGE_PROFILE_ASSIGN:
{
if (m_profileAssignPage)
return m_profileAssignPage->save();
}
}
return true;
}
void KioskGui::finishedPage(bool save)
{
if (m_activePage == PAGE_PROFILE_NEW)
selectPage(PAGE_PROFILE_SELECTION, save);
else if (m_activePage == PAGE_PROFILE_PROPS)
selectPage(PAGE_PROFILE_SELECTION, save);
else if (m_activePage == PAGE_PROFILE_ASSIGN)
selectPage(PAGE_PROFILE_SELECTION, save);
else if (m_activePage > 1)
selectPage(m_activePage - 1, save);
}
void KioskGui::discardPage()
{
finishedPage(false);
}
void KioskGui::nextPage()
{
if (m_activePage < PAGE_LAST)
selectPage(m_activePage + 1, true);
}
void KioskGui::slotConfig()
{
KioskConfigDialog dlg(this);
if (dlg.exec())
{
dlg.save();
updateActions();
}
}
bool KioskGui::queryClose()
{
if (!savePage(m_activePage))
{
int result = KMessageBox::warningContinueCancel(this,
i18n("Your changes could not be saved, do you want to quit anyway?"),
QString::null,
KStdGuiItem::quit());
if (result == KMessageBox::Continue)
return true;
return false;
}
if (m_uploadAction->isEnabled())
{
KConfig *config = kapp->config();
config->setGroup("General");
KURL uploadUrl = config->readEntry("uploadURL");
int result = KMessageBox::questionYesNo(this,
i18n("<qt>Do you want to upload the profiles to <b>%1</b> ?</qt>").arg(uploadUrl.prettyURL()));
if (result == KMessageBox::Yes)
{
uploadAllProfiles();
}
}
return true;
}
void KioskGui::uploadAllProfiles()
{
KConfig *config = kapp->config();
config->setGroup("General");
QString uploadPrefix = config->readEntry("uploadPrefix");
QString uploadURL = config->readEntry("uploadURL");
KioskSync sync(this);
QStringList profiles = KioskRun::self()->allProfiles();
for(QStringList::ConstIterator it = profiles.begin();
it != profiles.end(); ++it)
{
QString profile = *it;
QString description;
QString installUser;
QString installDir;
KioskRun::self()->getProfileInfo(profile, description, installDir, installUser);
// sync.addDir(installDir, KURL("ftp://localhost/kde/profiles"));
QString dir = installDir;
if (dir.startsWith(uploadPrefix))
dir = dir.mid(uploadPrefix.length());
if (dir.startsWith("/"))
dir = dir.mid(1);
KURL url(uploadURL);
url.setPath(url.path(1)+dir);
sync.addDir(installDir, url);
}
if (sync.sync())
{
KMessageBox::information(this, i18n("<qt>All profiles have been successfully uploaded to <b>%1</b>").arg(uploadURL));
}
}
void KioskGui::uploadCurrentProfile()
{
}
void KioskGui::slotUpdateBackground()
{
KConfig *config = kapp->config();
config->setGroup("General");
config->writeEntry("FancyBackground", m_backgroundAction->isChecked());
config->sync();
updateBackground();
}
void KioskGui::updateBackground()
{
if (m_backgroundAction->isChecked())
{
m_view->setPaletteBackgroundPixmap(locate("appdata", "background.png"));
m_view->logoLabel->setPixmap(locate("appdata", "logo.png"));
m_view->logoLabel->setMinimumSize(QSize(160,170));
QString language = KGlobal::locale()->language();
QString caption = locate("appdata", "caption-"+language+".png");
if (caption.isEmpty())
caption = locate("appdata", "caption.png");
QPixmap pm(caption);
m_view->captionLabel->setPixmap(pm);
m_view->captionLabel->setMinimumHeight(pm.height());
}
else
{
m_view->unsetPalette();
m_view->logoLabel->setPixmap(QPixmap());
m_view->logoLabel->setMinimumSize(0,0);
m_view->captionLabel->setPixmap(QPixmap());
m_view->captionLabel->setMinimumHeight(0);
}
}
#include "kioskgui.moc"

@ -0,0 +1,109 @@
/*
* kioskgui.h
*
* Copyright (C) 2003,2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _KIOSKGUI_H_
#define _KIOSKGUI_H_
#include <qlistview.h>
#include <kconfig.h>
#include <kmainwindow.h>
class MainView;
class ProfileSelectionPageUI;
class ComponentSelectionPage;
class ProfilePropsPage;
class PageWidget;
class KioskData;
class KioskRun;
class ComponentData;
class KAction;
class KToggleAction;
class KioskGui : public KMainWindow
{
Q_OBJECT
public:
enum { PAGE_PROFILE_SELECTION = 1,
PAGE_COMPONENT_SELECTION = 2,
PAGE_COMPONENT = 3,
PAGE_PROFILE_NEW = 4,
PAGE_PROFILE_PROPS = 5,
PAGE_PROFILE_ASSIGN = 6,
PAGE_LAST = PAGE_PROFILE_ASSIGN };
KioskGui();
~KioskGui();
void setupActions();
void saveProperties(KConfig *config);
void readProperties(KConfig *config);
void selectPage(int page, bool save);
void loadPage(int page);
bool savePage(int page);
void loadProfiles();
public slots:
void updateButtons();
void finishedPage(bool save=true);
void discardPage();
void nextPage();
void slotDeleteProfile(QListViewItem *item=0);
void slotAddProfile();
void slotProfileProperties();
void slotProfileSetup();
void slotManageUsers();
void slotProfileContextMenu(QListViewItem *item, const QPoint &p);
void slotConfig();
void uploadAllProfiles();
void uploadCurrentProfile();
void slotUpdateBackground();
void slotCheckEtcSkel();
protected:
void updateActions();
void updateBackground();
void setWidgetBackground(QWidget *w);
void setSubCaption(const QString &subCaption);
virtual bool queryClose();
protected:
MainView *m_view;
ProfileSelectionPageUI *m_profileSelectionPage;
ComponentSelectionPage *m_componentSelectionPage;
PageWidget *m_componentPage;
PageWidget *m_profileAssignPage;
ProfilePropsPage *m_profilePropsPage;
KioskData *m_data;
KioskRun *m_run;
int m_activePage;
QString m_profile;
QString m_component;
ComponentData * m_componentData;
KAction *m_uploadAction;
KToggleAction *m_backgroundAction;
};
#endif

File diff suppressed because it is too large Load Diff

@ -0,0 +1,229 @@
/*
* kioskrun.h
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _KIOSKRUN_H_
#define _KIOSKRUN_H_
#include <qdict.h>
#include <qobject.h>
#include <qregexp.h>
#include <qstringlist.h>
#include <qtimer.h>
#include <dcopclient.h>
#include <dcopref.h>
#include <kprogress.h>
class ImmutableStatus;
class KConfig;
class KProcess;
class KSimpleConfig;
class KioskGui;
class KioskRun : public QObject
{
friend class KioskGui;
Q_OBJECT
public:
static KioskRun* self() { return s_self; }
void setKdeDirs(const QStringList &dirs);
void setUser(const QString &user);
QString homeDir() { return m_homeDir; }
QStringList kdeDirs() { return m_kdeDirs; }
QString desktopPath() { return m_desktopPath; }
// Locate existing anywhere
QString locate(const char *resource, const QString &filename=QString::null);
// Locate for saving
QString locateSave(const char *resource, const QString &filename=QString::null);
// Locate for reading saved changed
QString locateLocal(const char *resource, const QString &filename=QString::null);
// Prepare runtime environment for run()
bool prepare();
// Update sycoca database in runtime environment
void updateSycoca();
// Request sycoca update in install environment after flushing config files
void scheduleSycocaUpdate();
// Request sycoca update in install environment
void forceSycocaUpdate();
// Run a program inside the runtime test environment
KProcess* run(const QString &cmd, const QStringList &args=QStringList());
// A DCOPRef to make dcop calls into the runtime test environment
DCOPRef dcopRef(const QCString &appId, const QCString &objId);
// A DCOPClient to make dcop calls into the runtime test environment
DCOPClient *dcopClient() { return m_dcopClient; }
// Open config file in the install directory
KConfig *configFile(const QString &filename);
// Make config files temporary mutable.
void makeMutable(bool bMutable);
// Returns whether specific config group is immutable,
// or entire file if group is empty
bool isConfigImmutable(const QString &filename, const QString &group);
// Make specific config group immutable,
// or entire file if group is empty
void setConfigImmutable(const QString &filename, const QString &group, bool bImmutable);
// Close all opened config files.
bool flushConfigCache();
// Return all config files created by the user
QStringList newConfigFiles();
// Merge new settings from the test directory into the installation directory
void mergeConfigFile(const QString &filename);
// Lookup the setting for a custom action
bool lookupCustomAction(const QString &action);
// Change the setting for a custom action
void setCustomAction(const QString &action, bool checked);
// Create installation directory and its parent dirs
bool createDir(const QString &dir);
// Install file
bool install(const QString &file, const QString &destination);
// Delete file
bool remove(const QString &destination);
// Move file or directory
bool move(const QString &source, const QString &destination, const QStringList &files);
// Delete directory in test home dir
void deleteDir(const QString &);
// Open /etc/kderc for writing
KSimpleConfig *openKderc();
// Install new /etc/kderc
bool closeKderc();
// Read information of profile @p profile
void getProfileInfo(const QString &profile, QString &description, QString &installDir, QString &installUser);
// Store information for profile @p profile
bool setProfileInfo(const QString &profile, const QString &description, const QString &installDir, const QString &installUser, bool b=false, bool deleteFiles=true);
// Get new, non-existing, profile name
QString newProfile();
// Delete profile @p profile
bool deleteProfile(const QString &profile, bool deleteFiles = true);
// Get list of all existing profiles
QStringList allProfiles();
// Maps a single group or user to a one or more profiles
typedef QMap<QString,QStringList> ProfileMapping;
// Read mappings between groups/users and profiles
void getUserProfileMappings( ProfileMapping &groups, ProfileMapping &users, QStringList &groupOrder);
// Store mappings between groups/users and profiles
bool setUserProfileMappings( const ProfileMapping &groups, const ProfileMapping &users, const QStringList &groupOrder);
// Read profile prefix
QString getProfilePrefix();
// Store profile prefix
bool setProfilePrefix(const QString &prefix);
// Create upload directory
bool createRemoteDir(const KURL &dir);
// Create upload directory and all its parent dirs and be polite if ask = true
bool createRemoteDirRecursive(const KURL &dir, bool ask);
// Upload file
bool uploadRemote(const QString &file, const KURL &dest);
protected:
KioskRun( QObject* parent = 0, const char* name = 0);
~KioskRun();
bool setupRuntimeEnv();
void shutdownRuntimeEnv();
void setupConfigEnv();
void shutdownConfigEnv();
void applyEnvironment(KProcess *p);
QString saveImmutableStatus(const QString &filename);
bool restoreImmutableStatus(const QString &filename, bool force);
void setCustomRestrictionFileBrowsing(bool restrict);
private:
static KioskRun* s_self;
QString m_homeDir;
QString m_configDir;
QString m_desktopPath;
QString m_user;
QStringList m_kdeDirs;
QStringList m_xdgDataDirs;
QStringList m_xdgConfigDirs;
DCOPClient *m_dcopClient;
KInstance *m_instance;
KInstance *m_saveInstance;
QDict<KConfig> m_saveConfigCache;
QDict<ImmutableStatus> m_immutableStatusCache;
bool m_noRestrictions;
bool m_forceSycocaUpdate;
bool m_isRoot;
QString m_kderc;
QString m_localKderc;
KSimpleConfig *m_localKdercConfig;
};
class KioskRunProgressDialog : public KProgressDialog
{
Q_OBJECT
public:
KioskRunProgressDialog(QWidget *parent, const char *name,
const QString &caption, const QString &text);
public slots:
void slotProgress();
void slotFinished();
private:
QTimer m_timer;
int m_timeStep;
};
#endif

@ -0,0 +1,211 @@
/*
* kiosksync.cpp
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "kiosksync.h"
#include <qdir.h>
#include <qwidget.h>
#include <kdebug.h>
#include <klocale.h>
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
KioskSync::KioskSync( QWidget* parent, const char* name)
: QObject(parent, name),
m_parent(parent)
{
}
KioskSync::~KioskSync()
{
}
void
KioskSync::addDir(const QString &_src, const KURL &dest)
{
QString src = _src;
if (!src.endsWith("/"))
src.append("/");
m_syncDirs.append(SyncDir(src, dest));
}
bool
KioskSync::sync(bool incremental)
{
m_incremental = incremental;
m_timestamps = new KSimpleConfig(locateLocal("appdata", "profile-data"));
bool canceled = false;
for(SyncDirList::ConstIterator it = m_syncDirs.begin();
it != m_syncDirs.end(); ++it)
{
m_changedFiles.clear();
m_changedDirs.clear();
m_timestamps->setGroup((*it).src);
if (!KioskRun::self()->createRemoteDirRecursive((*it).dest, true))
{
canceled = true;
break;
}
scanChangedFiles((*it).src, QString::null);
for(QStringList::ConstIterator it2 = m_changedDirs.begin();
it2 != m_changedDirs.end(); ++it2)
{
KURL dest = (*it).dest;
dest.setPath(dest.path(1) + *it2);
if (!KioskRun::self()->createRemoteDir(dest))
{
canceled = true;
break;
}
}
if (canceled)
break;
for(QStringList::ConstIterator it2 = m_changedFiles.begin();
it2 != m_changedFiles.end(); ++it2)
{
KURL dest = (*it).dest;
dest.setPath(dest.path(1) + *it2);
if (!syncFile((*it).src, *it2, dest))
{
canceled = true;
break;
}
}
if (canceled)
break;
}
delete m_timestamps;
m_changedFiles.clear();
m_changedDirs.clear();
return !canceled;
}
QStringList
KioskSync::listFiles()
{
m_changedFiles.clear();
m_changedDirs.clear();
m_incremental = false;
m_timestamps = 0;
for(SyncDirList::ConstIterator it = m_syncDirs.begin();
it != m_syncDirs.end(); ++it)
{
scanChangedFiles((*it).src, QString::null);
}
return m_changedFiles;
}
void
KioskSync::addChangedDir(const QString &dir)
{
if (dir.isEmpty())
return;
if (m_changedDirs.contains(dir))
return;
int i = dir.findRev('/', -2);
if (i != -1)
{
QString parentDir = dir.left(i+1);
addChangedDir(parentDir);
}
kdDebug() << "KioskSync: Adding " << dir << endl;
m_changedDirs.append(dir);
}
void
KioskSync::scanChangedFiles(const QString &_dir, const QString &prefix)
{
kdDebug() << "KioskSync: Scanning " << _dir << endl;
QDir dir(_dir);
if (!dir.exists())
{
emit warning(i18n("Directory <b>%1</b> does not exist.").arg(_dir));
return;
}
if (!dir.isReadable())
{
emit warning(i18n("Directory <b>%1</b> is not readable.").arg(_dir));
return;
}
QStringList subDirs;
const QFileInfoList *list = dir.entryInfoList(QDir::Dirs | QDir::Files | QDir::NoSymLinks);
bool dirtyDir = false;
QFileInfoListIterator it( *list );
for ( QFileInfo *fi; (fi = it.current()) != 0; ++it)
{
if (fi->isDir())
{
QString subDir = fi->fileName();
if ((subDir != ".") && (subDir != ".."))
subDirs.append(subDir+"/");
continue;
}
// TODO: Check file
QString file = prefix + fi->fileName();
QDateTime lastModified = fi->lastModified();
if (!m_incremental || !m_timestamps->hasKey(file) ||
(m_timestamps->readDateTimeEntry(file) != lastModified))
{
dirtyDir = true;
m_changedFiles.append(file);
}
}
if (dirtyDir)
addChangedDir(prefix);
for( QStringList::ConstIterator it = subDirs.begin();
it != subDirs.end(); ++it)
{
QString subDir = *it;
scanChangedFiles(_dir + subDir, prefix + subDir);
}
}
bool
KioskSync::syncFile(const QString &prefix, const QString &file, const KURL &dest)
{
kdDebug() << "KioskSync: Syncing [" << prefix << "]" << file << " --> " << dest.prettyURL() << endl;
if (!KioskRun::self()->uploadRemote(prefix+file, dest))
return false;
QFileInfo fi(prefix+file);
m_timestamps->writeEntry(file, fi.lastModified());
return true;
}
#include "kiosksync.moc"

@ -0,0 +1,80 @@
/*
* kiosksync.h
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _KIOSKSYNC_H_
#define _KIOSKSYNC_H_
#include <qobject.h>
#include <qstringlist.h>
#include <kurl.h>
#include "kioskrun.h"
class QWidget;
class KSimpleConfig;
class KioskSync : public QObject
{
Q_OBJECT
public:
KioskSync( QWidget* parent = 0, const char* name = 0);
~KioskSync();
void addDir(const QString &src, const KURL &dest);
bool sync(bool incremental = false);
// Returns all files found in the directories
QStringList listFiles();
signals:
void finished();
void status(const QString &);
void warning(const QString &);
protected:
void scanChangedFiles(const QString &_dir, const QString &prefix);
bool syncFile(const QString &prefix, const QString &file, const KURL &dest);
void addChangedDir(const QString &dir);
private:
struct SyncDir
{
SyncDir()
{ }
SyncDir(const QString &_src, const KURL &_dest) : src(_src), dest(_dest)
{ }
SyncDir(const SyncDir &dir) : src(dir.src), dest(dir.dest)
{ }
QString src;
KURL dest;
};
typedef QValueList<SyncDir> SyncDirList;
SyncDirList m_syncDirs;
QWidget *m_parent;
KSimpleConfig *m_timestamps;
QStringList m_changedFiles;
QStringList m_changedDirs;
bool m_incremental;
};
#endif

@ -0,0 +1,184 @@
/*
* kiosktool-kdedirs.cpp
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License versin 2 as
* published by the Free Software Foundation.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <config.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <pwd.h>
#include <grp.h>
#include <qfile.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <kglobal.h>
#include <klocale.h>
#include <kinstance.h>
#include <kshell.h>
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
static const char *description = I18N_NOOP("A tool to set $KDEDIRS according to the current user profile.");
static QString readEnvPath(const char *env)
{
QCString c_path = getenv(env);
if (c_path.isEmpty())
return QString::null;
return QFile::decodeName(c_path);
}
static QStringList lookupProfiles(const QString &mapFile)
{
QStringList profiles;
if (mapFile.isEmpty() || !QFile::exists(mapFile))
{
profiles << "default";
return profiles;
}
struct passwd *pw = getpwuid(geteuid());
if (!pw)
{
profiles << "default";
return profiles; // Not good
}
QCString user = pw->pw_name;
gid_t sup_gids[512];
int sup_gids_nr = getgroups(512, sup_gids);
KSimpleConfig mapCfg(mapFile, true);
mapCfg.setGroup("Users");
if (mapCfg.hasKey(user.data()))
{
profiles = mapCfg.readListEntry(user.data());
return profiles;
}
mapCfg.setGroup("General");
QStringList groups = mapCfg.readListEntry("groups");
mapCfg.setGroup("Groups");
for( QStringList::ConstIterator it = groups.begin();
it != groups.end(); ++it )
{
QCString grp = (*it).utf8();
// Check if user is in this group
struct group *grp_ent = getgrnam(grp);
if (!grp_ent) continue;
gid_t gid = grp_ent->gr_gid;
if (pw->pw_gid == gid)
{
// User is in this group --> add profiles
profiles += mapCfg.readListEntry(*it);
}
else
{
for(int i = 0; i < sup_gids_nr; i++)
{
if (sup_gids[i] == gid)
{
// User is in this group --> add profiles
profiles += mapCfg.readListEntry(*it);
break;
}
}
}
}
if (profiles.isEmpty())
profiles << "default";
return profiles;
}
static KCmdLineOptions options[] = {
{ "check", I18N_NOOP("Output currently active prefixes"), 0 },
KCmdLineLastOption
};
int main(int argc, char **argv)
{
KLocale::setMainCatalogue("kiosktool");
KAboutData about("kiosktool-kdedirs", "kiosktool-kdedirs", "1.0", description, KAboutData::License_GPL, "(C) 2004 Waldo Bastian");
KCmdLineArgs::init( argc, argv, &about);
KCmdLineArgs::addCmdLineOptions(options);
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
KInstance a("kiosktool-kdedirs");
if (args->isSet("check"))
{
(void) KGlobal::config(); // Force config file processing
QString dirs = KGlobal::dirs()->kfsstnd_prefixes();
printf("%s\n", QFile::encodeName(dirs).data());
return 0;
}
QStringList kdedirList;
// begin KDEDIRS
QString kdedirs = readEnvPath("KDEDIRS");
if (!kdedirs.isEmpty())
{
kdedirList = QStringList::split(":", kdedirs);
}
else
{
QString kdedir = readEnvPath("KDEDIR");
if (!kdedir.isEmpty())
{
kdedir = KShell::tildeExpand(kdedir);
kdedirList.append(kdedir);
}
}
KConfig *config = KGlobal::config();
config->setGroup("Directories");
QString userMapFile = config->readEntry("userProfileMapFile");
QString profileDirsPrefix = config->readEntry("profileDirsPrefix");
if (!profileDirsPrefix.isEmpty() && !profileDirsPrefix.endsWith("/"))
profileDirsPrefix.append('/');
QStringList profiles = lookupProfiles(userMapFile);
while(!profiles.isEmpty())
{
QString profile = profiles.back();
config->setGroup(QString::fromLatin1("Directories-%1").arg(profile));
profiles.pop_back();
QStringList list = config->readListEntry("prefixes");
for (QStringList::ConstIterator it = list.begin(); it != list.end(); it++)
{
kdedirList.prepend(*it);
}
if (list.isEmpty() && !profile.isEmpty() && !profileDirsPrefix.isEmpty())
{
kdedirList.prepend(profileDirsPrefix + profile);
}
}
printf("%s\n", QFile::encodeName(kdedirList.join(":")).data());
return 0;
}

@ -0,0 +1,28 @@
[Desktop Entry]
Encoding=UTF-8
Type=Application
Exec=kiosktool
Icon=kiosktool
DocPath=kioskgui/index.html
X-KDE-StartupNotify=true
Name=Kiosk Admin Tool
Name[bs]=Kiosk administratorski alat
Name[da]=Kiosk Admin-værktøj
Name[es]=Herramienta de administración de Quiosco
Name[et]=Kioski haldur
Name[fr]=Outil d'administration Kiosk
Name[it]=Strumento di amministrazione Kiosk
Name[nl]=Kiosk Administratieprogramma
Name[pt]=Ferramenta de Administração do Quiosque
Name[pt_BR]=Ferramenta de administração Kiosh
Name[sr]=Kiosk, администраторски алат
Name[sr@Latn]=Kiosk, administratorski alat
Name[sv]=Kiosk-administreringsverktyg
Name[ta]=Kiosk மேலாளர கருவி
Name[tr]=Kiosk Yönetim Aracı
Name[xx]=xxKiosk Admin Toolxx
X-KDE-AuthorizeAction=user/root
X-DCOP-ServiceType=None
Categories=Qt;KDE;System;

@ -0,0 +1,13 @@
<?xml version="1.0"?>
<!DOCTYPE gui SYSTEM "kpartgui.dtd">
<gui name="kioskgui" version="3">
<MenuBar>
<Menu name="file">
<Action name="upload_all"/>
</Menu>
<Menu name="settings">
<Action name="show_background" append="show_merge"/>
</Menu>
</MenuBar>
</gui>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

@ -0,0 +1,80 @@
/*
* main.cpp
*
* Copyright (C) 2003,2004 Waldo Bastian <bastian@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License versin 2 as
* published by the Free Software Foundation.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "kioskgui.h"
#include <dcopclient.h>
#include <qfile.h>
#include <kaboutdata.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kdeversion.h>
#include <klocale.h>
#include <kmessagebox.h>
static const char *description =
I18N_NOOP("KIOSK Admin Tool");
static const char *version = "1.0";
#ifndef KDERC
#define KDERC "/etc/kderc"
#endif
static const KCmdLineOptions options[] =
{
{ "kderc <file>", I18N_NOOP("kderc file to save settings to"), KDERC },
KCmdLineLastOption
};
int main(int argc, char *argv[])
{
KAboutData aboutData( "kiosktool", I18N_NOOP("KIOSK Admin Tool"),
version, description, KAboutData::License_GPL_V2,
"(c) 2003,2004 Waldo Bastian");
aboutData.addAuthor("Waldo Bastian",I18N_NOOP("Author"), "bastian@kde.org");
KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions( options );
KApplication a;
KioskGui *w = new KioskGui();
a.setMainWidget(w);
w->show();
bool versionOk;
if (QFile::exists("/etc/SuSE-release"))
versionOk = KDE::version() >= KDE_MAKE_VERSION(3,2,1);
else
versionOk = KDE::version() >= KDE_MAKE_VERSION(3,2,2);
if (!versionOk)
{
KMessageBox::information(w, i18n("<qt>KIOSK Admin Tool requires KDE 3.2.2 or later!<p>"
"With older versions you may experience problems with"
"the <i>Setup</i> functionality of the various components."));
}
kapp->exec();
return 0;
}

@ -0,0 +1,258 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>MainView</class>
<widget class="QWidget">
<property name="name">
<cstring>MainView</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>573</width>
<height>526</height>
</rect>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<widget class="QLabel" row="0" column="2" rowspan="1" colspan="3">
<property name="name">
<cstring>captionLabel</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>70</height>
</size>
</property>
<property name="frameShape">
<enum>NoFrame</enum>
</property>
<property name="frameShadow">
<enum>Plain</enum>
</property>
</widget>
<widget class="QLabel" row="0" column="0" rowspan="2" colspan="2">
<property name="name">
<cstring>logoLabel</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>160</width>
<height>170</height>
</size>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLabel" row="1" column="2">
<property name="name">
<cstring>subCaptionLabel</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>NoFrame</enum>
</property>
<property name="frameShadow">
<enum>Plain</enum>
</property>
<property name="alignment">
<set>AlignCenter</set>
</property>
</widget>
<spacer row="2" column="0">
<property name="name">
<cstring>spacer5</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>25</width>
<height>20</height>
</size>
</property>
</spacer>
<spacer row="2" column="4">
<property name="name">
<cstring>spacer5_2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>25</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QLayoutWidget" row="2" column="1" rowspan="1" colspan="3">
<property name="name">
<cstring>layout4</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QWidgetStack">
<property name="name">
<cstring>widgetStack</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<widget class="QWidget">
<property name="name">
<cstring>WStackPage</cstring>
</property>
<attribute name="id">
<number>0</number>
</attribute>
</widget>
</widget>
<widget class="QFrame">
<property name="name">
<cstring>frame3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>NoFrame</enum>
</property>
<property name="frameShadow">
<enum>Raised</enum>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QPushButton">
<property name="name">
<cstring>pbHelp</cstring>
</property>
<property name="text">
<string>&amp;Help</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer1</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QPushButton">
<property name="name">
<cstring>pbDiscard</cstring>
</property>
<property name="text">
<string>&amp;Discard Changes</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QPushButton">
<property name="name">
<cstring>pbFinished</cstring>
</property>
<property name="text">
<string>&amp;Finished</string>
</property>
</widget>
</hbox>
</widget>
</vbox>
</widget>
<spacer row="1" column="3" rowspan="1" colspan="2">
<property name="name">
<cstring>spacer3</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>160</width>
<height>20</height>
</size>
</property>
</spacer>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -0,0 +1,241 @@
/*
* menueditComponent.cpp
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "menueditComponent.h"
#include <qdir.h>
#include <qdom.h>
#include <qfileinfo.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kmimetype.h>
#include <kprocess.h>
#include <ksavefile.h>
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
#include <kurl.h>
#include "kioskrun.h"
#include "kiosksync.h"
MenuEditComponent::MenuEditComponent( QObject *parent)
: Component(parent)
{
}
MenuEditComponent::~MenuEditComponent()
{
}
void
MenuEditComponent::slotSetupPrepare()
{
(void) KioskRun::self()->locateLocal("xdgconf-menu", "applications-kmenuedit.menu"); // Create dir
}
void
MenuEditComponent::slotSetupStarted()
{
}
static QDomDocument loadDoc(const QString &fileName)
{
QDomDocument doc;
QFile file( fileName );
if ( !file.open( IO_ReadOnly ) )
{
kdWarning() << "Could not open " << fileName << endl;
return doc;
}
QString errorMsg;
int errorRow;
int errorCol;
if ( !doc.setContent( &file, &errorMsg, &errorRow, &errorCol ) ) {
kdWarning() << "Parse error in " << fileName << ", line " << errorRow << ", col " << errorCol << ": " << errorMsg << endl;
file.close();
return doc;
}
file.close();
return doc;
}
static bool saveDoc(const QString &fileName, QDomDocument doc)
{
KSaveFile saveFile(fileName);
QTextStream *stream = saveFile.textStream();
if (!stream)
{
kdWarning() << "Could not write " << fileName << endl;
return false;
}
(*stream) << doc.toString();
if (!saveFile.close())
{
kdWarning() << "Could not write " << fileName << endl;
return false;
}
return true;
}
bool
MenuEditComponent::setupFinished()
{
bool result;
QString menuEditFile = KioskRun::self()->locateLocal("xdgconf-menu", "applications-kmenuedit.menu");
QString menuFile = KioskRun::self()->locate("xdgconf-menu", "applications.menu");
QString menuFileSave = KioskRun::self()->locateSave("xdgconf-menu", "applications.menu");
kdDebug() << "MenuEditComponent: menuEditFile = " << menuEditFile << endl;
kdDebug() << "MenuEditComponent: menuFile = " << menuFile << endl;
kdDebug() << "MenuEditComponent: menuFileSave = " << menuFileSave << endl;
QDomDocument docChanges = loadDoc(menuEditFile);
if (docChanges.isNull())
{
kdDebug() << "No menu changes." << endl;
return true;
}
QDomDocument doc = loadDoc(menuFile);
if (doc.isNull())
{
kdWarning() << "Can't find menu file!" << endl;
return true;
}
QDomElement docElem = doc.documentElement();
QDomNode n = docElem.firstChild();
QDomNode next;
for(; !n.isNull(); n = next )
{
QDomElement e = n.toElement(); // try to convert the node to an element.
next = n.nextSibling();
if ((e.tagName() == "MergeFile") && (e.text() == "applications-kmenuedit.menu"))
break;
}
QDomNode insertionPoint = n;
if (insertionPoint.isNull())
{
kdWarning() << "Application menu fails to include applications-kmenuedit.menu" << endl;
return false;
}
QDomElement docChangesElem = docChanges.documentElement();
n = docChangesElem.firstChild();
for(; !n.isNull(); n = next )
{
QDomElement e = n.toElement(); // try to convert the node to an element.
next = n.nextSibling();
docElem.insertBefore(n, insertionPoint);
}
KTempFile tempFile;
tempFile.close();
saveDoc(tempFile.name(), doc);
result = KioskRun::self()->install(tempFile.name(), menuFileSave);
if (!result) return false;
// Install .desktop files
{
QString legacyApplications = KioskRun::self()->locateLocal("apps", QString::null);
QString legacySaveApplications = KioskRun::self()->locateSave("apps", QString::null);
KioskSync legacyDir(kapp->mainWidget());
legacyDir.addDir(legacyApplications, KURL());
QStringList newLegacyApplications = legacyDir.listFiles();
for(QStringList::ConstIterator it = newLegacyApplications.begin();
it != newLegacyApplications.end(); ++it)
{
if ((*it).endsWith(".desktop") || (*it).endsWith(".kdelnk") || (*it).endsWith(".directory"))
{
kdDebug() << "MenueditComponent: New legacy file %s" << (legacyApplications+(*it)) << endl;
result = KioskRun::self()->install(legacyApplications+(*it), legacySaveApplications+(*it));
if (!result) return false;
}
}
}
// Install .desktop files
{
QString xdgApplications = KioskRun::self()->locateLocal("xdgdata-apps", QString::null);
QString xdgSaveApplications = KioskRun::self()->locateSave("xdgdata-apps", QString::null);
QDir dir(xdgApplications);
QStringList newXdgApplications = dir.entryList(QDir::All, QDir::Unsorted);
newXdgApplications.remove(".");
newXdgApplications.remove("..");
for(QStringList::ConstIterator it = newXdgApplications.begin();
it != newXdgApplications.end(); ++it)
{
if ((*it).endsWith(".desktop") || (*it).endsWith(".kdelnk"))
{
kdDebug() << "MenueditComponent: New .desktop file %s" << (xdgApplications+(*it)) << endl;
result = KioskRun::self()->install(xdgApplications+(*it), xdgSaveApplications+(*it));
if (!result) return false;
}
}
}
// Install .directory files
{
QString xdgDirectories = KioskRun::self()->locateLocal("xdgdata-dirs", QString::null);
QString xdgSaveDirectories = KioskRun::self()->locateSave("xdgdata-dirs", QString::null);
QDir dir(xdgDirectories);
QStringList newXdgDirectories = dir.entryList(QDir::All, QDir::Unsorted);
newXdgDirectories.remove(".");
newXdgDirectories.remove("..");
for(QStringList::ConstIterator it = newXdgDirectories.begin();
it != newXdgDirectories.end(); ++it)
{
if ((*it).endsWith(".directory"))
{
kdDebug() << "MenueditComponent: New .directory file %s" << (xdgDirectories+(*it)) << endl;
result = KioskRun::self()->install(xdgDirectories+(*it), xdgSaveDirectories+(*it));
if (!result) return false;
}
}
}
KioskRun::self()->forceSycocaUpdate();
return true;
}
void
MenuEditComponent::slotPreviewStarted()
{
KioskRun::self()->dcopRef("kicker", "kicker").call("showKMenu");
}
#include "menueditComponent.moc"

@ -0,0 +1,43 @@
/*
* menueditComponent.h
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _MENUEDITCOMPONENT_H_
#define _MENUEDITCOMPONENT_H_
#include "component.h"
#include <qstringlist.h>
#include <qtimer.h>
class MenuEditComponent: public Component
{
Q_OBJECT
public:
MenuEditComponent( QObject *parent = 0);
virtual ~MenuEditComponent();
virtual bool setupFinished();
public slots:
virtual void slotSetupPrepare();
virtual void slotSetupStarted();
virtual void slotPreviewStarted();
};
#endif

@ -0,0 +1,210 @@
/*
* pageWidget.cpp
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "pageWidget.h"
#include <kconfig.h>
#include <klistview.h>
#include "kioskdata.h"
#include "kioskrun.h"
ComponentActionItem::ComponentActionItem( QListView * parent, ComponentAction *action, int index)
: QCheckListItem(parent, action->caption, QCheckListItem::CheckBox),
m_action(action), m_index(index)
{
}
int ComponentActionItem::compare ( QListViewItem * i, int, bool ) const
{
ComponentActionItem *cai = static_cast<ComponentActionItem*>(i);
if (m_index == cai->m_index)
return 0;
if (m_index < cai->m_index)
return -1;
return 1;
}
PageWidget::PageWidget(QWidget *me)
{
m_widget = me;
}
PageWidget::~PageWidget()
{
}
void
PageWidget::fillActionList(KListView *listView, ComponentData *componentData)
{
int index = 0;
for(ComponentAction *action = componentData->actions.first(); action;
action = componentData->actions.next())
{
ComponentActionItem *item = new ComponentActionItem(listView, action, index++);
if (index == 1)
item->setSelected(true);
if (action->type == ComponentAction::ActRestrict)
{
QString file = action->file;
if (file.isEmpty())
file = "kdeglobals";
KConfig *cfg = KioskRun::self()->configFile(file);
cfg->setGroup("KDE Action Restrictions");
bool restricted = !cfg->readBoolEntry(action->key, true);
item->setOn(restricted);
}
else if (action->type == ComponentAction::ActResource)
{
QString file = action->file;
if (file.isEmpty())
file = "kdeglobals";
KConfig *cfg = KioskRun::self()->configFile(file);
cfg->setGroup("KDE Resource Restrictions");
bool restricted = !cfg->readBoolEntry(action->key, true);
item->setOn(restricted);
}
else if (action->type == ComponentAction::ActModule)
{
QString file = "kdeglobals";
KConfig *cfg = KioskRun::self()->configFile(file);
cfg->setGroup("KDE Control Module Restrictions");
bool restricted = !cfg->readBoolEntry(action->key, true);
item->setOn(restricted);
}
else if (action->type == ComponentAction::ActImmutable)
{
QString file = action->file;
if (file.isEmpty())
file = "kdeglobals";
QString group = action->group;
bool immutable = KioskRun::self()->isConfigImmutable(file, group);
qWarning("File = %s Group = %s Immutable = %s", file.latin1(), group.latin1(), immutable ? "true" : "false");
item->setOn(immutable);
}
else if (action->type == ComponentAction::ActCustom)
{
bool checked = KioskRun::self()->lookupCustomAction(action->key);
item->setOn(checked);
}
else if (action->type == ComponentAction::ActConfig)
{
QString file = action->file;
if (file.isEmpty())
file = "kdeglobals";
KConfig *cfg = KioskRun::self()->configFile(file);
cfg->setGroup(action->group);
bool checked = cfg->readBoolEntry(action->key, action->defaultValue);
item->setOn(checked);
}
}
KioskRun::self()->flushConfigCache();
}
void
PageWidget::saveActionListItem(ComponentAction *action, bool b)
{
if (action->type == ComponentAction::ActRestrict)
{
QString file = action->file;
if (file.isEmpty())
file = "kdeglobals";
KConfig *cfg = KioskRun::self()->configFile(file);
cfg->setGroup("KDE Action Restrictions");
bool allowed = !b; // reverse logic
if (cfg->readBoolEntry(action->key, true) != allowed)
{
cfg->writeEntry(action->key, allowed);
KioskRun::self()->scheduleSycocaUpdate();
}
}
else if (action->type == ComponentAction::ActResource)
{
QString file = action->file;
if (file.isEmpty())
file = "kdeglobals";
KConfig *cfg = KioskRun::self()->configFile(file);
cfg->setGroup("KDE Resource Restrictions");
bool allowed = !b; // reverse logic
if (cfg->readBoolEntry(action->key, true) != allowed)
{
cfg->writeEntry(action->key, allowed);
KioskRun::self()->scheduleSycocaUpdate();
}
}
else if (action->type == ComponentAction::ActModule)
{
QString file = "kdeglobals";
KConfig *cfg = KioskRun::self()->configFile(file);
cfg->setGroup("KDE Control Module Restrictions");
bool allowed = !b; // reverse logic
if (cfg->readBoolEntry(action->key, true) != allowed)
{
cfg->writeEntry(action->key, allowed);
KioskRun::self()->scheduleSycocaUpdate();
}
}
else if (action->type == ComponentAction::ActImmutable)
{
QString file = action->file;
if (file.isEmpty())
file = "kdeglobals";
QString group = action->group;
KioskRun::self()->setConfigImmutable(file, group, b);
}
else if (action->type == ComponentAction::ActCustom)
{
KioskRun::self()->setCustomAction(action->key, b);
}
else if (action->type == ComponentAction::ActConfig)
{
QString file = action->file;
if (file.isEmpty())
file = "kdeglobals";
KConfig *cfg = KioskRun::self()->configFile(file);
cfg->setGroup(action->group);
if (cfg->readBoolEntry(action->key, action->defaultValue) != b)
{
cfg->writeEntry(action->key, b);
KioskRun::self()->scheduleSycocaUpdate();
}
}
for(ComponentAction *subAction = action->subActions.first();
subAction; subAction = action->subActions.next())
{
saveActionListItem(subAction, b);
}
}
bool
PageWidget::saveActionListChanges(KListView *listView)
{
for(ComponentActionItem *item = static_cast<ComponentActionItem*>(listView->firstChild());
item; item = static_cast<ComponentActionItem*>(item->nextSibling()))
{
saveActionListItem(item->action(), item->isOn());
}
return KioskRun::self()->flushConfigCache();
}

@ -0,0 +1,67 @@
/*
* pageWidget.h
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _PAGEWIDGET_H_
#define _PAGEWIDGET_H_
#include <klistview.h>
class ComponentAction;
class ComponentData;
class ComponentActionItem : public QCheckListItem
{
public:
ComponentActionItem( QListView * parent, ComponentAction *action, int index);
ComponentAction *action() const { return m_action; }
virtual int compare ( QListViewItem * i, int col, bool ascending ) const;
private:
ComponentAction *m_action;
int m_index;
};
class PageWidget
{
public:
PageWidget(QWidget *me);
virtual ~PageWidget();
QWidget *widget() const { return m_widget; }
void fillActionList(KListView *listView, ComponentData *componentData);
bool saveActionListChanges(KListView *listView);
virtual void load() = 0;
virtual bool save() = 0;
virtual void setFocus() = 0;
virtual QString subCaption() = 0;
protected:
void saveActionListItem(ComponentAction *action, bool b);
private:
QWidget *m_widget;
};
#endif

@ -0,0 +1,83 @@
/*
* panelComponent.cpp
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "panelComponent.h"
#include <qdir.h>
#include <qfileinfo.h>
#include <kdebug.h>
#include <kmimetype.h>
#include <kprocess.h>
#include <ksavefile.h>
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
#include <kurl.h>
#include "kioskrun.h"
PanelComponent::PanelComponent( QObject *parent)
: Component(parent)
{
}
PanelComponent::~PanelComponent()
{
}
void
PanelComponent::slotSetupPrepare()
{
}
void
PanelComponent::slotSetupStarted()
{
}
bool
PanelComponent::setupFinished()
{
bool result;
// Install .desktop files
{
QString kickerApplications = KioskRun::self()->locateLocal("data", "kicker/");
QString kickerSaveApplications = KioskRun::self()->locateSave("data", "kicker/");
QDir dir(kickerApplications);
QStringList newKickerApplications = dir.entryList(QDir::All, QDir::Unsorted);
newKickerApplications.remove(".");
newKickerApplications.remove("..");
for(QStringList::ConstIterator it = newKickerApplications.begin();
it != newKickerApplications.end(); ++it)
{
if ((*it).endsWith(".desktop"))
{
kdDebug() << "PanelComponent: New .desktop file = " << (kickerApplications+(*it)) << endl;
result = KioskRun::self()->install(kickerApplications+(*it), kickerSaveApplications+(*it));
if (!result) return false;
}
}
}
return true;
}
#include "panelComponent.moc"

@ -0,0 +1,42 @@
/*
* panelComponent.h
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _PANELCOMPONENT_H_
#define _PANELCOMPONENT_H_
#include "component.h"
#include <qstringlist.h>
#include <qtimer.h>
class PanelComponent: public Component
{
Q_OBJECT
public:
PanelComponent( QObject *parent = 0);
virtual ~PanelComponent();
virtual bool setupFinished();
public slots:
virtual void slotSetupPrepare();
virtual void slotSetupStarted();
};
#endif

@ -0,0 +1,234 @@
/*
* profilePropsPage.cpp
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "profilePropsPage.h"
#include <qcombobox.h>
#include <qvalidator.h>
#include <kapplication.h>
#include <kconfig.h>
#include <klineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kurlrequester.h>
#include <kuser.h>
#include "kioskrun.h"
#include "kiosksync.h"
static QStringList userList()
{
KUser thisUser;
QStringList result;
result << thisUser.loginName();
result << "root";
KConfig *config = kapp->config();
config->setGroup("General");
result += config->readListEntry("PreviousUsers");
result.sort();
// Remove dupes
QStringList::Iterator nextIt = result.begin();
for(QStringList::Iterator it = result.begin();
it != result.end(); it = nextIt)
{
nextIt = it;
nextIt++;
if ((nextIt != result.end()) && ((*it) == (*nextIt)))
result.remove(it);
}
return result;
}
ProfilePropsPage::ProfilePropsPage(QWidget *parent, const QString &profile)
: ProfilePropsPageUI(parent), PageWidget(this), m_profile(profile)
{
}
ProfilePropsPage::~ProfilePropsPage()
{
}
void ProfilePropsPage::slotProfileNameChanged()
{
QString profile = editProfileName->text();
if (m_fixedProfileDir)
{
QString profilePrefix = KioskRun::self()->getProfilePrefix();
QString installDir = profilePrefix+profile+"/";
labelInstallDir->setText(installDir);
}
// TODO: enableButtonOK(!profile.isEmpty());
}
void ProfilePropsPage::load()
{
bool bNewProfile = false;
if (m_profile.isEmpty())
{
m_profile = KioskRun::self()->newProfile();
bNewProfile = true;
}
QString profilePrefix = KioskRun::self()->getProfilePrefix();
m_fixedProfileDir = !profilePrefix.isEmpty();
connect(editProfileName, SIGNAL(textChanged(const QString&)),
this, SLOT(slotProfileNameChanged()));
#if 0
connect(kurlInstallDir, SIGNAL(textChanged(const QString&)),
this, SLOT(updateButtons()));
#endif
comboUser->setEditable(true);
comboUser->insertStringList(userList());
QRegExp rx( "[^/ :]*" );
QValidator* validator = new QRegExpValidator( rx, this );
editProfileName->setValidator(validator);
editProfileName->setFocus();
QString description;
QString installDir;
QString installUser;
KioskRun::self()->getProfileInfo(m_profile, description, installDir, installUser);
if (!bNewProfile)
{
m_origProfile = m_profile;
m_origInstallDir = installDir;
}
editProfileName->setText(m_profile);
editDescription->setText(description);
if (m_fixedProfileDir)
{
delete kurlInstallDir;
labelInstallDir->setReadOnly(true);
labelInstallDir->setText(installDir);
setTabOrder(editDescription, comboUser);
setTabOrder(comboUser, labelInstallDir);
}
else
{
delete labelInstallDir;
kurlInstallDir->setMode(KFile::Directory);
kurlInstallDir->setURL(installDir);
setTabOrder(editDescription, comboUser);
setTabOrder(comboUser, kurlInstallDir);
}
comboUser->setCurrentText(installUser);
}
bool ProfilePropsPage::save()
{
QString user = comboUser->currentText();
KUser userInfo(user);
if (!userInfo.isValid())
{
KMessageBox::sorry(this,
i18n("<qt>The user <b>%1</b> is not an existing user.</qt>").arg(user));
comboUser->setFocus();
return false;
}
m_profile = editProfileName->text();
QString description = editDescription->text();
QString installDir;
if (m_fixedProfileDir)
{
installDir = labelInstallDir->text();
}
else
{
installDir = kurlInstallDir->url();
}
if (!installDir.endsWith("/"))
installDir.append("/");
if (!m_origInstallDir.isEmpty() && (installDir != m_origInstallDir))
{
KioskSync origInstallDir;
origInstallDir.addDir(m_origInstallDir, KURL());
QStringList fileList = origInstallDir.listFiles();
fileList.remove(".kdeprofile");
if (!fileList.isEmpty())
{
int msgResult = KMessageBox::warningContinueCancelList(this,
i18n("<qt>The directory for this profile has changed "
"from <b>%1</b> to <b>%2</b>.<p>"
"The following files under <b>%3</b> will be moved to <b>%4</b>")
.arg(m_origInstallDir, installDir, m_origInstallDir, installDir),
fileList,
i18n("Profile Directory Changed"));
if (msgResult != KMessageBox::Continue)
return false;
}
KioskRun::self()->setUser(user);
if (!KioskRun::self()->move(m_origInstallDir, installDir, fileList))
return false;
if (QDir(m_origInstallDir).exists())
{
if (!KioskRun::self()->remove(m_origInstallDir))
return false;
}
}
QString installUser = user;
bool result = KioskRun::self()->setProfileInfo( m_profile, description, installDir, installUser);
if (result && !m_origProfile.isEmpty() && (m_origProfile != m_profile))
{
result = KioskRun::self()->deleteProfile( m_origProfile, false );
}
// Store this user for easy access later
KConfig *config = kapp->config();
config->setGroup("General");
QStringList previousUsers= config->readListEntry("PreviousUsers");
if (!previousUsers.contains(user))
{
previousUsers << user;
config->writeEntry("PreviousUsers", previousUsers);
config->sync();
}
return result;
}
void ProfilePropsPage::setFocus()
{
editProfileName->setFocus();
}
QString ProfilePropsPage::subCaption()
{
return QString::null;
}
#include "profilePropsPage.moc"

@ -0,0 +1,51 @@
/*
* profilePropsPage.h
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _PROFILEPROPSPAGE_H_
#define _PROFILEPROPSPAGE_H_
#include "profilePropsPage_ui.h"
#include "pageWidget.h"
class ProfilePropsPage : public ProfilePropsPageUI, public PageWidget
{
Q_OBJECT
public:
ProfilePropsPage(QWidget *parent, const QString &profile);
~ProfilePropsPage();
virtual void load();
virtual bool save();
virtual void setFocus();
virtual QString subCaption();
QString profile() { return m_profile; }
protected slots:
void slotProfileNameChanged();
private:
QString m_profile;
bool m_fixedProfileDir;
QString m_origProfile;
QString m_origInstallDir;
};
#endif

@ -0,0 +1,255 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>ProfilePropsPageUI</class>
<widget class="QWidget">
<property name="name">
<cstring>Page2</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>721</width>
<height>543</height>
</rect>
</property>
<property name="backgroundOrigin">
<enum>WindowOrigin</enum>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer row="0" column="2">
<property name="name">
<cstring>spacer2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
<spacer row="0" column="0">
<property name="name">
<cstring>spacer1</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>60</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QFrame" row="0" column="1">
<property name="name">
<cstring>frame3</cstring>
</property>
<property name="backgroundOrigin">
<enum>WindowOrigin</enum>
</property>
<property name="frameShape">
<enum>NoFrame</enum>
</property>
<property name="frameShadow">
<enum>Raised</enum>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
<property name="backgroundOrigin">
<enum>WindowOrigin</enum>
</property>
<property name="text">
<string>&amp;Profile name:</string>
</property>
<property name="buddy" stdset="0">
<cstring>editProfileName</cstring>
</property>
</widget>
<widget class="KLineEdit">
<property name="name">
<cstring>editProfileName</cstring>
</property>
<property name="minimumSize">
<size>
<width>400</width>
<height>0</height>
</size>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer5_2</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QLabel">
<property name="name">
<cstring>textLabel3</cstring>
</property>
<property name="backgroundOrigin">
<enum>WindowOrigin</enum>
</property>
<property name="text">
<string>Short &amp;description:</string>
</property>
<property name="buddy" stdset="0">
<cstring>editDescription</cstring>
</property>
</widget>
<widget class="KLineEdit">
<property name="name">
<cstring>editDescription</cstring>
</property>
<property name="minimumSize">
<size>
<width>400</width>
<height>0</height>
</size>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer5_2_2_3</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QLabel">
<property name="name">
<cstring>textLabel4_2</cstring>
</property>
<property name="backgroundOrigin">
<enum>WindowOrigin</enum>
</property>
<property name="text">
<string>&amp;Files in this profile will be owned by:</string>
</property>
<property name="buddy" stdset="0">
<cstring>kurlInstallDir</cstring>
</property>
</widget>
<widget class="QComboBox">
<property name="name">
<cstring>comboUser</cstring>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer5_2_2_2</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QLabel">
<property name="name">
<cstring>textLabel4</cstring>
</property>
<property name="backgroundOrigin">
<enum>WindowOrigin</enum>
</property>
<property name="text">
<string>&amp;Directory for this profile:</string>
</property>
<property name="buddy" stdset="0">
<cstring>kurlInstallDir</cstring>
</property>
</widget>
<widget class="KURLRequester">
<property name="name">
<cstring>kurlInstallDir</cstring>
</property>
<property name="minimumSize">
<size>
<width>400</width>
<height>0</height>
</size>
</property>
<property name="backgroundOrigin">
<enum>WindowOrigin</enum>
</property>
</widget>
<widget class="KLineEdit">
<property name="name">
<cstring>labelInstallDir</cstring>
</property>
</widget>
</vbox>
</widget>
<spacer row="1" column="1">
<property name="name">
<cstring>spacer5</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>30</height>
</size>
</property>
</spacer>
</grid>
</widget>
<customwidgets>
</customwidgets>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcombobox.h</includehint>
<includehint>kpushbutton.h</includehint>
<includehint>klineedit.h</includehint>
</includehints>
</UI>

@ -0,0 +1,230 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ProfileSelectionPageUI</class>
<widget class="QWidget">
<property name="name">
<cstring>Page1</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>656</width>
<height>362</height>
</rect>
</property>
<property name="backgroundOrigin">
<enum>WindowOrigin</enum>
</property>
<property name="caption">
<string>Page1</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer row="4" column="1">
<property name="name">
<cstring>spacer5</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="KListView" row="2" column="1" rowspan="2" colspan="1">
<column>
<property name="text">
<string>Profile</string>
</property>
<property name="clickable">
<bool>true</bool>
</property>
<property name="resizable">
<bool>true</bool>
</property>
</column>
<column>
<property name="text">
<string>Description</string>
</property>
<property name="clickable">
<bool>true</bool>
</property>
<property name="resizable">
<bool>true</bool>
</property>
</column>
<property name="name">
<cstring>listProfile</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>220</height>
</size>
</property>
<property name="backgroundOrigin">
<enum>WindowOrigin</enum>
</property>
<property name="allColumnsShowFocus">
<bool>true</bool>
</property>
<property name="fullWidth">
<bool>true</bool>
</property>
</widget>
<spacer row="3" column="2">
<property name="name">
<cstring>spacer2_2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QLayoutWidget" row="2" column="3" rowspan="2" colspan="1">
<property name="name">
<cstring>layout3</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QPushButton">
<property name="name">
<cstring>buttonAdd</cstring>
</property>
<property name="text">
<string>Add &amp;New Profile</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer5_2</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
<widget class="QPushButton">
<property name="name">
<cstring>buttonSetup</cstring>
</property>
<property name="text">
<string>&amp;Setup Profile</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer5_2_3</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
<widget class="QPushButton">
<property name="name">
<cstring>buttonUsers</cstring>
</property>
<property name="text">
<string>&amp;Assign Profiles</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer6_2</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>MinimumExpanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
<widget class="QPushButton">
<property name="name">
<cstring>buttonProperty</cstring>
</property>
<property name="text">
<string>&amp;Profile Properties</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer6</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
<widget class="QPushButton">
<property name="name">
<cstring>buttonDelete</cstring>
</property>
<property name="text">
<string>&amp;Delete Profile</string>
</property>
</widget>
</vbox>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -0,0 +1,41 @@
/*
* screensaverComponent.cpp
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "screensaverComponent.h"
#include "kioskrun.h"
ScreenSaverComponent::ScreenSaverComponent( QObject *parent)
: Component(parent)
{
qWarning("ScreenSaverComponent::ScreenSaverComponent");
connect(&m_timer, SIGNAL(timeout()), this, SLOT(slotPreviewStarted()));
}
ScreenSaverComponent::~ScreenSaverComponent()
{
}
void
ScreenSaverComponent::slotPreviewStarted()
{
KioskRun::self()->dcopRef("kdesktop", "KScreensaverIface").call("save");
}
#include "screensaverComponent.moc"

@ -0,0 +1,41 @@
/*
* screensaverComponent.h
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _SCREENSAVERCOMPONENT_H_
#define _SCREENSAVERCOMPONENT_H_
#include "component.h"
#include <qtimer.h>
class ScreenSaverComponent: public Component
{
Q_OBJECT
public:
ScreenSaverComponent( QObject *parent = 0);
virtual ~ScreenSaverComponent();
public slots:
virtual void slotPreviewStarted();
private:
QTimer m_timer;
};
#endif

@ -0,0 +1,306 @@
/*
* userManagement.cpp
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "userManagement.h"
#include <unistd.h>
#include <grp.h>
#include <pwd.h>
#include <sys/types.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <kapplication.h>
#include <kconfig.h>
#include <klistview.h>
#include <klocale.h>
#include <kmessagebox.h>
#include "kioskrun.h"
#include "userManagement_ui.h"
#include "userManagementGroup_ui.h"
#include "userManagementUser_ui.h"
#define AVAILABLE_SINCE "KDE 3.2.3"
UserManagementPage::UserManagementPage(QWidget* parent, const char* name, WFlags fl)
: UserManagementUI(parent, name, fl), PageWidget(this)
{
setCaption(i18n("Assign Profiles"));
listGroups->setSorting(-1); // Disable sorting
listGroups->setDragEnabled(true);
listGroups->setAcceptDrops(true);
// actionButton(KDialogBase::Ok)->setFocus();
connect(buttonAddGroup, SIGNAL(clicked()), this, SLOT(slotAddGroup()));
connect(buttonDeleteGroup, SIGNAL(clicked()), this, SLOT(slotDeleteGroup()));
connect(buttonAddUser, SIGNAL(clicked()), this, SLOT(slotAddUser()));
connect(buttonDeleteUser, SIGNAL(clicked()), this, SLOT(slotDeleteUser()));
connect(listGroups, SIGNAL(selectionChanged()), this, SLOT(slotUpdateButtons()));
connect(listUsers, SIGNAL(selectionChanged()), this, SLOT(slotUpdateButtons()));
// init();
static bool firstTime = true;
if (firstTime)
{
firstTime = false;
QTimer::singleShot(0, this, SLOT(slotShowNotice()));
}
}
UserManagementPage::~UserManagementPage()
{
}
void UserManagementPage::slotShowNotice()
{
KMessageBox::information(this,
i18n("<qt>The profiles that you define here are automatically applied when the "
"user logs in to %1 or newer.<p>"
"If you want to use these profiles in combination with older versions you need "
"to manually set the $KDEDIRS environment variable from the <b>startkde</b> "
"script by adding the following line:<br><br>"
"<i>export KDEDIRS=$(kiosktool-kdedirs)</i><br><br>").arg(AVAILABLE_SINCE),
i18n("Attention"), "user-profiles");
}
void UserManagementPage::load()
{
listGroups->clear();
listUsers->clear();
m_allProfiles = KioskRun::self()->allProfiles();
m_allProfiles.sort();
KioskRun::ProfileMapping groups;
KioskRun::ProfileMapping users;
QStringList groupOrder;
KioskRun::self()->getUserProfileMappings(groups, users, groupOrder);
for ( QStringList::ConstIterator it = groupOrder.begin();
it != groupOrder.end(); ++it )
{
QString group = *it;
QString profile = groups[group].join(",");
new QListViewItem(listGroups, group, profile);
}
for ( KioskRun::ProfileMapping::Iterator it = users.begin();
it != users.end(); ++it )
{
QString user = it.key();
QString profile = it.data().join(",");
new QListViewItem(listUsers, user, profile);
}
slotUpdateButtons();
}
void UserManagementPage::slotUpdateButtons()
{
buttonDeleteGroup->setEnabled(listGroups->selectedItem() != 0);
buttonDeleteUser->setEnabled(listUsers->selectedItem() != 0);
}
bool UserManagementPage::save()
{
KioskRun::ProfileMapping groups;
KioskRun::ProfileMapping users;
QStringList groupOrder;
QListViewItem *item = listGroups->firstChild();
for(; item; item = item->nextSibling())
{
QString group = item->text(0);
QStringList profiles = QStringList::split(",", item->text(1));
groups.insert(group, profiles);
groupOrder.prepend(group);
}
item = listUsers->firstChild();
for(; item; item = item->nextSibling())
{
QString user = item->text(0);
QStringList profiles = QStringList::split(",", item->text(1));
users.insert(user, profiles);
}
return KioskRun::self()->setUserProfileMappings(groups, users, groupOrder);
}
void UserManagementPage::slotAddGroup()
{
KConfig *config = kapp->config();
config->setGroup("General");
QStringList groupBlacklist = config->readListEntry("GroupBlacklist");
m_allGroups.clear();
setgrent();
for (struct group *grp; (grp = getgrent()); )
{
QString group = QString::fromUtf8(grp->gr_name);
if (!groupBlacklist.contains(group))
m_allGroups.append(group);
}
endgrent();
m_allGroups.sort();
KDialogBase dlg(this, "addGroup", true, i18n("Add Group Policy"),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true );
UserManagementGroupUI *wid = new UserManagementGroupUI(&dlg);
wid->labelCaption->setFixedSize(wid->labelCaption->sizeHint());
wid->comboGroup->insertStringList(m_allGroups);
wid->comboProfile->insertStringList(m_allProfiles);
wid->setFixedSize(wid->sizeHint());
dlg.setMainWidget(wid);
dlg.setFixedSize(dlg.sizeHint());
while (dlg.exec() == KDialogBase::Accepted)
{
QString group = wid->comboGroup->currentText();
QString profile = wid->comboProfile->currentText();
// Check for dupes
QListViewItem *item = listGroups->firstChild();
for( ;item; item = item->nextSibling())
{
if (item->text(0) == group)
break;
}
if (item)
{
int result = KMessageBox::warningContinueCancel(this,
i18n("<qt>You already have a profile defined for group <b>%1</b>. "
"Do you want to replace it?</qt>").arg(group),
i18n("Duplicate Warning"),
i18n("&Replace"));
if (result != KMessageBox::Continue)
continue; // Go back to edit dialog
delete item;
}
item = new QListViewItem(listGroups, group, profile);
listGroups->setSelected(item, true);
slotUpdateButtons();
return;
}
}
void UserManagementPage::slotDeleteGroup()
{
QListViewItem *item = listGroups->selectedItem();
if (!item)
return;
delete item;
item = listGroups->currentItem();
if (item)
listGroups->setSelected(item, true);
slotUpdateButtons();
}
void UserManagementPage::slotAddUser()
{
KConfig *config = kapp->config();
config->setGroup("General");
int minUID = config->readNumEntry("FirstUIDShown", 500);
m_allUsers.clear();
setpwent();
for (struct passwd *user; (user = getpwent()); )
{
if ((user->pw_uid >= (uid_t) minUID) || (user->pw_uid == 0))
m_allUsers.append(QString::fromUtf8(user->pw_name));
}
endpwent();
m_allUsers.sort();
KDialogBase dlg(this, "addUser", true, i18n("Add User Policy"),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true );
UserManagementUserUI *wid = new UserManagementUserUI(&dlg);
wid->labelCaption->setFixedSize(wid->labelCaption->sizeHint());
wid->comboUser->insertStringList(m_allUsers);
wid->comboProfile->insertStringList(m_allProfiles);
wid->setFixedSize(wid->sizeHint());
dlg.setMainWidget(wid);
dlg.setFixedSize(dlg.sizeHint());
while (dlg.exec() == KDialogBase::Accepted)
{
QString user = wid->comboUser->currentText();
QString profile = wid->comboProfile->currentText();
// Check for dupes
QListViewItem *item = listUsers->firstChild();
for( ;item; item = item->nextSibling())
{
if (item->text(0) == user)
break;
}
if (item)
{
int result = KMessageBox::warningContinueCancel(this,
i18n("<qt>You already have a profile defined for user <b>%1</b>. "
"Do you want to replace it?</<qt>").arg(user),
i18n("Duplicate Warning"),
i18n("&Replace"));
if (result != KMessageBox::Continue)
continue; // Go back to edit dialog
delete item;
}
item = new QListViewItem(listUsers, user, profile);
listUsers->setSelected(item, true);
slotUpdateButtons();
return;
}
}
void UserManagementPage::slotDeleteUser()
{
QListViewItem *item = listUsers->selectedItem();
if (!item)
return;
delete item;
item = listUsers->currentItem();
if (item)
listUsers->setSelected(item, true);
slotUpdateButtons();
}
void UserManagementPage::setFocus()
{
// TODO
}
QString UserManagementPage::subCaption()
{
return i18n("Assign Profiles");
}
#include "userManagement.moc"

@ -0,0 +1,60 @@
/*
* userManagement.h
*
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
*
* 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.
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _USERMANAGEMENT_H_
#define _USERMANAGEMENT_H_
#include "pageWidget.h"
#include "userManagement_ui.h"
class UserManagementUI;
class UserManagementPage : public UserManagementUI, public PageWidget
{
Q_OBJECT
public:
UserManagementPage(QWidget* parent, const char* name = 0, WFlags fl = 0);
~UserManagementPage();
virtual void load();
virtual bool save();
virtual void setFocus();
virtual QString subCaption();
protected:
void init();
private slots:
void slotAddGroup();
void slotDeleteGroup();
void slotAddUser();
void slotDeleteUser();
void slotUpdateButtons();
void slotShowNotice();
private:
UserManagementUI *w;
QStringList m_allUsers;
QStringList m_allGroups;
QStringList m_allProfiles;
};
#endif

@ -0,0 +1,117 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>UserManagementGroupUI</class>
<widget class="QWidget">
<property name="name">
<cstring>UserManagementGroupUI</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>402</width>
<height>92</height>
</rect>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>labelCaption</cstring>
</property>
<property name="text">
<string>Select the profile to use for all users in the specified group.</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer3</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>labelGroup</cstring>
</property>
<property name="text">
<string>Group:</string>
</property>
</widget>
<widget class="QComboBox">
<property name="name">
<cstring>comboGroup</cstring>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer1</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QLabel">
<property name="name">
<cstring>labelProfile</cstring>
</property>
<property name="text">
<string>Profile:</string>
</property>
</widget>
<widget class="QComboBox">
<property name="name">
<cstring>comboProfile</cstring>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>51</width>
<height>20</height>
</size>
</property>
</spacer>
</hbox>
</widget>
</vbox>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -0,0 +1,117 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>UserManagementUserUI</class>
<widget class="QWidget">
<property name="name">
<cstring>UserManagementUserUI</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>402</width>
<height>92</height>
</rect>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>labelCaption</cstring>
</property>
<property name="text">
<string>Select the profile to use for the specified user.</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer3</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>labelUser</cstring>
</property>
<property name="text">
<string>User:</string>
</property>
</widget>
<widget class="QComboBox">
<property name="name">
<cstring>comboUser</cstring>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer1</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QLabel">
<property name="name">
<cstring>labelProfile</cstring>
</property>
<property name="text">
<string>Profile:</string>
</property>
</widget>
<widget class="QComboBox">
<property name="name">
<cstring>comboProfile</cstring>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>51</width>
<height>20</height>
</size>
</property>
</spacer>
</hbox>
</widget>
</vbox>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -0,0 +1,278 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>UserManagementUI</class>
<widget class="QWidget">
<property name="name">
<cstring>UserManagementUI</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>659</height>
</rect>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QGroupBox">
<property name="name">
<cstring>groupBox3</cstring>
</property>
<property name="title">
<string>Default Policy</string>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Profile used for users with no assigned profile:</string>
</property>
</widget>
<widget class="KLineEdit">
<property name="name">
<cstring>kLineEdit1</cstring>
</property>
<property name="text">
<string>default</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</vbox>
</widget>
<widget class="QGroupBox">
<property name="name">
<cstring>groupBox1</cstring>
</property>
<property name="title">
<string>Group Policies</string>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="KListView">
<column>
<property name="text">
<string>Group</string>
</property>
<property name="clickable">
<bool>true</bool>
</property>
<property name="resizable">
<bool>true</bool>
</property>
</column>
<column>
<property name="text">
<string>Profile</string>
</property>
<property name="clickable">
<bool>true</bool>
</property>
<property name="resizable">
<bool>true</bool>
</property>
</column>
<property name="name">
<cstring>listGroups</cstring>
</property>
<property name="minimumSize">
<size>
<width>350</width>
<height>0</height>
</size>
</property>
<property name="allColumnsShowFocus">
<bool>true</bool>
</property>
<property name="fullWidth">
<bool>true</bool>
</property>
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout1</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QPushButton">
<property name="name">
<cstring>buttonAddGroup</cstring>
</property>
<property name="text">
<string>&amp;Add Group Policy...</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer2</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QPushButton">
<property name="name">
<cstring>buttonDeleteGroup</cstring>
</property>
<property name="text">
<string>&amp;Delete Group Policy</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer1</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>31</height>
</size>
</property>
</spacer>
</vbox>
</widget>
</hbox>
</widget>
<widget class="QGroupBox">
<property name="name">
<cstring>groupBox2</cstring>
</property>
<property name="title">
<string>Individual User Policies</string>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="KListView">
<column>
<property name="text">
<string>User</string>
</property>
<property name="clickable">
<bool>true</bool>
</property>
<property name="resizable">
<bool>true</bool>
</property>
</column>
<column>
<property name="text">
<string>Profile</string>
</property>
<property name="clickable">
<bool>true</bool>
</property>
<property name="resizable">
<bool>true</bool>
</property>
</column>
<property name="name">
<cstring>listUsers</cstring>
</property>
<property name="allColumnsShowFocus">
<bool>true</bool>
</property>
<property name="fullWidth">
<bool>true</bool>
</property>
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout1_2</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QPushButton">
<property name="name">
<cstring>buttonAddUser</cstring>
</property>
<property name="text">
<string>&amp;Add User Policy...</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer2_2</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QPushButton">
<property name="name">
<cstring>buttonDeleteUser</cstring>
</property>
<property name="text">
<string>&amp;Delete User Policy</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer1_2</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>31</height>
</size>
</property>
</spacer>
</vbox>
</widget>
</hbox>
</widget>
</vbox>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -0,0 +1 @@
SUBDIRS = $(AUTODIRS)

@ -0,0 +1,3 @@
KDE_LANG = bg
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = br
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = ca
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = cs
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = cy
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = da
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = de
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = en_GB
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = es
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = et
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = fr
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = ga
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = is
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = it
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = lt
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = mt
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = nl
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = pt
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = pt_BR
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = ro
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = ru
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = sr
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = sr@Latn
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = sv
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = ta
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = tr
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
KDE_LANG = xx
SUBDIRS = $(AUTODIRS)
POFILES = AUTO

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
doc
kiosktool
po
Loading…
Cancel
Save