summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -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
@@ -744,129 +744,128 @@ void LauncherView::setViewMode( ViewMode m )
bool bigIcons = m == Icon;
icons->viewport()->setUpdatesEnabled( FALSE );
icons->setBigIcons( bigIcons );
switch ( m ) {
case List:
icons->setItemTextPos( QIconView::Right );
break;
case Icon:
icons->setItemTextPos( QIconView::Bottom );
break;
}
icons->hideOrShowItems( FALSE );
icons->viewport()->setUpdatesEnabled( TRUE );
vmode = m;
}
}
void LauncherView::setBackgroundType( BackgroundType t, const QString &val )
{
if ( !bgCache )
bgCache = new QMap<QString,BgPixmap*>;
if ( bgCache->contains( bgName ) )
(*bgCache)[bgName]->ref--;
switch ( t ) {
case Ruled: {
bgName = QString("Ruled_%1").arg(colorGroup().background().name()); // No tr
QPixmap bg;
if ( bgCache->contains( bgName ) ) {
(*bgCache)[bgName]->ref++;
bg = (*bgCache)[bgName]->pm;
} else {
bg.resize( width(), 9 );
QPainter painter( &bg );
for ( int i = 0; i < 3; i++ ) {
painter.setPen( white );
painter.drawLine( 0, i*3, width()-1, i*3 );
painter.drawLine( 0, i*3+1, width()-1, i*3+1 );
painter.setPen( colorGroup().background().light(105) );
painter.drawLine( 0, i*3+2, width()-1, i*3+2 );
}
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 );
}
}
bgType = t;
icons->viewport()->update();
}
void LauncherView::setTextColor( const QColor &tc )
{
textCol = tc;
QColorGroup cg = icons->colorGroup();
cg.setColor( QColorGroup::Text, tc );
icons->setPalette( QPalette(cg,cg,cg) );
icons->viewport()->update();
}
void LauncherView::setViewFont( const QFont &f )
{
icons->setFont( f );
}
void LauncherView::unsetViewFont( )
{
icons->unsetFont( );
}
void LauncherView::resizeEvent(QResizeEvent *e)
{
QVBox::resizeEvent( e );
if ( e->size().width() != e->oldSize().width() )
sort();
}
void LauncherView::populate( AppLnkSet *folder, const QString& typefilter )
{
icons->clear();
internalPopulate( folder, typefilter );
}
QString LauncherView::getAllDocLinkInfo() const