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) (side-by-side diff)
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 )
switch ( inRegion ) {
case QWSDecoration::Close:
if ( ((HackWidget*)w)->needsOk() )
- text = tr("Click to close this window, discarding changes.");
+ text = QObject::tr("Click to close this window, discarding changes.");
else
- text = tr("Click to close this window.");
+ text = QObject::tr("Click to close this window.");
break;
case QWSDecoration::Minimize:
- text = tr("Click to close this window and apply changes.");
+ text = QObject::tr("Click to close this window and apply changes.");
break;
case QWSDecoration::Maximize:
if ( w->isMaximized() )
- text = tr("Click to make this window moveable.");
+ text = QObject::tr("Click to make this window moveable.");
else
- text = tr("Click to make this window use all available screen area.");
+ text = QObject::tr("Click to make this window use all available screen area.");
break;
default:
break;
@@ -508,10 +508,18 @@ void QPEDecoration::init ( const QString &plugin )
} else {
delete wdiface;
}
-
+
WindowDecorationInterface *iface = 0;
- QString path = QPEApplication::qpeDir() + "/plugins/decorations";
- QLibrary *lib = new QLibrary( path + "/" + plugin );
+ QString path = QPEApplication::qpeDir() + "/plugins/decorations/";
+
+ if ( plugin.find( ".so" ) > 0 ) {
+ // full library name supplied
+ path += plugin;
+ } else {
+ path += "lib" + plugin.lower() + ".so"; // compatibility
+ }
+
+ QLibrary *lib = new QLibrary( path );
if ( lib->queryInterface( IID_WindowDecoration, (QUnknownInterface**)&iface ) == QS_OK && iface ) {
wdiface = iface;
wdlib = lib;
@@ -525,14 +533,14 @@ void QPEDecoration::init ( const QString &plugin )
helpExists = FALSE;
for (QStringList::ConstIterator it=helpPath.begin(); it!=helpPath.end() && !helpExists; ++it) {
helpExists = QFile::exists( *it + "/" + helpFile );
- //qDebug ( "Checking %s/%s for help: %d", (*it).latin1(), helpFile.latin1(),helpExists);
+ //qDebug ( "Checking %s/%s for help: %d", (*it).latin1(), helpFile.latin1(),helpExists);
}
qpeManager = new QPEManager( this );
-
+
// Qtopia 1.5 compatibility
imageOk = *okImage ( 15 );
imageClose = *closeImage ( 15 );
- imageHelp = *helpImage ( 15 );
+ imageHelp = *helpImage ( 15 );
}
QPEDecoration::~QPEDecoration()
@@ -870,7 +878,7 @@ void QPEDecoration::help( QWidget *w )
Global::execute( "helpbrowser", helpFile );
} else if ( w && w->testWFlags(Qt::WStyle_ContextHelp) ) {
QWhatsThis::enterWhatsThisMode();
- QWhatsThis::leaveWhatsThisMode( qApp->tr(
+ QWhatsThis::leaveWhatsThisMode( QObject::tr(
"<Qt>Comprehensive help is not available for this application, "
"however there is context-sensitive help.<p>To use context-sensitive help:<p>"
"<ol><li>click and hold the help button."
@@ -883,7 +891,7 @@ void QPEDecoration::windowData( const QWidget *w, WindowDecorationInterface::Win
{
wd.rect = w->rect();
if ( qpeManager->whatsThisWidget() == w )
- wd.caption = qApp->tr("What's this..." );
+ wd.caption = QObject::tr("What's this..." );
else
wd.caption = w->caption();
wd.palette = qApp->palette();