Add CMake option to build karm with xscreensaver support

(cherry picked from commit c9a29849cb)
v3.5.13-sru
Slávek Banko 12 years ago
parent 1ab2350d42
commit 1134502d2b

@ -71,6 +71,7 @@ option( WITH_SCALIX "Enable scalix support" OFF )
option( WITH_CALDAV "Enable caldav support" OFF ) option( WITH_CALDAV "Enable caldav support" OFF )
option( WITH_CARDDAV "Enable carddav support" OFF ) option( WITH_CARDDAV "Enable carddav support" OFF )
option( WITH_INDEXLIB "Enable indexlib support (in kmail)" 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 ) if( NOT WITH_ARTS )
set( WITHOUT_ARTS 1 ) set( WITHOUT_ARTS 1 )

@ -137,6 +137,26 @@ if( BUILD_LIBKDENETWORK OR BUILD_CERTMANAGER OR BUILD_KMAIL OR BUILD_KADDRESSBOO
endif( ) endif( )
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 # required stuff
find_package( TQt ) find_package( TQt )
find_package( TDE ) find_package( TDE )

@ -34,6 +34,9 @@
// kandy // kandy
#cmakedefine HAVE_LOCKDEV 1 #cmakedefine HAVE_LOCKDEV 1
// karm
#cmakedefine HAVE_LIBXSS 1
// mimelib // mimelib
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

@ -55,7 +55,7 @@ tde_add_library( karm SHARED AUTOMOC
csvexportdialog.cpp plannerparser.cpp karmdcopiface.skel csvexportdialog.cpp plannerparser.cpp karmdcopiface.skel
taskviewwhatsthis.cpp taskviewwhatsthis.cpp
VERSION 0.0.0 VERSION 0.0.0
LINK kcal_resourceremote-shared kdeprint-shared LINK kcal_resourceremote-shared kdeprint-shared ${XSS_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR} DESTINATION ${LIB_INSTALL_DIR}
) )

@ -47,7 +47,7 @@ MainWindow::MainWindow( const TQString &icsfile )
setCentralWidget( _taskView ); setCentralWidget( _taskView );
// status bar // status bar
starStatusBar(); startStatusBar();
// setup PreferenceDialog. // setup PreferenceDialog.
_preferences = Preferences::instance(); _preferences = Preferences::instance();
@ -208,7 +208,7 @@ void MainWindow::updateStatusBar( )
statusBar()->changeItem( i18n("Total: %1" ).arg(time), 1); statusBar()->changeItem( i18n("Total: %1" ).arg(time), 1);
} }
void MainWindow::starStatusBar() void MainWindow::startStatusBar()
{ {
statusBar()->insertItem( i18n("Session"), 0, 0, true ); statusBar()->insertItem( i18n("Session"), 0, 0, true );
statusBar()->insertItem( i18n("Total" ), 1, 0, true ); statusBar()->insertItem( i18n("Total" ), 1, 0, true );

@ -108,7 +108,7 @@ class MainWindow : public KParts::MainWindow, virtual public KarmDCOPIface
// void timeLoggingChanged( bool on ); // void timeLoggingChanged( bool on );
protected: protected:
void starStatusBar(); void startStatusBar();
virtual void saveProperties( KConfig* ); virtual void saveProperties( KConfig* );
virtual void readProperties( KConfig* ); virtual void readProperties( KConfig* );
void saveGeometry(); void saveGeometry();

@ -145,6 +145,7 @@ void Preferences::makeStoragePage()
void Preferences::disableIdleDetection() void Preferences::disableIdleDetection()
{ {
_doIdleDetectionW->setEnabled(false); _doIdleDetectionW->setEnabled(false);
_idleDetectValueW->setEnabled(false);
} }

Loading…
Cancel
Save