CVS commit by nanulo: suspend DCOP client when handling a DCOP call M +40 -2 main.cpp 1.79 --- kdesdk/kbabel/kbabel/main.cpp #1.78:1.79 @@ -107,4 +107,5 @@ int KBabelApp::newInstance() #endif { + kdDebug () << "Suspending DCOP" << endl; kapp->dcopClient()->suspend(); @@ -139,4 +140,7 @@ int KBabelApp::newInstance() kdDebug(KBABEL) << "gotomsgid" << endl; QString m = QString::fromLocal8Bit(msgid); + + kdDebug () << "Resuming DCOP" << endl; + kapp->dcopClient()->resume(); kbInterface->gotoFileEntry(args->url(0).url().utf8(),m.utf8()); } @@ -165,4 +169,7 @@ int KBabelApp::newInstance() widget->open( args->url(i) , QString::null, i != 0 ); } + + kdDebug () << "Resuming DCOP" << endl; + kapp->dcopClient()->resume(); } @@ -186,6 +193,4 @@ int KBabelApp::newInstance() */ } - - kapp->dcopClient()->resume(); } @@ -210,4 +215,8 @@ void KBabelInterface::openURL(QCString u KURL u(QString::fromLocal8Bit(url)); + + kdDebug () << "Suspending DCOP" << endl; + kapp->dcopClient()->suspend(); + KBabelMW *kb = KBabelMW::winForURL(u,project); if(kb) @@ -228,4 +237,8 @@ void KBabelInterface::openURL(QCString u KWin::activateWindow(kb->topLevelWidget()->winId()); kb->open(u, QString::fromUtf8(package),newWindow); + + kdDebug () << "Resuming DCOP" << endl; + kapp->dcopClient()->resume(); + return ; } @@ -242,4 +255,8 @@ void KBabelInterface::openURL(QCString u kb->projectOpen(projectFile); kb->open(u,QString::fromUtf8(package),false); + + kdDebug () << "Resuming DCOP" << endl; + kapp->dcopClient()->resume(); + return; } @@ -254,4 +271,8 @@ void KBabelInterface::openURL(QCString u KWin::activateWindow(kb->topLevelWidget()->winId()); kb->open(u, QString::fromUtf8(package),newWindow); + + kdDebug () << "Resuming DCOP" << endl; + kapp->dcopClient()->resume(); + return ; } @@ -267,4 +288,7 @@ void KBabelInterface::openURL(QCString u kb->open(u,QString::fromUtf8(package),newWindow); } + + kdDebug () << "Resuming DCOP" << endl; + kapp->dcopClient()->resume(); } @@ -280,4 +304,8 @@ void KBabelInterface::openTemplate(QCStr KURL u(saveFilename.data()); KURL t(openFilename.data()); + + kdDebug () << "Suspending DCOP" << endl; + kapp->dcopClient()->suspend(); + KBabelMW *kb = KBabelMW::winForURL(u, project); if(kb) @@ -306,4 +334,7 @@ void KBabelInterface::openTemplate(QCStr } } + + kdDebug () << "Resuming DCOP" << endl; + kapp->dcopClient()->resume(); } @@ -415,4 +446,7 @@ void KBabelInterface::spellcheck(QString KBabelMW* KBabelInterface::findInstance( QCString url, QCString project, QCString package) { + kdDebug () << "Suspending DCOP" << endl; + kapp->dcopClient()->suspend(); + KURL u ( url ); KBabelMW *kb = 0; @@ -442,4 +476,8 @@ KBabelMW* KBabelInterface::findInstance( if( !url.isEmpty() ) kb->open(u,QString::fromUtf8(package),false); } + + kdDebug () << "Resuming DCOP" << endl; + kapp->dcopClient()->resume(); + return kb; }