summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore 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
@@ -8,41 +8,41 @@
8 8
9#include "obexinterface.h" 9#include "obexinterface.h"
10 10
11#include <qdir.h> 11#include <qdir.h>
12 12
13IrServer::IrServer( QObject *parent, const char *name ) 13IrServer::IrServer( QObject *parent, const char *name )
14 : QObject( parent, name ) 14 : QObject( parent, name )
15{ 15{
16 lib = 0; 16 lib = 0;
17 iface = 0; 17 iface = 0;
18 QString path = QPEApplication::qpeDir() + "/plugins/obex/"; 18 QString path = QPEApplication::qpeDir() + "/plugins/obex/";
19 QDir dir( path, "lib*.so" ); 19 QDir dir( path, "lib*.so" );
20 QStringList list = dir.entryList(); 20 QStringList list = dir.entryList();
21 QStringList::Iterator it; 21 QStringList::Iterator it;
22 for ( it = list.begin(); it != list.end(); ++it ) { 22 for ( it = list.begin(); it != list.end(); ++it ) {
23 QLibrary *trylib = new QLibrary( path + *it ); 23 QLibrary *trylib = new QLibrary( path + *it );
24 qDebug("trying lib %s", (path + (*it)).latin1() ); 24 //qDebug("trying lib %s", (path + (*it)).latin1() );
25 if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&iface ) == QS_OK ) { 25 if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
26 lib = trylib; 26 lib = trylib;
27 qDebug("found obex lib" ); 27 //qDebug("found obex lib" );
28 QString lang = getenv( "LANG" ); 28 QString lang = getenv( "LANG" );
29 QTranslator * trans = new QTranslator(qApp); 29 QTranslator * trans = new QTranslator(qApp);
30 QString type = (*it).left( (*it).find(".") ); 30 QString type = (*it).left( (*it).find(".") );
31 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; 31 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
32 qDebug("tr fpr obex: %s", tfn.latin1() ); 32 //qDebug("tr fpr obex: %s", tfn.latin1() );
33 if ( trans->load( tfn )) 33 if ( trans->load( tfn ))
34 qApp->installTranslator( trans ); 34 qApp->installTranslator( trans );
35 else 35 else
36 delete trans; 36 delete trans;
37 37
38 break; 38 break;
39 } else { 39 } else {
40 delete lib; 40 delete lib;
41 } 41 }
42 } 42 }
43 if ( !lib ) 43 if ( !lib )
44 qDebug("could not load IR plugin" ); 44 qDebug("could not load IR plugin" );
45} 45}
46 46
47IrServer::~IrServer() 47IrServer::~IrServer()
48{ 48{
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
@@ -792,33 +792,32 @@ void LauncherView::setBackgroundType( BackgroundType t, const QString &val )
792 case SolidColor: 792 case SolidColor:
793 icons->setBackgroundPixmap( QPixmap() ); 793 icons->setBackgroundPixmap( QPixmap() );
794 if ( val.isEmpty() ) { 794 if ( val.isEmpty() ) {
795 icons->setBackgroundColor( colorGroup().base() ); 795 icons->setBackgroundColor( colorGroup().base() );
796 } else { 796 } else {
797 icons->setBackgroundColor( val ); 797 icons->setBackgroundColor( val );
798 } 798 }
799 bgName = ""; 799 bgName = "";
800 break; 800 break;
801 801
802 case Image: 802 case Image:
803 bgName = val; 803 bgName = val;
804 if ( bgCache->contains( bgName ) ) { 804 if ( bgCache->contains( bgName ) ) {
805 (*bgCache)[bgName]->ref++; 805 (*bgCache)[bgName]->ref++;
806 icons->setBackgroundPixmap( (*bgCache)[bgName]->pm ); 806 icons->setBackgroundPixmap( (*bgCache)[bgName]->pm );
807 } else { 807 } else {
808 qDebug( "Loading image: %s", val.latin1() );
809 QPixmap bg( Resource::loadPixmap( val ) ); 808 QPixmap bg( Resource::loadPixmap( val ) );
810 if ( bg.isNull() ) { 809 if ( bg.isNull() ) {
811 QImageIO imgio; 810 QImageIO imgio;
812 imgio.setFileName( bgName ); 811 imgio.setFileName( bgName );
813 QSize ds = qApp->desktop()->size(); 812 QSize ds = qApp->desktop()->size();
814 QString param( "Scale( %1, %2, ScaleMin )" ); // No tr 813 QString param( "Scale( %1, %2, ScaleMin )" ); // No tr
815 imgio.setParameters( param.arg(ds.width()).arg(ds.height()).latin1() ); 814 imgio.setParameters( param.arg(ds.width()).arg(ds.height()).latin1() );
816 imgio.read(); 815 imgio.read();
817 bg = imgio.image(); 816 bg = imgio.image();
818 } 817 }
819 bgCache->insert( bgName, new BgPixmap(bg) ); 818 bgCache->insert( bgName, new BgPixmap(bg) );
820 icons->setBackgroundPixmap( bg ); 819 icons->setBackgroundPixmap( bg );
821 } 820 }
822 break; 821 break;
823 } 822 }
824 823