|
|
@ -158,7 +158,7 @@ KStartupInfo::~KStartupInfo()
|
|
|
|
void KStartupInfo::got_message( const TQString& msg_P )
|
|
|
|
void KStartupInfo::got_message( const TQString& msg_P )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// TODO do something with SCREEN= ?
|
|
|
|
// TODO do something with SCREEN= ?
|
|
|
|
kdDebug( 172 ) << "got:" << msg_P << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] got:" << msg_P << endl;
|
|
|
|
TQString msg = msg_P.stripWhiteSpace();
|
|
|
|
TQString msg = msg_P.stripWhiteSpace();
|
|
|
|
if( msg.startsWith( "new:" )) // must match length below
|
|
|
|
if( msg.startsWith( "new:" )) // must match length below
|
|
|
|
got_startup_info( msg.mid( 4 ), false );
|
|
|
|
got_startup_info( msg.mid( 4 ), false );
|
|
|
@ -207,7 +207,7 @@ void KStartupInfo::window_added( WId w_P )
|
|
|
|
switch( ret )
|
|
|
|
switch( ret )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case Match:
|
|
|
|
case Match:
|
|
|
|
kdDebug( 172 ) << "new window match" << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] new window match" << endl;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case NoMatch:
|
|
|
|
case NoMatch:
|
|
|
|
break; // nothing
|
|
|
|
break; // nothing
|
|
|
@ -238,7 +238,7 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P,
|
|
|
|
{ // already reported, update
|
|
|
|
{ // already reported, update
|
|
|
|
d->startups[ id_P ].update( data_P );
|
|
|
|
d->startups[ id_P ].update( data_P );
|
|
|
|
d->startups[ id_P ].age = 0; // CHECKME
|
|
|
|
d->startups[ id_P ].age = 0; // CHECKME
|
|
|
|
kdDebug( 172 ) << "updating" << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] updating" << endl;
|
|
|
|
if( d->startups[ id_P ].silent() == Data::Yes
|
|
|
|
if( d->startups[ id_P ].silent() == Data::Yes
|
|
|
|
&& !( d->flags & AnnounceSilenceChanges ))
|
|
|
|
&& !( d->flags & AnnounceSilenceChanges ))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -254,7 +254,7 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P,
|
|
|
|
{ // already reported, update
|
|
|
|
{ // already reported, update
|
|
|
|
d->silent_startups[ id_P ].update( data_P );
|
|
|
|
d->silent_startups[ id_P ].update( data_P );
|
|
|
|
d->silent_startups[ id_P ].age = 0; // CHECKME
|
|
|
|
d->silent_startups[ id_P ].age = 0; // CHECKME
|
|
|
|
kdDebug( 172 ) << "updating silenced" << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] updating silenced" << endl;
|
|
|
|
if( d->silent_startups[ id_P ].silent() != Data::Yes )
|
|
|
|
if( d->silent_startups[ id_P ].silent() != Data::Yes )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
d->startups[ id_P ] = d->silent_startups[ id_P ];
|
|
|
|
d->startups[ id_P ] = d->silent_startups[ id_P ];
|
|
|
@ -268,7 +268,7 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P,
|
|
|
|
if( d->uninited_startups.contains( id_P ))
|
|
|
|
if( d->uninited_startups.contains( id_P ))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
d->uninited_startups[ id_P ].update( data_P );
|
|
|
|
d->uninited_startups[ id_P ].update( data_P );
|
|
|
|
kdDebug( 172 ) << "updating uninited" << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] updating uninited" << endl;
|
|
|
|
if( !update_P ) // uninited finally got new:
|
|
|
|
if( !update_P ) // uninited finally got new:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
d->startups[ id_P ] = d->uninited_startups[ id_P ];
|
|
|
|
d->startups[ id_P ] = d->uninited_startups[ id_P ];
|
|
|
@ -281,18 +281,18 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if( update_P ) // change: without any new: first
|
|
|
|
if( update_P ) // change: without any new: first
|
|
|
|
{
|
|
|
|
{
|
|
|
|
kdDebug( 172 ) << "adding uninited" << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] adding uninited" << endl;
|
|
|
|
d->uninited_startups.insert( id_P, data_P );
|
|
|
|
d->uninited_startups.insert( id_P, data_P );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if( data_P.silent() != Data::Yes || d->flags & AnnounceSilenceChanges )
|
|
|
|
else if( data_P.silent() != Data::Yes || d->flags & AnnounceSilenceChanges )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
kdDebug( 172 ) << "adding" << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] adding" << endl;
|
|
|
|
d->startups.insert( id_P, data_P );
|
|
|
|
d->startups.insert( id_P, data_P );
|
|
|
|
emit gotNewStartup( id_P, data_P );
|
|
|
|
emit gotNewStartup( id_P, data_P );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else // new silenced, and silent shouldn't be announced
|
|
|
|
else // new silenced, and silent shouldn't be announced
|
|
|
|
{
|
|
|
|
{
|
|
|
|
kdDebug( 172 ) << "adding silent" << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] adding silent" << endl;
|
|
|
|
d->silent_startups.insert( id_P, data_P );
|
|
|
|
d->silent_startups.insert( id_P, data_P );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
d->cleanup->start( 1000 ); // 1 sec
|
|
|
|
d->cleanup->start( 1000 ); // 1 sec
|
|
|
@ -319,18 +319,18 @@ void KStartupInfo::remove_startup_info_internal( const KStartupInfoId& id_P )
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
if( d->startups.contains( id_P ))
|
|
|
|
if( d->startups.contains( id_P ))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
kdDebug( 172 ) << "removing" << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] removing" << endl;
|
|
|
|
emit gotRemoveStartup( id_P, d->startups[ id_P ]);
|
|
|
|
emit gotRemoveStartup( id_P, d->startups[ id_P ]);
|
|
|
|
d->startups.remove( id_P );
|
|
|
|
d->startups.remove( id_P );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if( d->silent_startups.contains( id_P ))
|
|
|
|
else if( d->silent_startups.contains( id_P ))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
kdDebug( 172 ) << "removing silent" << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] removing silent" << endl;
|
|
|
|
d->silent_startups.remove( id_P );
|
|
|
|
d->silent_startups.remove( id_P );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if( d->uninited_startups.contains( id_P ))
|
|
|
|
else if( d->uninited_startups.contains( id_P ))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
kdDebug( 172 ) << "removing uninited" << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] removing uninited" << endl;
|
|
|
|
d->uninited_startups.remove( id_P );
|
|
|
|
d->uninited_startups.remove( id_P );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -384,7 +384,7 @@ bool KStartupInfo::sendStartup( const KStartupInfoId& id_P, const KStartupInfoDa
|
|
|
|
TQString msg = TQString::fromLatin1( "new: %1 %2" )
|
|
|
|
TQString msg = TQString::fromLatin1( "new: %1 %2" )
|
|
|
|
.arg( id_P.to_text()).arg( data_P.to_text());
|
|
|
|
.arg( id_P.to_text()).arg( data_P.to_text());
|
|
|
|
msg = check_required_startup_fields( msg, data_P, qt_xscreen());
|
|
|
|
msg = check_required_startup_fields( msg, data_P, qt_xscreen());
|
|
|
|
kdDebug( 172 ) << "sending " << msg << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] sending " << msg << endl;
|
|
|
|
msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false );
|
|
|
|
msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false );
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -398,7 +398,7 @@ bool KStartupInfo::sendStartupX( Display* disp_P, const KStartupInfoId& id_P,
|
|
|
|
.arg( id_P.to_text()).arg( data_P.to_text());
|
|
|
|
.arg( id_P.to_text()).arg( data_P.to_text());
|
|
|
|
msg = check_required_startup_fields( msg, data_P, DefaultScreen( disp_P ));
|
|
|
|
msg = check_required_startup_fields( msg, data_P, DefaultScreen( disp_P ));
|
|
|
|
#ifdef KSTARTUPINFO_ALL_DEBUG
|
|
|
|
#ifdef KSTARTUPINFO_ALL_DEBUG
|
|
|
|
kdDebug( 172 ) << "sending " << msg << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] sending " << msg << endl;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
return KXMessages::broadcastMessageX( disp_P, NET_STARTUP_MSG, msg, -1, false );
|
|
|
|
return KXMessages::broadcastMessageX( disp_P, NET_STARTUP_MSG, msg, -1, false );
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -409,7 +409,7 @@ TQString KStartupInfo::check_required_startup_fields( const TQString& msg, const
|
|
|
|
TQString ret = msg;
|
|
|
|
TQString ret = msg;
|
|
|
|
if( data_P.name().isEmpty())
|
|
|
|
if( data_P.name().isEmpty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// kdWarning( 172 ) << "NAME not specified in initial startup message" << endl;
|
|
|
|
// kdWarning( 172 ) << "[kdecore-kstartupinfo] NAME not specified in initial startup message" << endl;
|
|
|
|
TQString name = data_P.bin();
|
|
|
|
TQString name = data_P.bin();
|
|
|
|
if( name.isEmpty())
|
|
|
|
if( name.isEmpty())
|
|
|
|
name = "UNKNOWN";
|
|
|
|
name = "UNKNOWN";
|
|
|
@ -427,7 +427,7 @@ bool KStartupInfo::sendChange( const KStartupInfoId& id_P, const KStartupInfoDat
|
|
|
|
KXMessages msgs;
|
|
|
|
KXMessages msgs;
|
|
|
|
TQString msg = TQString::fromLatin1( "change: %1 %2" )
|
|
|
|
TQString msg = TQString::fromLatin1( "change: %1 %2" )
|
|
|
|
.arg( id_P.to_text()).arg( data_P.to_text());
|
|
|
|
.arg( id_P.to_text()).arg( data_P.to_text());
|
|
|
|
kdDebug( 172 ) << "sending " << msg << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] sending " << msg << endl;
|
|
|
|
msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false );
|
|
|
|
msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false );
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -440,7 +440,7 @@ bool KStartupInfo::sendChangeX( Display* disp_P, const KStartupInfoId& id_P,
|
|
|
|
TQString msg = TQString::fromLatin1( "change: %1 %2" )
|
|
|
|
TQString msg = TQString::fromLatin1( "change: %1 %2" )
|
|
|
|
.arg( id_P.to_text()).arg( data_P.to_text());
|
|
|
|
.arg( id_P.to_text()).arg( data_P.to_text());
|
|
|
|
#ifdef KSTARTUPINFO_ALL_DEBUG
|
|
|
|
#ifdef KSTARTUPINFO_ALL_DEBUG
|
|
|
|
kdDebug( 172 ) << "sending " << msg << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] sending " << msg << endl;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
return KXMessages::broadcastMessageX( disp_P, NET_STARTUP_MSG, msg, -1, false );
|
|
|
|
return KXMessages::broadcastMessageX( disp_P, NET_STARTUP_MSG, msg, -1, false );
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -451,7 +451,7 @@ bool KStartupInfo::sendFinish( const KStartupInfoId& id_P )
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
KXMessages msgs;
|
|
|
|
KXMessages msgs;
|
|
|
|
TQString msg = TQString::fromLatin1( "remove: %1" ).arg( id_P.to_text());
|
|
|
|
TQString msg = TQString::fromLatin1( "remove: %1" ).arg( id_P.to_text());
|
|
|
|
kdDebug( 172 ) << "sending " << msg << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] sending " << msg << endl;
|
|
|
|
msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false );
|
|
|
|
msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false );
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -462,7 +462,7 @@ bool KStartupInfo::sendFinishX( Display* disp_P, const KStartupInfoId& id_P )
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
TQString msg = TQString::fromLatin1( "remove: %1" ).arg( id_P.to_text());
|
|
|
|
TQString msg = TQString::fromLatin1( "remove: %1" ).arg( id_P.to_text());
|
|
|
|
#ifdef KSTARTUPINFO_ALL_DEBUG
|
|
|
|
#ifdef KSTARTUPINFO_ALL_DEBUG
|
|
|
|
kdDebug( 172 ) << "sending " << msg << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] sending " << msg << endl;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
return KXMessages::broadcastMessageX( disp_P, NET_STARTUP_MSG, msg, -1, false );
|
|
|
|
return KXMessages::broadcastMessageX( disp_P, NET_STARTUP_MSG, msg, -1, false );
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -474,7 +474,7 @@ bool KStartupInfo::sendFinish( const KStartupInfoId& id_P, const KStartupInfoDat
|
|
|
|
KXMessages msgs;
|
|
|
|
KXMessages msgs;
|
|
|
|
TQString msg = TQString::fromLatin1( "remove: %1 %2" )
|
|
|
|
TQString msg = TQString::fromLatin1( "remove: %1 %2" )
|
|
|
|
.arg( id_P.to_text()).arg( data_P.to_text());
|
|
|
|
.arg( id_P.to_text()).arg( data_P.to_text());
|
|
|
|
kdDebug( 172 ) << "sending " << msg << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] sending " << msg << endl;
|
|
|
|
msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false );
|
|
|
|
msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false );
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -487,7 +487,7 @@ bool KStartupInfo::sendFinishX( Display* disp_P, const KStartupInfoId& id_P,
|
|
|
|
TQString msg = TQString::fromLatin1( "remove: %1 %2" )
|
|
|
|
TQString msg = TQString::fromLatin1( "remove: %1 %2" )
|
|
|
|
.arg( id_P.to_text()).arg( data_P.to_text());
|
|
|
|
.arg( id_P.to_text()).arg( data_P.to_text());
|
|
|
|
#ifdef KSTARTUPINFO_ALL_DEBUG
|
|
|
|
#ifdef KSTARTUPINFO_ALL_DEBUG
|
|
|
|
kdDebug( 172 ) << "sending " << msg << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] sending " << msg << endl;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
return KXMessages::broadcastMessageX( disp_P, NET_STARTUP_MSG, msg, -1, false );
|
|
|
|
return KXMessages::broadcastMessageX( disp_P, NET_STARTUP_MSG, msg, -1, false );
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -606,13 +606,13 @@ KStartupInfo::startup_t KStartupInfo::check_startup_internal( WId w_P, KStartupI
|
|
|
|
// - No - Is this a NET_WM compliant app ?
|
|
|
|
// - No - Is this a NET_WM compliant app ?
|
|
|
|
// - Yes - test for pid match
|
|
|
|
// - Yes - test for pid match
|
|
|
|
// - No - test for WM_CLASS match
|
|
|
|
// - No - test for WM_CLASS match
|
|
|
|
kdDebug( 172 ) << "check_startup" << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] check_startup" << endl;
|
|
|
|
TQCString id = windowStartupId( w_P );
|
|
|
|
TQCString id = windowStartupId( w_P );
|
|
|
|
if( !id.isNull())
|
|
|
|
if( !id.isNull())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if( id.isEmpty() || id == "0" ) // means ignore this window
|
|
|
|
if( id.isEmpty() || id == "0" ) // means ignore this window
|
|
|
|
{
|
|
|
|
{
|
|
|
|
kdDebug( 172 ) << "ignore" << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] ignore" << endl;
|
|
|
|
return NoMatch;
|
|
|
|
return NoMatch;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return find_id( id, id_O, data_O ) ? Match : NoMatch;
|
|
|
|
return find_id( id, id_O, data_O ) ? Match : NoMatch;
|
|
|
@ -657,7 +657,7 @@ KStartupInfo::startup_t KStartupInfo::check_startup_internal( WId w_P, KStartupI
|
|
|
|
&& transient_for != None )
|
|
|
|
&& transient_for != None )
|
|
|
|
return NoMatch;
|
|
|
|
return NoMatch;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
kdDebug( 172 ) << "check_startup:cantdetect" << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] check_startup:cantdetect" << endl;
|
|
|
|
return CantDetect;
|
|
|
|
return CantDetect;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -666,7 +666,7 @@ bool KStartupInfo::find_id( const TQCString& id_P, KStartupInfoId* id_O,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if( d == NULL )
|
|
|
|
if( d == NULL )
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
kdDebug( 172 ) << "find_id:" << id_P << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] find_id:" << id_P << endl;
|
|
|
|
KStartupInfoId id;
|
|
|
|
KStartupInfoId id;
|
|
|
|
id.initId( id_P );
|
|
|
|
id.initId( id_P );
|
|
|
|
if( d->startups.contains( id ))
|
|
|
|
if( d->startups.contains( id ))
|
|
|
@ -675,7 +675,7 @@ bool KStartupInfo::find_id( const TQCString& id_P, KStartupInfoId* id_O,
|
|
|
|
*id_O = id;
|
|
|
|
*id_O = id;
|
|
|
|
if( data_O != NULL )
|
|
|
|
if( data_O != NULL )
|
|
|
|
*data_O = d->startups[ id ];
|
|
|
|
*data_O = d->startups[ id ];
|
|
|
|
kdDebug( 172 ) << "check_startup_id:match" << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] check_startup_id:match" << endl;
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
@ -686,7 +686,7 @@ bool KStartupInfo::find_pid( pid_t pid_P, const TQCString& hostname_P,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if( d == NULL )
|
|
|
|
if( d == NULL )
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
kdDebug( 172 ) << "find_pid:" << pid_P << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] find_pid:" << pid_P << endl;
|
|
|
|
for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
|
|
|
|
for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
|
|
|
|
it != d->startups.end();
|
|
|
|
it != d->startups.end();
|
|
|
|
++it )
|
|
|
|
++it )
|
|
|
@ -699,7 +699,7 @@ bool KStartupInfo::find_pid( pid_t pid_P, const TQCString& hostname_P,
|
|
|
|
*data_O = *it;
|
|
|
|
*data_O = *it;
|
|
|
|
// non-compliant, remove on first match
|
|
|
|
// non-compliant, remove on first match
|
|
|
|
remove_startup_info_internal( it.key());
|
|
|
|
remove_startup_info_internal( it.key());
|
|
|
|
kdDebug( 172 ) << "check_startup_pid:match" << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] check_startup_pid:match" << endl;
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -713,7 +713,7 @@ bool KStartupInfo::find_wclass( TQCString res_name, TQCString res_class,
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
res_name = res_name.lower();
|
|
|
|
res_name = res_name.lower();
|
|
|
|
res_class = res_class.lower();
|
|
|
|
res_class = res_class.lower();
|
|
|
|
kdDebug( 172 ) << "find_wclass:" << res_name << ":" << res_class << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] find_wclass:" << res_name << ":" << res_class << endl;
|
|
|
|
for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
|
|
|
|
for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
|
|
|
|
it != d->startups.end();
|
|
|
|
it != d->startups.end();
|
|
|
|
++it )
|
|
|
|
++it )
|
|
|
@ -727,7 +727,7 @@ bool KStartupInfo::find_wclass( TQCString res_name, TQCString res_class,
|
|
|
|
*data_O = *it;
|
|
|
|
*data_O = *it;
|
|
|
|
// non-compliant, remove on first match
|
|
|
|
// non-compliant, remove on first match
|
|
|
|
remove_startup_info_internal( it.key());
|
|
|
|
remove_startup_info_internal( it.key());
|
|
|
|
kdDebug( 172 ) << "check_startup_wclass:match" << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] check_startup_wclass:match" << endl;
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -858,7 +858,7 @@ void KStartupInfo::startups_cleanup_internal( bool age_P )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const KStartupInfoId& key = it.key();
|
|
|
|
const KStartupInfoId& key = it.key();
|
|
|
|
++it;
|
|
|
|
++it;
|
|
|
|
kdDebug( 172 ) << "startups entry timeout:" << key.id() << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] startups entry timeout:" << key.id() << endl;
|
|
|
|
remove_startup_info_internal( key );
|
|
|
|
remove_startup_info_internal( key );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -877,7 +877,7 @@ void KStartupInfo::startups_cleanup_internal( bool age_P )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const KStartupInfoId& key = it.key();
|
|
|
|
const KStartupInfoId& key = it.key();
|
|
|
|
++it;
|
|
|
|
++it;
|
|
|
|
kdDebug( 172 ) << "silent entry timeout:" << key.id() << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] silent entry timeout:" << key.id() << endl;
|
|
|
|
remove_startup_info_internal( key );
|
|
|
|
remove_startup_info_internal( key );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -896,7 +896,7 @@ void KStartupInfo::startups_cleanup_internal( bool age_P )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const KStartupInfoId& key = it.key();
|
|
|
|
const KStartupInfoId& key = it.key();
|
|
|
|
++it;
|
|
|
|
++it;
|
|
|
|
kdDebug( 172 ) << "uninited entry timeout:" << key.id() << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] uninited entry timeout:" << key.id() << endl;
|
|
|
|
remove_startup_info_internal( key );
|
|
|
|
remove_startup_info_internal( key );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -919,7 +919,7 @@ void KStartupInfo::clean_all_noncompliant()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const KStartupInfoId& key = it.key();
|
|
|
|
const KStartupInfoId& key = it.key();
|
|
|
|
++it;
|
|
|
|
++it;
|
|
|
|
kdDebug( 172 ) << "entry cleaning:" << key.id() << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] entry cleaning:" << key.id() << endl;
|
|
|
|
remove_startup_info_internal( key );
|
|
|
|
remove_startup_info_internal( key );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -936,7 +936,7 @@ TQCString KStartupInfo::createNewStartupId()
|
|
|
|
hostname[sizeof(hostname)-1] = '\0';
|
|
|
|
hostname[sizeof(hostname)-1] = '\0';
|
|
|
|
TQCString id = TQString(TQString( "%1;%2;%3;%4_TIME%5" ).arg( hostname ).arg( tm.tv_sec )
|
|
|
|
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_QT_X_USER_TIME() )).utf8();
|
|
|
|
kdDebug( 172 ) << "creating: " << id << ":" << tqAppName() << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] creating: " << id << ":" << tqAppName() << endl;
|
|
|
|
return id;
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -978,7 +978,7 @@ void KStartupInfoId::initId( const TQCString& id_P )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
d->id = id_P;
|
|
|
|
d->id = id_P;
|
|
|
|
#ifdef KSTARTUPINFO_ALL_DEBUG
|
|
|
|
#ifdef KSTARTUPINFO_ALL_DEBUG
|
|
|
|
kdDebug( 172 ) << "using: " << d->id << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] using: " << d->id << endl;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -987,7 +987,7 @@ void KStartupInfoId::initId( const TQCString& id_P )
|
|
|
|
{ // already has id
|
|
|
|
{ // already has id
|
|
|
|
d->id = startup_env;
|
|
|
|
d->id = startup_env;
|
|
|
|
#ifdef KSTARTUPINFO_ALL_DEBUG
|
|
|
|
#ifdef KSTARTUPINFO_ALL_DEBUG
|
|
|
|
kdDebug( 172 ) << "reusing: " << d->id << endl;
|
|
|
|
kdDebug( 172 ) << "[kdecore-kstartupinfo] reusing: " << d->id << endl;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|