summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt61
-rw-r--r--README2
m---------admin0
-rw-r--r--config.h.cmake17
-rw-r--r--dcop/client/marshall.cpp17
-rw-r--r--dcop/dcopclient.cpp17
-rw-r--r--doc/common/CMakeLists.txt35
-rw-r--r--doc/common/header.html8
-rw-r--r--doc/common/mainheader.html8
-rw-r--r--kate/data/CMakeLists.txt6
-rw-r--r--kate/data/Makefile.am6
-rw-r--r--kate/data/diff.xml6
-rw-r--r--kate/data/markdown.xml196
-rw-r--r--kate/data/update-files.xml3
-rw-r--r--kate/part/kateviewinternal.cpp59
-rw-r--r--kded/Mainpage.dox10
m---------libltdl0
-rw-r--r--licenses/CMakeLists.txt2
-rw-r--r--licenses/MIT17
-rw-r--r--licenses/Makefile.am2
-rw-r--r--tdecore/CMakeLists.txt2
-rw-r--r--tdecore/README.kiosk24
-rw-r--r--tdecore/kdebug.areas843
-rw-r--r--tdecore/kdebug.cpp8
-rw-r--r--tdecore/kmountpoint.cpp1
-rw-r--r--tdecore/ksimpledirwatch.cpp6
-rw-r--r--tdecore/kurl.cpp2
-rw-r--r--tdecore/malloc/malloc.c2
-rw-r--r--tdecore/tdeaboutdata.cpp4
-rw-r--r--tdecore/tdeaboutdata.h3
-rw-r--r--tdecore/tdehw/hwlibdaemons/CMakeLists.txt3
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/BrightnessService.cpp72
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/BrightnessService.h49
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/CMakeLists.txt74
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/CPUGovernorService.cpp73
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/CPUGovernorService.h46
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/DeviceServiceBase.cpp68
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/DeviceServiceBase.h45
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/HardwareControl.cpp118
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/HardwareControl.h81
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/InputEventsService.cpp112
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/InputEventsService.h51
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/PowerService.cpp277
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/PowerService.h73
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/PropertiesService.cpp63
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/PropertiesService.h56
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/hardwarecontrolService.cpp123
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/hardwarecontrolService.h114
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/interfaces/CMakeLists.txt52
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/interfaces/org.trinitydesktop.hardwarecontrol.xml96
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/main.cpp31
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/org.trinitydesktop.hardwarecontrol.conf62
-rw-r--r--tdecore/tdehw/hwlibdaemons/tdedbus/org.trinitydesktop.hardwarecontrol.service.cmake4
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp4
-rw-r--r--tdecore/tdesycoca.cpp2
-rw-r--r--tdecore/tdeversion.h4
-rw-r--r--tdehtml/CMakeLists.txt2
-rw-r--r--tdehtml/ecma/kjs_proxy.cpp4
-rw-r--r--tdehtml/misc/CMakeLists.txt1
-rw-r--r--tdehtml/misc/knsplugininstaller.cpp4
-rw-r--r--tdeio/kssl/kopenssl.cpp59
-rw-r--r--tdeio/tdefile/kpropertiesdialog.cpp4
-rw-r--r--tdeio/tdeio/global.cpp2
-rw-r--r--tdeio/tdeio/job.cpp36
-rw-r--r--tdeio/tdeio/kdirwatch.cpp6
-rw-r--r--tdeio/tdeio/krun.cpp16
-rw-r--r--tdeioslave/file/file.cpp16
-rw-r--r--tdeprint/kprinter.cpp14
-rw-r--r--tdeprint/kprinter.h4
-rw-r--r--tdesu/client.cpp18
-rw-r--r--tdeui/khelpmenu.cpp2
-rw-r--r--tdeui/kstdaction_p.h2
-rw-r--r--tdeui/tdeabouttde.cpp2
-rw-r--r--tdeui/tdefontdialog.cpp66
-rw-r--r--tdeui/tdefontdialog.h12
75 files changed, 2787 insertions, 603 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 852fc2b85..cd431dfda 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,13 +17,13 @@ cmake_minimum_required( VERSION 3.1 )
project( tdelibs )
set( PACKAGE tdelibs )
-set( VERSION R14.1.0 )
##### include essential cmake modules ###########
include( FindPkgConfig )
include( CheckIncludeFile )
+include( CheckIncludeFiles )
include( CheckSymbolExists )
include( CheckFunctionExists )
include( CheckCSourceCompiles )
@@ -40,6 +40,11 @@ include( TDEMacros )
include( TDESetupPaths )
+##### set version number ########################
+
+tde_set_project_version( )
+
+
##### setup and find essential stuff ############
tde_setup_paths( )
@@ -221,6 +226,7 @@ check_include_file( "dirent.h" HAVE_DIRENT_H )
check_include_file( "dld.h" HAVE_DLD_H )
check_include_file( "dlfcn.h" HAVE_DLFCN_H )
check_include_file( "dl.h" HAVE_DL_H )
+check_include_files( "sys/types.h;sys/dl.h" HAVE_SYS_DL_H )
check_include_file( "float.h" HAVE_FLOAT_H )
check_include_file( "fstab.h" HAVE_FSTAB_H )
check_include_file( "ieeefp.h" HAVE_IEEEFP_H )
@@ -233,6 +239,7 @@ check_include_file( "machine/soundcard.h" HAVE_MACHINE_SOUNDCARD_H )
check_include_file( "malloc.h" HAVE_MALLOC_H )
check_include_file( "memory.h" HAVE_MEMORY_H )
check_include_file( "mntent.h" HAVE_MNTENT_H )
+check_include_file( "sys/mntent.h" HAVE_SYS_MNTENT_H )
check_include_file( "ndir.h" HAVE_NDIR_H )
check_include_file( "netinet/in.h" HAVE_NETINET_IN_H )
check_include_file( "net/if.h" HAVE_NET_IF_H )
@@ -256,7 +263,7 @@ check_include_file( "sys/dir.h" HAVE_SYS_DIR_H )
check_include_file( "sys/filio.h" HAVE_SYS_FILIO_H )
check_include_file( "sys/mman.h" HAVE_SYS_MMAN_H )
check_include_file( "sys/mntent.h" HAVE_SYS_MNTENT_H )
-check_include_file( "sys/mnttab.h" HAVE_SYS_MNTTAB_H )
+check_include_files( "stdio.h;sys/mnttab.h" HAVE_SYS_MNTTAB_H )
check_include_file( "sys/mount.h" HAVE_SYS_MOUNT_H )
if( NOT HAVE_SYS_MOUNT_H )
find_path( SYS_MOUNT_PATH "sys/mount.h" )
@@ -276,9 +283,16 @@ check_include_file( "sys/ucred.h" HAVE_SYS_UCRED_H )
if( NOT HAVE_SYS_UCRED_H )
find_path( SYS_UCRED_PATH "sys/ucred.h" )
if( SYS_UCRED_PATH )
- set( HAVE_SYS_UCRED_H "1" )
+ set( HAVE_SYS_UCRED_H 1 )
endif( )
endif( )
+check_include_file( "ucred.h" HAVE_UCRED_H )
+if( NOT HAVE_UCRED_H )
+ find_path( UCRED_PATH "ucred.h" )
+ if( UCRED_PATH )
+ set( HAVE_UCRED_H 1 )
+ endif()
+endif()
check_include_file( "sys/xattr.h" HAVE_SYS_XATTR_H )
check_include_file( "termios.h" HAVE_TERMIOS_H )
check_include_file( "termio.h" HAVE_TERMIO_H )
@@ -373,6 +387,9 @@ else ()
find_package( Backtrace )
if ( Backtrace_FOUND )
set ( HAVE_BACKTRACE 1 )
+ else ()
+ set ( Backtrace_LIBRARY "" )
+ set ( Backtrace_HEADER "" )
endif ()
endif ()
check_cxx_source_compiles( "#include <cxxabi.h>
@@ -420,6 +437,7 @@ endif( HAVE_GETMNTINFO )
check_function_exists( getnameinfo HAVE_GETNAMEINFO )
check_function_exists( getpagesize HAVE_GETPAGESIZE )
check_function_exists( getpeereid HAVE_GETPEEREID )
+check_function_exists( getpeerucred HAVE_GETPEERUCRED )
check_function_exists( getpeername HAVE_GETPEERNAME )
check_function_exists( getprotobyname_r HAVE_GETPROTOBYNAME_R )
check_function_exists( getpt HAVE_GETPT )
@@ -459,6 +477,14 @@ check_function_exists( __argz_count HAVE___ARGZ_COUNT )
check_function_exists( __argz_next HAVE___ARGZ_NEXT )
check_function_exists( __argz_stringify HAVE___ARGZ_STRINGIFY )
check_function_exists( sendfile HAVE_SENDFILE )
+set( SENDFILE_LIBRARIES "" )
+if( NOT HAVE_SENDFILE)
+ check_library_exists( sendfile sendfile "" HAVE_SENDFILE_LIB )
+ if( HAVE_SENDFILE_LIB )
+ set( HAVE_SENDFILE 1 )
+ set( SENDFILE_LIBRARIES sendfile )
+ endif( HAVE_SENDFILE_LIB )
+endif()
check_function_exists( rindex HAVE_RINDEX )
check_function_exists( putenv HAVE_PUTENV )
check_function_exists( poll HAVE_POLL )
@@ -749,26 +775,29 @@ endif( WITH_LZMA )
##### check for pcsc ############################
-if( WITH_PCSC )
- find_path( PCSCLITE_INCLUDE_DIR pcsclite.h
- HINTS /usr/include/PCSC )
- find_library( PCSCLITE_LIBRARY NAMES pcsclite libpcsclite PCSC )
- if( PCSCLITE_LIBRARY AND PCSCLITE_INCLUDE_DIR )
- message( STATUS "Found PCSCLITE: ${PCSCLITE_LIBRARY}" )
- set( PCSCLITE_FOUND 1 )
- set( PCSCLITE_INCLUDE_DIRS ${PCSCLITE_INCLUDE_DIR} )
- set( PCSCLITE_LIBRARIES ${PCSCLITE_LIBRARY} )
- endif( PCSCLITE_LIBRARY AND PCSCLITE_INCLUDE_DIR )
+if( WITH_TDEHWLIB AND WITH_PCSC )
+ pkg_search_module( PCSCLITE libpcsclite )
+ if( NOT PCSCLITE_FOUND )
+ find_path( PCSCLITE_INCLUDE_DIR pcsclite.h
+ HINTS /usr/include/PCSC )
+ find_library( PCSCLITE_LIBRARY NAMES pcsclite libpcsclite PCSC )
+ if( PCSCLITE_LIBRARY AND PCSCLITE_INCLUDE_DIR )
+ message( STATUS "Found PCSCLITE: ${PCSCLITE_LIBRARY}" )
+ set( PCSCLITE_FOUND 1 )
+ set( PCSCLITE_INCLUDE_DIRS ${PCSCLITE_INCLUDE_DIR} )
+ set( PCSCLITE_LIBRARIES ${PCSCLITE_LIBRARY} )
+ endif( PCSCLITE_LIBRARY AND PCSCLITE_INCLUDE_DIR )
+ endif( NOT PCSCLITE_FOUND )
if( NOT PCSCLITE_FOUND )
tde_message_fatal( "PCSCLITE is requested, but not found on your system" )
endif( NOT PCSCLITE_FOUND )
set( HAVE_PCSC_SUPPORT 1 )
-endif( WITH_PCSC )
+endif( WITH_TDEHWLIB AND WITH_PCSC )
##### check for pkcs ############################
-if( WITH_PKCS )
+if( WITH_TDEHWLIB AND WITH_PKCS )
pkg_search_module( LIBPKCS11-HELPER libpkcs11-helper-1 )
if( NOT LIBPKCS11-HELPER_FOUND )
message(FATAL_ERROR "\nPKCS support was requested, but libpkcs11-helper-1 was not found on your system" )
@@ -790,7 +819,7 @@ endif( )
##### check for pkcs ############################
-if( WITH_CRYPTSETUP )
+if( WITH_TDEHWLIB AND WITH_CRYPTSETUP )
pkg_search_module( LIBCRYPTSETUP libcryptsetup )
if( NOT LIBCRYPTSETUP_FOUND )
find_library( LIBCRYPTSETUP_LIBRARY cryptsetup )
diff --git a/README b/README
index b131dc607..7973e5f21 100644
--- a/README
+++ b/README
@@ -10,7 +10,7 @@ In this file:
About tdelibs
-------------
-This is version R14.1.0 of the Trinity Desktop Environment [TDE] libraries.
+This is version R14.2.0~[DEVELOPMENT] of the Trinity Desktop Environment [TDE] libraries.
This package includes libraries that are central to the development and
execution of a KDE program, as well as internationalization files for these
diff --git a/admin b/admin
-Subproject a7f75ac0ff587d5b8694a1b78557597161f8104
+Subproject 9fdc22134b3f0ed3c0af126ca8b3a63ebbcaf4d
diff --git a/config.h.cmake b/config.h.cmake
index 2f382cc73..17a871252 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -174,6 +174,9 @@
/* Define to 1 if you have the <dl.h> header file. */
#cmakedefine HAVE_DL_H 1
+/* Define to 1 if you have the <sys/dl.h> header file. */
+#cmakedefine HAVE_SYS_DL_H 1
+
/* Define if your system has Linux Directory Notification */
#undef HAVE_DNOTIFY
@@ -240,6 +243,9 @@
/* Define to 1 if you have the `getpeereid' function. */
#cmakedefine HAVE_GETPEEREID 1
+/* Define to 1 if you have the `getpeerucred' function. */
+#cmakedefine HAVE_GETPEERUCRED 1
+
/* Define to 1 if you have the `getpeername' function. */
#cmakedefine HAVE_GETPEERNAME 1
@@ -651,6 +657,9 @@
/* Define to 1 if you have the <sys/ucred.h> header file. */
#cmakedefine HAVE_SYS_UCRED_H 1
+/* Define to 1 if you have the <ucred.h> header file. */
+#cmakedefine HAVE_UCRED_H 1
+
/* Define if system has the sys/xattr.h header. */
#cmakedefine HAVE_SYS_XATTR_H 1
@@ -1153,6 +1162,7 @@ __END_DECLS
#endif
#ifdef __cplusplus
extern "C"
+{
#endif
#if !defined(HAVE_VSNPRINTF_PROTO)
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
@@ -1161,7 +1171,7 @@ int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
int snprintf(char *str, size_t n, char const *fmt, ...);
#endif
#ifdef __cplusplus
-extern "C"
+}
#endif
#endif
@@ -1222,7 +1232,10 @@ extern "C"
#define HAVE_SETEUID_FAKE
#ifdef __cplusplus
extern "C"
+{
#endif
int seteuid(INT32_BASETYPE euid); /* defined in fakes.c */
+#ifdef __cplusplus
+}
+#endif
#endif
-
diff --git a/dcop/client/marshall.cpp b/dcop/client/marshall.cpp
index 5128be80b..68e3e3f57 100644
--- a/dcop/client/marshall.cpp
+++ b/dcop/client/marshall.cpp
@@ -158,7 +158,10 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
return demarshal( stream, TQVALUELIST_OBJECT_NAME_STRING "<" TQCSTRING_OBJECT_NAME_STRING ">" );
} else if ( type == TQSTRINGLIST_OBJECT_NAME_STRING )
{
- return demarshal( stream, TQVALUELIST_OBJECT_NAME_STRING "<" TQCSTRING_OBJECT_NAME_STRING ">" );
+ return demarshal( stream, TQVALUELIST_OBJECT_NAME_STRING "<" TQSTRING_OBJECT_NAME_STRING ">" );
+ } else if ( type == "TQStringVariantMap" )
+ {
+ return demarshal(stream, TQMAP_OBJECT_NAME_STRING "<" TQSTRING_OBJECT_NAME_STRING "," TQVARIANT_OBJECT_NAME_STRING ">");
} else if ( type == TQCOLOR_OBJECT_NAME_STRING )
{
TQColor c;
@@ -203,12 +206,12 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
KURL r;
stream >> r;
result = r.url().local8Bit();
- } else if ( type.left( 11 ) == TQVALUELIST_OBJECT_NAME_STRING "<" )
+ } else if ( type.left( 12 ) == TQVALUELIST_OBJECT_NAME_STRING "<" )
{
- if ( (uint)type.find( '>', 11 ) != type.length() - 1 )
+ if ( (uint)type.find( '>', 12 ) != type.length() - 1 )
return result;
- TQString nestedType = type.mid( 11, type.length() - 12 );
+ TQString nestedType = type.mid( 12, type.length() - 13 );
if ( nestedType.isEmpty() )
return result;
@@ -225,9 +228,9 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
if ( i < count - 1 )
result += '\n';
}
- } else if ( type.left( 5 ) == TQMAP_OBJECT_NAME_STRING "<" )
+ } else if ( type.left( 6 ) == TQMAP_OBJECT_NAME_STRING "<" )
{
- int commaPos = type.find( ',', 5 );
+ int commaPos = type.find( ',', 6 );
if ( commaPos == -1 )
return result;
@@ -235,7 +238,7 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
if ( (uint)type.find( '>', commaPos ) != type.length() - 1 )
return result;
- TQString keyType = type.mid( 5, commaPos - 5 );
+ TQString keyType = type.mid( 6, commaPos - 6 );
TQString valueType = type.mid( commaPos + 1, type.length() - commaPos - 2 );
TQ_UINT32 count;
diff --git a/dcop/dcopclient.cpp b/dcop/dcopclient.cpp
index 5523365c8..52d9097c1 100644
--- a/dcop/dcopclient.cpp
+++ b/dcop/dcopclient.cpp
@@ -50,6 +50,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdlib.h>
#include <assert.h>
#include <string.h>
+#ifdef HAVE_UCRED_H
+#include <ucred.h>
+#endif /* HAVE_UCRED_H */
#include <tqguardedptr.h>
#include <tqtextstream.h>
@@ -724,7 +727,7 @@ bool DCOPClient::isSuspended() const
return !d->notifier->isEnabled();
}
-#if defined(SO_PEERCRED) || defined(LOCAL_PEEREID)
+#if defined(SO_PEERCRED) || defined(LOCAL_PEEREID) || defined(HAVE_GETPEERUCRED)
#define USE_PEER_IS_US
// Check whether the remote end is owned by the same user.
static bool peerIsUs(int sockfd)
@@ -745,6 +748,18 @@ static bool peerIsUs(int sockfd)
if (getsockopt(sockfd, 0, LOCAL_PEEREID, &cred, &siz) != 0 || siz != sizeof(cred))
return false;
return (cred.unp_euid == geteuid());
+#elif defined(HAVE_GETPEERUCRED)
+ ucred_t *cred = nullptr;
+ uint_t peer_uid;
+
+ if (getpeerucred(sockfd, &cred) != 0) {
+ if (cred != nullptr)
+ ucred_free(cred);
+ return false;
+ }
+ peer_uid = ucred_geteuid(cred);
+ ucred_free(cred);
+ return (peer_uid == getuid());
#endif
}
#else
diff --git a/doc/common/CMakeLists.txt b/doc/common/CMakeLists.txt
index a56e79c9f..c831ccefc 100644
--- a/doc/common/CMakeLists.txt
+++ b/doc/common/CMakeLists.txt
@@ -11,19 +11,22 @@
##### other data ################################
-install( FILES
- artistic-license.html bottom1.png bottom2.png
- bsd-license.html doctop1.png doctop2.png fdl-license
- fdl-license.html gpl-license gpl-license.html
- tde-common.css tde-default.css tde-web.css tde-localised.css.template
- lgpl-license lgpl-license.html qpl-license.html shadow.png
- web-docbottom.png x11-license.html xml.dcl web-doctop.png
- doctop1a.png doctop1b.png 1.png 2.png 3.png 4.png
- 5.png 6.png 7.png 8.png 9.png 10.png doxygen.css
- header.html footer.html mainheader.html appheader.html
- mainfooter.html fdl-notice.html favicon.ico kde_gear_64.png
- docheadergears.png headerbg.png grad.png kmenu.png
- kde_logo.png kde_logo_bg.png bottom-left.png bottom-middle.png
- bottom-right.png top-left.png top-middle.png top-right-konqueror.png
- tde-docs.css
- DESTINATION ${HTML_INSTALL_DIR}/en/common )
+install(
+ FILES
+ 1.png 2.png 3.png 4.png 5.png 6.png 7.png 8.png 9.png 10.png
+ appheader.html artistic-license.html block_title_bottom.png
+ block_title_mid.png block_title_top.png bottom1.png bottom2.png
+ bottom-left.png bottom-middle.png bottom-right.png bsd-license.html
+ docheadergears.png doctop1a.png doctop1b.png doctop1.png
+ doctop2.png doxygen.css favicon.ico fdl-license
+ fdl-license.html fdl-notice.html footer.html flat.css
+ gpl-license gpl-license.html grad.png headerbg.png
+ header.html kde_gear_64.png kde_logo_bg.png kde_logo.png
+ kmenu.png lgpl-license lgpl-license.html mainfooter.html
+ mainheader.html print.css qpl-license.html shadow.png tde-common.css
+ tabs.css tde.css tde-default.css tde-docs.css tde-localised.css.template tde-web.css
+ top.jpg top-left.jpg top-left.png top-middle.png top-right-konqueror.png
+ top-right.jpg top-right.png top-trinity.jpg web-docbottom.png
+ web-doctop.png x11-license.html xml.dcl
+ DESTINATION
+ ${HTML_INSTALL_DIR}/en/common )
diff --git a/doc/common/header.html b/doc/common/header.html
index 1405c65e1..b7c1304da 100644
--- a/doc/common/header.html
+++ b/doc/common/header.html
@@ -20,9 +20,9 @@
<link rel="shortcut icon" href="@topdir@/favicon.ico" /><link rel="icon" href="@topdir@/favicon.ico" />
<link rel="stylesheet" type="text/css" href="@topdir@/doxygen.css" />
<link rel="stylesheet" type="text/css" href="@topdir@/tabs.css" />
- <link rel="stylesheet" media="screen" type="text/css" title="Trinity Colors" href="@topdir@/tde.css" />
- <link rel="stylesheet" media="print, embossed" type="text/css" href="@topdir@/print.css" />
- <link rel="stylesheet" media="screen, aural, handheld, tty, braille" type="text/css" title="Flat" href="@topdir@/flat.css" />
+ <link rel="stylesheet" media="screen" type="text/css" title="Trinity Colors" href="@topdir@/../common/tde.css" />
+ <link rel="stylesheet" media="print, embossed" type="text/css" href="@topdir@/../common/print.css" />
+ <link rel="stylesheet" media="screen, aural, handheld, tty, braille" type="text/css" title="Flat" href="@topdir@/../common/flat.css" />
</head>
<body>
@@ -35,7 +35,7 @@
<div id="container">
<div id="header">
<div id="header_top"><div><div>
- <img alt ="" src="@topdir@/top-trinity.jpg"/>
+ <img alt ="" src="@topdir@/../common/top-trinity.jpg"/>
Trinity API Reference </div></div></div>
<div id="header_bottom">
<div id="location">
diff --git a/doc/common/mainheader.html b/doc/common/mainheader.html
index 4f36beb9c..4c1ee53ec 100644
--- a/doc/common/mainheader.html
+++ b/doc/common/mainheader.html
@@ -20,9 +20,9 @@
<link rel="shortcut icon" href="@topdir@/favicon.ico" /><link rel="icon" href="@topdir@/favicon.ico" />
<link rel="stylesheet" type="text/css" href="@topdir@/doxygen.css" />
<link rel="stylesheet" type="text/css" href="@topdir@/tabs.css" />
- <link rel="stylesheet" media="screen" type="text/css" title="Trinity Colors" href="@topdir@/tde.css" />
- <link rel="stylesheet" media="print, embossed" type="text/css" href="@topdir@/print.css" />
- <link rel="stylesheet" media="screen, aural, handheld, tty, braille" type="text/css" title="Flat" href="@topdir@/flat.css" />
+ <link rel="stylesheet" media="screen" type="text/css" title="Trinity Colors" href="@topdir@/../common/tde.css" />
+ <link rel="stylesheet" media="print, embossed" type="text/css" href="@topdir@/../common/print.css" />
+ <link rel="stylesheet" media="screen, aural, handheld, tty, braille" type="text/css" title="Flat" href="@topdir@/../common/flat.css" />
</head>
<body>
@@ -35,7 +35,7 @@
<div id="container">
<div id="header">
<div id="header_top"><div><div>
- <img alt ="" src="@topdir@/top-trinity.jpg"/>
+ <img alt ="" src="@topdir@/../common/top-trinity.jpg"/>
Trinity API Reference </div></div></div>
<div id="header_bottom">
<div id="location">
diff --git a/kate/data/CMakeLists.txt b/kate/data/CMakeLists.txt
index 6c9e158cb..b823e4e60 100644
--- a/kate/data/CMakeLists.txt
+++ b/kate/data/CMakeLists.txt
@@ -45,9 +45,9 @@ install( FILES
ini.xml isocpp.xml jam.xml javadoc.xml javascript.xml java.xml json.xml
jsp.xml julia.xml j.xml kbasic.xml latex.xml ldif.xml ld.xml less.xml lex.xml lilypond.xml
literate-curry.xml literate-haskell.xml logtalk.xml lpc.xml lsl.xml lua.xml m3u.xml
- m4.xml mab.xml magma.xml makefile.xml mako.xml mandoc.xml mason.xml mathematica.xml matlab.xml
- maxima.xml mediawiki.xml mel.xml mergetagtext.xml meson.xml metafont.xml mips.xml modelica.xml
- modelines.xml modula-2-iso-only.xml modula-2-pim-only.xml modula-2-r10-only.xml
+ m4.xml mab.xml magma.xml makefile.xml mako.xml mandoc.xml markdown.xml mason.xml mathematica.xml
+ matlab.xml maxima.xml mediawiki.xml mel.xml mergetagtext.xml meson.xml metafont.xml mips.xml
+ modelica.xml modelines.xml modula-2-iso-only.xml modula-2-pim-only.xml modula-2-r10-only.xml
modula-2.xml monobasic.xml mup.xml nagios.xml nasm.xml nemerle.xml nesc.xml
noweb.xml objectivecpp.xml objectivec.xml ocaml.xml ocamllex.xml ocamlyacc.xml
octave.xml oors.xml opal.xml opencl.xml
diff --git a/kate/data/Makefile.am b/kate/data/Makefile.am
index 09df83b7f..5f1eda66d 100644
--- a/kate/data/Makefile.am
+++ b/kate/data/Makefile.am
@@ -23,9 +23,9 @@ syntaxkate_DATA = language.dtd syntax.template \
ini.xml isocpp.xml jam.xml javadoc.xml javascript.xml javascript-php.xml java.xml json.xml \
jsp.xml julia.xml j.xml kbasic.xml latex.xml ldif.xml ld.xml less.xml lex.xml lilypond.xml \
literate-curry.xml literate-haskell.xml logtalk.xml lpc.xml lsl.xml lua.xml m3u.xml \
- m4.xml mab.xml magma.xml makefile.xml mako.xml mandoc.xml mason.xml mathematica.xml matlab.xml \
- maxima.xml mediawiki.xml mel.xml mergetagtext.xml meson.xml metafont.xml mips.xml modelica.xml \
- modelines.xml modula-2-iso-only.xml modula-2-pim-only.xml modula-2-r10-only.xml \
+ m4.xml mab.xml magma.xml makefile.xml mako.xml mandoc.xml markdown.xml mason.xml mathematica.xml \
+ matlab.xml maxima.xml mediawiki.xml mel.xml mergetagtext.xml meson.xml metafont.xml mips.xml \
+ modelica.xml modelines.xml modula-2-iso-only.xml modula-2-pim-only.xml modula-2-r10-only.xml \
modula-2.xml monobasic.xml mup.xml nagios.xml nasm.xml nemerle.xml nesc.xml \
noweb.xml objectivecpp.xml objectivec.xml ocaml.xml ocamllex.xml ocamlyacc.xml \
octave.xml oors.xml opal.xml opencl.xml \
diff --git a/kate/data/diff.xml b/kate/data/diff.xml
index b681b4270..62fdceb1e 100644
--- a/kate/data/diff.xml
+++ b/kate/data/diff.xml
@@ -15,7 +15,7 @@
2008-02-13: 1.11 Eduardo Robles Elvira <edulix AT gmail DOT com>
Fixed folding.
-->
-<language name="Diff" version="1.12" kateversion="2.4" section="Other" extensions="*.diff;*patch" mimetype="text/x-patch">
+<language name="Diff" version="1.13" kateversion="2.4" section="Other" extensions="*.diff;*patch" mimetype="text/x-patch">
<highlighting>
@@ -108,8 +108,8 @@
<itemData name="Normal Text" defStyleNum="dsNormal"/>
<itemData name="File" defStyleNum="dsKeyword"/>
<itemData name="Header" defStyleNum="dsDataType"/>
- <itemData name="Removed line" defStyleNum="dsString" color="#FF0000"/>
- <itemData name="Added line" defStyleNum="dsOthers" color="#0000FF"/>
+ <itemData name="Removed line" defStyleNum="dsString" backgroundColor="#ffeef0"/>
+ <itemData name="Added line" defStyleNum="dsOthers" backgroundColor="#e6ffed"/>
<itemData name="Changed line (old)" defStyleNum="dsString" color="#FF0000"/>
<itemData name="Changed line (new)" defStyleNum="dsOthers" color="#0000FF"/>
</itemDatas>
diff --git a/kate/data/markdown.xml b/kate/data/markdown.xml
new file mode 100644
index 000000000..177b904da
--- /dev/null
+++ b/kate/data/markdown.xml
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Kate syntax highlight filter for Markdown/MultiMarkdown documents.
+
+ Copyright 2008 Darrin Yeager. http://www.dyeager.org/
+ Dual-Licensed under both GPL and BSD licenses.
+
+ Extended 2009 Claes Holmerson. http://github.com/claes/kate-markdown/
+-->
+
+
+<!-- the [^\s]{1} is in the regex to avoid interfering with bullet list which
+ starts "* item". Thus emphasis/strong MUST be formed like *words here*
+ with the asterisks next to the beginning of the first word.
+
+ Match space or newline, followed by "*", followed by one non-space,
+ followed by anything non-asterisk, followed by "*", followed by
+ space, end-of-sentence punctuation, or the end of the line.
+-->
+<!DOCTYPE language SYSTEM "language.dtd"
+ [
+ <!ENTITY strongemphasisregex "(\s|^)[\*_]{3}[^\*_]+[\*_]{3}(\s|\.|,|;|:|\-|\?|$)">
+ <!ENTITY strongregex "(\s|^)[\*_]{2}[^\s]{1}[^\*_]+[\*_]{2}(\s|\.|,|;|:|\-|\?|$)">
+ <!ENTITY emphasisregex "(\s|^)[\*_]{1}[^\s]{1}[^\*_]+[\*_]{1}(\s|\.|,|;|:|\-|\?|$)">
+ <!ENTITY reflinkregex '\[[^\]\^]+\]\s*\[[^\]]*\]\s*(\s+\"[^\"]*\"){0,1}'>
+ <!ENTITY reflinktargetregex '\[[^\]\^]+\]\:\s+[^\s]+(\s+\"[^\"]*\"){0,1}'>
+ <!ENTITY footnoteregex "\[\^[^\]]+\]">
+ <!ENTITY preregex "^\s*```\s*">
+ <!ENTITY pretilderegex "^\s*~~~\s*">
+ <!ENTITY preendregex "^\s*```\s*$">
+ <!ENTITY pretildeendregex "^\s*~~~\s*$">
+ <!ENTITY presingleline '```[^`]+```'>
+ <!ENTITY idlinkregex '\[[^\]\^]+\]\s*\(#[^\(]*\)'>
+ <!ENTITY inlinelinkregex '\[[^\]\^]+\]\s*\([^\(]*\)'>
+ <!ENTITY inlineimageregex '\!\[[^\]\^]+\]\([^\(]*\)'>
+ <!ENTITY refimageregex '\!\[[^\]\^]+\]\[[^\[]*\]'>
+ <!ENTITY autolinkregex '&lt;(https?|ftp):[^\"&gt;\s]+&gt;'>
+ <!ENTITY mailtolinkregex '&lt;(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)&gt;'>
+ <!ENTITY rulerregex '^ {,3}([\*\-_]\s*){3,}\s*$'>
+ <!-- two spaces at end of line generates linebreak -->
+ <!ENTITY linebreakregex "( |\\)$">
+ <!ENTITY strikeoutregex "~~[^~\s].*[^~\s]~~">
+ <!ENTITY prediffregex "^(```|~~~)\s{0,}diff">
+ <!ENTITY difflineremoveregex "^-[^-].*$">
+ <!ENTITY difflineaddregex "^\+[^\+].*$">
+ <!ENTITY diffheader1regex "^-{3} .*$">
+ <!ENTITY diffheader2regex "^(\+{3} .*|^@@.*)$">
+ <!ENTITY diffheaderdiffregex "^diff .*$">
+]>
+
+<language name="Markdown" version="1.4" section="Markup"
+ extensions="*.md;*.mmd;*.mdwn"
+ author="Darrin Yeager, Claes Holmerson"
+ license="GPL,BSD" >
+ <highlighting>
+ <contexts>
+
+ <context attribute="Normal Text" lineEndContext="#stay" name="Normal Text" >
+ <DetectChar context="blockquote" char="&gt;" column="0"/>
+ <RegExpr attribute="h1" String="^#\s.*[#]?$" />
+ <RegExpr attribute="h2" String="^##\s.*[#]?$" />
+ <RegExpr attribute="h3" String="^###\s.*[#]?$" />
+ <RegExpr attribute="h4" String="^####\s.*[#]?$" />
+ <RegExpr attribute="h5" String="^#####\s.*[#]?$" />
+ <RegExpr attribute="h6" String="^######\s.*[#]?$" />
+ <RegExpr attribute="strongemphasis" String="&strongemphasisregex;" />
+ <RegExpr attribute="strong" String="&strongregex;" />
+ <RegExpr attribute="emphasis" String="&emphasisregex;" />
+ <RegExpr attribute="ruler" String="&rulerregex;" />
+ <RegExpr context="bullet" String="^ {,3}[\*\+\-]\s" />
+ <RegExpr context="numlist" String="^ {,3}[\d]+\.\s" />
+ <RegExpr attribute="code" String="^([\s]{4,}|\t+).*$" />
+ <RegExpr attribute="meta" String="^(Title|Author|Date|Copyright|Revision|CSS|LaTeX\ XSLT|Categories|Tags|BaseName|Excerpt):(.*)+$" />
+ <IncludeRules context="inc" />
+ </context>
+
+ <context attribute="blockquote" lineEndContext="#pop" name="blockquote">
+ <RegExpr attribute="bq-strong" String="&strongregex;" />
+ <RegExpr attribute="bq-emphasis" String="&emphasisregex;" />
+ <RegExpr attribute="bq-strongemphasis" String="&strongemphasisregex;" />
+ <IncludeRules context="inc" />
+ </context>
+
+ <context attribute="bullet" lineEndContext="#pop" name="bullet" >
+ <RegExpr attribute="bl-strong" String="&strongregex;" />
+ <RegExpr attribute="bl-emphasis" String="&emphasisregex;" />
+ <RegExpr attribute="bl-strongemphasis" String="&strongemphasisregex;" />
+ <IncludeRules context="inc" />
+ </context>
+
+ <context attribute="numlist" lineEndContext="#pop" name="numlist" >
+ <RegExpr attribute="nl-strong" String="&strongregex;" />
+ <RegExpr attribute="nl-emphasis" String="&emphasisregex;" />
+ <RegExpr attribute="nl-strongemphasis" String="&strongemphasisregex;" />
+ <IncludeRules context="inc" />
+ </context>
+
+ <context attribute="comment" lineEndContext="#stay" name="comment" >
+ <RegExpr String="--&gt;" attribute="comment" context="#pop" endRegion="comment"/>
+ </context>
+
+ <context attribute="prediff" lineEndContext="#stay" name="prediff" >
+ <RegExpr String="&preendregex;" attribute="prediff" context="#pop" endRegion="prediff"/>
+ <RegExpr attribute="difflineremove" String="&difflineremoveregex;" />
+ <RegExpr attribute="difflineadd" String="&difflineaddregex;" />
+ <RegExpr attribute="diffheader1" String="&diffheader1regex;" />
+ <RegExpr attribute="diffheader2" String="&diffheader2regex;" />
+ <RegExpr attribute="diffheaderdiff" String="&diffheaderdiffregex;" />
+ </context>
+
+ <context attribute="code" lineEndContext="#stay" name="pre" >
+ <RegExpr String="&preendregex;" attribute="code" context="#pop" endRegion="pre"/>
+ </context>
+
+ <context attribute="code" lineEndContext="#stay" name="pretilde" >
+ <RegExpr String="&pretildeendregex;" attribute="code" context="#pop" endRegion="pretilde"/>
+ </context>
+
+ <context attribute="common" name="inc" lineEndContext="#stay" >
+ <RegExpr context="comment" String="&lt;!--" beginRegion="comment" />
+ <RegExpr context="prediff" String="&prediffregex;" beginRegion="prediff" />
+ <RegExpr attribute="code" minimal="true" String="&presingleline;"/>
+ <RegExpr attribute="code" context="pre" String="&preregex;" beginRegion="pre" />
+ <RegExpr attribute="code" context="pretilde" String="&pretilderegex;" beginRegion="pretilde" />
+ <RegExpr attribute="code" String="``.*``" />
+ <RegExpr attribute="code" String="`[^`]*`" />
+ <RegExpr attribute="reflink" String="&reflinkregex;" />
+ <RegExpr attribute="footnote" String="&footnoteregex;" />
+ <RegExpr attribute="idlink" String="&idlinkregex;"/>
+ <RegExpr attribute="inlinelink" String="&inlinelinkregex;"/>
+ <RegExpr attribute="reflinktarget" String="&reflinktargetregex;"/>
+ <RegExpr attribute="inlineimage" String="&inlineimageregex;"/>
+ <RegExpr attribute="refimage" String="&refimageregex;"/>
+ <RegExpr attribute="autolink" String="&autolinkregex;"/>
+ <RegExpr attribute="mailtolink" String="&mailtolinkregex;"/>
+ <RegExpr attribute="strikeout" minimal="true" String="&strikeoutregex;"/>
+ <RegExpr attribute="linebreak" minimal="true" String="&linebreakregex;"/>
+ </context>
+ </contexts>
+
+ <itemDatas>
+ <itemData name="Normal Text" defStyleNum="dsNormal" />
+ <itemData name="common" defStyleNum="dsNormal" />
+ <itemData name="emphasis" defStyleNum="dsNormal" italic="true" />
+ <itemData name="strong" defStyleNum="dsNormal" bold="true" />
+ <itemData name="diffheader1" defStyleNum="dsNormal" backgroundColor="#eeeeee" color="#800000" bold="true" />
+ <itemData name="diffheader2" defStyleNum="dsNormal" backgroundColor="#eeeeee" color="#800000" />
+ <itemData name="diffheaderdiff" defStyleNum="dsNormal" backgroundColor="#eeeeee" color="#000000" bold="true" />
+ <itemData name="difflineremove" defStyleNum="dsString" backgroundColor="#ffeef0" />
+ <itemData name="difflineadd" defStyleNum="dsOthers" backgroundColor="#e6ffed" />
+ <itemData name="strongemphasis" defStyleNum="dsNormal" italic="true" bold="true"/>
+ <itemData name="ruler" defStyleNum="dsNormal" color="#e200e2" bold="true" />
+ <itemData name="strikeout" defStyleNum="dsNormal" strikeOut="true" backgroundColor="#fafaaf" />
+ <itemData name="linebreak" defStyleNum="dsNormal" backgroundColor="#F8E0FF" />
+ <itemData name="h1" defStyleNum="dsFunction" bold="true" />
+ <itemData name="h2" defStyleNum="dsFunction" bold="true" />
+ <itemData name="h3" defStyleNum="dsFunction" bold="true" />
+ <itemData name="h4" defStyleNum="dsFunction" bold="true" />
+ <itemData name="h5" defStyleNum="dsFunction" bold="true" />
+ <itemData name="h6" defStyleNum="dsFunction" bold="true" />
+ <itemData name="blockquote" defStyleNum="dsNormal" color="black" />
+ <itemData name="bq-emphasis" defStyleNum="dsNormal" color="black" italic="true" />
+ <itemData name="bq-strong" defStyleNum="dsNormal" color="black" bold="true" />
+ <itemData name="bq-strongemphasis" defStyleNum="dsNormal" color="black" italic="true" bold="true" />
+ <itemData name="bullet" defStyleNum="dsNormal" color="#b700b7" />
+ <itemData name="bl-emphasis" defStyleNum="dsNormal" color="#b700b7" italic="true" />
+ <itemData name="bl-strong" defStyleNum="dsNormal" color="#b700b7" bold="true" />
+ <itemData name="bl-strongemphasis" defStyleNum="dsNormal" color="#b700b7" bold="true" italic="true" />
+ <itemData name="numlist" defStyleNum="dsNormal" color="#b700b7" />
+ <itemData name="nl-emphasis" defStyleNum="dsNormal" color="#b700b7" italic="true" />
+ <itemData name="nl-strong" defStyleNum="dsNormal" color="#b700b7" bold="true" />
+ <itemData name="nl-strongemphasis" defStyleNum="dsNormal" color="#b700b7" bold="true" italic="true" />
+ <itemData name="comment" defStyleNum="dsComment" />
+ <itemData name="pre" defStyleNum="dsNormal" backgroundColor="#eeeeee" />
+ <itemData name="prediff" defStyleNum="dsNormal" backgroundColor="#eeeeee" />
+ <itemData name="code" defStyleNum="dsNormal" color="darkcyan" backgroundColor="#eeeeee" />
+ <itemData name="reflink" defStyleNum="dsOthers" color="blue" />
+ <itemData name="idlink" defStyleNum="dsOthers" color="blue" italic="true" />
+ <itemData name="inlinelink" defStyleNum="dsOthers" color="blue" />
+ <itemData name="autolink" defStyleNum="dsOthers" underline="true" />
+ <itemData name="mailtolink" defStyleNum="dsOthers" underline="true" />
+ <itemData name="footnote" defStyleNum="dsOthers" italic="true" />
+ <itemData name="meta" defStyleNum="dsComment" />
+ <itemData name="reflinktarget" defStyleNum="dsOthers" />
+ <itemData name="inlineimage" defStyleNum="dsNormal" backgroundColor="#fff8f8" color="blue" />
+ <itemData name="refimage" defStyleNum="dsNormal" backgroundColor="#fff8f8" color="blue" />
+ </itemDatas>
+ </highlighting>
+
+ <general>
+ <comments>
+ <comment name="multiLine" start="&lt;!--" end="--&gt;" region="comment" />
+ </comments>
+ </general>
+
+</language>
diff --git a/kate/data/update-files.xml b/kate/data/update-files.xml
index c4cf021de..12924302b 100644
--- a/kate/data/update-files.xml
+++ b/kate/data/update-files.xml
@@ -52,7 +52,7 @@
<Definition name="Debian Changelog" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/debianchangelog.xml" version="6"/>
<Definition name="Debian Control" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/debiancontrol.xml" version="0.84"/>
<Definition name=".desktop" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/desktop.xml" version="2-1"/>
-<Definition name="Diff" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/diff.xml" version="1.12"/>
+<Definition name="Diff" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/diff.xml" version="1.13"/>
<Definition name="Django HTML Template" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/djangotemplate.xml" version="3"/>
<Definition name="Dockerfile" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/dockerfile.xml" version="1.1"/>
<Definition name="MS-DOS Batch" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/dosbat.xml" version="0.30"/>
@@ -136,6 +136,7 @@
<Definition name="Makefile" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/makefile.xml" version="2.1"/>
<Definition name="Mako" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/mako.xml" version="1.0"/>
<Definition name="Troff Mandoc" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/mandoc.xml" version="2"/>
+<Definition name="Markdown" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/markdown.xml" version="1.4"/>
<Definition name="Mason" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/mason.xml" version="4"/>
<Definition name="Mathematica" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/mathematica.xml" version="8.1"/>
<Definition name="Matlab" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/matlab.xml" version="2-2"/>
diff --git a/kate/part/kateviewinternal.cpp b/kate/part/kateviewinternal.cpp
index c536974e6..5acb93bc8 100644
--- a/kate/part/kateviewinternal.cpp
+++ b/kate/part/kateviewinternal.cpp
@@ -3263,27 +3263,44 @@ void KateViewInternal::clear()
void KateViewInternal::wheelEvent(TQWheelEvent* e)
{
- if (m_lineScroll->minValue() != m_lineScroll->maxValue() && e->orientation() != Qt::Horizontal) {
- // React to this as a vertical event
- if ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) {
- if (e->delta() > 0)
- scrollPrevPage();
- else
- scrollNextPage();
- } else {
- scrollViewLines(-((e->delta() / 120) * TQApplication::wheelScrollLines()));
- // maybe a menu was opened or a bubbled window title is on us -> we shall erase it
- update();
- leftBorder->update();
- }
-
- } else if (columnScrollingPossible()) {
- TQWheelEvent copy = *e;
- TQApplication::sendEvent(m_columnScroll, &copy);
-
- } else {
- e->ignore();
- }
+ if (e->state() & ControlButton)
+ {
+ if (e->delta() > 0)
+ {
+ slotIncFontSizes();
+ }
+ else
+ {
+ slotDecFontSizes();
+ }
+ }
+ else
+ {
+ if (m_lineScroll->minValue() != m_lineScroll->maxValue() && e->orientation() != Qt::Horizontal)
+ {
+ // React to this as a vertical event
+ if ( e->state() & ShiftButton )
+ {
+ if (e->delta() > 0)
+ scrollPrevPage();
+ else
+ scrollNextPage();
+ }
+ else
+ {
+ scrollViewLines(-((e->delta() / 120) * TQApplication::wheelScrollLines()));
+ // maybe a menu was opened or a bubbled window title is on us -> we shall erase it
+ update();
+ leftBorder->update();
+ }
+ } else if (columnScrollingPossible()) {
+ TQWheelEvent copy = *e;
+ TQApplication::sendEvent(m_columnScroll, &copy);
+
+ } else {
+ e->ignore();
+ }
+ }
}
void KateViewInternal::startDragScroll()
diff --git a/kded/Mainpage.dox b/kded/Mainpage.dox
index 10a9da06a..95ba4a4cf 100644
--- a/kded/Mainpage.dox
+++ b/kded/Mainpage.dox
@@ -1,11 +1,11 @@
-/** @mainpage The Trinity Daemon
+/** @mainpage The Trinity Daemon (KDED)
-TrinityD runs in the background and performs a number of small tasks. Some
+KDED runs in the background and performs a number of small tasks. Some
of these tasks are built in, others are started on demand.
<p>
The chances are you are looking here because you want to write a
-TrinityD module. For that, see TrinityDModule in tdecore and the
-<a href="http://websvn.kde.org/trunk/Trinity/tdelibs/kded/README.kded?view=markup">TrinityD
+KDED module. For that, see KDEDModule in tdecore and the
+<a href="https://mirror.git.trinitydesktop.org/gitea/TDE/tdelibs/src/branch/master/kded">KDED
README</a>.
@@ -22,4 +22,4 @@ Waldo Bastian \<bastian@kde.org\>
*/
// DOXYGEN_REFERENCES = tdecore tdeui tdeio
-// DOXYGEN_SET_PROJECT_NAME = TrinityD
+// DOXYGEN_SET_PROJECT_NAME = KDED
diff --git a/libltdl b/libltdl
-Subproject 0f92944b23894ebef2cb0e931c59b77017998b3
+Subproject ac2c70d91ae41e2c7aa8c1e03c847d3b7847578
diff --git a/licenses/CMakeLists.txt b/licenses/CMakeLists.txt
index 697fd6b8e..a48d3dbcc 100644
--- a/licenses/CMakeLists.txt
+++ b/licenses/CMakeLists.txt
@@ -12,5 +12,5 @@
##### other data ################################
install( FILES
- BSD GPL_V2 LGPL_V2 GPL_V3 LGPL_V3 QPL_V1.0 ARTISTIC
+ BSD GPL_V2 LGPL_V2 GPL_V3 LGPL_V3 QPL_V1.0 ARTISTIC MIT
DESTINATION ${DATA_INSTALL_DIR}/LICENSES )
diff --git a/licenses/MIT b/licenses/MIT
new file mode 100644
index 000000000..64b34e88c
--- /dev/null
+++ b/licenses/MIT
@@ -0,0 +1,17 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the “Software”), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/licenses/Makefile.am b/licenses/Makefile.am
index 2fd7abea3..0bf059e24 100644
--- a/licenses/Makefile.am
+++ b/licenses/Makefile.am
@@ -1,2 +1,2 @@
-licensesdata_DATA = BSD GPL_V2 LGPL_V2 QPL_V1.0 ARTISTIC
+licensesdata_DATA = BSD GPL_V2 LGPL_V2 QPL_V1.0 ARTISTIC MIT
licensesdatadir = $(kde_datadir)/LICENSES
diff --git a/tdecore/CMakeLists.txt b/tdecore/CMakeLists.txt
index 22c3bbc88..c794a8039 100644
--- a/tdecore/CMakeLists.txt
+++ b/tdecore/CMakeLists.txt
@@ -141,7 +141,7 @@ tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS}
VERSION 14.1.0
EMBED tdecorenetwork-static
- LINK DCOP-shared tdefx-shared ICE SM ${ZLIB_LIBRARIES}
+ LINK DCOP-shared tdefx-shared ICE SM ${ZLIB_LIBRARIES} ${RESOLV_LIBRARIES}
LINK_PRIVATE ltdlc-static ${KDESVGICONS} ${XCOMPOSITE_LIBRARIES}
${LIBIDN_LIBRARIES} ${LIBBFD_LIBRARIES} ${LIB_UTIL} ${GAMIN_LIBRARIES}
${Backtrace_LIBRARY}
diff --git a/tdecore/README.kiosk b/tdecore/README.kiosk
index ae4f72d47..c914cc1d2 100644
--- a/tdecore/README.kiosk
+++ b/tdecore/README.kiosk
@@ -1,25 +1,25 @@
In KDE3 a kiosk-framework has been introduced.
-One of the driving forces behind KDE is to put the user in control and
-give him or her a large amount of possibilities to adjust KDE to his or her
+One of the driving forces behind TDE is to put the user in control and
+give them a large amount of possibilities to adjust TDE to their
liking. However, in some situations it is required to reduce the possibilities
-of KDE, e.g. because the system is to be used for one or more specific
+of TDE, e.g. because the system is to be used for one or more specific
dedicated tasks only.
The kiosk-framework provides an easy way to disable certain features within
-KDE to create a more controlled environment.
+TDE to create a more controlled environment.
-KDE's kiosk-framework builds on KDE's configuration framework and adds a
+TDE's kiosk-framework builds on TDE's configuration framework and adds a
simple application API that applications can query to get authorisation
for certain operations.
-The KDE kiosk-framework should be used IN ADDITION to the standard UNIX
+The TDE kiosk-framework should be used IN ADDITION to the standard UNIX
security measures.
The configuration framework in KDE3
===================================
-Since the very beginning KDE makes use of file-hierarchy to store resources
+Since the very beginning TDE makes use of file-hierarchy to store resources
for its applications. Resources range from icons, wallpapers, fonts to
sounds, menu-descriptions and configuration files.
@@ -550,16 +550,16 @@ Some remarks:
matches "/srv" and not "/srv/www".
-KDE3 Resource Restrictions
+TDE Resource Restrictions
==========================
-Most KDE applications make use of additional resource files that are typically
-located in directories under $TDEDIR/share. By default KDE allows users to
+Most TDE applications make use of additional resource files that are typically
+located in directories under $TDEDIR/share. By default TDE allows users to
override any of these resources by placing files in the same location
under $TDEHOME/share. For example, Konsole stores profiles under
$TDEDIR/share/apps/konsole and users can add additional profiles by
installing files in $TDEHOME/share/apps/konsole.
-KDE3 Resource Restrictions make it possible to restrict the lookup of files
+TDE Resource Restrictions make it possible to restrict the lookup of files
to directories outside of $TDEHOME only.
The following resources are defined:
@@ -642,7 +642,7 @@ The following syntax is also supported:
Name[$ei]=${USER}
-KDE3 Kiosk Application API
+TDE Kiosk Application API
==========================
Three new methods have been added to TDEApplication:
diff --git a/tdecore/kdebug.areas b/tdecore/kdebug.areas
index 14623fa4f..24c87f524 100644
--- a/tdecore/kdebug.areas
+++ b/tdecore/kdebug.areas
@@ -3,346 +3,353 @@
# Applications of the kdenonbeta module (or similar) should not define any own area but use area 0.
# When you add KDebug areas, email kde-devel@kde.org with the appropriate descriptions.
#
-#Format : number<tab>description
-
-125 tdecore (TDEAccel)
-126 tdecore (KURL)
-127 tdeio (KProtocolInfo)
-128 tdecore (KRegExp)
-129 tdecore (TDEAction)
-130 tdeio (KPasswdServer)
-131 tdecore (TDEAcceleratorManager)
-150 tdecore (KLibLoader)
-160 tdecore (KNotifyClient)
-170 tdecore (KNetwork socket)
-171 tdecore (KSocks)
-172 tdecore (TDEStartupInfo)
-173 tdecore (TDELocale)
-174 tdecore (KProcIO)
-175 tdecore (TDEProcess)
-176 tdecore (KWin)
-177 tdecore (TDEConfigSkeleton)
-178 tdecore (TDEConfigDialogManager)
-179 tdecore (KNetwork resolver)
-180 tdecore (tdelibs)
-200 tdeui (TDEMainWindow)
-220 tdeui (TDEToolBar)
-230 tdeui (KCommand)
-240 tdeui (tdelibs)
-250 tdefile (tdelibs)
-264 tdecore (TDEIconLoader)
-265 tdecore (TDEIconEffect)
-270 tdeui (KRootPixmap)
-280 tdeui (TDESharedPixmap)
-281 tdeui (TDECModule)
-282 tdeui (KDockWidget)
-290 tdeui (KPixmapIO)
-291 tdeui (TDEAboutDialog)
-292 tdeui (KComboBox)
-293 tdeui (KLineEdit)
-294 tdeui (KEdit)
-295 tdeui (KMenuBar)
-296 tdeui (TDEPopupMenu)
-298 tdeui (KDatePicker)
-399 kimgio
-400 artskde
-500 tdeprint
-700 tdeutils (KSettings::Dialog)
-701 tdeutils (KSettings::Dispatcher)
-702 tdeutils (KPluginSelector)
-703 tdeutils (KPluginInfo)
-704 tdeutils (KSettings::ComponentsDialog)
-710 tdeutils (KCMultiDialog)
-711 tdeutils (TDECModuleProxy)
-712 tdeutils (TDECModuleInfo)
-713 tdeutils (TDECModuleContainer)
-750 tdespell (tdelibs)
-760 tdemdi
-780 tdecmshell (tdelibs)
-790 tdeimproxy (tdelibs)
-800 kabapi (tdelibs)
-900 tdesu (tdelibs)
-912 ksmartcard (tdelibs)
-
-
-1000 tdeparts
-1001 tdeparts (mainwindow)
-1002 tdeparts (factory)
+#Format : number<separator>description
+
+125 tdecore (TDEAccel)
+126 tdecore (KURL)
+127 tdeio (KProtocolInfo)
+128 tdecore (KRegExp)
+129 tdecore (TDEAction)
+130 tdeio (KPasswdServer)
+131 tdecore (TDEAcceleratorManager)
+150 tdecore (KLibLoader)
+160 tdecore (KNotifyClient)
+170 tdecore (KNetwork socket)
+171 tdecore (KSocks)
+172 tdecore (TDEStartupInfo)
+173 tdecore (TDELocale)
+174 tdecore (KProcIO)
+175 tdecore (TDEProcess)
+176 tdecore (KWin)
+177 tdecore (TDEConfigSkeleton)
+178 tdecore (TDEConfigDialogManager)
+179 tdecore (KNetwork resolver)
+180 tdecore (tdelibs)
+200 tdeui (TDEMainWindow)
+220 tdeui (TDEToolBar)
+230 tdeui (KCommand)
+240 tdeui (tdelibs)
+250 tdefile (tdelibs)
+264 tdecore (TDEIconLoader)
+265 tdecore (TDEIconEffect)
+270 tdeui (KRootPixmap)
+280 tdeui (TDESharedPixmap)
+281 tdeui (TDECModule)
+282 tdeui (KDockWidget)
+290 tdeui (KPixmapIO)
+291 tdeui (TDEAboutDialog)
+292 tdeui (KComboBox)
+293 tdeui (KLineEdit)
+294 tdeui (KEdit)
+295 tdeui (KMenuBar)
+296 tdeui (TDEPopupMenu)
+298 tdeui (KDatePicker)
+399 kimgio
+400 artskde
+500 tdeprint
+700 tdeutils (KSettings::Dialog)
+701 tdeutils (KSettings::Dispatcher)
+702 tdeutils (KPluginSelector)
+703 tdeutils (KPluginInfo)
+704 tdeutils (KSettings::ComponentsDialog)
+710 tdeutils (KCMultiDialog)
+711 tdeutils (TDECModuleProxy)
+712 tdeutils (TDECModuleInfo)
+713 tdeutils (TDECModuleContainer)
+750 tdespell (tdelibs)
+760 tdemdi
+780 tdecmshell (tdelibs)
+790 tdeimproxy (tdelibs)
+800 kabapi (tdelibs)
+900 tdesu (tdelibs)
+912 ksmartcard (tdelibs)
+
+
+1000 tdeparts
+1001 tdeparts (mainwindow)
+1002 tdeparts (factory)
# tdebase
-1201 konqtree
-1202 konqueror
-1203 libkonq
-1204 kdesktop
-1205 tdesud
-1206 tdesu
-1207 kdesktop (Minicli)
-1208 kcontrol
-1210 kicker
-1211 konsole
-1212 twin
-1213 kappfinder
-1214 kdesktop (icons)
-1215 ksysguard
-1216 twin (client errors)
-1217 khotkeys
-1218 ksmserver
-1219 media tdeioslave
-1220 remote tdeioslave
-
-1400 khelpcenter (tdebase)
-1401 kcmhelpcenter
-1402 khc_indexbuilder
-
-1420 kikbd
-1421 ki18b_keys (tdecmodule)
-
-1430 nspluginviewer (Qt/Xt)
-1431 nspluginviewer (plugin)
-1432 nspluginviewer (part)
-1433 nspluginscan
+1201 konqtree
+1202 konqueror
+1203 libkonq
+1204 kdesktop
+1205 tdesud
+1206 tdesu
+1207 kdesktop (Minicli)
+1208 kcontrol
+1210 kicker
+1211 konsole
+1212 twin
+1213 kappfinder
+1214 kdesktop (icons)
+1215 ksysguard
+1216 twin (client errors)
+1217 khotkeys
+1218 ksmserver
+1219 media tdeioslave
+1220 remote tdeioslave
+
+1400 khelpcenter (tdebase)
+1401 kcmhelpcenter
+1402 khc_indexbuilder
+
+1420 kikbd
+1421 ki18b_keys (tdecmodule)
+
+1430 nspluginviewer (Qt/Xt)
+1431 nspluginviewer (plugin)
+1432 nspluginviewer (part)
+1433 nspluginscan
# tdeutils
-1501 khexedit (tdeutils)
-1511 tdessh (tdeutils)
-1512 tdepasswd (tdebase)
-1601 ark (tdeutils)
-1901 kfind
-1902 kfind (KfindWindow::updateResults)
-1903 kfind (KfindTabDialog::createQuery)
-2000 kfind
-2001 kregexpeditor
-2002 kfloppy
-2003 ksim
-2100 kgpg
-2200 kdf
-2300 tdewallet
-
-# 2500-2999 Reserved for private use
+1501 khexedit (tdeutils)
+1511 tdessh (tdeutils)
+1512 tdepasswd (tdebase)
+1601 ark (tdeutils)
+1901 kfind
+1902 kfind (KfindWindow::updateResults)
+1903 kfind (KfindTabDialog::createQuery)
+2000 kfind
+2001 kregexpeditor
+2002 kfloppy
+2003 ksim
+2100 kgpg
+2200 kdf
+2300 tdewallet
+
+# 2500-2999 Reserved for private use
# tdeadmin
-3000 ksysv
-3100 ksysv (model)
+3000 ksysv
+3100 ksysv (model)
# tdegraphics
-4300 kdvi (tdegraphics)
-4400 kpaint (tdegraphics)
-4500 kghostview (tdegraphics)
-4600 kview
-4610 kviewviewer
-4620 kviewcanvas
-4630 kview_plugin
-4640 tdeiconedit
+4300 kdvi (tdegraphics)
+4400 kpaint (tdegraphics)
+4500 kghostview (tdegraphics)
+4600 kview
+4610 kviewviewer
+4620 kviewcanvas
+4630 kview_plugin
+4640 tdeiconedit
# tdenetwork
-5001 kget
-5002 kppp
-5003 knode
-5004 kdict
-5005 knewsticker
-5006 kmail
-5007 kpf
-5008 ksirc
-5009 filesharing
-5050 libkmime
-5051 libkmime (Codecs)
-5052 libkmime (Plugin Loader)
-5100 libtdenetwork
-5150 libkleopatra
+5001 kget
+5002 kppp
+5003 knode
+5004 kdict
+5005 knewsticker
+5006 kmail
+5007 kpf
+5008 ksirc
+5009 filesharing
+5050 libkmime
+5051 libkmime (Codecs)
+5052 libkmime (Plugin Loader)
+5100 libtdenetwork
+5150 libkleopatra
# tdepim
-5200 kitchensync
-5201 kitchensync (Konnector)
-5202 kitchensync (OpieKonnector)
-5203 kitchensync (PhoneKonnector)
-5204 kitchensync (AgendaKonnector)
-5205 kitchensync (CasioKonnector)
-5210 kitchensync (KitchenSyncApp)
-5220 kitchensync (ManipulatorParts)
-5221 kitchensync (overviewpart)
-5222 kitchensync (organizerpart)
-5223 kitchensync (fileviewpart)
-5224 kitchensync Desktop
-5225 kitchensync (QtopiaKonnector)
-5226 kitchensync Categories
-5227 kitchensync Todo
-5228 kitchensync AddressBook
-5229 kitchensync Datebook
-5230 kitchensync SyncEntry
-5231 kitchensync SyncUI
-5250 kitchensync (Syncing Algorithm)
-5300 libtdepim
-5310 kprefs
-5400 calendarsystem
-5500 knotes
-5510 kpilot
-5511 kpilotdaemon
-5512 kpilotconduit
-5600 kontact (core)
-5601 kontact (interfaces)
-5602 kontact (plugins)
-5650 tderesources
-5700 tdeabc
-5710 tdeabc/vcard
-5720 kaddressbook
-5800 libkcal
-5850 korganizer
-5855 korganizer (verbose)
-5890 korgac
-5891 korgac (check)
-5900 kalarmd
-5901 kalarmd (check)
-5950 kalarm
-5960 kandy
-5970 karm
+5200 kitchensync
+5201 kitchensync (Konnector)
+5202 kitchensync (OpieKonnector)
+5203 kitchensync (PhoneKonnector)
+5204 kitchensync (AgendaKonnector)
+5205 kitchensync (CasioKonnector)
+5210 kitchensync (KitchenSyncApp)
+5220 kitchensync (ManipulatorParts)
+5221 kitchensync (overviewpart)
+5222 kitchensync (organizerpart)
+5223 kitchensync (fileviewpart)
+5224 kitchensync Desktop
+5225 kitchensync (QtopiaKonnector)
+5226 kitchensync Categories
+5227 kitchensync Todo
+5228 kitchensync AddressBook
+5229 kitchensync Datebook
+5230 kitchensync SyncEntry
+5231 kitchensync SyncUI
+5250 kitchensync (Syncing Algorithm)
+5300 libtdepim
+5310 kprefs
+5400 calendarsystem
+5500 knotes
+5510 kpilot
+5511 kpilotdaemon
+5512 kpilotconduit
+5600 kontact (core)
+5601 kontact (interfaces)
+5602 kontact (plugins)
+5650 tderesources
+5700 tdeabc
+5710 tdeabc/vcard
+5720 kaddressbook
+5800 libkcal
+5850 korganizer
+5855 korganizer (verbose)
+5890 korgac
+5891 korgac (check)
+5900 kalarmd
+5901 kalarmd (check)
+5950 kalarm
+5960 kandy
+5970 karm
# libtdehtml
-6000 tdehtml
-6005 tdehtml (encoding)
-6010 tdehtml (dom)
-6020 tdehtml (xml)
-6030 tdehtml (html)
-6031 tdehtml (frames & objects)
-6035 tdehtml (parser)
-6036 tdehtml (tokenizer)
-6040 tdehtml (render)
-6041 tdehtml (bidi)
-6045 tdehtml (rendering tree)
-6050 tdehtml (part)
-6060 tdehtml (cache)
-6061 tdehtml (cache-expiredates)
-6070 tdehtml (jscript)
-6080 tdehtml (css)
-6090 tdehtml (memory)
-6100 kjas
-6200 tdehtml (caret)
-6201 tdehtml (caret table)
-6210 tdehtml (editor)
+6000 tdehtml
+6005 tdehtml (encoding)
+6010 tdehtml (dom)
+6020 tdehtml (xml)
+6030 tdehtml (html)
+6031 tdehtml (frames & objects)
+6035 tdehtml (parser)
+6036 tdehtml (tokenizer)
+6040 tdehtml (render)
+6041 tdehtml (bidi)
+6045 tdehtml (rendering tree)
+6050 tdehtml (part)
+6060 tdehtml (cache)
+6061 tdehtml (cache-expiredates)
+6070 tdehtml (jscript)
+6080 tdehtml (css)
+6090 tdehtml (memory)
+6100 kjas
+6200 tdehtml (caret)
+6201 tdehtml (caret table)
+6210 tdehtml (editor)
# libtdeio
-7000 tdeio
-7001 tdeio (KDirWatch)
-7002 tdeio (Slave)
-7003 tdeio (KDirLister)
-7004 tdeio (KDirListerCache)
-7005 tdeio (Filter)
-7006 tdeio (Scheduler)
-7007 tdeio (TDEIOJob)
-7009 tdeio (KMimeType)
-7010 tdeio (KRun)
-7011 tdeio (KSycoca)
-7012 tdeio (KService*)
-7013 tdeio (KPing)
-7014 tdeio (TDETrader)
-7015 tdeio (KAutoMount)
-7016 tdeio (TDELauncher)
-7017 tdeio (TDEIOConnection)
-7018 tdeio (KMimeMagic)
-7019 tdeio (tdeioslave)
-7020 kded
-7021 tdebuildsycoca
-7022 kurifilter
-7023 kurifilter (plugins)
-7024 tdeio (UIServer)
-7025 kpac
-7026 tdeio (KShred)
-7027 tdeio (TCPSlaveBase)
-7028 tdeio (Observer)
-7029 kssl
-7030 tdeio (KEMailSettings)
-7031 KImageIO
-7032 tdeio (KURLCompletion)
-7033 KFileMetaInfo
-7034 KFileMetainfo (plugins)
-7040 KZip
-7041 KTar
-7042 KAr
-7043 tdeio (bookmarks)
-
-# 71xx are for tdeioslaves
-7101 tdeio_file
-7102 tdeio_ftp
-7103 tdeio_http
-7104 kcookiejar
-7105 tdeio_pop3
-7106 tdeio_smb
-7107 tdeio_man
-7108 tdeio_info
-7109 tdeio_tar
-7110 tdeio_gzip
-7111 tdeio_sql
-7112 tdeio_smtp
-7113 tdeio_http_debug
-7114 tdeio_nntp
-7115 tdeio_thumbnail
-7116 tdeio_imap
-7117 tdeio_audiocd
-7118 tdeio_bzip2
-7119 tdeio_help
-7120 tdeio_sftp
-7121 tdeio_nfs
-7122 tdeio_sieve
-7123 tdeio_kamera
-7124 tdeio_cgi
-7125 tdeio_ldap
-7126 tdeio_devices
-7127 tdeio_fish
-7128 tdeio_svn
-7131 tdeio_xz
+7000 tdeio
+7001 tdeio (KDirWatch)
+7002 tdeio (Slave)
+7003 tdeio (KDirLister)
+7004 tdeio (KDirListerCache)
+7005 tdeio (Filter)
+7006 tdeio (Scheduler)
+7007 tdeio (TDEIOJob)
+7009 tdeio (KMimeType)
+7010 tdeio (KRun)
+7011 tdeio (KSycoca)
+7012 tdeio (KService*)
+7013 tdeio (KPing)
+7014 tdeio (TDETrader)
+7015 tdeio (KAutoMount)
+7016 tdeio (TDELauncher)
+7017 tdeio (TDEIOConnection)
+7018 tdeio (KMimeMagic)
+7019 tdeio (tdeioslave)
+7020 kded
+7021 tdebuildsycoca
+7022 kurifilter
+7023 kurifilter (plugins)
+7024 tdeio (UIServer)
+7025 kpac
+7026 tdeio (KShred)
+7027 tdeio (TCPSlaveBase)
+7028 tdeio (Observer)
+7029 kssl
+7030 tdeio (KEMailSettings)
+7031 KImageIO
+7032 tdeio (KURLCompletion)
+7033 KFileMetaInfo
+7034 KFileMetainfo (plugins)
+7040 KZip
+7041 KTar
+7042 KAr
+7043 tdeio (bookmarks)
+
+# 71xx are for tdeioslaves
+7101 tdeio_file
+7102 tdeio_ftp
+7103 tdeio_http
+7104 kcookiejar
+7105 tdeio_pop3
+7106 tdeio_smb
+7107 tdeio_man
+7108 tdeio_info
+7109 tdeio_tar
+7110 tdeio_gzip
+7111 tdeio_sql
+7112 tdeio_smtp
+7113 tdeio_http_debug
+7114 tdeio_nntp
+7115 tdeio_thumbnail
+7116 tdeio_imap
+7117 tdeio_audiocd
+7118 tdeio_bzip2
+7119 tdeio_help
+7120 tdeio_sftp
+7121 tdeio_nfs
+7122 tdeio_sieve
+7123 tdeio_kamera
+7124 tdeio_cgi
+7125 tdeio_ldap
+7126 tdeio_devices
+7127 tdeio_fish
+7128 tdeio_svn
+7129 tdeio_appinfo
+7130 tdeio_apt
+7131 tdeio_xz
+7132 tdeio_ftps
+7133 tdeio_gopher
+7134 tdeio_locate
+7135 tdeio_sword
+7136 tdeio_umountwrapper
# tdesdk
-8100 kompare
-8101 kompare (libs)
-8102 kompare (shell)
-8103 kompare (part)
-8104 kompare (list view)
-8105 kompare (nav view)
-8106 kompare (connect widget)
-8107 kbabel
-8108 kbabel (search)
-8109 catalogmanager
-8050 cervisia
-8051 cervisia (cvsservice)
+8100 kompare
+8101 kompare (libs)
+8102 kompare (shell)
+8103 kompare (part)
+8104 kompare (list view)
+8105 kompare (nav view)
+8106 kompare (connect widget)
+8107 kbabel
+8108 kbabel (search)
+8109 catalogmanager
+8050 cervisia
+8051 cervisia (cvsservice)
# tdevelop
-9000 tdevelop (core)
-9001 tdevelop (grep view)
-9002 tdevelop (doc tree view)
-9003 tdevelop (class view)
-9004 tdevelop (output views)
-9005 tdevelop (class store)
-9006 tdevelop (cvs interface)
-9007 tdevelop (cpp support)
-9008 tdevelop (gcc options)
-9009 tdevelop (astyle)
-9010 tdevelop (appwizard)
-9011 tdevelop (python scripting)
-9012 tdevelop (debugger)
-9013 tdevelop (java support)
-9014 tdevelop (python support)
-9015 tdevelop (script project)
-9016 tdevelop (perl support)
-9017 tdevelop (file view)
-9018 tdevelop (php support)
-9019 tdevelop (fortran support)
-9020 tdevelop (auto project)
-9021 tdevelop (pgi options)
-9022 tdevelop (ctags)
-9023 tdevelop (regexptest)
-9024 tdevelop (trollproject)
-9025 tdevelop (customproject)
-9026 tdevelop (doxygen)
-9027 tdevelop (cvs)
-9028 tdevelop (abbrev)
-9029 tdevelop (filter)
-9030 tdevelop (texttools)
-9031 tdevelop (history)
-9032 qeditor
-9033 tdevelop (diff frontend)
-9034 tdevelop (filecreate part)
-9035 tdevelop (konsole part)
-9036 tdevelop (subversion part)
+9000 tdevelop (core)
+9001 tdevelop (grep view)
+9002 tdevelop (doc tree view)
+9003 tdevelop (class view)
+9004 tdevelop (output views)
+9005 tdevelop (class store)
+9006 tdevelop (cvs interface)
+9007 tdevelop (cpp support)
+9008 tdevelop (gcc options)
+9009 tdevelop (astyle)
+9010 tdevelop (appwizard)
+9011 tdevelop (python scripting)
+9012 tdevelop (debugger)
+9013 tdevelop (java support)
+9014 tdevelop (python support)
+9015 tdevelop (script project)
+9016 tdevelop (perl support)
+9017 tdevelop (file view)
+9018 tdevelop (php support)
+9019 tdevelop (fortran support)
+9020 tdevelop (auto project)
+9021 tdevelop (pgi options)
+9022 tdevelop (ctags)
+9023 tdevelop (regexptest)
+9024 tdevelop (trollproject)
+9025 tdevelop (customproject)
+9026 tdevelop (doxygen)
+9027 tdevelop (cvs)
+9028 tdevelop (abbrev)
+9029 tdevelop (filter)
+9030 tdevelop (texttools)
+9031 tdevelop (history)
+9032 qeditor
+9033 tdevelop (diff frontend)
+9034 tdevelop (filecreate part)
+9035 tdevelop (konsole part)
+9036 tdevelop (subversion part)
# toys and games
10000 amor
@@ -367,59 +374,59 @@
# Kate/Kant/KWrite
-13000 Kate
-13001 Kate (App)
-13002 Kate (View Manager)
-13010 Kate (XML/Syntax)
-13020 Kate (Document)
-13025 Kate (Commands)
-13030 Kate (View)
-13033 Kate (Renderer)
-13035 Kate (Code Completion)
-13040 Kate (Plugins)
-13050 Kate (Scripting)
-13051 Kate (KJS Scripts)
+13000 Kate
+13001 Kate (App)
+13002 Kate (View Manager)
+13010 Kate (XML/Syntax)
+13020 Kate (Document)
+13025 Kate (Commands)
+13030 Kate (View)
+13033 Kate (Renderer)
+13035 Kate (Code Completion)
+13040 Kate (Plugins)
+13050 Kate (Scripting)
+13051 Kate (KJS Scripts)
# Kopete
-14000 kopete
-14010 libkopete
-14100 kopete (gadu)
-14101 kopete (gadu - raw protocol)
-14110 kopete (icq)
-14111 kopete (icq - raw protocol)
-14120 kopete (irc)
-14121 kopete (irc - raw protocol)
-14130 kopete (jabber)
-14131 kopete (jabber - raw protocol)
-14140 kopete (msn)
-14141 kopete (msn - raw protocol)
-14150 kopete (oscar)
-14151 kopete (oscar - raw protocol)
-14152 kopete (oscar/aim)
-14153 kopete (oscar/icq)
-14160 kopete (sms)
-14161 kopete (sms - raw protocol)
-14170 kopete (winpopup)
-14171 kopete (winpopup - raw protocol)
-14180 kopete (yahoo)
-14181 kopete (yahoo - raw protocol)
-14190 kopete (groupwise)
-14191 kopete (libgroupwise)
-14192 kopete (libgroupwise - raw)
-14200 kopete (meanwhile)
-14300 kopete (autoaway)
-14301 kopete (connectionstatus)
-14302 kopete (contactnotes)
-14303 kopete (cryptography)
-14304 kopete (importer)
-14305 kopete (motionautoaway)
-14306 kopete (msginfo)
-14307 kopete (nowlistening)
-14308 kopete (translator)
-14309 kopete (webpresence)
-14310 kopete (history)
-14311 kopete (skype)
-14312 kopete (smpppdcs)
+14000 kopete
+14010 libkopete
+14100 kopete (gadu)
+14101 kopete (gadu - raw protocol)
+14110 kopete (icq)
+14111 kopete (icq - raw protocol)
+14120 kopete (irc)
+14121 kopete (irc - raw protocol)
+14130 kopete (jabber)
+14131 kopete (jabber - raw protocol)
+14140 kopete (msn)
+14141 kopete (msn - raw protocol)
+14150 kopete (oscar)
+14151 kopete (oscar - raw protocol)
+14152 kopete (oscar/aim)
+14153 kopete (oscar/icq)
+14160 kopete (sms)
+14161 kopete (sms - raw protocol)
+14170 kopete (winpopup)
+14171 kopete (winpopup - raw protocol)
+14180 kopete (yahoo)
+14181 kopete (yahoo - raw protocol)
+14190 kopete (groupwise)
+14191 kopete (libgroupwise)
+14192 kopete (libgroupwise - raw)
+14200 kopete (meanwhile)
+14300 kopete (autoaway)
+14301 kopete (connectionstatus)
+14302 kopete (contactnotes)
+14303 kopete (cryptography)
+14304 kopete (importer)
+14305 kopete (motionautoaway)
+14306 kopete (msginfo)
+14307 kopete (nowlistening)
+14308 kopete (translator)
+14309 kopete (webpresence)
+14310 kopete (history)
+14311 kopete (skype)
+14312 kopete (smpppdcs)
# KDB
20000 KDB (core)
@@ -429,15 +436,15 @@
20012 KDB (plugin)
#tdefilereplace
-23000 TDEFileReplace (tdefilereplacepart)
+23000 TDEFileReplace (tdefilereplacepart)
#klinkstatus
23100 KLinkStatus
# Quanta
24000 Quanta
-24001 Quanta (parser)
-24002 Quanta (debugger)
+24001 Quanta (parser)
+24002 Quanta (debugger)
# kafka
25000 Kafka (kafkapp)
@@ -448,25 +455,25 @@
25005 Kafka (kafkadom)
# KSVG
-26000 KSVG
-26001 KSVG - Parser
-26002 KSVG - Rendering
-26003 KSVG - KPart
-26004 KSVG - Ecma
-26005 KSVG - Canvas
-
-26500 KDOM XInclude
-26550 KDOM XPointer
-26560 KDOM XPath
-26600 KDOM Catalog
-26650 KDOM kxmllint
+26000 KSVG
+26001 KSVG - Parser
+26002 KSVG - Rendering
+26003 KSVG - KPart
+26004 KSVG - Ecma
+26005 KSVG - Canvas
+
+26500 KDOM XInclude
+26550 KDOM XPointer
+26560 KDOM XPath
+26600 KDOM Catalog
+26650 KDOM kxmllint
# XSLT on top of KDOM
-27000 KXSLT
+27000 KXSLT
# libkscan / kooka
-28000 Kooka
-29000 libkscan
+28000 Kooka
+29000 libkscan
# 30001-40000 are for KOffice
30001 koffice (lib koml)
@@ -522,7 +529,7 @@
39001 kformula
40000 kformula
41000 chalk (tiles)
-41001 chalk (core)
+41001 chalk (core)
41002 chalk (registry)
41003 chalk (tools)
41004 chalk (color management system)
@@ -542,43 +549,43 @@
44021 Kexi (plugins)
# kdeextragear
-50001 kfortune
+50001 kfortune
# KIPI - KDE Imaging Plugin Interface
-51000 KIPI (general)
-51001 KIPI (loading)
+51000 KIPI (general)
+51001 KIPI (loading)
# tdemultimedia
-60001 kreatecd
-60002 kaudiocreator
-60005 krec
-60010 libkcddb
-65432 juk
-66666 noatun
-67000 kscd
-67100 kmix
-67200 tdemid
+60001 kreatecd
+60002 kaudiocreator
+60005 krec
+60010 libkcddb
+65432 juk
+66666 noatun
+67000 kscd
+67100 kmix
+67200 tdemid
# tdebindings
-70001 dcoppython
-80001 kjsembed
+70001 dcoppython
+80001 kjsembed
# tdeaddons
-90000 vimpart
-90010 noatun-plugins (dub)
-90020 noatun-plugins (lyrics)
-90100 konq-plugins (fsview)
-90110 konq-plugins (webarchiver)
-90120 konq-plugins (validators)
-90130 konq-plugins (uachanger)
-90140 konq-plugins (sidebar - newsticker)
-90150 konq-plugins (minitools)
-90160 konq-plugins (kuick)
-90170 konq-plugins (kimgalleryplugin)
-90180 konq-plugins (domtreeviewer)
-90190 konq-plugins (dirfilter)
-90200 kicker-applets (mediacontrol)
-90210 konq-plugins (rellinks)
+90000 vimpart
+90010 noatun-plugins (dub)
+90020 noatun-plugins (lyrics)
+90100 konq-plugins (fsview)
+90110 konq-plugins (webarchiver)
+90120 konq-plugins (validators)
+90130 konq-plugins (uachanger)
+90140 konq-plugins (sidebar - newsticker)
+90150 konq-plugins (minitools)
+90160 konq-plugins (kuick)
+90170 konq-plugins (kimgalleryplugin)
+90180 konq-plugins (domtreeviewer)
+90190 konq-plugins (dirfilter)
+90200 kicker-applets (mediacontrol)
+90210 konq-plugins (rellinks)
# kdenonbeta
diff --git a/tdecore/kdebug.cpp b/tdecore/kdebug.cpp
index afd925190..78fc06247 100644
--- a/tdecore/kdebug.cpp
+++ b/tdecore/kdebug.cpp
@@ -759,7 +759,13 @@ TQString formatBacktrace(void *addr) {
// NOTE: if somebody would compile for some non-linux-glibc platform
// check if dladdr function is avalible there
Dl_info info;
- dladdr(func.addr, &info); // obtain information about the function.
+
+ // obtain information about the function.
+#ifdef Q_OS_SOLARIS
+ dladdr((void *)func.addr, &info);
+#else
+ dladdr(func.addr, &info);
+#endif /* Solaris */
func.fileName = info.dli_fname;
func.base = info.dli_fbase;
diff --git a/tdecore/kmountpoint.cpp b/tdecore/kmountpoint.cpp
index a9be89e76..ae698c2af 100644
--- a/tdecore/kmountpoint.cpp
+++ b/tdecore/kmountpoint.cpp
@@ -33,6 +33,7 @@
#include <volmgt.h>
#endif
#ifdef HAVE_SYS_MNTTAB_H
+#include <stdio.h>
#include <sys/mnttab.h>
#endif
#ifdef HAVE_MNTENT_H
diff --git a/tdecore/ksimpledirwatch.cpp b/tdecore/ksimpledirwatch.cpp
index cbb4ce682..a5bab80ce 100644
--- a/tdecore/ksimpledirwatch.cpp
+++ b/tdecore/ksimpledirwatch.cpp
@@ -52,11 +52,17 @@
// debug
#include <sys/ioctl.h>
+#ifdef Q_OS_SOLARIS
+#include <sys/filio.h> /* FIONREAD is defined here */
+#endif /* solaris */
+
#ifdef HAVE_INOTIFY
#include <unistd.h>
#include <fcntl.h>
#include <sys/syscall.h>
+#ifdef Q_OS_LINUX
#include <linux/types.h>
+#endif /* Linux */
// Linux kernel headers are documented to not compile
#define _S390_BITOPS_H
#include <sys/inotify.h>
diff --git a/tdecore/kurl.cpp b/tdecore/kurl.cpp
index a80257f76..c1adf1bec 100644
--- a/tdecore/kurl.cpp
+++ b/tdecore/kurl.cpp
@@ -1608,7 +1608,7 @@ TQString KURL::prettyURL( int _trailing ) const
}
else
{
- u += trailingSlash( _trailing, lazy_encode( m_strPath ) );
+ u += trailingSlash( _trailing, lazy_encode( m_strPath, false ) );
}
if (!m_strQuery_encoded.isNull())
diff --git a/tdecore/malloc/malloc.c b/tdecore/malloc/malloc.c
index 5cdab5ac7..0c02ee307 100644
--- a/tdecore/malloc/malloc.c
+++ b/tdecore/malloc/malloc.c
@@ -4306,7 +4306,7 @@ static Void_t** iALLOc(n_elements, sizes, opts, chunks) size_t n_elements; size_
remainder_size = chunksize(p);
if (opts & 0x2) { /* optionally clear the elements */
- memset(mem, 0, remainder_size - SIZE_SZ - array_size)
+ memset(mem, 0, remainder_size - SIZE_SZ - array_size);
}
/* If not provided, allocate the pointer array as final part of chunk */
diff --git a/tdecore/tdeaboutdata.cpp b/tdecore/tdeaboutdata.cpp
index 3a147842a..48f41645d 100644
--- a/tdecore/tdeaboutdata.cpp
+++ b/tdecore/tdeaboutdata.cpp
@@ -446,6 +446,10 @@ TDEAboutData::license() const
l = "QPL v1.0";
f = locate("data", "LICENSES/QPL_V1.0");
break;
+ case License_MIT:
+ l = "MIT";
+ f = locate("data", "LICENSES/MIT");
+ break;
case License_Custom:
if (mLicenseText && *mLicenseText)
return( i18n(mLicenseText) );
diff --git a/tdecore/tdeaboutdata.h b/tdecore/tdeaboutdata.h
index 06f193f75..071da368b 100644
--- a/tdecore/tdeaboutdata.h
+++ b/tdecore/tdeaboutdata.h
@@ -199,7 +199,8 @@ class TDECORE_EXPORT TDEAboutData
License_QPL = 5,
License_QPL_V1_0 = 5,
License_GPL_V3 = 6,
- License_LGPL_V3 = 7
+ License_LGPL_V3 = 7,
+ License_MIT = 8
};
public:
diff --git a/tdecore/tdehw/hwlibdaemons/CMakeLists.txt b/tdecore/tdehw/hwlibdaemons/CMakeLists.txt
index edc853c95..7e6427eec 100644
--- a/tdecore/tdehw/hwlibdaemons/CMakeLists.txt
+++ b/tdecore/tdehw/hwlibdaemons/CMakeLists.txt
@@ -10,4 +10,5 @@
#################################################
-add_subdirectory( dbus )
+#add_subdirectory( dbus )
+add_subdirectory( tdedbus )
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/BrightnessService.cpp b/tdecore/tdehw/hwlibdaemons/tdedbus/BrightnessService.cpp
new file mode 100644
index 000000000..1f6b31f5f
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/BrightnessService.cpp
@@ -0,0 +1,72 @@
+/*
+ * BrightnessService.cpp
+ *
+ * Created on: Feb 1, 2021
+ * Author: emanoil
+ *
+ * hardwarecontrol Copyright (C) 2021 trinity desktop development team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#include <tqregexp.h>
+
+#include "BrightnessService.h"
+
+BrightnessService::BrightnessService(TQT_DBusConnection &conn)
+: DeviceServiceBase(conn)
+{
+ // TODO Auto-generated constructor stub
+
+}
+
+BrightnessService::~BrightnessService()
+{
+ // TODO Auto-generated destructor stub
+}
+
+/*!
+ * Implement virtual methods
+ *
+ */
+bool BrightnessService::CanSetBrightness(const TQString& device, bool& value, TQT_DBusError& error) {
+
+ if (device.find( TQRegExp("^/sys/devices.*/brightness$"),0) == 0 ) {
+ value = canSetDeviceValue(device, error);
+ } else {
+ error = TQT_DBusError::stdInvalidArgs(TQString ("Invalid argument for device: " + device));
+ }
+ if (error.isValid()) {
+ tqDebug(error.message().local8Bit());
+ return false;
+ }
+ return true;
+}
+
+bool BrightnessService::SetBrightness(const TQString& device, const TQString& brightness, bool& value, TQT_DBusError& error) {
+
+ if (device.find( TQRegExp("^/sys/devices.*/brightness$"),0) == 0) {
+ value = setDeviceValue(device, brightness, error);
+ } else {
+ error = TQT_DBusError::stdInvalidArgs(TQString ("Invalid argument for device: " + device));
+ }
+ if (error.isValid()) {
+ tqDebug(error.message().local8Bit());
+ return false;
+ }
+ return true;
+}
+
+void BrightnessService::handleMethodReply(const TQT_DBusMessage& reply) {
+ m_connection->send(reply);
+}
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/BrightnessService.h b/tdecore/tdehw/hwlibdaemons/tdedbus/BrightnessService.h
new file mode 100644
index 000000000..584c8959b
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/BrightnessService.h
@@ -0,0 +1,49 @@
+/*
+ * BrightnessService.h
+ *
+ * Created on: Feb 1, 2021
+ * Author: emanoil
+ *
+ * hardwarecontrol Copyright (C) 2021 trinity desktop development team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef BRIGHTNESSSERVICE_H_
+#define BRIGHTNESSSERVICE_H_
+
+#include <tqdbusconnection.h>
+
+#include "interfaces/brightnessInterface.h"
+#include "DeviceServiceBase.h"
+
+class BrightnessService: public org::trinitydesktop::hardwarecontrol::BrightnessInterface,
+ public DeviceServiceBase
+{
+public:
+ BrightnessService(TQT_DBusConnection&);
+ virtual ~BrightnessService();
+
+protected:
+ virtual bool CanSetBrightness(const TQString& device, bool& value, TQT_DBusError& error);
+
+ virtual bool SetBrightness(const TQString& device, const TQString& brightness, bool& value, TQT_DBusError& error);
+
+protected: // implement sending replies
+ void handleMethodReply(const TQT_DBusMessage& reply);
+//
+// virtual void BrightnessServiceAsync(int asyncCallId, const TQT_DBusObjectPath& device, const TQString& uuid);
+
+};
+
+#endif /* BRIGHTNESSSERVICE_H_ */
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/CMakeLists.txt b/tdecore/tdehw/hwlibdaemons/tdedbus/CMakeLists.txt
new file mode 100644
index 000000000..28ef745c2
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/CMakeLists.txt
@@ -0,0 +1,74 @@
+#################################################
+#
+# (C) 2020 Emanoil Kotsev
+# deloptes (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 3
+#
+#################################################
+
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
+set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
+#-Wl,--whole-archive
+set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
+
+##### configure checks ##########################
+if( NOT DBUS_SYS_DIR )
+ set( DBUS_SYS_DIR ${SYSCONF_INSTALL_DIR}/dbus-1/system.d )
+endif( )
+
+
+if( WITH_GCC_VISIBILITY )
+ if( NOT UNIX )
+ tde_message_fatal(FATAL_ERROR "\ngcc visibility support was requested, but your system is not *NIX" )
+ endif( NOT UNIX )
+ set( __KDE_HAVE_GCC_VISIBILITY 1 )
+ set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
+endif( )
+
+add_definitions(
+# -DQT_THREAD_SUPPORT
+ ${TQT_CFLAGS_OTHER}
+)
+
+add_subdirectory( interfaces )
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}/interfaces
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${DBUS_TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+##### tde_dbus_hardwarecontrol ##################
+tde_add_executable( tde_dbus_hardwarecontrol AUTOMOC
+ SOURCES HardwareControl.cpp main.cpp hardwarecontrolService.cpp
+ BrightnessService.cpp CPUGovernorService.cpp DeviceServiceBase.cpp
+ InputEventsService.cpp PowerService.cpp PropertiesService.cpp
+ LINK ${DBUS_TQT_LIBRARIES} hwcontrolinterfaces-static tdecore-shared
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+
+
+##### other data ################################
+
+configure_file( org.trinitydesktop.hardwarecontrol.service.cmake org.trinitydesktop.hardwarecontrol.service @ONLY )
+
+install( FILES
+ org.trinitydesktop.hardwarecontrol.conf
+ DESTINATION ${DBUS_SYSTEM_CONF_DIRECTORY} )
+
+install( FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/org.trinitydesktop.hardwarecontrol.service
+ DESTINATION ${DBUS_SERVICE_DIRECTORY} )
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/CPUGovernorService.cpp b/tdecore/tdehw/hwlibdaemons/tdedbus/CPUGovernorService.cpp
new file mode 100644
index 000000000..1e689b7e1
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/CPUGovernorService.cpp
@@ -0,0 +1,73 @@
+/*
+ * CPUGovernorService.cpp
+ *
+ * Created on: Feb 1, 2021
+ * Author: emanoil
+ *
+ * hardwarecontrol Copyright (C) 2021 trinity desktop development team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#include "CPUGovernorService.h"
+
+CPUGovernorService::CPUGovernorService(TQT_DBusConnection &conn)
+: DeviceServiceBase(conn)
+{
+ // TODO Auto-generated constructor stub
+
+}
+
+CPUGovernorService::~CPUGovernorService()
+{
+ // TODO Auto-generated destructor stub
+}
+
+/*!
+ * Implement virtual methods
+ *
+ */
+bool CPUGovernorService::CanSetCPUGovernor(TQ_INT32 cpu, bool& value, TQT_DBusError& error) {
+ // do something
+ TQString dev = TQString("/sys/devices/system/cpu/cpu%1/cpufreq/scaling_governor").arg(cpu);
+ if ((cpu>-1)) {
+ value = canSetDeviceValue(dev, error);
+ } else {
+ error = TQT_DBusError::stdInvalidArgs(TQString ("Invalid argument cpu: %1, governor: %2").arg(cpu).arg(dev));
+ }
+ if (error.isValid()) {
+ tqDebug(error.message().local8Bit());
+ return false;
+ }
+ return true;
+}
+
+bool CPUGovernorService::SetCPUGovernor(TQ_INT32 cpu, const TQString& governor, bool& value, TQT_DBusError& error) {
+
+ TQString dev = TQString("/sys/devices/system/cpu/cpu%1/cpufreq/scaling_governor").arg(cpu);
+ if ((cpu>-1) && !governor.isEmpty()) {
+ value = setDeviceValue(dev, governor, error);
+ } else {
+ error = TQT_DBusError::stdInvalidArgs(TQString ("Invalid argument cpu: %1, governor: %2").arg(cpu).arg(governor));
+ }
+ if (error.isValid()) {
+ tqDebug(error.message().local8Bit());
+ return false;
+ }
+ return true;
+}
+
+void CPUGovernorService::handleMethodReply(const TQT_DBusMessage& reply) {
+ m_connection->send(reply);
+}
+
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/CPUGovernorService.h b/tdecore/tdehw/hwlibdaemons/tdedbus/CPUGovernorService.h
new file mode 100644
index 000000000..da5f36189
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/CPUGovernorService.h
@@ -0,0 +1,46 @@
+/*
+ * CPUGovernorService.h
+ *
+ * Created on: Feb 1, 2021
+ * Author: emanoil
+ *
+ * hardwarecontrol Copyright (C) 2021 trinity desktop development team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef CPUGOVERNORSERVICE_H_
+#define CPUGOVERNORSERVICE_H_
+
+#include "interfaces/cpugovernorInterface.h"
+#include "DeviceServiceBase.h"
+
+class CPUGovernorService: public org::trinitydesktop::hardwarecontrol::CPUGovernorInterface,
+ public DeviceServiceBase
+{
+public:
+ CPUGovernorService(TQT_DBusConnection&);
+ virtual ~CPUGovernorService();
+protected:
+ virtual bool CanSetCPUGovernor(TQ_INT32 cpu, bool& value, TQT_DBusError& error) ;
+
+ virtual bool SetCPUGovernor(TQ_INT32 cpu, const TQString& governor, bool& value, TQT_DBusError& error);
+
+protected: // implement sending replies
+ void handleMethodReply(const TQT_DBusMessage& reply);
+
+//
+// virtual void CPUGovernorServiceAsync(int asyncCallId, const TQT_DBusObjectPath& device, const TQString& uuid);
+};
+
+#endif /* CPUGOVERNORSERVICE_H_ */
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/DeviceServiceBase.cpp b/tdecore/tdehw/hwlibdaemons/tdedbus/DeviceServiceBase.cpp
new file mode 100644
index 000000000..579f7cd45
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/DeviceServiceBase.cpp
@@ -0,0 +1,68 @@
+/*
+ * DeviceServiceBase.cpp
+ *
+ * Created on: Feb 1, 2021
+ * Author: emanoil
+ *
+ * hardwarecontrol Copyright (C) 2021 trinity desktop development team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <unistd.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+
+#include <tqdbuserror.h>
+
+#include "DeviceServiceBase.h"
+
+DeviceServiceBase::DeviceServiceBase(TQT_DBusConnection &conn)
+: m_connection(&conn)
+{
+ // TODO Auto-generated constructor stub
+
+}
+
+DeviceServiceBase::~DeviceServiceBase()
+{
+ if (m_connection)
+ delete m_connection;
+}
+
+bool DeviceServiceBase::canSetDeviceValue(const TQString& device, TQT_DBusError& error) {
+ // check if path is writable
+ int rval = access (device.latin1(), W_OK);
+ if (rval != 0)
+ return false;
+ return true;
+}
+
+bool DeviceServiceBase::setDeviceValue(const TQString& device, const TQString& param, TQT_DBusError& error) {
+ // make sure path is writable
+ if (canSetDeviceValue(device, error)) {
+ TQFile file(device);
+ if (!file.open( IO_WriteOnly ) ) {
+ error = TQT_DBusError::stdFailed(TQString ("Could not open device %1").arg(device));
+ return false;
+ }
+ TQTextStream stream( &file );
+ stream << param;
+ file.close();
+ } else {
+ error = TQT_DBusError::stdFailed(TQString ("Could not access device %1").arg(device));
+ return false;
+ }
+ return true;
+}
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/DeviceServiceBase.h b/tdecore/tdehw/hwlibdaemons/tdedbus/DeviceServiceBase.h
new file mode 100644
index 000000000..7c06de401
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/DeviceServiceBase.h
@@ -0,0 +1,45 @@
+/*
+ * DeviceServiceBase.h
+ *
+ * Created on: Feb 1, 2021
+ * Author: emanoil
+ *
+ * hardwarecontrol Copyright (C) 2021 trinity desktop development team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef DEVICESERVICEBASE_H_
+#define DEVICESERVICEBASE_H_
+
+#include <tqstring.h>
+#include <tqdbusconnection.h>
+
+class DeviceServiceBase
+{
+public:
+ DeviceServiceBase(TQT_DBusConnection&);
+ virtual ~DeviceServiceBase();
+
+protected:
+ bool canSetDeviceValue(const TQString& device, TQT_DBusError& error);
+ bool setDeviceValue(const TQString& device, const TQString& param, TQT_DBusError& error);
+
+protected: // implement sending replies
+ virtual void handleMethodReply(const TQT_DBusMessage& reply) = 0;
+
+protected:
+ TQT_DBusConnection *m_connection;
+};
+
+#endif /* DEVICESERVICEBASE_H_ */
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/HardwareControl.cpp b/tdecore/tdehw/hwlibdaemons/tdedbus/HardwareControl.cpp
new file mode 100644
index 000000000..8a36807e5
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/HardwareControl.cpp
@@ -0,0 +1,118 @@
+/*
+ * HardwareControl.cpp
+ *
+ * Created on: Feb 2, 2021
+ * Author: emanoil
+ *
+ * hardwarecontrol Copyright (C) 2021 trinity desktop development team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <tqtimer.h>
+#include <tqdbusmessage.h>
+
+#include "HardwareControl.h"
+
+#define DBUS_HWCTRL_SERVICE_NAME "org.trinitydesktop.hardwarecontrol"
+#define DBUS_CONNECTION_TIMEOUT 4000
+#define DBUS_CONNECTION_RETRY 3
+
+HardwareControl::HardwareControl(int &argc, char **argv, bool GUIenabled, bool SMenabled) :
+TQApplication(argc, argv, GUIenabled, SMenabled)
+{
+ retryCount=0;
+ // init session connection to dbus
+ if (!initDBUS()) {
+ tqDebug("Failed to initialize the connection to DBus");
+ TQTimer::singleShot(DBUS_CONNECTION_TIMEOUT, this, TQT_SLOT(slotReconnect()));
+ retryCount++;
+ }
+}
+
+HardwareControl::~HardwareControl()
+{
+ // close D-Bus connection
+ close();
+
+ delete hardwarecontrolService;
+ delete trinitydesktopService;
+ delete orgService;
+ delete rootService;
+}
+
+bool HardwareControl::initDBUS(){
+ m_connection = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus, DBUS_HWCTRL_SERVICE_NAME);
+
+ if ( !m_connection.isConnected() ) {
+ tqDebug("Failed to open connection to system message bus: "
+ + m_connection.lastError().message());
+ return false;
+ }
+
+ // try to get a specific service name
+ if (!m_connection.requestName(DBUS_HWCTRL_SERVICE_NAME, TQT_DBusConnection::NoReplace))
+ return false;
+
+ m_connection.scheduleDispatch();
+ m_connection.connect(this, TQT_SLOT(slotDbusSignal(const TQT_DBusMessage&)));
+
+ TQTimer::singleShot(10, this, TQT_SLOT(slotConnectionCheck()));
+
+ return true;
+}
+
+void HardwareControl::close() {
+ if(m_connection.isConnected()) {
+ m_connection.disconnect(this, TQT_SLOT(slotDbusSignal(const TQT_DBusMessage&)));
+ m_connection.closeConnection(DBUS_HWCTRL_SERVICE_NAME);
+ }
+}
+
+void HardwareControl::slotReconnect() {
+
+ close();
+
+ if (!initDBUS()) {
+ if (DBUS_CONNECTION_RETRY > retryCount) {
+ tqFatal("Failed to initialize the connection to DBus");
+ }
+ TQTimer::singleShot(DBUS_CONNECTION_TIMEOUT, this, TQT_SLOT(slotReconnect()));
+ retryCount++;
+ }
+}
+
+void HardwareControl::slotDbusSignal(const TQT_DBusMessage& message) {
+ if (message.interface() != TQString("org.freedesktop.DBus"))
+ return;
+ if (message.member() != TQString("NameAcquired"))
+ return;
+ tqDebug("Name acquired: " + message[0].toString());
+ serviceName = message[0].toString();
+}
+
+void HardwareControl::slotConnectionCheck() {
+
+ if (serviceName != DBUS_HWCTRL_SERVICE_NAME) {
+ tqFatal("TDEHW service already running or no unique name possible.");
+ }
+
+ rootService = new RootNodeService(m_connection);
+ orgService = new OrgNodeService(m_connection);
+ trinitydesktopService = new TrinityDesktopNodeService(m_connection);
+ hardwarecontrolService = new HardwareControlNodeService(m_connection);
+ tqDebug("TDEHW service setup done.");
+}
+
+#include "HardwareControl.moc"
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/HardwareControl.h b/tdecore/tdehw/hwlibdaemons/tdedbus/HardwareControl.h
new file mode 100644
index 000000000..c7e692b90
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/HardwareControl.h
@@ -0,0 +1,81 @@
+/*
+ * HardwareControl.h
+ *
+ * Created on: Feb 2, 2021
+ * Author: emanoil
+ *
+ * hardwarecontrol Copyright (C) 2021 trinity desktop development team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef HARDWARECONTROL_H_
+#define HARDWARECONTROL_H_
+
+#include <tqapplication.h>
+
+#include "hardwarecontrolService.h"
+
+class HardwareControl: public TQApplication
+{
+ TQ_OBJECT
+
+public:
+ HardwareControl(int &argc, char **argv, bool GUIenabled, bool SMenabled);
+ virtual ~HardwareControl();
+
+private:
+ /*!
+ * This function initialise the connection to the D-Bus daemon.
+ * \return boolean with the result of the operation
+ * \retval true if successful initialised D-Bus connection
+ * \retval false if unsuccessful
+ */
+ bool initDBUS();
+ //! to close the connection to D-Bus
+ void close();
+
+ RootNodeService *rootService;
+ OrgNodeService *orgService;
+ TrinityDesktopNodeService *trinitydesktopService;
+ HardwareControlNodeService *hardwarecontrolService;
+ int retryCount;
+ TQString serviceName;
+ TQT_DBusConnection m_connection;
+
+private slots:
+ /*!
+ * This function does a reconnect to D-Bus.
+ * \return void
+ */
+ void slotReconnect();
+ /*!
+ * This function is to process D-Bus signals.
+ * \return void
+ */
+ void slotDbusSignal(const TQT_DBusMessage&);
+ /*!
+ * This function is to check D-Bus connection.
+ * and if the name is the unique name prepare the receivers
+ * If the name is not the unique name it mans the service
+ * is already running or unique name can not be obtained from
+ * DBus. In this latter case the application will terminate.
+ *
+ * \return void
+ */
+ void slotConnectionCheck();
+
+};
+
+
+#endif /* HARDWARECONTROL_H_ */
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/InputEventsService.cpp b/tdecore/tdehw/hwlibdaemons/tdedbus/InputEventsService.cpp
new file mode 100644
index 000000000..458df9467
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/InputEventsService.cpp
@@ -0,0 +1,112 @@
+/*
+ * InputEventsService.cpp
+ *
+ * Created on: Feb 1, 2021
+ * Author: emanoil
+ *
+ * hardwarecontrol Copyright (C) 2021 trinity desktop development team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <unistd.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+
+// Input devices
+#include <linux/input.h>
+
+#include <tqvaluelist.h>
+
+#include "InputEventsService.h"
+
+#define BITS_PER_LONG (sizeof(long) * 8)
+#define NUM_BITS(x) ((((x) - 1) / BITS_PER_LONG) + 1)
+
+InputEventsService::InputEventsService(TQT_DBusConnection &conn)
+: m_connection(&conn)
+{
+ // TODO Auto-generated constructor stub
+
+}
+
+InputEventsService::~InputEventsService()
+{
+ if (m_connection)
+ delete m_connection;
+}
+
+/*!
+ * Implement virtual methods
+ *
+ */
+
+TQValueList< TQ_UINT32 > InputEventsService::getSwitches(const TQString& device, bool active, TQT_DBusError& error) {
+ int r;
+ unsigned long switches[NUM_BITS(EV_CNT)];
+ TQValueList< TQ_UINT32 > value = TQValueList< TQ_UINT32 >();
+
+ if (!device.isEmpty() && (device.find("/dev/input/event") == 0) ) {
+
+ TQFile file( device );
+ if ( !file.open( IO_ReadOnly ) ) {
+ error = TQT_DBusError::stdFailed(TQString ("Could not open device %1").arg(device));
+ return value;
+ }
+
+ if( active ) {
+ r = ioctl(file.handle(), EVIOCGSW(sizeof(switches)), switches);
+ }
+ else {
+ r = ioctl(file.handle(), EVIOCGBIT(EV_SW, EV_CNT), switches);
+ }
+ if( r > 0 ) {
+ // add the arguments to the reply
+ for( int i = 0; i < sizeof(switches)/sizeof(switches[0]); i++ ) {
+ value.append( switches[i] );
+ }
+ }
+ else {
+ error = TQT_DBusError::stdFailed(TQString ("Failed to handle IOCTL for device: " + device));
+ }
+ file.close();
+ } else {
+ error = TQT_DBusError::stdInvalidArgs(TQString ("Invalid argument for device: " + device));
+ }
+
+ return value;
+}
+
+bool InputEventsService::GetProvidedSwitches(const TQString& device, TQValueList< TQ_UINT32 >& value, TQT_DBusError& error) {
+ value = getSwitches(device, false, error);
+ if (error.isValid()) {
+ tqDebug(error.message().local8Bit());
+ return false;
+ }
+ return true;
+}
+
+bool InputEventsService::GetActiveSwitches(const TQString& device, TQValueList< TQ_UINT32 >& value, TQT_DBusError& error) {
+ value = getSwitches(device, true, error);
+ if (error.isValid()) {
+ tqDebug(error.message().local8Bit());
+ return false;
+ }
+ return true;
+}
+
+void InputEventsService::handleMethodReply(const TQT_DBusMessage& reply) {
+ m_connection->send(reply);
+}
+
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/InputEventsService.h b/tdecore/tdehw/hwlibdaemons/tdedbus/InputEventsService.h
new file mode 100644
index 000000000..a1eff3d19
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/InputEventsService.h
@@ -0,0 +1,51 @@
+/*
+ * InputEventsService.h
+ *
+ * Created on: Feb 1, 2021
+ * Author: emanoil
+ *
+ * hardwarecontrol Copyright (C) 2021 trinity desktop development team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef INPUTEVENTSSERVICE_H_
+#define INPUTEVENTSSERVICE_H_
+
+#include <tqdbusconnection.h>
+
+#include "interfaces/inputeventsInterface.h"
+
+class InputEventsService: public org::trinitydesktop::hardwarecontrol::InputEventsInterface
+{
+public:
+ InputEventsService(TQT_DBusConnection&);
+ virtual ~InputEventsService();
+protected:
+
+ TQValueList< TQ_UINT32 > getSwitches(const TQString& device, bool active, TQT_DBusError& error);
+
+ virtual bool GetProvidedSwitches(const TQString& device, TQValueList< TQ_UINT32 >& value, TQT_DBusError& error);
+
+ virtual bool GetActiveSwitches(const TQString& device, TQValueList< TQ_UINT32 >& value, TQT_DBusError& error);
+
+protected: // implement sending replies
+ virtual void handleMethodReply(const TQT_DBusMessage& reply);
+//
+// virtual void InputEventsServiceAsync(int asyncCallId, const TQT_DBusObjectPath& device, const TQString& uuid);
+
+private:
+ TQT_DBusConnection *m_connection;
+};
+
+#endif /* INPUTEVENTSSERVICE_H_ */
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/PowerService.cpp b/tdecore/tdehw/hwlibdaemons/tdedbus/PowerService.cpp
new file mode 100644
index 000000000..9b269a9de
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/PowerService.cpp
@@ -0,0 +1,277 @@
+/*
+ * PowerService.cpp
+ *
+ * Created on: Feb 1, 2021
+ * Author: emanoil
+ *
+ * hardwarecontrol Copyright (C) 2021 trinity desktop development team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <unistd.h>
+
+//#include <kdebug.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+
+#include "PowerService.h"
+
+#define POWER_STATE_PATH "/sys/power/state"
+#define POWER_DISK_PATH "/sys/power/disk"
+
+PowerService::PowerService(TQT_DBusConnection &conn)
+: DeviceServiceBase(conn)
+{
+ // TODO Auto-generated constructor stub
+
+}
+
+PowerService::~PowerService()
+{
+ // TODO Auto-generated destructor stub
+}
+
+bool PowerService::canSetPower(TQString state, TQT_DBusError& error) {
+
+ bool method = false;
+ if (canSetDeviceValue(POWER_STATE_PATH,error)) {
+ TQFile file1( POWER_STATE_PATH );
+ if ( file1.open( IO_ReadOnly ) ) {
+ TQTextStream stream( &file1 );
+ TQString line = stream.readLine(); // line of text excluding '\n'
+ if ( line.find(state, 0) != -1 )
+ method = true;
+ file1.close();
+ } else {
+ error = TQT_DBusError::stdInvalidArgs(TQString ("Can not write device: ").append(POWER_STATE_PATH));
+ }
+ }
+
+ // send reply
+ return method;
+}
+
+bool PowerService::setPower(TQString state, TQT_DBusError& error) {
+
+ bool written = false;
+ if (canSetPower(state,error)) {
+ if ( setDeviceValue(POWER_STATE_PATH, state, error) ) {
+ written = true;
+ } else {
+ error = TQT_DBusError::stdFailed(TQString ("Can not set state: " + state));
+ }
+ } else {
+ error = TQT_DBusError::stdFailed(TQString ("Can not write device: ").append(POWER_STATE_PATH));
+ }
+
+ return written;
+}
+
+bool PowerService::canSetHibernation(TQString state, TQT_DBusError& error) {
+
+ // check if path is writable
+ bool state_writable = canSetDeviceValue(POWER_STATE_PATH,error);
+ bool disk_writable = canSetDeviceValue(POWER_DISK_PATH,error);
+
+ // check if method is supported
+ bool method1 = false, method2 = false;
+ if (state_writable && disk_writable) {
+ TQFile file1( POWER_STATE_PATH );
+ if ( file1.open( IO_ReadOnly ) ) {
+ TQTextStream stream( &file1 );
+ TQString line = stream.readLine(); // line of text excluding '\n'
+ if ( line.find("disk", 0) != -1 )
+ method1 = true;
+ file1.close();
+// kdDebug() << "Method1 for " << state << " is " << method1 << "\n";
+ } else {
+ error = TQT_DBusError::stdInvalidArgs(TQString ("Could not open ").append(POWER_STATE_PATH));
+ return false;
+ }
+
+ TQFile file2(POWER_DISK_PATH);
+ if ( file2.open( IO_ReadOnly ) ) {
+ TQTextStream stream( &file2 );
+ TQString line = stream.readLine(); // line of text excluding '\n'
+ if ( line.find(state, 0) != -1 )
+ method2 = true;
+ file2.close();
+ } else {
+ error = TQT_DBusError::stdInvalidArgs(TQString ("Could not open ").append(POWER_DISK_PATH));
+ return false;
+ }
+ }
+
+ // send reply
+ return state_writable && disk_writable && method1 && method2;
+}
+
+bool PowerService::setHibernation(TQString state, TQT_DBusError& error) {
+
+ // set hibernation state
+ bool written1 = false, written2 = false;
+
+ if (canSetHibernation(state,error)) {
+ TQFile file1(POWER_DISK_PATH);
+ if (!file1.open( IO_WriteOnly ) ) {
+ error = TQT_DBusError::stdFailed(TQString ("Could not open device ").append(POWER_DISK_PATH));
+ return false;
+ }
+ TQTextStream stream1( &file1 );
+ stream1 << state;
+ file1.close();
+ written1 = true;
+
+ TQFile file2(POWER_STATE_PATH);
+ if (!file2.open( IO_WriteOnly ) ) {
+ error = TQT_DBusError::stdFailed(TQString ("Could not open device ").append(POWER_STATE_PATH));
+ return false;
+ }
+ TQTextStream stream2( &file2 );
+ stream2 << "disk";
+ file2.close();
+ written2 = true;
+ } else {
+ error = TQT_DBusError::stdFailed(TQString ("Could not set state: " + state));
+ return false;
+ }
+
+ return written1 && written2;
+}
+
+/*!
+ * Implement virtual methods
+ *
+ */
+
+bool PowerService::CanStandby(bool& value, TQT_DBusError& error) {
+ value = canSetPower("standby", error);
+ if (error.isValid()) {
+ tqDebug(error.message().local8Bit());
+ return false;
+ }
+ return true;
+}
+
+bool PowerService::Standby(bool& value, TQT_DBusError& error) {
+ value = setPower("standby", error);
+ if (error.isValid()) {
+ tqDebug(error.message().local8Bit());
+ return false;
+ }
+ return true;
+}
+
+bool PowerService::CanFreeze(bool& value, TQT_DBusError& error) {
+ value = canSetPower("freeze", error);
+ if (error.isValid()) {
+ tqDebug(error.message().local8Bit());
+ return false;
+ }
+ return true;
+}
+
+bool PowerService::Freeze(bool& value, TQT_DBusError& error) {
+ value = setPower("freeze", error);
+ if (error.isValid()) {
+ tqDebug(error.message().local8Bit());
+ return false;
+ }
+ return true;
+}
+
+bool PowerService::CanSuspend(bool& value, TQT_DBusError& error) {
+ value = canSetPower("mem", error);
+ if (error.isValid()) {
+ tqDebug(error.message().local8Bit());
+ return false;
+ }
+ return true;
+}
+
+bool PowerService::Suspend(bool& value, TQT_DBusError& error) {
+ value = setPower("mem", error);
+ if (error.isValid()) {
+ tqDebug(error.message().local8Bit());
+ return false;
+ }
+ return true;
+}
+
+bool PowerService::CanHibernate(bool& value, TQT_DBusError& error) {
+ value = canSetHibernation("platform", error);
+ if (error.isValid()) {
+ tqDebug(error.message().local8Bit());
+ return false;
+ }
+ return true;
+}
+
+bool PowerService::Hibernate(bool& value, TQT_DBusError& error) {
+ value = setHibernation("platform", error);
+ if (error.isValid()) {
+ tqDebug(error.message().local8Bit());
+ return false;
+ }
+ return true;
+}
+
+bool PowerService::CanHybridSuspend(bool& value, TQT_DBusError& error) {
+ value = canSetHibernation("suspend", error);
+ if (error.isValid()) {
+ tqDebug(error.message().local8Bit());
+ return false;
+ }
+ return true;
+}
+
+bool PowerService::HybridSuspend(bool& value, TQT_DBusError& error) {
+ value = setHibernation("suspend", error);
+ if (error.isValid()) {
+ tqDebug(error.message().local8Bit());
+ return false;
+ }
+ return true;
+}
+
+bool PowerService::CanSetHibernationMethod(bool& value, TQT_DBusError& error) {
+ value = canSetDeviceValue(POWER_DISK_PATH, error);
+ if (error.isValid()) {
+ tqDebug(error.message().local8Bit());
+ return false;
+ }
+ return true;
+}
+
+bool PowerService::SetHibernationMethod(const TQString& method, bool& value, TQT_DBusError& error) {
+ // set hibernation method
+ if (!method.isEmpty()) {
+ value = setDeviceValue(POWER_DISK_PATH, method, error);
+ }
+ else {
+ value = false;
+ error = TQT_DBusError::stdInvalidArgs(TQString ("Invalid argument for method: " + method));
+ }
+ if (error.isValid()) {
+ tqDebug(error.message().local8Bit());
+ return false;
+ }
+ return true;
+}
+
+
+void PowerService::handleMethodReply(const TQT_DBusMessage& reply) {
+ m_connection->send(reply);
+}
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/PowerService.h b/tdecore/tdehw/hwlibdaemons/tdedbus/PowerService.h
new file mode 100644
index 000000000..b08a55bda
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/PowerService.h
@@ -0,0 +1,73 @@
+/*
+ * PowerService.h
+ *
+ * Created on: Feb 1, 2021
+ * Author: emanoil
+ *
+ * hardwarecontrol Copyright (C) 2021 trinity desktop development team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef POWERSERVICE_H_
+#define POWERSERVICE_H_
+
+#include "interfaces/powerInterface.h"
+#include "DeviceServiceBase.h"
+
+class PowerService: public org::trinitydesktop::hardwarecontrol::PowerInterface,
+ public DeviceServiceBase
+{
+public:
+ PowerService(TQT_DBusConnection&);
+ virtual ~PowerService();
+protected:
+ bool canSetPower(TQString state, TQT_DBusError& error);
+
+ bool setPower(TQString state, TQT_DBusError& error);
+
+ bool canSetHibernation(TQString state, TQT_DBusError& error);
+
+ bool setHibernation(TQString state, TQT_DBusError& error);
+
+ virtual bool CanStandby(bool& value, TQT_DBusError& error);
+
+ virtual bool Standby(bool& value, TQT_DBusError& error);
+
+ virtual bool CanFreeze(bool& value, TQT_DBusError& error);
+
+ virtual bool Freeze(bool& value, TQT_DBusError& error);
+
+ virtual bool CanSuspend(bool& value, TQT_DBusError& error);
+
+ virtual bool Suspend(bool& value, TQT_DBusError& error);
+
+ virtual bool CanHibernate(bool& value, TQT_DBusError& error);
+
+ virtual bool Hibernate(bool& value, TQT_DBusError& error);
+
+ virtual bool CanHybridSuspend(bool& value, TQT_DBusError& error);
+
+ virtual bool HybridSuspend(bool& value, TQT_DBusError& error);
+
+ virtual bool CanSetHibernationMethod(bool& value, TQT_DBusError& error);
+
+ virtual bool SetHibernationMethod(const TQString& method, bool& value, TQT_DBusError& error);
+
+protected: // implement sending replies
+ void handleMethodReply(const TQT_DBusMessage& reply);
+//
+// virtual void PowerServiceAsync(int asyncCallId, const TQT_DBusObjectPath& device, const TQString& uuid);
+};
+
+#endif /* POWERSERVICE_H_ */
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/PropertiesService.cpp b/tdecore/tdehw/hwlibdaemons/tdedbus/PropertiesService.cpp
new file mode 100644
index 000000000..6057cd4b3
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/PropertiesService.cpp
@@ -0,0 +1,63 @@
+/*
+ * PropertiesService.cpp
+ *
+ * Created on: Feb 7, 2021
+ * Author: emanoil
+ *
+ * hardwarecontrol Copyright (C) 2009 hardwarecontrol development team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#include "PropertiesService.h"
+
+PropertiesService::PropertiesService(TQT_DBusConnection &conn)
+: m_connection(&conn)
+{
+ // TODO Auto-generated constructor stub
+
+}
+
+PropertiesService::~PropertiesService()
+{
+ // TODO Auto-generated destructor stub
+}
+
+bool PropertiesService::handleSignalSend(const TQT_DBusMessage& reply) {
+
+ return true;
+}
+TQString PropertiesService::objectPath() const {
+
+ return TQString();
+}
+
+bool PropertiesService::Get(const TQString& interface, const TQString& name, TQT_DBusVariant& value, TQT_DBusError& error) {
+
+ return true;
+}
+
+bool PropertiesService::Set(const TQString& interface, const TQString& name, const TQT_DBusVariant& value, TQT_DBusError& error) {
+
+ return true;
+}
+
+bool PropertiesService::GetAll(const TQString& interface, TQMap< TQString, TQT_DBusVariant >& properties, TQT_DBusError& error) {
+
+ properties = TQMap< TQString, TQT_DBusVariant >();
+ return true;
+}
+
+void PropertiesService::handleMethodReply(const TQT_DBusMessage& reply){
+ m_connection->send(reply);
+}
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/PropertiesService.h b/tdecore/tdehw/hwlibdaemons/tdedbus/PropertiesService.h
new file mode 100644
index 000000000..3d16925cf
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/PropertiesService.h
@@ -0,0 +1,56 @@
+/*
+ * PropertiesService.h
+ *
+ * Created on: Feb 7, 2021
+ * Author: emanoil
+ *
+ * hardwarecontrol Copyright (C) 2009 hardwarecontrol development team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef PROPERTIESSERVICE_H_
+#define PROPERTIESSERVICE_H_
+
+#include <tqmap.h>
+
+#include <tqdbusconnection.h>
+#include <tqdbusvariant.h>
+
+#include "interfaces/propertiesInterface.h"
+
+class PropertiesService: public org::freedesktop::DBus::PropertiesInterface
+{
+public:
+ PropertiesService(TQT_DBusConnection&);
+ virtual ~PropertiesService();
+
+protected: // implement sending signals
+ virtual bool handleSignalSend(const TQT_DBusMessage& reply);
+ virtual TQString objectPath() const;
+
+protected:
+ virtual bool Get(const TQString& interface, const TQString& name, TQT_DBusVariant& value, TQT_DBusError& error);
+
+ virtual bool Set(const TQString& interface, const TQString& name, const TQT_DBusVariant& value, TQT_DBusError& error);
+
+ virtual bool GetAll(const TQString& interface, TQMap< TQString, TQT_DBusVariant >& properties, TQT_DBusError& error);
+
+protected: // implement sending replies
+ virtual void handleMethodReply(const TQT_DBusMessage& reply);
+
+private:
+ TQT_DBusConnection *m_connection;
+};
+
+#endif /* PROPERTIESSERVICE_H_ */
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/hardwarecontrolService.cpp b/tdecore/tdehw/hwlibdaemons/tdedbus/hardwarecontrolService.cpp
new file mode 100644
index 000000000..849d650dd
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/hardwarecontrolService.cpp
@@ -0,0 +1,123 @@
+/*
+ *
+ * HardwareControl DBus Service implementation
+ *
+ * Copyright (C) 2020 Emanoil Kotsev <deloptes@gmail.com>
+ *
+ *
+ * This file is part of tdecore/tdehw.
+ *
+ * hardwarecontrol 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.
+ *
+ * hardwarecontrol 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 tdelibs; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+// TQt includes
+#include <tqdbusobjectpath.h>
+
+#include "hardwarecontrolService.h"
+#include "interfaces/introspectableInterface.h"
+#include "interfaces/propertiesInterface.h"
+
+#include "DeviceServiceBase.h"
+#include "BrightnessService.h"
+#include "CPUGovernorService.h"
+#include "InputEventsService.h"
+#include "PowerService.h"
+#include "PropertiesService.h"
+
+/*!
+ * Implementing node services for /org/trinitydesktop/hardwarecontrol
+ */
+#define DBUS_HWCTRL_SERVICE_PATH "/org/trinitydesktop/hardwarecontrol"
+
+/*
+ * Root Node
+ */
+RootNodeService::RootNodeService(TQT_DBusConnection &connection )
+: DBusBaseNode(), m_connection(connection)
+{
+ addChildNode(TQString("org"));
+ registerObject(m_connection,TQString("/"));
+}
+
+RootNodeService::~RootNodeService(){
+}
+
+TQT_DBusObjectBase* RootNodeService::createInterface(const TQString& interfaceName)
+{
+ return (TQT_DBusObjectBase*) m_interfaces[interfaceName];
+}
+
+/*
+ * Org Node
+ */
+OrgNodeService::OrgNodeService(TQT_DBusConnection &connection )
+: DBusBaseNode(), m_connection(connection)
+{
+ addChildNode(TQString("trinitydesktop"));
+ registerObject(m_connection,TQString("/org"));
+}
+
+OrgNodeService::~OrgNodeService(){
+}
+
+TQT_DBusObjectBase* OrgNodeService::createInterface(const TQString& interfaceName)
+{
+ return (TQT_DBusObjectBase*) m_interfaces[interfaceName];
+}
+
+/*
+ * TrinityDesktop Node
+ */
+TrinityDesktopNodeService::TrinityDesktopNodeService(TQT_DBusConnection &connection )
+: DBusBaseNode(), m_connection(connection)
+{
+ addChildNode(TQString("hardwarecontrol"));
+ registerObject(m_connection,TQString("/org/trinitydesktop"));
+}
+
+TrinityDesktopNodeService::~TrinityDesktopNodeService(){
+}
+
+TQT_DBusObjectBase* TrinityDesktopNodeService::createInterface(const TQString& interfaceName)
+{
+ return (TQT_DBusObjectBase*) m_interfaces[interfaceName];
+}
+
+/*
+ * HardwareControl Node
+ */
+HardwareControlNodeService::HardwareControlNodeService(TQT_DBusConnection &conn)
+: org::trinitydesktop::hardwarecontrolNode(),
+ m_connection(conn)
+{
+ m_interfaces.insert("org.freedesktop.DBus.Introspectable", this);
+ m_interfaces.insert("org.freedesktop.DBus.Properties", new PropertiesService(m_connection));
+ m_interfaces.insert("org.trinitydesktop.hardwarecontrol.Brightness", new BrightnessService(m_connection));
+ m_interfaces.insert("org.trinitydesktop.hardwarecontrol.CPUGovernor", new CPUGovernorService(m_connection));
+ m_interfaces.insert("org.trinitydesktop.hardwarecontrol.InputEvents", new InputEventsService(m_connection));
+ m_interfaces.insert("org.trinitydesktop.hardwarecontrol.Power", new PowerService(m_connection));
+ registerObject(m_connection,TQString(DBUS_HWCTRL_SERVICE_PATH));
+}
+
+HardwareControlNodeService::~HardwareControlNodeService(){
+}
+
+TQT_DBusObjectBase* HardwareControlNodeService::createInterface(const TQString& interfaceName)
+{
+ return (TQT_DBusObjectBase*) m_interfaces[interfaceName];
+}
+
+
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/hardwarecontrolService.h b/tdecore/tdehw/hwlibdaemons/tdedbus/hardwarecontrolService.h
new file mode 100644
index 000000000..1c00270e7
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/hardwarecontrolService.h
@@ -0,0 +1,114 @@
+/*
+ *
+ * HardwareControl DBus Service implementation
+ *
+ * Copyright (C) 2020 Emanoil Kotsev <deloptes@gmail.com>
+ *
+ *
+ * This file is part of tdecore/tdehw.
+ *
+ * hardwarecontrol 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.
+ *
+ * hardwarecontrol 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 tdelibs; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+#ifndef HARDWARECONTROLSERVICE_H
+#define HARDWARECONTROLSERVICE_H
+
+#include <tqmap.h>
+#include <tqdbusconnection.h>
+
+#include "interfaces/hardwarecontrolNode.h"
+#include "interfaces/dbusbaseNode.h"
+
+/**
+ * RootNodeService
+ * Service: -
+ * Path : /
+ * Children: org
+ */
+class RootNodeService : public DBusBaseNode
+{
+public:
+ RootNodeService(TQT_DBusConnection&);
+ ~RootNodeService();
+protected:
+ virtual TQT_DBusObjectBase* createInterface(const TQString&);
+private:
+ TQMap<TQString, TQT_DBusObjectBase*> m_interfaces;
+ TQT_DBusConnection m_connection;
+};
+
+/**
+ * OrgNodeService
+ * Service: -
+ * Path : /org
+ * Children: trinitydesktop
+ */
+class OrgNodeService : public DBusBaseNode
+{
+public:
+ OrgNodeService(TQT_DBusConnection&);
+ ~OrgNodeService();
+protected:
+ virtual TQT_DBusObjectBase* createInterface(const TQString&);
+private:
+ TQMap<TQString, TQT_DBusObjectBase*> m_interfaces;
+ TQT_DBusConnection m_connection;
+};
+
+/**
+ * TrinityDesktopNodeService
+ * Service: -
+ * Path : /org/trinitydesktop
+ * Children: hardwarecontrol
+ */
+class TrinityDesktopNodeService : public DBusBaseNode
+{
+public:
+ TrinityDesktopNodeService(TQT_DBusConnection&);
+ ~TrinityDesktopNodeService();
+protected:
+ virtual TQT_DBusObjectBase* createInterface(const TQString&);
+private:
+ TQMap<TQString, TQT_DBusObjectBase*> m_interfaces;
+ TQT_DBusConnection m_connection;
+};
+
+/*
+ * HardwareControlNodeService
+ * Service: org.freedesktop.DBus.Introspectable
+ * Service: org.freedesktop.DBus.Properties
+ * Service: org.trinitydesktop.hardwarecontrol.Brightness
+ * Service: org.trinitydesktop.hardwarecontrol.CPUGovernor
+ * Service: org.trinitydesktop.hardwarecontrol.InputEvents
+ * Service: org.trinitydesktop.hardwarecontrol.Power
+ * Path : /org/trinitydesktop/hardwarecontrol
+ * Children: -
+ */
+class HardwareControlNodeService : public org::trinitydesktop::hardwarecontrolNode
+{
+public:
+ HardwareControlNodeService(TQT_DBusConnection&);
+ ~HardwareControlNodeService();
+
+protected:
+ virtual TQT_DBusObjectBase* createInterface(const TQString&);
+
+private:
+ TQMap<TQString, TQT_DBusObjectBase*> m_interfaces;
+ TQT_DBusConnection m_connection;
+};
+
+
+#endif // HARDWARECONTROLSERVICE_H
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/interfaces/CMakeLists.txt b/tdecore/tdehw/hwlibdaemons/tdedbus/interfaces/CMakeLists.txt
new file mode 100644
index 000000000..eeb1ef20b
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/interfaces/CMakeLists.txt
@@ -0,0 +1,52 @@
+#################################################
+#
+# (C) 2020 Emanoil Kotsev
+# deloptes (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 3
+#
+#################################################
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${DBUS_TQT_INCLUDE_DIRS}
+)
+
+set( INTROSPECTIONPATH ${CMAKE_SOURCE_DIR}/tdecore/tdehw/hwlibdaemons/tdedbus/interfaces )
+set( DBUSXML2QT3_EXECUTABLE dbusxml2qt3 )
+
+set( HardwareControl_HDRS brightnessInterface.h brightnessProxy.h cpugovernorInterface.h cpugovernorProxy.h dbusbaseNode.h hardwarecontrolNode.h inputeventsInterface.h inputeventsProxy.h introspectableInterface.h powerInterface.h powerProxy.h propertiesInterface.h propertiesProxy.h )
+set( HardwareControl_SRCS brightnessInterface.cpp brightnessProxy.cpp cpugovernorInterface.cpp cpugovernorProxy.cpp dbusbaseNode.cpp hardwarecontrolNode.cpp inputeventsInterface.cpp inputeventsProxy.cpp introspectableInterface.cpp powerInterface.cpp powerProxy.cpp propertiesInterface.cpp propertiesProxy.cpp)
+
+function( make_moc fileinput )
+ add_custom_command( OUTPUT ${fileinput}.moc
+ COMMAND ${TMOC_EXECUTABLE} ${fileinput}.h -o ${fileinput}.moc
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${fileinput}.h
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ )
+ set_property( SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${fileinput}.cpp APPEND
+ PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${fileinput}.moc )
+endfunction( )
+
+##### HardwareControl #########################
+add_custom_command(
+ OUTPUT ${HardwareControl_HDRS} ${HardwareControl_SRCS}
+ COMMAND ${DBUSXML2QT3_EXECUTABLE} ${INTROSPECTIONPATH}/org.trinitydesktop.hardwarecontrol.xml 2>/dev/null
+ DEPENDS ${INTROSPECTIONPATH}/org.trinitydesktop.hardwarecontrol.xml
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+make_moc ( brightnessProxy )
+make_moc ( cpugovernorProxy )
+make_moc ( inputeventsProxy)
+make_moc ( powerProxy )
+make_moc ( propertiesProxy )
+
+tde_add_library( hwcontrolinterfaces STATIC_PIC
+ SOURCES ${HardwareControl_SRCS}
+ LINK ${DBUS_TQT_LIBRARIES}
+)
+
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/interfaces/org.trinitydesktop.hardwarecontrol.xml b/tdecore/tdehw/hwlibdaemons/tdedbus/interfaces/org.trinitydesktop.hardwarecontrol.xml
new file mode 100644
index 000000000..ce7504703
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/interfaces/org.trinitydesktop.hardwarecontrol.xml
@@ -0,0 +1,96 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node name="/org/trinitydesktop/hardwarecontrol">
+ <interface name="org.trinitydesktop.hardwarecontrol.Brightness">
+ <method name="CanSetBrightness">
+ <arg name="device" direction="in" type="s" />
+ <arg name="value" direction="out" type="b" />
+ </method>
+ <method name="SetBrightness">
+ <arg name="device" direction="in" type="s" />
+ <arg name="brightness" direction="in" type="s" />
+ <arg name="value" direction="out" type="b" />
+ </method>
+ </interface>
+ <interface name="org.trinitydesktop.hardwarecontrol.CPUGovernor">
+ <method name="CanSetCPUGovernor">
+ <arg name="cpu" direction="in" type="i" />
+ <arg name="value" direction="out" type="b" />
+ </method>
+ <method name="SetCPUGovernor">
+ <arg name="cpu" direction="in" type="i" />
+ <arg name="governor" direction="in" type="s" />
+ <arg name="value" direction="out" type="b" />
+ </method>
+ </interface>
+ <interface name="org.trinitydesktop.hardwarecontrol.InputEvents">
+ <method name="GetProvidedSwitches">
+ <arg name="device" direction="in" type="s" />
+ <arg name="value" direction="out" type="au" />
+ </method>
+ <method name="GetActiveSwitches">
+ <arg name="device" direction="in" type="s" />
+ <arg name="value" direction="out" type="au" />
+ </method>
+ </interface>
+ <interface name="org.trinitydesktop.hardwarecontrol.Power">
+ <method name="CanStandby">
+ <arg name="value" direction="out" type="b" />
+ </method>
+ <method name="Standby">
+ <arg name="value" direction="out" type="b" />
+ </method>
+ <method name="CanFreeze">
+ <arg name="value" direction="out" type="b" />
+ </method>
+ <method name="Freeze">
+ <arg name="value" direction="out" type="b" />
+ </method>
+ <method name="CanSuspend">
+ <arg name="value" direction="out" type="b" />
+ </method>
+ <method name="Suspend">
+ <arg name="value" direction="out" type="b" />
+ </method>
+ <method name="CanHibernate">
+ <arg name="value" direction="out" type="b" />
+ </method>
+ <method name="Hibernate">
+ <arg name="value" direction="out" type="b" />
+ </method>
+ <method name="CanHybridSuspend">
+ <arg name="value" direction="out" type="b" />
+ </method>
+ <method name="HybridSuspend">
+ <arg name="value" direction="out" type="b" />
+ </method>
+ <method name="CanSetHibernationMethod">
+ <arg name="value" direction="out" type="b" />
+ </method>
+ <method name="SetHibernationMethod">
+ <arg name="method" direction="in" type="s" />
+ <arg name="value" direction="out" type="b" />
+ </method>
+ </interface>
+ <interface name="org.freedesktop.DBus.Properties">
+ <method name="Get">
+ <arg name="interface" type="s" direction="in"/>
+ <arg name="name" type="s" direction="in"/>
+ <arg name="value" type="v" direction="out"/>
+ </method>
+ <method name="Set">
+ <arg name="interface" type="s" direction="in"/>
+ <arg name="name" type="s" direction="in"/>
+ <arg name="value" type="v" direction="in"/>
+ </method>
+ <method name="GetAll">
+ <arg name="interface" type="s" direction="in"/>
+ <arg name="properties" type="a{sv}" direction="out"/>
+ </method>
+ <signal name="PropertiesChanged">
+ <arg name="interface" type="s"/>
+ <arg name="changed_properties" type="a{sv}"/>
+ <arg name="invalidated_properties" type="as"/>
+ </signal>
+ </interface>
+</node>
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/main.cpp b/tdecore/tdehw/hwlibdaemons/tdedbus/main.cpp
new file mode 100644
index 000000000..e34331a61
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/main.cpp
@@ -0,0 +1,31 @@
+/*
+ * HardwareControl.h
+ *
+ * Created on: Feb 2, 2021
+ * Author: emanoil
+ *
+ * hardwarecontrol Copyright (C) 2021 trinity desktop development team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <iostream>
+
+#include "HardwareControl.h"
+
+int main(int argc, char *argv[])
+{
+ HardwareControl a( argc, argv, false, false ) ;// no gui and session management
+ return a.exec();
+}
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/org.trinitydesktop.hardwarecontrol.conf b/tdecore/tdehw/hwlibdaemons/tdedbus/org.trinitydesktop.hardwarecontrol.conf
new file mode 100644
index 000000000..e3c4b549d
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/org.trinitydesktop.hardwarecontrol.conf
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->
+
+<!DOCTYPE busconfig PUBLIC
+ "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+ <!-- Only root can own the service -->
+ <policy user="root">
+ <allow own="org.trinitydesktop.hardwarecontrol"/>
+ </policy>
+
+ <policy at_console="true">
+ <!-- Users with physical access to the machine are allowed access -->
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.freedesktop.DBus.Introspectable"/>
+
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.freedesktop.DBus.Properties"/>
+
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.trinitydesktop.hardwarecontrol"/>
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.trinitydesktop.hardwarecontrol.Brightness"/>
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.trinitydesktop.hardwarecontrol.CPUGovernor"/>
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.trinitydesktop.hardwarecontrol.InputEvents"/>
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.trinitydesktop.hardwarecontrol.Power"/>
+ </policy>
+
+ <policy group="plugdev">
+ <!-- Users who are members of the plugdev group are allowed access -->
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.freedesktop.DBus.Introspectable"/>
+
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.freedesktop.DBus.Properties"/>
+
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.trinitydesktop.hardwarecontrol"/>
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.trinitydesktop.hardwarecontrol.Brightness"/>
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.trinitydesktop.hardwarecontrol.CPUGovernor"/>
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.trinitydesktop.hardwarecontrol.InputEvents"/>
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.trinitydesktop.hardwarecontrol.Power"/>
+ </policy>
+
+ <policy context="default">
+ <!-- Everyone else is denied access -->
+ <deny own="org.trinitydesktop.hardwarecontrol"/>
+
+ <deny send_destination="org.trinitydesktop.hardwarecontrol"/>
+
+ <!-- Allow to read input switches -->
+ <allow send_destination="org.trinitydesktop.hardwarecontrol"
+ send_interface="org.trinitydesktop.hardwarecontrol.InputEvents"/>
+ </policy>
+</busconfig>
diff --git a/tdecore/tdehw/hwlibdaemons/tdedbus/org.trinitydesktop.hardwarecontrol.service.cmake b/tdecore/tdehw/hwlibdaemons/tdedbus/org.trinitydesktop.hardwarecontrol.service.cmake
new file mode 100644
index 000000000..3be2ebeee
--- /dev/null
+++ b/tdecore/tdehw/hwlibdaemons/tdedbus/org.trinitydesktop.hardwarecontrol.service.cmake
@@ -0,0 +1,4 @@
+[D-BUS Service]
+Name=org.trinitydesktop.hardwarecontrol
+Exec=@BIN_INSTALL_DIR@/tde_dbus_hardwarecontrol
+User=root \ No newline at end of file
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp
index 0da216a87..70a7b7c45 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -2955,7 +2955,7 @@ void TDEHardwareDevices::updateExistingDeviceInformation(TDEGenericDevice *devic
ndevice->internalSetIpV6Netmask(address);
}
}
- s = getnameinfo(ifa->ifa_ifu.ifu_broadaddr, (family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6), host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
+ s = ifa->ifa_ifu.ifu_broadaddr ? getnameinfo(ifa->ifa_ifu.ifu_broadaddr, (family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6), host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST) : EAI_NONAME;
if (s == 0) {
TQString address(host);
if (family == AF_INET) {
@@ -2966,7 +2966,7 @@ void TDEHardwareDevices::updateExistingDeviceInformation(TDEGenericDevice *devic
ndevice->internalSetIpV6Broadcast(address);
}
}
- s = getnameinfo(ifa->ifa_ifu.ifu_dstaddr, (family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6), host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
+ s = ifa->ifa_ifu.ifu_dstaddr ? getnameinfo(ifa->ifa_ifu.ifu_dstaddr, (family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6), host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST) : EAI_NONAME;
if (s == 0) {
TQString address(host);
if (family == AF_INET) {
diff --git a/tdecore/tdesycoca.cpp b/tdecore/tdesycoca.cpp
index a11175117..c109d5ff4 100644
--- a/tdecore/tdesycoca.cpp
+++ b/tdecore/tdesycoca.cpp
@@ -42,7 +42,7 @@
#include <sys/mman.h>
#endif
-#ifdef Q_OS_SOLARIS
+#if defined(Q_OS_SOLARIS) && !defined(__dilos__)
extern "C"
{
extern int madvise(caddr_t, size_t, int);
diff --git a/tdecore/tdeversion.h b/tdecore/tdeversion.h
index b784e7901..1cfc9f564 100644
--- a/tdecore/tdeversion.h
+++ b/tdecore/tdeversion.h
@@ -32,9 +32,9 @@
A new FEATURE REVISION level always resets the BUG AND SECURITY PATCHLEVEL.
A new ABI version resets both the FEATURE REVISION and BUG AND SECURITY PATCH LEVEL.
*/
-#define TDE_VERSION_STRING "R14.1.0 [DEVELOPMENT]"
+#define TDE_VERSION_STRING "R14.2.0~[DEVELOPMENT]"
#define TDE_VERSION_MAJOR 14
-#define TDE_VERSION_MINOR 1
+#define TDE_VERSION_MINOR 2
#define TDE_VERSION_RELEASE 0
#define TDE_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))
diff --git a/tdehtml/CMakeLists.txt b/tdehtml/CMakeLists.txt
index 187eff352..624612d55 100644
--- a/tdehtml/CMakeLists.txt
+++ b/tdehtml/CMakeLists.txt
@@ -93,7 +93,7 @@ tde_add_library( ${target} SHARED AUTOMOC
LINK ${VSCRIPT} kjava-static kjs_html-static tdehtmldom-static tdehtmlcss-static
tdehtmlhtml-static tdehtmlxml-static tdehtmlrender-static tdehtmlmisc-static
tdeutils-shared tdeprint-shared
- LINK_PRIVATE kjs-shared ${JPEG_LIBRARIES}
+ LINK_PRIVATE kjs-shared
DESTINATION ${LIB_INSTALL_DIR}
)
diff --git a/tdehtml/ecma/kjs_proxy.cpp b/tdehtml/ecma/kjs_proxy.cpp
index 92185d7f4..204fb46e2 100644
--- a/tdehtml/ecma/kjs_proxy.cpp
+++ b/tdehtml/ecma/kjs_proxy.cpp
@@ -387,8 +387,8 @@ void KJSCPUGuard::start(unsigned int ms, unsigned int i_ms)
oldAlarmHandler = signal(SIGVTALRM, alarmHandler);
itimerval tv = {
- { i_ms / 1000, (i_ms % 1000) * 1000 },
- { ms / 1000, (ms % 1000) * 1000 }
+ { static_cast<time_t>( i_ms / 1000 ), static_cast<suseconds_t>( (i_ms % 1000) * 1000 ) },
+ { static_cast<time_t>( ms / 1000 ), static_cast<suseconds_t>( (ms % 1000) * 1000 ) }
};
setitimer(ITIMER_VIRTUAL, &tv, &oldtv);
}
diff --git a/tdehtml/misc/CMakeLists.txt b/tdehtml/misc/CMakeLists.txt
index 0babd6567..fbef060b7 100644
--- a/tdehtml/misc/CMakeLists.txt
+++ b/tdehtml/misc/CMakeLists.txt
@@ -38,4 +38,5 @@ set( ${target}_SRCS
tde_add_library( ${target} STATIC_PIC AUTOMOC
SOURCES ${${target}_SRCS}
+ LINK ${JPEG_LIBRARIES}
)
diff --git a/tdehtml/misc/knsplugininstaller.cpp b/tdehtml/misc/knsplugininstaller.cpp
index b8b94cd6b..db83e5c75 100644
--- a/tdehtml/misc/knsplugininstaller.cpp
+++ b/tdehtml/misc/knsplugininstaller.cpp
@@ -157,7 +157,11 @@ bool KNSPluginInstallEngine::findPlugin()
// get system infos
// TODO/FIX : correct this to work with x86-64 machines
+#ifdef Q_OS_SOLARIS
+ struct utsname sysinfo;
+#else /* default */
utsname sysinfo;
+#endif /* default */
if(uname(&sysinfo))
return false;
TQString sysname(sysinfo.sysname);
diff --git a/tdeio/kssl/kopenssl.cpp b/tdeio/kssl/kopenssl.cpp
index a009bd7e9..abcd7e0f0 100644
--- a/tdeio/kssl/kopenssl.cpp
+++ b/tdeio/kssl/kopenssl.cpp
@@ -33,6 +33,8 @@
#include <unistd.h>
#include "kopenssl.h"
+#define STRINGIFY(x) #x
+
#define GET_CRYPTOLIB_SYMBOL(a) ((_cryptoLib->hasSymbol(a)) ? _cryptoLib->symbol(a) : NULL)
#define GET_SSLLIB_SYMBOL(a) ((_sslLib->hasSymbol(a)) ? _sslLib->symbol(a) : NULL)
@@ -345,8 +347,8 @@ TDEConfig *cfg;
<< "";
#else
libpaths
- #ifdef _AIX
- << "/opt/freeware/lib/"
+ #ifdef _AIX
+ << "/opt/freeware/lib/"
#endif
<< "/usr/" SYSTEM_LIBDIR "/"
<< "/usr/ssl/" SYSTEM_LIBDIR "/"
@@ -355,41 +357,49 @@ TDEConfig *cfg;
<< "/usr/local/ssl/" SYSTEM_LIBDIR "/"
<< "/opt/openssl/" SYSTEM_LIBDIR "/"
<< "/" SYSTEM_LIBDIR "/"
- << "";
+ << "";
// FIXME: #define here for the various OS types to optimize
libnamess
#ifdef hpux
- << "libssl.sl"
- #elif defined(_AIX)
- << "libssl.a(libssl.so.0)"
+ << "libssl.sl"
+ #elif defined(_AIX)
+ << "libssl.a(libssl.so.0)"
#elif defined(__APPLE__)
<< "libssl.dylib"
<< "libssl.0.9.dylib"
- #else
- #ifdef SHLIB_VERSION_NUMBER
- << "libssl.so." SHLIB_VERSION_NUMBER
- #endif
- << "libssl.so"
- << "libssl.so.0"
- #endif
+ #else
+ #ifdef OPENSSL_SHLIB_VERSION
+ << "libssl.so." STRINGIFY(OPENSSL_SHLIB_VERSION)
+ #endif
+ #ifdef SHLIB_VERSION_NUMBER
+ << "libssl.so." SHLIB_VERSION_NUMBER
+ #endif
+ << "libssl.so"
+ << "libssl.so.3"
+ << "libssl.so.0"
+ #endif
;
libnamesc
- #ifdef hpux
- << "libcrypto.sl"
- #elif defined(_AIX)
- << "libcrypto.a(libcrypto.so.0)"
+ #ifdef hpux
+ << "libcrypto.sl"
+ #elif defined(_AIX)
+ << "libcrypto.a(libcrypto.so.0)"
#elif defined(__APPLE__)
<< "libcrypto.dylib"
<< "libcrypto.0.9.dylib"
#else
- #ifdef SHLIB_VERSION_NUMBER
- << "libcrypto.so." SHLIB_VERSION_NUMBER
- #endif
- << "libcrypto.so"
- << "libcrypto.so.0"
- #endif
+ #ifdef OPENSSL_SHLIB_VERSION
+ << "libcrypto.so." STRINGIFY(OPENSSL_SHLIB_VERSION)
+ #endif
+ #ifdef SHLIB_VERSION_NUMBER
+ << "libcrypto.so." SHLIB_VERSION_NUMBER
+ #endif
+ << "libcrypto.so"
+ << "libcrypto.so.3"
+ << "libcrypto.so.0"
+ #endif
;
#endif
@@ -635,7 +645,8 @@ TDEConfig *cfg;
K_SSLv3_client_method = (SSL_METHOD *(*)()) GET_SSLLIB_SYMBOL("SSLv3_client_method");
K_TLS_client_method = (SSL_METHOD *(*)()) GET_SSLLIB_SYMBOL("TLS_client_method");
if (!K_TLS_client_method) K_TLS_client_method = (SSL_METHOD *(*)()) GET_SSLLIB_SYMBOL("SSLv23_client_method");
- K_SSL_get_peer_certificate = (X509 *(*)(SSL *)) GET_SSLLIB_SYMBOL("SSL_get_peer_certificate");
+ K_SSL_get_peer_certificate = (X509 *(*)(SSL *)) GET_SSLLIB_SYMBOL("SSL_get1_peer_certificate");
+ if (!K_SSL_get_peer_certificate) K_SSL_get_peer_certificate = (X509 *(*)(SSL *)) GET_SSLLIB_SYMBOL("SSL_get_peer_certificate");
K_SSL_CIPHER_get_bits = (int (*)(SSL_CIPHER *,int *)) GET_SSLLIB_SYMBOL("SSL_CIPHER_get_bits");
K_SSL_CIPHER_get_version = (char * (*)(SSL_CIPHER *)) GET_SSLLIB_SYMBOL("SSL_CIPHER_get_version");
K_SSL_CIPHER_get_name = (const char * (*)(SSL_CIPHER *)) GET_SSLLIB_SYMBOL("SSL_CIPHER_get_name");
diff --git a/tdeio/tdefile/kpropertiesdialog.cpp b/tdeio/tdefile/kpropertiesdialog.cpp
index fe2401191..ea2723fd0 100644
--- a/tdeio/tdefile/kpropertiesdialog.cpp
+++ b/tdeio/tdefile/kpropertiesdialog.cpp
@@ -1030,8 +1030,8 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
sizelay->addWidget(m_sizeStopButton, 0);
sizelay->addStretch(10); // so that the buttons don't grow horizontally
- // auto-launch for local dirs only, and not for '/'
- if ( isLocal && !hasRoot )
+ // auto-launch for local dirs only, but not for '/' or medias
+ if ( isReallyLocal && !hasRoot )
{
m_sizeDetermineButton->setText( i18n("Refresh") );
slotSizeDetermine();
diff --git a/tdeio/tdeio/global.cpp b/tdeio/tdeio/global.cpp
index c53929b1e..21437cdd3 100644
--- a/tdeio/tdeio/global.cpp
+++ b/tdeio/tdeio/global.cpp
@@ -1307,6 +1307,8 @@ TDEIO_EXPORT TQByteArray TDEIO::rawErrorDetail(int errorCode, const TQString &er
#endif
#ifdef HAVE_SYS_UCRED_H
#include <sys/ucred.h>
+#elifdef HAVE_UCRED_H
+#include <ucred.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
diff --git a/tdeio/tdeio/job.cpp b/tdeio/tdeio/job.cpp
index f6156a966..43b0c808b 100644
--- a/tdeio/tdeio/job.cpp
+++ b/tdeio/tdeio/job.cpp
@@ -89,15 +89,23 @@ template class TQPtrList<TDEIO::Job>;
class Job::JobPrivate
{
public:
- JobPrivate() : m_autoErrorHandling( false ), m_autoWarningHandling( true ),
- m_interactive( true ), m_parentJob( 0L ), m_extraFlags(0),
- m_processedSize(0), m_userTimestamp(0)
+ JobPrivate() : m_autoErrorHandling(false), m_autoWarningHandling(true),
+ m_interactive(true), m_errorParentWidgetGP(0), m_parentJob(0L),
+ m_extraFlags(0), m_processedSize(0), m_userTimestamp(0)
{}
+ ~JobPrivate()
+ {
+ if (m_errorParentWidgetGP)
+ {
+ delete m_errorParentWidgetGP;
+ }
+ }
+
bool m_autoErrorHandling;
bool m_autoWarningHandling;
bool m_interactive;
- TQGuardedPtr<TQWidget> m_errorParentWidget;
+ TQGuardedPtr<TQWidget> *m_errorParentWidgetGP;
// Maybe we could use the TQObject parent/child mechanism instead
// (requires a new ctor, and moving the ctor code to some init()).
Job* m_parentJob;
@@ -106,7 +114,9 @@ public:
unsigned long m_userTimestamp;
};
-Job::Job(bool showProgressInfo) : TQObject(0, "job"), m_error(0), m_percent(0)
+static TQObject *__job_root_obj = new TQObject(0, "jobroot");
+
+Job::Job(bool showProgressInfo) : TQObject(__job_root_obj, "job"), m_error(0), m_percent(0)
, m_progressId(0), m_speedTimer(0), d( new JobPrivate )
{
// All jobs delete themselves after emiting 'result'.
@@ -141,7 +151,9 @@ Job::~Job()
delete m_speedTimer;
delete d;
if (kapp)
- kapp->deref();
+ {
+ kapp->deref();
+ }
}
int& Job::extraFlags()
@@ -231,7 +243,7 @@ void Job::emitResult()
if ( m_progressId ) // Did we get an ID from the observer ?
Observer::self()->jobFinished( m_progressId );
if ( m_error && d->m_interactive && d->m_autoErrorHandling )
- showErrorDialog( d->m_errorParentWidget );
+ showErrorDialog( d->m_errorParentWidgetGP ? *d->m_errorParentWidgetGP : nullptr);
emit result(this);
deleteLater();
}
@@ -320,8 +332,16 @@ void Job::showErrorDialog( TQWidget * parent )
void Job::setAutoErrorHandlingEnabled( bool enable, TQWidget *parentWidget )
{
+ if (d->m_errorParentWidgetGP && (TQWidget*)(*d->m_errorParentWidgetGP) != parentWidget)
+ {
+ delete d->m_errorParentWidgetGP;
+ d->m_errorParentWidgetGP = nullptr;
+ }
d->m_autoErrorHandling = enable;
- d->m_errorParentWidget = parentWidget;
+ if (enable && parentWidget && !d->m_errorParentWidgetGP)
+ {
+ d->m_errorParentWidgetGP = new TQGuardedPtr<TQWidget>(parentWidget);
+ }
}
bool Job::isAutoErrorHandlingEnabled() const
diff --git a/tdeio/tdeio/kdirwatch.cpp b/tdeio/tdeio/kdirwatch.cpp
index b3763978d..c87558e1d 100644
--- a/tdeio/tdeio/kdirwatch.cpp
+++ b/tdeio/tdeio/kdirwatch.cpp
@@ -64,11 +64,17 @@
// debug
#include <sys/ioctl.h>
+#ifdef Q_OS_SOLARIS
+#include <sys/filio.h> /* FIONREAD */
+#endif /* solaris */
+
#ifdef HAVE_INOTIFY
#include <unistd.h>
#include <fcntl.h>
#include <sys/syscall.h>
+#ifdef Q_OS_LINUX
#include <linux/types.h>
+#endif /* Linux */
// Linux kernel headers are documented to not compile
#define _S390_BITOPS_H
#include <sys/inotify.h>
diff --git a/tdeio/tdeio/krun.cpp b/tdeio/tdeio/krun.cpp
index 402b339b0..44b383915 100644
--- a/tdeio/tdeio/krun.cpp
+++ b/tdeio/tdeio/krun.cpp
@@ -699,8 +699,12 @@ static pid_t runTempService( const KService& _service, const KURL::List& _urls,
static KURL::List resolveURLs( const KURL::List& _urls, const KService& _service )
{
// Check which protocols the application supports.
- // This can be a list of actual protocol names, or just TDEIO for KDE apps.
+ // This can be a list of actual protocol names, or just TDEIO for TDE apps, or KIO for KDE apps.
TQStringList supportedProtocols = _service.property("X-TDE-Protocols").toStringList();
+ if (supportedProtocols.isEmpty())
+ {
+ supportedProtocols = _service.property("X-KDE-Protocols").toStringList();
+ }
KRunMX1 mx1( _service );
TQString exec = _service.exec();
if ( mx1.expandMacrosShellQuote( exec ) && !mx1.hasUrls ) {
@@ -708,9 +712,9 @@ static KURL::List resolveURLs( const KURL::List& _urls, const KService& _service
} else {
if ( supportedProtocols.isEmpty() )
{
- // compat mode: assume TDEIO if not set and it's a KDE app
+ // compat mode: assume TDEIO if not set and it's a TDE or KDE app
TQStringList categories = _service.property("Categories").toStringList();
- if (( categories.find("TDE") != categories.end() ) && ( categories.find("KDE") != categories.end() ))
+ if ((categories.find("TDE") != categories.end()) || (categories.find("KDE") != categories.end()))
supportedProtocols.append( "TDEIO" );
else { // if no KDE app, be a bit over-generic
supportedProtocols.append( "http");
@@ -721,13 +725,13 @@ static KURL::List resolveURLs( const KURL::List& _urls, const KService& _service
kdDebug(7010) << "supportedProtocols:" << supportedProtocols << endl;
KURL::List urls( _urls );
- if ( supportedProtocols.find( "TDEIO" ) == supportedProtocols.end() ) {
+ if ((supportedProtocols.find("TDEIO") == supportedProtocols.end()) &&
+ (supportedProtocols.find("KIO") == supportedProtocols.end())) {
for( KURL::List::Iterator it = urls.begin(); it != urls.end(); ++it ) {
const KURL url = *it;
bool supported = url.isLocalFile() || supportedProtocols.find( url.protocol().lower() ) != supportedProtocols.end();
kdDebug(7010) << "Looking at url=" << url << " supported=" << supported << endl;
- if ( !supported && KProtocolInfo::protocolClass(url.protocol()) == ":local" &&
- !url.url().startsWith("media:/") && !url.url().startsWith("system:/media"))
+ if ((!supported) && (KProtocolInfo::protocolClass(url.protocol()) == ":local"))
{
// Maybe we can resolve to a local URL?
KURL localURL = TDEIO::NetAccess::mostLocalURL( url, 0 );
diff --git a/tdeioslave/file/file.cpp b/tdeioslave/file/file.cpp
index b7ac91bfd..bf18a069b 100644
--- a/tdeioslave/file/file.cpp
+++ b/tdeioslave/file/file.cpp
@@ -1446,15 +1446,15 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const TQString& _dev, c
buffer.sprintf( "%s %s %s %s 2>%s", mountProg.latin1(), readonly.data(), dev.data(), point.data(), tmp );
else
// mount giving device + mountpoint + fstype
-#if defined(__svr4__) && defined(__sun__)
- // MACRO for Solaris 8 and I
+#if defined(Q_OS_SOLARIS)
+ // MACRO for Solaris 8 and I
// believe this is true for SVR4 in general
- buffer.sprintf( "%s -F %s %s %s %s 2>%s"
- mountProg.latin1()
- fstype.data()
- _ro ? "-oro" : ""
- dev.data()
- point.data()
+ buffer.sprintf( "%s -F %s %s %s %s 2>%s",
+ mountProg.latin1(),
+ fstype.data(),
+ _ro ? "-oro" : "",
+ dev.data(),
+ point.data(),
tmp );
#elif defined(__OpenBSD__)
buffer.sprintf( "%s %s %s -t %s %s %s 2>%s", "tdesu", mountProg.latin1(), readonly.data(),
diff --git a/tdeprint/kprinter.cpp b/tdeprint/kprinter.cpp
index 010297e5a..740bac293 100644
--- a/tdeprint/kprinter.cpp
+++ b/tdeprint/kprinter.cpp
@@ -597,12 +597,15 @@ int KPrinter::metric(int m) const
return val;
}
-void KPrinter::setOrientation(Orientation o)
+void KPrinter::setOrientation(Orientation o, bool locking)
{
KMFactory::self()->settings()->orientation = o;
setOption("kde-orientation",(o == Landscape ? "Landscape" : "Portrait"));
d->m_impl->broadcastOption("kde-orientation",(o == Landscape ? "Landscape" : "Portrait"));
- d->m_impl->broadcastOption( "kde-orientation-fixed", "1" );
+ if (locking)
+ {
+ d->m_impl->broadcastOption( "kde-orientation-fixed", "1" );
+ }
}
void KPrinter::setOption( const TQString& key, const TQString& value, bool broadcast )
@@ -612,11 +615,14 @@ void KPrinter::setOption( const TQString& key, const TQString& value, bool broad
d->m_impl->broadcastOption( key, value );
}
-void KPrinter::setPageSize(PageSize s)
+void KPrinter::setPageSize(PageSize s, bool locking)
{
KMFactory::self()->settings()->pageSize = s;
setOption("kde-pagesize",TQString::number((int)s),true);
- d->m_impl->broadcastOption( "kde-pagesize-fixed", "1" );
+ if (locking)
+ {
+ d->m_impl->broadcastOption( "kde-pagesize-fixed", "1" );
+ }
}
void KPrinter::setOptions(const TQMap<TQString,TQString>& opts)
diff --git a/tdeprint/kprinter.h b/tdeprint/kprinter.h
index 0ac329604..6a0cde6d0 100644
--- a/tdeprint/kprinter.h
+++ b/tdeprint/kprinter.h
@@ -289,7 +289,7 @@ public:
/**
* See TQPrinter::setOrientation().
*/
- void setOrientation(Orientation);
+ void setOrientation(Orientation, bool locking = false);
/**
* See TQPrinter::pageOrder().
*/
@@ -347,7 +347,7 @@ public:
/**
* See TQPrinter::setPageSize().
*/
- void setPageSize(PageSize);
+ void setPageSize(PageSize, bool locking = false);
/**
* See TQPrinter::printerName().
*/
diff --git a/tdesu/client.cpp b/tdesu/client.cpp
index fe5733ee7..8c775bbed 100644
--- a/tdesu/client.cpp
+++ b/tdesu/client.cpp
@@ -19,6 +19,9 @@
#include <pwd.h>
#include <errno.h>
#include <string.h>
+#ifdef HAVE_UCRED_H
+#include <ucred.h>
+#endif /* HAVE_UCRED_H */
#include <sys/types.h>
#include <sys/socket.h>
@@ -146,6 +149,21 @@ int TDEsuClient::connect()
return -1;
}
# endif
+#elif defined(HAVE_GETPEERUCRED)
+ ucred_t *cred = nullptr;
+
+ if (getpeerucred(sockfd, &cred) == 0) {
+ uid_t peer_uid = ucred_geteuid(cred);
+
+ ucred_free(cred);
+ if (peer_uid != getuid()) {
+ kdWarning(900) << "socket not owned by me! socket uid = " << peer_uid << endl;
+ close(sockfd); sockfd = -1;
+ return -1;
+ }
+ }
+ if (cred != nullptr)
+ ucred_free(cred);
#else
struct ucred cred;
socklen_t siz = sizeof(cred);
diff --git a/tdeui/khelpmenu.cpp b/tdeui/khelpmenu.cpp
index 8ca2022f3..676afcfad 100644
--- a/tdeui/khelpmenu.cpp
+++ b/tdeui/khelpmenu.cpp
@@ -174,7 +174,7 @@ TDEPopupMenu* KHelpMenu::menu()
if (kapp->authorizeTDEAction("help_about_kde"))
{
- mMenu->insertItem( SmallIcon("about_kde"), i18n( "About &Trinity" ), menuAboutKDE );
+ mMenu->insertItem( SmallIcon("about_kde"), i18n( "About &TDE" ), menuAboutKDE );
mMenu->connectItem( menuAboutKDE, this, TQT_SLOT( aboutKDE() ) );
}
}
diff --git a/tdeui/kstdaction_p.h b/tdeui/kstdaction_p.h
index e9aba5231..827b2adca 100644
--- a/tdeui/kstdaction_p.h
+++ b/tdeui/kstdaction_p.h
@@ -111,7 +111,7 @@ static const KStdActionInfo g_rgActionInfo[] =
{ ReportBug, TDEStdAccel::AccelNone, "help_report_bug", I18N_NOOP("&Report Bug/Request Enhancement..."), 0, "bug" },
{ SwitchApplicationLanguage, TDEStdAccel::AccelNone, "switch_application_language", I18N_NOOP("Switch application &language..."), 0, "preferences-desktop-locale" },
{ AboutApp, TDEStdAccel::AccelNone, "help_about_app", I18N_NOOP("&About %1"), 0, 0 },
- { AboutKDE, TDEStdAccel::AccelNone, "help_about_kde", I18N_NOOP("About &Trinity"), 0,"about_kde" },
+ { AboutKDE, TDEStdAccel::AccelNone, "help_about_kde", I18N_NOOP("About &TDE"), 0,"about_kde" },
{ ActionNone, TDEStdAccel::AccelNone, 0, 0, 0, 0 }
};
diff --git a/tdeui/tdeabouttde.cpp b/tdeui/tdeabouttde.cpp
index 64d9fa95b..b29d482f3 100644
--- a/tdeui/tdeabouttde.cpp
+++ b/tdeui/tdeabouttde.cpp
@@ -85,7 +85,7 @@ TDEAboutKDE::TDEAboutKDE( TQWidget *parent, const char *name, bool modal )
setHelp( TQString::fromLatin1("khelpcenter/main.html"), TQString::null );
setTitle(i18n("Trinity Desktop Environment. Release %1").
arg(TQString::fromLatin1(TDE_VERSION_STRING)) );
- addTextPage( i18n("About Trinity","&About"), text1, true );
+ addTextPage( i18n("About TDE","&About"), text1, true );
addTextPage( i18n("&Report Bugs/Request Enhancements"), text2, true );
addTextPage( i18n("&Join the Trinity Team"), text3, true );
addTextPage( i18n("&Support Trinity"), text4, true );
diff --git a/tdeui/tdefontdialog.cpp b/tdeui/tdefontdialog.cpp
index fcd50b16e..d29ea60be 100644
--- a/tdeui/tdefontdialog.cpp
+++ b/tdeui/tdefontdialog.cpp
@@ -1,3 +1,4 @@
+
/*
Requires the Qt widget libraries, available at no cost at
@@ -461,23 +462,36 @@ void TDEFontChooser::toggled_checkbox()
sizeOfFont->setEnabled( sizeCheckbox->isChecked() );
}
+TQString TDEFontChooser::style_name(const TQString &style)
+{
+ return i18n(
+ TQString(style).replace("Plain", "Regular")
+ .replace("Normal", "Regular")
+ .replace("Oblique", "Italic")
+ .utf8());
+}
+
void TDEFontChooser::family_chosen_slot(const TQString& family)
{
+ TQString currentFamily;
+ if (family.isEmpty())
+ {
+ currentFamily = familyListBox->currentText();
+ }
+ else
+ {
+ currentFamily = family;
+ }
+
TQFontDatabase dbase;
- TQStringList styles = TQStringList(dbase.styles(family));
+ TQStringList styles = dbase.styles(currentFamily);
styleListBox->clear();
currentStyles.clear();
for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) {
- TQString style = *it;
- int pos = style.find("Plain");
- if(pos >=0) style = style.replace(pos,5,i18n("Regular"));
- pos = style.find("Normal");
- if(pos >=0) style = style.replace(pos,6,i18n("Regular"));
- pos = style.find("Oblique");
- if(pos >=0) style = style.replace(pos,7,i18n("Italic"));
+ TQString style = style_name(*it);
if(!styleListBox->findItem(style)) {
- styleListBox->insertItem(i18n(style.utf8()));
- currentStyles.insert(i18n(style.utf8()), *it);
+ styleListBox->insertItem(style);
+ currentStyles.insert(style, *it);
}
}
if(styleListBox->count()==0) {
@@ -488,12 +502,21 @@ void TDEFontChooser::family_chosen_slot(const TQString& family)
styleListBox->blockSignals(true);
TQListBoxItem *item = styleListBox->findItem(selectedStyle);
if (item)
+ {
styleListBox->setSelected(styleListBox->findItem(selectedStyle), true);
+ }
else
+ {
styleListBox->setSelected(0, true);
+ }
styleListBox->blockSignals(false);
style_chosen_slot(TQString::null);
+
+ if (!family.isEmpty() )
+ {
+ selectedFamily = family;
+ }
}
void TDEFontChooser::size_chosen_slot(const TQString& size){
@@ -565,8 +588,9 @@ void TDEFontChooser::setupDisplay()
{
// Calling familyListBox->setCurrentItem() causes the value of selFont
// to change, so we save the family, style and size beforehand.
+ TQFontDatabase dbase;
TQString family = TQString(selFont.family()).lower();
- int style = (selFont.bold() ? 2 : 0) + (selFont.italic() ? 1 : 0);
+ TQString style = style_name(dbase.styleString(selFont));
int size = selFont.pointSize();
if (size == -1)
size = TQFontInfo(selFont).pointSize();
@@ -624,7 +648,16 @@ void TDEFontChooser::setupDisplay()
if ( i == numEntries )
familyListBox->setCurrentItem( 0 );
- styleListBox->setCurrentItem(style);
+ int item = 0;
+ for (int i = 0; i < (int)styleListBox->count(); ++i)
+ {
+ if (styleListBox->text(i) == style)
+ {
+ item = i;
+ break;
+ }
+ }
+ styleListBox->setCurrentItem(item);
numEntries = sizeListBox->count();
for (i = 0; i < numEntries; i++){
@@ -671,6 +704,15 @@ void TDEFontChooser::getFontList( TQStringList &list, uint fontListCriteria)
list = lstSys;
}
+void TDEFontChooser::setFamilyList( TQStringList list )
+{
+ familyListBox->blockSignals(true);
+ familyListBox->clear();
+ familyListBox->insertStringList(list);
+ setFont( TDEGlobalSettings::generalFont(), usingFixed );
+ familyListBox->blockSignals(false);
+}
+
void TDEFontChooser::addFont( TQStringList &list, const char *xfont )
{
const char *ptr = strchr( xfont, '-' );
diff --git a/tdeui/tdefontdialog.h b/tdeui/tdefontdialog.h
index 0f4a56f77..de966d47d 100644
--- a/tdeui/tdefontdialog.h
+++ b/tdeui/tdefontdialog.h
@@ -250,6 +250,14 @@ public:
static void getFontList( TQStringList &list, uint fontListCriteria);
/**
+ *
+ * Fill the font family list of the TDEFontChooser
+ *
+ * @param list The font list.
+ */
+ void setFamilyList( TQStringList list );
+
+ /**
* Reimplemented for internal reasons.
*/
virtual TQSize sizeHint( void ) const;
@@ -271,6 +279,7 @@ private slots:
private:
void fillFamilyListBox(bool onlyFixedFonts = false);
void fillSizeList();
+ TQString style_name(const TQString &name);
// This one must be static since getFontList( TQStringList, char*) is so
static void addFont( TQStringList &list, const char *xfont );
@@ -299,8 +308,9 @@ private:
TQFont selFont;
+ TQString selectedFamily;
TQString selectedStyle;
- int selectedSize;
+ int selectedSize;
TQMap<TQString, TQString> currentStyles;
bool usingFixed;