summaryrefslogtreecommitdiffstats
path: root/kcontrol
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2014-10-18 14:19:37 +0200
committerSlávek Banko <[email protected]>2014-10-18 14:29:21 +0200
commit107220694fe3387df4051dcd94ae6c9995cb45f6 (patch)
tree4301e933aa91df778cdc97153f4e1bd4ba4e3114 /kcontrol
parent69da674b30d246f4df152501b9312518cd900372 (diff)
downloadtdebase-107220694fe3387df4051dcd94ae6c9995cb45f6.tar.gz
tdebase-107220694fe3387df4051dcd94ae6c9995cb45f6.zip
Allow contitional build with tdehwlib
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'kcontrol')
-rw-r--r--kcontrol/CMakeLists.txt2
-rw-r--r--kcontrol/displayconfig/displayconfig.cpp4
-rw-r--r--kcontrol/displayconfig/displayconfig.h4
-rw-r--r--kcontrol/randr/tderandrtray.cpp4
-rw-r--r--kcontrol/randr/tderandrtray.h4
5 files changed, 17 insertions, 1 deletions
diff --git a/kcontrol/CMakeLists.txt b/kcontrol/CMakeLists.txt
index ffd8e8346..d45828d10 100644
--- a/kcontrol/CMakeLists.txt
+++ b/kcontrol/CMakeLists.txt
@@ -64,9 +64,9 @@ if( BUILD_KCONTROL )
add_subdirectory( kthememanager )
add_subdirectory( tdefontinst )
add_subdirectory( access )
- add_subdirectory( hwmanager )
tde_conditional_add_subdirectory( WITH_XRANDR displayconfig )
+ tde_conditional_add_subdirectory( WITH_TDEHWLIB hwmanager )
tde_conditional_add_subdirectory( WITH_SAMBA samba )
tde_conditional_add_subdirectory( WITH_XRANDR randr )
tde_conditional_add_subdirectory( WITH_LIBRAW1394 view1394 )
diff --git a/kcontrol/displayconfig/displayconfig.cpp b/kcontrol/displayconfig/displayconfig.cpp
index db371fc42..d326740b7 100644
--- a/kcontrol/displayconfig/displayconfig.cpp
+++ b/kcontrol/displayconfig/displayconfig.cpp
@@ -742,8 +742,10 @@ void KDisplayConfig::setRealResolutionSliderValue(int index) {
KDisplayConfig::KDisplayConfig(TQWidget *parent, const char *name, const TQStringList &)
: TDECModule(KDisplayCFactory::instance(), parent, name), iccTab(0), numberOfProfiles(0), numberOfScreens(0), m_randrsimple(0), activeProfileName(""), m_gammaApplyTimer(0)
{
+#ifdef __TDE_HAVE_TDEHWLIB
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*)));
+#endif
m_randrsimple = new KRandrSimpleAPI();
@@ -859,6 +861,7 @@ KDisplayConfig::~KDisplayConfig()
}
void KDisplayConfig::deviceChanged (TDEGenericDevice* device) {
+#ifdef __TDE_HAVE_TDEHWLIB
if (device->type() == TDEGenericDeviceType::Monitor) {
if (base->rescanHardware->isEnabled()) {
base->rescanHardware->setEnabled(false);
@@ -866,6 +869,7 @@ void KDisplayConfig::deviceChanged (TDEGenericDevice* device) {
base->rescanHardware->setEnabled(true);
}
}
+#endif
}
void KDisplayConfig::updateExtendedMonitorInformation () {
diff --git a/kcontrol/displayconfig/displayconfig.h b/kcontrol/displayconfig/displayconfig.h
index a52ebb3fc..92fa1f421 100644
--- a/kcontrol/displayconfig/displayconfig.h
+++ b/kcontrol/displayconfig/displayconfig.h
@@ -35,7 +35,11 @@
#include <dcopobject.h>
#include <libtderandr/libtderandr.h>
+#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h>
+#else
+#define TDEGenericDevice void
+#endif
#include "monitorworkspace.h"
#include "displayconfigbase.h"
diff --git a/kcontrol/randr/tderandrtray.cpp b/kcontrol/randr/tderandrtray.cpp
index d6a711db7..a443c3781 100644
--- a/kcontrol/randr/tderandrtray.cpp
+++ b/kcontrol/randr/tderandrtray.cpp
@@ -92,8 +92,10 @@ KRandRSystemTray::KRandRSystemTray(TQWidget* parent, const char *name)
applyIccConfiguration(cur_profile, NULL);
}
+#ifdef __TDE_HAVE_TDEHWLIB
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*)));
+#endif
}
/*!
@@ -886,6 +888,7 @@ void KRandRSystemTray::slotOutputChanged(int parameter)
}
void KRandRSystemTray::deviceChanged (TDEGenericDevice* device) {
+#ifdef __TDE_HAVE_TDEHWLIB
if (device->type() == TDEGenericDeviceType::Monitor) {
KRandrPassivePopup::message(
i18n("New display output options are available!"),
@@ -895,6 +898,7 @@ void KRandRSystemTray::deviceChanged (TDEGenericDevice* device) {
reloadDisplayConfiguration();
applyHotplugRules(locateLocal("config", "/", true));
}
+#endif
}
void KRandRSystemTray::slotHelpContents()
diff --git a/kcontrol/randr/tderandrtray.h b/kcontrol/randr/tderandrtray.h
index 09a1b2671..8f382922f 100644
--- a/kcontrol/randr/tderandrtray.h
+++ b/kcontrol/randr/tderandrtray.h
@@ -25,7 +25,11 @@
#include <kglobalaccel.h>
#include <libtderandr/libtderandr.h>
+#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h>
+#else
+#define TDEGenericDevice void
+#endif
class KHelpMenu;
class TDEPopupMenu;