Timothy Pearson 12 years ago
commit 0a95f04863

@ -1,6 +1,6 @@
################################################# #################################################
# #
# (C) 2010-2011 Serghei Amelian # (C) 2010-2012 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com # serghei (DOT) amelian (AT) gmail.com
# #
# Improvements and feedback are welcome # Improvements and feedback are welcome
@ -15,7 +15,7 @@ cmake_minimum_required( VERSION 2.8 )
project( tdebase ) project( tdebase )
set( PACKAGE tdebase ) set( PACKAGE tdebase )
set( VERSION "3.5.13" ) set( VERSION "R14" )
##### include essential cmake modules ########### ##### include essential cmake modules ###########
@ -77,12 +77,14 @@ option( WITH_XINERAMA "Enable xinerama extension support" ${WITH_ALL_OPTIONS} )
option( WITH_ARTS "Enable aRts support" ${WITH_ALL_OPTIONS} ) option( WITH_ARTS "Enable aRts support" ${WITH_ALL_OPTIONS} )
option( WITH_I8K "Enable Dell laptop support (ksysguard)" ${WITH_ALL_OPTIONS} ) option( WITH_I8K "Enable Dell laptop support (ksysguard)" ${WITH_ALL_OPTIONS} )
option( WITH_HAL "Enable HAL support" ${WITH_ALL_OPTIONS} ) option( WITH_HAL "Enable HAL support" ${WITH_ALL_OPTIONS} )
option( WITH_UPOWER "Enable UPOWER support" ${WITH_ALL_OPTIONS} )
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
##### user requested modules #################### ##### user requested modules ####################
option( BUILD_ALL "Build all" OFF ) option( BUILD_ALL "Build all" OFF )
option( BUILD_TDEINIT "Build tdeinit" ${BUILD_ALL} )
option( BUILD_L10N "Build l10n" ${BUILD_ALL} ) option( BUILD_L10N "Build l10n" ${BUILD_ALL} )
option( BUILD_PICS "Build pics" ${BUILD_ALL} ) option( BUILD_PICS "Build pics" ${BUILD_ALL} )
option( BUILD_APPLNK "Build applnk" ${BUILD_ALL} ) option( BUILD_APPLNK "Build applnk" ${BUILD_ALL} )
@ -157,8 +159,8 @@ set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
##### tdebase directories ####################### ##### tdebase directories #######################
add_subdirectory( tdmlib ) add_subdirectory( tdmlib )
add_subdirectory( tdeinit )
tde_conditional_add_subdirectory( BUILD_TDEINIT tdeinit )
tde_conditional_add_subdirectory( BUILD_L10N l10n ) tde_conditional_add_subdirectory( BUILD_L10N l10n )
tde_conditional_add_subdirectory( BUILD_PICS pics ) tde_conditional_add_subdirectory( BUILD_PICS pics )
tde_conditional_add_subdirectory( BUILD_APPLNK applnk ) tde_conditional_add_subdirectory( BUILD_APPLNK applnk )
@ -204,7 +206,7 @@ tde_conditional_add_subdirectory( BUILD_KSYSGUARD ksysguard )
tde_conditional_add_subdirectory( BUILD_KXKB kxkb ) tde_conditional_add_subdirectory( BUILD_KXKB kxkb )
tde_conditional_add_subdirectory( BUILD_TSAK tsak ) tde_conditional_add_subdirectory( BUILD_TSAK tsak )
tde_conditional_add_subdirectory( BUILD_KROOTBACKING krootbacking ) tde_conditional_add_subdirectory( BUILD_KROOTBACKING krootbacking )
tde_conditional_add_subdirectory( BUILD_TQT3INTEGRATION tqt3integration ) tde_conditional_add_subdirectory( BUILD_TQT3INTEGRATION tqt3integration )
##### install starttde & related stuff ########## ##### install starttde & related stuff ##########

@ -1,6 +1,6 @@
################################################# #################################################
# #
# (C) 2010-2011 Serghei Amelian # (C) 2010-2012 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com # serghei (DOT) amelian (AT) gmail.com
# #
# Improvements and feedback are welcome # Improvements and feedback are welcome
@ -215,7 +215,7 @@ find_package( TQt )
find_package( TDE ) find_package( TDE )
# dbus-tqt need Qt flags
# dbus (tdm, ksmserver) # dbus (tdm, ksmserver)
if( BUILD_TDM OR BUILD_KSMSERVER ) if( BUILD_TDM OR BUILD_KSMSERVER )
@ -224,19 +224,33 @@ if( BUILD_TDM OR BUILD_KSMSERVER )
tde_message_fatal( "dbus-1 is required, but was not found on your system" ) tde_message_fatal( "dbus-1 is required, but was not found on your system" )
endif( ) endif( )
# check for dbus-tqt endif( )
pkg_check_modules( DBUS_TQT REQUIRED dbus-tqt )
tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
set( CMAKE_REQUIRED_INCLUDES ${DBUS_TQT_INCLUDE_DIRS} ${TQT_INCLUDE_DIRS} ${QT_INCLUDE_DIRS}) # tqt-dbus (tdm, ksmserver)
set( CMAKE_REQUIRED_LIBRARIES ${DBUS_TQT_LDFLAGS} ${TQT_LDFLAGS} ${QT_LDFLAGS} ) if( BUILD_TDM OR BUILD_KSMSERVER )
check_cxx_source_compiles("
#include <tqt.h> if( BUILD_KSMSERVER AND WITH_UPOWER )
#include <dbus/connection.h> pkg_check_modules( DBUS_1_TQT dbus-1-tqt )
int main(int, char**) { return 0; } " if( NOT DBUS_1_TQT_FOUND )
HAVE_DBUS_QT3_07 ) tde_message_fatal( "dbus-tqt-1 is required, but was not found on your system" )
tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES ) endif( )
if( NOT HAVE_DBUS_QT3_07 ) else( )
tde_message_fatal( "dbus-tqt is required, but was not found on your system" ) # check for dbus-tqt
# dbus-tqt need Qt flags
pkg_check_modules( DBUS_TQT REQUIRED dbus-tqt )
tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
set( CMAKE_REQUIRED_INCLUDES ${DBUS_TQT_INCLUDE_DIRS} ${TQT_INCLUDE_DIRS} ${QT_INCLUDE_DIRS})
set( CMAKE_REQUIRED_LIBRARIES ${DBUS_TQT_LDFLAGS} ${TQT_LDFLAGS} ${QT_LDFLAGS} )
check_cxx_source_compiles("
#include <tqt.h>
#include <dbus/connection.h>
int main(int, char**) { return 0; } "
HAVE_DBUS_QT3_07 )
tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
if( NOT HAVE_DBUS_QT3_07 )
tde_message_fatal( "dbus-tqt is required, but was not found on your system" )
endif( )
endif( ) endif( )
endif( ) endif( )

@ -1 +1 @@
Subproject commit 03276f811984993d6240296b8ef34abb0290b82f Subproject commit b5d31618a142abc141857471ea533c2a59f5ffc6

@ -13,18 +13,24 @@ if( NOT DBUS_SYSTEM_BUS )
set( DBUS_SYSTEM_BUS "unix:path=/var/run/dbus/system_bus_socket" CACHE INTERNAL "" FORCE ) set( DBUS_SYSTEM_BUS "unix:path=/var/run/dbus/system_bus_socket" CACHE INTERNAL "" FORCE )
endif() endif()
if( WITH_UPOWER )
add_definitions( -DWITH_UPOWER )
endif( )
include_directories( include_directories(
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/tdmlib ${CMAKE_SOURCE_DIR}/tdmlib
${TDE_INCLUDE_DIR} ${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS} ${TQT_INCLUDE_DIRS}
${DBUS_1_TQT_INCLUDE_DIRS}
${DBUS_TQT_INCLUDE_DIRS} ${DBUS_TQT_INCLUDE_DIRS}
${HAL_INCLUDE_DIRS} ${HAL_INCLUDE_DIRS}
) )
link_directories( link_directories(
${TQT_LIBRARY_DIRS} ${TQT_LIBRARY_DIRS}
${DBUS_1_TQT_LIBRARY_DIRS}
${DBUS_TQT_LIBRARY_DIRS} ${DBUS_TQT_LIBRARY_DIRS}
) )
@ -43,5 +49,5 @@ tde_add_tdeinit_executable( ksmserver AUTOMOC
main.cpp server.cpp shutdowndlg.cpp startupdlg.cpp main.cpp server.cpp shutdowndlg.cpp startupdlg.cpp
legacy.cpp startup.cpp shutdown.cpp client.cpp legacy.cpp startup.cpp shutdown.cpp client.cpp
KSMServerInterface.skel server.skel timed.ui KSMServerInterface.skel server.skel timed.ui
LINK dmctl-static tdeui-shared krsync-shared ${HAL_LIBRARIES} ${DBUS_TQT_LIBRARIES} LINK dmctl-static tdeui-shared krsync-shared ${HAL_LIBRARIES} ${DBUS_1_TQT_LIBRARIES} ${DBUS_TQT_LIBRARIES}
) )

File diff suppressed because it is too large Load Diff

@ -1,6 +1,7 @@
/***************************************************************** /*****************************************************************
ksmserver - the KDE session management server ksmserver - the KDE session management server
Copyright (C) 2012 Serghei Amelian <serghei.amelian@gmail.com>
Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org> Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
******************************************************************/ ******************************************************************/
@ -32,129 +33,138 @@ class KAction;
#include <config.h> #include <config.h>
#ifndef NO_QT3_DBUS_SUPPORT #ifdef WITH_UPOWER
/* We acknowledge the the dbus API is unstable */ #include <tqdbusconnection.h>
#define DBUS_API_SUBJECT_TO_CHANGE #else
#include <dbus/connection.h> #warning test
#endif // NO_QT3_DBUS_SUPPORT #ifndef NO_QT3_DBUS_SUPPORT
/* We acknowledge the the dbus API is unstable */
#ifdef COMPILE_HALBACKEND #define DBUS_API_SUBJECT_TO_CHANGE
#include <hal/libhal.h> #include <dbus/connection.h>
#endif #endif // NO_QT3_DBUS_SUPPORT
#ifdef COMPILE_HALBACKEND
#include <hal/libhal.h>
#endif
#endif // WITH_UPOWER
// The (singleton) widget that makes/fades the desktop gray. // The (singleton) widget that makes/fades the desktop gray.
class KSMShutdownFeedback : public TQWidget class KSMShutdownFeedback : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
static void start() { s_pSelf = new KSMShutdownFeedback(); } static void start() { s_pSelf = new KSMShutdownFeedback(); }
static void stop() { if ( s_pSelf != 0L ) s_pSelf->fadeBack(); delete s_pSelf; s_pSelf = 0L; } static void stop() { if ( s_pSelf != 0L ) s_pSelf->fadeBack(); delete s_pSelf; s_pSelf = 0L; }
static KSMShutdownFeedback * self() { return s_pSelf; } static KSMShutdownFeedback * self() { return s_pSelf; }
protected: protected:
~KSMShutdownFeedback() {} ~KSMShutdownFeedback() {}
private slots: private slots:
void slotPaintEffect(); void slotPaintEffect();
private: private:
static KSMShutdownFeedback * s_pSelf; static KSMShutdownFeedback * s_pSelf;
KSMShutdownFeedback(); KSMShutdownFeedback();
int m_currentY; int m_currentY;
TQPixmap m_root; TQPixmap m_root;
void fadeBack( void ); void fadeBack( void );
float m_grayOpacity; float m_grayOpacity;
float m_compensation; float m_compensation;
bool m_fadeBackwards; bool m_fadeBackwards;
bool m_readDelayComplete; bool m_readDelayComplete;
TQImage m_unfadedImage; TQImage m_unfadedImage;
TQImage m_grayImage; TQImage m_grayImage;
TQTime m_fadeTime; TQTime m_fadeTime;
int m_rowsDone; int m_rowsDone;
KPixmapIO m_pmio; KPixmapIO m_pmio;
bool m_greyImageCreated; bool m_greyImageCreated;
}; };
// The (singleton) widget that shows either pretty pictures or a black screen during logout // The (singleton) widget that shows either pretty pictures or a black screen during logout
class KSMShutdownIPFeedback : public TQWidget class KSMShutdownIPFeedback : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
static void start() { s_pSelf = new KSMShutdownIPFeedback(); } static void start() { s_pSelf = new KSMShutdownIPFeedback(); }
static void showit() { if ( s_pSelf != 0L ) s_pSelf->showNow(); } static void showit() { if ( s_pSelf != 0L ) s_pSelf->showNow(); }
static void stop() { if ( s_pSelf != 0L ) s_pSelf->fadeBack(); delete s_pSelf; s_pSelf = 0L; } static void stop() { if ( s_pSelf != 0L ) s_pSelf->fadeBack(); delete s_pSelf; s_pSelf = 0L; }
static KSMShutdownIPFeedback * self() { return s_pSelf; } static KSMShutdownIPFeedback * self() { return s_pSelf; }
static bool ispainted() { if ( s_pSelf != 0L ) return s_pSelf->m_isPainted; else return false; } static bool ispainted() { if ( s_pSelf != 0L ) return s_pSelf->m_isPainted; else return false; }
protected: protected:
~KSMShutdownIPFeedback(); ~KSMShutdownIPFeedback();
public slots: public slots:
void slotPaintEffect(); void slotPaintEffect();
void slotSetBackgroundPixmap(const TQPixmap &); void slotSetBackgroundPixmap(const TQPixmap &);
private: private:
static KSMShutdownIPFeedback * s_pSelf; static KSMShutdownIPFeedback * s_pSelf;
KSMShutdownIPFeedback(); KSMShutdownIPFeedback();
int m_currentY; int m_currentY;
TQPixmap m_root; TQPixmap m_root;
void fadeBack( void ); void fadeBack( void );
void showNow( void ); void showNow( void );
int m_timeout; int m_timeout;
bool m_isPainted; bool m_isPainted;
KRootPixmap* m_sharedRootPixmap; KRootPixmap* m_sharedRootPixmap;
TQPixmap m_rootPixmap; TQPixmap m_rootPixmap;
int mPixmapTimeout; int mPixmapTimeout;
}; };
// The confirmation dialog // The confirmation dialog
class KSMShutdownDlg : public TQDialog class KSMShutdownDlg : public TQDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
static bool confirmShutdown( bool maysd, KApplication::ShutdownType& sdtype, TQString& bopt ); static bool confirmShutdown( bool maysd, KApplication::ShutdownType& sdtype, TQString& bopt );
public slots: public slots:
void slotLogout(); void slotLogout();
void slotHalt(); void slotHalt();
void slotReboot(); void slotReboot();
void slotReboot(int); void slotReboot(int);
void slotSuspend(); void slotSuspend();
void slotHibernate(); void slotHibernate();
protected: protected:
~KSMShutdownDlg(); ~KSMShutdownDlg();
private: private:
KSMShutdownDlg( TQWidget* parent, bool maysd, KApplication::ShutdownType sdtype ); KSMShutdownDlg( TQWidget* parent, bool maysd, KApplication::ShutdownType sdtype );
KApplication::ShutdownType m_shutdownType; KApplication::ShutdownType m_shutdownType;
TQString m_bootOption; TQString m_bootOption;
TQPopupMenu *targets; TQPopupMenu *targets;
TQStringList rebootOptions; TQStringList rebootOptions;
#ifdef WITH_UPOWER
TQT_DBusConnection m_dbusConn;
#else
#ifdef COMPILE_HALBACKEND #ifdef COMPILE_HALBACKEND
LibHalContext* m_halCtx; LibHalContext* m_halCtx;
DBusConnection *m_dbusConn; DBusConnection *m_dbusConn;
#endif #endif
bool m_lockOnResume; #endif // WITH_UPOWER
bool m_lockOnResume;
}; };
// The shutdown-in-progress dialog // The shutdown-in-progress dialog
class KSMShutdownIPDlg : public KSMModalDialog class KSMShutdownIPDlg : public KSMModalDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
static TQWidget* showShutdownIP(); static TQWidget* showShutdownIP();
protected: protected:
~KSMShutdownIPDlg(); ~KSMShutdownIPDlg();
private: private:
KSMShutdownIPDlg( TQWidget* parent ); KSMShutdownIPDlg( TQWidget* parent );
}; };
class KSMDelayedPushButton : public KPushButton class KSMDelayedPushButton : public KPushButton
@ -210,14 +220,14 @@ class FlatButton : public TQToolButton
virtual void keyReleaseEvent(TQKeyEvent*e); virtual void keyReleaseEvent(TQKeyEvent*e);
private slots: private slots:
private: private:
void init(); void init();
bool m_pressed; bool m_pressed;
TQString m_text; TQString m_text;
TQPixmap m_pixmap; TQPixmap m_pixmap;
}; };
@ -227,18 +237,18 @@ class TQLabel;
class KSMDelayedMessageBox : public TimedLogoutDlg class KSMDelayedMessageBox : public TimedLogoutDlg
{ {
Q_OBJECT Q_OBJECT
public: public:
KSMDelayedMessageBox( KApplication::ShutdownType sdtype, const TQString &bootOption, int confirmDelay ); KSMDelayedMessageBox( KApplication::ShutdownType sdtype, const TQString &bootOption, int confirmDelay );
static bool showTicker( KApplication::ShutdownType sdtype, const TQString &bootOption, int confirmDelay ); static bool showTicker( KApplication::ShutdownType sdtype, const TQString &bootOption, int confirmDelay );
protected slots: protected slots:
void updateText(); void updateText();
private: private:
TQString m_template; TQString m_template;
int m_remaining; int m_remaining;
}; };
#endif #endif

@ -30,31 +30,20 @@ class KAction;
#include <kapplication.h> #include <kapplication.h>
#include <kpixmapio.h> #include <kpixmapio.h>
#include <config.h>
#ifndef NO_QT3_DBUS_SUPPORT
/* We acknowledge the the dbus API is unstable */
#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/connection.h>
#endif // NO_QT3_DBUS_SUPPORT
#ifdef COMPILE_HALBACKEND
#include <hal/libhal.h>
#endif
// The startup-in-progress dialog // The startup-in-progress dialog
class KSMStartupIPDlg : public KSMModalDialog class KSMStartupIPDlg : public KSMModalDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
static TQWidget* showStartupIP(); static TQWidget* showStartupIP();
protected: protected:
~KSMStartupIPDlg(); ~KSMStartupIPDlg();
private: private:
KSMStartupIPDlg( TQWidget* parent ); KSMStartupIPDlg( TQWidget* parent );
}; };
#endif #endif

Loading…
Cancel
Save