|
|
@ -623,7 +623,7 @@ TQCString DocumentationPart::startAssistant()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
static TQCString lastAssistant = "";
|
|
|
|
static TQCString lastAssistant = "";
|
|
|
|
|
|
|
|
|
|
|
|
if (!lastAssistant.isEmpty() && KApplication::dcopClient()->isApplicationRegistered(lastAssistant))
|
|
|
|
if (!lastAssistant.isEmpty() && TDEApplication::dcopClient()->isApplicationRegistered(lastAssistant))
|
|
|
|
return lastAssistant;
|
|
|
|
return lastAssistant;
|
|
|
|
|
|
|
|
|
|
|
|
const char *function = 0;
|
|
|
|
const char *function = 0;
|
|
|
@ -636,7 +636,7 @@ TQCString DocumentationPart::startAssistant()
|
|
|
|
TQDataStream arg(data, IO_WriteOnly);
|
|
|
|
TQDataStream arg(data, IO_WriteOnly);
|
|
|
|
arg << app << URLs;
|
|
|
|
arg << app << URLs;
|
|
|
|
|
|
|
|
|
|
|
|
if (!KApplication::dcopClient()->call("klauncher", "klauncher", function, data, replyType, replyData))
|
|
|
|
if (!TDEApplication::dcopClient()->call("klauncher", "klauncher", function, data, replyType, replyData))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
kdDebug() << "call failed" << endl;
|
|
|
|
kdDebug() << "call failed" << endl;
|
|
|
|
lastAssistant = "";
|
|
|
|
lastAssistant = "";
|
|
|
@ -665,7 +665,7 @@ TQCString DocumentationPart::startAssistant()
|
|
|
|
kdDebug() << dcopName.data() << endl;
|
|
|
|
kdDebug() << dcopName.data() << endl;
|
|
|
|
|
|
|
|
|
|
|
|
//@fixme: is there another way to wait for the remote object to be loaded
|
|
|
|
//@fixme: is there another way to wait for the remote object to be loaded
|
|
|
|
while (!KApplication::dcopClient()->remoteObjects(dcopName).contains("KDevDocumentation"))
|
|
|
|
while (!TDEApplication::dcopClient()->remoteObjects(dcopName).contains("KDevDocumentation"))
|
|
|
|
usleep(500);
|
|
|
|
usleep(500);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -697,7 +697,7 @@ void DocumentationPart::activateAssistantWindow(const TQCString &ref)
|
|
|
|
kdDebug() << "DocumentationPart::activateAssistantWindow" << endl;
|
|
|
|
kdDebug() << "DocumentationPart::activateAssistantWindow" << endl;
|
|
|
|
TQByteArray data, replyData;
|
|
|
|
TQByteArray data, replyData;
|
|
|
|
TQCString replyType;
|
|
|
|
TQCString replyType;
|
|
|
|
if (KApplication::dcopClient()->call(ref, "MainWindow", "getWinID()", data, replyType, replyData))
|
|
|
|
if (TDEApplication::dcopClient()->call(ref, "MainWindow", "getWinID()", data, replyType, replyData))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
kdDebug() << " call successful " << endl;
|
|
|
|
kdDebug() << " call successful " << endl;
|
|
|
|
TQDataStream reply(replyData, IO_ReadOnly);
|
|
|
|
TQDataStream reply(replyData, IO_ReadOnly);
|
|
|
@ -707,7 +707,7 @@ void DocumentationPart::activateAssistantWindow(const TQCString &ref)
|
|
|
|
kdDebug() << "Win ID: " << winId << endl;
|
|
|
|
kdDebug() << "Win ID: " << winId << endl;
|
|
|
|
KWin::forceActiveWindow(winId);
|
|
|
|
KWin::forceActiveWindow(winId);
|
|
|
|
|
|
|
|
|
|
|
|
KApplication::dcopClient()->send(ref, "MainWindow", "show()", TQByteArray());
|
|
|
|
TDEApplication::dcopClient()->send(ref, "MainWindow", "show()", TQByteArray());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -715,7 +715,7 @@ void DocumentationPart::callAssistant(const TQCString &interface, const TQCStrin
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQCString ref = startAssistant();
|
|
|
|
TQCString ref = startAssistant();
|
|
|
|
TQByteArray data;
|
|
|
|
TQByteArray data;
|
|
|
|
if (KApplication::dcopClient()->send(ref, interface, method, data))
|
|
|
|
if (TDEApplication::dcopClient()->send(ref, interface, method, data))
|
|
|
|
activateAssistantWindow(ref);
|
|
|
|
activateAssistantWindow(ref);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
kdDebug() << "problem communicating with: " << ref;
|
|
|
|
kdDebug() << "problem communicating with: " << ref;
|
|
|
@ -727,7 +727,7 @@ void DocumentationPart::callAssistant(const TQCString &interface, const TQCStrin
|
|
|
|
TQByteArray data;
|
|
|
|
TQByteArray data;
|
|
|
|
TQDataStream arg(data, IO_WriteOnly);
|
|
|
|
TQDataStream arg(data, IO_WriteOnly);
|
|
|
|
arg << dataStr;
|
|
|
|
arg << dataStr;
|
|
|
|
if (KApplication::dcopClient()->send(ref, interface, method, data))
|
|
|
|
if (TDEApplication::dcopClient()->send(ref, interface, method, data))
|
|
|
|
activateAssistantWindow(ref);
|
|
|
|
activateAssistantWindow(ref);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
kdDebug() << "problem communicating with: " << ref;
|
|
|
|
kdDebug() << "problem communicating with: " << ref;
|
|
|
|