summaryrefslogtreecommitdiff
authorsandman <sandman>2002-11-22 21:57:47 (UTC)
committer sandman <sandman>2002-11-22 21:57:47 (UTC)
commita71b9d79a05ab2b6bc891afe4df4d5fdcf641550 (patch) (unidiff)
tree12852a47649207eb46b6bd6f7d41ab2fc2156259
parent0f9ce3f60b6fbd350f79485ee8fc5fe37be692e1 (diff)
downloadopie-a71b9d79a05ab2b6bc891afe4df4d5fdcf641550.zip
opie-a71b9d79a05ab2b6bc891afe4df4d5fdcf641550.tar.gz
opie-a71b9d79a05ab2b6bc891afe4df4d5fdcf641550.tar.bz2
Added some code for backward compatibility .. this enabled tkc apps with
custom window decoration to work on Opie (the X and OK button have a 1 pixel offset though, but I can't do anything about it)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpedecoration_qws.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/library/qpedecoration_qws.cpp b/library/qpedecoration_qws.cpp
index 9cbe92b..6221f5b 100644
--- a/library/qpedecoration_qws.cpp
+++ b/library/qpedecoration_qws.cpp
@@ -483,48 +483,53 @@ static QLibrary *wdlib = 0;
483 483
484//=========================================================================== 484//===========================================================================
485 485
486QPEDecoration::QPEDecoration() 486QPEDecoration::QPEDecoration()
487 : QWSDefaultDecoration() 487 : QWSDefaultDecoration()
488{ 488{
489 if ( wdlib ) { 489 if ( wdlib ) {
490 wdiface->release(); 490 wdiface->release();
491 wdlib->unload(); 491 wdlib->unload();
492 delete wdlib; 492 delete wdlib;
493 wdlib = 0; 493 wdlib = 0;
494 } else { 494 } else {
495 delete wdiface; 495 delete wdiface;
496 } 496 }
497 wdiface = new DefaultWindowDecoration; 497 wdiface = new DefaultWindowDecoration;
498 498
499 helpFile = QString(qApp->argv()[0]) + ".html"; 499 helpFile = QString(qApp->argv()[0]) + ".html";
500 QStringList helpPath = Global::helpPath(); 500 QStringList helpPath = Global::helpPath();
501 helpExists = FALSE; 501 helpExists = FALSE;
502 for (QStringList::ConstIterator it=helpPath.begin(); it!=helpPath.end() && !helpExists; ++it) { 502 for (QStringList::ConstIterator it=helpPath.begin(); it!=helpPath.end() && !helpExists; ++it) {
503 helpExists = QFile::exists( *it + "/" + helpFile ); 503 helpExists = QFile::exists( *it + "/" + helpFile );
504 qDebug ( "Checking %s/%s for help: %d", (*it).latin1(), helpFile.latin1(),helpExists); 504 qDebug ( "Checking %s/%s for help: %d", (*it).latin1(), helpFile.latin1(),helpExists);
505 } 505 }
506 qpeManager = new QPEManager( this ); 506 qpeManager = new QPEManager( this );
507
508 // for backward compatibility:
509 imageOk = *okImage ( 15 );
510 imageClose = *closeImage ( 15 );
511 imageHelp = *helpImage ( 15 );
507} 512}
508 513
509QPEDecoration::QPEDecoration( const QString &plugin ) 514QPEDecoration::QPEDecoration( const QString &plugin )
510 : QWSDefaultDecoration() 515 : QWSDefaultDecoration()
511{ 516{
512 if ( wdlib ) { 517 if ( wdlib ) {
513 wdiface->release(); 518 wdiface->release();
514 wdlib->unload(); 519 wdlib->unload();
515 delete wdlib; 520 delete wdlib;
516 wdlib = 0; 521 wdlib = 0;
517 } else { 522 } else {
518 delete wdiface; 523 delete wdiface;
519 } 524 }
520 WindowDecorationInterface *iface = 0; 525 WindowDecorationInterface *iface = 0;
521 QString path = QPEApplication::qpeDir() + "/plugins/decorations"; 526 QString path = QPEApplication::qpeDir() + "/plugins/decorations";
522 QLibrary *lib = new QLibrary( path + "/" + plugin ); 527 QLibrary *lib = new QLibrary( path + "/" + plugin );
523 if ( lib->queryInterface( IID_WindowDecoration, (QUnknownInterface**)&iface ) == QS_OK && iface ) { 528 if ( lib->queryInterface( IID_WindowDecoration, (QUnknownInterface**)&iface ) == QS_OK && iface ) {
524 wdiface = iface; 529 wdiface = iface;
525 wdlib = lib; 530 wdlib = lib;
526 } else { 531 } else {
527 delete lib; 532 delete lib;
528 wdiface = new DefaultWindowDecoration; 533 wdiface = new DefaultWindowDecoration;
529 } 534 }
530 535