Use tdeApp

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/37/head
Michele Calgaro 1 month ago
parent f42f673707
commit d61d77a455
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -23,7 +23,7 @@
*********************************************************************** -->
<!ENTITY krusader 'Krusader'>
<!ENTITY kapp "&krusader;">
<!ENTITY tdeApp "&krusader;">
<!ENTITY kappname "&krusader;">
<!-- <!ENTITY % addindex "IGNORE"> -->
<!ENTITY % addindex "INCLUDE">

@ -23,7 +23,7 @@
*********************************************************************** -->
<!ENTITY krusader 'Krusader'>
<!ENTITY kapp "&krusader;">
<!ENTITY tdeApp "&krusader;">
<!ENTITY kappname "&krusader;">
<!-- <!ENTITY % addindex "IGNORE"
> -->

@ -123,10 +123,10 @@ SegmentTip::event( TQEvent *e )
switch( e->type() )
{
case TQEvent::Show:
kapp->installEventFilter( this );
tdeApp->installEventFilter( this );
break;
case TQEvent::Hide:
kapp->removeEventFilter( this );
tdeApp->removeEventFilter( this );
break;
case TQEvent::Paint:
{

@ -263,7 +263,7 @@ void KrPopupMenu::performAction(int id) {
KShred::shred( panel->func->files() ->vfs_getFile( item->name() ).path( -1 ) );
break;
case OPEN_KONQ_ID :
kapp->startServiceByDesktopName( "konqueror", panel->func->files() ->vfs_getFile( item->name() ).url() );
tdeApp->startServiceByDesktopName( "konqueror", panel->func->files() ->vfs_getFile( item->name() ).url() );
break;
case CHOOSE_ID : // open-with dialog
u = panel->func->files() ->vfs_getFile( item->name() );

@ -209,7 +209,7 @@ Krusader::Krusader() : KParts::MainWindow(0,0,WType_TopLevel|WDestructiveClose|T
// parse command line arguments
TDECmdLineArgs * args = TDECmdLineArgs::parsedArgs();
kapp->ref(); // FIX: krusader exits at closing the viewer when minimized to tray
tdeApp->ref(); // FIX: krusader exits at closing the viewer when minimized to tray
// create the "krusader"
App = this;
@ -433,7 +433,7 @@ bool Krusader::versionControl() {
#define FIRST_RUN "First Time"
bool retval = false;
// create config file
config = kapp->config();
config = tdeApp->config();
bool firstRun = config->readBoolEntry(FIRST_RUN, true);
#if 0
@ -934,14 +934,14 @@ bool Krusader::queryClose() {
if( isStarting || isExiting )
return false;
if( kapp->sessionSaving() ) // KDE is logging out, accept the close
if( tdeApp->sessionSaving() ) // KDE is logging out, accept the close
{
saveSettings();
kapp->dcopClient()->registerAs( TDEApplication::kApplication()->name(), true );
tdeApp->dcopClient()->registerAs( tdeApp->name(), true );
kapp->deref(); // FIX: krusader exits at closing the viewer when minimized to tray
kapp->deref(); // and close the application
tdeApp->deref(); // FIX: krusader exits at closing the viewer when minimized to tray
tdeApp->deref(); // and close the application
return isExiting = true; // this will also kill the pending jobs
}
@ -1017,10 +1017,10 @@ bool Krusader::queryClose() {
// Changes the name of the application. Single instance mode requires unique appid.
// As Krusader is exiting, we release that unique appid, so new Krusader instances
// can be started.
kapp->dcopClient()->registerAs( TDEApplication::kApplication()->name(), true );
tdeApp->dcopClient()->registerAs( tdeApp->name(), true );
kapp->deref(); // FIX: krusader exits at closing the viewer when minimized to tray
kapp->deref(); // and close the application
tdeApp->deref(); // FIX: krusader exits at closing the viewer when minimized to tray
tdeApp->deref(); // and close the application
return false; // don't let the main widget close. It stops the pendig copies!
} else
return false;
@ -1202,7 +1202,7 @@ TQString Krusader::getTempDir() {
chmod( tmpDir.local8Bit(), S_IRUSR | S_IWUSR | S_IXUSR );
// add a random sub dir to use
while ( TQDir().exists( tmpDir ) )
tmpDir = tmpDir + kapp->randomString( 8 );
tmpDir = tmpDir + tdeApp->randomString( 8 );
TQDir().mkdir( tmpDir );
if ( !TQDir( tmpDir ).isReadable() ) {
@ -1232,7 +1232,7 @@ TQString Krusader::getTempFile() {
chmod( tmpDir.local8Bit(), S_IRUSR | S_IWUSR | S_IXUSR );
while ( TQDir().exists( tmpDir ) )
tmpDir = tmpDir + kapp->randomString( 8 );
tmpDir = tmpDir + tdeApp->randomString( 8 );
return tmpDir;
}

@ -115,7 +115,7 @@ class Krusader : public KParts::MainWindow, public DCOPObject {
void resizeEvent ( TQResizeEvent * );
public:
static Krusader *App; // a kApp style pointer
static Krusader *App; // a tdeApp style pointer
KMountMan *mountMan; // krusader's Mount Manager
KrusaderView *mainView; // The GUI
TDEConfig *config; // allow everyone to access the config

@ -4,7 +4,7 @@
#include <tdeapplication.h>
#include "X11/Xlib.h"
// declare a dummy kapplication, just to get the X focusin focusout events
// declare a dummy tdeapplication, just to get the X focusin focusout events
class KrusaderApp: public TDEApplication {
TQ_OBJECT

@ -194,14 +194,14 @@ int main(int argc, char *argv[]) {
bool singleInstanceMode = app.config()->readBoolEntry( "Single Instance Mode", _SingleInstanceMode );
// register with the dcop server
DCOPClient* client = TDEApplication::kApplication() ->dcopClient();
DCOPClient* client = tdeApp ->dcopClient();
if ( !client->attach() )
exit( 0 );
TQCString regName = client->registerAs( TDEApplication::kApplication() ->name(), !singleInstanceMode );
if( singleInstanceMode && regName != TDEApplication::kApplication()->name() ) {
TQCString regName = client->registerAs( tdeApp ->name(), !singleInstanceMode );
if( singleInstanceMode && regName != tdeApp->name() ) {
fprintf( stderr, "%s", i18n( "Application already running!\n" ).ascii() );
DCOPClient::mainClient()->send( TDEApplication::kApplication() ->name(), "Krusader-Interface",
DCOPClient::mainClient()->send( tdeApp ->name(), "Krusader-Interface",
"moveToTop()", TQByteArray() );
TDEStartupInfo::appStarted();

@ -64,7 +64,7 @@ void PanelManager::slotChangePanel( ListPanel *p ) {
_other->otherPanel = _self;
_stack->raiseWidget( _self );
kapp->processEvents();
tdeApp->processEvents();
_self->slotFocusOnMe();
}

Loading…
Cancel
Save