Add CMake option to build karm with xscreensaver support

pull/21/head
Slávek Banko 11 years ago
parent c8000010a8
commit c9a29849cb

@ -72,6 +72,7 @@ option( WITH_SCALIX "Enable scalix support" ${WITH_ALL_OPTIONS} )
option( WITH_CALDAV "Enable caldav support" ${WITH_ALL_OPTIONS} )
option( WITH_CARDDAV "Enable carddav support" ${WITH_ALL_OPTIONS} )
option( WITH_INDEXLIB "Enable indexlib support (in kmail)" ${WITH_ALL_OPTIONS} )
option( WITH_XSCREENSAVER "Enable xscreensaver support (idle detection in karm)" ${WITH_ALL_OPTIONS} )
if( NOT WITH_ARTS )
set( WITHOUT_ARTS 1 )

@ -153,6 +153,26 @@ if( BUILD_LIBTDENETWORK 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 )

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

@ -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 tdeprint-shared
LINK kcal_resourceremote-shared tdeprint-shared ${XSS_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR}
)

@ -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 );

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

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

Loading…
Cancel
Save