diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-31 21:51:08 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-31 21:51:08 -0600 |
commit | 8bc199f487aad2badc9a54c2105f13fff3da7295 (patch) | |
tree | aeab8d62a78c4a2c72a3747db8c650386d0665d9 /kinit | |
parent | d3afa6baf98ef5ac191996cc9b909ff9074c168c (diff) | |
download | tdelibs-8bc199f487aad2badc9a54c2105f13fff3da7295.tar.gz tdelibs-8bc199f487aad2badc9a54c2105f13fff3da7295.zip |
Rename KStartup for enhanced compatibility with KDE4
Diffstat (limited to 'kinit')
-rw-r--r-- | kinit/kinit.cpp | 18 | ||||
-rw-r--r-- | kinit/tdelauncher.cpp | 20 |
2 files changed, 19 insertions, 19 deletions
diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp index 63e6ab832..16946fb2d 100644 --- a/kinit/kinit.cpp +++ b/kinit/kinit.cpp @@ -318,7 +318,7 @@ const char* get_env_var( const char* var, int envc, const char* envs ) #if defined Q_WS_X11 && ! defined K_WS_QTONLY //#ifdef Q_WS_X11 // FIXME(E): Implement for Qt/Embedded -static void init_startup_info( KStartupInfoId& id, const char* bin, +static void init_startup_info( TDEStartupInfoId& id, const char* bin, int envc, const char* envs ) { const char* dpy = get_env_var( DISPLAY"=", envc, envs ); @@ -328,26 +328,26 @@ static void init_startup_info( KStartupInfoId& id, const char* bin, if( X11_startup_notify_display == NULL ) return; X11_startup_notify_fd = XConnectionNumber( X11_startup_notify_display ); - KStartupInfoData data; + TDEStartupInfoData data; int desktop = get_current_desktop( X11_startup_notify_display ); data.setDesktop( desktop ); data.setBin( bin ); - KStartupInfo::sendChangeX( X11_startup_notify_display, id, data ); + TDEStartupInfo::sendChangeX( X11_startup_notify_display, id, data ); XFlush( X11_startup_notify_display ); } -static void complete_startup_info( KStartupInfoId& id, pid_t pid ) +static void complete_startup_info( TDEStartupInfoId& id, pid_t pid ) { if( X11_startup_notify_display == NULL ) return; if( pid == 0 ) // failure - KStartupInfo::sendFinishX( X11_startup_notify_display, id ); + TDEStartupInfo::sendFinishX( X11_startup_notify_display, id ); else { - KStartupInfoData data; + TDEStartupInfoData data; data.addPid( pid ); data.setHostname(); - KStartupInfo::sendChangeX( X11_startup_notify_display, id, data ); + TDEStartupInfo::sendChangeX( X11_startup_notify_display, id, data ); } XCloseDisplay( X11_startup_notify_display ); X11_startup_notify_display = NULL; @@ -482,7 +482,7 @@ static pid_t launch(int argc, const char *_name, const char *args, #if defined Q_WS_X11 && ! defined K_WS_QTONLY //#ifdef Q_WS_X11 - KStartupInfoId startup_id; + TDEStartupInfoId startup_id; startup_id.initId( startup_id_str ); if( !startup_id.none()) init_startup_info( startup_id, name, envc, envs ); @@ -551,7 +551,7 @@ static pid_t launch(int argc, const char *_name, const char *args, #if defined Q_WS_X11 && ! defined K_WS_QTONLY //#ifdef Q_WS_X11 if( startup_id.none()) - KStartupInfo::resetStartupEnv(); + TDEStartupInfo::resetStartupEnv(); else startup_id.setupStartupEnv(); #endif diff --git a/kinit/tdelauncher.cpp b/kinit/tdelauncher.cpp index 8bc0232c6..45dbd863b 100644 --- a/kinit/tdelauncher.cpp +++ b/kinit/tdelauncher.cpp @@ -758,9 +758,9 @@ KLauncher::requestDone(KLaunchRequest *request) dpy = XOpenDisplay( request->startup_dpy ); if( dpy ) { - KStartupInfoId id; + TDEStartupInfoId id; id.initId( request->startup_id ); - KStartupInfo::sendFinishX( dpy, id ); + TDEStartupInfo::sendFinishX( dpy, id ); if( mCached_dpy != dpy && mCached_dpy != NULL ) XCloseDisplay( mCached_dpy ); mCached_dpy = dpy; @@ -1051,7 +1051,7 @@ KLauncher::send_service_startup_info( KLaunchRequest *request, KService::Ptr ser const TQValueList<TQCString> &envs ) { #if defined Q_WS_X11 && ! defined K_WS_QTONLY -//#ifdef Q_WS_X11 // KStartup* isn't implemented for Qt/Embedded yet +//#ifdef Q_WS_X11 // TDEStartup* isn't implemented for Qt/Embedded yet request->startup_id = "0"; if( startup_id == "0" ) return; @@ -1059,7 +1059,7 @@ KLauncher::send_service_startup_info( KLaunchRequest *request, KService::Ptr ser TQCString wmclass; if( !KRun::checkStartupNotify( TQString::null, service, &silent, &wmclass )) return; - KStartupInfoId id; + TDEStartupInfoId id; id.initId( startup_id ); const char* dpy_str = NULL; for( TQValueList<TQCString>::ConstIterator it = envs.begin(); @@ -1082,16 +1082,16 @@ KLauncher::send_service_startup_info( KLaunchRequest *request, KService::Ptr ser request->startup_dpy = dpy_str; - KStartupInfoData data; + TDEStartupInfoData data; data.setName( service->name()); data.setIcon( service->icon()); data.setDescription( i18n( "Launching %1" ).arg( service->name())); if( !wmclass.isEmpty()) data.setWMClass( wmclass ); if( silent ) - data.setSilent( KStartupInfoData::Yes ); + data.setSilent( TDEStartupInfoData::Yes ); // the rest will be sent by tdeinit - KStartupInfo::sendStartupX( dpy, id, data ); + TDEStartupInfo::sendStartupX( dpy, id, data ); if( mCached_dpy != dpy && mCached_dpy != NULL ) XCloseDisplay( mCached_dpy ); mCached_dpy = dpy; @@ -1106,7 +1106,7 @@ KLauncher::cancel_service_startup_info( KLaunchRequest* request, const TQCString const TQValueList<TQCString> &envs ) { #if defined Q_WS_X11 && ! defined K_WS_QTONLY -//#ifdef Q_WS_X11 // KStartup* isn't implemented for Qt/Embedded yet +//#ifdef Q_WS_X11 // TDEStartup* isn't implemented for Qt/Embedded yet if( request != NULL ) request->startup_id = "0"; if( !startup_id.isEmpty() && startup_id != "0" ) @@ -1125,9 +1125,9 @@ KLauncher::cancel_service_startup_info( KLaunchRequest* request, const TQCString dpy = XOpenDisplay( dpy_str ); if( dpy == NULL ) return; - KStartupInfoId id; + TDEStartupInfoId id; id.initId( startup_id ); - KStartupInfo::sendFinishX( dpy, id ); + TDEStartupInfo::sendFinishX( dpy, id ); if( mCached_dpy != dpy && mCached_dpy != NULL ) XCloseDisplay( mCached_dpy ); mCached_dpy = dpy; |