summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog3
-rw-r--r--Rules.make3
-rw-r--r--config.in4
-rw-r--r--library/resource.cpp34
4 files changed, 38 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index c39e7ce..86d9766 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,26 +15,27 @@
15 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) 15 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke)
16 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) 16 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke)
17 * #1542 - Fix Todo crash when priority < 1 or > 5 (drw) 17 * #1542 - Fix Todo crash when priority < 1 or > 5 (drw)
18 * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) 18 * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke)
19 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) 19 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl)
20 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) 20 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke)
21 * #1558 - Fixed opie-login breaking opie startup (mickeyl) 21 * #1558 - Fixed opie-login breaking opie startup (mickeyl)
22 * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) 22 * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar)
23 * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) 23 * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw)
24 24
25 Internal 25 Internal
26 -------- 26 --------
27 * Work around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) 27 * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl)
28 * Killed the need for weak symbols in QtE (zecke) 28 * Killed the need for weak symbols in QtE (zecke)
29 * Added optional building libqpe without inline images (mickeyl)
29 30
30 2005-02-03Opie 1.1.9 31 2005-02-03Opie 1.1.9
31 32
32 New Features 33 New Features
33 ------------ 34 ------------
34 * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) 35 * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl)
35 * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) 36 * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl)
36 * Usability enhancements in OpieIRC (skyhusker) 37 * Usability enhancements in OpieIRC (skyhusker)
37 38
38 Fixed Bugs 39 Fixed Bugs
39 ---------- 40 ----------
40 * #1501 - Fixed bug in todo sql backend (eilers) 41 * #1501 - Fixed bug in todo sql backend (eilers)
diff --git a/Rules.make b/Rules.make
index 64237cf..df1e6e5 100644
--- a/Rules.make
+++ b/Rules.make
@@ -51,24 +51,27 @@ else
51endif 51endif
52ifeq ($(CONFIG_SQL_PIM_BACKEND),y) 52ifeq ($(CONFIG_SQL_PIM_BACKEND),y)
53 echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@ 53 echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@
54else 54else
55 echo ENABLE_SQL_PIM_BACKEND=n >> $@ 55 echo ENABLE_SQL_PIM_BACKEND=n >> $@
56endif 56endif
57ifeq ($(CONFIG_OPIELOGIN_USEPAM),y) 57ifeq ($(CONFIG_OPIELOGIN_USEPAM),y)
58 echo CONFIG += OPIELOGIN_USEPAM >> $@ 58 echo CONFIG += OPIELOGIN_USEPAM >> $@
59endif 59endif
60ifeq ($(CONFIG_LIBQPE_WITHROHFEEDBACK),y) 60ifeq ($(CONFIG_LIBQPE_WITHROHFEEDBACK),y)
61 echo CONFIG += LIBQPE_WITHROHFEEDBACK >> $@ 61 echo CONFIG += LIBQPE_WITHROHFEEDBACK >> $@
62endif 62endif
63ifeq ($(CONFIG_LIBQPE_NO_INLINE_IMAGES),y)
64 echo DEFINES += LIBQPE_NO_INLINE_IMAGES >> $@
65endif
63ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y) 66ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y)
64 echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@ 67 echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@
65endif 68endif
66ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y) 69ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y)
67 echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@ 70 echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@
68endif 71endif
69ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y) 72ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y)
70 echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@ 73 echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@
71endif 74endif
72ifeq ($(CONFIG_USE_FILE_NOTIFICATION),y) 75ifeq ($(CONFIG_USE_FILE_NOTIFICATION),y)
73 echo DEFINES += USE_FILE_NOTIFICATION >> $@ 76 echo DEFINES += USE_FILE_NOTIFICATION >> $@
74endif 77endif
diff --git a/config.in b/config.in
index e9ffed2..228e682 100644
--- a/config.in
+++ b/config.in
@@ -161,24 +161,28 @@ config OPIE_NEW_ALLOC
161 default y if TARGET_RAMSES || TARGET_IPAQ || TARGET_SIMPAD || TARGET_SHARP 161 default y if TARGET_RAMSES || TARGET_IPAQ || TARGET_SIMPAD || TARGET_SHARP
162 default n if ! (TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP) 162 default n if ! (TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP)
163 163
164config OPIE_TASKBAR_LOCK_KEY_STATE 164config OPIE_TASKBAR_LOCK_KEY_STATE
165 boolean "Have a KeyLock state indicator on the taskbar" 165 boolean "Have a KeyLock state indicator on the taskbar"
166 default y if TARGET_SHARP 166 default y if TARGET_SHARP
167 default n if !TARGET_SHARP 167 default n if !TARGET_SHARP
168 168
169config LIBQPE_WITHROHFEEDBACK 169config LIBQPE_WITHROHFEEDBACK
170 boolean "Build libqpe with Right-On-Hold feedback" 170 boolean "Build libqpe with Right-On-Hold feedback"
171 default y 171 default y
172 172
173config LIBQPE_NO_INLINE_IMAGES
174 boolean "Build libqpe without inline images"
175 default y
176
173config OPIE_NO_SOUND_PCM_READ_BITS 177config OPIE_NO_SOUND_PCM_READ_BITS
174 boolean "There is not a pcm_read_bits io control" 178 boolean "There is not a pcm_read_bits io control"
175 default y if TARGET_SHARP 179 default y if TARGET_SHARP
176 default n if ! TARGET_SHARP 180 default n if ! TARGET_SHARP
177endmenu 181endmenu
178 182
179menu "Dependencies" 183menu "Dependencies"
180 source dependencies.in 184 source dependencies.in
181endmenu 185endmenu
182 186
183menu "Base" 187menu "Base"
184 choice 188 choice
diff --git a/library/resource.cpp b/library/resource.cpp
index b31876f..3b5e9ec 100644
--- a/library/resource.cpp
+++ b/library/resource.cpp
@@ -20,27 +20,29 @@
20 20
21#define QTOPIA_INTERNAL_MIMEEXT 21#define QTOPIA_INTERNAL_MIMEEXT
22#include <qpe/qpeapplication.h> 22#include <qpe/qpeapplication.h>
23#include "resource.h" 23#include "resource.h"
24#include "mimetype.h" 24#include "mimetype.h"
25#include <qdir.h> 25#include <qdir.h>
26#include <qpixmapcache.h> 26#include <qpixmapcache.h>
27 27
28// this namespace is just a workaround for a gcc bug 28// this namespace is just a workaround for a gcc bug
29// gcc exports inline functions in the generated file 29// gcc exports inline functions in the generated file
30// inlinepics_p.h 30// inlinepics_p.h
31 31
32#ifndef LIBQPE_NO_INLINE_IMAGES
32namespace { 33namespace {
33#include "inlinepics_p.h" 34#include "inlinepics_p.h"
34} 35}
36#endif
35 37
36static bool g_notUseSet = ::getenv("OVERWRITE_ICON_SET"); 38static bool g_notUseSet = ::getenv("OVERWRITE_ICON_SET");
37 39
38/*! 40/*!
39 \class Resource resource.h 41 \class Resource resource.h
40 \brief The Resource class provides access to named resources. 42 \brief The Resource class provides access to named resources.
41 43
42 The resources may be provided from files or other sources. 44 The resources may be provided from files or other sources.
43 45
44 The allSounds() function returns a list of all the sounds available. 46 The allSounds() function returns a list of all the sounds available.
45 A particular sound can be searched for using findSound(). 47 A particular sound can be searched for using findSound().
46 48
@@ -87,35 +89,45 @@ QBitmap Resource::loadBitmap( const QString &pix )
87 return bm; 89 return bm;
88} 90}
89 91
90/*! 92/*!
91 Returns the filename of a pixmap called \a pix. You should avoid including 93 Returns the filename of a pixmap called \a pix. You should avoid including
92 any filename type extension (e.g. .png, .xpm). 94 any filename type extension (e.g. .png, .xpm).
93 95
94 Normally you will use loadPixmap() rather than this function. 96 Normally you will use loadPixmap() rather than this function.
95*/ 97*/
96QString Resource::findPixmap( const QString &pix ) 98QString Resource::findPixmap( const QString &pix )
97{ 99{
98 QString picsPath = QPEApplication::qpeDir() + "pics/"; 100 QString picsPath = QPEApplication::qpeDir() + "pics/";
99
100 QString f; 101 QString f;
101 102
102 // Common case optimizations... 103 // Common case optimizations...
103 f = picsPath + pix + ".png"; 104 f = picsPath + pix + ".png";
104 if ( QFile( f ).exists() ) 105 if ( QFile( f ).exists() )
105 return f; 106 return f;
106 f = picsPath + pix + ".xpm"; 107 f = picsPath + pix + ".xpm";
107 if ( QFile( f ).exists() ) 108 if ( QFile( f ).exists() )
108 return f; 109 return f;
109 110
111#ifdef LIBQPE_NO_INLINE_IMAGES
112 QString picsPathInline = picsPath + "inline/";
113 // Common case optimizations...
114 f = picsPathInline + pix + ".png";
115 if ( QFile( f ).exists() )
116 return f;
117 f = picsPathInline + pix + ".xpm";
118 if ( QFile( f ).exists() )
119 return f;
120#endif
121
110 // All formats... 122 // All formats...
111 QStrList fileFormats = QImageIO::inputFormats(); 123 QStrList fileFormats = QImageIO::inputFormats();
112 QString ff = fileFormats.first(); 124 QString ff = fileFormats.first();
113 while ( fileFormats.current() ) { 125 while ( fileFormats.current() ) {
114 QStringList exts = MimeType("image/"+ff.lower()).extensions(); 126 QStringList exts = MimeType("image/"+ff.lower()).extensions();
115 for ( QStringList::ConstIterator it = exts.begin(); it!=exts.end(); ++it ) { 127 for ( QStringList::ConstIterator it = exts.begin(); it!=exts.end(); ++it ) {
116 QString f = picsPath + pix + "." + *it; 128 QString f = picsPath + pix + "." + *it;
117 if ( QFile(f).exists() ) 129 if ( QFile(f).exists() )
118 return f; 130 return f;
119 } 131 }
120 ff = fileFormats.next(); 132 ff = fileFormats.next();
121 } 133 }
@@ -154,38 +166,50 @@ QString Resource::findSound( const QString &name )
154QStringList Resource::allSounds() 166QStringList Resource::allSounds()
155{ 167{
156 QDir resourcedir( QPEApplication::qpeDir() + "sounds/", "*.wav" ); 168 QDir resourcedir( QPEApplication::qpeDir() + "sounds/", "*.wav" );
157 QStringList entries = resourcedir.entryList(); 169 QStringList entries = resourcedir.entryList();
158 QStringList result; 170 QStringList result;
159 for (QStringList::Iterator i=entries.begin(); i != entries.end(); ++i) 171 for (QStringList::Iterator i=entries.begin(); i != entries.end(); ++i)
160 result.append((*i).replace(QRegExp("\\.wav"),"")); 172 result.append((*i).replace(QRegExp("\\.wav"),""));
161 return result; 173 return result;
162} 174}
163 175
164static QImage load_image(const QString &name) 176static QImage load_image(const QString &name)
165{ 177{
178 QImage img;
179
166 if (g_notUseSet ) { 180 if (g_notUseSet ) {
167 // try file 181 // try file
168 QImage img;
169 QString f = Resource::findPixmap(name); 182 QString f = Resource::findPixmap(name);
170 if ( !f.isEmpty() ) 183 if ( !f.isEmpty() )
171 img.load(f); 184 img.load(f);
185#ifndef LIBQPE_NO_INLINE_IMAGES
172 if (img.isNull() ) 186 if (img.isNull() )
173 img = qembed_findImage(name.latin1() ); 187 img = qembed_findImage(name.latin1() );
188#endif
174 return img; 189 return img;
175 } 190 }
176 else{ 191 else{
177 QImage img = qembed_findImage(name.latin1()); 192#ifndef LIBQPE_NO_INLINE_IMAGES
178 193 img = qembed_findImage(name.latin1());
179 if ( img.isNull() ) { 194#else
195 QString f = Resource::findPixmap( "/inline/" + name );
196 if ( !f.isEmpty() )
197 {
198 img.load(f);
199 return img;
200 }
201#endif
202 if ( img.isNull() )
203 {
180 // No inlined image, try file 204 // No inlined image, try file
181 QString f = Resource::findPixmap(name); 205 QString f = Resource::findPixmap(name);
182 if ( !f.isEmpty() ) 206 if ( !f.isEmpty() )
183 img.load(f); 207 img.load(f);
184 } 208 }
185 return img; 209 return img;
186 } 210 }
187} 211}
188 212
189/*! 213/*!
190 Returns the QImage called \a name. You should avoid including 214 Returns the QImage called \a name. You should avoid including
191 any filename type extension (e.g. .png, .xpm). 215 any filename type extension (e.g. .png, .xpm).