summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--kded/CMakeLists.txt2
-rw-r--r--kded/tde-applications.menu (renamed from kded/applications.menu)0
-rw-r--r--kded/tde-applications.menu-no-kde (renamed from kded/applications.menu-no-kde)0
-rw-r--r--kded/tdebuildsycoca.cpp2
-rw-r--r--pics/CMakeLists.txt1
-rw-r--r--tdecore/CMakeLists.txt1
-rw-r--r--tdecore/tdeapplication.cpp143
-rw-r--r--tdecore/tdeapplication.h26
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp10
-rw-r--r--tdecore/tdehw/tdestoragedevice.cpp58
-rw-r--r--tdecore/tdehw/tdestoragedevice.h6
-rw-r--r--tdeioslave/metainfo/metainfo.cpp2
13 files changed, 243 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b9d179433..11c6149bb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,7 +17,7 @@ cmake_minimum_required( VERSION 2.8 )
project( tdelibs )
set( PACKAGE tdelibs )
-set( VERSION "3.5.13" )
+set( VERSION R14.0.0 )
##### include essential cmake modules ###########
@@ -591,6 +591,8 @@ endif( XRANDR_FOUND )
pkg_search_module( XRENDER xrender )
if( XRENDER_FOUND )
set( HAVE_XRENDER 1 )
+else( XRENDER_FOUND)
+ message(FATAL_ERROR "\nxrender support is required, but not found on your system" )
endif( XRENDER_FOUND )
##### check for xcomposite #########################
diff --git a/kded/CMakeLists.txt b/kded/CMakeLists.txt
index ee693fb4a..bb54e2912 100644
--- a/kded/CMakeLists.txt
+++ b/kded/CMakeLists.txt
@@ -35,7 +35,7 @@ install( FILES kdedmodule.h DESTINATION ${INCLUDE_INSTALL_DIR} )
##### other data ################################
install( FILES kdedmodule.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} )
-install( FILES applications.menu applications.menu-no-kde DESTINATION ${XDG_MENU_INSTALL_DIR} )
+install( FILES tde-applications.menu tde-applications.menu-no-kde DESTINATION ${XDG_MENU_INSTALL_DIR} )
install( FILES kded.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )
diff --git a/kded/applications.menu b/kded/tde-applications.menu
index 631aab059..631aab059 100644
--- a/kded/applications.menu
+++ b/kded/tde-applications.menu
diff --git a/kded/applications.menu-no-kde b/kded/tde-applications.menu-no-kde
index 102111c67..102111c67 100644
--- a/kded/applications.menu-no-kde
+++ b/kded/tde-applications.menu-no-kde
diff --git a/kded/tdebuildsycoca.cpp b/kded/tdebuildsycoca.cpp
index 4325162f7..f7ae2ce3b 100644
--- a/kded/tdebuildsycoca.cpp
+++ b/kded/tdebuildsycoca.cpp
@@ -379,7 +379,7 @@ bool KBuildSycoca::build()
connect(g_vfolder, TQT_SIGNAL(newService(const TQString &, KService **)),
this, TQT_SLOT(slotCreateEntry(const TQString &, KService **)));
- VFolderMenu::SubMenu *kdeMenu = g_vfolder->parseMenu("applications.menu", true);
+ VFolderMenu::SubMenu *kdeMenu = g_vfolder->parseMenu("tde-applications.menu", true);
KServiceGroup *entry = g_bsgf->addNew("/", kdeMenu->directoryFile, 0, false);
entry->setLayoutInfo(kdeMenu->layoutList);
diff --git a/pics/CMakeLists.txt b/pics/CMakeLists.txt
index b278a39c1..e5146680d 100644
--- a/pics/CMakeLists.txt
+++ b/pics/CMakeLists.txt
@@ -28,6 +28,7 @@ include_directories(
link_directories(
${TQT_LIBRARY_DIRS}
+ ${LIBART_LIBRARY_DIRS}
)
diff --git a/tdecore/CMakeLists.txt b/tdecore/CMakeLists.txt
index 59bccf568..6a9e605a3 100644
--- a/tdecore/CMakeLists.txt
+++ b/tdecore/CMakeLists.txt
@@ -40,6 +40,7 @@ link_directories(
${TQT_LIBRARY_DIRS}
${LIBIDN_LIBRARY_DIRS}
${GAMIN_LIBDIR}
+ ${LIBART_LIBRARY_DIRS}
)
##### headers ###################################
diff --git a/tdecore/tdeapplication.cpp b/tdecore/tdeapplication.cpp
index 58b010e4e..34bd8aadd 100644
--- a/tdecore/tdeapplication.cpp
+++ b/tdecore/tdeapplication.cpp
@@ -35,7 +35,14 @@
#undef QT_NO_TRANSLATION
#undef TQT_NO_TRANSLATION
#include <tqtranslator.h>
+
+// FIXME
+// FOR BINARY COMPATIBILITY ONLY
+// REMOVE WHEN PRACTICAL!
+#define TDEAPPLICATION_BINARY_COMPAT_HACK 1
#include "tdeapplication.h"
+#undef TDEAPPLICATION_BINARY_COMPAT_HACK
+
#define QT_NO_TRANSLATION
#define TQT_NO_TRANSLATION
#include <tqdir.h>
@@ -168,6 +175,14 @@ typedef void* IceIOErrorHandler;
#include <tqimage.h>
#endif
+#if defined Q_WS_X11
+#include <sys/ioctl.h>
+#include <linux/vt.h>
+extern "C" {
+extern int getfd(const char *fnam);
+}
+#endif
+
#include "kappdcopiface.h"
// exported for tdm kfrontend
@@ -235,6 +250,67 @@ void TDEApplication_init_windows(bool GUIenabled);
class QAssistantClient;
#endif
+#ifdef Q_WS_X11
+// --------------------------------------------------------------------------------------
+// Get the VT number X is running on
+// (code taken from GDM, daemon/getvt.c, GPLv2+)
+// --------------------------------------------------------------------------------------
+int get_x_vtnum(Display *dpy)
+{
+ Atom prop;
+ Atom actualtype;
+ int actualformat;
+ unsigned long nitems;
+ unsigned long bytes_after;
+ unsigned char *buf;
+ int num;
+
+ prop = XInternAtom (dpy, "XFree86_VT", False);
+ if (prop == None)
+ return -1;
+
+ if (XGetWindowProperty (dpy, DefaultRootWindow (dpy), prop, 0, 1,
+ False, AnyPropertyType, &actualtype, &actualformat,
+ &nitems, &bytes_after, &buf)) {
+ return -1;
+ }
+
+ if (nitems != 1) {
+ XFree (buf);
+ return -1;
+ }
+
+ switch (actualtype) {
+ case XA_CARDINAL:
+ case XA_INTEGER:
+ case XA_WINDOW:
+ switch (actualformat) {
+ case 8:
+ num = (*(uint8_t *)(void *)buf);
+ break;
+ case 16:
+ num = (*(uint16_t *)(void *)buf);
+ break;
+ case 32:
+ num = (*(uint32_t *)(void *)buf);
+ break;
+ default:
+ XFree (buf);
+ return -1;
+ }
+ break;
+ default:
+ XFree (buf);
+ return -1;
+ }
+
+ XFree (buf);
+
+ return num;
+}
+// --------------------------------------------------------------------------------------
+#endif // Q_WS_X11
+
/*
Private data to make keeping binary compatibility easier
*/
@@ -622,6 +698,34 @@ static SmcConn tmpSmcConnection = 0;
static TQTime* smModificationTime = 0;
TDEApplication::TDEApplication( int& argc, char** argv, const TQCString& rAppName,
+ bool allowStyles, bool GUIenabled, bool SMenabled ) :
+ TQApplication( argc, argv, GUIenabled, SMenabled ), TDEInstance(rAppName),
+#ifdef Q_WS_X11
+ display(0L),
+ argb_visual(false),
+#endif
+ d (new TDEApplicationPrivate())
+{
+ aIconPixmap.pm.icon = 0L;
+ aIconPixmap.pm.miniIcon = 0L;
+ read_app_startup_id();
+ if (!GUIenabled)
+ allowStyles = false;
+ useStyles = allowStyles;
+ Q_ASSERT (!rAppName.isEmpty());
+ setName(rAppName);
+
+ installSigpipeHandler();
+ TDECmdLineArgs::initIgnore(argc, argv, rAppName.data());
+ parseCommandLine( );
+ init(GUIenabled);
+ d->m_KAppDCOPInterface = new KAppDCOPInterface(this);
+}
+
+// FIXME
+// FOR BINARY COMPATIBILITY ONLY
+// REMOVE WHEN PRACTICAL!
+TDEApplication::TDEApplication( int& argc, char** argv, const TQCString& rAppName,
bool allowStyles, bool GUIenabled ) :
TQApplication( argc, argv, GUIenabled ), TDEInstance(rAppName),
#ifdef Q_WS_X11
@@ -646,6 +750,33 @@ TDEApplication::TDEApplication( int& argc, char** argv, const TQCString& rAppNam
d->m_KAppDCOPInterface = new KAppDCOPInterface(this);
}
+TDEApplication::TDEApplication( bool allowStyles, bool GUIenabled, bool SMenabled ) :
+// TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), TRUE ), // Qt4 requires that there always be a GUI
+ TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), GUIenabled, SMenabled ), // We need to be able to run command line apps
+ TDEInstance( TDECmdLineArgs::about),
+#ifdef Q_WS_X11
+ display(0L),
+ argb_visual(false),
+#endif
+ d (new TDEApplicationPrivate)
+{
+ aIconPixmap.pm.icon = 0L;
+ aIconPixmap.pm.miniIcon = 0L;
+ read_app_startup_id();
+ if (!GUIenabled)
+ allowStyles = false;
+ useStyles = allowStyles;
+ setName( instanceName() );
+
+ installSigpipeHandler();
+ parseCommandLine( );
+ init(GUIenabled);
+ d->m_KAppDCOPInterface = new KAppDCOPInterface(this);
+}
+
+// FIXME
+// FOR BINARY COMPATIBILITY ONLY
+// REMOVE WHEN PRACTICAL!
TDEApplication::TDEApplication( bool allowStyles, bool GUIenabled ) :
// TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), TRUE ), // Qt4 requires that there always be a GUI
TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), GUIenabled ), // We need to be able to run command line apps
@@ -3597,6 +3728,18 @@ TQ_ButtonState TDEApplication::keyboardMouseState()
return static_cast< ButtonState >( ret );
}
+#if defined Q_WS_X11
+int TDEApplication::currentX11VT()
+{
+ return get_x_vtnum(TQPaintDevice::x11AppDisplay());
+}
+#else // Q_WS_X11
+int TDEApplication::currentX11VT()
+{
+ return -1;
+}
+#endif // Q_WS_X11
+
void TDEApplication::installSigpipeHandler()
{
#ifdef Q_OS_UNIX
diff --git a/tdecore/tdeapplication.h b/tdecore/tdeapplication.h
index 5ab8d7ee7..c22e9edbb 100644
--- a/tdecore/tdeapplication.h
+++ b/tdecore/tdeapplication.h
@@ -128,7 +128,14 @@ public:
* @param GUIenabled Set to false to disable all GUI stuff. This implies
* no styles either.
*/
+ TDEApplication( bool allowStyles=true, bool GUIenabled=true, bool SMenabled=true);
+
+#ifdef TDEAPPLICATION_BINARY_COMPAT_HACK
+ // FIXME
+ // FOR BINARY COMPATIBILITY ONLY
+ // REMOVE WHEN PRACTICAL!
TDEApplication( bool allowStyles=true, bool GUIenabled=true);
+#endif // TDEAPPLICATION_BINARY_COMPAT_HACK
#ifdef Q_WS_X11
/**
@@ -257,8 +264,16 @@ public:
*/
// REMOVE FOR KDE 4.0 - using it only gives crashing applications because
// TDECmdLineArgs::init isn't called
- TDEApplication(int& argc, char** argv,
- const TQCString& rAppName, bool allowStyles=true, bool GUIenabled=true) KDE_DEPRECATED;
+ TDEApplication(int& argc, char** argv,
+ const TQCString& rAppName, bool allowStyles=true, bool GUIenabled=true, bool SMenabled=true) KDE_DEPRECATED;
+
+#ifdef TDEAPPLICATION_BINARY_COMPAT_HACK
+ // FIXME
+ // FOR BINARY COMPATIBILITY ONLY
+ // REMOVE WHEN PRACTICAL!
+ TDEApplication(int& argc, char** argv,
+ const TQCString& rAppName, bool allowStyles, bool GUIenabled) KDE_DEPRECATED;
+#endif // TDEAPPLICATION_BINARY_COMPAT_HACK
/**
* Add Qt and KDE command line options to TDECmdLineArgs.
@@ -1212,6 +1227,13 @@ public:
*/
static uint mouseState() KDE_DEPRECATED;
+ /**
+ * Returns the VT that the current X server is running on, or -1 if this information is unavailable.
+ *
+ * @since 14.0.0
+ */
+ static int currentX11VT();
+
public slots:
/**
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp
index 08646d17d..b82977d96 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -65,6 +65,7 @@
#include "tdeeventdevice.h"
#include "tdeinputdevice.h"
+// Compile-time configuration
#include "config.h"
// BEGIN BLOCK
@@ -2558,6 +2559,15 @@ void TDEHardwareDevices::updateExistingDeviceInformation(TDEGenericDevice* exist
if (nodename == "alarm") {
bdevice->internalSetAlarmEnergy(line.toDouble()/1000000.0);
}
+ if (nodename == "charge_full") {
+ bdevice->internalSetMaximumEnergy(line.toDouble()/1000000.0);
+ }
+ if (nodename == "charge_full_design") {
+ bdevice->internalSetMaximumDesignEnergy(line.toDouble()/1000000.0);
+ }
+ if (nodename == "charge_now") {
+ bdevice->internalSetEnergy(line.toDouble()/1000000.0);
+ }
if (nodename == "energy_full") {
bdevice->internalSetMaximumEnergy(line.toDouble()/1000000.0);
}
diff --git a/tdecore/tdehw/tdestoragedevice.cpp b/tdecore/tdehw/tdestoragedevice.cpp
index ac80b8856..f13146b00 100644
--- a/tdecore/tdehw/tdestoragedevice.cpp
+++ b/tdecore/tdehw/tdestoragedevice.cpp
@@ -592,7 +592,7 @@ TQString TDEStorageDevice::mountPath() {
return TQString::null;
}
-TQString TDEStorageDevice::mountDevice(TQString mediaName, TQString mountOptions, TQString* errRet, int* retcode) {
+TQString TDEStorageDevice::mountDevice(TQString mediaName, TDEStorageMountOptions mountOptions, TQString* errRet, int* retcode) {
int internal_retcode;
if (!retcode) {
retcode = &internal_retcode;
@@ -608,12 +608,37 @@ TQString TDEStorageDevice::mountDevice(TQString mediaName, TQString mountOptions
KTempFile passwordFile(TQString::null, "tmp", 0600);
passwordFile.setAutoDelete(true);
+ TQString optionString;
+ if (mountOptions["ro"] == "true") {
+ optionString.append(" -r");
+ }
+
+ if (mountOptions["atime"] != "true") {
+ optionString.append(" -A");
+ }
+
+ if (mountOptions["utf8"] == "true") {
+ optionString.append(" -c utf8");
+ }
+
+ if (mountOptions["sync"] == "true") {
+ optionString.append(" -s");
+ }
+
+ if (mountOptions.contains("filesystem")) {
+ optionString.append(TQString(" -t %1").arg(mountOptions["filesystem"]));
+ }
+
+ if (mountOptions.contains("locale")) {
+ optionString.append(TQString(" -c %1").arg(mountOptions["locale"]));
+ }
+
TQString passFileName = passwordFile.name();
TQString devNode = deviceNode();
passFileName.replace("'", "'\\''");
devNode.replace("'", "'\\''");
mediaName.replace("'", "'\\''");
- TQString command = TQString("pmount -p '%1' %2 '%3' '%4' 2>&1").arg(passFileName).arg(mountOptions).arg(devNode).arg(mediaName);
+ TQString command = TQString("pmount -p '%1' %2 '%3' '%4' 2>&1").arg(passFileName).arg(optionString).arg(devNode).arg(mediaName);
FILE *exepipe = popen(command.ascii(), "r");
if (exepipe) {
@@ -634,7 +659,7 @@ TQString TDEStorageDevice::mountDevice(TQString mediaName, TQString mountOptions
return ret;
}
-TQString TDEStorageDevice::mountEncryptedDevice(TQString passphrase, TQString mediaName, TQString mountOptions, TQString* errRet, int* retcode) {
+TQString TDEStorageDevice::mountEncryptedDevice(TQString passphrase, TQString mediaName, TDEStorageMountOptions mountOptions, TQString* errRet, int* retcode) {
int internal_retcode;
if (!retcode) {
retcode = &internal_retcode;
@@ -657,12 +682,37 @@ TQString TDEStorageDevice::mountEncryptedDevice(TQString passphrase, TQString me
pwFile->writeBlock(passphrase.ascii(), passphrase.length());
pwFile->flush();
+ TQString optionString;
+ if (mountOptions["ro"] == "true") {
+ optionString.append(" -r");
+ }
+
+ if (mountOptions["atime"] != "true") {
+ optionString.append(" -A");
+ }
+
+ if (mountOptions["utf8"] == "true") {
+ optionString.append(" -c utf8");
+ }
+
+ if (mountOptions["sync"] == "true") {
+ optionString.append(" -s");
+ }
+
+ if (mountOptions.contains("filesystem")) {
+ optionString.append(TQString(" -t %1").arg(mountOptions["filesystem"]));
+ }
+
+ if (mountOptions.contains("locale")) {
+ optionString.append(TQString(" -c %1").arg(mountOptions["locale"]));
+ }
+
TQString passFileName = passwordFile.name();
TQString devNode = deviceNode();
passFileName.replace("'", "'\\''");
devNode.replace("'", "'\\''");
mediaName.replace("'", "'\\''");
- TQString command = TQString("pmount -p '%1' %2 '%3' '%4' 2>&1").arg(passFileName).arg(mountOptions).arg(devNode).arg(mediaName);
+ TQString command = TQString("pmount -p '%1' %2 '%3' '%4' 2>&1").arg(passFileName).arg(optionString).arg(devNode).arg(mediaName);
FILE *exepipe = popen(command.ascii(), "r");
if (exepipe) {
diff --git a/tdecore/tdehw/tdestoragedevice.h b/tdecore/tdehw/tdestoragedevice.h
index 0f33b03dc..7c80f5ea5 100644
--- a/tdecore/tdehw/tdestoragedevice.h
+++ b/tdecore/tdehw/tdestoragedevice.h
@@ -105,6 +105,8 @@ inline TDEDiskDeviceStatus operator~(TDEDiskDeviceStatus a)
}
};
+typedef TQMap<TQString,TQString> TDEStorageMountOptions;
+
class TDECORE_EXPORT TDEStorageDevice : public TDEGenericDevice
{
public:
@@ -174,7 +176,7 @@ class TDECORE_EXPORT TDEStorageDevice : public TDEGenericDevice
*
* @return a TQString with the mount path, if successful
*/
- TQString mountDevice(TQString mediaName=TQString::null, TQString mountOptions=TQString::null, TQString* errRet=0, int* retcode=0);
+ TQString mountDevice(TQString mediaName=TQString::null, TDEStorageMountOptions mountOptions=TDEStorageMountOptions(), TQString* errRet=0, int* retcode=0);
/**
* Mounts the encrypted device if the correct passphrase is given
@@ -187,7 +189,7 @@ class TDECORE_EXPORT TDEStorageDevice : public TDEGenericDevice
*
* @return a TQString with the mount path, if successful
*/
- TQString mountEncryptedDevice(TQString passphrase, TQString mediaName=TQString::null, TQString mountOptions=TQString::null, TQString* errRet=0, int* retcode=0);
+ TQString mountEncryptedDevice(TQString passphrase, TQString mediaName=TQString::null, TDEStorageMountOptions mountOptions=TDEStorageMountOptions(), TQString* errRet=0, int* retcode=0);
/**
* Unmounts the device
diff --git a/tdeioslave/metainfo/metainfo.cpp b/tdeioslave/metainfo/metainfo.cpp
index 389a9182e..37f50a132 100644
--- a/tdeioslave/metainfo/metainfo.cpp
+++ b/tdeioslave/metainfo/metainfo.cpp
@@ -42,7 +42,7 @@ extern "C"
int kdemain(int argc, char **argv)
{
- TDEApplication app(argc, argv, "tdeio_metainfo", false, true);
+ TDEApplication app(argc, argv, "tdeio_metainfo", false, true, false);
if (argc != 4)
{