summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/irserver.cpp6
-rw-r--r--core/launcher/launcherview.cpp1
2 files changed, 3 insertions, 4 deletions
diff --git a/core/launcher/irserver.cpp b/core/launcher/irserver.cpp
index 2147d0a..625cb60 100644
--- a/core/launcher/irserver.cpp
+++ b/core/launcher/irserver.cpp
@@ -1,52 +1,52 @@
#include "irserver.h"
#include <qpe/qlibrary.h>
#include <qpe/qpeapplication.h>
#include <qtranslator.h>
#include <stdlib.h>
#include "obexinterface.h"
#include <qdir.h>
IrServer::IrServer( QObject *parent, const char *name )
: QObject( parent, name )
{
lib = 0;
iface = 0;
QString path = QPEApplication::qpeDir() + "/plugins/obex/";
QDir dir( path, "lib*.so" );
QStringList list = dir.entryList();
QStringList::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
QLibrary *trylib = new QLibrary( path + *it );
- qDebug("trying lib %s", (path + (*it)).latin1() );
+ //qDebug("trying lib %s", (path + (*it)).latin1() );
if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
lib = trylib;
- qDebug("found obex lib" );
+ //qDebug("found obex lib" );
QString lang = getenv( "LANG" );
QTranslator * trans = new QTranslator(qApp);
QString type = (*it).left( (*it).find(".") );
QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
- qDebug("tr fpr obex: %s", tfn.latin1() );
+ //qDebug("tr fpr obex: %s", tfn.latin1() );
if ( trans->load( tfn ))
qApp->installTranslator( trans );
else
delete trans;
break;
} else {
delete lib;
}
}
if ( !lib )
qDebug("could not load IR plugin" );
}
IrServer::~IrServer()
{
if ( iface )
iface->release();
delete lib;
}
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp
index 95a1d4a..7117e0b 100644
--- a/core/launcher/launcherview.cpp
+++ b/core/launcher/launcherview.cpp
@@ -784,49 +784,48 @@ void LauncherView::setBackgroundType( BackgroundType t, const QString &val )
}
painter.end();
bgCache->insert( bgName, new BgPixmap(bg) );
}
icons->setBackgroundPixmap( bg );
break;
}
case SolidColor:
icons->setBackgroundPixmap( QPixmap() );
if ( val.isEmpty() ) {
icons->setBackgroundColor( colorGroup().base() );
} else {
icons->setBackgroundColor( val );
}
bgName = "";
break;
case Image:
bgName = val;
if ( bgCache->contains( bgName ) ) {
(*bgCache)[bgName]->ref++;
icons->setBackgroundPixmap( (*bgCache)[bgName]->pm );
} else {
- qDebug( "Loading image: %s", val.latin1() );
QPixmap bg( Resource::loadPixmap( val ) );
if ( bg.isNull() ) {
QImageIO imgio;
imgio.setFileName( bgName );
QSize ds = qApp->desktop()->size();
QString param( "Scale( %1, %2, ScaleMin )" ); // No tr
imgio.setParameters( param.arg(ds.width()).arg(ds.height()).latin1() );
imgio.read();
bg = imgio.image();
}
bgCache->insert( bgName, new BgPixmap(bg) );
icons->setBackgroundPixmap( bg );
}
break;
}
// remove unreferenced backgrounds.
QMap<QString,BgPixmap*>::Iterator it = bgCache->begin();
while ( it != bgCache->end() ) {
QMap<QString,BgPixmap*>::Iterator curr = it;
++it;
if ( (*curr)->ref == 0 ) {
delete (*curr);
bgCache->remove( curr );