diff options
Diffstat (limited to 'tdecore/tdestartupinfo.cpp')
| -rw-r--r-- | tdecore/tdestartupinfo.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/tdecore/tdestartupinfo.cpp b/tdecore/tdestartupinfo.cpp index 77b979edb..e34964c25 100644 --- a/tdecore/tdestartupinfo.cpp +++ b/tdecore/tdestartupinfo.cpp @@ -33,8 +33,8 @@ DEALINGS IN THE SOFTWARE. #include <tqwidget.h> #include "config.h" -#ifdef Q_WS_X11 -//#ifdef Q_WS_X11 // FIXME(E): Re-implement in a less X11 specific way +#ifdef TQ_WS_X11 +//#ifdef TQ_WS_X11 // FIXME(E): Re-implement in a less X11 specific way #include <tqglobal.h> #ifdef HAVE_CONFIG_H #include <config.h> @@ -46,13 +46,13 @@ DEALINGS IN THE SOFTWARE. #include <sys/time.h> #include <stdlib.h> #include <tqtimer.h> -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <netwm.h> #endif #include <kdebug.h> #include <tdeapplication.h> #include <signal.h> -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <twinmodule.h> #include <kxmessages.h> #include <twin.h> @@ -93,7 +93,7 @@ struct TDEStartupInfoPrivate TQMap< TDEStartupInfoId, TDEStartupInfo::Data > silent_startups; // contains ASN's that had change: but no new: yet TQMap< TDEStartupInfoId, TDEStartupInfo::Data > uninited_startups; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 KWinModule* wm_module; KXMessages msgs; #endif @@ -101,7 +101,7 @@ struct TDEStartupInfoPrivate int flags; TDEStartupInfoPrivate( int flags_P ) : -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 msgs( NET_STARTUP_MSG, NULL, false ), #endif flags( flags_P ) {} @@ -124,25 +124,25 @@ TDEStartupInfo::TDEStartupInfo( bool clean_on_cantdetect_P, TQObject* parent_P, void TDEStartupInfo::init( int flags_P ) { // d == NULL means "disabled" - if( !TDEApplication::kApplication()) + if( !tdeApp) return; - if( !TDEApplication::kApplication()->getDisplay()) + if( !tdeApp->getDisplay()) return; d = new TDEStartupInfoPrivate( flags_P ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( !( d->flags & DisableKWinModule )) { d->wm_module = new KWinModule( this ); - connect( d->wm_module, TQT_SIGNAL( windowAdded( WId )), TQT_SLOT( slot_window_added( WId ))); - connect( d->wm_module, TQT_SIGNAL( systemTrayWindowAdded( WId )), TQT_SLOT( slot_window_added( WId ))); + connect( d->wm_module, TQ_SIGNAL( windowAdded( WId )), TQ_SLOT( slot_window_added( WId ))); + connect( d->wm_module, TQ_SIGNAL( systemTrayWindowAdded( WId )), TQ_SLOT( slot_window_added( WId ))); } else d->wm_module = NULL; - connect( &d->msgs, TQT_SIGNAL( gotMessage( const TQString& )), TQT_SLOT( got_message( const TQString& ))); + connect( &d->msgs, TQ_SIGNAL( gotMessage( const TQString& )), TQ_SLOT( got_message( const TQString& ))); #endif d->cleanup = new TQTimer( this, "cleanup" ); - connect( d->cleanup, TQT_SIGNAL( timeout()), TQT_SLOT( startups_cleanup())); + connect( d->cleanup, TQ_SIGNAL( timeout()), TQ_SLOT( startups_cleanup())); } TDEStartupInfo::~TDEStartupInfo() @@ -183,7 +183,7 @@ class DelayedWindowEvent void TDEStartupInfo::slot_window_added( WId w_P ) { - kapp->postEvent( this, new DelayedWindowEvent( w_P )); + tdeApp->postEvent( this, new DelayedWindowEvent( w_P )); } void TDEStartupInfo::customEvent( TQCustomEvent* e_P ) @@ -489,8 +489,8 @@ bool TDEStartupInfo::sendFinishX( Display* disp_P, const TDEStartupInfoId& id_P, void TDEStartupInfo::appStarted() { - if( kapp != NULL ) // TDEApplication constructor unsets the env. variable - appStarted( kapp->startupId()); + if( tdeApp != NULL ) // TDEApplication constructor unsets the env. variable + appStarted( tdeApp->startupId()); else appStarted( TDEStartupInfo::currentStartupIdEnv().id()); } @@ -501,11 +501,11 @@ void TDEStartupInfo::appStarted( const TQCString& startup_id ) id.initId( startup_id ); if( id.none()) return; - if( kapp != NULL ) + if( tdeApp != NULL ) TDEStartupInfo::sendFinish( id ); else if( getenv( "DISPLAY" ) != NULL ) // don't rely on tqt_xdisplay() { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 Display* disp = XOpenDisplay( NULL ); if( disp != NULL ) { @@ -524,7 +524,7 @@ void TDEStartupInfo::disableAutoAppStartedSending( bool disable ) void TDEStartupInfo::silenceStartup( bool silence ) { TDEStartupInfoId id; - id.initId( kapp->startupId()); + id.initId( tdeApp->startupId()); if( id.none()) return; TDEStartupInfoData data; @@ -541,7 +541,7 @@ void TDEStartupInfo::handleAutoAppStartedSending() void TDEStartupInfo::setNewStartupId( TQWidget* window, const TQCString& startup_id ) { bool activate = true; - kapp->setStartupId( startup_id ); + tdeApp->setStartupId( startup_id ); if( window != NULL ) { if( !startup_id.isEmpty() && startup_id != "0" ) @@ -612,7 +612,7 @@ TDEStartupInfo::startup_t TDEStartupInfo::check_startup_internal( WId w_P, TDESt } return find_id( id, id_O, data_O ) ? Match : NoMatch; } -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 NETWinInfo info( tqt_xdisplay(), w_P, tqt_xrootwin(), NET::WMWindowType | NET::WMPid | NET::WMState ); pid_t pid = info.pid(); @@ -729,7 +729,7 @@ bool TDEStartupInfo::find_wclass( TQCString res_name, TQCString res_class, return false; } -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 static Atom net_startup_atom = None; static TQCString read_startup_id_property( WId w_P ) @@ -755,7 +755,7 @@ static TQCString read_startup_id_property( WId w_P ) TQCString TDEStartupInfo::windowStartupId( WId w_P ) { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( net_startup_atom == None ) net_startup_atom = XInternAtom( tqt_xdisplay(), NET_STARTUP_WINDOW, False ); if( utf8_string_atom == None ) @@ -777,7 +777,7 @@ TQCString TDEStartupInfo::windowStartupId( WId w_P ) void TDEStartupInfo::setWindowStartupId( WId w_P, const TQCString& id_P ) { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( id_P.isNull()) return; if( net_startup_atom == None ) @@ -791,7 +791,7 @@ void TDEStartupInfo::setWindowStartupId( WId w_P, const TQCString& id_P ) TQCString TDEStartupInfo::get_window_hostname( WId w_P ) { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 XTextProperty tp; char** hh; int cnt; @@ -815,7 +815,7 @@ void TDEStartupInfo::setTimeout( unsigned int secs_P ) { timeout = secs_P; // schedule removing entries that are older than the new timeout - TQTimer::singleShot( 0, this, TQT_SLOT( startups_cleanup_no_age())); + TQTimer::singleShot( 0, this, TQ_SLOT( startups_cleanup_no_age())); } void TDEStartupInfo::startups_cleanup_no_age() @@ -930,7 +930,7 @@ TQCString TDEStartupInfo::createNewStartupId() if (!gethostname( hostname, 255 )) hostname[sizeof(hostname)-1] = '\0'; TQCString id = TQString(TQString( "%1;%2;%3;%4_TIME%5" ).arg( hostname ).arg( tm.tv_sec ) - .arg( tm.tv_usec ).arg( getpid()).arg( GET_QT_X_USER_TIME() )).utf8(); + .arg( tm.tv_usec ).arg( getpid()).arg( get_tqt_x_user_time() )).utf8(); kdDebug( 172 ) << "[tdecore-tdestartupinfo] creating: " << id << ":" << tqAppName() << endl; return id; } @@ -1130,9 +1130,9 @@ TQString TDEStartupInfoData::to_text() const ret += TQString::fromLatin1( " DESKTOP=%1" ) .arg( d->desktop == NET::OnAllDesktops ? NET::OnAllDesktops : d->desktop - 1 ); // spec counts from 0 if( !d->wmclass.isEmpty()) - ret += TQString::fromLatin1( " WMCLASS=\"%1\"" ).arg( QString(d->wmclass) ); + ret += TQString::fromLatin1( " WMCLASS=\"%1\"" ).arg( TQString(d->wmclass) ); if( !d->hostname.isEmpty()) - ret += TQString::fromLatin1( " HOSTNAME=%1" ).arg( QString(d->hostname) ); + ret += TQString::fromLatin1( " HOSTNAME=%1" ).arg( TQString(d->hostname) ); for( TQValueList< pid_t >::ConstIterator it = d->pids.begin(); it != d->pids.end(); ++it ) @@ -1456,7 +1456,7 @@ static TQString get_str( const TQString& item_P ) { unsigned int pos = item_P.find( '=' ); - if( item_P.length() > pos + 2 && item_P[ pos + 1 ] == (QChar)'\"' ) + if( item_P.length() > pos + 2 && item_P[ pos + 1 ] == (TQChar)'\"' ) { int pos2 = item_P.left( pos + 2 ).find( '\"' ); if( pos2 < 0 ) @@ -1512,8 +1512,8 @@ static TQString escape_str( const TQString& str_P ) pos < str_P.length(); ++pos ) { - if( str_P[ pos ] == (QChar)'\\' - || str_P[ pos ] == (QChar)'"' ) + if( str_P[ pos ] == (TQChar)'\\' + || str_P[ pos ] == (TQChar)'"' ) ret += '\\'; ret += str_P[ pos ]; } |
