-rw-r--r-- | library/library.pro | 2 | ||||
-rw-r--r-- | library/resource.h | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/library/library.pro b/library/library.pro index 95c18a2..7143454 100644 --- a/library/library.pro +++ b/library/library.pro @@ -102,38 +102,40 @@ SOURCES = calendar.cpp \ qpetoolbar.cpp \ backend/categories.cpp \ backend/stringutil.cpp \ backend/palmtoprecord.cpp \ backend/task.cpp \ backend/event.cpp \ backend/contact.cpp \ categorymenu.cpp \ categoryedit_p.cpp \ categoryselect.cpp \ categorywidget.cpp \ ir.cpp \ backend/vcc_yacc.cpp \ backend/vobject.cpp \ findwidget_p.cpp \ finddialog.cpp \ lnkproperties.cpp \ widget_showing.cpp # Qt 3 compatibility HEADERS += quuid.h qcom.h qlibrary.h qlibrary_p.h SOURCES += quuid.cpp qlibrary.cpp qlibrary_unix.cpp + +DEFINES += OPIE_INTERNAL_LIBRARY_BUILD INCLUDEPATH += $(OPIEDIR)/include backend LIBS += -ldl -lcrypt -lm INTERFACES = passwordbase_p.ui categoryeditbase_p.ui findwidgetbase_p.ui lnkpropertiesbase_p.ui TARGET = qpe DESTDIR = $(OPIEDIR)/lib$(PROJMAK) VERSION = 1.5.0.1 include( $(OPIEDIR)/include.pro ) contains( CONFIG, LIBQPE_WITHROHFEEDBACK ){ DEFINES += OPIE_WITHROHFEEDBACK SOURCES += backend/rohfeedback.cpp HEADERS += backend/rohfeedback.h } diff --git a/library/resource.h b/library/resource.h index 4a3502a..9e4cb54 100644 --- a/library/resource.h +++ b/library/resource.h @@ -21,46 +21,56 @@ #define PIXMAPLOADER_H #include <qimage.h> #include <qbitmap.h> #include <qiconset.h> #include <qstringlist.h> class Resource { public: Resource() {} static QImage loadImage( const QString &name); static QPixmap loadPixmap( const QString &name ); static QBitmap loadBitmap( const QString &name ); static QString findPixmap( const QString &name ); static QIconSet loadIconSet( const QString &name ); static QString findSound( const QString &name ); static QStringList allSounds(); }; +#ifdef OPIE_INTERNAL_LIBRARY_BUILD extern bool qpe_fast_findPixmap; +#endif + + // Inline for compatibility with SHARP ROMs inline QIconSet Resource::loadIconSet( const QString &pix ) { + +#ifdef OPIE_INTERNAL_LIBRARY_BUILD /* * disable the slow load */ bool oldMode = qpe_fast_findPixmap; qpe_fast_findPixmap = true; +#endif QPixmap dpm = loadPixmap( pix + "_disabled" ); QPixmap pm = loadPixmap( pix ); QIconSet is( pm ); if ( !dpm.isNull() ) is.setPixmap( dpm, pm.width() <= 22 ? QIconSet::Small : QIconSet::Large, QIconSet::Disabled ); +#ifdef OPIE_INTERNAL_LIBRARY_BUILD qpe_fast_findPixmap = oldMode; +#endif + return is; } #endif |