git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kde-systemsettings@1089234 283d02a7-25f6-0310-bc7c-ecb5cbfe19dav3.5.13-sru
commit
686c40f4da
@ -0,0 +1 @@
|
||||
Benjamin Charles Meyer < ben + systempreferences at meyerhome dot net >
|
@ -0,0 +1,21 @@
|
||||
project(playground-base)
|
||||
|
||||
find_package(KDE4 REQUIRED)
|
||||
include (KDE4Defaults)
|
||||
include(MacroOptionalAddSubdirectory)
|
||||
|
||||
# search packages used by KDE
|
||||
#find_package (KDE4)
|
||||
#include(KDE4Defaults)
|
||||
#include(MacroLibrary)
|
||||
|
||||
#add_subdirectory( qrdf )
|
||||
#add_subdirectory( raptor )
|
||||
# needs Qt 3.x
|
||||
#add_subdirectory( kbfx_plasma )
|
||||
|
||||
#add_subdirectory( plasma )
|
||||
macro_optional_add_subdirectory( plasmagik )
|
||||
macro_optional_add_subdirectory( systemsettings )
|
||||
|
||||
#add_subdirectory( strigiplasmoid )
|
@ -0,0 +1,22 @@
|
||||
Index of software in kdeplayground-base
|
||||
=======================================
|
||||
|
||||
Please add software to this index. Each entry should include the
|
||||
following entries:
|
||||
* Name:, which is the directory name
|
||||
* Synopsis:, which is a short description of what it does
|
||||
* Notes:, for key usage / applicability information (optional)
|
||||
* See also:, for cross references to other KDE apps/modules (optional)
|
||||
* URL:, for web links to required software or a home page (optional)
|
||||
|
||||
Entries should be entirely objective.
|
||||
|
||||
Name: datasources
|
||||
Synopsis: ODBC configuration tool.
|
||||
Notes: Requires unixODBC libraries
|
||||
|
||||
Name: sessionapplet
|
||||
Synopsis: A kicker applet for management of X sessions.
|
||||
|
||||
Name: raptor
|
||||
Synopsis: Raptor is a Application Utility Menu for KDE4
|
@ -0,0 +1,167 @@
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes a while. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
4. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Operation Controls
|
||||
==================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made.
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
|
@ -0,0 +1,5 @@
|
||||
/** @mainpage Playground
|
||||
*
|
||||
* The playground is a place to put new and immature and
|
||||
* flaky apps, to develop them to maturity.
|
||||
*/
|
@ -0,0 +1,22 @@
|
||||
## (C) 1997 Stephan Kulow
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
DISTCLEANFILES = inst-apps
|
||||
|
||||
install-data-local:
|
||||
@echo ""
|
||||
@echo ""
|
||||
@echo "*************** Important *************************"
|
||||
@echo ""
|
||||
@echo "This module contains unreleased software."
|
||||
@echo ""
|
||||
@echo "The software may compile and work, but it may just"
|
||||
@echo "as well neither compile nor work."
|
||||
@echo ""
|
||||
@echo "****************************************************"
|
||||
@echo ""
|
||||
|
||||
include admin/deps.am
|
||||
include admin/Doxyfile.am
|
||||
|
||||
SUBDIRS=$(TOPSUBDIRS)
|
@ -0,0 +1,21 @@
|
||||
## (C) 1997 Stephan Kulow
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
DISTCLEANFILES = inst-apps
|
||||
|
||||
install-data-local:
|
||||
@echo ""
|
||||
@echo ""
|
||||
@echo "*************** Important *************************"
|
||||
@echo ""
|
||||
@echo "This module contains unreleased software."
|
||||
@echo ""
|
||||
@echo "The software may compile and work, but it may just"
|
||||
@echo "as well neither compile nor work."
|
||||
@echo ""
|
||||
@echo "****************************************************"
|
||||
@echo ""
|
||||
|
||||
include admin/deps.am
|
||||
include admin/Doxyfile.am
|
||||
|
@ -0,0 +1,40 @@
|
||||
What is kdeplayground?
|
||||
----------------------
|
||||
|
||||
The kdeplayground modules contain software that is under development but
|
||||
that has not reached a stable state. Some software present has only been
|
||||
developed as a proof of concept and will not see further development.
|
||||
Due to the experimental nature of the software, most of the software in
|
||||
the kdeplayground packages has not received the same level of scrutiny
|
||||
as the software in other modules.
|
||||
|
||||
Although the software in the kdeplayground modules is publicly available
|
||||
for the purpose of its ongoing development, it should not be considered
|
||||
released, supported in any way or fit for any purpose.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHORS `AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Package contents
|
||||
----------------
|
||||
|
||||
Read the INDEX file to find out about the description and status of each
|
||||
module.
|
||||
|
||||
|
||||
Using kdeplayground
|
||||
-------------------
|
||||
|
||||
The modules use the standard autoconf/automake based KDE build system. To
|
||||
add a new module to the build, create a subdirectory with your code and then
|
||||
say "make -f Makefile.cvs".
|
||||
|
||||
Don't forget to add your new subdirectory to the INDEX file.
|
@ -0,0 +1,23 @@
|
||||
Save to real config files.
|
||||
Module Help link
|
||||
Module Default/Reset link
|
||||
Use tabs
|
||||
View Menu should list of all modules
|
||||
Remove "module" string
|
||||
Fix connection
|
||||
|
||||
config icon sizes
|
||||
command line option to open in new window
|
||||
|
||||
Modules
|
||||
-lilo _has_ to be spead up
|
||||
-Date & Time icon should have a Clock
|
||||
-Samba needs a new icon
|
||||
-Remote needs a new icon
|
||||
|
||||
Search
|
||||
-Make search smaller and on the right
|
||||
-Grep docs?
|
||||
-Tie into kconfigXT somehow?
|
||||
-Look at Spotlight
|
||||
-Task oriented?
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,394 @@
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <Carbon/Carbon.h> header file. */
|
||||
#undef HAVE_CARBON_CARBON_H
|
||||
|
||||
/* 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 <dirent.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_DIRENT_H
|
||||
|
||||
/* Define if you have dlfcn */
|
||||
#undef HAVE_DLFCN
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <dl.h> header file. */
|
||||
#undef HAVE_DL_H
|
||||
|
||||
/* Define to 1 if you have the `fabsl' function. */
|
||||
#undef HAVE_FABSL
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the `flock' function. */
|
||||
#undef HAVE_FLOCK
|
||||
|
||||
/* Define to 1 if you have the <fnmatch.h> header file. */
|
||||
#undef HAVE_FNMATCH_H
|
||||
|
||||
/* Define if you have getdomainname */
|
||||
#undef HAVE_GETDOMAINNAME
|
||||
|
||||
/* Define if you have the getdomainname prototype */
|
||||
#undef HAVE_GETDOMAINNAME_PROTO
|
||||
|
||||
/* Define if you have gethostname */
|
||||
#undef HAVE_GETHOSTNAME
|
||||
|
||||
/* Define if you have the gethostname prototype */
|
||||
#undef HAVE_GETHOSTNAME_PROTO
|
||||
|
||||
/* 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 <linux/tcp.h> header file. */
|
||||
#undef HAVE_LINUX_TCP_H
|
||||
|
||||
/* Define to 1 if the type `long double' works and has more range or precision
|
||||
than `double'. */
|
||||
#undef HAVE_LONG_DOUBLE
|
||||
|
||||
/* Define to 1 if the type `long double' works and has more range or precision
|
||||
than `double'. */
|
||||
#undef HAVE_LONG_DOUBLE_WIDER
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
#undef HAVE_NDIR_H
|
||||
|
||||
/* Define if your system needs _NSGetEnviron to set up the environment */
|
||||
#undef HAVE_NSGETENVIRON
|
||||
|
||||
/* Define to 1 if you have the <paths.h> header file. */
|
||||
#undef HAVE_PATHS_H
|
||||
|
||||
/* Define if you have res_init */
|
||||
#undef HAVE_RES_INIT
|
||||
|
||||
/* Define if you have the res_init prototype */
|
||||
#undef HAVE_RES_INIT_PROTO
|
||||
|
||||
/* Define to 1 if you have the `re_comp' function. */
|
||||
#undef HAVE_RE_COMP
|
||||
|
||||
/* 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 if you have shload */
|
||||
#undef HAVE_SHLOAD
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#undef HAVE_SNPRINTF
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#undef HAVE_SOCKET
|
||||
|
||||
/* 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 `strdup' function. */
|
||||
#undef HAVE_STRDUP
|
||||
|
||||
/* 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 <sysent.h> header file. */
|
||||
#undef HAVE_SYSENT_H
|
||||
|
||||
/* 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/cdefs.h> header file. */
|
||||
#undef HAVE_SYS_CDEFS_H
|
||||
|
||||
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_DIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
/* Define to 1 if you have the <sys/proc.h> header file. */
|
||||
#undef HAVE_SYS_PROC_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/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_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 <utmp.h> header file. */
|
||||
#undef HAVE_UTMP_H
|
||||
|
||||
/* 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
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Defined if compiling without arts */
|
||||
#undef WITHOUT_ARTS
|
||||
|
||||
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
|
||||
`char[]'. */
|
||||
#undef YYTEXT_POINTER
|
||||
|
||||
/*
|
||||
* 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_GETDOMAINNAME_PROTO)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
int getdomainname (char *, size_t);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if !defined(HAVE_GETHOSTNAME_PROTO)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
int gethostname (char *, unsigned int);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#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,2 @@
|
||||
./admin/configure.in.min
|
||||
configure.in.in
|
@ -0,0 +1,146 @@
|
||||
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., 51 Franklin Street, Fifth Floor,
|
||||
dnl Boston, MA 02110-1301, 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(kde-systemsettings-0.0svn20070312, "3.5.4") 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.3)
|
||||
AC_PATH_KDE
|
||||
dnl =======================================================
|
||||
dnl FILE: configure.in.in
|
||||
dnl =======================================================
|
||||
|
||||
#MIN_CONFIG(3.3)
|
||||
# Define a symbol, to know that we're compiling WITH kde. (for apps that
|
||||
# can compile without KDE, optionally)
|
||||
AM_CONDITIONAL(KDE_INSTALLED, test "$have_kde" = "yes")
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h sys/time.h sys/stat.h stdint.h)
|
||||
AC_CHECK_HEADERS(sys/cdefs.h fnmatch.h sysent.h strings.h paths.h)
|
||||
AC_CHECK_HEADERS(utmp.h sys/param.h linux/tcp.h sys/proc.h)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_HEADER_TIME
|
||||
|
||||
AC_C_LONG_DOUBLE
|
||||
|
||||
dnl Checks for library functions.
|
||||
KDE_CHECK_DLOPEN
|
||||
AC_CHECK_FUNCS(socket fabsl strdup vsnprintf re_comp flock)
|
||||
AC_CHECK_SETENV
|
||||
AC_CHECK_UNSETENV
|
||||
AC_CHECK_GETDOMAINNAME
|
||||
AC_CHECK_GETHOSTNAME
|
||||
AM_PROG_LEX
|
||||
LFLAGS="-o${LEX_OUTPUT_ROOT}.c"
|
||||
AC_SUBST(LFLAGS)
|
||||
|
||||
KDE_INIT_DOXYGEN([KDE Playground - Base], [Version $VERSION])
|
||||
|
||||
KDE_CREATE_SUBDIRSLIST
|
||||
AM_CONDITIONAL(systemsettings_SUBDIR_included, test "x$systemsettings_SUBDIR_included" = xyes)
|
||||
AC_CONFIG_FILES([ Makefile ])
|
||||
AC_CONFIG_FILES([ systemsettings/Makefile ])
|
||||
AC_CONFIG_FILES([ systemsettings/menu/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 x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then
|
||||
echo ""
|
||||
echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility"
|
||||
echo "was not included. Therefore, GCC symbol visibility support remains disabled."
|
||||
echo ""
|
||||
echo "For better performance, consider including the Qt visibility supporting patch"
|
||||
echo "located at:"
|
||||
echo ""
|
||||
echo "http://bugs.kde.org/show_bug.cgi?id=109386"
|
||||
echo ""
|
||||
echo "and recompile all of Qt and KDE. Note, this is entirely optional and"
|
||||
echo "everything will continue to work just fine without it."
|
||||
echo ""
|
||||
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,30 @@
|
||||
#MIN_CONFIG(3.3)
|
||||
# Define a symbol, to know that we're compiling WITH kde. (for apps that
|
||||
# can compile without KDE, optionally)
|
||||
AM_CONDITIONAL(KDE_INSTALLED, test "$have_kde" = "yes")
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h sys/time.h sys/stat.h stdint.h)
|
||||
AC_CHECK_HEADERS(sys/cdefs.h fnmatch.h sysent.h strings.h paths.h)
|
||||
AC_CHECK_HEADERS(utmp.h sys/param.h linux/tcp.h sys/proc.h)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_HEADER_TIME
|
||||
|
||||
AC_C_LONG_DOUBLE
|
||||
|
||||
dnl Checks for library functions.
|
||||
KDE_CHECK_DLOPEN
|
||||
AC_CHECK_FUNCS(socket fabsl strdup vsnprintf re_comp flock)
|
||||
AC_CHECK_SETENV
|
||||
AC_CHECK_UNSETENV
|
||||
AC_CHECK_GETDOMAINNAME
|
||||
AC_CHECK_GETHOSTNAME
|
||||
AM_PROG_LEX
|
||||
LFLAGS="-o${LEX_OUTPUT_ROOT}.c"
|
||||
AC_SUBST(LFLAGS)
|
||||
|
||||
KDE_INIT_DOXYGEN([KDE Playground - Base], [Version $VERSION])
|
||||
|
@ -0,0 +1,31 @@
|
||||
This is an overview of how the code is situated and a very brief overview of what the classes do. See the header files for a more indepth overview of what the classes do.
|
||||
|
||||
-- System Settings classes --
|
||||
|
||||
mainwindow - The KMainWindow contains KActions, the stack of the iconlist and the current module(s) view.
|
||||
|
||||
modulesview - The widget that is the icon view that users see when the first enter the app.
|
||||
kcmsearch - Search widget that can search ModulesView and enable/disable items.
|
||||
|
||||
modulesiconitem - The individual modules items. Used for loading enabled/disabled images and storing the list of modules acosiated with the item.
|
||||
|
||||
kcmodulemenu - Class that reads in a freedesktop.org .menu file into a QValueList.
|
||||
|
||||
kcmultiwidget - A basterdized kcmultidialog from kdelibs/kutil that provides info about the current shown dialog so the about dialog and caption can be updated and prompts for unsaved changes.
|
||||
|
||||
-- INSTALL --
|
||||
|
||||
To install a new menu you have to install three files.
|
||||
|
||||
(if you have debian, if you have another system use locate to determine where kde-system.* is installed and install in the same place.
|
||||
|
||||
-/etc/xdg/menus/system-settings.menu
|
||||
-/etc/xdg/menus/applications-merged/system-settings-merge.menu
|
||||
-/usr/share/desktop-directories/system-settings.directory
|
||||
|
||||
Also don't forget to install the ui file.
|
||||
-/share/apps/systemsettings/systempreferencesui.rc
|
||||
And the desktop file.
|
||||
-share/applications/kde/systemsettings.desktop
|
||||
|
||||
When you change (or install) any of the first three files make sure to run kbuildsycoca to re-generate the cache files or log out and back in.
|
@ -0,0 +1,125 @@
|
||||
|
||||
<h1>KDE System Settings</h1>
|
||||
|
||||
<p>
|
||||
This document describes how the System Settings is layed out.
|
||||
|
||||
<p>
|
||||
This document was inspired partially by the TODO file located at kdebase/kcontrol/TODO. Most of the changed are the exact same and were planned to be done for KDE4. This document is simply a little bit more fleshed out version. I recomend checking out that document if you havn't already.
|
||||
|
||||
<p>
|
||||
The reason for this document is:
|
||||
<p>
|
||||
1) To categorize the settings together in a user friendly manor.<br>
|
||||
2) To explain why a setting is where it is and to determine where new settings should go.<br>
|
||||
3) Because of #2 stop the constant reorganization of KControl at every release confusing users and developers because there isn't a documented location for where thing go with explanations of why.
|
||||
<p>
|
||||
The System Settings Center is divided into four sections.
|
||||
<ul>
|
||||
<li><a href="#personal">Personal</a></li>
|
||||
<li><a href="#hardware">Hardware</a></li>
|
||||
<li><a href="#system">System</a></li>
|
||||
<li><a href="#other">Other</a></li>
|
||||
</ul>
|
||||
|
||||
Within KDE there are over 50 kcm modules designed for the Control Center and many more for konquror and other applications. With so many modules there is no way for a users to find what they are looking for by scanning. To solve this there are three levels, the last one isn't normally visable to the user and groups very similar items.
|
||||
<p>
|
||||
Modules in the System Settings should configure things not do things. Some examples include the theme manager. It sets/saves themes. Although it configures settings it is a seperate application because it does actions rather then just setting/getting values. Items that
|
||||
<p>
|
||||
Modules that exists within multiple applications configuration menu such as spell check and cddb should not be in the menu.
|
||||
|
||||
<hr>
|
||||
<a name="personal"><h1>Personal</h1></a>
|
||||
Personal is made up of two parts. The simplest differece between the two are theme settings will be shared amung friends while users settings wont be.
|
||||
<ul>
|
||||
<li><a href="#personal_theme">Theme Goodies</a></li>
|
||||
<li><a href="#personal_user">User Settings</a></li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="personal_theme">Theme Goodies</a></h3> which can be changed without affecting productivity and often doesn't directly apply to a specific user, but to a user base (Theme of the month crowd).
|
||||
|
||||
These deal with how applications are presented to users and how users interact with them. These don't deal with anything that isn't directly seen/heard or interacted with.
|
||||
<p>
|
||||
Every setting in this category must be able to be locked for example in an government enviornment where they determine exactly how a desktop is to look for every user. It may look ugly, but users should still be able to acomplish tasks no matter what these settings are set to.
|
||||
<p>
|
||||
A separate application (Theme Manager) can set the items in this category on mass to give an overall theme for the user. This application can also save the current settings.
|
||||
|
||||
<h3><a name="personal_user">User Settings</a></h3>
|
||||
Such as that apply to this computer such as language and personal choice for default web browser. These settings determine how a user interacts with a computer, but is personal to that user and typically isn't shared like a theme or icons set is.
|
||||
|
||||
<h2>Appearance</h2>
|
||||
The Appearance deals with the look of the applications and desktop. These settings typically will be settings that can be replaced by alternatives created outside of KDE. These settings will most likely be also set/used by other Unix desktop enviornments so that all the applications can integration together (and look consistant to the user). It contains the following items:<br>
|
||||
Colors, Fonts, Icons, Style, Window Decorations
|
||||
|
||||
<h2>Desktop</h2>
|
||||
These items discus how the desktop behaves. How the windows interact with each other, the very bottom of the screen (desktop), the very top (screensaver), and loading of the desktop. These are all separate setting from KDE (or Gnome) applications and the applications shouldn't need to access them or know about them.
|
||||
It contains the following items:<br>
|
||||
Background, Screensaver, Behavior, Window Behavior, Window-Specific Settings, Login Screen
|
||||
<p>
|
||||
Panel.
|
||||
These settings all deal with when users perform actions dealing with or originating from the panel. It contains the following items:<br>
|
||||
Panels, Taskbar, Launch Feedback, Multiple Desktops
|
||||
|
||||
<h2>KDE Components</h2>
|
||||
Specific actuall KDE components which users will probably never actually touch.
|
||||
|
||||
<h2>Accessibility</h2>
|
||||
- International
|
||||
- KHotKeys etc
|
||||
|
||||
<h2>Security</h2>
|
||||
-kdewallet
|
||||
|
||||
<h2>Sound</h2>
|
||||
Sounds, flashes, logs or other events that happen when KDE applications.
|
||||
System Bell
|
||||
System Notifications
|
||||
|
||||
<h2>User Account</h2>
|
||||
- Password changer, paths, Default Applications, Session Manager
|
||||
|
||||
<hr>
|
||||
<a name="hardware"><h1>Hardware</h1></a>
|
||||
Hardware deals with physical hardware configuration. Configuration is not only for the hardware, but the required supporting systems that use the hardware.
|
||||
|
||||
<h2>Network</h2>
|
||||
File Sharing
|
||||
Local Network Browsing
|
||||
Preferences / Proxy
|
||||
Wireless
|
||||
Firewall
|
||||
<h2>Display</h2>
|
||||
It contains the following items:<br>
|
||||
Size & Orientation, Gamma
|
||||
<h2>Power</h2>
|
||||
Display power control
|
||||
laptop battery, cpu temp etc
|
||||
<h2>Keyboard & Mouse</h2>
|
||||
Keyboard, Keyboard Layout, Keyboard Shortcuts, Mouse, KHotKeys
|
||||
<h2>Printer</h2>
|
||||
<h2>Joystick</h2>
|
||||
<h2>Audio</h2>
|
||||
Mixer, SoundSystem (arts)
|
||||
|
||||
<hr>
|
||||
<a name="system"><h1>System</h1></a>
|
||||
System deals with settings relating to this computer.
|
||||
|
||||
<h2>Date & Time</h2>
|
||||
Date, Time, Time zone
|
||||
|
||||
<h2>Fonts</h2>
|
||||
|
||||
<h2>Book Disk</h2>
|
||||
Lilo, Grub
|
||||
|
||||
<h2>Packages</h2>
|
||||
System update / rpm manager etc
|
||||
|
||||
<h2>Login Manager</h2>
|
||||
Login Manger
|
||||
|
||||
<hr>
|
||||
<a name="other"><h1>Other</h1></a>
|
||||
A default KDE install should contain nothing here. If there is something here than this document has failed and needs to be revised. Until that can happen its temporary home is here. A user should never see this catagory.
|
||||
|
@ -0,0 +1,45 @@
|
||||
#
|
||||
# Copyright (c) 2005 Benjamin Meyer <ben+systempreferences@meyerhome.net>
|
||||
#
|
||||
# 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., 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
|
||||
AM_CPPFLAGS= $(all_includes)
|
||||
METASOURCES = AUTO
|
||||
|
||||
SUBDIRS = . menu
|
||||
|
||||
bin_PROGRAMS = systemsettings
|
||||
|
||||
systemsettings_SOURCES = kcmodulemenu.cpp kcmsearch.cpp kcmultiwidget.cpp main.cpp mainwindow.cpp moduleiconitem.cpp modulesview.cpp kcscrollview.cpp
|
||||
|
||||
EXTRA_DIST = kcmodulemenu.h kcmultiwidget.h moduleiconitem.h version.h kcmsearch.h mainwindow.h modulesview.h kcscrollview.h
|
||||
|
||||
systemsettings_LDADD = $(LIB_KDEUI) $(LIB_KUTILS)
|
||||
systemsettings_LDFLAGS = $(all_libraries) -module -avoid-version
|
||||
|
||||
appdata_DATA = systemsettingsui.rc
|
||||
appdatadir = $(kde_datadir)/systemsettings
|
||||
|
||||
xdg_apps_DATA = systemsettings.desktop
|
||||
|
||||
KDE_ICON=AUTO
|
||||
|
||||
# KDE4 will have this by default
|
||||
conf_DATA = systemsettingsrc
|
||||
confdir = $(kde_confdir)
|
||||
|
||||
messages: rc.cpp
|
||||
$(XGETTEXT) *.cpp -o $(podir)/systemsettings.pot
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,188 @@
|
||||
/**
|
||||
* Copyright (C) 2005 Benjamin C Meyer (ben+kcmodulemenu at meyerhome dot net)
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "kcmodulemenu.h"
|
||||
|
||||
#include <kapplication.h>
|
||||
#include <kservicegroup.h>
|
||||
#include <kdebug.h>
|
||||
#include <qdict.h>
|
||||
|
||||
class KCModuleMenuPrivate {
|
||||
public:
|
||||
KCModuleMenuPrivate(){
|
||||
}
|
||||
|
||||
QMap<QString, QValueList<MenuItem> > menus;
|
||||
QString basePath;
|
||||
};
|
||||
|
||||
KCModuleMenu::KCModuleMenu( const QString &menuName ) :
|
||||
d( new KCModuleMenuPrivate )
|
||||
{
|
||||
kdDebug() << "MenuName: \"" << menuName << "\"." << endl;
|
||||
// Make sure we can find the menu
|
||||
KServiceGroup::Ptr serviceGroup = KServiceGroup::baseGroup( menuName );
|
||||
if( !serviceGroup ){
|
||||
kdDebug() << "Unable to load menu \"" << menuName <<
|
||||
"\" from KServiceGroup." << endl;
|
||||
return;
|
||||
}
|
||||
d->basePath = serviceGroup->relPath();
|
||||
readMenu( d->basePath );
|
||||
}
|
||||
|
||||
KCModuleMenu::~KCModuleMenu()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
void KCModuleMenu::readMenu( const QString &pathName )
|
||||
{
|
||||
KServiceGroup::Ptr group = KServiceGroup::group( pathName );
|
||||
if ( !group || !group->isValid() )
|
||||
return;
|
||||
|
||||
KServiceGroup::List list = group->entries( true, true );
|
||||
if( list.isEmpty() )
|
||||
return;
|
||||
|
||||
caption = group->caption();
|
||||
QValueList<MenuItem> currentMenu;
|
||||
|
||||
for( KServiceGroup::List::ConstIterator it = list.begin();
|
||||
it != list.end(); it++)
|
||||
{
|
||||
KSycocaEntry *entry = (*it);
|
||||
if( addEntry(entry) ) {
|
||||
KCModuleInfo module((KService*)entry);
|
||||
append(module);
|
||||
MenuItem infoItem(false);
|
||||
infoItem.caption = this->deriveCaptionFromPath(entry->name());
|
||||
infoItem.item = module;
|
||||
currentMenu.append( infoItem );
|
||||
}
|
||||
|
||||
if ( entry->isType(KST_KServiceGroup) ){
|
||||
MenuItem menuItem(true);
|
||||
menuItem.caption = this->deriveCaptionFromPath(entry->name());
|
||||
menuItem.subMenu = entry->entryPath();
|
||||
currentMenu.append( menuItem );
|
||||
|
||||
readMenu( entry->entryPath() );
|
||||
}
|
||||
}
|
||||
|
||||
d->menus.insert( pathName, currentMenu );
|
||||
}
|
||||
|
||||
bool KCModuleMenu::addEntry( KSycocaEntry *entry ){
|
||||
if( !entry->isType(KST_KService) )
|
||||
return false;
|
||||
|
||||
KService *service = static_cast<KService*>( entry );
|
||||
if ( !kapp->authorizeControlModule( service->menuId()) )
|
||||
return false;
|
||||
|
||||
KCModuleInfo module( service );
|
||||
if ( module.library().isEmpty() )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
QValueList<KCModuleInfo> KCModuleMenu::modules( const QString &menuPath )
|
||||
{
|
||||
QValueList<KCModuleInfo> list;
|
||||
|
||||
QValueList<MenuItem> subMenu = menuList(menuPath);
|
||||
QValueList<MenuItem>::iterator it;
|
||||
for ( it = subMenu.begin(); it != subMenu.end(); ++it ){
|
||||
if ( !(*it).menu )
|
||||
list.append( (*it).item );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
QStringList KCModuleMenu::submenus( const QString &menuPath )
|
||||
{
|
||||
QStringList list;
|
||||
|
||||
QValueList<MenuItem> subMenu = menuList(menuPath);
|
||||
QValueList<MenuItem>::iterator it;
|
||||
for ( it = subMenu.begin(); it != subMenu.end(); ++it ){
|
||||
if ( (*it).menu )
|
||||
list.append( (*it).subMenu );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
QValueList<MenuItem> KCModuleMenu::menuList( const QString &menuPath )
|
||||
{
|
||||
if( menuPath.isEmpty() ) {
|
||||
if( d->basePath.isEmpty())
|
||||
return QValueList<MenuItem>();
|
||||
else
|
||||
return menuList( d->basePath );
|
||||
}
|
||||
return d->menus[menuPath];
|
||||
}
|
||||
|
||||
/*
|
||||
* Okay, I think there could be a much more elegant way of doing
|
||||
* this... but I'm having a hell fo a time figuring it out.
|
||||
*
|
||||
* The purpose of this function is to take a menu path and turn it
|
||||
* into a caption that we can put in a tab. Why do it this way? I
|
||||
* don't know, you tell me. Before I started hacking this we used a
|
||||
* radio control with two buttons (or so it seemed, I could be wrong)
|
||||
* with General and Advanced in a ui.rc file.
|
||||
*
|
||||
* Now that we're using tabs, we no longer have that UI file giving us
|
||||
* the names for the tabs, and since I didn't want to hard-code
|
||||
* anything, and since KSycocaEntry stuff doesn't give you a nice way
|
||||
* (that I noticed anyway) to figure out what your caption should be,
|
||||
* I decided that cleverness is lost on this problem. So screw it,
|
||||
* I'll just parse the stupid path and be done with it.
|
||||
*
|
||||
* This function is certainly nothing short of dull and boring and
|
||||
* routine, but I figured that this might require a bit of explanation
|
||||
* since it just seems kinda silly to do it this way to me. I guess I
|
||||
* never know... I could be doing it the best way.
|
||||
*
|
||||
* "Michael D. Stemle, Jr." <manchicken@notsosoft.net>
|
||||
*/
|
||||
QString KCModuleMenu::deriveCaptionFromPath( const QString &menuPath )
|
||||
{
|
||||
QStringList parts(QStringList::split("/",menuPath));
|
||||
QString result("");
|
||||
|
||||
QStringList::Iterator it = parts.end(); // Start at the end
|
||||
|
||||
// Find the last non-empty string in the split.
|
||||
for (; it != parts.begin(); --it) {
|
||||
if (!((*it).isNull()) && !((*it).isEmpty())) {
|
||||
result += *it;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,158 @@
|
||||
/**
|
||||
* Copyright (C) 2005 Benjamin C Meyer (ben+kcmodulemenu at meyerhome dot net)
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef KCMMODULEMENU_H
|
||||
#define KCMMODULEMENU_H
|
||||
|
||||
#include <kcmoduleinfo.h>
|
||||
|
||||
class KCModuleMenuPrivate;
|
||||
|
||||
/**
|
||||
* List of all KCM modules inside a FreeDesktop.org menu
|
||||
* The menu spec is located at: http://www.freedesktop.org/Standards/menu-spec
|
||||
*
|
||||
* For a menu to show up in KDE three files need to be installed in the system.
|
||||
*
|
||||
* example-merge.menu
|
||||
* example.directory
|
||||
* example.menu
|
||||
*
|
||||
* example-merge.menu should be installed in xdg/menus/applications-merged/
|
||||
* so that ksyscoco will find it.
|
||||
*
|
||||
* \code
|
||||
* <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
|
||||
* "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
|
||||
*
|
||||
* <Menu>
|
||||
* <!-- The following menus are hidden by default -->
|
||||
* <Menu>
|
||||
* <Name>Example Menu</Name>
|
||||
* <Directory>example.directory</Directory>
|
||||
* <MergeFile>../example.menu</MergeFile>
|
||||
* </Menu>
|
||||
* </Menu>
|
||||
* \endcode
|
||||
*
|
||||
* example.directory should be installed in share/desktop-directories/ where files
|
||||
* such as kde-system.directory reside. It is important that it have X-KDE-BaseGroup
|
||||
* as this value is the class constructor argument.
|
||||
*
|
||||
* \code
|
||||
* [Desktop Entry]
|
||||
* Encoding=UTF-8
|
||||
* Name=Example Menu
|
||||
* NoDisplay=true
|
||||
* Icon=package_settings
|
||||
* X-KDE-BaseGroup=examplemenu
|
||||
* \endcode
|
||||
*
|
||||
* example.menu should be installed in xdg/menus/ so that ksyscoco will find
|
||||
* it. See the above url for example menus. After changing the menu you need
|
||||
* to run "kbuildsycoca" to regenerate the cache as ksyscoco will cache the
|
||||
* menu and is a file that doesn't change on users.
|
||||
*/
|
||||
|
||||
/**
|
||||
* A menu consists of menu items. An item is either another menu or a module.
|
||||
*/
|
||||
class MenuItem {
|
||||
public:
|
||||
MenuItem( bool isMenu=false ){ menu = isMenu; };
|
||||
bool menu;
|
||||
QString subMenu;
|
||||
QString caption;
|
||||
KCModuleInfo item;
|
||||
};
|
||||
|
||||
|
||||
class KCModuleMenu : public QValueList<KCModuleInfo>
|
||||
{
|
||||
|
||||
public:
|
||||
QString caption;
|
||||
|
||||
/**
|
||||
* @param the X-KDE-BaseGroup item from the directory file
|
||||
* that should be loaded.
|
||||
*
|
||||
* Example:
|
||||
* In example.directory
|
||||
* X-KDE-BaseGroup=examplemenu
|
||||
* so menuName should be "systemsettings"
|
||||
*/
|
||||
KCModuleMenu( const QString &menuName );
|
||||
|
||||
/**
|
||||
* Deconstructor
|
||||
*/
|
||||
virtual ~KCModuleMenu();
|
||||
|
||||
/**
|
||||
* Returns item of a menu path. An empty string is the top level.
|
||||
* Item order is maintained from the menu file.
|
||||
* @param path to return submenus from.
|
||||
* @return all items in menuPath.
|
||||
*/
|
||||
QValueList<MenuItem> menuList( const QString &menuPath=QString::null );
|
||||
|
||||
/**
|
||||
* Returns the modules in a menu path. An empty string is the top level.
|
||||
* @param menu to return modules from.
|
||||
* @returns only the top level modules of menuPath
|
||||
*/
|
||||
QValueList<KCModuleInfo> modules( const QString &menuPath=QString::null );
|
||||
|
||||
/**
|
||||
* Returns the sub menus of a menu path. An empty string is the top level.
|
||||
* @param path to return submenus from.
|
||||
* @return only the submenus of menuPath.
|
||||
*/
|
||||
QStringList submenus( const QString &menuPath=QString::null );
|
||||
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Reads all the desktop files from the pathName and saves/loads
|
||||
* all of the kcm's into the list.
|
||||
* This is the <Name> from the merge.menu file
|
||||
* @param pathName the base path name of the menu.
|
||||
*/
|
||||
virtual void readMenu( const QString &pathName );
|
||||
|
||||
/**
|
||||
* Function that determines if the entry from readMenu
|
||||
* should be added to the list or not. It checks
|
||||
* to see if it is an authorized kcm module that has a library.
|
||||
*
|
||||
* Overload to filter out kcm modules
|
||||
*
|
||||
* @entry to test
|
||||
* @return true if it should be included
|
||||
*/
|
||||
virtual bool addEntry( KSycocaEntry *entry );
|
||||
|
||||
private:
|
||||
KCModuleMenuPrivate *d;
|
||||
QString deriveCaptionFromPath( const QString &menuPath );
|
||||
};
|
||||
|
||||
#endif // KCMMODULEMENU_H
|
||||
|
@ -0,0 +1,101 @@
|
||||
/**
|
||||
* This file is part of the System Settings package
|
||||
* Copyright (C) 2005 Benjamin C Meyer
|
||||
* <ben+systempreferences at meyerhome dot net>
|
||||
*
|
||||
* 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 library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "kcmsearch.h"
|
||||
|
||||
#include <qregexp.h>
|
||||
#include <kdebug.h>
|
||||
|
||||
#include "modulesview.h"
|
||||
#include "moduleiconitem.h"
|
||||
|
||||
KcmSearch::KcmSearch( QPtrList<ModulesView> *moduleViewList, QWidget *parent, const char *name )
|
||||
: KIconViewSearchLine(parent, moduleViewList->at(0)->groups[0], name){
|
||||
this->moduleViewList = moduleViewList;
|
||||
}
|
||||
|
||||
void KcmSearch::updateSearch( const QString &search ) {
|
||||
QValueList<RowIconView*>::iterator it;
|
||||
QPtrListIterator<ModulesView> moduleViewListIt(*moduleViewList);
|
||||
|
||||
ModulesView *mainView;
|
||||
int page = 0;
|
||||
int *hitArray = new int[moduleViewList->count()];
|
||||
|
||||
for ( ; moduleViewListIt.current(); ++moduleViewListIt) {
|
||||
mainView = moduleViewListIt.current();
|
||||
|
||||
int count = 0;
|
||||
for ( it = mainView->groups.begin(); it != mainView->groups.end(); ++it ){
|
||||
QIconViewItem *item = (*it)->firstItem();
|
||||
while( item ) {
|
||||
bool hit = itemMatches(item, search);
|
||||
((ModuleIconItem*)item)->loadIcon(hit);
|
||||
count += hit ? 1 : 0;
|
||||
item = item->nextItem();
|
||||
}
|
||||
|
||||
}
|
||||
hitArray[page] = count;
|
||||
page++;
|
||||
}
|
||||
|
||||
emit searchHits(search, hitArray, moduleViewList->count());
|
||||
delete[] hitArray;
|
||||
}
|
||||
|
||||
bool KcmSearch::itemMatches( const KCModuleInfo &module, const QString &search ) const
|
||||
{
|
||||
// Look in keywords
|
||||
QStringList kw = module.keywords();
|
||||
for(QStringList::ConstIterator it = kw.begin(); it != kw.end(); ++it) {
|
||||
QString name = (*it).lower();
|
||||
if ( QRegExp(search+"*", false, true).search(name) >= 0){
|
||||
//kdDebug() << "MATCH:" << module.moduleName().latin1()
|
||||
// << "keyword:" << name.latin1() << endl;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Don't forget to check the name :)
|
||||
if ( QRegExp(search+"*", false, true).search(module.moduleName()) >= 0)
|
||||
return true;
|
||||
|
||||
//kdDebug() << "No MATCH:" << module.moduleName().latin1() << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool KcmSearch::itemMatches( const QIconViewItem *item, const QString & search ) const
|
||||
{
|
||||
if( !item )
|
||||
return false;
|
||||
|
||||
ModuleIconItem *mItem = (ModuleIconItem*)item;
|
||||
QValueList<KCModuleInfo>::iterator it;
|
||||
for ( it = mItem->modules.begin(); it != mItem->modules.end(); ++it ){
|
||||
if( itemMatches( (*it), search ) )
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
#include "kcmsearch.moc"
|
@ -0,0 +1,67 @@
|
||||
/**
|
||||
* This file is part of the System Settings package
|
||||
* Copyright (C) 2005 Benjamin C Meyer
|
||||
* <ben+systempreferences at meyerhome dot net>
|
||||
*
|
||||
* 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 library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef KCMSEARCH_H
|
||||
#define KCMSEARCH_H
|
||||
|
||||
#include <kiconviewsearchline.h>
|
||||
#include "kcmodulemenu.h"
|
||||
|
||||
class ModulesView;
|
||||
|
||||
/**
|
||||
* Searches all the ModuleIconItem's in MainWindow and "disables" the ones
|
||||
* whos keywords don't match the current search.
|
||||
*/
|
||||
class KcmSearch : public KIconViewSearchLine
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KcmSearch( QPtrList<ModulesView> *moduleViewList, QWidget *parent = 0, const char *name = 0 );
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* Go through all of the iconView groups in mainView and update
|
||||
*/
|
||||
virtual void updateSearch( const QString &search = QString::null );
|
||||
/**
|
||||
* Check module associated with item or if a group check all modules of that group.
|
||||
* @return true if search is in the module(s) keywords
|
||||
*/
|
||||
virtual bool itemMatches ( const QIconViewItem *item, const QString &search ) const;
|
||||
|
||||
signals:
|
||||
void searchHits(const QString &query, int *hitList, int length);
|
||||
|
||||
private:
|
||||
/**
|
||||
* Determine if module matches the search
|
||||
* @return true if search is in module's keywords
|
||||
*/
|
||||
bool itemMatches ( const KCModuleInfo &module, const QString &search ) const;
|
||||
|
||||
// Friend class whos groups parsed,
|
||||
QPtrList<ModulesView> *moduleViewList;
|
||||
};
|
||||
|
||||
#endif // KCMSEARCH_H
|
||||
|
@ -0,0 +1,431 @@
|
||||
/*
|
||||
Copyright (c) 2000 Matthias Elter <elter@kde.org>
|
||||
Copyright (c) 2003 Daniel Molkentin <molkentin@kde.org>
|
||||
Copyright (c) 2003 Matthias Kretz <kretz@kde.org>
|
||||
Copyright (c) 2004 Frans Englich <frans.erglich.com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
|
||||
*/
|
||||
|
||||
#include <qcursor.h>
|
||||
#include <qhbox.h>
|
||||
#include <qlayout.h>
|
||||
#include <qpushbutton.h>
|
||||
|
||||
#include <kaboutdata.h>
|
||||
#include <kapplication.h>
|
||||
#include <kdebug.h>
|
||||
#include <kiconloader.h>
|
||||
#include <klibloader.h>
|
||||
#include <klocale.h>
|
||||
#include <kmessagebox.h>
|
||||
#include <kprocess.h>
|
||||
#include <krun.h>
|
||||
#include <kstdguiitem.h>
|
||||
#include <kuser.h>
|
||||
|
||||
#include "kcmoduleloader.h"
|
||||
#include "kcmoduleproxy.h"
|
||||
#include "kcmultiwidget.h"
|
||||
|
||||
/*
|
||||
Button usage:
|
||||
|
||||
User1 => Reset
|
||||
User2 => Close
|
||||
User3 => Admin
|
||||
*/
|
||||
|
||||
class KCMultiWidget::KCMultiWidgetPrivate
|
||||
{
|
||||
public:
|
||||
KCMultiWidgetPrivate()
|
||||
: hasRootKCM( false ), currentModule( 0 )
|
||||
{}
|
||||
|
||||
bool hasRootKCM;
|
||||
KCModuleProxy* currentModule;
|
||||
};
|
||||
|
||||
|
||||
KCMultiWidget::KCMultiWidget(QWidget *parent, const char *name, bool modal)
|
||||
: KDialogBase(IconList, i18n("Configure"), Help | Default |Cancel | Apply |
|
||||
Ok | User1 | User2 | User3, Ok, parent, name, modal, true,
|
||||
KStdGuiItem::reset(), KStdGuiItem::close(), KStdGuiItem::adminMode())
|
||||
, dialogface( IconList ), d( new KCMultiWidgetPrivate )
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
KCMultiWidget::KCMultiWidget( int dialogFace, QWidget * parent, const char * name, bool modal )
|
||||
: KDialogBase( dialogFace, "Caption", Help | Default | Cancel | Apply | Ok |
|
||||
User1 | User2 | User3, Ok, parent, name, modal, true,
|
||||
KStdGuiItem::reset(), KStdGuiItem::close(), KStdGuiItem::adminMode())
|
||||
, dialogface( dialogFace ), d( new KCMultiWidgetPrivate )
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
inline void KCMultiWidget::init()
|
||||
{
|
||||
connect( this, SIGNAL( finished()), SLOT( dialogClosed()));
|
||||
showButton( Ok, false );
|
||||
showButton( Cancel, false );
|
||||
showButton( User1, true ); // Reset button
|
||||
showButton( User2, true ); // Close button.
|
||||
showButton( User3, true); // Admin button.
|
||||
|
||||
enableButton(Apply, false);
|
||||
enableButton(User1, false);
|
||||
|
||||
connect(this, SIGNAL(aboutToShowPage(QWidget *)), this, SLOT(slotAboutToShow(QWidget *)));
|
||||
setInitialSize(QSize(640,480));
|
||||
moduleParentComponents.setAutoDelete( true );
|
||||
}
|
||||
#include <kmessagebox.h>
|
||||
|
||||
KCMultiWidget::~KCMultiWidget()
|
||||
{
|
||||
OrphanMap::Iterator end2 = m_orphanModules.end();
|
||||
for( OrphanMap::Iterator it = m_orphanModules.begin(); it != end2; ++it )
|
||||
delete ( *it );
|
||||
}
|
||||
|
||||
void KCMultiWidget::slotDefault()
|
||||
{
|
||||
int curPageIndex = activePageIndex();
|
||||
|
||||
ModuleList::Iterator end = m_modules.end();
|
||||
for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it )
|
||||
if( pageIndex( ( QWidget * )( *it ).kcm->parent() ) == curPageIndex )
|
||||
{
|
||||
( *it ).kcm->defaults();
|
||||
clientChanged( true );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Reset button.
|
||||
void KCMultiWidget::slotUser1()
|
||||
{
|
||||
int curPageIndex = activePageIndex();
|
||||
|
||||
ModuleList::Iterator end = m_modules.end();
|
||||
for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it )
|
||||
if( pageIndex( ( QWidget * )( *it ).kcm->parent() ) == curPageIndex )
|
||||
{
|
||||
( *it ).kcm->load();
|
||||
clientChanged( false );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void KCMultiWidget::apply()
|
||||
{
|
||||
QStringList updatedModules;
|
||||
ModuleList::Iterator end = m_modules.end();
|
||||
for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it )
|
||||
{
|
||||
KCModuleProxy * m = ( *it ).kcm;
|
||||
if( m && m->changed() )
|
||||
{
|
||||
m->save();
|
||||
QStringList * names = moduleParentComponents[ m ];
|
||||
kdDebug() << k_funcinfo << *names << " saved and added to the list" << endl;
|
||||
for( QStringList::ConstIterator it = names->begin(); it != names->end(); ++it )
|
||||
if( updatedModules.find( *it ) == updatedModules.end() )
|
||||
updatedModules.append( *it );
|
||||
}
|
||||
}
|
||||
for( QStringList::const_iterator it = updatedModules.begin(); it != updatedModules.end(); ++it )
|
||||
{
|
||||
kdDebug() << k_funcinfo << *it << " " << ( *it ).latin1() << endl;
|
||||
emit configCommitted( ( *it ).latin1() );
|
||||
}
|
||||
emit configCommitted();
|
||||
}
|
||||
|
||||
void KCMultiWidget::slotApply()
|
||||
{
|
||||
QPushButton *button = actionButton(Apply);
|
||||
if (button)
|
||||
button->setFocus();
|
||||
emit applyClicked();
|
||||
apply();
|
||||
}
|
||||
|
||||
|
||||
void KCMultiWidget::slotOk()
|
||||
{
|
||||
QPushButton *button = actionButton(Ok);
|
||||
if (button)
|
||||
button->setFocus();
|
||||
emit okClicked();
|
||||
apply();
|
||||
accept();
|
||||
}
|
||||
|
||||
void KCMultiWidget::slotHelp()
|
||||
{
|
||||
QString docPath;
|
||||
|
||||
int curPageIndex = activePageIndex();
|
||||
ModuleList::Iterator end = m_modules.end();
|
||||
for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it )
|
||||
if( pageIndex( ( QWidget * )( *it ).kcm->parent() ) == curPageIndex )
|
||||
{
|
||||
docPath = ( *it ).kcm->moduleInfo().docPath();
|
||||
break;
|
||||
}
|
||||
|
||||
KURL url( KURL("help:/"), docPath );
|
||||
|
||||
if (url.protocol() == "help" || url.protocol() == "man" || url.protocol() == "info") {
|
||||
KProcess process;
|
||||
process << "khelpcenter"
|
||||
<< url.url();
|
||||
process.start(KProcess::DontCare);
|
||||
process.detach();
|
||||
} else {
|
||||
new KRun(url);
|
||||
}
|
||||
}
|
||||
|
||||
// Close button
|
||||
void KCMultiWidget::slotUser2() {
|
||||
emit close();
|
||||
}
|
||||
|
||||
void KCMultiWidget::clientChanged(bool state)
|
||||
{
|
||||
kdDebug( 710 ) << k_funcinfo << state << endl;
|
||||
ModuleList::Iterator end = m_modules.end();
|
||||
for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it )
|
||||
if( ( *it ).kcm->changed() ) {
|
||||
enableButton( Apply, true );
|
||||
enableButton( User1, true);
|
||||
return;
|
||||
}
|
||||
enableButton( Apply, false );
|
||||
enableButton( User1, false);
|
||||
}
|
||||
|
||||
void KCMultiWidget::addModule(const QString& path, bool withfallback)
|
||||
{
|
||||
QString complete = path;
|
||||
|
||||
if( !path.endsWith( ".desktop" ))
|
||||
complete += ".desktop";
|
||||
|
||||
KService::Ptr service = KService::serviceByStorageId( complete );
|
||||
|
||||
addModule( KCModuleInfo( service ), QStringList(), withfallback);
|
||||
}
|
||||
|
||||
void KCMultiWidget::addModule(const KCModuleInfo& moduleinfo,
|
||||
QStringList parentmodulenames, bool withfallback)
|
||||
{
|
||||
if( !moduleinfo.service() )
|
||||
return;
|
||||
|
||||
if ( !kapp->authorizeControlModule( moduleinfo.service()->menuId() ))
|
||||
return;
|
||||
|
||||
if( !KCModuleLoader::testModule( moduleinfo ))
|
||||
return;
|
||||
|
||||
QFrame* page = 0;
|
||||
if (!moduleinfo.service()->noDisplay())
|
||||
switch( dialogface )
|
||||
{
|
||||
case TreeList:
|
||||
parentmodulenames += moduleinfo.moduleName();
|
||||
page = addHBoxPage( parentmodulenames, moduleinfo.comment(),
|
||||
SmallIcon( moduleinfo.icon(),
|
||||
IconSize( KIcon::Small ) ) );
|
||||
break;
|
||||
case Tabbed:
|
||||
case IconList:
|
||||
page = addHBoxPage( moduleinfo.moduleName(),
|
||||
moduleinfo.comment(), DesktopIcon( moduleinfo.icon(),
|
||||
KIcon::SizeMedium ) );
|
||||
break;
|
||||
case Plain:
|
||||
page = plainPage();
|
||||
( new QHBoxLayout( page ) )->setAutoAdd( true );
|
||||
break;
|
||||
default:
|
||||
kdError( 710 ) << "unsupported dialog face for KCMultiWidget"
|
||||
<< endl;
|
||||
break;
|
||||
}
|
||||
if(!page) {
|
||||
KCModuleLoader::unloadModule(moduleinfo);
|
||||
return;
|
||||
}
|
||||
KCModuleProxy * module;
|
||||
if( m_orphanModules.contains( moduleinfo.service() ) )
|
||||
{
|
||||
// the KCModule already exists - it was removed from the dialog in
|
||||
// removeAllModules
|
||||
module = m_orphanModules[ moduleinfo.service() ];
|
||||
m_orphanModules.remove( moduleinfo.service() );
|
||||
kdDebug( 710 ) << "Use KCModule from the list of orphans for " <<
|
||||
moduleinfo.moduleName() << ": " << module << endl;
|
||||
|
||||
module->reparent( page, 0, QPoint( 0, 0 ), true );
|
||||
|
||||
if( module->changed() )
|
||||
clientChanged( true );
|
||||
|
||||
if( activePageIndex() == -1 ) {
|
||||
showPage( pageIndex( page ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
module = new KCModuleProxy( moduleinfo, withfallback, page );
|
||||
|
||||
QStringList parentComponents = moduleinfo.service()->property(
|
||||
"X-KDE-ParentComponents" ).toStringList();
|
||||
moduleParentComponents.insert( module,
|
||||
new QStringList( parentComponents ) );
|
||||
|
||||
connect(module, SIGNAL(changed(bool)), this, SLOT(clientChanged(bool)));
|
||||
|
||||
}
|
||||
|
||||
CreatedModule cm;
|
||||
cm.kcm = module;
|
||||
cm.service = moduleinfo.service();
|
||||
cm.adminmode = false;
|
||||
cm.buttons = module->buttons();
|
||||
if ( moduleinfo.needsRootPrivileges() &&
|
||||
!KUser().isSuperUser() ) {/* If we're embedded, it's true */
|
||||
d->hasRootKCM = true;
|
||||
cm.adminmode = true;
|
||||
m_modules.append( cm );
|
||||
if( dialogface==Plain ) {
|
||||
slotAboutToShow( page ); // Won't be called otherwise, necessary for adminMode button
|
||||
}
|
||||
} else {
|
||||
m_modules.append( cm );
|
||||
}
|
||||
|
||||
if( m_modules.count() == 1 ) {
|
||||
slotAboutToShow( page );
|
||||
}
|
||||
}
|
||||
|
||||
KCModuleProxy * KCMultiWidget::currentModule() {
|
||||
if(d) {
|
||||
return d->currentModule;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void KCMultiWidget::applyOrRevert(KCModuleProxy * module){
|
||||
if( !module || !module->changed() )
|
||||
return;
|
||||
|
||||
int res = KMessageBox::warningYesNo(this,
|
||||
i18n("There are unsaved changes in the active module.\n"
|
||||
"Do you want to apply the changes or discard them?"),
|
||||
i18n("Unsaved Changes"),
|
||||
KStdGuiItem::apply(),
|
||||
KStdGuiItem::discard());
|
||||
if (res == KMessageBox::Yes) {
|
||||
slotApply();
|
||||
} else {
|
||||
module->load();
|
||||
clientChanged( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void KCMultiWidget::slotAboutToShow(QWidget *page)
|
||||
{
|
||||
QObject * obj = page->child( 0, "KCModuleProxy" );
|
||||
if( ! obj )
|
||||
return;
|
||||
|
||||
KCModuleProxy *module = ( KCModuleProxy* )obj->qt_cast( "KCModuleProxy" );
|
||||
if( ! module )
|
||||
return;
|
||||
|
||||
if( d && d->currentModule )
|
||||
applyOrRevert( d->currentModule );
|
||||
|
||||
d->currentModule = module;
|
||||
emit ( aboutToShow( d->currentModule ) );
|
||||
|
||||
ModuleList::Iterator end = m_modules.end();
|
||||
int buttons = 0;
|
||||
for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it ) {
|
||||
if( ( *it ).kcm==d->currentModule) {
|
||||
showButton(User3, ( *it ).adminmode);
|
||||
buttons = ( *it ).buttons;
|
||||
}
|
||||
}
|
||||
|
||||
showButton(Apply, buttons & KCModule::Apply);
|
||||
showButton(User1, buttons & KCModule::Apply); // Reset button.
|
||||
|
||||
// Close button. No Apply button implies a Close button.
|
||||
showButton(User2, (buttons & KCModule::Apply)==0);
|
||||
|
||||
enableButton( KDialogBase::Help, buttons & KCModule::Help );
|
||||
enableButton( KDialogBase::Default, buttons & KCModule::Default );
|
||||
|
||||
disconnect( this, SIGNAL(user3Clicked()), 0, 0 );
|
||||
|
||||
if (d->currentModule->moduleInfo().needsRootPrivileges() &&
|
||||
!d->currentModule->rootMode() )
|
||||
{ /* Enable the Admin Mode button */
|
||||
enableButton( User3, true );
|
||||
connect( this, SIGNAL(user3Clicked()), d->currentModule, SLOT( runAsRoot() ));
|
||||
connect( this, SIGNAL(user3Clicked()), SLOT( disableRModeButton() ));
|
||||
} else {
|
||||
enableButton( User3, false );
|
||||
}
|
||||
}
|
||||
|
||||
void KCMultiWidget::rootExit()
|
||||
{
|
||||
enableButton( User3, true);
|
||||
}
|
||||
|
||||
void KCMultiWidget::disableRModeButton()
|
||||
{
|
||||
enableButton( User3, false );
|
||||
connect ( d->currentModule, SIGNAL( childClosed() ), SLOT( rootExit() ) );
|
||||
}
|
||||
|
||||
void KCMultiWidget::slotCancel() {
|
||||
dialogClosed();
|
||||
KDialogBase::slotCancel();
|
||||
}
|
||||
|
||||
void KCMultiWidget::dialogClosed()
|
||||
{
|
||||
if(d)
|
||||
{
|
||||
applyOrRevert(d->currentModule);
|
||||
}
|
||||
}
|
||||
|
||||
#include "kcmultiwidget.moc"
|
@ -0,0 +1,255 @@
|
||||
/*
|
||||
Copyright (c) 2000 Matthias Elter <elter@kde.org>
|
||||
Copyright (c) 2003 Daniel Molkentin <molkentin@kde.org>
|
||||
Copyright (c) 2003 Matthias Kretz <kretz@kde.org>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef KCMULTIDIALOG_H
|
||||
#define KCMULTIDIALOG_H
|
||||
|
||||
#include <qptrdict.h>
|
||||
|
||||
#include <kdialogbase.h>
|
||||
#include <klocale.h>
|
||||
#include <kservice.h>
|
||||
|
||||
class KCModuleProxy;
|
||||
class KCModuleInfo;
|
||||
class KCModule;
|
||||
|
||||
/**
|
||||
* @short A method that offers a KDialogBase containing arbitrary
|
||||
* Control Modules.
|
||||
*/
|
||||
class KUTILS_EXPORT KCMultiWidget : public KDialogBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/**
|
||||
* Constructs a new KCMultiWidget
|
||||
*
|
||||
* @param parent The parent widget
|
||||
* @param name The widget name
|
||||
* @param modal If you pass true here, the dialog will be modal
|
||||
**/
|
||||
KCMultiWidget( QWidget *parent=0, const char *name=0, bool modal=false );
|
||||
|
||||
/**
|
||||
* Construct a personalized KCMultiWidget.
|
||||
*
|
||||
* @param dialogFace You can use TreeList, Tabbed, Plain, Swallow or
|
||||
* IconList.
|
||||
* @param parent Parent of the dialog.
|
||||
* @param name Dialog name (for internal use only).
|
||||
* @param modal Controls dialog modality. If @p false, the rest of the
|
||||
* program interface (example: other dialogs) is accessible while
|
||||
* the dialog is open.
|
||||
*/
|
||||
KCMultiWidget( int dialogFace, QWidget * parent = 0,
|
||||
const char * name = 0, bool modal = false );
|
||||
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
**/
|
||||
virtual ~KCMultiWidget();
|
||||
|
||||
/**
|
||||
* Add a module.
|
||||
*
|
||||
* @param module Specify the name of the module that is to be added
|
||||
* to the list of modules the dialog will show.
|
||||
*
|
||||
* @param withfallback Try harder to load the module. Might result
|
||||
* in the module appearing outside the dialog.
|
||||
**/
|
||||
void addModule(const QString& module, bool withfallback=true);
|
||||
|
||||
/**
|
||||
* Add a module.
|
||||
*
|
||||
* @param moduleinfo Pass a KCModuleInfo object which will be
|
||||
* used for creating the module. It will be added
|
||||
* to the list of modules the dialog will show.
|
||||
*
|
||||
* @param parentmodulenames The names of the modules that should appear as
|
||||
* parents in the TreeList. Look at the
|
||||
* KDialogBase::addPage documentation for more info
|
||||
* on this.
|
||||
*
|
||||
* @param withfallback Try harder to load the module. Might result
|
||||
* in the module appearing outside the dialog.
|
||||
**/
|
||||
void addModule(const KCModuleInfo& moduleinfo, QStringList
|
||||
parentmodulenames = QStringList(), bool withfallback=false);
|
||||
|
||||
/**
|
||||
* @return the current module that is being shown.
|
||||
*/
|
||||
KCModuleProxy * currentModule();
|
||||
|
||||
signals:
|
||||
/**
|
||||
* Emitted after all KCModules have been told to save their configuration.
|
||||
*
|
||||
* The applyClicked and okClicked signals are emitted before the
|
||||
* configuration is saved.
|
||||
*/
|
||||
void configCommitted();
|
||||
|
||||
/**
|
||||
* Emitted after the KCModules have been told to save their configuration.
|
||||
* It is emitted once for every instance the KCMs that were changed belong
|
||||
* to.
|
||||
*
|
||||
* You can make use of this if you have more than one component in your
|
||||
* application. instanceName tells you the instance that has to reload its
|
||||
* configuration.
|
||||
*
|
||||
* The applyClicked and okClicked signals are emitted before the
|
||||
* configuration is saved.
|
||||
*
|
||||
* @param instanceName The name of the instance that needs to reload its
|
||||
* configuration.
|
||||
*/
|
||||
void configCommitted( const QCString & instanceName );
|
||||
|
||||
/**
|
||||
* Emitted right before a module is shown.
|
||||
* Usefull for updating caption, help, etc
|
||||
*
|
||||
* @param moduleinfo The module that is about to be shown.
|
||||
* @sense 3.4
|
||||
*/
|
||||
void aboutToShow( KCModuleProxy *moduleProxy );
|
||||
|
||||
void close();
|
||||
|
||||
protected slots:
|
||||
/**
|
||||
* This slot is called when the user presses the "Default" Button.
|
||||
* You can reimplement it if needed.
|
||||
*
|
||||
* @note Make sure you call the original implementation.
|
||||
**/
|
||||
virtual void slotDefault();
|
||||
|
||||
/**
|
||||
* This slot is called when the user presses the "Reset" Button.
|
||||
* You can reimplement it if needed.
|
||||
*
|
||||
* @note Make sure you call the original implementation.
|
||||
*/
|
||||
virtual void slotUser1();
|
||||
virtual void slotUser2();
|
||||
|
||||
/**
|
||||
* This slot is called when the user presses the "Apply" Button.
|
||||
* You can reimplement it if needed.
|
||||
*
|
||||
* @note Make sure you call the original implementation.
|
||||
**/
|
||||
virtual void slotApply();
|
||||
|
||||
/**
|
||||
* This slot is called when the user presses the "OK" Button.
|
||||
* You can reimplement it if needed.
|
||||
*
|
||||
* @note Make sure you call the original implementation.
|
||||
**/
|
||||
virtual void slotOk();
|
||||
|
||||
/**
|
||||
* This slot is called when the user presses the "Help" Button.
|
||||
* It reads the DocPath field of the currently selected KControl
|
||||
* module's .desktop file to find the path to the documentation,
|
||||
* which it then attempts to load.
|
||||
*
|
||||
* You can reimplement this slot if needed.
|
||||
*
|
||||
* @note Make sure you call the original implementation.
|
||||
**/
|
||||
virtual void slotHelp();
|
||||
|
||||
virtual void slotCancel();
|
||||
|
||||
private slots:
|
||||
|
||||
void slotAboutToShow(QWidget *);
|
||||
|
||||
void clientChanged(bool state);
|
||||
|
||||
/**
|
||||
* Called when entering root mode, and disables
|
||||
* the Admin Mode button such that the user doesn't do it
|
||||
* twice.
|
||||
*
|
||||
* @since 3.4
|
||||
*/
|
||||
void disableRModeButton();
|
||||
|
||||
/**
|
||||
* Called when the current module exits from root
|
||||
* mode. Enables the Administrator Mode button, again.
|
||||
*
|
||||
* @since 3.4
|
||||
*/
|
||||
void rootExit();
|
||||
|
||||
/**
|
||||
*
|
||||
* Called when the dialog is hidden. It unregisters the modules,
|
||||
* such that they don't hinder the same modules to be opened in
|
||||
* another application.
|
||||
*
|
||||
* @since 3.4
|
||||
*/
|
||||
void dialogClosed();
|
||||
|
||||
private:
|
||||
|
||||
void applyOrRevert(KCModuleProxy * module);
|
||||
|
||||
void init();
|
||||
void apply();
|
||||
|
||||
struct CreatedModule
|
||||
{
|
||||
KCModuleProxy * kcm;
|
||||
KService::Ptr service;
|
||||
bool adminmode;
|
||||
int buttons;
|
||||
};
|
||||
typedef QValueList<CreatedModule> ModuleList;
|
||||
ModuleList m_modules;
|
||||
|
||||
typedef QMap<KService::Ptr, KCModuleProxy*> OrphanMap;
|
||||
OrphanMap m_orphanModules;
|
||||
|
||||
QPtrDict<QStringList> moduleParentComponents;
|
||||
QString _docPath;
|
||||
int dialogface;
|
||||
|
||||
class KCMultiWidgetPrivate;
|
||||
KCMultiWidgetPrivate *d;
|
||||
};
|
||||
|
||||
#endif //KCMULTIDIALOG_H
|
||||
|
@ -0,0 +1,38 @@
|
||||
/*
|
||||
Copyright (c) 2006 Simon Edwards <simon@simonzone.com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
|
||||
*/
|
||||
|
||||
#include "kcscrollview.h"
|
||||
|
||||
KCScrollView::KCScrollView( QWidget * parent, const char * name, WFlags f) : QScrollView(parent,name,f) {
|
||||
setResizePolicy(AutoOneFit);
|
||||
mainChild = 0;
|
||||
}
|
||||
|
||||
QSize KCScrollView::sizeHint() const {
|
||||
QSize vphint = mainChild->sizeHint();
|
||||
vphint.setWidth(vphint.width()+2*frameWidth());
|
||||
vphint.setHeight(vphint.height()+2*frameWidth());
|
||||
return vphint;
|
||||
}
|
||||
|
||||
void KCScrollView::addChild(QWidget *child, int x, int y) {
|
||||
mainChild = child;
|
||||
QScrollView::addChild(child,x,y);
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
/*
|
||||
Copyright (c) 2006 Simon Edwards <simon@simonzone.com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef KCSCROLLVIEW_H
|
||||
#define KCSCROLLVIEW_H
|
||||
#include <qscrollview.h>
|
||||
|
||||
class KCScrollView : public QScrollView {
|
||||
public:
|
||||
KCScrollView ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 );
|
||||
|
||||
virtual QSize sizeHint() const;
|
||||
virtual void addChild(QWidget *child, int x=0, int y=0);
|
||||
private:
|
||||
QWidget *mainChild;
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,62 @@
|
||||
/**
|
||||
* This file is part of the System Settings package
|
||||
* Copyright (C) 2005 Benjamin C Meyer
|
||||
* <ben+systempreferences at meyerhome dot net>
|
||||
*
|
||||
* 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 library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <kapplication.h>
|
||||
#include <kcmdlineargs.h>
|
||||
#include <kaboutdata.h>
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "version.h"
|
||||
|
||||
static KCmdLineOptions options[] =
|
||||
{
|
||||
{ "menu <argument>", I18N_NOOP("Menu file"), "systemsettings" },
|
||||
{ "e", 0, 0 },
|
||||
{ "noembed", I18N_NOOP("Embed windows"), 0 },
|
||||
KCmdLineLastOption
|
||||
};
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
KLocale::setMainCatalogue("systemsettings");
|
||||
// About data
|
||||
KAboutData aboutData("systemsettings", I18N_NOOP("System Settings"),
|
||||
SYSTEM_SETTINGS_VERSION, I18N_NOOP("System Settings"),
|
||||
KAboutData::License_LGPL, "(c) 2005, Benjamin C. Meyer", 0, 0);
|
||||
aboutData.addAuthor("Benjamin C. Meyer", I18N_NOOP("Author & Maintainer"),
|
||||
"ben+systempreferences@meyerhome.net");
|
||||
KCmdLineArgs::init(argc, argv, &aboutData);
|
||||
|
||||
// Tell which options are supported
|
||||
KCmdLineArgs::addCmdLineOptions( options );
|
||||
|
||||
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
|
||||
|
||||
// Launch
|
||||
KApplication application(argc, argv);
|
||||
|
||||
MainWindow *mainWindow = new MainWindow(args->isSet("embed"), args->getOption("menu"));
|
||||
application.setMainWidget( mainWindow );
|
||||
mainWindow->show();
|
||||
|
||||
return application.exec();
|
||||
}
|
||||
|
@ -0,0 +1,362 @@
|
||||
/**
|
||||
* This file is part of the System Settings package
|
||||
* Copyright (C) 2005 Benjamin C Meyer (ben+systempreferences at meyerhome dot net)
|
||||
*
|
||||
* 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 library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <kstdaction.h>
|
||||
#include <qwhatsthis.h>
|
||||
#include <qlabel.h>
|
||||
#include <qvbox.h>
|
||||
#include <kaction.h>
|
||||
#include <qtoolbutton.h>
|
||||
#include <klocale.h>
|
||||
#include <kservicegroup.h>
|
||||
#include <qlayout.h>
|
||||
#include <qwidgetstack.h>
|
||||
#include <qtimer.h>
|
||||
#include <kiconloader.h>
|
||||
#include <kcmoduleloader.h>
|
||||
#include <kdialogbase.h>
|
||||
#include <kiconviewsearchline.h>
|
||||
#include <kapplication.h>
|
||||
#include <kaboutapplication.h>
|
||||
#include <kdebug.h>
|
||||
#include <kcmoduleproxy.h>
|
||||
#include <kbugreport.h>
|
||||
#include <kmenubar.h>
|
||||
#include <kactionclasses.h>
|
||||
#include <ktoolbarbutton.h>
|
||||
#include <qtabbar.h>
|
||||
|
||||
#include "kcmsearch.h"
|
||||
#include "modulesview.h"
|
||||
#include "moduleiconitem.h"
|
||||
#include "kcmodulemenu.h"
|
||||
#include "kcmultiwidget.h"
|
||||
|
||||
MainWindow::MainWindow(bool embed, const QString & menuFile,
|
||||
QWidget *parent, const char *name) :
|
||||
KMainWindow(parent,name), menu(NULL), embeddedWindows(embed),
|
||||
groupWidget(NULL), selectedPage(0), dummyAbout(NULL) {
|
||||
|
||||
// Load the menu structure in from disk.
|
||||
menu = new KCModuleMenu( menuFile );
|
||||
|
||||
moduleTabs = new KTabWidget(this, "moduletabs",
|
||||
QTabWidget::Top|QTabWidget::Rounded);
|
||||
buildMainWidget();
|
||||
buildActions();
|
||||
setupGUI(ToolBar|Save|Create,QString::null);
|
||||
widgetChange();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete moduleTabs;
|
||||
delete windowStack;
|
||||
delete menu;
|
||||
delete dummyAbout;
|
||||
}
|
||||
|
||||
void MainWindow::buildMainWidget()
|
||||
{
|
||||
windowStack = new QWidgetStack( this, "widgetstack" );
|
||||
|
||||
// Top level pages.
|
||||
QValueList<MenuItem> subMenus = menu->menuList();
|
||||
QValueList<MenuItem>::iterator it;
|
||||
KCScrollView *modulesScroller;
|
||||
moduleTabs->show();
|
||||
for ( it = subMenus.begin(); it != subMenus.end(); ++it ) {
|
||||
if( (*it).menu ) {
|
||||
modulesScroller = new KCScrollView(moduleTabs);
|
||||
ModulesView *modulesView = new ModulesView( menu, (*it).subMenu, modulesScroller->viewport(), "modulesView" );
|
||||
modulesViewList.append(modulesView);
|
||||
connect(modulesView, SIGNAL(itemSelected(QIconViewItem* )), this, SLOT(slotItemSelected(QIconViewItem*)));
|
||||
modulesScroller->addChild(modulesView);
|
||||
moduleTabs->addTab(modulesScroller, (*it).caption);
|
||||
overviewPages.append(modulesScroller);
|
||||
}
|
||||
}
|
||||
|
||||
windowStack->addWidget(moduleTabs);
|
||||
windowStack->raiseWidget(moduleTabs);
|
||||
setCentralWidget(windowStack);
|
||||
}
|
||||
|
||||
void MainWindow::buildActions()
|
||||
{
|
||||
KStdAction::quit(this, SLOT( close() ), actionCollection());
|
||||
|
||||
resetModule = new KAction(i18n("Undo Changes"), 0, this,
|
||||
SLOT(showAllModules()), actionCollection(), "resetModule" );
|
||||
resetModule->setEnabled(false);
|
||||
|
||||
defaultModule = new KAction(i18n("Reset to Defaults"), 0, this,
|
||||
SLOT(showAllModules()), actionCollection(), "defaultModule" );
|
||||
defaultModule->setEnabled(false);
|
||||
|
||||
if( embeddedWindows ) {
|
||||
showAllAction = new KAction(i18n("Overview"), QApplication::reverseLayout() ? "forward" : "back", 0, this,
|
||||
SLOT(showAllModules()), actionCollection(), "showAll" );
|
||||
showAllAction->setEnabled(false);
|
||||
}
|
||||
|
||||
aboutModuleAction = new KAction(i18n("About Current Module"), 0, this, SLOT(aboutCurrentModule()), actionCollection(), "help_about_module");
|
||||
resetModuleHelp();
|
||||
|
||||
// Search
|
||||
QHBox *hbox = new QHBox(0);
|
||||
hbox->setMaximumWidth( 400 );
|
||||
|
||||
KcmSearch* search = new KcmSearch(&modulesViewList, hbox, "search");
|
||||
hbox->setStretchFactor(search,1);
|
||||
connect(search, SIGNAL(searchHits(const QString &, int *, int)), this, SLOT(slotSearchHits(const QString &, int *, int)));
|
||||
|
||||
QVBox *vbox = new QVBox(hbox);
|
||||
generalHitLabel = new QLabel(vbox);
|
||||
vbox->setStretchFactor(generalHitLabel,1);
|
||||
advancedHitLabel = new QLabel(vbox);
|
||||
vbox->setStretchFactor(advancedHitLabel,1);
|
||||
|
||||
hbox->setStretchFactor(vbox,1);
|
||||
|
||||
// "Search:" label
|
||||
QLabel *searchLabel = new QLabel( this, "SearchLabel");
|
||||
searchLabel->setText( i18n("&Search:") );
|
||||
searchLabel->setFont(KGlobalSettings::toolBarFont());
|
||||
searchLabel->setMargin(2);
|
||||
searchText = new KWidgetAction( searchLabel, i18n("&Search:"), Key_F6, 0, 0, actionCollection(), "searchText" );
|
||||
searchLabel->setBuddy( search );
|
||||
|
||||
// The search box.
|
||||
searchAction = new KWidgetAction( hbox, i18n( "Search System Settings" ), 0,
|
||||
0, 0, actionCollection(), "search" );
|
||||
searchAction->setShortcutConfigurable( false );
|
||||
searchAction->setAutoSized( true );
|
||||
QWhatsThis::add( search, i18n( "Search Bar<p>Enter a search term." ) );
|
||||
|
||||
// The Clear search box button.
|
||||
KToolBarButton *clearWidget = new KToolBarButton(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase",
|
||||
0, this);
|
||||
searchClear = new KWidgetAction( clearWidget, QString(""), CTRL+Key_L, search, SLOT(clear()),
|
||||
actionCollection(), "searchReset");
|
||||
connect(clearWidget, SIGNAL(clicked()), searchClear, SLOT(activate()));
|
||||
searchClear->setWhatsThis( i18n( "Reset Search\n"
|
||||
"Resets the search so that "
|
||||
"all items are shown again." ) );
|
||||
|
||||
// Top level pages.
|
||||
QValueList<MenuItem> subMenus = menu->menuList();
|
||||
QValueList<MenuItem>::iterator it;
|
||||
for ( it = subMenus.begin(); it != subMenus.end(); ++it ) {
|
||||
if( (*it).menu ) {
|
||||
KServiceGroup::Ptr group = KServiceGroup::group( (*it).subMenu );
|
||||
if ( !group ){
|
||||
kdDebug() << "Invalid Group \"" << (*it).subMenu << "\". Check your installation."<< endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
KRadioAction *newAction = new KRadioAction( group->caption(), group->icon(), KShortcut(), this,
|
||||
SLOT(slotTopPage()), actionCollection(), group->relPath() );
|
||||
pageActions.append(newAction);
|
||||
kdDebug() << "relpath is :" << group->relPath() << endl;
|
||||
}
|
||||
}
|
||||
pageActions.at(0)->setChecked(true);
|
||||
}
|
||||
|
||||
void MainWindow::aboutCurrentModule()
|
||||
{
|
||||
if(!groupWidget)
|
||||
return;
|
||||
|
||||
KCModuleProxy* module = groupWidget->currentModule();
|
||||
if( module && module->aboutData() ){
|
||||
KAboutApplication dlg( module->aboutData() );
|
||||
dlg.exec();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::groupModulesFinished()
|
||||
{
|
||||
showAllModules();
|
||||
}
|
||||
|
||||
void MainWindow::showAllModules()
|
||||
{
|
||||
windowStack->raiseWidget(moduleTabs);
|
||||
|
||||
// Reset the widget for normal all widget viewing
|
||||
groupWidget = 0;
|
||||
widgetChange();
|
||||
|
||||
if( embeddedWindows ) {
|
||||
showAllAction->setEnabled(false);
|
||||
}
|
||||
aboutModuleAction->setEnabled(false);
|
||||
|
||||
searchText->setEnabled(true);
|
||||
searchClear->setEnabled(true);
|
||||
searchAction->setEnabled(true);
|
||||
|
||||
KRadioAction *currentRadioAction;
|
||||
for ( currentRadioAction = pageActions.first(); currentRadioAction; currentRadioAction = pageActions.next()) {
|
||||
currentRadioAction->setEnabled(true);
|
||||
}
|
||||
|
||||
resetModuleHelp();
|
||||
}
|
||||
|
||||
void MainWindow::slotItemSelected( QIconViewItem *item ){
|
||||
ModuleIconItem *mItem = (ModuleIconItem *)item;
|
||||
|
||||
if( !mItem )
|
||||
return;
|
||||
|
||||
groupWidget = moduleItemToWidgetDict.find(mItem);
|
||||
scrollView = moduleItemToScrollerDict.find(mItem);
|
||||
|
||||
if(groupWidget==0) {
|
||||
QValueList<KCModuleInfo> list = mItem->modules;
|
||||
KDialogBase::DialogType type = KDialogBase::IconList;
|
||||
if(list.count() == 1) {
|
||||
type=KDialogBase::Plain;
|
||||
}
|
||||
|
||||
scrollView = new KCScrollView(windowStack);
|
||||
groupWidget = new KCMultiWidget(type, scrollView->viewport(), "moduleswidget");
|
||||
scrollView->addChild(groupWidget);
|
||||
windowStack->addWidget(scrollView);
|
||||
moduleItemToScrollerDict.insert(mItem,scrollView);
|
||||
moduleItemToWidgetDict.insert(mItem,groupWidget);
|
||||
|
||||
connect(groupWidget, SIGNAL(aboutToShow( KCModuleProxy * )), this, SLOT(updateModuleHelp( KCModuleProxy * )));
|
||||
connect(groupWidget, SIGNAL(aboutToShowPage( QWidget* )), this, SLOT(widgetChange()));
|
||||
connect(groupWidget, SIGNAL(finished()), this, SLOT(groupModulesFinished()));
|
||||
connect(groupWidget, SIGNAL(close()), this, SLOT(showAllModules()));
|
||||
|
||||
QValueList<KCModuleInfo>::iterator it;
|
||||
for ( it = list.begin(); it != list.end(); ++it ){
|
||||
qDebug("adding %s %s", (*it).moduleName().latin1(), (*it).fileName().latin1());
|
||||
groupWidget->addModule( *it );
|
||||
}
|
||||
groupWidget->reparent(scrollView->viewport(), 0, QPoint());
|
||||
scrollView->reparent(windowStack, 0, QPoint());
|
||||
}
|
||||
|
||||
if( embeddedWindows ) {
|
||||
windowStack->raiseWidget( scrollView );
|
||||
|
||||
setCaption( mItem->text() );
|
||||
showAllAction->setEnabled(true);
|
||||
searchText->setEnabled(false);
|
||||
searchClear->setEnabled(false);
|
||||
searchAction->setEnabled(false);
|
||||
|
||||
KRadioAction *currentRadioAction;
|
||||
for ( currentRadioAction = pageActions.first(); currentRadioAction; currentRadioAction = pageActions.next()) {
|
||||
currentRadioAction->setEnabled(false);
|
||||
}
|
||||
|
||||
} else {
|
||||
scrollView->show();
|
||||
}
|
||||
groupWidget->show();
|
||||
|
||||
// We resize and expand the window if neccessary, but only once the window has been updated.
|
||||
// Some modules seem to dynamically change thier size. The new size is only available
|
||||
// once the dialog is updated. :-/ -SBE
|
||||
QTimer::singleShot(0,this,SLOT(timerResize()));
|
||||
}
|
||||
|
||||
void MainWindow::timerResize() {
|
||||
QSize currentSize = size();
|
||||
QSize newSize = currentSize.expandedTo(sizeHint());
|
||||
// Avoid resizing if possible.
|
||||
if(newSize!=currentSize) {
|
||||
resize(newSize);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::updateModuleHelp( KCModuleProxy *currentModule ) {
|
||||
if ( currentModule->aboutData() ) {
|
||||
aboutModuleAction->setText(i18n("Help menu->about <modulename>", "About %1").arg(
|
||||
currentModule->moduleInfo().moduleName().replace("&","&&")));
|
||||
aboutModuleAction->setIcon(currentModule->moduleInfo().icon());
|
||||
aboutModuleAction->setEnabled(true);
|
||||
}
|
||||
else {
|
||||
resetModuleHelp();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::resetModuleHelp() {
|
||||
aboutModuleAction->setText(i18n("About Current Module"));
|
||||
aboutModuleAction->setIconSet(QIconSet());
|
||||
aboutModuleAction->setEnabled(false);
|
||||
}
|
||||
|
||||
void MainWindow::widgetChange() {
|
||||
QString name;
|
||||
if( groupWidget && groupWidget->currentModule()) {
|
||||
name = groupWidget->currentModule()->moduleInfo().moduleName();
|
||||
}
|
||||
|
||||
if( !groupWidget ) {
|
||||
setCaption( "" );
|
||||
|
||||
ModulesView *modulesView;
|
||||
for( modulesView = modulesViewList.first(); modulesView; modulesView = modulesViewList.next()) {
|
||||
modulesView->clearSelection();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::slotTopPage() {
|
||||
KRadioAction *clickedRadioAction = (KRadioAction *)sender();
|
||||
selectedPage = pageActions.find(clickedRadioAction);
|
||||
|
||||
KRadioAction *currentRadioAction;
|
||||
for ( currentRadioAction = pageActions.first(); currentRadioAction; currentRadioAction = pageActions.next()) {
|
||||
currentRadioAction->setChecked(currentRadioAction==clickedRadioAction);
|
||||
}
|
||||
|
||||
windowStack->raiseWidget(overviewPages.at(selectedPage));
|
||||
}
|
||||
|
||||
void MainWindow::slotSearchHits(const QString &query, int *hitList, int length) {
|
||||
if(query=="") {
|
||||
generalHitLabel->setText("");
|
||||
advancedHitLabel->setText("");
|
||||
} else {
|
||||
|
||||
if(length>=1) {
|
||||
generalHitLabel->setText(i18n("%1 hit in General","%1 hits in General",hitList[0]).arg(hitList[0]));
|
||||
}
|
||||
|
||||
if(length>=2) {
|
||||
advancedHitLabel->setText(i18n("%1 hit in Advanced","%1 hits in Advanced",hitList[1]).arg(hitList[1]));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#include "mainwindow.moc"
|
@ -0,0 +1,111 @@
|
||||
/**
|
||||
* This file is part of the System Settings package
|
||||
* Copyright (C) 2005 Benjamin C Meyer (ben+systempreferences at meyerhome dot net)
|
||||
*
|
||||
* 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 library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <kmainwindow.h>
|
||||
#include <kcmoduleinfo.h>
|
||||
#include <ktabwidget.h>
|
||||
#include <qptrdict.h>
|
||||
#include <qlabel.h>
|
||||
#include <kactionclasses.h>
|
||||
#include <kiconviewsearchline.h>
|
||||
|
||||
#include "kcscrollview.h"
|
||||
#include "kcmodulemenu.h"
|
||||
|
||||
class QWidgetStack;
|
||||
class QIconViewItem;
|
||||
class KCMultiWidget;
|
||||
class ModulesView;
|
||||
class KAction;
|
||||
class KWidgetAction;
|
||||
class KCModule;
|
||||
class KCModuleProxy;
|
||||
|
||||
class MainWindow : public KMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWindow(bool embed=true, const QString &menufile="systemsettings",
|
||||
QWidget *parent=0, const char *name=0);
|
||||
~MainWindow();
|
||||
|
||||
private slots:
|
||||
void slotItemSelected( QIconViewItem* item );
|
||||
void showAllModules();
|
||||
void aboutCurrentModule();
|
||||
void updateModuleHelp( KCModuleProxy * );
|
||||
|
||||
void resetModuleHelp();
|
||||
void groupModulesFinished();
|
||||
|
||||
void widgetChange();
|
||||
void timerResize();
|
||||
void slotTopPage();
|
||||
void slotSearchHits(const QString &query, int *hitList, int length);
|
||||
|
||||
private:
|
||||
KCModuleMenu *menu;
|
||||
bool embeddedWindows;
|
||||
QWidgetStack *windowStack;
|
||||
KTabWidget *moduleTabs;
|
||||
|
||||
QPtrList<ModulesView> modulesViewList;
|
||||
QPtrList<QIconView> viewList;
|
||||
|
||||
KCMultiWidget *groupWidget;
|
||||
KCScrollView *scrollView;
|
||||
|
||||
QPtrDict<KCMultiWidget> moduleItemToWidgetDict;
|
||||
QPtrDict<KCScrollView> moduleItemToScrollerDict;
|
||||
|
||||
QPtrList<KRadioAction> pageActions;
|
||||
QPtrList<KCScrollView> overviewPages;
|
||||
int selectedPage;
|
||||
|
||||
KAction *resetModule;
|
||||
KAction *defaultModule;
|
||||
|
||||
KAction *showAllAction;
|
||||
KWidgetAction *searchText;
|
||||
KAction *searchClear;
|
||||
KWidgetAction *searchAction;
|
||||
|
||||
KAction *aboutModuleAction;
|
||||
|
||||
void buildMainWidget();
|
||||
void buildActions();
|
||||
|
||||
QLabel *generalHitLabel;
|
||||
QLabel *advancedHitLabel;
|
||||
|
||||
/**
|
||||
* If someone wants to report a bug
|
||||
* against a module with no about data
|
||||
* we construct one for him
|
||||
**/
|
||||
KAboutData *dummyAbout;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,36 @@
|
||||
#temporary till KDE4 and it can be renamed
|
||||
xdg_apps_DATA = audioencoding.desktop defaultapplication.desktop kcmfontinst.desktop kcm_knetworkconfmodule_ss.desktop laptoppowermanagement.desktop medianotifications.desktop
|
||||
|
||||
xdg_menu_DATA = system-settings.menu
|
||||
|
||||
xdg_mergedmenu_DATA = system-settings-merge.menu
|
||||
xdg_mergedmenudir = $(xdg_menudir)/applications-merged
|
||||
|
||||
xdg_directory_DATA = \
|
||||
kde-settings-accessibility_ss.directory \
|
||||
kde-settings-advanced.directory \
|
||||
kde-settings-advancedusersettings.directory \
|
||||
kde-settings-appearance.directory \
|
||||
kde-settings-computeradministration.directory \
|
||||
kde-settings-defaultapplications.directory \
|
||||
kde-settings-general.directory \
|
||||
kde-settings-keyboardmouse.directory \
|
||||
kde-settings-laptops.directory \
|
||||
kde-settings-looknfeel2.directory \
|
||||
kde-settings-networkconnections.directory \
|
||||
kde-settings-networkconnectivity.directory \
|
||||
kde-settings-networksettings.directory \
|
||||
kde-settings-notifications.directory \
|
||||
kde-settings-panel.directory \
|
||||
kde-settings-personal.directory \
|
||||
kde-settings-power.directory \
|
||||
kde-settings-regional.directory \
|
||||
kde-settings-sharing.directory \
|
||||
kde-settings-splashscreen.directory \
|
||||
kde-settings-system.directory \
|
||||
kde-settings-useraccount.directory \
|
||||
kde-settings-windowbehavior.directory \
|
||||
system-settings.directory
|
||||
|
||||
#install-data-local:
|
||||
# kbuildsycoca
|
@ -0,0 +1,62 @@
|
||||
# KDE Config File
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
X-KDE-RootOnly=true
|
||||
|
||||
## Keep this out of kcontrol
|
||||
#Categories=QT;KDE;X-KDE-settings-network;Configuration-KDE-Network-mdk;
|
||||
X-KDE-ModuleType=Library
|
||||
X-KDE-Library=knetworkconfmodule
|
||||
X-KDE-FactoryName=knetworkconfmodule
|
||||
Type=Application
|
||||
Exec=kcmshell kcm_knetworkconfmodule
|
||||
Icon=knetworkconf
|
||||
DocPath=knetworkconf/index.docbook
|
||||
|
||||
Comment=Configure Network Connections
|
||||
Comment[ar]=إعداد إتصالات الشبكة
|
||||
Comment[bg]=Настройка на системните връзки
|
||||
Comment[br]=Kefluniañ ar c'hevreadennoù rouedad
|
||||
Comment[da]=Indstil netværksforbindelser
|
||||
Comment[de]=Netzwerkverbindungen konfigurieren
|
||||
Comment[el]=Ρύθμιση συνδέσεων δικτύου
|
||||
Comment[es]=Configurar conexiones de red
|
||||
Comment[et]=Võrguühenduste seadistamine
|
||||
Comment[ga]=Cumraigh Naisc Líonra
|
||||
Comment[gl]=Configurazón das Conexóns de Rede
|
||||
Comment[ja]=ネットワーク接続の設定
|
||||
Comment[nl]=Netwerkverbindingen instellen
|
||||
Comment[pt]=Configurar as Ligações de Rede
|
||||
Comment[pt_BR]=Configuração das Conexões da Rede
|
||||
Comment[sv]=Anpassa nätverksanslutningar
|
||||
Terminal=false
|
||||
Name=Network Connections
|
||||
Name[ar]=الإتصالات الشبكية
|
||||
Name[bg]=Системни връзки
|
||||
Name[br]=Kevreadurioù rouedad
|
||||
Name[da]=Netværksforbindelser
|
||||
Name[de]=Netzwerkverbindungen
|
||||
Name[el]=Συνδέσεις δικτύου
|
||||
Name[es]=Conexiones de red
|
||||
Name[et]=Võrguühendused
|
||||
Name[ga]=Naisc Líonra
|
||||
Name[gl]=Conexóns de Rede
|
||||
Name[ja]=ネットワーク接続
|
||||
Name[nl]=Netwerkverbindingen
|
||||
Name[pt]=Ligações de Rede
|
||||
Name[pt_BR]=Conexões de Rede
|
||||
Name[sv]=Nätverksanslutningar
|
||||
Keywords=Network,DNS,routes,interfaces
|
||||
Keywords[br]=Rouedad,DNS,hentoù,etrefasoù
|
||||
Keywords[da]=Netværk,DNS,route,grænseflade
|
||||
Keywords[de]=Netzwerk,DNS,Routen,Schnittstellen
|
||||
Keywords[el]=δίκτυο,DNS,routes,διασύνδεση
|
||||
Keywords[es]=Red,DNS,rutas,interfaces
|
||||
Keywords[et]=Võrk,DNS,marsruudid,liidesed
|
||||
Keywords[ga]=Líonra,DNS,róid,comhéadain
|
||||
Keywords[gl]=Rede,DNS,rotas,interfaces
|
||||
Keywords[ja]=ネットワーク,DNS,ルート,インターフェース
|
||||
Keywords[nl]=netwerk,DNS,routes,interfaces,netwerkkaart
|
||||
Keywords[pt]=rede,DNS,rotas,interfaces
|
||||
Keywords[pt_BR]=Rede,DNS,rotas,interfaces
|
||||
Keywords[sv]=Nätverk,DNS,route,gränssnitt
|
@ -0,0 +1,20 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
|
||||
Name=Accessibility
|
||||
Name[ar]=تسهيل الوصول
|
||||
Name[bg]=Достъпност
|
||||
Name[br]=Haezadusted
|
||||
Name[da]=Tilgængelighed
|
||||
Name[de]=Barrierefreiheit
|
||||
Name[el]=Προσβασιμότητα
|
||||
Name[es]=Accesibilidad
|
||||
Name[et]=Hõlbustus
|
||||
Name[ga]=Inrochtaineacht
|
||||
Name[gl]=Acesibilidade
|
||||
Name[ja]=アクセシビリティ
|
||||
Name[nl]=Toegankelijkheid
|
||||
Name[pt]=Acessibilidade
|
||||
Name[pt_BR]=Acessibilidade
|
||||
Name[sv]=Handikappstöd
|
||||
Icon=access
|
@ -0,0 +1,19 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Advanced
|
||||
Name[ar]=متقدّم
|
||||
Name[bg]=Разширени
|
||||
Name[br]=Barek
|
||||
Name[da]=Avanceret
|
||||
Name[de]=Fortgeschritten
|
||||
Name[el]=Προχωρημένα
|
||||
Name[es]=Avanzada
|
||||
Name[et]=Muud
|
||||
Name[ga]=Casta
|
||||
Name[gl]=Avanzado
|
||||
Name[ja]=詳細
|
||||
Name[nl]=Geavanceerd
|
||||
Name[pt]=Avançado
|
||||
Name[pt_BR]=Avançado
|
||||
Name[sv]=Avancerat
|
||||
Icon=kcmsystem
|
@ -0,0 +1,20 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
|
||||
Name=Advanced User Settings
|
||||
Name[ar]=تعيينات المستخدم المتقدمة
|
||||
Name[bg]=Разширени потребителски настройки
|
||||
Name[br]=Dibarzhoù arveriad barek
|
||||
Name[da]=Advancerede brugerindstillinger
|
||||
Name[de]=Benutzereinstellungen für Fortgeschrittene
|
||||
Name[el]=Ρυθμίσεις προχωρημένου χρήστη
|
||||
Name[es]=Preferencias avanzadas de usuario
|
||||
Name[et]=Muud kasutaja seadistused
|
||||
Name[ga]=Ardsocruithe Úsáideora
|
||||
Name[gl]=Configurazón Avanzada dos Usuários
|
||||
Name[ja]=詳細なユーザ設定
|
||||
Name[nl]=Geavanceerde gebruikersinstellingen
|
||||
Name[pt]=Configuração Avançada do Utilizador
|
||||
Name[pt_BR]=Configurações Avançadas para Usuário
|
||||
Name[sv]=Advancerade användarinställningar
|
||||
Icon=userconfig.png
|
@ -0,0 +1,36 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Appearance
|
||||
Name[ar]=المظهر
|
||||
Name[bg]=Изглед
|
||||
Name[br]=Neuziadur
|
||||
Name[cs]=Vzhled
|
||||
Name[cy]=Golwg
|
||||
Name[da]=Udseende
|
||||
Name[de]=Erscheinungsbild
|
||||
Name[el]=Εμφάνιση
|
||||
Name[es]=Apariencia
|
||||
Name[et]=Välimus
|
||||
Name[fr]=Apparence
|
||||
Name[ga]=Cuma
|
||||
Name[gl]=Aparéncia
|
||||
Name[it]=Aspetto
|
||||
Name[ja]=外観
|
||||
Name[ka]=იერსახე
|
||||
Name[lt]=Išvaizda
|
||||
Name[mt]=Apparenza
|
||||
Name[nl]=Uiterlijk
|
||||
Name[pa]=ਝਲਕ
|
||||
Name[pl]=Wygląd
|
||||
Name[pt]=Aparência
|
||||
Name[pt_BR]=Aparência
|
||||
Name[ru]=Внешний вид
|
||||
Name[rw]=Imigaragarire
|
||||
Name[sk]=Vzhľad
|
||||
Name[sr]=Изглед
|
||||
Name[sr@Latn]=Izgled
|
||||
Name[sv]=Utseende
|
||||
Name[tr]=Görünüm
|
||||
Name[xx]=xxAppearancexx
|
||||
Name[zh_CN]=外观
|
||||
Icon=looknfeel
|
@ -0,0 +1,19 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Type=Directory
|
||||
Name=Computer Administration
|
||||
Name[ar]=إدارة الحاسوب
|
||||
Name[bg]=Администриране на компютъра
|
||||
Name[br]=Melestradur an urzhiater
|
||||
Name[da]=Computeradministration
|
||||
Name[de]=Rechneradministration
|
||||
Name[el]=Διαχείριση υπολογιστή
|
||||
Name[es]=Administrador del ordenador
|
||||
Name[et]=Arvuti haldamine
|
||||
Name[gl]=Administrazón do Ordenador
|
||||
Name[ja]=コンピュータの管理
|
||||
Name[nl]=Computerbeheer
|
||||
Name[pt]=Administração do Computador
|
||||
Name[pt_BR]=Administração do computador
|
||||
Name[sv]=Datoradministration
|
||||
Icon=systemtray
|
@ -0,0 +1,18 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=General
|
||||
Name[ar]=عام
|
||||
Name[bg]=Общи
|
||||
Name[br]=Pennañ
|
||||
Name[da]=Generelt
|
||||
Name[de]=Allgemein
|
||||
Name[el]=Γενικά
|
||||
Name[et]=Üldine
|
||||
Name[ga]=Ginearálta
|
||||
Name[gl]=Xeral
|
||||
Name[ja]=全般
|
||||
Name[nl]=Algemeen
|
||||
Name[pt]=Geral
|
||||
Name[pt_BR]=Geral
|
||||
Name[sv]=Allmänt
|
||||
Icon=kcontrol
|
@ -0,0 +1,21 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
|
||||
Name=Keyboard & Mouse
|
||||
Name[ar]=لوحة المفاتيح و الفأرة
|
||||
Name[bg]=Клавиатура и мишка
|
||||
Name[br]=Stokellaoueg ha logodenn
|
||||
Name[cs]=Uživatelé a skupiny
|
||||
Name[da]=Tastatur og mus
|
||||
Name[de]=Tastatur & Maus
|
||||
Name[el]=Πληκτρολόγιο & ποντίκι
|
||||
Name[es]=Teclado y ratón
|
||||
Name[et]=Klaviatuur ja hiir
|
||||
Name[ga]=Méarchlár & Luch
|
||||
Name[gl]=Teclado e Rato
|
||||
Name[ja]=キーボードとマウス
|
||||
Name[nl]=Toetsenbord en muis
|
||||
Name[pt]=Teclado e Rato
|
||||
Name[pt_BR]=Teclado & Mouse
|
||||
Name[sv]=Tangentbord och mus
|
||||
Icon=keyboard
|
@ -0,0 +1,21 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Laptops & Power
|
||||
Name[ar]=الحاواسب المحمولة و الطاقة
|
||||
Name[bg]=Лаптопи и захранване
|
||||
Name[br]=Hezougioù ha gremm
|
||||
Name[cs]=Napájení notebooku
|
||||
Name[da]=Bærbare & Strøm
|
||||
Name[de]=Notebooks & Leistung
|
||||
Name[el]=Φορητοί & ενέργεια
|
||||
Name[es]=Portátiles y energía
|
||||
Name[et]=Sülearvutid ja voolutarve
|
||||
Name[ga]=Ríomhairí Glúine & Cumhacht
|
||||
Name[gl]=Portáteis e Enerxia
|
||||
Name[ja]=ラップトップと電源
|
||||
Name[nl]=Laptops en energie
|
||||
Name[pt]=Portáteis e Energia
|
||||
Name[pt_BR]=Laptops & Energia
|
||||
Name[sv]=Bärbara datorer och strömförsörjning
|
||||
Name[zh_CN]=笔记本和电源
|
||||
Icon=energy
|
@ -0,0 +1,17 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Type=Directory
|
||||
Name=Look & Feel
|
||||
Name[br]=Neuz ha feson
|
||||
Name[da]=Udseende og fornemmelse
|
||||
Name[de]=Erscheinungsbild
|
||||
Name[el]=Όψη & αίσθηση
|
||||
Name[es]=Aspecto
|
||||
Name[et]=Välimus
|
||||
Name[gl]=Aparéncia e Comportamento
|
||||
Name[ja]=外観
|
||||
Name[nl]=Uiterlijk en gedrag
|
||||
Name[pt]=Aparência e Comportamento
|
||||
Name[pt_BR]=Aparência
|
||||
Name[sv]=Utseende och känsla
|
||||
Icon=looknfeel
|
@ -0,0 +1,19 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Type=Directory
|
||||
Name=Network & Connectivity
|
||||
Name[ar]=الشبكة و الإتصالية
|
||||
Name[bg]=Връзки и свързаност
|
||||
Name[da]=Netværk og forbindelser
|
||||
Name[de]=Netzwerk & Verbindungen
|
||||
Name[el]=Δίκτυο & συνδεσιμότητα
|
||||
Name[es]=Red y conectividad
|
||||
Name[et]=Võrk
|
||||
Name[ga]=Líonra & Nascacht
|
||||
Name[gl]=Rede e Conexóns
|
||||
Name[ja]=ネットワークと接続
|
||||
Name[nl]=Netwerkverbindingen
|
||||
Name[pt]=Rede e Conectividade
|
||||
Name[pt_BR]=Rede & Conectividade
|
||||
Name[sv]=Nätverk och anslutningar
|
||||
Icon=network
|
@ -0,0 +1,19 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Network Settings
|
||||
Name[ar]=تعيينات الشبكة
|
||||
Name[bg]=Мрежови настройки
|
||||
Name[br]=Kefluniadur ar Rouedad
|
||||
Name[da]=Netværksindstillinger
|
||||
Name[de]=Netzwerkeinstellungen
|
||||
Name[el]=Ρυθμίσεις δικτύου
|
||||
Name[es]=Preferencias de red
|
||||
Name[et]=Võrguseadistused
|
||||
Name[ga]=Socruithe Líonra
|
||||
Name[gl]=Configurazón da Rede
|
||||
Name[ja]=ネットワークの設定
|
||||
Name[nl]=Netwerkinstellingen
|
||||
Name[pt]=Configuração da Rede
|
||||
Name[pt_BR]=Configurações de Rede
|
||||
Name[sv]=Nätverksinställningar
|
||||
Icon=network_local
|
@ -0,0 +1,19 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
|
||||
Name=Notifications
|
||||
Name[ar]=التبليغات
|
||||
Name[bg]=Уведомяване
|
||||
Name[br]=Kemennadoù
|
||||
Name[da]=Underretninger
|
||||
Name[de]=Benachrichtigungen
|
||||
Name[el]=Ειδοποιήσεις
|
||||
Name[es]=Notificaciones
|
||||
Name[et]=Märguanded
|
||||
Name[gl]=Notificazóns
|
||||
Name[ja]=通知
|
||||
Name[nl]=Meldingen
|
||||
Name[pt]=Notificações
|
||||
Name[pt_BR]=Notificações
|
||||
Name[sv]=Underrättelser
|
||||
Icon=knotify
|
@ -0,0 +1,26 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Panel
|
||||
Name[bg]=Панел
|
||||
Name[br]=Panell
|
||||
Name[de]=Kontrollleiste
|
||||
Name[el]=Πίνακας
|
||||
Name[et]=Paneel
|
||||
Name[fr]=Tableau de bord
|
||||
Name[ga]=Painéal
|
||||
Name[gl]=Painel
|
||||
Name[it]=Pannello
|
||||
Name[ja]=パネル
|
||||
Name[ka]=პანელი
|
||||
Name[lt]=Pultas
|
||||
Name[mt]=Pannell
|
||||
Name[nl]=Paneel
|
||||
Name[pa]=ਪੈਨਲ
|
||||
Name[pt]=Painel
|
||||
Name[pt_BR]=Painel
|
||||
Name[ru]=Панель
|
||||
Name[rw]=Umwanya
|
||||
Name[sr]=Панел
|
||||
Name[xx]=xxPanelxx
|
||||
Name[zh_CN]=面板
|
||||
Icon=background
|
@ -0,0 +1,18 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Personal
|
||||
Name[ar]=الشخصي
|
||||
Name[bg]=Личен
|
||||
Name[br]=Diouzhoc'h
|
||||
Name[da]=Personlig indstilling
|
||||
Name[de]=Persönlich
|
||||
Name[el]=Προσωπικά
|
||||
Name[et]=Isiklik
|
||||
Name[ga]=Pearsanta
|
||||
Name[gl]=Persoal
|
||||
Name[nl]=Persoonlijk
|
||||
Name[pt]=Pessoal
|
||||
Name[pt_BR]=Pessoal
|
||||
Name[sv]=Personlig inställning
|
||||
Icon=personal
|
||||
|
@ -0,0 +1,32 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Power
|
||||
Name[ar]=الطاقة
|
||||
Name[bg]=Захранване
|
||||
Name[br]=Gremm
|
||||
Name[cs]=Napájení
|
||||
Name[cy]=Pŵer
|
||||
Name[da]=Strøm
|
||||
Name[de]=Leistung
|
||||
Name[el]=Ενέργεια
|
||||
Name[es]=Energía
|
||||
Name[et]=Voolutarve
|
||||
Name[fr]=Alimentation
|
||||
Name[ga]=Cumhacht
|
||||
Name[gl]=Enerxia
|
||||
Name[it]=Energia
|
||||
Name[ja]=電源
|
||||
Name[lt]=Maitinimas
|
||||
Name[mt]=Elettriku
|
||||
Name[nl]=Energie
|
||||
Name[pa]=ਊਰਜਾ(power)
|
||||
Name[pl]=Zasilanie
|
||||
Name[pt]=Energia
|
||||
Name[pt_BR]=Energia
|
||||
Name[ru]=Управление питанием
|
||||
Name[sk]=Napájanie
|
||||
Name[sv]=Strömförsörjning
|
||||
Name[tr]=Güç
|
||||
Name[xx]=xxPowerxx
|
||||
Name[zh_CN]=电源
|
||||
Icon=ktip
|
@ -0,0 +1,19 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Regional & Language
|
||||
Name[ar]=أقليمي و اللغة
|
||||
Name[bg]=Регион и език
|
||||
Name[br]=Rannvro ha yezh
|
||||
Name[da]=Region og sprog
|
||||
Name[de]=Regionaleinstellungen & Sprache
|
||||
Name[el]=Τοπικές ρυθμίσεις & γλώσσα
|
||||
Name[es]=Local e idioma
|
||||
Name[et]=Regioon ja keel
|
||||
Name[ga]=Réigiúnach & Teanga
|
||||
Name[gl]=Rexión e Língua
|
||||
Name[ja]=国と言語
|
||||
Name[nl]=Regio en toegankelijkheid
|
||||
Name[pt]=Região e Língua
|
||||
Name[pt_BR]=Configurações Regionais & Idioma
|
||||
Name[sv]=Region och språk
|
||||
Icon=locale
|
@ -0,0 +1,19 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Icon=ksplash
|
||||
|
||||
Name=Splash Screen
|
||||
Name[bg]=Начален екран
|
||||
Name[br]=Skramm-degemer
|
||||
Name[da]=Startskærm
|
||||
Name[de]=Begrüßungsbildschirm
|
||||
Name[el]=Εισαγωγική οθόνη
|
||||
Name[es]=Pantalla de bienvenida
|
||||
Name[et]=Käivitusekraan
|
||||
Name[ga]=Splancscáileán
|
||||
Name[gl]=Pantalla de Início
|
||||
Name[ja]=スプラッシュスクリーン
|
||||
Name[nl]=Opstartscherm
|
||||
Name[pt]=Ecrã Inicial
|
||||
Name[pt_BR]=Tela de Apresentação
|
||||
Name[sv]=Startskärm
|
@ -0,0 +1,32 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=System
|
||||
Name[ar]=النظام
|
||||
Name[bg]=Система
|
||||
Name[br]=Reizhiad
|
||||
Name[cs]=Systém
|
||||
Name[cy]=Cysawd
|
||||
Name[el]=Σύστημα
|
||||
Name[es]=Sistema
|
||||
Name[et]=Süsteem
|
||||
Name[fr]=Système
|
||||
Name[ga]=Córas
|
||||
Name[gl]=Sistema
|
||||
Name[it]=Sistema
|
||||
Name[ja]=システム
|
||||
Name[ka]=სისტემა
|
||||
Name[lt]=Sistema
|
||||
Name[mt]=Sistema
|
||||
Name[nl]=Systeem
|
||||
Name[pa]=ਸਿਸਟਮ
|
||||
Name[pt]=Sistema
|
||||
Name[pt_BR]=Sistema
|
||||
Name[ru]=Система
|
||||
Name[rw]=Sisitemu
|
||||
Name[sk]=Systém
|
||||
Name[sr]=Систем
|
||||
Name[sr@Latn]=Sistem
|
||||
Name[tr]=Sistem
|
||||
Name[xx]=xxSystemxx
|
||||
Name[zh_CN]=系统
|
||||
Icon=package_system
|
@ -0,0 +1,19 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Icon=kcmkwm
|
||||
|
||||
Name=Window Behavior
|
||||
Name[ar]=سوك النوافذ
|
||||
Name[bg]=Поведение на прозорците
|
||||
Name[br]=Emzalc'h ar prenester
|
||||
Name[da]=Vinduesopførsel
|
||||
Name[de]=Fensterverhalten
|
||||
Name[el]=Συμπεριφορά παραθύρων
|
||||
Name[es]=Comportamiento de la ventana
|
||||
Name[et]=Akende käitumine
|
||||
Name[gl]=Comportamento das Fiestras
|
||||
Name[ja]=ウィンドウの挙動
|
||||
Name[nl]=Venstergedrag
|
||||
Name[pt]=Comportamento das Janelas
|
||||
Name[pt_BR]=Comportamento da Janela
|
||||
Name[sv]=Fönsterbeteende
|
@ -0,0 +1,43 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
X-KDE-Library=laptop
|
||||
X-KDE-FactoryName=laptop
|
||||
X-KDE-Init=laptop
|
||||
Exec=kcmshell laptop
|
||||
Icon=laptop_battery
|
||||
Type=Application
|
||||
DocPath=kcontrol/laptop/index.html
|
||||
|
||||
## Keep this out of kcontrol
|
||||
#Categories=Qt;KDE;X-KDE-settings-power;
|
||||
|
||||
Comment=Laptop Power Management
|
||||
Comment[ar]=تدبير الطاقة للحاسوب النقال
|
||||
Comment[bg]=Захранване за лаптоп
|
||||
Comment[da]=Strømhåndtering for bærbar computer
|
||||
Comment[de]=Laptop-Energieverwaltung
|
||||
Comment[el]=Διαχείριση ενέργειας φορητού υπολογιστή
|
||||
Comment[es]=Administración de energía del portátil
|
||||
Comment[et]=Sülearvuti voolutarbe haldus
|
||||
Comment[gl]=Xestión de Enerxia de Portáteis
|
||||
Comment[ja]=ラップトップの電源管理
|
||||
Comment[nl]=Laptop energiebeheer
|
||||
Comment[pt]=Gestão de Energia de Portáteis
|
||||
Comment[pt_BR]=Gerenciamento de Energia do Laptop
|
||||
Comment[sv]=Strömhantering för bärbar dator
|
||||
Name=Power Management
|
||||
Name[ar]=إدخار الطاقة
|
||||
Name[bg]=Захранване
|
||||
Name[br]=Merañ ar gremm
|
||||
Name[da]=Energisparefunktion
|
||||
Name[de]=Energierverwaltung
|
||||
Name[el]=Διαχείριση ενέργειας
|
||||
Name[es]=Administración de energía
|
||||
Name[et]=Voolutarbe haldus
|
||||
Name[gl]=Xestión da Enerxia
|
||||
Name[ja]=電源管理
|
||||
Name[nl]=Energiebeheer
|
||||
Name[pt]=Gestão de Energia
|
||||
Name[pt_BR]=Gerenciamento de Energia
|
||||
Name[sv]=Energisparfunktion
|
||||
Init=klaptop_check
|
@ -0,0 +1,57 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
#DocPath=
|
||||
Icon=system
|
||||
Exec=kcmshell media
|
||||
|
||||
|
||||
X-KDE-Library=media
|
||||
X-KDE-FactoryName=media
|
||||
#X-KDE-ParentApp=kcontrol
|
||||
|
||||
Name=Storage Media Notifications
|
||||
Name[ar]=تبليغات وسائط التخزين
|
||||
Name[bg]=Уведомяване за съхраняващи устройства
|
||||
Name[da]=Underretninger om lagringsmedie
|
||||
Name[de]=Speichermedien-Benachrichtigungen
|
||||
Name[el]=Ειδοποιήσεις μέσων αποθήκευσης
|
||||
Name[es]=Notificaciones de los medios de almacenamiento
|
||||
Name[et]=Andmekandjate märguanded
|
||||
Name[gl]=Notificazón de Dispositivos de Armacenaxe
|
||||
Name[ja]=記憶メディアの通知
|
||||
Name[nl]=Meldingen opslagmedia
|
||||
Name[pt]=Notificação de Suportes de Armazenamento
|
||||
Name[pt_BR]=Notificações de Mídia de Armazenamento
|
||||
Name[sv]=Underrättelser om lagringsmedia
|
||||
|
||||
Comment=Configure Storage Media Notifications
|
||||
Comment[ar]=إعداد تبليغات وسائط التخزين
|
||||
Comment[bg]=Настройка на уведомяването за съхраняващи устройства
|
||||
Comment[da]=Indstil underretninger om lagringsmedie
|
||||
Comment[de]=Benachrichtigungen für Speichermedien konfigurieren
|
||||
Comment[el]=Ρύθμιση ειδοποιήσεων μέσων αποθήκευσης
|
||||
Comment[es]=Configurar las notificaciones de los medios de almacenamiento
|
||||
Comment[et]=Andmekandjate märguannete seadistused
|
||||
Comment[gl]=Configura as Notificazóns dos Médios de Armacenaxe
|
||||
Comment[ja]=記憶メディアの通知を設定
|
||||
Comment[nl]=Meldingen van opslagmedia instellen
|
||||
Comment[pt]=Configurar as Notificações de Suportes de Armazenamento
|
||||
Comment[pt_BR]=Configurar Notificações de Mídia de Armazenamento
|
||||
Comment[sv]=Anpassa underrättelser om lagringsmedia
|
||||
|
||||
Keywords=storage,media,usb,cdrom,device
|
||||
Keywords[da]=lagring,medie,usb,cdrom,enhed
|
||||
Keywords[de]=Speicher,Medien,USB,CD-ROM,Gerät
|
||||
Keywords[el]=αποθήκευση,μέσα,usb,cdrom,συσκευή
|
||||
Keywords[es]=almacenamientos,medios,usb,cdrom,dispositivo
|
||||
Keywords[et]=andmekandjad,usb,cdrom,seade
|
||||
Keywords[ga]=stóras,meáin,usb,cdrom,gléas
|
||||
Keywords[gl]=armacenaxe,media,usb,cdrom,dispositivo
|
||||
Keywords[ja]=ストレージ,メディア,usb,cdrom,デバイス
|
||||
Keywords[nl]=storage,opslag,media,usb,cd-rom,device,apparaat,mp3-speler,usb-stick,geheugenkaart,ipod,iriver,mediaspeler,muziek
|
||||
Keywords[pt]=armazenamento,meio,suporte,usb,cdrom,dispositivo
|
||||
Keywords[pt_BR]=armazenamento,mídia,usb,cdrom,dispositivo
|
||||
Keywords[sv]=lagring,media,usb,cdrom,enhet
|
||||
|
||||
#Categories=Qt;KDE;X-KDE-settings-peripherals
|
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
|
||||
|
||||
<Menu>
|
||||
<!-- The following menus are hidden by default -->
|
||||
<Menu>
|
||||
<Name>System Settings</Name>
|
||||
<Directory>system-settings.directory</Directory>
|
||||
<MergeFile>../system-settings.menu</MergeFile>
|
||||
</Menu>
|
||||
</Menu>
|
@ -0,0 +1,385 @@
|
||||
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
|
||||
<!--
|
||||
This menu layout aims to conform to the structure described here:
|
||||
|
||||
https://wiki.kubuntu.org/KubuntuSystemSettingsUsability
|
||||
|
||||
-->
|
||||
<Menu>
|
||||
<Name>System Settings</Name>
|
||||
|
||||
<DefaultLayout>
|
||||
<Menuname>General</Menuname>
|
||||
<Separator/>
|
||||
<Menuname>Advanced</Menuname>
|
||||
</DefaultLayout>
|
||||
|
||||
<!-- General page -->
|
||||
<Menu>
|
||||
<Name>General</Name>
|
||||
<Directory>kde-settings-general.directory</Directory>
|
||||
|
||||
<Layout>
|
||||
<Menuname>Personal</Menuname>
|
||||
<Separator/>
|
||||
<Menuname>Look and Feel</Menuname>
|
||||
<Separator/>
|
||||
<Menuname>Computer Administration</Menuname>
|
||||
<Separator/>
|
||||
<Menuname>Network and Connectivity</Menuname>
|
||||
</Layout>
|
||||
|
||||
<!-- Personal -->
|
||||
<Menu>
|
||||
<Name>Personal</Name>
|
||||
<Directory>kde-settings-personal.directory</Directory>
|
||||
|
||||
<Layout>
|
||||
<Menuname>User Account</Menuname>
|
||||
<Menuname>Regional</Menuname>
|
||||
<Menuname>Accessibility</Menuname>
|
||||
<Menuname>Default Applications</Menuname>
|
||||
<!--<Menuname>Appearance</Menuname>
|
||||
<Menuname>Panel</Menuname>
|
||||
<Menuname>Desktop</Menuname>-->
|
||||
<Merge type="menus" />
|
||||
</Layout>
|
||||
|
||||
<!-- User Account -->
|
||||
<Menu>
|
||||
<Name>User Account</Name>
|
||||
<Directory>kde-settings-useraccount.directory</Directory>
|
||||
<Layout>
|
||||
<Filename>kde-kcm_useraccount.desktop</Filename>
|
||||
<Filename>kde-desktoppath.desktop</Filename>
|
||||
<Merge type="files" />
|
||||
</Layout>
|
||||
<Include>
|
||||
<Filename>kde-kcm_useraccount.desktop</Filename>
|
||||
<Filename>kde-desktoppath.desktop</Filename>
|
||||
<Category>X-KDE-systemsettings-personal-useraccount</Category>
|
||||
</Include>
|
||||
</Menu>
|
||||
|
||||
<!-- Regional -->
|
||||
<Menu>
|
||||
<Name>Regional</Name>
|
||||
<Directory>kde-settings-regional.directory</Directory>
|
||||
<Layout>
|
||||
<Filename>kde-language.desktop</Filename>
|
||||
<Filename>kde-spellchecking.desktop</Filename>
|
||||
<Filename>kde-keyboard_layout.desktop</Filename>
|
||||
<Merge type="files" />
|
||||
</Layout>
|
||||
<Include>
|
||||
<Filename>kde-language.desktop</Filename>
|
||||
<Filename>kde-spellchecking.desktop</Filename>
|
||||
<Filename>kde-keyboard_layout.desktop</Filename>
|
||||
<Category>X-KDE-systemsettings-personal-regional</Category>
|
||||
</Include>
|
||||
</Menu>
|
||||
|
||||
<!-- Accessibility -->
|
||||
<Menu>
|
||||
<Name>Accessibility</Name>
|
||||
<Directory>kde-settings-accessibility_ss.directory</Directory>
|
||||
<Layout>
|
||||
<Filename>kde-kcmaccess.desktop</Filename>
|
||||
<Filename>kde-khotkeys.desktop</Filename>
|
||||
<Merge type="files" />
|
||||
</Layout>
|
||||
<Include>
|
||||
<Filename>kde-kcmaccess.desktop</Filename>
|
||||
<Filename>kde-khotkeys.desktop</Filename>
|
||||
<Category>X-KDE-systemsettings-personal-accessibility</Category>
|
||||
</Include>
|
||||
</Menu>
|
||||
|
||||
<!-- Default Applications -->
|
||||
<Menu>
|
||||
<Name>Default Applications</Name>
|
||||
<Directory>kde-settings-defaultapplications.directory</Directory>
|
||||
<Layout>
|
||||
<Filename>kde-defaultapplication.desktop</Filename>
|
||||
<Filename>kde-filetypes.desktop</Filename>
|
||||
<Merge type="files" />
|
||||
</Layout>
|
||||
<Include>
|
||||
<Filename>kde-defaultapplication.desktop</Filename>
|
||||
<Filename>kde-filetypes.desktop</Filename>
|
||||
<Category>X-KDE-systemsettings-personal</Category>
|
||||
</Include>
|
||||
</Menu>
|
||||
|
||||
</Menu>
|
||||
|
||||
|
||||
<!-- Look and Feel -->
|
||||
<Menu>
|
||||
<Name>Look and Feel</Name>
|
||||
<Directory>kde-settings-looknfeel2.directory</Directory>
|
||||
<Layout>
|
||||
<Menuname>Appearance</Menuname>
|
||||
<Menuname>Desktop</Menuname>
|
||||
<Filename>kde-ksplashthememgr.desktop</Filename>
|
||||
<Menuname>Window Behavior</Menuname>
|
||||
<Menuname>Notifications</Menuname>
|
||||
<Merge type="files" />
|
||||
</Layout>
|
||||
<Include>
|
||||
<Filename>kde-ksplashthememgr.desktop</Filename>
|
||||
<Category>X-KDE-systemsettings-lookandfeel</Category>
|
||||
</Include>
|
||||
|
||||
<!-- Appearance -->
|
||||
<Menu>
|
||||
<Name>Appearance</Name>
|
||||
<Directory>kde-settings-appearance.directory</Directory>
|
||||
<Layout>
|
||||
<Filename>kde-colors.desktop</Filename>
|
||||
<Filename>kde-fonts.desktop</Filename>
|
||||
<Filename>kcmgtk-xdg.desktop</Filename>
|
||||
<Filename>kde-kcmfontinst.desktop</Filename>
|
||||
<Filename>kde-icons.desktop</Filename>
|
||||
<Filename>kde-style.desktop</Filename>
|
||||
<Filename>kde-kwindecoration.desktop</Filename>
|
||||
<Merge type="files" />
|
||||
</Layout>
|
||||
<Include>
|
||||
<Filename>kde-colors.desktop</Filename>
|
||||
<Filename>kde-fonts.desktop</Filename>
|
||||
<Filename>kcmgtk-xdg.desktop</Filename>
|
||||
<Filename>kde-kcmfontinst.desktop</Filename>
|
||||
<Filename>kde-icons.desktop</Filename>
|
||||
<Filename>kde-style.desktop</Filename>
|
||||
<Filename>kde-kwindecoration.desktop</Filename>
|
||||
<Category>X-KDE-systemsettings-lookandfeel-appearance</Category>
|
||||
</Include>
|
||||
</Menu>
|
||||
|
||||
<!-- Desktop -->
|
||||
<Menu>
|
||||
<Name>Desktop</Name>
|
||||
<Directory>kde-settings-desktop.directory</Directory>
|
||||
|
||||
<Layout>
|
||||
<Filename>kde-background.desktop</Filename>
|
||||
<Filename>kde-screensaver.desktop</Filename>
|
||||
<Filename>kde-desktopbehavior.desktop</Filename>
|
||||
<Filename>kde-desktop.desktop</Filename>
|
||||
<Merge type="files" />
|
||||
</Layout>
|
||||
|
||||
<Include>
|
||||
<Filename>kde-background.desktop</Filename>
|
||||
<Filename>kde-screensaver.desktop</Filename>
|
||||
<Filename>kde-desktopbehavior.desktop</Filename>
|
||||
<Filename>kde-desktop.desktop</Filename>
|
||||
<Category>X-KDE-systemsettings-lookandfeel-desktop</Category>
|
||||
</Include>
|
||||
</Menu>
|
||||
|
||||
<!-- Window Behavior -->
|
||||
<Menu>
|
||||
<Name>Window Behavior</Name>
|
||||
<Directory>kde-settings-windowbehavior.directory</Directory>
|
||||
|
||||
<Layout>
|
||||
<Filename>kde-kwinoptions.desktop</Filename>
|
||||
<Filename>kde-kwinrules.desktop</Filename>
|
||||
<Merge type="files" />
|
||||
</Layout>
|
||||
<Include>
|
||||
<Filename>kde-kwinoptions.desktop</Filename>
|
||||
<Filename>kde-kwinrules.desktop</Filename>
|
||||
<Category>X-KDE-systemsettings-lookandfeel-windowbehavior</Category>
|
||||
</Include>
|
||||
</Menu>
|
||||
|
||||
<!-- Notifications -->
|
||||
<Menu>
|
||||
<Name>Notifications</Name>
|
||||
<Directory>kde-settings-notifications.directory</Directory>
|
||||
|
||||
<Layout>
|
||||
<Filename>kde-kcmnotify.desktop</Filename>
|
||||
<Filename>kde-bell.desktop</Filename>
|
||||
<Filename>kde-medianotifications.desktop</Filename>
|
||||
<Merge type="files" />
|
||||
</Layout>
|
||||
<Include>
|
||||
<Filename>kde-kcmnotify.desktop</Filename>
|
||||
<Filename>kde-bell.desktop</Filename>
|
||||
<Filename>kde-medianotifications.desktop</Filename>
|
||||
<Category>X-KDE-systemsettings-lookandfeel-notifications</Category>
|
||||
</Include>
|
||||
</Menu>
|
||||
|
||||
</Menu>
|
||||
|
||||
<!-- Computer Administration -->
|
||||
<Menu>
|
||||
<Name>Computer Administration</Name>
|
||||
<Directory>kde-settings-computeradministration.directory</Directory>
|
||||
|
||||
<Layout>
|
||||
<Filename>kde-clock.desktop</Filename>
|
||||
<Menuname>Keyboard and Mouse</Menuname>
|
||||
<Filename>kde-displayconfig.desktop</Filename>
|
||||
<Filename>kde-arts.desktop</Filename>
|
||||
<Filename>kde-printers.desktop</Filename>
|
||||
<!-- <Filename>kde-laptoppowermanagement.desktop</Filename>-->
|
||||
<!-- <Filename>kde-thinkpad.desktop</Filename>
|
||||
<Filename>kde-kvaio.desktop</Filename>-->
|
||||
<Filename>kde-userconfig.desktop</Filename>
|
||||
<Merge type="files" />
|
||||
</Layout>
|
||||
<Include>
|
||||
<Filename>kde-clock.desktop</Filename>
|
||||
<Filename>kde-displayconfig.desktop</Filename>
|
||||
<Filename>kde-arts.desktop</Filename>
|
||||
<Filename>kde-printers.desktop</Filename>
|
||||
<!-- <Filename>kde-laptoppowermanagement.desktop</Filename>-->
|
||||
<!-- <Filename>kde-thinkpad.desktop</Filename>
|
||||
<Filename>kde-kvaio.desktop</Filename>-->
|
||||
<Filename>kde-userconfig.desktop</Filename>
|
||||
<Category>X-KDE-systemsettings-administration</Category>
|
||||
</Include>
|
||||
|
||||
<!-- Keyboard and Mouse -->
|
||||
<Menu>
|
||||
<Name>Keyboard and Mouse</Name>
|
||||
<Directory>kde-settings-keyboardmouse.directory</Directory>
|
||||
<Layout>
|
||||
<Filename>kde-keyboard.desktop</Filename>
|
||||
<Filename>kde-keys.desktop</Filename>
|
||||
<Filename>kde-mouse.desktop</Filename>
|
||||
<Filename>kde-joystick.desktop</Filename>
|
||||
<Merge type="files" />
|
||||
</Layout>
|
||||
<Include>
|
||||
<Filename>kde-keyboard.desktop</Filename>
|
||||
<Filename>kde-keys.desktop</Filename>
|
||||
<Filename>kde-mouse.desktop</Filename>
|
||||
<Filename>kde-joystick.desktop</Filename>
|
||||
<Category>X-KDE-systemsettings-administration-keyboardmouse</Category>
|
||||
</Include>
|
||||
</Menu>
|
||||
|
||||
</Menu>
|
||||
|
||||
<!-- Network and Connectivity -->
|
||||
<Menu>
|
||||
<Name>Network and Connectivity</Name>
|
||||
<Directory>kde-settings-networkconnectivity.directory</Directory>
|
||||
|
||||
<Layout>
|
||||
<Menuname>Network Settings</Menuname>
|
||||
<Menuname>Sharing</Menuname>
|
||||
<Merge type="files" />
|
||||
</Layout>
|
||||
|
||||
<Include>
|
||||
<Category>X-KDE-systemsettings-network</Category>
|
||||
</Include>
|
||||
|
||||
<!-- Network Settings -->
|
||||
<Menu>
|
||||
<Name>Network Settings</Name>
|
||||
<Directory>kde-settings-networksettings.directory</Directory>
|
||||
|
||||
<Layout>
|
||||
<Filename>kde-kcm_knetworkconfmodule_ss.desktop</Filename>
|
||||
<Filename>kde-proxy.desktop</Filename>
|
||||
<Filename>kde-netpref.desktop</Filename>
|
||||
<Filename>kde-kcm_kdnssd.desktop</Filename>
|
||||
<Merge type="files" />
|
||||
</Layout>
|
||||
|
||||
<Include>
|
||||
<Filename>kde-kcm_knetworkconfmodule_ss.desktop</Filename>
|
||||
<Filename>kde-proxy.desktop</Filename>
|
||||
<Filename>kde-netpref.desktop</Filename>
|
||||
<Filename>kde-kcm_kdnssd.desktop</Filename>
|
||||
<Category>X-KDE-systemsettings-network-networksettings</Category>
|
||||
</Include>
|
||||
</Menu>
|
||||
|
||||
<!-- Sharing -->
|
||||
<Menu>
|
||||
<Name>Sharing</Name>
|
||||
<Directory>kde-settings-sharing.directory</Directory>
|
||||
|
||||
<Layout>
|
||||
<Filename>kde-kcmkrfb.desktop</Filename>
|
||||
<Filename>kde-fileshare.desktop</Filename>
|
||||
<Filename>kde-lanbrowser.desktop</Filename>
|
||||
<Merge type="files" />
|
||||
</Layout>
|
||||
|
||||
<Include>
|
||||
<Filename>kde-kcmkrfb.desktop</Filename>
|
||||
<Filename>kde-fileshare.desktop</Filename>
|
||||
<Filename>kde-lanbrowser.desktop</Filename>
|
||||
<Category>X-KDE-systemsettings-network-sharing</Category>
|
||||
</Include>
|
||||
</Menu>
|
||||
</Menu>
|
||||
</Menu>
|
||||
|
||||
<!-- Advanced -->
|
||||
<Menu>
|
||||
<Name>Advanced</Name>
|
||||
|
||||
<Directory>kde-settings-advanced.directory</Directory>
|
||||
<Layout>
|
||||
<Menuname>System</Menuname>
|
||||
<Separator/>
|
||||
<Menuname>Advanced User Settings</Menuname>
|
||||
</Layout>
|
||||
|
||||
<!-- System Administration -->
|
||||
<Menu>
|
||||
<Name>System</Name>
|
||||
<Directory>kde-settings-system.directory</Directory>
|
||||
|
||||
<Layout>
|
||||
<Filename>kde-mountconfig.desktop</Filename>
|
||||
<Filename>kde-serviceconfig.desktop</Filename>
|
||||
<Filename>kde-kdm.desktop</Filename>
|
||||
<Merge type="files" />
|
||||
</Layout>
|
||||
|
||||
<Include>
|
||||
<Filename>kde-mountconfig.desktop</Filename>
|
||||
<Filename>kde-serviceconfig.desktop</Filename>
|
||||
<Filename>kde-kdm.desktop</Filename>
|
||||
<Category>X-KDE-systemsettings-advancedadministration</Category>
|
||||
</Include>
|
||||
</Menu>
|
||||
|
||||
<!-- Advanced User Settings -->
|
||||
<Menu>
|
||||
<Name>Advanced User Settings</Name>
|
||||
<Directory>kde-settings-advancedusersettings.directory</Directory>
|
||||
|
||||
<Layout>
|
||||
<Filename>kde-audioencoding.desktop</Filename>
|
||||
<Filename>kde-kresources.desktop</Filename>
|
||||
<Filename>kde-kcmkded.desktop</Filename>
|
||||
<Filename>kde-kcmsmserver.desktop</Filename>
|
||||
<Merge type="files" />
|
||||
</Layout>
|
||||
|
||||
<Include>
|
||||
<Filename>kde-audioencoding.desktop</Filename>
|
||||
<Filename>kde-kresources.desktop</Filename>
|
||||
<Filename>kde-kcmkded.desktop</Filename>
|
||||
<Filename>kde-kcmsmserver.desktop</Filename>
|
||||
<Category>X-KDE-systemsettings-advancedusersettings</Category>
|
||||
</Include>
|
||||
</Menu>
|
||||
</Menu>
|
||||
</Menu>
|
||||
|
@ -0,0 +1,52 @@
|
||||
/**
|
||||
* This file is part of the System Settings package
|
||||
* Copyright (C) 2005 Benjamin C Meyer
|
||||
* <ben+systempreferences at meyerhome dot net>
|
||||
*
|
||||
* 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 library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "moduleiconitem.h"
|
||||
#include <kiconloader.h>
|
||||
|
||||
#define IMAGE_SIZE 32
|
||||
|
||||
ModuleIconItem::ModuleIconItem( KIconView *parent, KCModuleInfo module)
|
||||
: QIconViewItem( parent, module.moduleName(),
|
||||
SmallIcon( module.icon(), IMAGE_SIZE ) ),
|
||||
currentState( KIcon::ActiveState), imageName(module.icon())
|
||||
{
|
||||
modules.append(module);
|
||||
}
|
||||
|
||||
ModuleIconItem::ModuleIconItem( KIconView *parent, const QString &text,
|
||||
const QString &imageName )
|
||||
: QIconViewItem( parent, text, SmallIcon( imageName, IMAGE_SIZE ) ),
|
||||
currentState( KIcon::ActiveState )
|
||||
{
|
||||
this->imageName = imageName;
|
||||
}
|
||||
|
||||
void ModuleIconItem::loadIcon( bool enabled )
|
||||
{
|
||||
int newState = enabled ? KIcon::DefaultState : KIcon::DisabledState;
|
||||
if( newState == currentState )
|
||||
return;
|
||||
|
||||
currentState = newState;
|
||||
setPixmap( SmallIcon( imageName, IMAGE_SIZE, currentState ) );
|
||||
}
|
||||
|
@ -0,0 +1,57 @@
|
||||
/**
|
||||
* This file is part of the System Settings package
|
||||
* Copyright (C) 2005 Benjamin C Meyer
|
||||
* <ben+systempreferences at meyerhome dot net>
|
||||
*
|
||||
* 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 library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef MODULEICONITEM_H
|
||||
#define MODULEICONITEM_H
|
||||
|
||||
#include <kiconview.h>
|
||||
#include <kcmoduleinfo.h>
|
||||
|
||||
class ConfigModule;
|
||||
|
||||
/**
|
||||
* Stores information about what modules goes with this item.
|
||||
* Also provides means of loading the enabled/disabled image (see kcmsearch).
|
||||
*/
|
||||
class ModuleIconItem : public QIconViewItem
|
||||
{
|
||||
|
||||
public:
|
||||
ModuleIconItem( KIconView *parent, KCModuleInfo module );
|
||||
|
||||
ModuleIconItem( KIconView *parent, const QString &text,
|
||||
const QString &imageName );
|
||||
|
||||
/**
|
||||
* Update the icon to either be enabled or not.
|
||||
*/
|
||||
void loadIcon( bool enabled = true );
|
||||
|
||||
// The modules that go with this item
|
||||
QValueList<KCModuleInfo> modules;
|
||||
|
||||
private:
|
||||
int currentState;
|
||||
QString imageName;
|
||||
};
|
||||
|
||||
#endif // MODULEICONITEM_H
|
||||
|
@ -0,0 +1,173 @@
|
||||
/**
|
||||
* This file is part of the System Settings package
|
||||
* Copyright (C) 2005 Benjamin C Meyer (ben+systempreferences at meyerhome dot net)
|
||||
*
|
||||
* 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 library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "modulesview.h"
|
||||
|
||||
#include <qlabel.h>
|
||||
#include <klocale.h>
|
||||
#include <kservicegroup.h>
|
||||
#include <qlayout.h>
|
||||
#include <kiconloader.h>
|
||||
#include <kcmultidialog.h>
|
||||
#include <kdialogbase.h>
|
||||
#include <kiconviewsearchline.h>
|
||||
#include <kapplication.h>
|
||||
#include <kaboutapplication.h>
|
||||
#include <kdebug.h>
|
||||
#include <qiconview.h>
|
||||
|
||||
#include "kcmsearch.h"
|
||||
#include "moduleiconitem.h"
|
||||
#include "kcmodulemenu.h"
|
||||
|
||||
ModulesView::ModulesView( KCModuleMenu *rootMenu, const QString &menuPath, QWidget *parent,
|
||||
const char *name ) : QWidget( parent, name ), rootMenu( NULL )
|
||||
{
|
||||
this->rootMenu = rootMenu;
|
||||
this->menuPath = menuPath;
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout( this, 11, 6, "layout" );
|
||||
|
||||
displayName = this->rootMenu->caption;
|
||||
|
||||
QValueList<MenuItem> subMenus = rootMenu->menuList(menuPath);
|
||||
QValueList<MenuItem>::iterator it;
|
||||
for ( it = subMenus.begin(); it != subMenus.end(); ++it ){
|
||||
if( !(*it).menu )
|
||||
continue;
|
||||
|
||||
// After the first time around add a line
|
||||
if( it != subMenus.begin() ){
|
||||
QFrame *line = new QFrame( this, "line");
|
||||
line->setFrameShadow( QFrame::Sunken );
|
||||
line->setFrameShape( QFrame::HLine );
|
||||
layout->addWidget( line );
|
||||
}
|
||||
|
||||
// Build the row of modules/icons
|
||||
createRow( (*it).subMenu, layout );
|
||||
}
|
||||
layout->addStretch(1);
|
||||
|
||||
// Make empty iconView for the search widget
|
||||
if( groups.count()==0 ) {
|
||||
RowIconView *iconView = new RowIconView( this, "groupiconview" );
|
||||
iconView->setLineWidth( 0 );
|
||||
groups.append( iconView );
|
||||
}
|
||||
setPaletteBackgroundColor( groups[0]->paletteBackgroundColor() );
|
||||
|
||||
// Align them up!
|
||||
{
|
||||
|
||||
uint most = 0;
|
||||
QValueList<RowIconView*>::iterator it;
|
||||
for ( it = groups.begin(); it != groups.end(); ++it ){
|
||||
QIconViewItem *item = (*it)->firstItem();
|
||||
while( item ) {
|
||||
if(item->width() > most)
|
||||
most = item->width();
|
||||
item = item->nextItem();
|
||||
}
|
||||
}
|
||||
|
||||
for ( it = groups.begin(); it != groups.end(); ++it )
|
||||
(*it)->setGridX(most);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
ModulesView::~ModulesView()
|
||||
{
|
||||
}
|
||||
|
||||
void ModulesView::createRow( const QString &parentPath, QBoxLayout *boxLayout )
|
||||
{
|
||||
KServiceGroup::Ptr group = KServiceGroup::group( parentPath );
|
||||
if ( !group ){
|
||||
kdDebug() << "Invalid Group \"" << parentPath << "\". Check your installation."<< endl;
|
||||
return;
|
||||
}
|
||||
|
||||
// Make header
|
||||
QHBoxLayout *rowLayout = new QHBoxLayout( 0, 0, 6, "rowLayout" );
|
||||
|
||||
// Heaer Icon
|
||||
QLabel *icon = new QLabel( this, "groupicon" );
|
||||
icon->setPixmap( SmallIcon( group->icon() ) );
|
||||
icon->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1,
|
||||
(QSizePolicy::SizeType)5, 0, 0, icon->sizePolicy().hasHeightForWidth() ) );
|
||||
rowLayout->addWidget( icon );
|
||||
|
||||
// Header Name
|
||||
QLabel *textLabel = new QLabel( this, "groupcaption" );
|
||||
textLabel->setText( group->caption() );
|
||||
textLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7,
|
||||
(QSizePolicy::SizeType)5, 0, 0, textLabel->sizePolicy().hasHeightForWidth()));
|
||||
QFont textLabel_font( textLabel->font() );
|
||||
textLabel_font.setBold( true );
|
||||
textLabel->setFont( textLabel_font );
|
||||
rowLayout->addWidget( textLabel );
|
||||
|
||||
boxLayout->addLayout( rowLayout );
|
||||
|
||||
// Make IconView
|
||||
RowIconView *iconView = new RowIconView( this, "groupiconview" );
|
||||
iconView->setFrameShape( RowIconView::StyledPanel );
|
||||
iconView->setLineWidth( 0 );
|
||||
iconView->setSpacing( 0 );
|
||||
iconView->setMargin( 0 );
|
||||
iconView->setItemsMovable( false );
|
||||
iconView->setSelectionMode(QIconView::NoSelection);
|
||||
groups.append( iconView );
|
||||
connect(iconView, SIGNAL( clicked( QIconViewItem* ) ),
|
||||
this, SIGNAL( itemSelected( QIconViewItem* ) ) );
|
||||
boxLayout->addWidget( iconView );
|
||||
|
||||
// Add all the items in their proper order
|
||||
QValueList<MenuItem> list = rootMenu->menuList( parentPath );
|
||||
QValueList<MenuItem>::iterator it;
|
||||
for ( it = list.begin(); it != list.end(); ++it ){
|
||||
if( !(*it).menu )
|
||||
(void)new ModuleIconItem( iconView, (*it).item );
|
||||
else
|
||||
{
|
||||
QString path = (*it).subMenu;
|
||||
KServiceGroup::Ptr group = KServiceGroup::group( path );
|
||||
if ( group ) {
|
||||
ModuleIconItem *item = new ModuleIconItem( ((KIconView*)iconView),
|
||||
group->caption(), group->icon() );
|
||||
item->modules = rootMenu->modules( path );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Force the height for those items that have two words.
|
||||
iconView->setMinimumHeight( iconView->minimumSizeHint().height() );
|
||||
}
|
||||
|
||||
void ModulesView::clearSelection() {
|
||||
QValueList<RowIconView*>::iterator it;
|
||||
for ( it = groups.begin(); it != groups.end(); ++it ) {
|
||||
(*it)->clearSelection();
|
||||
}
|
||||
}
|
||||
|
||||
#include "modulesview.moc"
|
@ -0,0 +1,100 @@
|
||||
/**
|
||||
* This file is part of the System Preferences package
|
||||
* Copyright (C) 2005 Benjamin C Meyer (ben+systempreferences at meyerhome dot net)
|
||||
*
|
||||
* 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 library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef MODULESVIEW_H
|
||||
#define MODULESVIEW_H
|
||||
|
||||
#include <kiconview.h>
|
||||
|
||||
/**
|
||||
* Overloaded to give a larger default size that fits with text of two lines.
|
||||
*/
|
||||
class RowIconView : public KIconView
|
||||
{
|
||||
|
||||
public:
|
||||
RowIconView( QWidget* parent, const char *name=0 )
|
||||
: KIconView( parent, name ){ };
|
||||
|
||||
// Figure out the hight/width to have only one row
|
||||
QSize minimumSizeHint() const {
|
||||
int width = 0;
|
||||
/*
|
||||
for ( QIconViewItem *item = firstItem(); item; item = item->nextItem() )
|
||||
width += item->width();
|
||||
width += spacing()*(count())+(margin()+frameWidth()+lineWidth()+midLineWidth())*2 ;
|
||||
*/
|
||||
|
||||
width = count()*gridX()+frameWidth()*2;
|
||||
|
||||
int height = 0;
|
||||
for ( QIconViewItem *item = firstItem(); item; item = item->nextItem() )
|
||||
if(item->height() > height)
|
||||
height = item->height();
|
||||
// I honestly don't know where the 4+4 is coming from...
|
||||
// What other spacing did I miss?
|
||||
height += (margin()+frameWidth()+spacing()+lineWidth()+midLineWidth())*2+8;
|
||||
|
||||
/*
|
||||
int h = fontMetrics().height();
|
||||
if ( h < 10 )
|
||||
h = 10;
|
||||
int f = 2 * frameWidth();
|
||||
int height = ( 2*h ) + f + spacing() * 2 + 32 + lineWidth()*2 + 10;
|
||||
*/
|
||||
return QSize( width, height );
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
class QBoxLayout;
|
||||
class KCModuleMenu;
|
||||
|
||||
/**
|
||||
* This widget contains the IconView's of all of the modules etc
|
||||
* It is the basic thing that users see.
|
||||
*/
|
||||
class ModulesView : public QWidget
|
||||
{
|
||||
// To search the groups
|
||||
friend class KcmSearch;
|
||||
|
||||
Q_OBJECT
|
||||
public:
|
||||
void clearSelection();
|
||||
QString displayName;
|
||||
|
||||
signals:
|
||||
void itemSelected( QIconViewItem* item );
|
||||
|
||||
public:
|
||||
ModulesView( KCModuleMenu *rootMenu, const QString &menuPath, QWidget *parent=0, const char *name=0 );
|
||||
~ModulesView();
|
||||
|
||||
private:
|
||||
QValueList<RowIconView*> groups;
|
||||
KCModuleMenu *rootMenu;
|
||||
QString menuPath;
|
||||
|
||||
void createRow( const QString &parentPath, QBoxLayout *layout );
|
||||
};
|
||||
|
||||
#endif // MODULESVIEW_H
|
||||
|
@ -0,0 +1,3 @@
|
||||
[MainWindow Toolbar mainToolBar]
|
||||
IconText=IconTextRight
|
||||
|
@ -0,0 +1,32 @@
|
||||
<!DOCTYPE kpartgui>
|
||||
<kpartgui name="systemsettings" version="1">
|
||||
|
||||
<MenuBar>
|
||||
<Menu name="file"><Text>&File</Text>
|
||||
<Action name="resetModule"/>
|
||||
<Action name="defaultModule"/>
|
||||
<Separator/>
|
||||
</Menu>
|
||||
|
||||
<Menu name="view"><Text>&View</Text>
|
||||
<Action name="showAll"/>
|
||||
</Menu>
|
||||
|
||||
<Menu name="help">
|
||||
<Action name="help_about_module" append="about_merge"/>
|
||||
</Menu>
|
||||
</MenuBar>
|
||||
|
||||
<ToolBar name="mainToolBar">
|
||||
<Action name="showAll"/>
|
||||
<Separator/>
|
||||
<Action name="searchReset"/>
|
||||
<Action name="searchText"/>
|
||||
<Action name="search"/>
|
||||
</ToolBar>
|
||||
|
||||
<ActionProperties>
|
||||
<Action name="showAll" />
|
||||
</ActionProperties>
|
||||
|
||||
</kpartgui>
|
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* This file is part of the System Settings package
|
||||
* Copyright (C) 2005 Benjamin C Meyer (ben+systempreferences at meyerhome dot net)
|
||||
*
|
||||
* 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 library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef VERSION_H
|
||||
#define VERSION_H
|
||||
|
||||
#define SYSTEM_SETTINGS_VERSION "0.2"
|
||||
|
||||
#endif // VERSION_H
|
||||
|
Loading…
Reference in new issue