diff --git a/CMakeLists.txt b/CMakeLists.txt index 069e37c0..df5d6c31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,6 +71,7 @@ option( WITH_SCALIX "Enable scalix support" OFF ) option( WITH_CALDAV "Enable caldav support" OFF ) option( WITH_CARDDAV "Enable carddav support" OFF ) option( WITH_INDEXLIB "Enable indexlib support (in kmail)" OFF ) +option( WITH_XSCREENSAVER "Enable xscreensaver support (idle detection in karm)" OFF ) if( NOT WITH_ARTS ) set( WITHOUT_ARTS 1 ) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index e0b3f928..bd983f9e 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -137,6 +137,26 @@ if( BUILD_LIBKDENETWORK OR BUILD_CERTMANAGER OR BUILD_KMAIL OR BUILD_KADDRESSBOO endif( ) endif( ) + +if( BUILD_KARM AND WITH_XSCREENSAVER ) + check_library_exists( Xss XScreenSaverQueryInfo "" HAVE_XSSLIB ) + if( HAVE_XSSLIB ) + pkg_search_module( XSS xscrnsaver ) + else( ) + check_library_exists( Xext XScreenSaverQueryInfo "" HAVE_XSSLIB ) + if( HAVE_XSSLIB ) + pkg_search_module( XSS xext ) + endif( ) + endif( ) + check_include_file( X11/extensions/scrnsaver.h HAVE_XSCREENSAVER_H ) + if( HAVE_XSSLIB AND HAVE_XSCREENSAVER_H ) + set( HAVE_LIBXSS 1 ) + else( ) + tde_message_fatal( "xscreensaver is requested, but was not found on your system" ) + endif( ) +endif( ) + + # required stuff find_package( TQt ) find_package( TDE ) diff --git a/config.h.cmake b/config.h.cmake index 4ccd2dec..35c9bb34 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -34,6 +34,9 @@ // kandy #cmakedefine HAVE_LOCKDEV 1 +// karm +#cmakedefine HAVE_LIBXSS 1 + // mimelib #ifdef __cplusplus extern "C" { diff --git a/karm/CMakeLists.txt b/karm/CMakeLists.txt index 013855c5..5019713c 100644 --- a/karm/CMakeLists.txt +++ b/karm/CMakeLists.txt @@ -55,7 +55,7 @@ tde_add_library( karm SHARED AUTOMOC csvexportdialog.cpp plannerparser.cpp karmdcopiface.skel taskviewwhatsthis.cpp VERSION 0.0.0 - LINK kcal_resourceremote-shared kdeprint-shared + LINK kcal_resourceremote-shared kdeprint-shared ${XSS_LIBRARIES} DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/karm/mainwindow.cpp b/karm/mainwindow.cpp index eb6bd4fa..20f27f16 100644 --- a/karm/mainwindow.cpp +++ b/karm/mainwindow.cpp @@ -47,7 +47,7 @@ MainWindow::MainWindow( const TQString &icsfile ) setCentralWidget( _taskView ); // status bar - starStatusBar(); + startStatusBar(); // setup PreferenceDialog. _preferences = Preferences::instance(); @@ -208,7 +208,7 @@ void MainWindow::updateStatusBar( ) statusBar()->changeItem( i18n("Total: %1" ).arg(time), 1); } -void MainWindow::starStatusBar() +void MainWindow::startStatusBar() { statusBar()->insertItem( i18n("Session"), 0, 0, true ); statusBar()->insertItem( i18n("Total" ), 1, 0, true ); diff --git a/karm/mainwindow.h b/karm/mainwindow.h index 63479c92..20aaecf1 100644 --- a/karm/mainwindow.h +++ b/karm/mainwindow.h @@ -108,7 +108,7 @@ class MainWindow : public KParts::MainWindow, virtual public KarmDCOPIface // void timeLoggingChanged( bool on ); protected: - void starStatusBar(); + void startStatusBar(); virtual void saveProperties( KConfig* ); virtual void readProperties( KConfig* ); void saveGeometry(); diff --git a/karm/preferences.cpp b/karm/preferences.cpp index c242fa6a..6d5d708a 100644 --- a/karm/preferences.cpp +++ b/karm/preferences.cpp @@ -145,6 +145,7 @@ void Preferences::makeStoragePage() void Preferences::disableIdleDetection() { _doIdleDetectionW->setEnabled(false); + _idleDetectValueW->setEnabled(false); }