summaryrefslogtreecommitdiff
path: root/library/qpedecoration_qws.cpp
authoreilers <eilers>2003-08-08 14:45:49 (UTC)
committer eilers <eilers>2003-08-08 14:45:49 (UTC)
commit14d394e6c107b037a09a31a92605034fe50f7813 (patch) (unidiff)
tree800699cf4dc9681c3eb023340634dd6a15fd04c8 /library/qpedecoration_qws.cpp
parentdbc6ea35f5535a1f69deb7ebbafc0f721721dbf2 (diff)
downloadopie-14d394e6c107b037a09a31a92605034fe50f7813.zip
opie-14d394e6c107b037a09a31a92605034fe50f7813.tar.gz
opie-14d394e6c107b037a09a31a92605034fe50f7813.tar.bz2
Merged branches from BRANCH_1_0
Diffstat (limited to 'library/qpedecoration_qws.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpedecoration_qws.cpp34
1 files changed, 21 insertions, 13 deletions
diff --git a/library/qpedecoration_qws.cpp b/library/qpedecoration_qws.cpp
index 5e0c32a..933542d 100644
--- a/library/qpedecoration_qws.cpp
+++ b/library/qpedecoration_qws.cpp
@@ -189,18 +189,18 @@ bool QPEManager::eventFilter( QObject *o, QEvent *e )
189 switch ( inRegion ) { 189 switch ( inRegion ) {
190 case QWSDecoration::Close: 190 case QWSDecoration::Close:
191 if ( ((HackWidget*)w)->needsOk() ) 191 if ( ((HackWidget*)w)->needsOk() )
192 text = tr("Click to close this window, discarding changes."); 192 text = QObject::tr("Click to close this window, discarding changes.");
193 else 193 else
194 text = tr("Click to close this window."); 194 text = QObject::tr("Click to close this window.");
195 break; 195 break;
196 case QWSDecoration::Minimize: 196 case QWSDecoration::Minimize:
197 text = tr("Click to close this window and apply changes."); 197 text = QObject::tr("Click to close this window and apply changes.");
198 break; 198 break;
199 case QWSDecoration::Maximize: 199 case QWSDecoration::Maximize:
200 if ( w->isMaximized() ) 200 if ( w->isMaximized() )
201 text = tr("Click to make this window moveable."); 201 text = QObject::tr("Click to make this window moveable.");
202 else 202 else
203 text = tr("Click to make this window use all available screen area."); 203 text = QObject::tr("Click to make this window use all available screen area.");
204 break; 204 break;
205 default: 205 default:
206 break; 206 break;
@@ -508,10 +508,18 @@ void QPEDecoration::init ( const QString &plugin )
508 } else { 508 } else {
509 delete wdiface; 509 delete wdiface;
510 } 510 }
511 511
512 WindowDecorationInterface *iface = 0; 512 WindowDecorationInterface *iface = 0;
513 QString path = QPEApplication::qpeDir() + "/plugins/decorations"; 513 QString path = QPEApplication::qpeDir() + "/plugins/decorations/";
514 QLibrary *lib = new QLibrary( path + "/" + plugin ); 514
515 if ( plugin.find( ".so" ) > 0 ) {
516 // full library name supplied
517 path += plugin;
518 } else {
519 path += "lib" + plugin.lower() + ".so"; // compatibility
520 }
521
522 QLibrary *lib = new QLibrary( path );
515 if ( lib->queryInterface( IID_WindowDecoration, (QUnknownInterface**)&iface ) == QS_OK && iface ) { 523 if ( lib->queryInterface( IID_WindowDecoration, (QUnknownInterface**)&iface ) == QS_OK && iface ) {
516 wdiface = iface; 524 wdiface = iface;
517 wdlib = lib; 525 wdlib = lib;
@@ -525,14 +533,14 @@ void QPEDecoration::init ( const QString &plugin )
525 helpExists = FALSE; 533 helpExists = FALSE;
526 for (QStringList::ConstIterator it=helpPath.begin(); it!=helpPath.end() && !helpExists; ++it) { 534 for (QStringList::ConstIterator it=helpPath.begin(); it!=helpPath.end() && !helpExists; ++it) {
527 helpExists = QFile::exists( *it + "/" + helpFile ); 535 helpExists = QFile::exists( *it + "/" + helpFile );
528 //qDebug ( "Checking %s/%s for help: %d", (*it).latin1(), helpFile.latin1(),helpExists); 536 //qDebug ( "Checking %s/%s for help: %d", (*it).latin1(), helpFile.latin1(),helpExists);
529 } 537 }
530 qpeManager = new QPEManager( this ); 538 qpeManager = new QPEManager( this );
531 539
532 // Qtopia 1.5 compatibility 540 // Qtopia 1.5 compatibility
533 imageOk = *okImage ( 15 ); 541 imageOk = *okImage ( 15 );
534 imageClose = *closeImage ( 15 ); 542 imageClose = *closeImage ( 15 );
535 imageHelp = *helpImage ( 15 ); 543 imageHelp = *helpImage ( 15 );
536} 544}
537 545
538QPEDecoration::~QPEDecoration() 546QPEDecoration::~QPEDecoration()
@@ -870,7 +878,7 @@ void QPEDecoration::help( QWidget *w )
870 Global::execute( "helpbrowser", helpFile ); 878 Global::execute( "helpbrowser", helpFile );
871 } else if ( w && w->testWFlags(Qt::WStyle_ContextHelp) ) { 879 } else if ( w && w->testWFlags(Qt::WStyle_ContextHelp) ) {
872 QWhatsThis::enterWhatsThisMode(); 880 QWhatsThis::enterWhatsThisMode();
873 QWhatsThis::leaveWhatsThisMode( qApp->tr( 881 QWhatsThis::leaveWhatsThisMode( QObject::tr(
874 "<Qt>Comprehensive help is not available for this application, " 882 "<Qt>Comprehensive help is not available for this application, "
875 "however there is context-sensitive help.<p>To use context-sensitive help:<p>" 883 "however there is context-sensitive help.<p>To use context-sensitive help:<p>"
876 "<ol><li>click and hold the help button." 884 "<ol><li>click and hold the help button."
@@ -883,7 +891,7 @@ void QPEDecoration::windowData( const QWidget *w, WindowDecorationInterface::Win
883{ 891{
884 wd.rect = w->rect(); 892 wd.rect = w->rect();
885 if ( qpeManager->whatsThisWidget() == w ) 893 if ( qpeManager->whatsThisWidget() == w )
886 wd.caption = qApp->tr("What's this..." ); 894 wd.caption = QObject::tr("What's this..." );
887 else 895 else
888 wd.caption = w->caption(); 896 wd.caption = w->caption();
889 wd.palette = qApp->palette(); 897 wd.palette = qApp->palette();