Use tdeApp

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/57/head
Michele Calgaro 2 months ago
parent 2970364170
commit 8f0cf8a008
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -1698,7 +1698,7 @@ static TQCString* _qstring__version = 0;
}
JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Z(JNIEnv* env, jclass cls, jobjectArray args, jstring _appname, jstring programName, jstring _description, jstring _version, jboolean noKApp)
Java_org_trinitydesktop_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Z(JNIEnv* env, jclass cls, jobjectArray args, jstring _appname, jstring programName, jstring _description, jstring _version, jboolean noTDEApp)
{
(void) cls;
static TQCString* _qstring__appname = 0;
@ -1706,7 +1706,7 @@ static TQCString* _qstring_programName = 0;
static TQCString* _qstring__description = 0;
static TQCString* _qstring__version = 0;
int argc = (int) env->GetArrayLength(args);
TDECmdLineArgsJBridge::init(argc+1, (char**) QtSupport::toArgv(env, args), (const char*) QtSupport::toCharString(env, _appname, &_qstring__appname), (const char*) QtSupport::toCharString(env, programName, &_qstring_programName), (const char*) QtSupport::toCharString(env, _description, &_qstring__description), (const char*) QtSupport::toCharString(env, _version, &_qstring__version), (bool) noKApp);
TDECmdLineArgsJBridge::init(argc+1, (char**) QtSupport::toArgv(env, args), (const char*) QtSupport::toCharString(env, _appname, &_qstring__appname), (const char*) QtSupport::toCharString(env, programName, &_qstring_programName), (const char*) QtSupport::toCharString(env, _description, &_qstring__description), (const char*) QtSupport::toCharString(env, _version, &_qstring__version), (bool) noTDEApp);
return;
}
@ -1720,11 +1720,11 @@ Java_org_trinitydesktop_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Lorg_tri
}
JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Lorg_trinitydesktop_koala_TDEAboutData_2Z(JNIEnv* env, jclass cls, jobjectArray args, jobject about, jboolean noKApp)
Java_org_trinitydesktop_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Lorg_trinitydesktop_koala_TDEAboutData_2Z(JNIEnv* env, jclass cls, jobjectArray args, jobject about, jboolean noTDEApp)
{
(void) cls;
int argc = (int) env->GetArrayLength(args);
TDECmdLineArgsJBridge::init(argc+1, (char**) QtSupport::toArgv(env, args), (const TDEAboutData*) QtSupport::getQt(env, about), (bool) noKApp);
TDECmdLineArgsJBridge::init(argc+1, (char**) QtSupport::toArgv(env, args), (const TDEAboutData*) QtSupport::getQt(env, about), (bool) noTDEApp);
return;
}

@ -169,7 +169,7 @@ KJS::Value JSDCOPRef::call( KJS::ExecState *exec, KJS::Object &self, const KJS::
{
JSDCOPClient::marshall(convertToVariant(exec,args[idx] ), argTypes[idx - 1], data);
}
if( !kapp->dcopClient()->call(app.local8Bit(), interface.local8Bit(), function.local8Bit(), data, type, replyData))
if( !tdeApp->dcopClient()->call(app.local8Bit(), interface.local8Bit(), function.local8Bit(), data, type, replyData))
retValue = KJS::Boolean(false);
else
retValue = JSDCOPClient::demarshall(exec, type, ds);
@ -192,7 +192,7 @@ KJS::Value JSDCOPRef::call( KJS::ExecState *exec, KJS::Object &self, const KJS::
{
JSDCOPClient::marshall(convertToVariant(exec,args[idx] ), argTypes[idx - 1], data);
}
retValue = KJS::Boolean( kapp->dcopClient()->send(app.local8Bit(), interface.local8Bit(),
retValue = KJS::Boolean( tdeApp->dcopClient()->send(app.local8Bit(), interface.local8Bit(),
function.local8Bit(), data));
break;
}
@ -231,7 +231,7 @@ KJS::Value JSDCOPRef::call( KJS::ExecState *exec, KJS::Object &self, const KJS::
KJS::Object JSDCOPClientLoader::createBinding(KJSEmbedPart *jspart, KJS::ExecState *exec, const KJS::List &/*args*/) const
{
JSOpaqueProxy * prx = new JSOpaqueProxy( kapp->dcopClient(), "DCOPClient" );
JSOpaqueProxy * prx = new JSOpaqueProxy( tdeApp->dcopClient(), "DCOPClient" );
prx->setOwner( JSProxy::Native );
KJS::Object proxyObj( prx );
addBindings( jspart, exec, proxyObj );
@ -344,11 +344,11 @@ KJS::Value JSDCOPClient::call( KJS::ExecState *exec, KJS::Object &self, const KJ
break;
}
case MethodappId:
retValue = KJS::String( kapp->dcopClient()->appId().data() );
retValue = KJS::String( tdeApp->dcopClient()->appId().data() );
break;
case MethodisApplicationRegistered: {
TQString arg0 = extractTQString(exec, args, 0);
retValue = KJS::Boolean( kapp->dcopClient()->isApplicationRegistered( arg0.latin1() ) );
retValue = KJS::Boolean( tdeApp->dcopClient()->isApplicationRegistered( arg0.latin1() ) );
break;
}
case Methodsend:
@ -366,18 +366,18 @@ KJS::Value JSDCOPClient::call( KJS::ExecState *exec, KJS::Object &self, const KJ
bool JSDCOPClient::attach() const
{
if( !kapp->dcopClient()->isAttached() )
return kapp->dcopClient()->attach();
if( !tdeApp->dcopClient()->isAttached() )
return tdeApp->dcopClient()->attach();
return true;
}
bool JSDCOPClient::detach() const
{ return kapp->dcopClient()->detach();
{ return tdeApp->dcopClient()->detach();
}
bool JSDCOPClient::isAttached() const
{
return kapp->dcopClient()->isAttached();
return tdeApp->dcopClient()->isAttached();
}
KJS::Value JSDCOPClient::dcopCall( KJS::ExecState * exec, KJS::Object &, const KJS::List & args )
@ -401,7 +401,7 @@ KJS::Value JSDCOPClient::dcopCall( KJS::ExecState * exec, KJS::Object &, const K
TQVariant var = convertToVariant(exec,args[idx] );
marshall(var, argTypes[idx -3 ], data);
}
if( !kapp->dcopClient()->call(app.local8Bit(), interface.local8Bit(), function.local8Bit(), data, type, replyData))
if( !tdeApp->dcopClient()->call(app.local8Bit(), interface.local8Bit(), function.local8Bit(), data, type, replyData))
return KJS::Boolean(false);
else
return demarshall(exec, type, ds);
@ -424,7 +424,7 @@ KJS::Value JSDCOPClient::dcopSend( KJS::ExecState * exec, KJS::Object &, const K
TQVariant var = convertToVariant(exec,args[idx] );
marshall(var, argTypes[idx - 3], data);
}
return KJS::Boolean( kapp->dcopClient()->send(app.local8Bit(), interface.local8Bit(),
return KJS::Boolean( tdeApp->dcopClient()->send(app.local8Bit(), interface.local8Bit(),
function.local8Bit(), data));
}
@ -603,7 +603,7 @@ TQString JSDCOPClient::dcopStart( const TQString &appName, const TQStringList& a
TQDataStream arg(data, IO_WriteOnly);
arg << appName << args;
if ( !kapp->dcopClient()->call( "tdelauncher", "tdelauncher", startFunction.latin1(), data, replyType, replyData) )
if ( !tdeApp->dcopClient()->call( "tdelauncher", "tdelauncher", startFunction.latin1(), data, replyType, replyData) )
{
kdWarning() << "Error: Dcop call failed" << endl;
}
@ -641,7 +641,7 @@ TQString JSDCOPClient::dcopStart( const TQString &appName, const TQStringList& a
TQStringList JSDCOPClient::remoteFunctions( const TQString & remApp, const TQString & remObj )
{
TQStringList returnList;
QCStringList lst = kapp->dcopClient()->remoteFunctions(remApp.local8Bit(), remObj.local8Bit());
QCStringList lst = tdeApp->dcopClient()->remoteFunctions(remApp.local8Bit(), remObj.local8Bit());
for(uint idx = 0; idx < lst.count(); ++idx)
returnList += lst[idx];
return returnList;
@ -650,7 +650,7 @@ TQStringList JSDCOPClient::remoteFunctions( const TQString & remApp, const TQStr
TQStringList JSDCOPClient::remoteInterfaces( const TQString & remApp, const TQString & remObj )
{
TQStringList returnList;
QCStringList lst = kapp->dcopClient()->remoteInterfaces(remApp.local8Bit(), remObj.local8Bit());
QCStringList lst = tdeApp->dcopClient()->remoteInterfaces(remApp.local8Bit(), remObj.local8Bit());
for(uint idx = 0; idx < lst.count(); ++idx)
returnList += lst[idx];
return returnList;
@ -659,7 +659,7 @@ TQStringList JSDCOPClient::remoteInterfaces( const TQString & remApp, const TQSt
TQStringList JSDCOPClient::remoteObjects( const TQString & remApp )
{
TQStringList returnList;
QCStringList lst = kapp->dcopClient()->remoteObjects(remApp.local8Bit());
QCStringList lst = tdeApp->dcopClient()->remoteObjects(remApp.local8Bit());
for(uint idx = 0; idx < lst.count(); ++idx)
returnList += lst[idx];
return returnList;
@ -668,7 +668,7 @@ TQStringList JSDCOPClient::remoteObjects( const TQString & remApp )
TQStringList JSDCOPClient::registeredApplications( )
{
TQStringList returnList;
QCStringList lst = kapp->dcopClient()->registeredApplications( );
QCStringList lst = tdeApp->dcopClient()->registeredApplications( );
for(uint idx = 0; idx < lst.count(); ++idx)
returnList += lst[idx];
return returnList;
@ -676,12 +676,12 @@ TQStringList JSDCOPClient::registeredApplications( )
bool JSDCOPClient::connectDCOPSignal (const TQString &sender, const TQString &senderObj, const TQString &signal, const TQString &receiverObj, const TQString &slot, bool Volatile)
{
return kapp->dcopClient()->connectDCOPSignal(sender.latin1(), senderObj.latin1(), signal.latin1(), receiverObj.latin1(), slot.latin1(), Volatile);
return tdeApp->dcopClient()->connectDCOPSignal(sender.latin1(), senderObj.latin1(), signal.latin1(), receiverObj.latin1(), slot.latin1(), Volatile);
}
bool JSDCOPClient::disconnectDCOPSignal (const TQString &sender, const TQString &senderObj, const TQString &signal, const TQString &receiverObj, const TQString &slot)
{
return kapp->dcopClient()->disconnectDCOPSignal(sender.latin1(), senderObj.latin1(), signal.latin1(), receiverObj.latin1(), slot.latin1());
return tdeApp->dcopClient()->disconnectDCOPSignal(sender.latin1(), senderObj.latin1(), signal.latin1(), receiverObj.latin1(), slot.latin1());
}
KJS::Object JSDCOPInterfacerLoader::createBinding(KJSEmbedPart *jspart, KJS::ExecState *exec, const KJS::List &args) const

@ -38,7 +38,7 @@ Config::Config( TQObject *parent, const char *name)
#ifndef QT_ONLY
if( name == 0)
m_config = kapp->config();
m_config = tdeApp->config();
else
m_config = new TDEConfig(name);
if( !m_config->checkConfigFilesWritable(true) )
@ -67,7 +67,7 @@ Config::Config( TQObject *parent, const char *name , const TQString& confName)
Config::~Config()
{
#ifndef QT_ONLY
if( kapp->config() != m_config )
if( tdeApp->config() != m_config )
#endif
delete m_config;
}

@ -64,7 +64,7 @@ void JSConsolePlugin::init()
KJS::Object global( interp->globalObject() );
js->addObject( js->view(), global, "console" );
js->addObject( parent(), global, "plugin_parent" );
js->addObject( TDEApplication::kApplication(), global, "application" );
js->addObject( tdeApp, global, "application" );
if ( parent()->inherits("KParts::Part") ) {
KParts::Part *part = static_cast<KParts::Part *>( parent() );

@ -100,7 +100,7 @@ void JavaScript::setProgress( int percent )
TQString JavaScript::appID() const
{
return kapp->dcopClient()->appId();
return tdeApp->dcopClient()->appId();
}
void JavaScript::kill()

@ -19,7 +19,7 @@ class PageLaunch
page.show()
$kapp.processEvents()
$tdeApp.processEvents()
end
end

@ -113,7 +113,7 @@ class Page1 < TQt::Object
grp.show()
page.show()
$kapp.processEvents()
$tdeApp.processEvents()
y = y + 195
sqzLbl = TQt::Label.new("This text is too long to fit in the label below", page)

@ -19,7 +19,7 @@ class PageLaunch
page.show()
$kapp.processEvents()
$tdeApp.processEvents()
end
end

@ -489,7 +489,7 @@ module KDE
class Application
def initialize(*k)
super
$kapp = self
$tdeApp = self
end
# Delete the underlying C++ instance after exec returns
@ -970,7 +970,7 @@ module KDE
class UniqueApplication
def initialize(*k)
super
$kapp = self
$tdeApp = self
end
# Delete the underlying C++ instance after exec returns

@ -74,7 +74,7 @@ class MainWin < KDE::MainWindow
# system tray icon's menu
def slotQuitSelected()
@exitFlag = true
$kapp.quit()
$tdeApp.quit()
end
end

@ -56,7 +56,7 @@ class MainWin < KDE::MainWindow
def slotQuitSelected()
@exitFlag = true
$kapp.quit()
$tdeApp.quit()
end
end

@ -10,7 +10,7 @@ class MainWindow < KDE::MainWindow
filemenu = TQt::PopupMenu.new
filemenu.insertItem( i18n( "&Open" ), self, TQ_SLOT('fileOpen()') )
filemenu.insertItem( i18n( "&Save" ), self, TQ_SLOT('fileSave()') )
filemenu.insertItem( i18n( "&Quit" ), $kapp, TQ_SLOT('quit()') )
filemenu.insertItem( i18n( "&Quit" ), $tdeApp, TQ_SLOT('quit()') )
about =
i18n("p3 1.0\n\n" +

@ -9,7 +9,7 @@ class MainWindow < KDE::MainWindow
setCaption("KDE Tutorial - p4")
filemenu = TQt::PopupMenu.new
filemenu.insertItem( i18n( "&Quit" ), $kapp, TQ_SLOT( 'quit()' ) )
filemenu.insertItem( i18n( "&Quit" ), $tdeApp, TQ_SLOT( 'quit()' ) )
about =
i18n("p4 1.0\n\n" +
"(C) 1999-2002 Antonio Larrosa Jimenez\n" +

@ -10,7 +10,7 @@ class MainWindow < KDE::MainWindow
setCaption("KDE Tutorial - p5")
filemenu = TQt::PopupMenu.new
filemenu.insertItem( i18n( "&Quit" ), $kapp, TQ_SLOT( 'quit()' ) )
filemenu.insertItem( i18n( "&Quit" ), $tdeApp, TQ_SLOT( 'quit()' ) )
about =
i18n("p5 1.0\n\n" +
"(C) 1999-2002 Antonio Larrosa Jimenez\n" +

@ -21,7 +21,7 @@ class Browser < KDE::MainWindow
filemenu = TQt::PopupMenu.new
filemenu.insertItem( i18n( "&Set default page" ),
self, TQ_SLOT( 'fileSetDefaultPage()' ) )
filemenu.insertItem(i18n( "&Quit" ), $kapp, TQ_SLOT( 'quit()' ))
filemenu.insertItem(i18n( "&Quit" ), $tdeApp, TQ_SLOT( 'quit()' ))
about =
i18n("p7 1.0\n\n" +
"(C) 1999-2002 Antonio Larrosa Jimenez\n" +
@ -48,7 +48,7 @@ class Browser < KDE::MainWindow
TQ_SIGNAL('clicked(int)'),self,TQ_SLOT('gotoPreviousPage()'),
false, i18n("Back to previous page"))
toolbar.insertButton(icons.loadIcon("system-log-out", KDE::Icon::Toolbar), TOOLBAR_ID_QUIT,
TQ_SIGNAL('clicked(int)'),$kapp,TQ_SLOT('quit()'),true,
TQ_SIGNAL('clicked(int)'),$tdeApp,TQ_SLOT('quit()'),true,
i18n("Quit the application"))
addToolBar(toolbar)
@ -56,7 +56,7 @@ class Browser < KDE::MainWindow
@location = TQt::LineEdit.new( vbox )
config = $kapp.config()
config = $tdeApp.config()
config.setGroup("Settings")
@location.text = config.readEntry( "defaultPage", "http://localhost")
@ -106,7 +106,7 @@ class Browser < KDE::MainWindow
end
def fileSetDefaultPage()
config = $kapp.config()
config = $tdeApp.config()
config.group = "Settings"
config.writeEntry( "defaultPage", @browser.url().url() )

@ -32,7 +32,7 @@ class Browser < KDE::MainWindow
@location = TQt::LineEdit.new( vbox )
config = $kapp.config()
config = $tdeApp.config()
config.setGroup("Settings")
@location.text = config.readEntry( "defaultPage", "http://localhost")
@ -80,7 +80,7 @@ class Browser < KDE::MainWindow
end
def fileSetDefaultPage()
config = $kapp.config()
config = $tdeApp.config()
config.group = "Settings"
config.writeEntry( "defaultPage", @browser.url().url() )

@ -50,15 +50,15 @@ public class KScribbleApp extends TDEMainWindow implements Resource {
private TQPrinter printer;
private int untitledCount = 0;
private ArrayList pDocList;
private TDEApplication kapp;
private TDEApplication tdeApp;
private TDEIconLoader k = new TDEIconLoader();
/** construtor of KScribbleApp, calls all init functions to create the application.
*/
public KScribbleApp(TQWidget parent, String name) {
super(parent,name, 0);
kapp = TDEApplication.kApplication();
config=kapp.config();
tdeApp = TDEApplication.tdeApplication();
config=tdeApp.config();
printer = new TQPrinter();
untitledCount=0;
@ -270,7 +270,7 @@ public class KScribbleApp extends TDEMainWindow implements Resource {
KScribbleView w = new KScribbleView(doc, pWorkspace,null,WDestructiveClose);
w.installEventFilter(this);
doc.addView(w);
w.setIcon(kapp.miniIcon());
w.setIcon(tdeApp.miniIcon());
if ( pWorkspace.windowList().isEmpty() ) // show the very first window in maximized mode
w.showMaximized();
else

@ -49,7 +49,7 @@ public class KDCOPActionProxy extends DCOPObjectProxy {
This class automatically takes care of processing DCOP object requests for the returned
object id.
You can construct a global DCOP object referenence using DCOPRef. For example like
DCOPRef( kapp.dcopClient().appId, actionProxy.actionObjectId( actionName ) );
DCOPRef( tdeApp.dcopClient().appId, actionProxy.actionObjectId( actionName ) );
The action with the given name has to be available through the #action method.
@short Use this method to retrieve a DCOP object id for an action with the given name.
*/
@ -58,7 +58,7 @@ public class KDCOPActionProxy extends DCOPObjectProxy {
Returns a map of all exported actions, with the action name as keys and a global DCOP reference
as data entries.
The appId argument is used to specify the appid component of the DCOP reference. By default the
global application id is used ( kapp.dcopClient().appId() ) .
global application id is used ( tdeApp.dcopClient().appId() ) .
@short Returns a map of all exported actions, with the action name as keys and a global DCOP reference as data entries.
*/
// TQMap<TQCString, DCOPRef> actionMap(const TQCString& arg1); >>>> NOT CONVERTED

@ -49,7 +49,7 @@ public class KDCOPServiceStarter implements QtSupport {
Find an implementation of the given <code>serviceType</code>,
and start it, to use its DCOP interface.
The default implementation uses TDETrader to find the preferred Application,
and then starts it using kapp.startService...
and then starts it using tdeApp.startService...
However applications (like kontact) can reimplement this method, to provide
an in-process way of loading the implementation for this service type.
@param serviceType the type of service we're looking for

@ -100,7 +100,7 @@ public class KHistoryCombo extends KComboBox {
You won't have the benefit of weighted completion though, so normally
you should do something like
<pre>
TDEConfig config = kapp.config();
TDEConfig config = tdeApp.config();
ArrayList list;
// load the history and completion list after creating the history combo
list = config.readListEntry( "Completion list" );

@ -100,7 +100,7 @@ public class KNotifyClient {
Pass the origin-widget's winId() here so that a PassivePopup can be
placed appropriately.
Call it by KNotifyClient.event(widget.winId(), "EventName");
It will use TDEApplication.kApplication.dcopClient() to communicate to
It will use TDEApplication.tdeApplication.dcopClient() to communicate to
the server
@param winId The winId() of the widget where the event originates
@param message The name of the event

@ -29,7 +29,7 @@ public class KRandomSequence implements QtSupport {
A Pseudo-random sequence is different for each seed but can be
reproduced by starting the sequence with the same seed.
If you need a single value which needs to be unpredictable,
you need to use kapp.random() instead.
you need to use tdeApp.random() instead.
@param lngSeed Seed to initialize the sequence with.
If lngSeed is 0, the sequence is initialized with a value from
TDEApplication.random().

@ -17,7 +17,7 @@ import org.trinitydesktop.qt.TQApplication;
Controls and provides information to all KDE applications.
Only one object of this class can be instantiated in a single app.
This instance is always accessible via the 'kapp' global variable.
This instance is always accessible via the 'tdeApp' global variable.
See cut() for an example.
This class provides the following services to all KDE applications.
@ -366,7 +366,7 @@ public class TDEApplication extends TQApplication implements TDEInstanceInterfac
Builds a caption that contains the application name along with the
userCaption using a standard layout.
To make a compliant caption
for your window, simply do: <code>setCaption</code>(kapp.makeStdCaption(yourCaption));
for your window, simply do: <code>setCaption</code>(tdeApp.makeStdCaption(yourCaption));
@param userCaption The caption string you want to display in the
window caption area. Do not include the application name!
@param withAppName Indicates that the method shall include or ignore
@ -602,7 +602,7 @@ public class TDEApplication extends TQApplication implements TDEInstanceInterfac
If the widget with focus provides a cut() slot, call that slot. Thus for a
simple application cut can be implemented as:
<pre>
KStdAction.cut( kapp, TQ_SLOT("cut()"), actionCollection() );
KStdAction.cut( tdeApp, TQ_SLOT("cut()"), actionCollection() );
</pre>
@short If the widget with focus provides a cut() slot, call that slot.
*/
@ -611,7 +611,7 @@ public class TDEApplication extends TQApplication implements TDEInstanceInterfac
If the widget with focus provides a copy() slot, call that slot. Thus for a
simple application copy can be implemented as:
<pre>
KStdAction.copy( kapp, TQ_SLOT("copy()"), actionCollection() );
KStdAction.copy( tdeApp, TQ_SLOT("copy()"), actionCollection() );
</pre>
@short If the widget with focus provides a copy() slot, call that slot.
*/
@ -620,7 +620,7 @@ public class TDEApplication extends TQApplication implements TDEInstanceInterfac
If the widget with focus provides a paste() slot, call that slot. Thus for a
simple application copy can be implemented as:
<pre>
KStdAction.paste( kapp, TQ_SLOT("paste()"), actionCollection() );
KStdAction.paste( tdeApp, TQ_SLOT("paste()"), actionCollection() );
</pre>
@short If the widget with focus provides a paste() slot, call that slot.
*/
@ -629,7 +629,7 @@ public class TDEApplication extends TQApplication implements TDEInstanceInterfac
If the widget with focus provides a clear() slot, call that slot. Thus for a
simple application clear() can be implemented as:
<pre>
new TDEAction( i18n( "Clear" ), "editclear", 0, kapp, TQ_SLOT("clear()"), actionCollection(), "clear" );
new TDEAction( i18n( "Clear" ), "editclear", 0, tdeApp, TQ_SLOT("clear()"), actionCollection(), "clear" );
</pre>
Note that for some widgets, this may not provide the intended bahavior. For
example if you make use of the code above and a TDEListView has the focus, clear()
@ -651,7 +651,7 @@ public class TDEApplication extends TQApplication implements TDEInstanceInterfac
If the widget with focus provides a selectAll() slot, call that slot. Thus for a
simple application select all can be implemented as:
<pre>
KStdAction.selectAll( kapp, TQ_SLOT("selectAll()"), actionCollection() );
KStdAction.selectAll( tdeApp, TQ_SLOT("selectAll()"), actionCollection() );
</pre>
@short If the widget with focus provides a selectAll() slot, call that slot.
*/
@ -686,7 +686,7 @@ public class TDEApplication extends TQApplication implements TDEInstanceInterfac
@short Returns the current application object.
*/
public static native TDEApplication kApplication();
public static native TDEApplication tdeApplication();
/**
Returns a pointer to a DCOPClient for the application.
If a client does not exist yet, it is created when this
@ -1000,7 +1000,7 @@ public class TDEApplication extends TQApplication implements TDEInstanceInterfac
Now in your application calls to MyApplication.deselect() will call this slot on the
focused widget if it provides this slot. You can combine this with TDEAction with:
<pre>
KStdAction.deselect( (MyApplication)( kapp ), TQ_SLOT("cut()"), actionCollection() );
KStdAction.deselect( (MyApplication)( tdeApp ), TQ_SLOT("cut()"), actionCollection() );
</pre>
@short This method is used internally to determine which edit slots are implemented by the widget that has the focus, and to invoke those slots if available.
@see #cut

@ -248,11 +248,11 @@ public class TDECmdLineArgs implements QtSupport {
translation. Example: I18N_NOOP("KEdit")
@param _description A short description of what your application is about.
@param _version A version.
@param noKApp Set this true to not add commandline options for
@param noTDEApp Set this true to not add commandline options for
TQApplication / TDEApplication
@short Initialize class.
*/
public static native void init(String[] _argv, String _appname, String programName, String _description, String _version, boolean noKApp);
public static native void init(String[] _argv, String _appname, String programName, String _description, String _version, boolean noTDEApp);
public static native void init(String[] _argv, String _appname, String programName, String _description, String _version);
/**
Initialize class.
@ -261,11 +261,11 @@ public class TDECmdLineArgs implements QtSupport {
arguments that would otherwise be required.
@param _argv As passed to <code>main</code>(...).
@param about A TDEAboutData object describing your program.
@param noKApp Set this true to not add commandline options for
@param noTDEApp Set this true to not add commandline options for
TQApplication / TDEApplication
@short Initialize class.
*/
public static native void init(String[] _argv, TDEAboutData about, boolean noKApp);
public static native void init(String[] _argv, TDEAboutData about, boolean noTDEApp);
public static native void init(String[] _argv, TDEAboutData about);
/**
Initialize Class

@ -915,7 +915,7 @@ public class TDEConfigBase extends TQObject {
If an application computes a default value at runtime for
a certain entry, e.g. like:
<pre>
TQColor computedDefault = kapp.palette().color(TQPalette.Active, TQColorGroup.Text)
TQColor computedDefault = tdeApp.palette().color(TQPalette.Active, TQColorGroup.Text)
TQColor color = config.readEntry(key, computedDefault);
\encode
Then it may wish to make the following check before

@ -549,7 +549,7 @@ public class TDEMainWindow extends TQMainWindow implements KXMLGUIBuilderInterfa
is not changed and <code>false</code> returned.
That means clients could simply do the following:
<pre>
if (kapp.isRestored()){
if (tdeApp.isRestored()){
int n = 1;
while (TDEMainWindow.canBeRestored(n)){
(new childMW).restore(n);
@ -570,7 +570,7 @@ public class TDEMainWindow extends TQMainWindow implements KXMLGUIBuilderInterfa
should be pretty usual) then you should use the RESTORE-macro
for backwards compatibility with 3.1 and 3.0 branches:
<pre>
if (kapp.isRestored())
if (tdeApp.isRestored())
RESTORE(childMW)
else {
// create default application as usual
@ -582,7 +582,7 @@ public class TDEMainWindow extends TQMainWindow implements KXMLGUIBuilderInterfa
widget (each derived from TDEMainWindow, of course), you can
use the templated kRestoreMainWindows global functions:
<pre>
if (kapp.isRestored())
if (tdeApp.isRestored())
kRestoreMainWindows< childMW1, childMW2, childMW3 >();
else {
// create default application as usual

@ -551,10 +551,10 @@ Java_org_trinitydesktop_koala_TDEApplication_isRestored(JNIEnv* env, jobject obj
}
JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_TDEApplication_kApplication(JNIEnv* env, jclass cls)
Java_org_trinitydesktop_koala_TDEApplication_tdeApplication(JNIEnv* env, jclass cls)
{
(void) cls;
jobject xret = QtSupport::objectForQtKey(env, (void*)TDEApplicationJBridge::kApplication(), "org.trinitydesktop.koala.TDEApplication");
jobject xret = QtSupport::objectForQtKey(env, (void*)TDEApplicationJBridge::tdeApplication(), "org.trinitydesktop.koala.TDEApplication");
return xret;
}

@ -83,7 +83,7 @@ extern JNIEXPORT void JNICALL Java_org_trinitydesktop_koala_TDEApplication_selec
extern JNIEXPORT void JNICALL Java_org_trinitydesktop_koala_TDEApplication_ref (JNIEnv *env, jobject);
extern JNIEXPORT void JNICALL Java_org_trinitydesktop_koala_TDEApplication_deref (JNIEnv *env, jobject);
extern JNIEXPORT void JNICALL Java_org_trinitydesktop_koala_TDEApplication_addCmdLineOptions (JNIEnv *env, jclass);
extern JNIEXPORT jobject JNICALL Java_org_trinitydesktop_koala_TDEApplication_kApplication (JNIEnv *env, jclass);
extern JNIEXPORT jobject JNICALL Java_org_trinitydesktop_koala_TDEApplication_tdeApplication (JNIEnv *env, jclass);
extern JNIEXPORT jobject JNICALL Java_org_trinitydesktop_koala_TDEApplication_dcopClient (JNIEnv *env, jclass);
extern JNIEXPORT void JNICALL Java_org_trinitydesktop_koala_TDEApplication_disableAutoDcopRegistration (JNIEnv *env, jclass);
extern JNIEXPORT jstring JNICALL Java_org_trinitydesktop_koala_TDEApplication_launcher (JNIEnv *env, jclass);

@ -258,7 +258,7 @@ static TQCString* _qstring__version = 0;
}
JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Z(JNIEnv* env, jclass cls, jobjectArray args, jstring _appname, jstring programName, jstring _description, jstring _version, jboolean noKApp)
Java_org_trinitydesktop_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Z(JNIEnv* env, jclass cls, jobjectArray args, jstring _appname, jstring programName, jstring _description, jstring _version, jboolean noTDEApp)
{
(void) cls;
static TQCString* _qstring__appname = 0;
@ -266,7 +266,7 @@ static TQCString* _qstring_programName = 0;
static TQCString* _qstring__description = 0;
static TQCString* _qstring__version = 0;
int argc = (int) env->GetArrayLength(args);
TDECmdLineArgsJBridge::init(argc+1, (char**) QtSupport::toArgv(env, args), (const char*) QtSupport::toCharString(env, _appname, &_qstring__appname), (const char*) QtSupport::toCharString(env, programName, &_qstring_programName), (const char*) QtSupport::toCharString(env, _description, &_qstring__description), (const char*) QtSupport::toCharString(env, _version, &_qstring__version), (bool) noKApp);
TDECmdLineArgsJBridge::init(argc+1, (char**) QtSupport::toArgv(env, args), (const char*) QtSupport::toCharString(env, _appname, &_qstring__appname), (const char*) QtSupport::toCharString(env, programName, &_qstring_programName), (const char*) QtSupport::toCharString(env, _description, &_qstring__description), (const char*) QtSupport::toCharString(env, _version, &_qstring__version), (bool) noTDEApp);
return;
}
@ -280,11 +280,11 @@ Java_org_trinitydesktop_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Lorg_tri
}
JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Lorg_trinitydesktop_koala_TDEAboutData_2Z(JNIEnv* env, jclass cls, jobjectArray args, jobject about, jboolean noKApp)
Java_org_trinitydesktop_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Lorg_trinitydesktop_koala_TDEAboutData_2Z(JNIEnv* env, jclass cls, jobjectArray args, jobject about, jboolean noTDEApp)
{
(void) cls;
int argc = (int) env->GetArrayLength(args);
TDECmdLineArgsJBridge::init(argc+1, (char**) QtSupport::toArgv(env, args), (const TDEAboutData*) QtSupport::getQt(env, about), (bool) noKApp);
TDECmdLineArgsJBridge::init(argc+1, (char**) QtSupport::toArgv(env, args), (const TDEAboutData*) QtSupport::getQt(env, about), (bool) noTDEApp);
return;
}

@ -55,8 +55,8 @@ public class KBase extends TDEMainWindow
public KBase(TQWidget parent, String name)
{
super(parent, name, 0);
TDEApplication kapp = TDEApplication.kApplication();
config=kapp.config();
TDEApplication tdeApp = TDEApplication.tdeApplication();
config=tdeApp.config();
///////////////////////////////////////////////////////////////////
// call inits to invoke all other construction parts
@ -245,7 +245,7 @@ protected void saveProperties(TDEConfig _cfg)
KURL url=doc.URL();
_cfg.writeEntry("filename", url.url());
_cfg.writeEntry("modified", doc.isModified());
String tempname = TDEApplication.kApplication().tempSaveName(url.url());
String tempname = TDEApplication.tdeApplication().tempSaveName(url.url());
String tempurl= KURL.encode_string(tempname, 0);
KURL _url = new KURL(tempurl);
doc.saveDocument(_url);
@ -265,7 +265,7 @@ protected void readProperties(TDEConfig _cfg)
if(modified)
{
boolean canRecover = false;
String tempname = TDEApplication.kApplication().checkRecoverFile(filename, canRecover);
String tempname = TDEApplication.tdeApplication().checkRecoverFile(filename, canRecover);
KURL _url = new KURL(tempname);
if(canRecover)

@ -26,7 +26,7 @@ public class KHelpers extends TDEMainWindow {
protected int idfilequit;
// reference to the application
TDEApplication kapp;
TDEApplication tdeApp;
// time to display the message in the status bar
int HelpMessageTime = 200;
@ -34,14 +34,14 @@ public class KHelpers extends TDEMainWindow {
public KHelpers () {
// get a reference to the application
kapp = TDEApplication.kApplication();
tdeApp = TDEApplication.tdeApplication();
TQPopupMenu file = new TQPopupMenu(this);
idfilenew = file.insertItem("&New");
idfileopen = file.insertItem("&Open...");
idfilesave = file.insertItem("&Save");
idfilequit = file.insertItem("&Quit", kapp, TQ_SLOT("closeAllWindows()"));
idfilequit = file.insertItem("&Quit", tdeApp, TQ_SLOT("closeAllWindows()"));
connect ( file, TQ_SIGNAL( "highlighted(int)"), this, TQ_SLOT( "slotMenuEntryHelp (int)"));
@ -95,9 +95,9 @@ public class KHelpers extends TDEMainWindow {
public void slotSpecialHelp() {
String helpfilename = kapp.name();
String helpfilename = tdeApp.name();
helpfilename += "/specialhelp.html";
kapp.invokeHelp(helpfilename,"");
tdeApp.invokeHelp(helpfilename,"");
}
}

@ -246,7 +246,7 @@ void slotQuit(){
}
if (slave != null )
Scheduler.disconnectSlave(slave);
TDEApplication.kApplication().quit();
TDEApplication.tdeApplication().quit();
}

@ -23,11 +23,11 @@ KMozillaPart::KMozillaPart(TQWidget *parentWidget, const char *widgetName,
m_partProcess = new TDEProcess;
*m_partProcess << "kmozilla"
<< kapp->dcopClient()->appId() << objId();
<< tdeApp->dcopClient()->appId() << objId();
m_partProcess->start();
tqDebug("---->>>>>> enter loop");
kapp->enter_loop();
tdeApp->enter_loop();
tqDebug("----<<<<<< left loop");
}
@ -40,7 +40,7 @@ void KMozillaPart::createActions( const TQCString &xmlActions )
{
XPartHost_KPart::createActions( xmlActions );
tqDebug("----<<<<<< exit loop");
kapp->exit_loop();
tdeApp->exit_loop();
}
TDEAboutData *KMozillaPart::createAboutData()

@ -27,7 +27,7 @@ public:
#if 1
m_partProcess = new TDEProcess;
*m_partProcess << "./kmozilla"
<< kapp->dcopClient()->appId() << m_host->objId();
<< tdeApp->dcopClient()->appId() << m_host->objId();
m_partProcess->start();
#endif

@ -53,7 +53,7 @@ DCOPRef XPartHost_KPart::registerXPart( const DCOPRef &part )
tqDebug(" found browser extension ");
be = new KBrowserSignals( this, ref );
}
return DCOPRef( kapp->dcopClient()->appId(), objId() );
return DCOPRef( tdeApp->dcopClient()->appId(), objId() );
}

@ -24,7 +24,7 @@ ShellWindow::ShellWindow()
// Launch our XPart child.
m_partProcess = new TDEProcess;
*m_partProcess << "./xp_notepad"
<< kapp->dcopClient()->appId() << m_host->objId();
<< tdeApp->dcopClient()->appId() << m_host->objId();
m_partProcess->start();
// Init our Gui

@ -49,11 +49,11 @@ XP_NotepadPart::XP_NotepadPart(TQWidget *parentWidget, const char *widgetName,
{
m_partProcess = new TDEProcess;
*m_partProcess << "xnotepard"
<< kapp->dcopClient()->appId() << objId();
<< tdeApp->dcopClient()->appId() << objId();
m_partProcess->start();
tqDebug("---->>>>>> enter loop");
kapp->enter_loop();
tdeApp->enter_loop();
tqDebug("----<<<<<< left loop");
}
@ -66,7 +66,7 @@ void XP_NotepadPart::createActions( const TQCString &xmlActions )
{
XPartHost_KPart::createActions( xmlActions );
tqDebug("----<<<<<< exit loop");
kapp->exit_loop();
tdeApp->exit_loop();
}
#include "xp_notepad_factory.moc"

Loading…
Cancel
Save