summaryrefslogtreecommitdiff
authorsandman <sandman>2002-12-30 15:12:34 (UTC)
committer sandman <sandman>2002-12-30 15:12:34 (UTC)
commit66bfb25fe226a69f1ca2218b56fb3df74409de2f (patch) (unidiff)
tree2350a583f4b663f1c92cc442145ea342b133e3c0
parenta0eca1c0925a6893fa8f3ebfacd6363f906189df (diff)
downloadopie-66bfb25fe226a69f1ca2218b56fb3df74409de2f.zip
opie-66bfb25fe226a69f1ca2218b56fb3df74409de2f.tar.gz
opie-66bfb25fe226a69f1ca2218b56fb3df74409de2f.tar.bz2
getting rid of some qDebugs to make the startup a bit more quiet
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 @@
1#include "irserver.h" 1#include "irserver.h"
2 2
3#include <qpe/qlibrary.h> 3#include <qpe/qlibrary.h>
4#include <qpe/qpeapplication.h> 4#include <qpe/qpeapplication.h>
5 5
6#include <qtranslator.h> 6#include <qtranslator.h>
7#include <stdlib.h> 7#include <stdlib.h>
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{
49 if ( iface ) 49 if ( iface )
50 iface->release(); 50 iface->release();
51 delete lib; 51 delete lib;
52} 52}
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 )
744 bool bigIcons = m == Icon; 744 bool bigIcons = m == Icon;
745 icons->viewport()->setUpdatesEnabled( FALSE ); 745 icons->viewport()->setUpdatesEnabled( FALSE );
746 icons->setBigIcons( bigIcons ); 746 icons->setBigIcons( bigIcons );
747 switch ( m ) { 747 switch ( m ) {
748 case List: 748 case List:
749 icons->setItemTextPos( QIconView::Right ); 749 icons->setItemTextPos( QIconView::Right );
750 break; 750 break;
751 case Icon: 751 case Icon:
752 icons->setItemTextPos( QIconView::Bottom ); 752 icons->setItemTextPos( QIconView::Bottom );
753 break; 753 break;
754 } 754 }
755 icons->hideOrShowItems( FALSE ); 755 icons->hideOrShowItems( FALSE );
756 icons->viewport()->setUpdatesEnabled( TRUE ); 756 icons->viewport()->setUpdatesEnabled( TRUE );
757 vmode = m; 757 vmode = m;
758 } 758 }
759} 759}
760 760
761void LauncherView::setBackgroundType( BackgroundType t, const QString &val ) 761void LauncherView::setBackgroundType( BackgroundType t, const QString &val )
762{ 762{
763 if ( !bgCache ) 763 if ( !bgCache )
764 bgCache = new QMap<QString,BgPixmap*>; 764 bgCache = new QMap<QString,BgPixmap*>;
765 if ( bgCache->contains( bgName ) ) 765 if ( bgCache->contains( bgName ) )
766 (*bgCache)[bgName]->ref--; 766 (*bgCache)[bgName]->ref--;
767 767
768 switch ( t ) { 768 switch ( t ) {
769 case Ruled: { 769 case Ruled: {
770 bgName = QString("Ruled_%1").arg(colorGroup().background().name()); // No tr 770 bgName = QString("Ruled_%1").arg(colorGroup().background().name()); // No tr
771 QPixmap bg; 771 QPixmap bg;
772 if ( bgCache->contains( bgName ) ) { 772 if ( bgCache->contains( bgName ) ) {
773 (*bgCache)[bgName]->ref++; 773 (*bgCache)[bgName]->ref++;
774 bg = (*bgCache)[bgName]->pm; 774 bg = (*bgCache)[bgName]->pm;
775 } else { 775 } else {
776 bg.resize( width(), 9 ); 776 bg.resize( width(), 9 );
777 QPainter painter( &bg ); 777 QPainter painter( &bg );
778 for ( int i = 0; i < 3; i++ ) { 778 for ( int i = 0; i < 3; i++ ) {
779 painter.setPen( white ); 779 painter.setPen( white );
780 painter.drawLine( 0, i*3, width()-1, i*3 ); 780 painter.drawLine( 0, i*3, width()-1, i*3 );
781 painter.drawLine( 0, i*3+1, width()-1, i*3+1 ); 781 painter.drawLine( 0, i*3+1, width()-1, i*3+1 );
782 painter.setPen( colorGroup().background().light(105) ); 782 painter.setPen( colorGroup().background().light(105) );
783 painter.drawLine( 0, i*3+2, width()-1, i*3+2 ); 783 painter.drawLine( 0, i*3+2, width()-1, i*3+2 );
784 } 784 }
785 painter.end(); 785 painter.end();
786 bgCache->insert( bgName, new BgPixmap(bg) ); 786 bgCache->insert( bgName, new BgPixmap(bg) );
787 } 787 }
788 icons->setBackgroundPixmap( bg ); 788 icons->setBackgroundPixmap( bg );
789 break; 789 break;
790 } 790 }
791 791
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
825 // remove unreferenced backgrounds. 824 // remove unreferenced backgrounds.
826 QMap<QString,BgPixmap*>::Iterator it = bgCache->begin(); 825 QMap<QString,BgPixmap*>::Iterator it = bgCache->begin();
827 while ( it != bgCache->end() ) { 826 while ( it != bgCache->end() ) {
828 QMap<QString,BgPixmap*>::Iterator curr = it; 827 QMap<QString,BgPixmap*>::Iterator curr = it;
829 ++it; 828 ++it;
830 if ( (*curr)->ref == 0 ) { 829 if ( (*curr)->ref == 0 ) {
831 delete (*curr); 830 delete (*curr);
832 bgCache->remove( curr ); 831 bgCache->remove( curr );
833 } 832 }
834 } 833 }
835 834
836 bgType = t; 835 bgType = t;
837 icons->viewport()->update(); 836 icons->viewport()->update();
838} 837}
839 838
840void LauncherView::setTextColor( const QColor &tc ) 839void LauncherView::setTextColor( const QColor &tc )
841{ 840{
842 textCol = tc; 841 textCol = tc;
843 QColorGroup cg = icons->colorGroup(); 842 QColorGroup cg = icons->colorGroup();
844 cg.setColor( QColorGroup::Text, tc ); 843 cg.setColor( QColorGroup::Text, tc );
845 icons->setPalette( QPalette(cg,cg,cg) ); 844 icons->setPalette( QPalette(cg,cg,cg) );
846 icons->viewport()->update(); 845 icons->viewport()->update();
847} 846}
848 847
849void LauncherView::setViewFont( const QFont &f ) 848void LauncherView::setViewFont( const QFont &f )
850{ 849{
851 icons->setFont( f ); 850 icons->setFont( f );
852} 851}
853 852
854void LauncherView::unsetViewFont( ) 853void LauncherView::unsetViewFont( )
855{ 854{
856 icons->unsetFont( ); 855 icons->unsetFont( );
857} 856}
858 857
859void LauncherView::resizeEvent(QResizeEvent *e) 858void LauncherView::resizeEvent(QResizeEvent *e)
860{ 859{
861 QVBox::resizeEvent( e ); 860 QVBox::resizeEvent( e );
862 if ( e->size().width() != e->oldSize().width() ) 861 if ( e->size().width() != e->oldSize().width() )
863 sort(); 862 sort();
864} 863}
865 864
866void LauncherView::populate( AppLnkSet *folder, const QString& typefilter ) 865void LauncherView::populate( AppLnkSet *folder, const QString& typefilter )
867{ 866{
868 icons->clear(); 867 icons->clear();
869 internalPopulate( folder, typefilter ); 868 internalPopulate( folder, typefilter );
870} 869}
871 870
872QString LauncherView::getAllDocLinkInfo() const 871QString LauncherView::getAllDocLinkInfo() const