summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/multikeyapplet/multikey.cpp2
-rw-r--r--core/apps/taboapp/main.cpp4
-rw-r--r--core/launcher/inputmethods.cpp6
-rw-r--r--core/launcher/irserver.cpp4
-rw-r--r--core/launcher/startmenu.cpp4
-rw-r--r--core/launcher/systray.cpp4
-rw-r--r--core/multimedia/opieplayer/mediaplayerstate.cpp2
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp2
-rw-r--r--core/multimedia/opieplayer/videowidget.cpp2
-rw-r--r--core/opie-login/main.cpp2
-rw-r--r--core/settings/launcher/menusettings.cpp4
-rw-r--r--core/settings/launcher/taskbarsettings.cpp4
-rw-r--r--core/settings/security/multiauthconfig.cpp8
-rw-r--r--core/tools/quicklauncher/dropins.h4
-rw-r--r--inputmethods/multikey/configdlg.cpp4
-rw-r--r--inputmethods/multikey/keyboard.cpp4
-rw-r--r--libopie2/opiecore/opluginloader.cpp4
-rw-r--r--libopie2/opienet/omanufacturerdb.cpp2
-rw-r--r--libopie2/opiesecurity/multiauthcommon.cpp2
-rw-r--r--library/fontdatabase.cpp2
-rw-r--r--library/network.cpp6
-rw-r--r--library/qpedecoration_qws.cpp2
-rw-r--r--libslcompat/slmisc.h2
-rw-r--r--noncore/applets/zkbapplet/applet/zkbwidget.cpp2
-rw-r--r--noncore/applets/zkbapplet/keyzcfg/cfgdlg.cpp4
-rw-r--r--noncore/applets/zkbapplet/keyzcfg/main.cpp2
-rw-r--r--noncore/apps/opie-bartender/bartender.cpp2
-rw-r--r--noncore/apps/opie-console/fixit.cpp6
-rw-r--r--noncore/apps/opie-gutenbrowser/LibraryDialog.cpp6
-rw-r--r--noncore/apps/opie-gutenbrowser/ftpsitedlg.cpp2
-rw-r--r--noncore/apps/opie-gutenbrowser/gutenbrowser.cpp4
-rw-r--r--noncore/apps/opie-gutenbrowser/helpme.cpp2
-rw-r--r--noncore/apps/zsafe/zsafe.cpp10
-rw-r--r--noncore/games/backgammon/backgammon.cpp14
-rw-r--r--noncore/games/backgammon/filedialog.cpp2
-rw-r--r--noncore/games/backgammon/themedialog.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp2
-rw-r--r--noncore/settings/language/language.cpp2
-rw-r--r--noncore/settings/networksettings/mainwindow/mainwindowimp.cpp2
-rw-r--r--noncore/settings/sysinfo/benchmarkinfo.cpp2
-rw-r--r--noncore/settings/tabmanager/tabmanager.cpp4
-rw-r--r--noncore/styles/theme/othemebase.cpp2
-rw-r--r--noncore/styles/theme/themeset.cpp2
-rw-r--r--noncore/tools/calc2/calc.cpp2
-rw-r--r--x11/libqpe-x11/qpe/qpeapplication.cpp4
45 files changed, 80 insertions, 80 deletions
diff --git a/core/applets/multikeyapplet/multikey.cpp b/core/applets/multikeyapplet/multikey.cpp
index 195d8a4..8cb9083 100644
--- a/core/applets/multikeyapplet/multikey.cpp
+++ b/core/applets/multikeyapplet/multikey.cpp
@@ -62,49 +62,49 @@ void Multikey::mousePressEvent(QMouseEvent *ev)
62} 62}
63 63
64void Multikey::mouseReleaseEvent(QMouseEvent *ev) 64void Multikey::mouseReleaseEvent(QMouseEvent *ev)
65{ 65{
66 if (!sw_maps.count()) 66 if (!sw_maps.count())
67 return; 67 return;
68 68
69 lang = lang < sw_maps.count()-1 ? lang+1 : 0; 69 lang = lang < sw_maps.count()-1 ? lang+1 : 0;
70 QCopEnvelope e("MultiKey/Keyboard", "setmultikey(QString)"); 70 QCopEnvelope e("MultiKey/Keyboard", "setmultikey(QString)");
71 //odebug << "Lang=" << lang << ", count=" << sw_maps.count() << ", lab=" << labels[lang].ascii() << "" << oendl; 71 //odebug << "Lang=" << lang << ", count=" << sw_maps.count() << ", lab=" << labels[lang].ascii() << "" << oendl;
72 e << sw_maps[lang]; 72 e << sw_maps[lang];
73 setText(labels[lang]); 73 setText(labels[lang]);
74} 74}
75 75
76void Multikey::message(const QCString &message, const QByteArray &data) 76void Multikey::message(const QCString &message, const QByteArray &data)
77{ 77{
78 if ( message == "setsw(QString,QString)" ) { 78 if ( message == "setsw(QString,QString)" ) {
79 79
80 QDataStream stream(data, IO_ReadOnly); 80 QDataStream stream(data, IO_ReadOnly);
81 QString maps, current_map; 81 QString maps, current_map;
82 stream >> maps >> current_map; 82 stream >> maps >> current_map;
83 QStringList sw = QStringList::split(QChar('|'), maps); 83 QStringList sw = QStringList::split(QChar('|'), maps);
84 sw.append(current_map); 84 sw.append(current_map);
85 85
86 QDir map_dir(QPEApplication::qpeDir() + "/share/multikey/", "*.keymap"); 86 QDir map_dir(QPEApplication::qpeDir() + "share/multikey/", "*.keymap");
87 lang = 0; 87 lang = 0;
88 labels.clear(); 88 labels.clear();
89 sw_maps.clear(); 89 sw_maps.clear();
90 popupMenu.clear(); 90 popupMenu.clear();
91 91
92 for (uint i = 0; i < sw.count(); ++i) { 92 for (uint i = 0; i < sw.count(); ++i) {
93 QString keymap_map; 93 QString keymap_map;
94 if (sw[i][0] != '/') { 94 if (sw[i][0] != '/') {
95 95
96 keymap_map = map_dir.absPath() + "/" + sw[i]; 96 keymap_map = map_dir.absPath() + "/" + sw[i];
97 } else { 97 } else {
98 98
99 if ((map_dir.exists(QFileInfo(sw[i]).fileName(), false) 99 if ((map_dir.exists(QFileInfo(sw[i]).fileName(), false)
100 && i != sw.count()-1) || !QFile::exists(sw[i])) { 100 && i != sw.count()-1) || !QFile::exists(sw[i])) {
101 continue; 101 continue;
102 } 102 }
103 keymap_map = sw[i]; 103 keymap_map = sw[i];
104 } 104 }
105 105
106 QFile map(keymap_map); 106 QFile map(keymap_map);
107 if (map.open(IO_ReadOnly)) { 107 if (map.open(IO_ReadOnly)) {
108 QString line; 108 QString line;
109 109
110 map.readLine(line, 1024); 110 map.readLine(line, 1024);
diff --git a/core/apps/taboapp/main.cpp b/core/apps/taboapp/main.cpp
index e43f118..e999803 100644
--- a/core/apps/taboapp/main.cpp
+++ b/core/apps/taboapp/main.cpp
@@ -1,57 +1,57 @@
1/* OPIE */ 1/* OPIE */
2#include <oappinterface.h> 2#include <oappinterface.h>
3#include <oappplugin.h> 3#include <oappplugin.h>
4#include <opie2/odebug.h> 4#include <opie2/odebug.h>
5#include <opie2/otabwidget.h> 5#include <opie2/otabwidget.h>
6#include <qpe/qpeapplication.h> 6#include <qpe/qpeapplication.h>
7#include <qpe/qlibrary.h> 7#include <qpe/qlibrary.h>
8using namespace Opie::Core; 8using namespace Opie::Core;
9using namespace Opie::Ui; 9using namespace Opie::Ui;
10 10
11/* QT */ 11/* QT */
12#include <qdir.h> 12#include <qdir.h>
13 13
14int main( int argc, char **argv ) 14int main( int argc, char **argv )
15{ 15{
16 QPEApplication a( argc, argv ); 16 QPEApplication a( argc, argv );
17 17
18 OTabWidget *tabwidget = new OTabWidget(0, "tab widget"); 18 OTabWidget *tabwidget = new OTabWidget(0, "tab widget");
19 19
20 QString path = QPEApplication::qpeDir() + "/plugins/app"; 20 QString path = QPEApplication::qpeDir() + "plugins/app";
21 QDir dir( path, "lib*.so" ); 21 QDir dir( path, "lib*.so" );
22 22
23 QStringList list = dir.entryList(); 23 QStringList list = dir.entryList();
24 QStringList::Iterator it; 24 QStringList::Iterator it;
25 25
26 QInterfacePtr<OAppInterface> iface; 26 QInterfacePtr<OAppInterface> iface;
27 for ( it = list.begin(); it != list.end(); ++it ) { 27 for ( it = list.begin(); it != list.end(); ++it ) {
28 QLibrary *lib = new QLibrary( path + "/" + *it ); 28 QLibrary *lib = new QLibrary( path + "/" + *it );
29 29
30 odebug << "querying: " << QString( path + "/" + *it ) << "" << oendl; 30 odebug << "querying: " << QString( path + "/" + *it ) << "" << oendl;
31 if ( lib->queryInterface( IID_OAppInterface, (QUnknownInterface**)&iface ) == QS_OK ) { 31 if ( lib->queryInterface( IID_OAppInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
32 odebug << "accepted: " << QString( path + "/" + *it ) << "" << oendl; 32 odebug << "accepted: " << QString( path + "/" + *it ) << "" << oendl;
33 33
34 QList<QWidget> list = iface->widgets(); 34 QList<QWidget> list = iface->widgets();
35 QWidget *widget; 35 QWidget *widget;
36 for ( widget = list.first(); widget != 0; widget = list.next() ) 36 for ( widget = list.first(); widget != 0; widget = list.next() )
37 tabwidget->addTab(widget, QString(*it), QString(*it)); 37 tabwidget->addTab(widget, QString(*it), QString(*it));
38 38
39 QString lang = getenv( "LANG" ); 39 QString lang = getenv( "LANG" );
40 if (lang.isNull()) 40 if (lang.isNull())
41 lang = "en"; 41 lang = "en";
42 QTranslator *trans = new QTranslator(qApp); 42 QTranslator *trans = new QTranslator(qApp);
43 QString type = (*it).left( (*it).find(".") ); 43 QString type = (*it).left( (*it).find(".") );
44 if (type.left(3) == "lib") 44 if (type.left(3) == "lib")
45 type = type.mid(3); 45 type = type.mid(3);
46 type = type.right( type.find("lib") ); 46 type = type.right( type.find("lib") );
47 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; 47 QString tfn = QPEApplication::qpeDir()+"i18n/"+lang+"/"+type+".qm";
48 if ( trans->load( tfn )) 48 if ( trans->load( tfn ))
49 qApp->installTranslator( trans ); 49 qApp->installTranslator( trans );
50 else 50 else
51 delete trans; 51 delete trans;
52 } 52 }
53 } 53 }
54 54
55 a.showMainDocumentWidget(tabwidget); 55 a.showMainDocumentWidget(tabwidget);
56 return a.exec(); 56 return a.exec();
57} 57}
diff --git a/core/launcher/inputmethods.cpp b/core/launcher/inputmethods.cpp
index 586628b..24669ac 100644
--- a/core/launcher/inputmethods.cpp
+++ b/core/launcher/inputmethods.cpp
@@ -196,108 +196,108 @@ QRect InputMethods::inputRect() const
196 return QRect(); 196 return QRect();
197 else 197 else
198 return mkeyboard->widget->geometry(); 198 return mkeyboard->widget->geometry();
199} 199}
200 200
201void InputMethods::unloadInputMethods() 201void InputMethods::unloadInputMethods()
202{ 202{
203 unloadMethod( inputMethodList ); 203 unloadMethod( inputMethodList );
204 unloadMethod( inputModifierList ); 204 unloadMethod( inputModifierList );
205 inputMethodList.clear(); 205 inputMethodList.clear();
206 inputModifierList.clear(); 206 inputModifierList.clear();
207 207
208} 208}
209 209
210void InputMethods::unloadMethod( QValueList<InputMethod>& list ) { 210void InputMethods::unloadMethod( QValueList<InputMethod>& list ) {
211 QValueList<InputMethod>::Iterator it; 211 QValueList<InputMethod>::Iterator it;
212 212
213 for (it = list.begin(); it != list.end(); ++it ) 213 for (it = list.begin(); it != list.end(); ++it )
214 (*it).releaseInterface(); 214 (*it).releaseInterface();
215 215
216} 216}
217 217
218 218
219QStringList InputMethods::plugins()const { 219QStringList InputMethods::plugins()const {
220 QString path = QPEApplication::qpeDir() + "/plugins/inputmethods"; 220 QString path = QPEApplication::qpeDir() + "plugins/inputmethods";
221#ifdef Q_OS_MACX 221#ifdef Q_OS_MACX
222 QDir dir( path, "lib*.dylib" ); 222 QDir dir( path, "lib*.dylib" );
223#else 223#else
224 QDir dir( path, "lib*.so" ); 224 QDir dir( path, "lib*.so" );
225#endif /* Q_OS_MACX */ 225#endif /* Q_OS_MACX */
226 return dir.entryList(); 226 return dir.entryList();
227} 227}
228 228
229void InputMethods::installTranslator( const QString& type ) { 229void InputMethods::installTranslator( const QString& type ) {
230 QStringList langs = Global::languageList(); 230 QStringList langs = Global::languageList();
231 QStringList::ConstIterator lit; 231 QStringList::ConstIterator lit;
232 for ( lit= langs.begin(); lit!=langs.end(); ++lit) { 232 for ( lit= langs.begin(); lit!=langs.end(); ++lit) {
233 QString lang = *lit; 233 QString lang = *lit;
234 QTranslator * trans = new QTranslator(qApp); 234 QTranslator * trans = new QTranslator(qApp);
235 235
236 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; 236 QString tfn = QPEApplication::qpeDir()+"i18n/"+lang+"/"+type+".qm";
237 237
238 if ( trans->load( tfn )) 238 if ( trans->load( tfn ))
239 qApp->installTranslator( trans ); 239 qApp->installTranslator( trans );
240 else 240 else
241 delete trans; 241 delete trans;
242 } 242 }
243} 243}
244 244
245void InputMethods::setPreferedHandlers() { 245void InputMethods::setPreferedHandlers() {
246 Config cfg("qpe"); 246 Config cfg("qpe");
247 cfg.setGroup("InputMethod"); 247 cfg.setGroup("InputMethod");
248 QString current = cfg.readEntry("current"); 248 QString current = cfg.readEntry("current");
249 QString im = cfg.readEntry("im"); 249 QString im = cfg.readEntry("im");
250 250
251 QValueList<InputMethod>::Iterator it; 251 QValueList<InputMethod>::Iterator it;
252 if (!inputModifierList.isEmpty() && !im.isEmpty() ) { 252 if (!inputModifierList.isEmpty() && !im.isEmpty() ) {
253 for (it = inputModifierList.begin(); it != inputModifierList.end(); ++it ) 253 for (it = inputModifierList.begin(); it != inputModifierList.end(); ++it )
254 if ( (*it).name() == im ) { 254 if ( (*it).name() == im ) {
255 imethod = &(*it); break; 255 imethod = &(*it); break;
256 } 256 }
257 257
258 } 258 }
259 if (!inputMethodList.isEmpty() && !current.isEmpty() ) { 259 if (!inputMethodList.isEmpty() && !current.isEmpty() ) {
260 for (it = inputMethodList.begin(); it != inputMethodList.end(); ++it ) 260 for (it = inputMethodList.begin(); it != inputMethodList.end(); ++it )
261 if ( (*it).name() == current ) { 261 if ( (*it).name() == current ) {
262 owarn << "preferred keyboard is " << current << "" << oendl; 262 owarn << "preferred keyboard is " << current << "" << oendl;
263 mkeyboard = &(*it); 263 mkeyboard = &(*it);
264 kbdButton->setPixmap( *mkeyboard->icon() ); 264 kbdButton->setPixmap( *mkeyboard->icon() );
265 break; 265 break;
266 } 266 }
267 } 267 }
268 268
269} 269}
270 270
271void InputMethods::loadInputMethods() 271void InputMethods::loadInputMethods()
272{ 272{
273#ifndef QT_NO_COMPONENT 273#ifndef QT_NO_COMPONENT
274 hideInputMethod(); 274 hideInputMethod();
275 mkeyboard = 0; 275 mkeyboard = 0;
276 276
277 unloadInputMethods(); 277 unloadInputMethods();
278 278
279 QString path = QPEApplication::qpeDir() + "/plugins/inputmethods"; 279 QString path = QPEApplication::qpeDir() + "plugins/inputmethods";
280 QStringList list = plugins(); 280 QStringList list = plugins();
281 QStringList::Iterator it; 281 QStringList::Iterator it;
282 for ( it = list.begin(); it != list.end(); ++it ) { 282 for ( it = list.begin(); it != list.end(); ++it ) {
283 InputMethodInterface *iface = 0; 283 InputMethodInterface *iface = 0;
284 ExtInputMethodInterface *eface = 0; 284 ExtInputMethodInterface *eface = 0;
285 QLibrary *lib = new QLibrary( path + "/" + *it ); 285 QLibrary *lib = new QLibrary( path + "/" + *it );
286 286
287 if ( lib->queryInterface( IID_InputMethod, (QUnknownInterface**)&iface ) == QS_OK ) { 287 if ( lib->queryInterface( IID_InputMethod, (QUnknownInterface**)&iface ) == QS_OK ) {
288 InputMethod input; 288 InputMethod input;
289 input.newIM = FALSE; 289 input.newIM = FALSE;
290 input.library = lib; 290 input.library = lib;
291 input.libName = *it; 291 input.libName = *it;
292 input.interface = iface; 292 input.interface = iface;
293 input.widget = input.interface->inputMethod( 0, inputWidgetStyle ); 293 input.widget = input.interface->inputMethod( 0, inputWidgetStyle );
294 input.interface->onKeyPress( this, SLOT(sendKey(ushort,ushort,ushort,bool,bool)) ); 294 input.interface->onKeyPress( this, SLOT(sendKey(ushort,ushort,ushort,bool,bool)) );
295 inputMethodList.append( input ); 295 inputMethodList.append( input );
296 } else if ( lib->queryInterface( IID_ExtInputMethod, (QUnknownInterface**)&eface ) == QS_OK ) { 296 } else if ( lib->queryInterface( IID_ExtInputMethod, (QUnknownInterface**)&eface ) == QS_OK ) {
297 InputMethod input; 297 InputMethod input;
298 input.newIM = TRUE; 298 input.newIM = TRUE;
299 input.library = lib; 299 input.library = lib;
300 input.libName = *it; 300 input.libName = *it;
301 input.extInterface = eface; 301 input.extInterface = eface;
302 input.widget = input.extInterface->keyboardWidget( 0, inputWidgetStyle ); 302 input.widget = input.extInterface->keyboardWidget( 0, inputWidgetStyle );
303 // may be either a simple, or advanced. 303 // may be either a simple, or advanced.
diff --git a/core/launcher/irserver.cpp b/core/launcher/irserver.cpp
index 092eb0c..19cf904 100644
--- a/core/launcher/irserver.cpp
+++ b/core/launcher/irserver.cpp
@@ -13,64 +13,64 @@
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "irserver.h" 21#include "irserver.h"
22#include "obexinterface.h" 22#include "obexinterface.h"
23 23
24/* OPIE */ 24/* OPIE */
25#include <opie2/odebug.h> 25#include <opie2/odebug.h>
26#include <qtopia/qlibrary.h> 26#include <qtopia/qlibrary.h>
27#include <qtopia/qpeapplication.h> 27#include <qtopia/qpeapplication.h>
28 28
29/* QT */ 29/* QT */
30#include <qdir.h> 30#include <qdir.h>
31 31
32IrServer::IrServer( QObject *parent, const char *name ) 32IrServer::IrServer( QObject *parent, const char *name )
33 : QObject( parent, name ), obexIface(0) 33 : QObject( parent, name ), obexIface(0)
34{ 34{
35 lib = 0; 35 lib = 0;
36 obexIface = 0; 36 obexIface = 0;
37 QString path = QPEApplication::qpeDir() + "/plugins/obex/"; 37 QString path = QPEApplication::qpeDir() + "plugins/obex/";
38#ifdef Q_OS_MACX 38#ifdef Q_OS_MACX
39 QDir dir( path, "lib*.dylib" ); 39 QDir dir( path, "lib*.dylib" );
40#else 40#else
41 QDir dir( path, "lib*.so" ); 41 QDir dir( path, "lib*.so" );
42#endif /* Q_OS_MACX */ 42#endif /* Q_OS_MACX */
43 QStringList list = dir.entryList(); 43 QStringList list = dir.entryList();
44 QStringList::Iterator it; 44 QStringList::Iterator it;
45 for ( it = list.begin(); it != list.end(); ++it ) { 45 for ( it = list.begin(); it != list.end(); ++it ) {
46 QLibrary *trylib = new QLibrary( path + *it ); 46 QLibrary *trylib = new QLibrary( path + *it );
47 //odebug << "trying lib " << (path + (*it)) << "" << oendl; 47 //odebug << "trying lib " << (path + (*it)) << "" << oendl;
48 if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&obexIface ) == QS_OK ) { 48 if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&obexIface ) == QS_OK ) {
49 lib = trylib; 49 lib = trylib;
50 //odebug << "found obex lib" << oendl; 50 //odebug << "found obex lib" << oendl;
51 QString lang = getenv( "LANG" ); 51 QString lang = getenv( "LANG" );
52 QTranslator * trans = new QTranslator(qApp); 52 QTranslator * trans = new QTranslator(qApp);
53 QString type = (*it).left( (*it).find(".") ); 53 QString type = (*it).left( (*it).find(".") );
54 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; 54 QString tfn = QPEApplication::qpeDir()+"i18n/"+lang+"/"+type+".qm";
55 //odebug << "tr fpr obex: " << tfn << "" << oendl; 55 //odebug << "tr fpr obex: " << tfn << "" << oendl;
56 if ( trans->load( tfn )) 56 if ( trans->load( tfn ))
57 qApp->installTranslator( trans ); 57 qApp->installTranslator( trans );
58 else 58 else
59 delete trans; 59 delete trans;
60 60
61 break; 61 break;
62 } else { 62 } else {
63 delete lib; 63 delete lib;
64 } 64 }
65 } 65 }
66 if ( !lib ) 66 if ( !lib )
67 odebug << "could not load IR plugin" << oendl; 67 odebug << "could not load IR plugin" << oendl;
68} 68}
69 69
70IrServer::~IrServer() 70IrServer::~IrServer()
71{ 71{
72 if ( obexIface ) 72 if ( obexIface )
73 obexIface->release(); 73 obexIface->release();
74 delete lib; 74 delete lib;
75} 75}
76 76
diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp
index f3a7651..66f665f 100644
--- a/core/launcher/startmenu.cpp
+++ b/core/launcher/startmenu.cpp
@@ -294,68 +294,68 @@ void StartMenu::clearApplets()
294 294
295 applet->iface->release(); 295 applet->iface->release();
296 applet->library->unload(); 296 applet->library->unload();
297 delete applet-> library; 297 delete applet-> library;
298 } 298 }
299 menuApplets.clear(); 299 menuApplets.clear();
300} 300}
301 301
302 302
303 303
304 304
305void StartMenu::loadApplets() 305void StartMenu::loadApplets()
306{ 306{
307 Config cfg( "StartMenu" ); 307 Config cfg( "StartMenu" );
308 cfg.setGroup( "Applets" ); 308 cfg.setGroup( "Applets" );
309 309
310 // SafeMode causes too much problems, so we disable it for now -- 310 // SafeMode causes too much problems, so we disable it for now --
311 // maybe we should reenable it for OPIE 1.0 - sandman 26.09.02 311 // maybe we should reenable it for OPIE 1.0 - sandman 26.09.02
312 // removed in the remerge PluginManager could handle it 312 // removed in the remerge PluginManager could handle it
313 // we don't currently use it -zecke 313 // we don't currently use it -zecke
314 314
315 QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' ); 315 QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' );
316 316
317 QString lang = getenv( "LANG" ); 317 QString lang = getenv( "LANG" );
318 QString path = QPEApplication::qpeDir() + "/plugins/applets"; 318 QString path = QPEApplication::qpeDir() + "plugins/applets";
319 QDir dir( path, "lib*.so" ); 319 QDir dir( path, "lib*.so" );
320 QStringList list = dir.entryList(); 320 QStringList list = dir.entryList();
321 QStringList::Iterator it; 321 QStringList::Iterator it;
322 int napplets = 0; 322 int napplets = 0;
323 MenuApplet* *xapplets = new MenuApplet*[list.count()]; 323 MenuApplet* *xapplets = new MenuApplet*[list.count()];
324 for ( it = list.begin(); it != list.end(); ++it ) { 324 for ( it = list.begin(); it != list.end(); ++it ) {
325 if ( exclude.find( *it ) != exclude.end() ) 325 if ( exclude.find( *it ) != exclude.end() )
326 continue; 326 continue;
327 MenuAppletInterface *iface = 0; 327 MenuAppletInterface *iface = 0;
328 QLibrary *lib = new QLibrary( path + "/" + *it ); 328 QLibrary *lib = new QLibrary( path + "/" + *it );
329 if (( lib->queryInterface( IID_MenuApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) { 329 if (( lib->queryInterface( IID_MenuApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) {
330 MenuApplet *applet = new MenuApplet; 330 MenuApplet *applet = new MenuApplet;
331 xapplets[napplets++] = applet; 331 xapplets[napplets++] = applet;
332 applet->library = lib; 332 applet->library = lib;
333 applet->iface = iface; 333 applet->iface = iface;
334 334
335 QTranslator *trans = new QTranslator(qApp); 335 QTranslator *trans = new QTranslator(qApp);
336 QString type = (*it).left( (*it).find(".") ); 336 QString type = (*it).left( (*it).find(".") );
337 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; 337 QString tfn = QPEApplication::qpeDir()+"i18n/"+lang+"/"+type+".qm";
338 if ( trans->load( tfn )) 338 if ( trans->load( tfn ))
339 qApp->installTranslator( trans ); 339 qApp->installTranslator( trans );
340 else 340 else
341 delete trans; 341 delete trans;
342 } else { 342 } else {
343 exclude += *it; 343 exclude += *it;
344 delete lib; 344 delete lib;
345 } 345 }
346 } 346 }
347 cfg.writeEntry( "ExcludeApplets", exclude, ',' ); 347 cfg.writeEntry( "ExcludeApplets", exclude, ',' );
348 qsort(xapplets, napplets, sizeof(menuApplets[0]), compareAppletPositions); 348 qsort(xapplets, napplets, sizeof(menuApplets[0]), compareAppletPositions);
349 349
350 350
351 while ( napplets-- ) { 351 while ( napplets-- ) {
352 MenuApplet *applet = xapplets[napplets]; 352 MenuApplet *applet = xapplets[napplets];
353 applet->popup = applet->iface->popup( this ); 353 applet->popup = applet->iface->popup( this );
354 354
355 // menuApplets got an id < -1 355 // menuApplets got an id < -1
356 menuApplets.insert( -( currentItem + 2 ), new MenuApplet( *applet ) ); 356 menuApplets.insert( -( currentItem + 2 ), new MenuApplet( *applet ) );
357 currentItem++; 357 currentItem++;
358 } 358 }
359 delete [] xapplets; 359 delete [] xapplets;
360 360
361 addApplets( launchMenu ); 361 addApplets( launchMenu );
diff --git a/core/launcher/systray.cpp b/core/launcher/systray.cpp
index 3c72d25..d0f1808 100644
--- a/core/launcher/systray.cpp
+++ b/core/launcher/systray.cpp
@@ -76,73 +76,73 @@ void SysTray::clearApplets()
76 QValueList<TaskbarApplet>::Iterator mit; 76 QValueList<TaskbarApplet>::Iterator mit;
77 for ( mit = appletList.begin(); mit != appletList.end(); ++mit ) { 77 for ( mit = appletList.begin(); mit != appletList.end(); ++mit ) {
78 (*mit).iface->release(); 78 (*mit).iface->release();
79 (*mit).library->unload(); 79 (*mit).library->unload();
80 delete (*mit).library; 80 delete (*mit).library;
81 } 81 }
82 82
83#endif 83#endif
84 appletList.clear(); 84 appletList.clear();
85 if ( layout ) 85 if ( layout )
86 delete layout; 86 delete layout;
87 layout = new QHBoxLayout( this, 0, 1 ); 87 layout = new QHBoxLayout( this, 0, 1 );
88 layout->setAutoAdd(TRUE); 88 layout->setAutoAdd(TRUE);
89} 89}
90 90
91void SysTray::addApplets() 91void SysTray::addApplets()
92{ 92{
93 hide(); 93 hide();
94#ifndef QT_NO_COMPONENTS 94#ifndef QT_NO_COMPONENTS
95 Config cfg( "Taskbar" ); 95 Config cfg( "Taskbar" );
96 cfg.setGroup( "Applets" ); 96 cfg.setGroup( "Applets" );
97 QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' ); 97 QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' );
98 98
99 QString lang = getenv( "LANG" ); 99 QString lang = getenv( "LANG" );
100 QString path = QPEApplication::qpeDir() + "/plugins/applets"; 100 QString path = QPEApplication::qpeDir() + "plugins/applets";
101#ifdef Q_OS_MACX 101#ifdef Q_OS_MACX
102 QDir dir( path, "lib*.dylib" ); 102 QDir dir( path, "lib*.dylib" );
103#else 103#else
104 QDir dir( path, "lib*.so" ); 104 QDir dir( path, "lib*.so" );
105#endif /* Q_OS_MACX */ 105#endif /* Q_OS_MACX */
106 QStringList list = dir.entryList(); 106 QStringList list = dir.entryList();
107 QStringList::Iterator it; 107 QStringList::Iterator it;
108 int napplets=0; 108 int napplets=0;
109 TaskbarApplet* *applets = new TaskbarApplet*[list.count()]; 109 TaskbarApplet* *applets = new TaskbarApplet*[list.count()];
110 for ( it = list.begin(); it != list.end(); ++it ) { 110 for ( it = list.begin(); it != list.end(); ++it ) {
111 if ( exclude.find( *it ) != exclude.end() ) 111 if ( exclude.find( *it ) != exclude.end() )
112 continue; 112 continue;
113 owarn << "Found Applet: " << (*it) << "" << oendl; 113 owarn << "Found Applet: " << (*it) << "" << oendl;
114 TaskbarAppletInterface *iface = 0; 114 TaskbarAppletInterface *iface = 0;
115 QLibrary *lib = new QLibrary( path + "/" + *it ); 115 QLibrary *lib = new QLibrary( path + "/" + *it );
116 if (( lib->queryInterface( IID_TaskbarApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) { 116 if (( lib->queryInterface( IID_TaskbarApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) {
117 TaskbarApplet *applet = new TaskbarApplet; 117 TaskbarApplet *applet = new TaskbarApplet;
118 applets[napplets++] = applet; 118 applets[napplets++] = applet;
119 applet->library = lib; 119 applet->library = lib;
120 applet->iface = iface; 120 applet->iface = iface;
121 121
122 QTranslator *trans = new QTranslator(qApp); 122 QTranslator *trans = new QTranslator(qApp);
123 QString type = (*it).left( (*it).find(".") ); 123 QString type = (*it).left( (*it).find(".") );
124 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; 124 QString tfn = QPEApplication::qpeDir()+"i18n/"+lang+"/"+type+".qm";
125 if ( trans->load( tfn )) 125 if ( trans->load( tfn ))
126 qApp->installTranslator( trans ); 126 qApp->installTranslator( trans );
127 else 127 else
128 delete trans; 128 delete trans;
129 } else { 129 } else {
130 exclude += *it; 130 exclude += *it;
131 delete lib; 131 delete lib;
132 } 132 }
133 } 133 }
134 cfg.writeEntry( "ExcludeApplets", exclude, ',' ); 134 cfg.writeEntry( "ExcludeApplets", exclude, ',' );
135 qsort(applets,napplets,sizeof(applets[0]),compareAppletPositions); 135 qsort(applets,napplets,sizeof(applets[0]),compareAppletPositions);
136 while (napplets--) { 136 while (napplets--) {
137 TaskbarApplet *applet = applets[napplets]; 137 TaskbarApplet *applet = applets[napplets];
138 applet->applet = applet->iface->applet( this ); 138 applet->applet = applet->iface->applet( this );
139 appletList.append(*applet); 139 appletList.append(*applet);
140 } 140 }
141 delete [] applets; 141 delete [] applets;
142#else /* ## FIXME single app */ 142#else /* ## FIXME single app */
143 TaskbarApplet * const applet = new TaskbarApplet(); 143 TaskbarApplet * const applet = new TaskbarApplet();
144 applet->iface = new ClockAppletImpl(); 144 applet->iface = new ClockAppletImpl();
145 applet->applet = applet->iface->applet( this ); 145 applet->applet = applet->iface->applet( this );
146 appletList.append( applet ); 146 appletList.append( applet );
147#endif 147#endif
148 show(); 148 show();
diff --git a/core/multimedia/opieplayer/mediaplayerstate.cpp b/core/multimedia/opieplayer/mediaplayerstate.cpp
index b700cd1..8b0fbbc 100644
--- a/core/multimedia/opieplayer/mediaplayerstate.cpp
+++ b/core/multimedia/opieplayer/mediaplayerstate.cpp
@@ -118,49 +118,49 @@ MediaPlayerDecoder *MediaPlayerState::curDecoder() {
118} 118}
119 119
120 120
121// ### hack to get true sample count 121// ### hack to get true sample count
122MediaPlayerDecoder *MediaPlayerState::libMpeg3Decoder() { 122MediaPlayerDecoder *MediaPlayerState::libMpeg3Decoder() {
123 return libmpeg3decoder; 123 return libmpeg3decoder;
124} 124}
125 125
126// ### hack to get true sample count 126// ### hack to get true sample count
127// MediaPlayerDecoder *MediaPlayerState::libWavDecoder() { 127// MediaPlayerDecoder *MediaPlayerState::libWavDecoder() {
128// return libwavdecoder; 128// return libwavdecoder;
129// } 129// }
130 130
131void MediaPlayerState::loadPlugins() { 131void MediaPlayerState::loadPlugins() {
132 // odebug << "load plugins" << oendl; 132 // odebug << "load plugins" << oendl;
133#ifndef QT_NO_COMPONENT 133#ifndef QT_NO_COMPONENT
134 QValueList<MediaPlayerPlugin>::Iterator mit; 134 QValueList<MediaPlayerPlugin>::Iterator mit;
135 for ( mit = pluginList.begin(); mit != pluginList.end(); ++mit ) { 135 for ( mit = pluginList.begin(); mit != pluginList.end(); ++mit ) {
136 (*mit).iface->release(); 136 (*mit).iface->release();
137 (*mit).library->unload(); 137 (*mit).library->unload();
138 delete (*mit).library; 138 delete (*mit).library;
139 } 139 }
140 pluginList.clear(); 140 pluginList.clear();
141 141
142 QString path = QPEApplication::qpeDir() + "/plugins/codecs"; 142 QString path = QPEApplication::qpeDir() + "plugins/codecs";
143 QDir dir( path, "lib*.so" ); 143 QDir dir( path, "lib*.so" );
144 QStringList list = dir.entryList(); 144 QStringList list = dir.entryList();
145 QStringList::Iterator it; 145 QStringList::Iterator it;
146 for ( it = list.begin(); it != list.end(); ++it ) { 146 for ( it = list.begin(); it != list.end(); ++it ) {
147 MediaPlayerPluginInterface *iface = 0; 147 MediaPlayerPluginInterface *iface = 0;
148 QLibrary *lib = new QLibrary( path + "/" + *it ); 148 QLibrary *lib = new QLibrary( path + "/" + *it );
149// odebug << "querying: " << QString( path + "/" + *it ) << "" << oendl; 149// odebug << "querying: " << QString( path + "/" + *it ) << "" << oendl;
150 150
151 if ( lib->queryInterface( IID_MediaPlayerPlugin, (QUnknownInterface**)&iface ) == QS_OK ) { 151 if ( lib->queryInterface( IID_MediaPlayerPlugin, (QUnknownInterface**)&iface ) == QS_OK ) {
152 152
153// odebug << "loading: " << QString( path + "/" + *it ) << "" << oendl; 153// odebug << "loading: " << QString( path + "/" + *it ) << "" << oendl;
154 154
155 MediaPlayerPlugin plugin; 155 MediaPlayerPlugin plugin;
156 plugin.library = lib; 156 plugin.library = lib;
157 plugin.iface = iface; 157 plugin.iface = iface;
158 plugin.decoder = plugin.iface->decoder(); 158 plugin.decoder = plugin.iface->decoder();
159 plugin.encoder = plugin.iface->encoder(); 159 plugin.encoder = plugin.iface->encoder();
160 pluginList.append( plugin ); 160 pluginList.append( plugin );
161 161
162 // ### hack to get true sample count 162 // ### hack to get true sample count
163 if ( plugin.decoder->pluginName() == QString("LibMpeg3Plugin") ) 163 if ( plugin.decoder->pluginName() == QString("LibMpeg3Plugin") )
164 libmpeg3decoder = plugin.decoder; 164 libmpeg3decoder = plugin.decoder;
165 165
166 } else { 166 } else {
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index 46aeff2..db2bf1b 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -1361,49 +1361,49 @@ void PlayListWidget::doBlank() {
1361 } 1361 }
1362} 1362}
1363 1363
1364void PlayListWidget::doUnblank() { 1364void PlayListWidget::doUnblank() {
1365 // this crashes opieplayer with a segfault 1365 // this crashes opieplayer with a segfault
1366 // int fd; 1366 // int fd;
1367 // fd=open("/dev/fb0",O_RDWR); 1367 // fd=open("/dev/fb0",O_RDWR);
1368 // odebug << "do unblanking" << oendl; 1368 // odebug << "do unblanking" << oendl;
1369 if (fd != -1) { 1369 if (fd != -1) {
1370 ioctl(fd,FBIOBLANK,0); 1370 ioctl(fd,FBIOBLANK,0);
1371 close(fd); 1371 close(fd);
1372 } 1372 }
1373 QCopEnvelope h("QPE/System", "setBacklight(int)"); 1373 QCopEnvelope h("QPE/System", "setBacklight(int)");
1374 h <<-3;// v[1]; // -3 Force on 1374 h <<-3;// v[1]; // -3 Force on
1375} 1375}
1376 1376
1377void PlayListWidget::populateSkinsMenu() { 1377void PlayListWidget::populateSkinsMenu() {
1378 int item = 0; 1378 int item = 0;
1379 defaultSkinIndex = 0; 1379 defaultSkinIndex = 0;
1380 QString skinName; 1380 QString skinName;
1381 Config cfg( "OpiePlayer" ); 1381 Config cfg( "OpiePlayer" );
1382 cfg.setGroup("Options" ); 1382 cfg.setGroup("Options" );
1383 QString skin = cfg.readEntry( "Skin", "default" ); 1383 QString skin = cfg.readEntry( "Skin", "default" );
1384 1384
1385 QDir skinsDir( QPEApplication::qpeDir() + "/pics/opieplayer2/skins" ); 1385 QDir skinsDir( QPEApplication::qpeDir() + "pics/opieplayer2/skins" );
1386 skinsDir.setFilter( QDir::Dirs ); 1386 skinsDir.setFilter( QDir::Dirs );
1387 skinsDir.setSorting(QDir::Name ); 1387 skinsDir.setSorting(QDir::Name );
1388 const QFileInfoList *skinslist = skinsDir.entryInfoList(); 1388 const QFileInfoList *skinslist = skinsDir.entryInfoList();
1389 QFileInfoListIterator it( *skinslist ); 1389 QFileInfoListIterator it( *skinslist );
1390 QFileInfo *fi; 1390 QFileInfo *fi;
1391 while ( ( fi = it.current() ) ) { 1391 while ( ( fi = it.current() ) ) {
1392 skinName = fi->fileName(); 1392 skinName = fi->fileName();
1393 // odebug << fi->fileName() << oendl; 1393 // odebug << fi->fileName() << oendl;
1394 if( skinName != "." && skinName != ".." && skinName !="CVS" ) { 1394 if( skinName != "." && skinName != ".." && skinName !="CVS" ) {
1395 item = skinsMenu->insertItem( fi->fileName() ) ; 1395 item = skinsMenu->insertItem( fi->fileName() ) ;
1396 } 1396 }
1397 if( skinName == "default" ) { 1397 if( skinName == "default" ) {
1398 defaultSkinIndex = item; 1398 defaultSkinIndex = item;
1399 } 1399 }
1400 if( skinName == skin ) { 1400 if( skinName == skin ) {
1401 skinsMenu->setItemChecked( item, TRUE ); 1401 skinsMenu->setItemChecked( item, TRUE );
1402 } 1402 }
1403 ++it; 1403 ++it;
1404 } 1404 }
1405} 1405}
1406 1406
1407void PlayListWidget::skinsMenuActivated( int item ) { 1407void PlayListWidget::skinsMenuActivated( int item ) {
1408 for( int i = defaultSkinIndex; i > defaultSkinIndex - static_cast<int>(skinsMenu->count()); i-- ) { 1408 for( int i = defaultSkinIndex; i > defaultSkinIndex - static_cast<int>(skinsMenu->count()); i-- ) {
1409 skinsMenu->setItemChecked( i, FALSE ); 1409 skinsMenu->setItemChecked( i, FALSE );
diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp
index 2396ed5..c545511 100644
--- a/core/multimedia/opieplayer/videowidget.cpp
+++ b/core/multimedia/opieplayer/videowidget.cpp
@@ -77,49 +77,49 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
77 QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) 77 QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 )
78{ 78{
79 setCaption( tr("OpiePlayer") ); 79 setCaption( tr("OpiePlayer") );
80 Config cfg("OpiePlayer"); 80 Config cfg("OpiePlayer");
81 81
82 cfg.setGroup("Options"); 82 cfg.setGroup("Options");
83 skin = cfg.readEntry("Skin","default"); 83 skin = cfg.readEntry("Skin","default");
84 84
85 QString skinPath; 85 QString skinPath;
86 skinPath = "opieplayer2/skins/" + skin; 86 skinPath = "opieplayer2/skins/" + skin;
87 if(!QDir(QString(getenv("OPIEDIR")) +"/pics/"+skinPath).exists()) 87 if(!QDir(QString(getenv("OPIEDIR")) +"/pics/"+skinPath).exists())
88 skinPath = "opieplayer2/skins/default"; 88 skinPath = "opieplayer2/skins/default";
89 89
90 90
91// QString skinPath = "opieplayer2/skins/" + skin; 91// QString skinPath = "opieplayer2/skins/" + skin;
92 92
93 pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); 93 pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
94 imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); 94 imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) );
95 imgDn = new QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); 95 imgDn = new QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) );
96 96
97 imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); 97 imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 );
98 imgButtonMask->fill( 0 ); 98 imgButtonMask->fill( 0 );
99 99
100 for ( int i = 0; i < 7; i++ ) { 100 for ( int i = 0; i < 7; i++ ) {
101 QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + 101 QString filename = QString( QPEApplication::qpeDir() + "pics/" + skinPath +
102 "/skinV_mask_" + skinV_mask_file_names[i] + ".png" ); 102 "/skinV_mask_" + skinV_mask_file_names[i] + ".png" );
103 // odebug << "loading "+filename << oendl; 103 // odebug << "loading "+filename << oendl;
104 masks[i] = new QBitmap( filename ); 104 masks[i] = new QBitmap( filename );
105 105
106 if ( !masks[i]->isNull() ) { 106 if ( !masks[i]->isNull() ) {
107 QImage imgMask = masks[i]->convertToImage(); 107 QImage imgMask = masks[i]->convertToImage();
108 uchar **dest = imgButtonMask->jumpTable(); 108 uchar **dest = imgButtonMask->jumpTable();
109 for ( int y = 0; y < imgUp->height(); y++ ) { 109 for ( int y = 0; y < imgUp->height(); y++ ) {
110 uchar *line = dest[y]; 110 uchar *line = dest[y];
111 for ( int x = 0; x < imgUp->width(); x++ ) { 111 for ( int x = 0; x < imgUp->width(); x++ ) {
112 if ( !qRed( imgMask.pixel( x, y ) ) ) 112 if ( !qRed( imgMask.pixel( x, y ) ) )
113 line[x] = i + 1; 113 line[x] = i + 1;
114 } 114 }
115 } 115 }
116 } 116 }
117 } 117 }
118 for ( int i = 0; i < 7; i++ ) { 118 for ( int i = 0; i < 7; i++ ) {
119 buttonPixUp[i] = NULL; 119 buttonPixUp[i] = NULL;
120 buttonPixDown[i] = NULL; 120 buttonPixDown[i] = NULL;
121 } 121 }
122 122
123 QWidget *d = QApplication::desktop(); 123 QWidget *d = QApplication::desktop();
124 int width = d->width(); 124 int width = d->width();
125 int height = d->height(); 125 int height = d->height();
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp
index f0a8ba2..0699d0a 100644
--- a/core/opie-login/main.cpp
+++ b/core/opie-login/main.cpp
@@ -159,49 +159,49 @@ int main ( int argc, char **argv )
159 159
160 ::syslog ( LOG_ERR, "Opie was killed by a signal #%d", killedbysig ); 160 ::syslog ( LOG_ERR, "Opie was killed by a signal #%d", killedbysig );
161 161
162 QWSServer::setDesktopBackground ( QImage ( )); 162 QWSServer::setDesktopBackground ( QImage ( ));
163 QApplication *app = new QApplication ( argc, argv, QApplication::GuiServer ); 163 QApplication *app = new QApplication ( argc, argv, QApplication::GuiServer );
164 app-> setFont ( QFont ( "Helvetica", 10 )); 164 app-> setFont ( QFont ( "Helvetica", 10 ));
165 app-> setStyle ( new QPEStyle ( )); 165 app-> setStyle ( new QPEStyle ( ));
166 166
167 // const char *sig = ::strsignal ( killedbysig ); 167 // const char *sig = ::strsignal ( killedbysig );
168 const char *sig = ::sys_siglist[killedbysig]; 168 const char *sig = ::sys_siglist[killedbysig];
169 QLabel *l = new QLabel ( 0, "sig", Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_Tool ); 169 QLabel *l = new QLabel ( 0, "sig", Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_Tool );
170 l-> setText ( LoginWindowImpl::tr( "Opie was terminated\nby an uncaught signal\n(%1)\n" ). arg ( sig )); 170 l-> setText ( LoginWindowImpl::tr( "Opie was terminated\nby an uncaught signal\n(%1)\n" ). arg ( sig ));
171 l-> setAlignment ( Qt::AlignCenter ); 171 l-> setAlignment ( Qt::AlignCenter );
172 l-> move ( 0, 0 ); 172 l-> move ( 0, 0 );
173 l-> resize ( app-> desktop ( )-> width ( ), app-> desktop ( )-> height ( )); 173 l-> resize ( app-> desktop ( )-> width ( ), app-> desktop ( )-> height ( ));
174 l-> show ( ); 174 l-> show ( );
175 QTimer::singleShot ( 3000, app, SLOT( quit())); 175 QTimer::singleShot ( 3000, app, SLOT( quit()));
176 app-> exec ( ); 176 app-> exec ( );
177 delete app; 177 delete app;
178 qApp = 0; 178 qApp = 0;
179 } 179 }
180 } 180 }
181 else { 181 else {
182 if ( !autolog ) { 182 if ( !autolog ) {
183 QString confFile=QPEApplication::qpeDir() + "/etc/opie-login.conf"; 183 QString confFile=QPEApplication::qpeDir() + "etc/opie-login.conf";
184 Config cfg ( confFile, Config::File ); 184 Config cfg ( confFile, Config::File );
185 cfg. setGroup ( "General" ); 185 cfg. setGroup ( "General" );
186 QString user = cfg. readEntry ( "AutoLogin" ); 186 QString user = cfg. readEntry ( "AutoLogin" );
187 187
188 if ( !user. isEmpty ( )) 188 if ( !user. isEmpty ( ))
189 autolog = ::strdup ( user. latin1 ( )); 189 autolog = ::strdup ( user. latin1 ( ));
190 } 190 }
191 191
192 if ( autolog && !userExited ) { 192 if ( autolog && !userExited ) {
193 193
194 QWSServer::setDesktopBackground( QImage() ); 194 QWSServer::setDesktopBackground( QImage() );
195 ODevice::inst ( )-> setDisplayStatus ( true ); 195 ODevice::inst ( )-> setDisplayStatus ( true );
196 ODevice::inst ( )-> setSoftSuspend ( false ); 196 ODevice::inst ( )-> setSoftSuspend ( false );
197 LoginApplication *app = new LoginApplication ( argc, argv, ppid ); 197 LoginApplication *app = new LoginApplication ( argc, argv, ppid );
198 LoginApplication::setLoginAs ( autolog ); 198 LoginApplication::setLoginAs ( autolog );
199 199
200 200
201 if ( LoginApplication::changeIdentity ( )) 201 if ( LoginApplication::changeIdentity ( ))
202 ::exit ( LoginApplication::login ( )); 202 ::exit ( LoginApplication::login ( ));
203 else 203 else
204 ::exit ( 0 ); 204 ::exit ( 0 );
205 } 205 }
206 else { 206 else {
207 ::exit ( login_main ( argc, argv, ppid )); 207 ::exit ( login_main ( argc, argv, ppid ));
diff --git a/core/settings/launcher/menusettings.cpp b/core/settings/launcher/menusettings.cpp
index 2b64c47..55bf358 100644
--- a/core/settings/launcher/menusettings.cpp
+++ b/core/settings/launcher/menusettings.cpp
@@ -60,67 +60,67 @@ MenuSettings::MenuSettings ( QWidget *parent, const char *name )
60 m_list-> header ( )-> hide ( ); 60 m_list-> header ( )-> hide ( );
61 61
62 lay-> addWidget ( m_list ); 62 lay-> addWidget ( m_list );
63 63
64 m_menutabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this ); 64 m_menutabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this );
65 lay-> addWidget ( m_menutabs ); 65 lay-> addWidget ( m_menutabs );
66 66
67 m_menusubpopup = new QCheckBox ( tr( "Show Applications in Subpopups" ), this ); 67 m_menusubpopup = new QCheckBox ( tr( "Show Applications in Subpopups" ), this );
68 lay-> addWidget ( m_menusubpopup ); 68 lay-> addWidget ( m_menusubpopup );
69 69
70 QWhatsThis::add ( m_list, tr( "Check the applets that you want to have included in the O-Menu." )); 70 QWhatsThis::add ( m_list, tr( "Check the applets that you want to have included in the O-Menu." ));
71 QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher Tabs as menus in the O-Menu." )); 71 QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher Tabs as menus in the O-Menu." ));
72 72
73 connect ( m_list, SIGNAL( clicked(QListViewItem*)), this, SLOT( appletChanged())); 73 connect ( m_list, SIGNAL( clicked(QListViewItem*)), this, SLOT( appletChanged()));
74 74
75 init ( ); 75 init ( );
76} 76}
77 77
78void MenuSettings::init ( ) 78void MenuSettings::init ( )
79{ 79{
80 Config cfg ( "StartMenu" ); 80 Config cfg ( "StartMenu" );
81 cfg. setGroup ( "Applets" ); 81 cfg. setGroup ( "Applets" );
82 QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); 82 QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' );
83 83
84 QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; 84 QString path = QPEApplication::qpeDir ( ) + "plugins/applets";
85#ifdef Q_OS_MACX 85#ifdef Q_OS_MACX
86 QStringList list = QDir ( path, "lib*.dylib" ). entryList ( ); 86 QStringList list = QDir ( path, "lib*.dylib" ). entryList ( );
87#else 87#else
88 QStringList list = QDir ( path, "lib*.so" ). entryList ( ); 88 QStringList list = QDir ( path, "lib*.so" ). entryList ( );
89#endif /* Q_OS_MACX */ 89#endif /* Q_OS_MACX */
90 90
91 for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { 91 for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) {
92 QString name; 92 QString name;
93 QPixmap icon; 93 QPixmap icon;
94 MenuAppletInterface *iface = 0; 94 MenuAppletInterface *iface = 0;
95 95
96 QLibrary *lib = new QLibrary ( path + "/" + *it ); 96 QLibrary *lib = new QLibrary ( path + "/" + *it );
97 lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**) &iface ); 97 lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**) &iface );
98 if ( iface ) { 98 if ( iface ) {
99 QString lang = getenv( "LANG" ); 99 QString lang = getenv( "LANG" );
100 QTranslator *trans = new QTranslator ( qApp ); 100 QTranslator *trans = new QTranslator ( qApp );
101 QString type = (*it). left ((*it). find (".")); 101 QString type = (*it). left ((*it). find ("."));
102 QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm"; 102 QString tfn = QPEApplication::qpeDir ( ) + "i18n/" + lang + "/" + type + ".qm";
103 if ( trans-> load ( tfn )) 103 if ( trans-> load ( tfn ))
104 qApp-> installTranslator ( trans ); 104 qApp-> installTranslator ( trans );
105 else 105 else
106 delete trans; 106 delete trans;
107 name = iface-> name ( ); 107 name = iface-> name ( );
108 icon = iface-> icon ( ). pixmap ( QIconSet::Small, QIconSet::Normal ); 108 icon = iface-> icon ( ). pixmap ( QIconSet::Small, QIconSet::Normal );
109 iface-> release ( ); 109 iface-> release ( );
110 lib-> unload ( ); 110 lib-> unload ( );
111 111
112 QCheckListItem *item; 112 QCheckListItem *item;
113 item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); 113 item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox );
114 if ( !icon. isNull ( )) 114 if ( !icon. isNull ( ))
115 item-> setPixmap ( 0, icon ); 115 item-> setPixmap ( 0, icon );
116 item-> setOn ( exclude. find ( *it ) == exclude. end ( )); 116 item-> setOn ( exclude. find ( *it ) == exclude. end ( ));
117 m_applets [*it] = item; 117 m_applets [*it] = item;
118 } else { 118 } else {
119 delete lib; 119 delete lib;
120 } 120 }
121 } 121 }
122 122
123 cfg. setGroup ( "Menu" ); 123 cfg. setGroup ( "Menu" );
124 m_menutabs->setChecked( cfg.readBoolEntry( "LauncherTabs", true ) ); 124 m_menutabs->setChecked( cfg.readBoolEntry( "LauncherTabs", true ) );
125 m_menusubpopup->setChecked( cfg.readBoolEntry( "LauncherSubPopup", true ) ); 125 m_menusubpopup->setChecked( cfg.readBoolEntry( "LauncherSubPopup", true ) );
126 m_menusubpopup->setEnabled( m_menutabs->isChecked() ); 126 m_menusubpopup->setEnabled( m_menutabs->isChecked() );
diff --git a/core/settings/launcher/taskbarsettings.cpp b/core/settings/launcher/taskbarsettings.cpp
index 8dd9e97..861ff3a 100644
--- a/core/settings/launcher/taskbarsettings.cpp
+++ b/core/settings/launcher/taskbarsettings.cpp
@@ -56,70 +56,70 @@ TaskbarSettings::TaskbarSettings ( QWidget *parent, const char *name )
56 QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); 56 QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 );
57 57
58 QLabel *l = new QLabel ( tr( "Load applets in Taskbar:" ), this ); 58 QLabel *l = new QLabel ( tr( "Load applets in Taskbar:" ), this );
59 lay-> addWidget ( l ); 59 lay-> addWidget ( l );
60 60
61 m_list = new QListView ( this ); 61 m_list = new QListView ( this );
62 m_list-> addColumn ( "foobar" ); 62 m_list-> addColumn ( "foobar" );
63 m_list-> header ( )-> hide ( ); 63 m_list-> header ( )-> hide ( );
64 64
65 lay-> addWidget ( m_list ); 65 lay-> addWidget ( m_list );
66 66
67 QWhatsThis::add ( m_list, tr( "Check the applets that you want displayed in the Taskbar." )); 67 QWhatsThis::add ( m_list, tr( "Check the applets that you want displayed in the Taskbar." ));
68 68
69 connect ( m_list, SIGNAL( clicked(QListViewItem*)), this, SLOT( appletChanged())); 69 connect ( m_list, SIGNAL( clicked(QListViewItem*)), this, SLOT( appletChanged()));
70 70
71 init ( ); 71 init ( );
72} 72}
73 73
74void TaskbarSettings::init ( ) 74void TaskbarSettings::init ( )
75{ 75{
76 Config cfg ( "Taskbar" ); 76 Config cfg ( "Taskbar" );
77 cfg. setGroup ( "Applets" ); 77 cfg. setGroup ( "Applets" );
78 QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); 78 QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' );
79 79
80 QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; 80 QString path = QPEApplication::qpeDir ( ) + "plugins/applets";
81#ifdef Q_OS_MACX 81#ifdef Q_OS_MACX
82 QStringList list = QDir ( path, "lib*.dylib" ). entryList ( ); 82 QStringList list = QDir ( path, "lib*.dylib" ). entryList ( );
83#else 83#else
84 QStringList list = QDir ( path, "lib*.so" ). entryList ( ); 84 QStringList list = QDir ( path, "lib*.so" ). entryList ( );
85#endif /* Q_OS_MACX */ 85#endif /* Q_OS_MACX */
86 86
87 for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { 87 for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) {
88 QString name; 88 QString name;
89 QPixmap icon; 89 QPixmap icon;
90 TaskbarNamedAppletInterface *iface = 0; 90 TaskbarNamedAppletInterface *iface = 0;
91 91
92 owarn << "Load applet: " << (*it) << "" << oendl; 92 owarn << "Load applet: " << (*it) << "" << oendl;
93 QLibrary *lib = new QLibrary ( path + "/" + *it ); 93 QLibrary *lib = new QLibrary ( path + "/" + *it );
94 lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**) &iface ); 94 lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**) &iface );
95 owarn << "<1>" << oendl; 95 owarn << "<1>" << oendl;
96 if ( iface ) { 96 if ( iface ) {
97 owarn << "<2>" << oendl; 97 owarn << "<2>" << oendl;
98 QString lang = getenv( "LANG" ); 98 QString lang = getenv( "LANG" );
99 QTranslator *trans = new QTranslator ( qApp ); 99 QTranslator *trans = new QTranslator ( qApp );
100 QString type = (*it). left ((*it). find (".")); 100 QString type = (*it). left ((*it). find ("."));
101 QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm"; 101 QString tfn = QPEApplication::qpeDir ( ) + "i18n/" + lang + "/" + type + ".qm";
102 if ( trans-> load ( tfn )) 102 if ( trans-> load ( tfn ))
103 qApp-> installTranslator ( trans ); 103 qApp-> installTranslator ( trans );
104 else 104 else
105 delete trans; 105 delete trans;
106 name = iface-> name ( ); 106 name = iface-> name ( );
107 icon = iface-> icon ( ); 107 icon = iface-> icon ( );
108 iface-> release ( ); 108 iface-> release ( );
109 } 109 }
110 owarn << "<3>" << oendl; 110 owarn << "<3>" << oendl;
111 if ( !iface ) { 111 if ( !iface ) {
112 owarn << "<4>" << oendl; 112 owarn << "<4>" << oendl;
113 lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**) &iface ); 113 lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**) &iface );
114 114
115 if ( iface ) { 115 if ( iface ) {
116 owarn << "<5>" << oendl; 116 owarn << "<5>" << oendl;
117 name = (*it). mid ( 3 ); 117 name = (*it). mid ( 3 );
118 owarn << "Found applet: " << name << "" << oendl; 118 owarn << "Found applet: " << name << "" << oendl;
119#ifdef Q_OS_MACX 119#ifdef Q_OS_MACX
120 int sep = name. find( ".dylib" ); 120 int sep = name. find( ".dylib" );
121#else 121#else
122 int sep = name. find( ".so" ); 122 int sep = name. find( ".so" );
123#endif /* Q_OS_MACX */ 123#endif /* Q_OS_MACX */
124 if ( sep > 0 ) 124 if ( sep > 0 )
125 name. truncate ( sep ); 125 name. truncate ( sep );
diff --git a/core/settings/security/multiauthconfig.cpp b/core/settings/security/multiauthconfig.cpp
index e545e17..45d691b 100644
--- a/core/settings/security/multiauthconfig.cpp
+++ b/core/settings/security/multiauthconfig.cpp
@@ -133,49 +133,49 @@ static void test_and_start() {
133 pcfg.setGroup( "Misc" ); 133 pcfg.setGroup( "Misc" );
134 bool protectConfigDialog = ! pcfg.readBoolEntry("noProtectConfig", true); 134 bool protectConfigDialog = ! pcfg.readBoolEntry("noProtectConfig", true);
135 135
136 if (protectConfigDialog && Opie::Security::Internal::runPlugins() != 0) { 136 if (protectConfigDialog && Opie::Security::Internal::runPlugins() != 0) {
137 owarn << "authentication failed, not showing opie-security" << oendl; 137 owarn << "authentication failed, not showing opie-security" << oendl;
138 exit( -1 ); 138 exit( -1 );
139 } 139 }
140} 140}
141 141
142 142
143 143
144 MultiauthConfig::MultiauthConfig(QWidget* par, const char* w = "MultiauthConfig dialog", WFlags f = 0) 144 MultiauthConfig::MultiauthConfig(QWidget* par, const char* w = "MultiauthConfig dialog", WFlags f = 0)
145: QDialog(par, w, TRUE, f), 145: QDialog(par, w, TRUE, f),
146 m_mainTW(0), m_pluginListView(0), m_pluginListWidget(0), 146 m_mainTW(0), m_pluginListView(0), m_pluginListWidget(0),
147 m_generalConfig(0), m_loginWidget(0), m_syncWidget(0), 147 m_generalConfig(0), m_loginWidget(0), m_syncWidget(0),
148 m_nbSuccessReq(0), m_plugins_changed(false) 148 m_nbSuccessReq(0), m_plugins_changed(false)
149{ 149{
150 /* Initializes the global configuration window 150 /* Initializes the global configuration window
151 */ 151 */
152 test_and_start(); 152 test_and_start();
153 153
154 /* Checks (and memorizes) if any authentication plugins are 154 /* Checks (and memorizes) if any authentication plugins are
155 * installed on the system 155 * installed on the system
156 */ 156 */
157 QString path = QPEApplication::qpeDir() + "/plugins/security"; 157 QString path = QPEApplication::qpeDir() + "plugins/security";
158 QDir dir( path, "lib*.so" ); 158 QDir dir( path, "lib*.so" );
159 QStringList list = dir.entryList(); 159 QStringList list = dir.entryList();
160 160
161 m_pluginsInstalled = ! list.isEmpty(); 161 m_pluginsInstalled = ! list.isEmpty();
162 if (m_pluginsInstalled == false) 162 if (m_pluginsInstalled == false)
163 owarn << "no authentication plugins installed! Talking about it in the last tab..." << oendl; 163 owarn << "no authentication plugins installed! Talking about it in the last tab..." << oendl;
164 164
165 setCaption( tr( "Security configuration" ) ); 165 setCaption( tr( "Security configuration" ) );
166 QVBoxLayout *layout = new QVBoxLayout( this ); 166 QVBoxLayout *layout = new QVBoxLayout( this );
167 m_mainTW = new Opie::Ui::OTabWidget( this, "main tab widget" ); 167 m_mainTW = new Opie::Ui::OTabWidget( this, "main tab widget" );
168 layout->addWidget(m_mainTW); 168 layout->addWidget(m_mainTW);
169 169
170 if (m_pluginsInstalled) 170 if (m_pluginsInstalled)
171 { 171 {
172 m_pluginListWidget = new QWidget(m_mainTW, "plugin list widget"); 172 m_pluginListWidget = new QWidget(m_mainTW, "plugin list widget");
173 QVBoxLayout * pluginListLayout = new QVBoxLayout(m_pluginListWidget); 173 QVBoxLayout * pluginListLayout = new QVBoxLayout(m_pluginListWidget);
174 pluginListLayout->setSpacing(6); 174 pluginListLayout->setSpacing(6);
175 pluginListLayout->setMargin(11); 175 pluginListLayout->setMargin(11);
176 QLabel * pluginListTitle = new QLabel( tr( "Load which plugins in what order:" ), m_pluginListWidget ); 176 QLabel * pluginListTitle = new QLabel( tr( "Load which plugins in what order:" ), m_pluginListWidget );
177 pluginListLayout->addWidget(pluginListTitle); 177 pluginListLayout->addWidget(pluginListTitle);
178 QHBox * pluginListHB = new QHBox(m_pluginListWidget); 178 QHBox * pluginListHB = new QHBox(m_pluginListWidget);
179 pluginListLayout->addWidget(pluginListHB); 179 pluginListLayout->addWidget(pluginListHB);
180 180
181 m_pluginListView = new QListView(pluginListHB); 181 m_pluginListView = new QListView(pluginListHB);
@@ -353,49 +353,49 @@ void MultiauthConfig::readConfig()
353 } 353 }
354 /* 354 /*
355 cfg.setGroup("Remote"); 355 cfg.setGroup("Remote");
356 if ( telnetAvailable() ) 356 if ( telnetAvailable() )
357 telnet->setChecked(cfg.readEntry("allow_telnet")); 357 telnet->setChecked(cfg.readEntry("allow_telnet"));
358 else 358 else
359 telnet->hide(); 359 telnet->hide();
360 360
361 if ( sshAvailable() ) 361 if ( sshAvailable() )
362 ssh->setChecked(cfg.readEntry("allow_ssh")); 362 ssh->setChecked(cfg.readEntry("allow_ssh"));
363 else 363 else
364 ssh->hide(); 364 ssh->hide();
365 */ 365 */
366 366
367 // release the Config handler 367 // release the Config handler
368 delete pcfg; 368 delete pcfg;
369 // indeed, selectNet will open the config file... 369 // indeed, selectNet will open the config file...
370 selectNet(auth_peer,auth_peer_bits,TRUE); 370 selectNet(auth_peer,auth_peer_bits,TRUE);
371 371
372 connect( m_syncWidget->syncnet, SIGNAL(textChanged(const QString&)), 372 connect( m_syncWidget->syncnet, SIGNAL(textChanged(const QString&)),
373 this, SLOT(setSyncNet(const QString&))); 373 this, SLOT(setSyncNet(const QString&)));
374 374
375 375
376 376
377 QString configFile = QPEApplication::qpeDir() + "/etc/opie-login.conf"; 377 QString configFile = QPEApplication::qpeDir() + "etc/opie-login.conf";
378 Config loginCfg(configFile,Config::File); 378 Config loginCfg(configFile,Config::File);
379 379
380 loginCfg.setGroup("General"); 380 loginCfg.setGroup("General");
381 autoLoginName=loginCfg.readEntry("AutoLogin",""); 381 autoLoginName=loginCfg.readEntry("AutoLogin","");
382 382
383 if (autoLoginName.stripWhiteSpace().isEmpty()) { 383 if (autoLoginName.stripWhiteSpace().isEmpty()) {
384 autoLogin=false; 384 autoLogin=false;
385 } else { 385 } else {
386 autoLogin=true; 386 autoLogin=true;
387 } 387 }
388 388
389 389
390 connect(m_loginWidget->autologinToggle, SIGNAL(toggled(bool)), this, SLOT(toggleAutoLogin(bool))); 390 connect(m_loginWidget->autologinToggle, SIGNAL(toggled(bool)), this, SLOT(toggleAutoLogin(bool)));
391 connect(m_loginWidget->userlist, SIGNAL(activated(int)), this, SLOT(changeLoginName(int))); 391 connect(m_loginWidget->userlist, SIGNAL(activated(int)), this, SLOT(changeLoginName(int)));
392 connect(m_syncWidget->restoredefaults,SIGNAL(clicked()), this, SLOT(restoreDefaults())); 392 connect(m_syncWidget->restoredefaults,SIGNAL(clicked()), this, SLOT(restoreDefaults()));
393 connect(m_syncWidget->deleteentry,SIGNAL(clicked()), this, SLOT(deleteListEntry())); 393 connect(m_syncWidget->deleteentry,SIGNAL(clicked()), this, SLOT(deleteListEntry()));
394 394
395 loadUsers(); 395 loadUsers();
396 updateGUI(); 396 updateGUI();
397 397
398} 398}
399 399
400void MultiauthConfig::writeConfig() 400void MultiauthConfig::writeConfig()
401{ 401{
@@ -468,69 +468,69 @@ void MultiauthConfig::writeConfig()
468 value = 0x01; 468 value = 0x01;
469 break; 469 break;
470 case 1: 470 case 1:
471 value = 0x02; 471 value = 0x02;
472 break; 472 break;
473 case 2: 473 case 2:
474 value = 0x04; 474 value = 0x04;
475 break; 475 break;
476 } 476 }
477 pcfg->setGroup("SyncMode"); 477 pcfg->setGroup("SyncMode");
478 pcfg->writeEntry( "Mode", value ); 478 pcfg->writeEntry( "Mode", value );
479 479
480 /* 480 /*
481 pcfg->setGroup("Remote"); 481 pcfg->setGroup("Remote");
482 if ( telnetAvailable() ) 482 if ( telnetAvailable() )
483 pcfg->writeEntry("allow_telnet",telnet->isChecked()); 483 pcfg->writeEntry("allow_telnet",telnet->isChecked());
484 if ( sshAvailable() ) 484 if ( sshAvailable() )
485 pcfg->writeEntry("allow_ssh",ssh->isChecked()); 485 pcfg->writeEntry("allow_ssh",ssh->isChecked());
486 // ### write ssh/telnet sys config files 486 // ### write ssh/telnet sys config files
487 */ 487 */
488 488
489 //release the Config handler 489 //release the Config handler
490 delete pcfg; 490 delete pcfg;
491 491
492 QString configFile = QPEApplication::qpeDir() + "/etc/opie-login.conf"; 492 QString configFile = QPEApplication::qpeDir() + "etc/opie-login.conf";
493 Config loginCfg(configFile,Config::File); 493 Config loginCfg(configFile,Config::File);
494 loginCfg.setGroup("General"); 494 loginCfg.setGroup("General");
495 495
496 if (autoLogin) { 496 if (autoLogin) {
497 loginCfg.writeEntry("AutoLogin",autoLoginName); 497 loginCfg.writeEntry("AutoLogin",autoLoginName);
498 } else { 498 } else {
499 loginCfg.removeEntry("AutoLogin"); 499 loginCfg.removeEntry("AutoLogin");
500 } 500 }
501 501
502} 502}
503 503
504/// slot used to record the fact plugins order has been modified 504/// slot used to record the fact plugins order has been modified
505void MultiauthConfig::pluginsChanged() { 505void MultiauthConfig::pluginsChanged() {
506 m_plugins_changed = true; 506 m_plugins_changed = true;
507} 507}
508 508
509/// loads each multiauth plugin 509/// loads each multiauth plugin
510void MultiauthConfig::loadPlugins() { 510void MultiauthConfig::loadPlugins() {
511 511
512 QString path = QPEApplication::qpeDir() + "/plugins/security"; 512 QString path = QPEApplication::qpeDir() + "plugins/security";
513 QDir dir( path, "lib*.so" ); 513 QDir dir( path, "lib*.so" );
514 514
515 QStringList list = dir.entryList(); 515 QStringList list = dir.entryList();
516 QStringList::Iterator it; 516 QStringList::Iterator it;
517 517
518 // temporary list used to sort plugins 518 // temporary list used to sort plugins
519 QMap<QString, MultiauthPlugin> sortList; 519 QMap<QString, MultiauthPlugin> sortList;
520 520
521 for ( it = list.begin(); it != list.end(); ++it ) { 521 for ( it = list.begin(); it != list.end(); ++it ) {
522 QInterfacePtr<MultiauthPluginInterface> iface; 522 QInterfacePtr<MultiauthPluginInterface> iface;
523 QLibrary *lib = new QLibrary( path + "/" + *it ); 523 QLibrary *lib = new QLibrary( path + "/" + *it );
524 QString libPath(path + "/" + *it); 524 QString libPath(path + "/" + *it);
525 525
526 if ( lib->queryInterface( IID_MultiauthPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { 526 if ( lib->queryInterface( IID_MultiauthPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
527 MultiauthPlugin plugin; 527 MultiauthPlugin plugin;
528 plugin.library = lib; 528 plugin.library = lib;
529 plugin.iface = iface; 529 plugin.iface = iface;
530 plugin.name = QString(*it); 530 plugin.name = QString(*it);
531 531
532 // find out if plugins should be launched 532 // find out if plugins should be launched
533 if ( m_excludePlugins.grep( *it ).isEmpty() ) { 533 if ( m_excludePlugins.grep( *it ).isEmpty() ) {
534 plugin.active = true; 534 plugin.active = true;
535 } else { 535 } else {
536 plugin.active = false; 536 plugin.active = false;
diff --git a/core/tools/quicklauncher/dropins.h b/core/tools/quicklauncher/dropins.h
index a9664f8..df364ce 100644
--- a/core/tools/quicklauncher/dropins.h
+++ b/core/tools/quicklauncher/dropins.h
@@ -24,48 +24,48 @@ namespace QuickPrivate {
24 QMap<QUnknownInterface*, QLibrary*> libs; 24 QMap<QUnknownInterface*, QLibrary*> libs;
25 }; 25 };
26 26
27 /* 27 /*
28 * We can skip installing a Translator here because Opies QPEApplication 28 * We can skip installing a Translator here because Opies QPEApplication
29 * will do that in initApp for us as well 29 * will do that in initApp for us as well
30 */ 30 */
31 QRESULT PluginLoader::queryInterface( const QString& libFile, const QUuid& uuid, QUnknownInterface** iface ) { 31 QRESULT PluginLoader::queryInterface( const QString& libFile, const QUuid& uuid, QUnknownInterface** iface ) {
32 QRESULT res = QS_FALSE; 32 QRESULT res = QS_FALSE;
33 *iface = 0; 33 *iface = 0;
34 34
35 // This code is very platform specific.. We should find better 35 // This code is very platform specific.. We should find better
36 // solutions to handle names.. Maybe one central function would be 36 // solutions to handle names.. Maybe one central function would be
37 // better than checking this ".so" stuff all around in the sources.. 37 // better than checking this ".so" stuff all around in the sources..
38 // (eilers) 38 // (eilers)
39 39
40 // Below lines from TT then mine again 40 // Below lines from TT then mine again
41 QString name = libFile; 41 QString name = libFile;
42 if ( libFile.findRev(".so") == (int)libFile.length()-3 ) { 42 if ( libFile.findRev(".so") == (int)libFile.length()-3 ) {
43 name = libFile.left( libFile.length()-3 ); 43 name = libFile.left( libFile.length()-3 );
44 if ( name.find( "lib" ) == 0 ) 44 if ( name.find( "lib" ) == 0 )
45 name = name.mid( 3 ); 45 name = name.mid( 3 );
46 } 46 }
47#ifdef Q_OS_MACX 47#ifdef Q_OS_MACX
48 QString path = QPEApplication::qpeDir() + "/plugins/application/lib"+name+".dylib"; 48 QString path = QPEApplication::qpeDir() + "plugins/application/lib"+name+".dylib";
49#else 49#else
50 QString path = QPEApplication::qpeDir() + "/plugins/application/lib"+name+".so"; 50 QString path = QPEApplication::qpeDir() + "plugins/application/lib"+name+".so";
51#endif 51#endif
52 52
53 QLibrary *lib = new QLibrary( path ); 53 QLibrary *lib = new QLibrary( path );
54 if ( lib->queryInterface( uuid, iface ) == QS_OK && iface ) { 54 if ( lib->queryInterface( uuid, iface ) == QS_OK && iface ) {
55 libs.insert( *iface, lib ); 55 libs.insert( *iface, lib );
56 res = QS_OK; 56 res = QS_OK;
57 } 57 }
58 58
59 return res; 59 return res;
60 } 60 }
61 61
62 void PluginLoader::releaseInterface( QUnknownInterface* iface ) { 62 void PluginLoader::releaseInterface( QUnknownInterface* iface ) {
63 if ( libs.contains( iface ) ) { 63 if ( libs.contains( iface ) ) {
64 iface->release(); 64 iface->release();
65 delete libs[iface]; 65 delete libs[iface];
66 libs.remove( iface ); // we only handle pointers so even if the object is not valid the address-space is 66 libs.remove( iface ); // we only handle pointers so even if the object is not valid the address-space is
67 } 67 }
68 } 68 }
69 69
70} 70}
71 71
diff --git a/inputmethods/multikey/configdlg.cpp b/inputmethods/multikey/configdlg.cpp
index 1fba9bc..fe5051d 100644
--- a/inputmethods/multikey/configdlg.cpp
+++ b/inputmethods/multikey/configdlg.cpp
@@ -58,49 +58,49 @@ ConfigDlg::ConfigDlg () : QDialog ()
58 58
59 QHBox *hbox1 = new QHBox(map_group); 59 QHBox *hbox1 = new QHBox(map_group);
60 keymaps = new QListBox(hbox1); 60 keymaps = new QListBox(hbox1);
61 keymaps->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); 61 keymaps->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
62 QVBox *vbox1 = new QVBox(hbox1); 62 QVBox *vbox1 = new QVBox(hbox1);
63 63
64 QToolButton *tb1 = new QToolButton(vbox1, tr("Move Up")); 64 QToolButton *tb1 = new QToolButton(vbox1, tr("Move Up"));
65 tb1->setPixmap(Resource::loadPixmap("up")); 65 tb1->setPixmap(Resource::loadPixmap("up"));
66 tb1->setAutoRaise(TRUE); 66 tb1->setAutoRaise(TRUE);
67 tb1->setFocusPolicy(QWidget::NoFocus); 67 tb1->setFocusPolicy(QWidget::NoFocus);
68 tb1->setToggleButton(FALSE); 68 tb1->setToggleButton(FALSE);
69 connect(tb1, SIGNAL(clicked()), this, SLOT(moveSelectedUp())); 69 connect(tb1, SIGNAL(clicked()), this, SLOT(moveSelectedUp()));
70 70
71 QToolButton *tb2 = new QToolButton(vbox1, tr("Move Down")); 71 QToolButton *tb2 = new QToolButton(vbox1, tr("Move Down"));
72 tb2->setPixmap(Resource::loadPixmap("down")); 72 tb2->setPixmap(Resource::loadPixmap("down"));
73 tb2->setAutoRaise(TRUE); 73 tb2->setAutoRaise(TRUE);
74 tb2->setFocusPolicy(QWidget::NoFocus); 74 tb2->setFocusPolicy(QWidget::NoFocus);
75 tb2->setToggleButton(FALSE); 75 tb2->setToggleButton(FALSE);
76 connect(tb2, SIGNAL(clicked()), this, SLOT(moveSelectedDown())); 76 connect(tb2, SIGNAL(clicked()), this, SLOT(moveSelectedDown()));
77 77
78 QString cur(tr("Current Language")); 78 QString cur(tr("Current Language"));
79 keymaps->insertItem(cur); 79 keymaps->insertItem(cur);
80 keymaps->setSelected(0, true); 80 keymaps->setSelected(0, true);
81 81
82 QDir map_dir(QPEApplication::qpeDir() + "/share/multikey", "*.keymap"); 82 QDir map_dir(QPEApplication::qpeDir() + "share/multikey", "*.keymap");
83 default_maps = map_dir.entryList(); // so i can access it in other places 83 default_maps = map_dir.entryList(); // so i can access it in other places
84 custom_maps = config.readListEntry("maps", QChar('|')); 84 custom_maps = config.readListEntry("maps", QChar('|'));
85 sw_maps = ConfigDlg::loadSw(); 85 sw_maps = ConfigDlg::loadSw();
86 86
87 QStringList sw_copy(sw_maps); 87 QStringList sw_copy(sw_maps);
88 for (uint i = 0; i < sw_copy.count(); i++) { 88 for (uint i = 0; i < sw_copy.count(); i++) {
89 89
90 QString keymap_map; 90 QString keymap_map;
91 if (sw_copy[i][0] != '/') { /* share/multikey */ 91 if (sw_copy[i][0] != '/') { /* share/multikey */
92 92
93 keymap_map = map_dir.absPath() + "/" + sw_copy[i]; 93 keymap_map = map_dir.absPath() + "/" + sw_copy[i];
94 } else { 94 } else {
95 95
96 if (map_dir.exists(QFileInfo(sw_copy[i]).fileName(), false) 96 if (map_dir.exists(QFileInfo(sw_copy[i]).fileName(), false)
97 || !QFile::exists(sw_copy[i])) { 97 || !QFile::exists(sw_copy[i])) {
98 98
99 custom_maps.remove(sw_copy[i]); 99 custom_maps.remove(sw_copy[i]);
100 sw_maps.remove(sw_copy[i]); 100 sw_maps.remove(sw_copy[i]);
101 101
102 // remove it from the list too 102 // remove it from the list too
103 config.writeEntry("maps", custom_maps.join("|")); 103 config.writeEntry("maps", custom_maps.join("|"));
104 104
105 continue; 105 continue;
106 } 106 }
@@ -227,49 +227,49 @@ ConfigDlg::ConfigDlg () : QDialog ()
227 227
228 label = new QLabel(tr("Text Color"), color_grid); 228 label = new QLabel(tr("Text Color"), color_grid);
229 textcolor_button = new QPushButton(color_grid); 229 textcolor_button = new QPushButton(color_grid);
230 connect(textcolor_button, SIGNAL(clicked()), SLOT(textColorClicked())); 230 connect(textcolor_button, SIGNAL(clicked()), SLOT(textColorClicked()));
231 textcolor_button->setFlat(TRUE); 231 textcolor_button->setFlat(TRUE);
232 color = config.readListEntry("textcolor", QChar(',')); 232 color = config.readListEntry("textcolor", QChar(','));
233 textcolor_button->setPalette(QPalette((QColor(color[0].toInt(), color[1].toInt(), color[2].toInt())))); 233 textcolor_button->setPalette(QPalette((QColor(color[0].toInt(), color[1].toInt(), color[2].toInt()))));
234 234
235 label = new QLabel("", color_grid); // a spacer so the above buttons dont expand 235 label = new QLabel("", color_grid); // a spacer so the above buttons dont expand
236 label->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); 236 label->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
237 /* FIXME: hacked spacer height */ 237 /* FIXME: hacked spacer height */
238 QSpacerItem *spacer = new QSpacerItem(0, 300, QSizePolicy::Expanding, QSizePolicy::Maximum); 238 QSpacerItem *spacer = new QSpacerItem(0, 300, QSizePolicy::Expanding, QSizePolicy::Maximum);
239 239
240 color_lay->addWidget(color_grid, 0, 0); 240 color_lay->addWidget(color_grid, 0, 0);
241 color_lay->addItem(spacer); 241 color_lay->addItem(spacer);
242 242
243 tabs->addTab(color_box, tr("Colors")); 243 tabs->addTab(color_box, tr("Colors"));
244 base_lay->addWidget(tabs); 244 base_lay->addWidget(tabs);
245} 245}
246 246
247QStringList ConfigDlg::loadSw() 247QStringList ConfigDlg::loadSw()
248{ 248{
249 Config *config = new Config("multikey"); 249 Config *config = new Config("multikey");
250 config->setGroup("keymaps"); 250 config->setGroup("keymaps");
251 QDir map_dir(QPEApplication::qpeDir() + "/share/multikey", "*.keymap"); 251 QDir map_dir(QPEApplication::qpeDir() + "share/multikey", "*.keymap");
252 QStringList d_maps = map_dir.entryList(); // so i can access it in other places 252 QStringList d_maps = map_dir.entryList(); // so i can access it in other places
253 QStringList c_maps = config->readListEntry("maps", QChar('|')); 253 QStringList c_maps = config->readListEntry("maps", QChar('|'));
254 QStringList s_maps = config->readListEntry("sw", QChar('|')); 254 QStringList s_maps = config->readListEntry("sw", QChar('|'));
255 delete config; 255 delete config;
256 256
257 if (!s_maps.count()) 257 if (!s_maps.count())
258 { 258 {
259 s_maps = d_maps+c_maps; 259 s_maps = d_maps+c_maps;
260 } 260 }
261 else 261 else
262 { 262 {
263 /* Clear non existents entries */ 263 /* Clear non existents entries */
264 QStringList s_copy(s_maps); 264 QStringList s_copy(s_maps);
265 for (uint i = 0; i < s_copy.count(); ++i) { 265 for (uint i = 0; i < s_copy.count(); ++i) {
266 if (d_maps.find(s_copy[i]) == d_maps.end() 266 if (d_maps.find(s_copy[i]) == d_maps.end()
267 && c_maps.find(s_copy[i]) == c_maps.end()) { 267 && c_maps.find(s_copy[i]) == c_maps.end()) {
268 s_maps.remove(s_copy[i]); 268 s_maps.remove(s_copy[i]);
269 } 269 }
270 } 270 }
271 /* Update sw_maps from default_maps */ 271 /* Update sw_maps from default_maps */
272 for (uint i = 0; i < d_maps.count(); ++i) { 272 for (uint i = 0; i < d_maps.count(); ++i) {
273 if (s_maps.find(d_maps[i]) == s_maps.end()) { 273 if (s_maps.find(d_maps[i]) == s_maps.end()) {
274 s_maps.append(d_maps[i]); 274 s_maps.append(d_maps[i]);
275 } 275 }
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp
index 7ddfd3e..f8cafd5 100644
--- a/inputmethods/multikey/keyboard.cpp
+++ b/inputmethods/multikey/keyboard.cpp
@@ -1356,54 +1356,54 @@ ushort Keyboard::constoe(const ushort c) {
1356 default: return 0; 1356 default: return 0;
1357 1357
1358 } 1358 }
1359 1359
1360 } 1360 }
1361} 1361}
1362 1362
1363 1363
1364// Keys::Keys {{{1 1364// Keys::Keys {{{1
1365 1365
1366Keys::Keys() { 1366Keys::Keys() {
1367 1367
1368 Config *config = new Config ("multikey"); 1368 Config *config = new Config ("multikey");
1369 config->setGroup( "keymaps" ); 1369 config->setGroup( "keymaps" );
1370 QString map = config->readEntry( "current" ); 1370 QString map = config->readEntry( "current" );
1371 delete config; 1371 delete config;
1372 1372
1373 if (map.isNull() || !(QFile(map).exists())) { 1373 if (map.isNull() || !(QFile(map).exists())) {
1374 1374
1375 Config *config = new Config("locale"); 1375 Config *config = new Config("locale");
1376 config->setGroup( "Language" ); 1376 config->setGroup( "Language" );
1377 QString l = config->readEntry( "Language" , "en" ); 1377 QString l = config->readEntry( "Language" , "en" );
1378 delete config; 1378 delete config;
1379 1379
1380 map = QPEApplication::qpeDir() + "/share/multikey/" 1380 map = QPEApplication::qpeDir() + "share/multikey/"
1381 + l + ".keymap"; 1381 + l + ".keymap";
1382 1382
1383 } 1383 }
1384 if (map.isNull() || !(QFile(map).exists())) { 1384 if (map.isNull() || !(QFile(map).exists())) {
1385 map = QPEApplication::qpeDir() + "/share/multikey/en.keymap"; 1385 map = QPEApplication::qpeDir() + "share/multikey/en.keymap";
1386 } 1386 }
1387 1387
1388 setKeysFromFile(map); 1388 setKeysFromFile(map);
1389} 1389}
1390 1390
1391Keys::Keys(const char * filename) { 1391Keys::Keys(const char * filename) {
1392 1392
1393 setKeysFromFile(filename); 1393 setKeysFromFile(filename);
1394} 1394}
1395 1395
1396// Keys::setKeysFromFile {{{2 1396// Keys::setKeysFromFile {{{2
1397void Keys::setKeysFromFile(const char * filename) { 1397void Keys::setKeysFromFile(const char * filename) {
1398 1398
1399 QFile f(filename); 1399 QFile f(filename);
1400 1400
1401 if (f.open(IO_ReadOnly)) { 1401 if (f.open(IO_ReadOnly)) {
1402 1402
1403 QTextStream t(&f); 1403 QTextStream t(&f);
1404 int row; 1404 int row;
1405 int qcode; 1405 int qcode;
1406 ushort unicode; 1406 ushort unicode;
1407 int width; 1407 int width;
1408 QString buf; 1408 QString buf;
1409 QString comment; 1409 QString comment;
diff --git a/libopie2/opiecore/opluginloader.cpp b/libopie2/opiecore/opluginloader.cpp
index 2a6e369..d33eac6 100644
--- a/libopie2/opiecore/opluginloader.cpp
+++ b/libopie2/opiecore/opluginloader.cpp
@@ -452,49 +452,49 @@ QUnknownInterface* OGenericPluginLoader::load( const OPluginItem& item, const QU
452 * @internal and reads in the safe mode 452 * @internal and reads in the safe mode
453 */ 453 */
454void OGenericPluginLoader::readConfig() { 454void OGenericPluginLoader::readConfig() {
455 455
456 456
457/* read the config for SafeMode */ 457/* read the config for SafeMode */
458 OConfig conf( m_dir + "-odpplugins" ); 458 OConfig conf( m_dir + "-odpplugins" );
459 conf.setGroup( "General" ); 459 conf.setGroup( "General" );
460 m_isSafeMode = conf.readBoolEntry( "SafeMode", false ); 460 m_isSafeMode = conf.readBoolEntry( "SafeMode", false );
461} 461}
462 462
463/** 463/**
464 * @internal Enter or leave SafeMode 464 * @internal Enter or leave SafeMode
465 */ 465 */
466void OGenericPluginLoader::setSafeMode(const QString& str, bool b) { 466void OGenericPluginLoader::setSafeMode(const QString& str, bool b) {
467 OConfig conf( m_dir + "-odpplugins" ); 467 OConfig conf( m_dir + "-odpplugins" );
468 conf.setGroup( "General" ); 468 conf.setGroup( "General" );
469 conf.writeEntry( "SafeMode", b ); 469 conf.writeEntry( "SafeMode", b );
470 conf.writeEntry( "CrashedPlugin", str ); 470 conf.writeEntry( "CrashedPlugin", str );
471} 471}
472 472
473/** 473/**
474 * @internal 474 * @internal
475 * 475 *
476 * Set the List of Plugin Dirs to lst. Currently only QPEApplication::qpeDir()+"/plugins/"+mytype 476 * Set the List of Plugin Dirs to lst. Currently only QPEApplication::qpeDir()+"plugins/"+mytype
477 * is used as plugin dir 477 * is used as plugin dir
478 */ 478 */
479void OGenericPluginLoader::setPluginDirs( const QStringList& lst ) { 479void OGenericPluginLoader::setPluginDirs( const QStringList& lst ) {
480 m_plugDirs = lst; 480 m_plugDirs = lst;
481} 481}
482 482
483/** 483/**
484 * 484 *
485 * @internal 485 * @internal
486 * Set the Plugin Dir to str. Str will be the only element in the list of plugin dirs 486 * Set the Plugin Dir to str. Str will be the only element in the list of plugin dirs
487 */ 487 */
488void OGenericPluginLoader::setPluginDir( const QString& str) { 488void OGenericPluginLoader::setPluginDir( const QString& str) {
489 m_plugDirs.clear(); 489 m_plugDirs.clear();
490 m_plugDirs.append( str ); 490 m_plugDirs.append( str );
491} 491}
492 492
493 493
494/** 494/**
495 * @internal 495 * @internal
496 */ 496 */
497bool OGenericPluginLoader::isSorted()const{ 497bool OGenericPluginLoader::isSorted()const{
498 return m_isSorted; 498 return m_isSorted;
499} 499}
500 500
@@ -617,49 +617,49 @@ QStringList OGenericPluginLoader::languageList() {
617 if ( pos > 0 ) 617 if ( pos > 0 )
618 m_languages += str.left( pos ); 618 m_languages += str.left( pos );
619 619
620 int n_pos = str.find( '_' ); 620 int n_pos = str.find( '_' );
621 if ( n_pos > 0 ) 621 if ( n_pos > 0 )
622 m_languages += str.left( n_pos ); 622 m_languages += str.left( n_pos );
623 623
624 } 624 }
625 return m_languages; 625 return m_languages;
626} 626}
627 627
628/** 628/**
629 * @internal 629 * @internal
630 * Tries to install languages using the languageList for the type 630 * Tries to install languages using the languageList for the type
631 */ 631 */
632void OGenericPluginLoader::installTranslators(const QString& type) { 632void OGenericPluginLoader::installTranslators(const QString& type) {
633 QStringList lst = languageList(); 633 QStringList lst = languageList();
634 634
635 /* 635 /*
636 * for each language and maybe later for each language dir... 636 * for each language and maybe later for each language dir...
637 * try to load a Translator 637 * try to load a Translator
638 */ 638 */
639 for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { 639 for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
640 QTranslator* trans = new QTranslator( qApp ); 640 QTranslator* trans = new QTranslator( qApp );
641 QString tfn = QPEApplication::qpeDir()+"/i18n/" + *it + "/lib" + type + ".qm" ; 641 QString tfn = QPEApplication::qpeDir()+"i18n/" + *it + "/lib" + type + ".qm" ;
642 642
643 /* 643 /*
644 * If loaded then install else clean up and don't leak 644 * If loaded then install else clean up and don't leak
645 */ 645 */
646 if ( trans->load( tfn ) ) 646 if ( trans->load( tfn ) )
647 qApp->installTranslator( trans ); 647 qApp->installTranslator( trans );
648 else 648 else
649 delete trans; 649 delete trans;
650 } 650 }
651} 651}
652 652
653/** 653/**
654 * \brief Simple c'tor. 654 * \brief Simple c'tor.
655 * 655 *
656 * Simple C'tor same as the one of the base class. Additional this 656 * Simple C'tor same as the one of the base class. Additional this
657 * class can cast for you if you nee it. 657 * class can cast for you if you nee it.
658 * 658 *
659 * 659 *
660 * @param name The name of your plugin class 660 * @param name The name of your plugin class
661 * @param sorted If plugins are sorted 661 * @param sorted If plugins are sorted
662 * 662 *
663 * @see OGenericPluginLoader 663 * @see OGenericPluginLoader
664 */ 664 */
665OPluginLoader::OPluginLoader( const QString& name, bool sorted ) 665OPluginLoader::OPluginLoader( const QString& name, bool sorted )
diff --git a/libopie2/opienet/omanufacturerdb.cpp b/libopie2/opienet/omanufacturerdb.cpp
index 32bae0a..7e185a2 100644
--- a/libopie2/opienet/omanufacturerdb.cpp
+++ b/libopie2/opienet/omanufacturerdb.cpp
@@ -49,49 +49,49 @@ namespace Opie {
49namespace Net { 49namespace Net {
50 50
51OManufacturerDB* OManufacturerDB::_instance = 0; 51OManufacturerDB* OManufacturerDB::_instance = 0;
52 52
53OManufacturerDB* OManufacturerDB::instance() 53OManufacturerDB* OManufacturerDB::instance()
54{ 54{
55 if ( !OManufacturerDB::_instance ) 55 if ( !OManufacturerDB::_instance )
56 { 56 {
57 odebug << "OManufacturerDB::instance(): creating OManufacturerDB..." << oendl; 57 odebug << "OManufacturerDB::instance(): creating OManufacturerDB..." << oendl;
58 _instance = new OManufacturerDB(); 58 _instance = new OManufacturerDB();
59 } 59 }
60 return _instance; 60 return _instance;
61} 61}
62 62
63 63
64OManufacturerDB::OManufacturerDB() 64OManufacturerDB::OManufacturerDB()
65{ 65{
66 #ifdef OPIE_IMPROVE_GUI_LATENCY 66 #ifdef OPIE_IMPROVE_GUI_LATENCY
67 Global::statusMessage( "Reading Manufacturers..." ); 67 Global::statusMessage( "Reading Manufacturers..." );
68 #endif 68 #endif
69 QString filename( "/etc/manufacturers" ); 69 QString filename( "/etc/manufacturers" );
70 odebug << "OManufacturerDB: trying to read " << filename << oendl; 70 odebug << "OManufacturerDB: trying to read " << filename << oendl;
71 if ( !QFile::exists( filename ) ) 71 if ( !QFile::exists( filename ) )
72 { 72 {
73 filename = QPEApplication::qpeDir()+"/etc/manufacturers"; 73 filename = QPEApplication::qpeDir()+"etc/manufacturers";
74 odebug << "OManufacturerDB: trying to read " << filename << oendl; 74 odebug << "OManufacturerDB: trying to read " << filename << oendl;
75 if ( !QFile::exists( filename ) ) 75 if ( !QFile::exists( filename ) )
76 { 76 {
77 filename = "/usr/share/wellenreiter/manufacturers"; 77 filename = "/usr/share/wellenreiter/manufacturers";
78 odebug << "OManufacturerDB: trying to read " << filename << oendl; 78 odebug << "OManufacturerDB: trying to read " << filename << oendl;
79 } 79 }
80 } 80 }
81 81
82 QFile file( filename ); 82 QFile file( filename );
83 bool hasFile = file.open( IO_ReadOnly ); 83 bool hasFile = file.open( IO_ReadOnly );
84 if (!hasFile) 84 if (!hasFile)
85 { 85 {
86 owarn << "OManufacturerDB: no valid manufacturer list found." << oendl; 86 owarn << "OManufacturerDB: no valid manufacturer list found." << oendl;
87 } 87 }
88 else 88 else
89 { 89 {
90 odebug << "OManufacturerDB: found manufacturer list in " << filename << oendl; 90 odebug << "OManufacturerDB: found manufacturer list in " << filename << oendl;
91 QTextStream s( &file ); 91 QTextStream s( &file );
92 QString addr; 92 QString addr;
93 QString manu; 93 QString manu;
94 QString extManu; 94 QString extManu;
95 #ifdef OPIE_IMPROVE_GUI_LATENCY 95 #ifdef OPIE_IMPROVE_GUI_LATENCY
96 int counter = 0; 96 int counter = 0;
97 #endif 97 #endif
diff --git a/libopie2/opiesecurity/multiauthcommon.cpp b/libopie2/opiesecurity/multiauthcommon.cpp
index 9de62d2..e563193 100644
--- a/libopie2/opiesecurity/multiauthcommon.cpp
+++ b/libopie2/opiesecurity/multiauthcommon.cpp
@@ -68,49 +68,49 @@ int runPlugins() {
68 c = Contact::readVCard( vfilename )[0]; 68 c = Contact::readVCard( vfilename )[0];
69 69
70 oi = new SecOwnerDlg(0, 0, c, TRUE, TRUE); 70 oi = new SecOwnerDlg(0, 0, c, TRUE, TRUE);
71 } 71 }
72 72
73 Config config("Security"); 73 Config config("Security");
74 config.setGroup("Plugins"); 74 config.setGroup("Plugins");
75 QStringList plugins = config.readListEntry("IncludePlugins", ','); 75 QStringList plugins = config.readListEntry("IncludePlugins", ',');
76 /* if there are no configured plugins, we simply return 0 to 76 /* if there are no configured plugins, we simply return 0 to
77 * let the user in: 77 * let the user in:
78 */ 78 */
79 if (plugins.isEmpty() == true) { 79 if (plugins.isEmpty() == true) {
80 owarn << "No authentication plugin has been configured yet!" << oendl; 80 owarn << "No authentication plugin has been configured yet!" << oendl;
81 odebug << "Letting the user in..." << oendl; 81 odebug << "Letting the user in..." << oendl;
82 if(oi) delete oi; 82 if(oi) delete oi;
83 return 0; 83 return 0;
84 } 84 }
85 config.setGroup("Misc"); 85 config.setGroup("Misc");
86 int nbSuccessMin = config.readNumEntry("nbSuccessMin", 1); 86 int nbSuccessMin = config.readNumEntry("nbSuccessMin", 1);
87 int nbSuccess = 0; 87 int nbSuccess = 0;
88 88
89 /* tries to launch successively each plugin in $OPIEDIR/plugins/security 89 /* tries to launch successively each plugin in $OPIEDIR/plugins/security
90 * directory which file name is in Security.conf / [Misc] / IncludePlugins 90 * directory which file name is in Security.conf / [Misc] / IncludePlugins
91 */ 91 */
92 QString path = QPEApplication::qpeDir() + "/plugins/security"; 92 QString path = QPEApplication::qpeDir() + "plugins/security";
93 QStringList::Iterator libIt; 93 QStringList::Iterator libIt;
94 94
95 for ( libIt = plugins.begin(); libIt != plugins.end(); ++libIt ) { 95 for ( libIt = plugins.begin(); libIt != plugins.end(); ++libIt ) {
96 QInterfacePtr<MultiauthPluginInterface> iface; 96 QInterfacePtr<MultiauthPluginInterface> iface;
97 QLibrary *lib = new QLibrary( path + "/" + *libIt ); 97 QLibrary *lib = new QLibrary( path + "/" + *libIt );
98 98
99 if ( lib->queryInterface( 99 if ( lib->queryInterface(
100 IID_MultiauthPluginInterface, 100 IID_MultiauthPluginInterface,
101 (QUnknownInterface**)&iface ) == QS_OK ) 101 (QUnknownInterface**)&iface ) == QS_OK )
102 { 102 {
103 // the plugin is a true Multiauth plugin 103 // the plugin is a true Multiauth plugin
104 odebug << "Accepted plugin: " << QString( path + "/" + *libIt ) << oendl; 104 odebug << "Accepted plugin: " << QString( path + "/" + *libIt ) << oendl;
105 odebug << "Plugin name: " << iface->plugin()->pluginName() << oendl; 105 odebug << "Plugin name: " << iface->plugin()->pluginName() << oendl;
106 106
107 int resultCode; 107 int resultCode;
108 int tries = 0; 108 int tries = 0;
109 109
110 // perform authentication 110 // perform authentication
111 resultCode = iface->plugin()->authenticate(); 111 resultCode = iface->plugin()->authenticate();
112 112
113 // display the result in command line 113 // display the result in command line
114 QString resultMessage; 114 QString resultMessage;
115 switch (resultCode) 115 switch (resultCode)
116 { 116 {
diff --git a/library/fontdatabase.cpp b/library/fontdatabase.cpp
index d94e338..7934a09 100644
--- a/library/fontdatabase.cpp
+++ b/library/fontdatabase.cpp
@@ -146,49 +146,49 @@ QValueList<int> FontDatabase::standardSizes()
146 Load any font renderer plugins that are available and make the fonts 146 Load any font renderer plugins that are available and make the fonts
147 that the plugins can read available. 147 that the plugins can read available.
148*/ 148*/
149void FontDatabase::loadRenderers() 149void FontDatabase::loadRenderers()
150{ 150{
151#ifndef QWS 151#ifndef QWS
152 return; 152 return;
153#else 153#else
154 154
155#ifndef QT_NO_COMPONENT 155#ifndef QT_NO_COMPONENT
156 if ( !factoryList ) 156 if ( !factoryList )
157 factoryList = new QValueList<FontFactory>; 157 factoryList = new QValueList<FontFactory>;
158 158
159 QValueList<FontFactory>::Iterator mit; 159 QValueList<FontFactory>::Iterator mit;
160 for ( mit = factoryList->begin(); mit != factoryList->end(); ++mit ) { 160 for ( mit = factoryList->begin(); mit != factoryList->end(); ++mit ) {
161 qt_fontmanager->factories.setAutoDelete( false ); 161 qt_fontmanager->factories.setAutoDelete( false );
162 qt_fontmanager->factories.removeRef( (*mit).factory ); 162 qt_fontmanager->factories.removeRef( (*mit).factory );
163 qt_fontmanager->factories.setAutoDelete( true ); 163 qt_fontmanager->factories.setAutoDelete( true );
164 (*mit).interface->release(); 164 (*mit).interface->release();
165 (*mit).library->unload(); 165 (*mit).library->unload();
166 delete (*mit).library; 166 delete (*mit).library;
167 } 167 }
168 factoryList->clear(); 168 factoryList->clear();
169 169
170 QString path = QPEApplication::qpeDir() + "/plugins/fontfactories"; 170 QString path = QPEApplication::qpeDir() + "plugins/fontfactories";
171#ifdef Q_OS_MACX 171#ifdef Q_OS_MACX
172 QDir dir( path, "lib*.dylib" ); 172 QDir dir( path, "lib*.dylib" );
173#else 173#else
174 QDir dir( path, "lib*.so" ); 174 QDir dir( path, "lib*.so" );
175#endif 175#endif
176 176
177 if ( !dir.exists()) 177 if ( !dir.exists())
178 return; 178 return;
179 179
180 QStringList list = dir.entryList(); 180 QStringList list = dir.entryList();
181 QStringList::Iterator it; 181 QStringList::Iterator it;
182 for ( it = list.begin(); it != list.end(); ++it ) { 182 for ( it = list.begin(); it != list.end(); ++it ) {
183 FontFactoryInterface *iface = 0; 183 FontFactoryInterface *iface = 0;
184 QLibrary *lib = new QLibrary( path + "/" + *it ); 184 QLibrary *lib = new QLibrary( path + "/" + *it );
185 if ( lib->queryInterface( IID_FontFactory, (QUnknownInterface**)&iface ) == QS_OK ) { 185 if ( lib->queryInterface( IID_FontFactory, (QUnknownInterface**)&iface ) == QS_OK ) {
186 FontFactory factory; 186 FontFactory factory;
187 factory.library = lib; 187 factory.library = lib;
188 factory.interface = iface; 188 factory.interface = iface;
189 factory.factory = factory.interface->fontFactory(); 189 factory.factory = factory.interface->fontFactory();
190 factoryList->append( factory ); 190 factoryList->append( factory );
191 qt_fontmanager->factories.append( factory.factory ); 191 qt_fontmanager->factories.append( factory.factory );
192 readFonts( factory.factory ); 192 readFonts( factory.factory );
193 } else { 193 } else {
194 delete lib; 194 delete lib;
diff --git a/library/network.cpp b/library/network.cpp
index f2a673c..0bbbec1 100644
--- a/library/network.cpp
+++ b/library/network.cpp
@@ -398,51 +398,51 @@ int Network::addStateWidgets(QWidget* parent)
398 cfg.setGroup("Properties"); 398 cfg.setGroup("Properties");
399 if ( plugin ) { 399 if ( plugin ) {
400 QWidget* w; 400 QWidget* w;
401 if ( (w=plugin->addStateWidget(parent,cfg)) ) { 401 if ( (w=plugin->addStateWidget(parent,cfg)) ) {
402 n++; 402 n++;
403 vb->addWidget(w); 403 vb->addWidget(w);
404 } 404 }
405 } 405 }
406 } 406 }
407 return n; 407 return n;
408} 408}
409 409
410static QDict<NetworkInterface> *ifaces; 410static QDict<NetworkInterface> *ifaces;
411 411
412/*! 412/*!
413 \internal 413 \internal
414*/ 414*/
415NetworkInterface* Network::loadPlugin(const QString& type) 415NetworkInterface* Network::loadPlugin(const QString& type)
416{ 416{
417#ifndef QT_NO_COMPONENT 417#ifndef QT_NO_COMPONENT
418 if ( !ifaces ) ifaces = new QDict<NetworkInterface>; 418 if ( !ifaces ) ifaces = new QDict<NetworkInterface>;
419 NetworkInterface *iface = ifaces->find(type); 419 NetworkInterface *iface = ifaces->find(type);
420 if ( !iface ) { 420 if ( !iface ) {
421#ifdef Q_OS_MACX 421#ifdef Q_OS_MACX
422 QString libfile = QPEApplication::qpeDir() + "/plugins/network/lib" + type + ".dylib"; 422 QString libfile = QPEApplication::qpeDir() + "plugins/network/lib" + type + ".dylib";
423#else 423#else
424 QString libfile = QPEApplication::qpeDir() + "/plugins/network/lib" + type + ".so"; 424 QString libfile = QPEApplication::qpeDir() + "plugins/network/lib" + type + ".so";
425#endif 425#endif
426 QLibrary lib(libfile); 426 QLibrary lib(libfile);
427 if ( !lib.queryInterface( IID_Network, (QUnknownInterface**)&iface ) == QS_OK ) 427 if ( !lib.queryInterface( IID_Network, (QUnknownInterface**)&iface ) == QS_OK )
428 return 0; 428 return 0;
429 ifaces->insert(type,iface); 429 ifaces->insert(type,iface);
430 QStringList langs = Global::languageList(); 430 QStringList langs = Global::languageList();
431 for (QStringList::ConstIterator it = langs.begin(); it!=langs.end(); ++it) { 431 for (QStringList::ConstIterator it = langs.begin(); it!=langs.end(); ++it) {
432 QString lang = *it; 432 QString lang = *it;
433 QTranslator * trans = new QTranslator(qApp); 433 QTranslator * trans = new QTranslator(qApp);
434 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/lib"+type+".qm"; 434 QString tfn = QPEApplication::qpeDir()+"i18n/"+lang+"/lib"+type+".qm";
435 if ( trans->load( tfn )) 435 if ( trans->load( tfn ))
436 qApp->installTranslator( trans ); 436 qApp->installTranslator( trans );
437 else 437 else
438 delete trans; 438 delete trans;
439 } 439 }
440 } 440 }
441 return iface; 441 return iface;
442#else 442#else
443 return 0; 443 return 0;
444#endif 444#endif
445} 445}
446 446
447#include "network.moc" 447#include "network.moc"
448 #endif// QT_NO_COP 448 #endif// QT_NO_COP
diff --git a/library/qpedecoration_qws.cpp b/library/qpedecoration_qws.cpp
index 7842ebd..8b02de6 100644
--- a/library/qpedecoration_qws.cpp
+++ b/library/qpedecoration_qws.cpp
@@ -515,49 +515,49 @@ QPEDecoration::QPEDecoration()
515 wdiface = new DefaultWindowDecoration; 515 wdiface = new DefaultWindowDecoration;
516 516
517 helpexists = FALSE; // We don't know (flagged by helpFile being null) 517 helpexists = FALSE; // We don't know (flagged by helpFile being null)
518 qpeManager = new QPEManager( this ); 518 qpeManager = new QPEManager( this );
519 imageOk = Resource::loadImage( "OKButton" ); 519 imageOk = Resource::loadImage( "OKButton" );
520 imageClose = Resource::loadImage( "CloseButton" ); 520 imageClose = Resource::loadImage( "CloseButton" );
521 imageHelp = Resource::loadImage( "HelpButton" ); 521 imageHelp = Resource::loadImage( "HelpButton" );
522} 522}
523 523
524QPEDecoration::QPEDecoration( const QString &plugin ) 524QPEDecoration::QPEDecoration( const QString &plugin )
525 : QWSDefaultDecoration() 525 : QWSDefaultDecoration()
526{ 526{
527 libname = plugin; 527 libname = plugin;
528 528
529 if ( wdlib ) { 529 if ( wdlib ) {
530 wdiface->release(); 530 wdiface->release();
531 wdlib->unload(); 531 wdlib->unload();
532 delete wdlib; 532 delete wdlib;
533 wdlib = 0; 533 wdlib = 0;
534 } else { 534 } else {
535 delete wdiface; 535 delete wdiface;
536 } 536 }
537 537
538 WindowDecorationInterface *iface = 0; 538 WindowDecorationInterface *iface = 0;
539 QString path = QPEApplication::qpeDir() + "/plugins/decorations/"; 539 QString path = QPEApplication::qpeDir() + "plugins/decorations/";
540 540
541#ifdef Q_OS_MACX 541#ifdef Q_OS_MACX
542 if ( plugin.find( ".dylib" ) > 0 ) { 542 if ( plugin.find( ".dylib" ) > 0 ) {
543#else 543#else
544 if ( plugin.find( ".so" ) > 0 ) { 544 if ( plugin.find( ".so" ) > 0 ) {
545#endif 545#endif
546 // full library name supplied 546 // full library name supplied
547 path += plugin; 547 path += plugin;
548 } else { 548 } else {
549#ifdef Q_OS_MACX 549#ifdef Q_OS_MACX
550 path += "lib" + plugin.lower() + ".dylib"; // compatibility 550 path += "lib" + plugin.lower() + ".dylib"; // compatibility
551#else 551#else
552 path += "lib" + plugin.lower() + ".so"; // compatibility 552 path += "lib" + plugin.lower() + ".so"; // compatibility
553#endif 553#endif
554 } 554 }
555 555
556 QLibrary *lib = new QLibrary( path ); 556 QLibrary *lib = new QLibrary( path );
557 if ( lib->queryInterface( IID_WindowDecoration, (QUnknownInterface**)&iface ) == QS_OK && iface ) { 557 if ( lib->queryInterface( IID_WindowDecoration, (QUnknownInterface**)&iface ) == QS_OK && iface ) {
558 wdiface = iface; 558 wdiface = iface;
559 wdlib = lib; 559 wdlib = lib;
560 } else { 560 } else {
561 delete lib; 561 delete lib;
562 wdiface = new DefaultWindowDecoration; 562 wdiface = new DefaultWindowDecoration;
563 } 563 }
diff --git a/libslcompat/slmisc.h b/libslcompat/slmisc.h
index 20ba988..442b098 100644
--- a/libslcompat/slmisc.h
+++ b/libslcompat/slmisc.h
@@ -5,49 +5,49 @@
5#define _SLMISC_H_INCLUDED 5#define _SLMISC_H_INCLUDED
6 6
7#include <qpe/qpeapplication.h> 7#include <qpe/qpeapplication.h>
8#include <qfileinfo.h> 8#include <qfileinfo.h>
9#include <qpe/global.h> 9#include <qpe/global.h>
10#include <qmessagebox.h> 10#include <qmessagebox.h>
11 11
12 12
13#define _SLPOWER 13#define _SLPOWER
14 14
15class QPopupMenu; 15class QPopupMenu;
16class QListView; 16class QListView;
17#if !defined(_SLPOWER) 17#if !defined(_SLPOWER)
18class PowerStatus; 18class PowerStatus;
19#else 19#else
20class SlPowerStatus; 20class SlPowerStatus;
21#endif 21#endif
22class Config; 22class Config;
23 23
24typedef ulong SlResolutionScale; 24typedef ulong SlResolutionScale;
25 25
26class SlMisc { 26class SlMisc {
27public: 27public:
28 static bool isExecutable(const QString &c) { 28 static bool isExecutable(const QString &c) {
29 QFileInfo exec(QPEApplication::qpeDir() + "/bin/" + c); 29 QFileInfo exec(QPEApplication::qpeDir() + "bin/" + c);
30 return exec.isExecutable(); 30 return exec.isExecutable();
31 }; 31 };
32 static ulong availableMemory(); 32 static ulong availableMemory();
33 static bool invalidFileName(QString &fName); 33 static bool invalidFileName(QString &fName);
34 static QString getValidFileName(const QString &baseName); 34 static QString getValidFileName(const QString &baseName);
35 static QString getCanonicalPath(const QString &fName); 35 static QString getCanonicalPath(const QString &fName);
36 static void enableAutoPowerOff(bool isOn); 36 static void enableAutoPowerOff(bool isOn);
37 static void enableAutoPowerOff(bool isOn,bool DimAlso,bool ScreenSaverAlso=FALSE); 37 static void enableAutoPowerOff(bool isOn,bool DimAlso,bool ScreenSaverAlso=FALSE);
38 static void enableLockApplication(bool); 38 static void enableLockApplication(bool);
39 static bool isTheSmbShareFileHasWriteEntry(const QString &shareFName); 39 static bool isTheSmbShareFileHasWriteEntry(const QString &shareFName);
40 static bool isTheSmbShareFileNowCopy(const QString &shareFName); 40 static bool isTheSmbShareFileNowCopy(const QString &shareFName);
41 static bool checkTheSmbShareFileMode(const QString &shareFName, 41 static bool checkTheSmbShareFileMode(const QString &shareFName,
42 char modeMask, char checkMode, bool equality); 42 char modeMask, char checkMode, bool equality);
43 static bool isTheFileLockedBySmbd(const QString &fName); 43 static bool isTheFileLockedBySmbd(const QString &fName);
44 static bool isSambaForked(); 44 static bool isSambaForked();
45 static void startSamba(); 45 static void startSamba();
46 static void stopSamba(); 46 static void stopSamba();
47 enum ListType { Pid, CmdLine, Both }; 47 enum ListType { Pid, CmdLine, Both };
48 static QStringList procList (const QRegExp& re, uint max = 0, enum ListType type = Pid); 48 static QStringList procList (const QRegExp& re, uint max = 0, enum ListType type = Pid);
49 static void dumpMemInfo(bool isShowHeap); 49 static void dumpMemInfo(bool isShowHeap);
50 static bool canCreateTheFile(const QString&); 50 static bool canCreateTheFile(const QString&);
51 static QString getLanguage(); 51 static QString getLanguage();
52 static QSize getMaximizedWidgetInfo(); 52 static QSize getMaximizedWidgetInfo();
53 static QSize SlMisc::getScrollbarMetrics(); 53 static QSize SlMisc::getScrollbarMetrics();
diff --git a/noncore/applets/zkbapplet/applet/zkbwidget.cpp b/noncore/applets/zkbapplet/applet/zkbwidget.cpp
index 8499500..13729ea 100644
--- a/noncore/applets/zkbapplet/applet/zkbwidget.cpp
+++ b/noncore/applets/zkbapplet/applet/zkbwidget.cpp
@@ -20,49 +20,49 @@ ZkbWidget::ZkbWidget(QWidget* parent)
20 20
21 loadKeymap(); 21 loadKeymap();
22 22
23 channel = new QCopChannel("QPE/zkb", this); 23 channel = new QCopChannel("QPE/zkb", this);
24 connect(channel, SIGNAL(received(const QCString&,const QByteArray&)), 24 connect(channel, SIGNAL(received(const QCString&,const QByteArray&)),
25 this, SLOT(signalReceived(const QCString&,const QByteArray&))); 25 this, SLOT(signalReceived(const QCString&,const QByteArray&)));
26 setFixedWidth ( AppLnk::smallIconSize() ); 26 setFixedWidth ( AppLnk::smallIconSize() );
27 setFixedHeight ( AppLnk::smallIconSize() ); 27 setFixedHeight ( AppLnk::smallIconSize() );
28} 28}
29 29
30ZkbWidget::~ZkbWidget() 30ZkbWidget::~ZkbWidget()
31{ 31{
32 if (keymap != 0) { 32 if (keymap != 0) {
33 delete keymap; 33 delete keymap;
34 keymap = 0; 34 keymap = 0;
35 } 35 }
36} 36}
37 37
38int ZkbWidget::position() 38int ZkbWidget::position()
39{ 39{
40 return 8; 40 return 8;
41} 41}
42 42
43bool ZkbWidget::loadKeymap() { 43bool ZkbWidget::loadKeymap() {
44 ZkbConfig c(QPEApplication::qpeDir()+"/share/zkb"); 44 ZkbConfig c(QPEApplication::qpeDir()+"share/zkb");
45 QFontMetrics fm(font()); 45 QFontMetrics fm(font());
46 46
47 if (keymap != 0) { 47 if (keymap != 0) {
48 delete keymap; 48 delete keymap;
49 keymap = 0; 49 keymap = 0;
50 } 50 }
51 51
52 Keymap* km = new Keymap(); 52 Keymap* km = new Keymap();
53 53
54 if (!c.load("zkb.xml", *km, "")) { 54 if (!c.load("zkb.xml", *km, "")) {
55 delete km; 55 delete km;
56 setPixmap(disabled); 56 setPixmap(disabled);
57 return false; 57 return false;
58 } 58 }
59 59
60 connect(km, SIGNAL(stateChanged(const QString&)), 60 connect(km, SIGNAL(stateChanged(const QString&)),
61 this, SLOT(stateChanged(const QString&))); 61 this, SLOT(stateChanged(const QString&)));
62 62
63 Opie::Core::OKeyFilter::inst()->addHandler(km); 63 Opie::Core::OKeyFilter::inst()->addHandler(km);
64 64
65 Keymap* oldkm = keymap; 65 Keymap* oldkm = keymap;
66 keymap = km; 66 keymap = km;
67 67
68 if (oldkm != 0) { 68 if (oldkm != 0) {
diff --git a/noncore/applets/zkbapplet/keyzcfg/cfgdlg.cpp b/noncore/applets/zkbapplet/keyzcfg/cfgdlg.cpp
index 8d868d4..4190a9e 100644
--- a/noncore/applets/zkbapplet/keyzcfg/cfgdlg.cpp
+++ b/noncore/applets/zkbapplet/keyzcfg/cfgdlg.cpp
@@ -47,49 +47,49 @@ CfgDlg::CfgDlg(QWidget* parent, CfgFile* cf, QApplication* app, bool mod):
47 gl->addWidget(addButton, 1, 2); 47 gl->addWidget(addButton, 1, 2);
48 gl->addWidget(delButton, 2, 2); 48 gl->addWidget(delButton, 2, 2);
49 49
50 gl->addWidget(l, 4, 0); 50 gl->addWidget(l, 4, 0);
51 gl->addWidget(label, 4, 1); 51 gl->addWidget(label, 4, 1);
52 gl->addMultiCellWidget(slabelButton, 4, 4, 3, 4); 52 gl->addMultiCellWidget(slabelButton, 4, 4, 3, 4);
53 53
54 gl->addMultiCellWidget(adlabel, 5, 5, 0, 2); 54 gl->addMultiCellWidget(adlabel, 5, 5, 0, 2);
55 gl->addMultiCellWidget(ad, 5, 5, 3, 4); 55 gl->addMultiCellWidget(ad, 5, 5, 3, 4);
56 //gl->addWidget(adms, 5, 3); 56 //gl->addWidget(adms, 5, 3);
57 57
58 gl->addMultiCellWidget(aplabel, 6, 6, 0, 2); 58 gl->addMultiCellWidget(aplabel, 6, 6, 0, 2);
59 gl->addMultiCellWidget(ap, 6, 6, 3, 4); 59 gl->addMultiCellWidget(ap, 6, 6, 3, 4);
60 60
61 //gl->addWidget(apms, 6, 3); 61 //gl->addWidget(apms, 6, 3);
62 62
63 QList<CfgEntry>& e = cfile->getEntries(); 63 QList<CfgEntry>& e = cfile->getEntries();
64 64
65 for(uint i = 0; i < e.count(); i++) { 65 for(uint i = 0; i < e.count(); i++) {
66 CfgEntry* entry = e.at(i); 66 CfgEntry* entry = e.at(i);
67 keymaps->insertItem(entry->getFile()); 67 keymaps->insertItem(entry->getFile());
68 m.insert(entry->getFile(), entry->getLabel()); 68 m.insert(entry->getFile(), entry->getLabel());
69 } 69 }
70 70
71 QDir dir(QPEApplication::qpeDir()+"/share/zkb", "*.xml"); 71 QDir dir(QPEApplication::qpeDir()+"share/zkb", "*.xml");
72 QStringList flist = dir.entryList(); 72 QStringList flist = dir.entryList();
73 QStringList::Iterator sit; 73 QStringList::Iterator sit;
74 for(sit = flist.begin(); sit != flist.end(); ++sit) { 74 for(sit = flist.begin(); sit != flist.end(); ++sit) {
75 if (*sit != "common.xml" && *sit != "zkb.xml" && m.find(*sit) == m.end()) { 75 if (*sit != "common.xml" && *sit != "zkb.xml" && m.find(*sit) == m.end()) {
76 files->insertItem(*sit); 76 files->insertItem(*sit);
77 } 77 }
78 } 78 }
79 79
80 ad->setValue(cfile->getAutorepeatDelay()); 80 ad->setValue(cfile->getAutorepeatDelay());
81 ap->setValue(cfile->getAutorepeatPeriod()); 81 ap->setValue(cfile->getAutorepeatPeriod());
82 82
83 //gl->addMultiCellWidget(enable, 7, 7, 0, 4); 83 //gl->addMultiCellWidget(enable, 7, 7, 0, 4);
84} 84}
85 85
86CfgDlg::~CfgDlg() { 86CfgDlg::~CfgDlg() {
87} 87}
88 88
89void CfgDlg::add() { 89void CfgDlg::add() {
90 if (!files->currentText().isEmpty()) { 90 if (!files->currentText().isEmpty()) {
91 QString t = files->currentText(); 91 QString t = files->currentText();
92 files->removeItem(files->currentItem()); 92 files->removeItem(files->currentItem());
93 keymaps->insertItem(t); 93 keymaps->insertItem(t);
94 cfile->replaceEntry(t, ""); 94 cfile->replaceEntry(t, "");
95 m.replace(t, ""); 95 m.replace(t, "");
@@ -103,30 +103,30 @@ void CfgDlg::del() {
103 cfile->deleteEntry(t); 103 cfile->deleteEntry(t);
104 files->insertItem(t); 104 files->insertItem(t);
105 m.remove(files->currentText()); 105 m.remove(files->currentText());
106 } 106 }
107} 107}
108 108
109void CfgDlg::setLabel() { 109void CfgDlg::setLabel() {
110 if (!keymaps->currentText().isEmpty()) { 110 if (!keymaps->currentText().isEmpty()) {
111 cfile->replaceEntry(keymaps->currentText(), 111 cfile->replaceEntry(keymaps->currentText(),
112 label->text()); 112 label->text());
113 m.replace(keymaps->currentText(), label->text()); 113 m.replace(keymaps->currentText(), label->text());
114 } 114 }
115} 115}
116 116
117void CfgDlg::keymapHighlighted(const QString&text) { 117void CfgDlg::keymapHighlighted(const QString&text) {
118 label->setText(*m.find(text)); 118 label->setText(*m.find(text));
119} 119}
120 120
121 121
122void CfgDlg::accept() { 122void CfgDlg::accept() {
123 cfile->setAutorepeatDelay(ad->value()); 123 cfile->setAutorepeatDelay(ad->value());
124 cfile->setAutorepeatPeriod(ap->value()); 124 cfile->setAutorepeatPeriod(ap->value());
125 125
126 CfgParser p; 126 CfgParser p;
127 p.save(QPEApplication::qpeDir()+"/share/zkb/zkb.xml", *cfile); 127 p.save(QPEApplication::qpeDir()+"share/zkb/zkb.xml", *cfile);
128 QCopEnvelope("QPE/zkb", "reload()"); 128 QCopEnvelope("QPE/zkb", "reload()");
129 129
130 QDialog::accept(); 130 QDialog::accept();
131} 131}
132 132
diff --git a/noncore/applets/zkbapplet/keyzcfg/main.cpp b/noncore/applets/zkbapplet/keyzcfg/main.cpp
index 4615562..afd0f6a 100644
--- a/noncore/applets/zkbapplet/keyzcfg/main.cpp
+++ b/noncore/applets/zkbapplet/keyzcfg/main.cpp
@@ -1,22 +1,22 @@
1#include <stdio.h> 1#include <stdio.h>
2#include <qpe/qpeapplication.h> 2#include <qpe/qpeapplication.h>
3#include <qlayout.h> 3#include <qlayout.h>
4#include <qmainwindow.h> 4#include <qmainwindow.h>
5 5
6#include "cfgdlg.h" 6#include "cfgdlg.h"
7 7
8int main( int argc, char **argv ) { 8int main( int argc, char **argv ) {
9 QPEApplication app(argc, argv); 9 QPEApplication app(argc, argv);
10 CfgFile cfile; 10 CfgFile cfile;
11 CfgParser cp; 11 CfgParser cp;
12 cp.load(QPEApplication::qpeDir()+"/share/zkb/zkb.xml", cfile); 12 cp.load(QPEApplication::qpeDir()+"share/zkb/zkb.xml", cfile);
13 13
14 14
15 CfgDlg c(0, &cfile, &app, true); 15 CfgDlg c(0, &cfile, &app, true);
16 16
17 17
18 app.showMainWidget(&c); 18 app.showMainWidget(&c);
19 int ret = QPEApplication::execDialog(&c); 19 int ret = QPEApplication::execDialog(&c);
20 20
21 return ret; 21 return ret;
22} 22}
diff --git a/noncore/apps/opie-bartender/bartender.cpp b/noncore/apps/opie-bartender/bartender.cpp
index 59fc242..b4958b3 100644
--- a/noncore/apps/opie-bartender/bartender.cpp
+++ b/noncore/apps/opie-bartender/bartender.cpp
@@ -92,49 +92,49 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
92 92
93 a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ),"Edit", 0, this, 0 ); 93 a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ),"Edit", 0, this, 0 );
94 connect( a, SIGNAL( activated() ), this, SLOT( doEdit() ) ); 94 connect( a, SIGNAL( activated() ), this, SLOT( doEdit() ) );
95 a->addTo( ToolBar1 ); 95 a->addTo( ToolBar1 );
96 96
97 QPushButton *t; 97 QPushButton *t;
98 t= new QPushButton( "BAC", ToolBar1, "bacButtin"); 98 t= new QPushButton( "BAC", ToolBar1, "bacButtin");
99 connect( t, SIGNAL( clicked() ), this, SLOT( doBac() ) ); 99 connect( t, SIGNAL( clicked() ), this, SLOT( doBac() ) );
100 100
101 DrinkView = new QListView( this, "DrinkView" ); 101 DrinkView = new QListView( this, "DrinkView" );
102 DrinkView->addColumn( tr( "Name of Drink" ) ); 102 DrinkView->addColumn( tr( "Name of Drink" ) );
103// DrinkView->setRootIsDecorated( TRUE ); 103// DrinkView->setRootIsDecorated( TRUE );
104 DrinkView->header()->hide(); 104 DrinkView->header()->hide();
105 105
106 QPEApplication::setStylusOperation( DrinkView->viewport(),QPEApplication::RightOnHold); 106 QPEApplication::setStylusOperation( DrinkView->viewport(),QPEApplication::RightOnHold);
107 107
108 connect(DrinkView, SIGNAL( doubleClicked(QListViewItem*)),this,SLOT(showDrink(QListViewItem*))); 108 connect(DrinkView, SIGNAL( doubleClicked(QListViewItem*)),this,SLOT(showDrink(QListViewItem*)));
109 connect(DrinkView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), 109 connect(DrinkView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)),
110 this,SLOT( showDrink(int,QListViewItem*,const QPoint&,int))); 110 this,SLOT( showDrink(int,QListViewItem*,const QPoint&,int)));
111 111
112 layout->addMultiCellWidget( DrinkView, 1, 2, 0, 4 ); 112 layout->addMultiCellWidget( DrinkView, 1, 2, 0, 4 );
113 if(QDir("db").exists()) { 113 if(QDir("db").exists()) {
114 dbFile.setName( "db/drinkdb.txt"); 114 dbFile.setName( "db/drinkdb.txt");
115 } else 115 } else
116 dbFile.setName( QPEApplication::qpeDir()+"/etc/bartender/drinkdb.txt"); 116 dbFile.setName( QPEApplication::qpeDir()+"etc/bartender/drinkdb.txt");
117 initDrinkDb(); 117 initDrinkDb();
118} 118}
119 119
120Bartender::~Bartender() { 120Bartender::~Bartender() {
121} 121}
122 122
123/* 123/*
124this happens right before exit */ 124this happens right before exit */
125void Bartender::cleanUp() { 125void Bartender::cleanUp() {
126 dbFile.close(); 126 dbFile.close();
127 127
128} 128}
129 129
130void Bartender::initDrinkDb() { 130void Bartender::initDrinkDb() {
131 131
132 if(!dbFile.isOpen()) 132 if(!dbFile.isOpen())
133 if ( !dbFile.open( IO_ReadOnly)) { 133 if ( !dbFile.open( IO_ReadOnly)) {
134 QMessageBox::message( (tr("Note")), (tr("Drink database not opened sucessfully.\n")) ); 134 QMessageBox::message( (tr("Note")), (tr("Drink database not opened sucessfully.\n")) );
135 return; 135 return;
136 } 136 }
137 fillList(); 137 fillList();
138} 138}
139 139
140void Bartender::fillList() { 140void Bartender::fillList() {
diff --git a/noncore/apps/opie-console/fixit.cpp b/noncore/apps/opie-console/fixit.cpp
index 3b0044a..f170074 100644
--- a/noncore/apps/opie-console/fixit.cpp
+++ b/noncore/apps/opie-console/fixit.cpp
@@ -33,62 +33,62 @@ FixIt::FixIt() {
33"# Specify things to do before rebooting" 33"# Specify things to do before rebooting"
34"um::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1" 34"um::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1"
35"sw::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1" 35"sw::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1"
36"" 36""
37"# Specify program to run on ttyS0" 37"# Specify program to run on ttyS0"
38"s0:24:respawn:/sbin/getty 9600 ttyS0" 38"s0:24:respawn:/sbin/getty 9600 ttyS0"
39"#pd:5:respawn:/etc/sync/serialctl" 39"#pd:5:respawn:/etc/sync/serialctl"
40"" 40""
41"# Specify program to run on tty1" 41"# Specify program to run on tty1"
42"1:2:respawn:/sbin/getty 9600 tty1" 42"1:2:respawn:/sbin/getty 9600 tty1"
43"ln:345:respawn:survive -l 6 /sbin/launch" 43"ln:345:respawn:survive -l 6 /sbin/launch"
44"#qt:5:respawn:/sbin/qt" 44"#qt:5:respawn:/sbin/qt"
45"" 45""
46"# collie sp." 46"# collie sp."
47"sy::respawn:/sbin/shsync\n"; 47"sy::respawn:/sbin/shsync\n";
48} 48}
49 49
50/* 50/*
51 * the retail Zaurus is broken in many ways 51 * the retail Zaurus is broken in many ways
52 * one is that pppd is listening on our port... 52 * one is that pppd is listening on our port...
53 * we've to stop it from that and then do kill(SIGHUP,1); 53 * we've to stop it from that and then do kill(SIGHUP,1);
54 */ 54 */
55void FixIt::fixIt() { 55void FixIt::fixIt() {
56 #ifndef EAST 56 #ifndef EAST
57 ::rename("/etc/inittab", QPEApplication::qpeDir() + "/etc/inittab" ); 57 ::rename("/etc/inittab", QPEApplication::qpeDir() + "etc/inittab" );
58 QFile file( "/etc/inittab" ); 58 QFile file( "/etc/inittab" );
59 if ( file.open(IO_WriteOnly | IO_Raw ) ) { 59 if ( file.open(IO_WriteOnly | IO_Raw ) ) {
60 file.writeBlock(m_file,strlen(m_file) ); 60 file.writeBlock(m_file,strlen(m_file) );
61 } 61 }
62 file.close(); 62 file.close();
63 ::kill( SIGHUP, 1 ); 63 ::kill( SIGHUP, 1 );
64 64
65 #else 65 #else
66 66
67 OProcess m_kill; 67 OProcess m_kill;
68 m_kill << QPEApplication::qpeDir() + "/share/opie-console/sl6000_embedix_kill_0_1.sh"; 68 m_kill << QPEApplication::qpeDir() + "share/opie-console/sl6000_embedix_kill_0_1.sh";
69 69
70 70
71 if ( !m_kill.start(OProcess::DontCare,OProcess::NoCommunication) ) { 71 if ( !m_kill.start(OProcess::DontCare,OProcess::NoCommunication) ) {
72 owarn << "could not execute kill script" << oendl; 72 owarn << "could not execute kill script" << oendl;
73 } else { 73 } else {
74 Global::statusMessage( QObject::tr("Fixing up Embedix")); 74 Global::statusMessage( QObject::tr("Fixing up Embedix"));
75 } 75 }
76 76
77 #endif 77 #endif
78} 78}
79 79
80void FixIt::breakIt() { 80void FixIt::breakIt() {
81 #ifdef EAST 81 #ifdef EAST
82 OProcess m_restart; 82 OProcess m_restart;
83 m_restart << QPEApplication::qpeDir() + "/share/opie-console/sl6000_embedix_restart_0_1.sh"; 83 m_restart << QPEApplication::qpeDir() + "share/opie-console/sl6000_embedix_restart_0_1.sh";
84 84
85 85
86 if ( !m_restart.start(OProcess::DontCare,OProcess::NoCommunication) ) { 86 if ( !m_restart.start(OProcess::DontCare,OProcess::NoCommunication) ) {
87 owarn << "could not execute restart script" << oendl; 87 owarn << "could not execute restart script" << oendl;
88 } 88 }
89 89
90 #endif 90 #endif
91} 91}
92 92
93 93
94#endif 94#endif
diff --git a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
index 020a116..3c096ed 100644
--- a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
+++ b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
@@ -29,53 +29,53 @@
29 29
30/* STD */ 30/* STD */
31#include <unistd.h> 31#include <unistd.h>
32#include <stdio.h> 32#include <stdio.h>
33#include <stdlib.h> 33#include <stdlib.h>
34 34
35/* 35/*
36 * The dialog will by default be modeless, unless you set 'modal' to 36 * The dialog will by default be modeless, unless you set 'modal' to
37 * TRUE to construct a modal dialog. */ 37 * TRUE to construct a modal dialog. */
38LibraryDialog::LibraryDialog( QWidget* parent, const char* name , bool /*modal*/, WFlags fl ) 38LibraryDialog::LibraryDialog( QWidget* parent, const char* name , bool /*modal*/, WFlags fl )
39 : QDialog( parent, name, true/* modal*/, fl ) 39 : QDialog( parent, name, true/* modal*/, fl )
40{ 40{
41 if ( !name ) 41 if ( !name )
42 setName( "LibraryDialog" ); 42 setName( "LibraryDialog" );
43 indexLoaded=false; 43 indexLoaded=false;
44 initDialog(); 44 initDialog();
45 45
46 // this->setMaximumWidth(240); 46 // this->setMaximumWidth(240);
47 47
48 index = "GUTINDEX.ALL"; 48 index = "GUTINDEX.ALL";
49 local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/"; 49 local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/";
50 local_index = local_library + index; 50 local_index = local_library + index;
51 51
52 QString iniFile ; 52 QString iniFile ;
53 iniFile = QPEApplication::qpeDir()+"/etc/gutenbrowser/gutenbrowserrc"; 53 iniFile = QPEApplication::qpeDir()+"etc/gutenbrowser/gutenbrowserrc";
54 54
55 new_index =QPEApplication::qpeDir()+"/etc/gutenbrowser/PGWHOLE.TXT"; 55 new_index =QPEApplication::qpeDir()+"etc/gutenbrowser/PGWHOLE.TXT";
56 56
57 old_index = QPEApplication::qpeDir()+"/etc/gutenbrowser/GUTINDEX.ALL"; 57 old_index = QPEApplication::qpeDir()+"etc/gutenbrowser/GUTINDEX.ALL";
58 // old_index = QPEApplication::qpeDir()+"etc/gutenbrowser/GUTINDEX.ALL"; 58 // old_index = QPEApplication::qpeDir()+"etc/gutenbrowser/GUTINDEX.ALL";
59 59
60 // iniFile = local_library+"gutenbrowserrc"; 60 // iniFile = local_library+"gutenbrowserrc";
61 // new_index = local_library + "PGWHOLE.TXT"; 61 // new_index = local_library + "PGWHOLE.TXT";
62 // old_index = local_library + "GUTINDEX.ALL"; 62 // old_index = local_library + "GUTINDEX.ALL";
63 63
64 Config config("Gutenbrowser"); 64 Config config("Gutenbrowser");
65 65
66 config.setGroup( "HttpServer" ); 66 config.setGroup( "HttpServer" );
67 proxy_http = config.readEntry("Preferred", "http://sailor.gutenbook.org"); 67 proxy_http = config.readEntry("Preferred", "http://sailor.gutenbook.org");
68 68
69 config.setGroup( "FTPsite" ); 69 config.setGroup( "FTPsite" );
70 ftp_host=config.readEntry("SiteName", "sailor.gutenberg.org"); 70 ftp_host=config.readEntry("SiteName", "sailor.gutenberg.org");
71 odebug << "Library Dialog: ftp_host is "+ftp_host << oendl; 71 odebug << "Library Dialog: ftp_host is "+ftp_host << oendl;
72 // ftp_host=ftp_host.right(ftp_host.length()-(ftp_host.find(") ",0,TRUE)+1) ); 72 // ftp_host=ftp_host.right(ftp_host.length()-(ftp_host.find(") ",0,TRUE)+1) );
73 // ftp_host=ftp_host.stripWhiteSpace(); 73 // ftp_host=ftp_host.stripWhiteSpace();
74 ftp_base_dir= config.readEntry("base", "/pub/gutenberg"); 74 ftp_base_dir= config.readEntry("base", "/pub/gutenberg");
75 75
76 i_binary = 0; 76 i_binary = 0;
77 77
78 config.setGroup("SortAuth"); 78 config.setGroup("SortAuth");
79 if( config.readEntry("authSort", "FALSE") == "TRUE") 79 if( config.readEntry("authSort", "FALSE") == "TRUE")
80 authBox->setChecked(TRUE); 80 authBox->setChecked(TRUE);
81 81
diff --git a/noncore/apps/opie-gutenbrowser/ftpsitedlg.cpp b/noncore/apps/opie-gutenbrowser/ftpsitedlg.cpp
index a9c7346..de9c72b 100644
--- a/noncore/apps/opie-gutenbrowser/ftpsitedlg.cpp
+++ b/noncore/apps/opie-gutenbrowser/ftpsitedlg.cpp
@@ -17,49 +17,49 @@
17//#include "NetworkDialog.h" 17//#include "NetworkDialog.h"
18#include "output.h" 18#include "output.h"
19 19
20/* OPIE */ 20/* OPIE */
21#include <opie2/odebug.h> 21#include <opie2/odebug.h>
22#include <qpe/config.h> 22#include <qpe/config.h>
23 23
24/* QT */ 24/* QT */
25#include <qprogressbar.h> 25#include <qprogressbar.h>
26#include <qurloperator.h> 26#include <qurloperator.h>
27#include <qlistbox.h> 27#include <qlistbox.h>
28 28
29/* STD */ 29/* STD */
30#include <stdlib.h> 30#include <stdlib.h>
31#include <unistd.h> 31#include <unistd.h>
32#include <stdio.h> 32#include <stdio.h>
33 33
34// :)~ 34// :)~
35void optionsDialog::ftpSiteDlg( ) 35void optionsDialog::ftpSiteDlg( )
36{ 36{
37//printf( "ftpSiteDlg: ListFile is "+ ListFile +"\n" ); 37//printf( "ftpSiteDlg: ListFile is "+ ListFile +"\n" );
38// initDialog(); 38// initDialog();
39 local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/"; 39 local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/";
40// ListFile = local_library + "ftpList"; 40// ListFile = local_library + "ftpList";
41 ListFile = QPEApplication::qpeDir() + "/etc/gutenbrowser"; 41 ListFile = QPEApplication::qpeDir() + "etc/gutenbrowser";
42 QDir dir(ListFile); 42 QDir dir(ListFile);
43 if( !dir.exists()) 43 if( !dir.exists())
44 dir.mkdir(ListFile,true); 44 dir.mkdir(ListFile,true);
45 ListFile+="/ftpList"; 45 ListFile+="/ftpList";
46 odebug << "opening "+ListFile << oendl; 46 odebug << "opening "+ListFile << oendl;
47 if ( QFile(ListFile).exists() ) { 47 if ( QFile(ListFile).exists() ) {
48 openSiteList(); 48 openSiteList();
49 } else { 49 } else {
50 switch( QMessageBox::warning( this, "Gutenbrowser", 50 switch( QMessageBox::warning( this, "Gutenbrowser",
51 "Do you want to download \nan ftp site list?", 51 "Do you want to download \nan ftp site list?",
52 QMessageBox::Yes, QMessageBox::No)) { 52 QMessageBox::Yes, QMessageBox::No)) {
53 case QMessageBox::Yes: // yes 53 case QMessageBox::Yes: // yes
54 getSite(); 54 getSite();
55 break; 55 break;
56 case QMessageBox::No: // No 56 case QMessageBox::No: // No
57 // exit 57 // exit
58 break; 58 break;
59 } 59 }
60 60
61 } 61 }
62} 62}
63 63
64 64
65/* 65/*
diff --git a/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp b/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp
index 644fae8..fac21da 100644
--- a/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp
+++ b/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp
@@ -121,54 +121,54 @@ Gutenbrowser::Gutenbrowser(QWidget *,const char*, WFlags )
121 config.setGroup("General"); 121 config.setGroup("General");
122 122
123 config.setGroup( "Files" ); 123 config.setGroup( "Files" );
124 QString s_numofFiles = config.readEntry("NumberOfFiles", "0" ); 124 QString s_numofFiles = config.readEntry("NumberOfFiles", "0" );
125 int i_numofFiles = s_numofFiles.toInt(); 125 int i_numofFiles = s_numofFiles.toInt();
126 126
127 QString tempFileName; 127 QString tempFileName;
128 128
129 for (int i = 0; i <= i_numofFiles; i++) { 129 for (int i = 0; i <= i_numofFiles; i++) {
130 // tempFileName.setNum(i); 130 // tempFileName.setNum(i);
131 config.setGroup( "Files" ); 131 config.setGroup( "Files" );
132 QString ramble = config.readEntry( QString::number(i), "" ); 132 QString ramble = config.readEntry( QString::number(i), "" );
133 133
134 config.setGroup( "Titles" ); 134 config.setGroup( "Titles" );
135 QString tempTitle = config.readEntry( ramble, ""); 135 QString tempTitle = config.readEntry( ramble, "");
136 config.setGroup( tempTitle); 136 config.setGroup( tempTitle);
137 int index = config.readNumEntry( "LineNumber", -1 ); 137 int index = config.readNumEntry( "LineNumber", -1 );
138 if( index != -1) { 138 if( index != -1) {
139 odebug << tempTitle << oendl; 139 odebug << tempTitle << oendl;
140 if(!tempTitle.isEmpty()) bookmarksMenu->insertItem( tempTitle); 140 if(!tempTitle.isEmpty()) bookmarksMenu->insertItem( tempTitle);
141 } 141 }
142 } 142 }
143 143
144 // QString gutenIndex= local_library + "GUTINDEX.ALL"; 144 // QString gutenIndex= local_library + "GUTINDEX.ALL";
145 QString gutenIndex = QPEApplication::qpeDir()+ "/etc/gutenbrowser/GUTINDEX.ALL"; 145 QString gutenIndex = QPEApplication::qpeDir()+ "etc/gutenbrowser/GUTINDEX.ALL";
146 qDebug("gutenindex "+gutenIndex ); 146 qDebug("gutenindex "+gutenIndex );
147 if( QFile( gutenIndex).exists() ) { 147 if( QFile( gutenIndex).exists() ) {
148 indexLib.setName( gutenIndex); 148 indexLib.setName( gutenIndex);
149 } else { 149 } else {
150 QString localLibIndexFile = QPEApplication::qpeDir()+ "/etc/gutenbrowser/PGWHOLE.TXT"; 150 QString localLibIndexFile = QPEApplication::qpeDir()+ "etc/gutenbrowser/PGWHOLE.TXT";
151 // QString localLibIndexFile= local_library + "PGWHOLE.TXT"; 151 // QString localLibIndexFile= local_library + "PGWHOLE.TXT";
152 newindexLib.setName( localLibIndexFile); 152 newindexLib.setName( localLibIndexFile);
153 } 153 }
154 qDebug("attempting new library"); 154 qDebug("attempting new library");
155 LibraryDlg = new LibraryDialog( this, "Library Index" /*, TRUE */); 155 LibraryDlg = new LibraryDialog( this, "Library Index" /*, TRUE */);
156 loadCheck = false; 156 loadCheck = false;
157 chdir(local_library); 157 chdir(local_library);
158 if(!showMainList) { 158 if(!showMainList) {
159 Lview->setFocus(); 159 Lview->setFocus();
160 // if(firstTime) 160 // if(firstTime)
161 // Bookmark(); 161 // Bookmark();
162 for (int i=1;i< qApp->argc();i++) { 162 for (int i=1;i< qApp->argc();i++) {
163 qDebug("Suppose we open somethin"); 163 qDebug("Suppose we open somethin");
164 if(!load(qApp->argv()[i])) return; 164 if(!load(qApp->argv()[i])) return;
165 } 165 }
166 } else { 166 } else {
167 fillWithTitles(); 167 fillWithTitles();
168 mainList->setFocus(); 168 mainList->setFocus();
169 // mainList->setCurrentItem(0); 169 // mainList->setCurrentItem(0);
170 170
171 } 171 }
172 writeConfig(); 172 writeConfig();
173 QTimer::singleShot( 250, this, SLOT(hideView()) ); 173 QTimer::singleShot( 250, this, SLOT(hideView()) );
174} //end init 174} //end init
diff --git a/noncore/apps/opie-gutenbrowser/helpme.cpp b/noncore/apps/opie-gutenbrowser/helpme.cpp
index 53e0236..0e23114 100644
--- a/noncore/apps/opie-gutenbrowser/helpme.cpp
+++ b/noncore/apps/opie-gutenbrowser/helpme.cpp
@@ -37,49 +37,49 @@ HelpMe::HelpMe(QWidget *parent, QString name ) : QDialog(parent,name)
37 setCaption(tr("Gutenbrowser About " VERSION)); 37 setCaption(tr("Gutenbrowser About " VERSION));
38 38
39 QGridLayout *layout = new QGridLayout( this ); 39 QGridLayout *layout = new QGridLayout( this );
40 layout->setSpacing( 4 ); 40 layout->setSpacing( 4 );
41 layout->setMargin( 4 ); 41 layout->setMargin( 4 );
42 42
43 Edit = new QMultiLineEdit(this, ""); 43 Edit = new QMultiLineEdit(this, "");
44 Edit->setReadOnly(true); 44 Edit->setReadOnly(true);
45 Edit->append(tr("Based on gutenbook.pl, available from http://www.gutenbook.org")); 45 Edit->append(tr("Based on gutenbook.pl, available from http://www.gutenbook.org"));
46 Edit->append(tr("Much appreciation to Lee Burgess,")); 46 Edit->append(tr("Much appreciation to Lee Burgess,"));
47 Edit->append(tr("for the original idea and concept of gutenbook.\n")); 47 Edit->append(tr("for the original idea and concept of gutenbook.\n"));
48 Edit->append(tr("A list of current Gutenberg ftp sites is at http://promo.net/pg/index.html\n")); 48 Edit->append(tr("A list of current Gutenberg ftp sites is at http://promo.net/pg/index.html\n"));
49 Edit->append(tr("For bug reports, comments or questions about Gutenbrowser, email")); 49 Edit->append(tr("For bug reports, comments or questions about Gutenbrowser, email"));
50 Edit->append(tr("ljp@llornkcor.com\n")); 50 Edit->append(tr("ljp@llornkcor.com\n"));
51 Edit->append(tr("\nMade using Qt, Qt Embedded, and Qtopia, a cross platform development API\nhttp://www.trolltech.com\n\n")); 51 Edit->append(tr("\nMade using Qt, Qt Embedded, and Qtopia, a cross platform development API\nhttp://www.trolltech.com\n\n"));
52 Edit->append(tr("Arnold's Laws of Documentation:")); 52 Edit->append(tr("Arnold's Laws of Documentation:"));
53 Edit->append(tr("(1) If it should exist, it doesn't.")); 53 Edit->append(tr("(1) If it should exist, it doesn't."));
54 Edit->append(tr("(2) If it does exist, it's out of date.")); 54 Edit->append(tr("(2) If it does exist, it's out of date."));
55 Edit->append(tr("(3) Only documentation for")); 55 Edit->append(tr("(3) Only documentation for"));
56 Edit->append(tr("useless programs transcends the")); 56 Edit->append(tr("useless programs transcends the"));
57 Edit->append(tr("first two laws.\n")); 57 Edit->append(tr("first two laws.\n"));
58 Edit->append(tr("Everything is temporary, anyway....\n :o)")); 58 Edit->append(tr("Everything is temporary, anyway....\n :o)"));
59 Edit->setWordWrap(QMultiLineEdit::WidgetWidth); 59 Edit->setWordWrap(QMultiLineEdit::WidgetWidth);
60 QString pixDir; 60 QString pixDir;
61 pixDir=QPEApplication::qpeDir()+"/pics/"; 61 pixDir=QPEApplication::qpeDir()+"pics/";
62 QPushButton *help; 62 QPushButton *help;
63 help = new QPushButton(this); 63 help = new QPushButton(this);
64 help->setPixmap( QPixmap( pixDir+"gutenbrowser/help.png")); 64 help->setPixmap( QPixmap( pixDir+"gutenbrowser/help.png"));
65 help->setText("Help"); 65 help->setText("Help");
66 connect( help,SIGNAL(clicked()),this,SLOT( help() )); 66 connect( help,SIGNAL(clicked()),this,SLOT( help() ));
67 67
68/* QPushButton *ok; 68/* QPushButton *ok;
69 ok = new QPushButton(this); 69 ok = new QPushButton(this);
70 ok->setPixmap( QPixmap( pixDir+"/gutenbrowser/exit.png")); 70 ok->setPixmap( QPixmap( pixDir+"/gutenbrowser/exit.png"));
71 ok->setText("ok"); 71 ok->setText("ok");
72 connect(ok,SIGNAL(clicked()),this,SLOT(accept() )); 72 connect(ok,SIGNAL(clicked()),this,SLOT(accept() ));
73*/ 73*/
74 help->setFixedHeight(25); 74 help->setFixedHeight(25);
75// ok->setFixedHeight(25); 75// ok->setFixedHeight(25);
76 76
77// layout->addMultiCellWidget( ok, 0, 0, 4, 4 ); 77// layout->addMultiCellWidget( ok, 0, 0, 4, 4 );
78 layout->addMultiCellWidget( help, 0, 0, 4, 4 ); 78 layout->addMultiCellWidget( help, 0, 0, 4, 4 );
79 layout->addMultiCellWidget( Edit, 1, 1, 0, 4 ); 79 layout->addMultiCellWidget( Edit, 1, 1, 0, 4 );
80} 80}
81 81
82HelpMe::~HelpMe() 82HelpMe::~HelpMe()
83{ 83{
84//delete Edit; 84//delete Edit;
85 85
diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp
index 6aa6392..1ae3b15 100644
--- a/noncore/apps/zsafe/zsafe.cpp
+++ b/noncore/apps/zsafe/zsafe.cpp
@@ -2755,49 +2755,49 @@ void ZSafe::addCategory()
2755 firstCategory = categ; 2755 firstCategory = categ;
2756 } 2756 }
2757 } 2757 }
2758 ++it; 2758 ++it;
2759 } 2759 }
2760 2760
2761 2761
2762 if (firstCategory.isEmpty()) 2762 if (firstCategory.isEmpty())
2763 setCategoryDialogFields(dialog); 2763 setCategoryDialogFields(dialog);
2764 else 2764 else
2765 setCategoryDialogFields(dialog, firstCategory); 2765 setCategoryDialogFields(dialog, firstCategory);
2766 2766
2767 // CategoryDialog *dialog = new CategoryDialog(this, "Category", TRUE); 2767 // CategoryDialog *dialog = new CategoryDialog(this, "Category", TRUE);
2768 2768
2769 if (initIcons) 2769 if (initIcons)
2770 { 2770 {
2771 Wait waitDialog(this, tr("Wait dialog")); 2771 Wait waitDialog(this, tr("Wait dialog"));
2772 waitDialog.waitLabel->setText(tr("Gathering icons...")); 2772 waitDialog.waitLabel->setText(tr("Gathering icons..."));
2773 waitDialog.show(); 2773 waitDialog.show();
2774 qApp->processEvents(); 2774 qApp->processEvents();
2775 2775
2776#ifdef DESKTOP 2776#ifdef DESKTOP
2777 QDir d(iconPath); 2777 QDir d(iconPath);
2778#else 2778#else
2779 QDir d(QPEApplication::qpeDir() + "/pics/"); 2779 QDir d(QPEApplication::qpeDir() + "pics/");
2780#endif 2780#endif
2781 d.setFilter( QDir::Files); 2781 d.setFilter( QDir::Files);
2782 2782
2783 const QFileInfoList *list = d.entryInfoList(); 2783 const QFileInfoList *list = d.entryInfoList();
2784 QFileInfoListIterator it( *list ); // create list iterator 2784 QFileInfoListIterator it( *list ); // create list iterator
2785 QFileInfo *fi; // pointer for traversing 2785 QFileInfo *fi; // pointer for traversing
2786 2786
2787 dialog->IconField->insertItem("predefined"); 2787 dialog->IconField->insertItem("predefined");
2788 while ( (fi=it.current()) ) { // for each file... 2788 while ( (fi=it.current()) ) { // for each file...
2789 QString fileName = fi->fileName(); 2789 QString fileName = fi->fileName();
2790 if(fileName.right(4) == ".png"){ 2790 if(fileName.right(4) == ".png"){
2791 fileName = fileName.mid(0,fileName.length()-4); 2791 fileName = fileName.mid(0,fileName.length()-4);
2792#ifdef DESKTOP 2792#ifdef DESKTOP
2793 QPixmap imageOfFile; 2793 QPixmap imageOfFile;
2794 imageOfFile.load(iconPath + fi->fileName()); 2794 imageOfFile.load(iconPath + fi->fileName());
2795#else 2795#else
2796 QPixmap imageOfFile(Resource::loadPixmap(fileName)); 2796 QPixmap imageOfFile(Resource::loadPixmap(fileName));
2797#endif 2797#endif
2798 QImage foo = imageOfFile.convertToImage(); 2798 QImage foo = imageOfFile.convertToImage();
2799 foo = foo.smoothScale(16,16); 2799 foo = foo.smoothScale(16,16);
2800 imageOfFile.convertFromImage(foo); 2800 imageOfFile.convertFromImage(foo);
2801 dialog->IconField->insertItem(imageOfFile,fileName); 2801 dialog->IconField->insertItem(imageOfFile,fileName);
2802 } 2802 }
2803 ++it; 2803 ++it;
@@ -2939,49 +2939,49 @@ void ZSafe::setCategoryDialogFields(CategoryDialog *dialog)
2939 dialog->Field5->setText(getFieldLabel (selectedItem, "5", tr("Field 4"))); 2939 dialog->Field5->setText(getFieldLabel (selectedItem, "5", tr("Field 4")));
2940 dialog->Field6->setText(getFieldLabel (selectedItem, "6", tr("Field 5"))); 2940 dialog->Field6->setText(getFieldLabel (selectedItem, "6", tr("Field 5")));
2941 2941
2942 Category *cat= categories.find (selectedItem->text(0)); 2942 Category *cat= categories.find (selectedItem->text(0));
2943 if (cat) 2943 if (cat)
2944 { 2944 {
2945 icon = cat->getIconName(); 2945 icon = cat->getIconName();
2946 } 2946 }
2947 else 2947 else
2948 icon = conf->readEntry(APP_KEY+selectedItem->text(0)); 2948 icon = conf->readEntry(APP_KEY+selectedItem->text(0));
2949 } 2949 }
2950 else 2950 else
2951 { 2951 {
2952 dialog->Field1->setText(tr("Name")); 2952 dialog->Field1->setText(tr("Name"));
2953 dialog->Field2->setText(tr("Username")); 2953 dialog->Field2->setText(tr("Username"));
2954 dialog->Field3->setText(tr("Password")); 2954 dialog->Field3->setText(tr("Password"));
2955 dialog->Field4->setText(tr("Comment")); 2955 dialog->Field4->setText(tr("Comment"));
2956 dialog->Field5->setText(tr("Field 4")); 2956 dialog->Field5->setText(tr("Field 4"));
2957 dialog->Field6->setText(tr("Field 5")); 2957 dialog->Field6->setText(tr("Field 5"));
2958 } 2958 }
2959 2959
2960#ifdef DESKTOP 2960#ifdef DESKTOP
2961 QDir d(iconPath); 2961 QDir d(iconPath);
2962#else 2962#else
2963 QDir d(QPEApplication::qpeDir() + "/pics/"); 2963 QDir d(QPEApplication::qpeDir() + "pics/");
2964#endif 2964#endif
2965 d.setFilter( QDir::Files); 2965 d.setFilter( QDir::Files);
2966 2966
2967 const QFileInfoList *list = d.entryInfoList(); 2967 const QFileInfoList *list = d.entryInfoList();
2968 int i=0; 2968 int i=0;
2969 QFileInfoListIterator it( *list ); // create list iterator 2969 QFileInfoListIterator it( *list ); // create list iterator
2970 QFileInfo *fi; // pointer for traversing 2970 QFileInfo *fi; // pointer for traversing
2971 if (icon.isEmpty() || icon.isNull()) 2971 if (icon.isEmpty() || icon.isNull())
2972 { 2972 {
2973 dialog->IconField->setCurrentItem(0); 2973 dialog->IconField->setCurrentItem(0);
2974 } 2974 }
2975 else 2975 else
2976 { 2976 {
2977 while ( (fi=it.current()) ) 2977 while ( (fi=it.current()) )
2978 { // for each file... 2978 { // for each file...
2979 QString fileName = fi->fileName(); 2979 QString fileName = fi->fileName();
2980 if(fileName.right(4) == ".png") 2980 if(fileName.right(4) == ".png")
2981 { 2981 {
2982 fileName = fileName.mid(0,fileName.length()-4); 2982 fileName = fileName.mid(0,fileName.length()-4);
2983 2983
2984 if(fileName+".png"==icon) 2984 if(fileName+".png"==icon)
2985 { 2985 {
2986 dialog->IconField->setCurrentItem(i+1); 2986 dialog->IconField->setCurrentItem(i+1);
2987 break; 2987 break;
@@ -2996,49 +2996,49 @@ void ZSafe::setCategoryDialogFields(CategoryDialog *dialog)
2996void ZSafe::setCategoryDialogFields(CategoryDialog *dialog, QString category) 2996void ZSafe::setCategoryDialogFields(CategoryDialog *dialog, QString category)
2997{ 2997{
2998 if (!dialog) 2998 if (!dialog)
2999 return; 2999 return;
3000 3000
3001 dialog->Field1->setText(getFieldLabel (category, "1", tr("Name"))); 3001 dialog->Field1->setText(getFieldLabel (category, "1", tr("Name")));
3002 dialog->Field2->setText(getFieldLabel (category, "2", tr("Username"))); 3002 dialog->Field2->setText(getFieldLabel (category, "2", tr("Username")));
3003 dialog->Field3->setText(getFieldLabel (category, "3", tr("Password"))); 3003 dialog->Field3->setText(getFieldLabel (category, "3", tr("Password")));
3004 dialog->Field4->setText(getFieldLabel (category, "4", tr("Comment"))); 3004 dialog->Field4->setText(getFieldLabel (category, "4", tr("Comment")));
3005 dialog->Field5->setText(getFieldLabel (category, "5", tr("Field 4"))); 3005 dialog->Field5->setText(getFieldLabel (category, "5", tr("Field 4")));
3006 dialog->Field6->setText(getFieldLabel (category, "6", tr("Field 5"))); 3006 dialog->Field6->setText(getFieldLabel (category, "6", tr("Field 5")));
3007 3007
3008 QString icon; 3008 QString icon;
3009 Category *cat= categories.find (category); 3009 Category *cat= categories.find (category);
3010 if (cat) 3010 if (cat)
3011 { 3011 {
3012 icon = cat->getIconName(); 3012 icon = cat->getIconName();
3013 } 3013 }
3014 else 3014 else
3015 icon = conf->readEntry(APP_KEY+category); 3015 icon = conf->readEntry(APP_KEY+category);
3016 3016
3017#ifdef DESKTOP 3017#ifdef DESKTOP
3018 QDir d(iconPath); 3018 QDir d(iconPath);
3019#else 3019#else
3020 QDir d(QPEApplication::qpeDir() + "/pics/"); 3020 QDir d(QPEApplication::qpeDir() + "pics/");
3021#endif 3021#endif
3022 d.setFilter( QDir::Files); 3022 d.setFilter( QDir::Files);
3023 3023
3024 const QFileInfoList *list = d.entryInfoList(); 3024 const QFileInfoList *list = d.entryInfoList();
3025 int i=0; 3025 int i=0;
3026 QFileInfoListIterator it( *list ); // create list iterator 3026 QFileInfoListIterator it( *list ); // create list iterator
3027 QFileInfo *fi; // pointer for traversing 3027 QFileInfo *fi; // pointer for traversing
3028 if (icon.isEmpty() || icon.isNull()) 3028 if (icon.isEmpty() || icon.isNull())
3029 { 3029 {
3030 dialog->IconField->setCurrentItem(0); 3030 dialog->IconField->setCurrentItem(0);
3031 } 3031 }
3032 else 3032 else
3033 { 3033 {
3034 while ( (fi=it.current()) ) 3034 while ( (fi=it.current()) )
3035 { // for each file... 3035 { // for each file...
3036 QString fileName = fi->fileName(); 3036 QString fileName = fi->fileName();
3037 if(fileName.right(4) == ".png") 3037 if(fileName.right(4) == ".png")
3038 { 3038 {
3039 fileName = fileName.mid(0,fileName.length()-4); 3039 fileName = fileName.mid(0,fileName.length()-4);
3040 3040
3041 if(fileName+".png"==icon) 3041 if(fileName+".png"==icon)
3042 { 3042 {
3043 dialog->IconField->setCurrentItem(i+1); 3043 dialog->IconField->setCurrentItem(i+1);
3044 break; 3044 break;
@@ -3175,92 +3175,92 @@ void ZSafe::editCategory()
3175 if (!foundCategory) 3175 if (!foundCategory)
3176 { 3176 {
3177 dialog->CategoryField->insertItem (category, i); 3177 dialog->CategoryField->insertItem (category, i);
3178 dialog->CategoryField->setCurrentItem(i); 3178 dialog->CategoryField->setCurrentItem(i);
3179 } 3179 }
3180 3180
3181 QString icon; 3181 QString icon;
3182 Category *cat= categories.find (selectedItem->text(0)); 3182 Category *cat= categories.find (selectedItem->text(0));
3183 if (cat) 3183 if (cat)
3184 { 3184 {
3185 icon = cat->getIconName(); 3185 icon = cat->getIconName();
3186 } 3186 }
3187 3187
3188 if (initIcons) 3188 if (initIcons)
3189 { 3189 {
3190 3190
3191 Wait waitDialog(this, tr("Wait dialog")); 3191 Wait waitDialog(this, tr("Wait dialog"));
3192 waitDialog.waitLabel->setText(tr("Gathering icons...")); 3192 waitDialog.waitLabel->setText(tr("Gathering icons..."));
3193 waitDialog.show(); 3193 waitDialog.show();
3194 qApp->processEvents(); 3194 qApp->processEvents();
3195 3195
3196#ifdef DESKTOP 3196#ifdef DESKTOP
3197 QDir d(iconPath); 3197 QDir d(iconPath);
3198#else 3198#else
3199 QDir d(QPEApplication::qpeDir() + "/pics/"); 3199 QDir d(QPEApplication::qpeDir() + "pics/");
3200#endif 3200#endif
3201 d.setFilter( QDir::Files); 3201 d.setFilter( QDir::Files);
3202 3202
3203 const QFileInfoList *list = d.entryInfoList(); 3203 const QFileInfoList *list = d.entryInfoList();
3204 int i=0; 3204 int i=0;
3205 QFileInfoListIterator it( *list ); // create list iterator 3205 QFileInfoListIterator it( *list ); // create list iterator
3206 QFileInfo *fi; // pointer for traversing 3206 QFileInfo *fi; // pointer for traversing
3207 if (icon.isEmpty() || icon.isNull()) 3207 if (icon.isEmpty() || icon.isNull())
3208 { 3208 {
3209 dialog->IconField->setCurrentItem(0); 3209 dialog->IconField->setCurrentItem(0);
3210 } 3210 }
3211 3211
3212 dialog->IconField->insertItem("predefined"); 3212 dialog->IconField->insertItem("predefined");
3213 while ( (fi=it.current()) ) { // for each file... 3213 while ( (fi=it.current()) ) { // for each file...
3214 QString fileName = fi->fileName(); 3214 QString fileName = fi->fileName();
3215 if(fileName.right(4) == ".png") 3215 if(fileName.right(4) == ".png")
3216 { 3216 {
3217 fileName = fileName.mid(0,fileName.length()-4); 3217 fileName = fileName.mid(0,fileName.length()-4);
3218#ifdef DESKTOP 3218#ifdef DESKTOP
3219 QPixmap imageOfFile; 3219 QPixmap imageOfFile;
3220 imageOfFile.load(iconPath + fi->fileName()); 3220 imageOfFile.load(iconPath + fi->fileName());
3221#else 3221#else
3222 QPixmap imageOfFile(Resource::loadPixmap(fileName)); 3222 QPixmap imageOfFile(Resource::loadPixmap(fileName));
3223#endif 3223#endif
3224 QImage foo = imageOfFile.convertToImage(); 3224 QImage foo = imageOfFile.convertToImage();
3225 foo = foo.smoothScale(16,16); 3225 foo = foo.smoothScale(16,16);
3226 imageOfFile.convertFromImage(foo); 3226 imageOfFile.convertFromImage(foo);
3227 dialog->IconField->insertItem(imageOfFile,fileName); 3227 dialog->IconField->insertItem(imageOfFile,fileName);
3228 if(fileName+".png"==icon) 3228 if(fileName+".png"==icon)
3229 dialog->IconField->setCurrentItem(i+1); 3229 dialog->IconField->setCurrentItem(i+1);
3230 ++i; 3230 ++i;
3231 } 3231 }
3232 ++it; 3232 ++it;
3233 } 3233 }
3234 waitDialog.hide(); 3234 waitDialog.hide();
3235 } 3235 }
3236 else 3236 else
3237 { 3237 {
3238#ifdef DESKTOP 3238#ifdef DESKTOP
3239 // QDir d(QDir::homeDirPath() + "/pics/"); 3239 // QDir d(QDir::homeDirPath() + "/pics/");
3240 QDir d(iconPath); 3240 QDir d(iconPath);
3241#else 3241#else
3242 QDir d(QPEApplication::qpeDir() + "/pics/"); 3242 QDir d(QPEApplication::qpeDir() + "pics/");
3243#endif 3243#endif
3244 d.setFilter( QDir::Files); 3244 d.setFilter( QDir::Files);
3245 3245
3246 const QFileInfoList *list = d.entryInfoList(); 3246 const QFileInfoList *list = d.entryInfoList();
3247 int i=0; 3247 int i=0;
3248 QFileInfoListIterator it( *list ); // create list iterator 3248 QFileInfoListIterator it( *list ); // create list iterator
3249 QFileInfo *fi; // pointer for traversing 3249 QFileInfo *fi; // pointer for traversing
3250 if (icon.isEmpty() || icon.isNull()) 3250 if (icon.isEmpty() || icon.isNull())
3251 { 3251 {
3252 dialog->IconField->setCurrentItem(0); 3252 dialog->IconField->setCurrentItem(0);
3253 } 3253 }
3254 else 3254 else
3255 { 3255 {
3256 3256
3257 while ( (fi=it.current()) ) 3257 while ( (fi=it.current()) )
3258 { // for each file... 3258 { // for each file...
3259 QString fileName = fi->fileName(); 3259 QString fileName = fi->fileName();
3260 if(fileName.right(4) == ".png") 3260 if(fileName.right(4) == ".png")
3261 { 3261 {
3262 fileName = fileName.mid(0,fileName.length()-4); 3262 fileName = fileName.mid(0,fileName.length()-4);
3263 3263
3264 3264
3265 if(fileName+".png"==icon) 3265 if(fileName+".png"==icon)
3266 { 3266 {
diff --git a/noncore/games/backgammon/backgammon.cpp b/noncore/games/backgammon/backgammon.cpp
index bdb1c78..c286a36 100644
--- a/noncore/games/backgammon/backgammon.cpp
+++ b/noncore/games/backgammon/backgammon.cpp
@@ -36,49 +36,49 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
36 //load the default theme 36 //load the default theme
37 Config conf("backgammon"); 37 Config conf("backgammon");
38 if(!conf.isValid()) 38 if(!conf.isValid())
39 { 39 {
40 odebug << "config file does not exist" << oendl; 40 odebug << "config file does not exist" << oendl;
41 conf.setGroup("general"); 41 conf.setGroup("general");
42 conf.writeEntry("theme","default"); 42 conf.writeEntry("theme","default");
43 conf.setGroup("rules"); 43 conf.setGroup("rules");
44 conf.writeEntry("move_with_pieces_out",false); 44 conf.writeEntry("move_with_pieces_out",false);
45 conf.writeEntry("nice_dice",false); 45 conf.writeEntry("nice_dice",false);
46 conf.setGroup("display"); 46 conf.setGroup("display");
47 conf.writeEntry("small",false); 47 conf.writeEntry("small",false);
48 conf.writeEntry("warning",true); 48 conf.writeEntry("warning",true);
49 conf.setGroup("ai"); 49 conf.setGroup("ai");
50 conf.writeEntry("rescue",6); 50 conf.writeEntry("rescue",6);
51 conf.writeEntry("eliminate",4); 51 conf.writeEntry("eliminate",4);
52 conf.writeEntry("expose",1); 52 conf.writeEntry("expose",1);
53 conf.writeEntry("protect",5); 53 conf.writeEntry("protect",5);
54 conf.writeEntry("safe",3); 54 conf.writeEntry("safe",3);
55 conf.writeEntry("empty",2); 55 conf.writeEntry("empty",2);
56 56
57 } 57 }
58 conf.setGroup("general"); 58 conf.setGroup("general");
59 theme_name=conf.readEntry("theme","default"); 59 theme_name=conf.readEntry("theme","default");
60 QString theme_file=QPEApplication::qpeDir()+"/backgammon/"+theme_name+".theme"; 60 QString theme_file=QPEApplication::qpeDir()+"backgammon/"+theme_name+".theme";
61 61
62 //the rules 62 //the rules
63 conf.setGroup("rules"); 63 conf.setGroup("rules");
64 rules.move_with_pieces_out=conf.readBoolEntry("move_with_pieces_out",false); 64 rules.move_with_pieces_out=conf.readBoolEntry("move_with_pieces_out",false);
65 rules.generous_dice=conf.readBoolEntry("nice_dice",false); 65 rules.generous_dice=conf.readBoolEntry("nice_dice",false);
66 66
67 move->setRules(rules); 67 move->setRules(rules);
68 68
69 //get the AI settings 69 //get the AI settings
70 AISettings ai; 70 AISettings ai;
71 conf.setGroup("ai"); 71 conf.setGroup("ai");
72 ai.rescue=conf.readNumEntry("rescue",6); 72 ai.rescue=conf.readNumEntry("rescue",6);
73 ai.eliminate=conf.readNumEntry("eliminate",4); 73 ai.eliminate=conf.readNumEntry("eliminate",4);
74 ai.expose=conf.readNumEntry("expose",1); 74 ai.expose=conf.readNumEntry("expose",1);
75 ai.protect=conf.readNumEntry("protect",5); 75 ai.protect=conf.readNumEntry("protect",5);
76 ai.safe=conf.readNumEntry("safe",3); 76 ai.safe=conf.readNumEntry("safe",3);
77 ai.empty=conf.readNumEntry("empty",2); 77 ai.empty=conf.readNumEntry("empty",2);
78 move->setAISettings(ai); 78 move->setAISettings(ai);
79 79
80 80
81 //get the theme component names 81 //get the theme component names
82 Config theme(theme_file,Config::File); 82 Config theme(theme_file,Config::File);
83 if(!theme.isValid()) 83 if(!theme.isValid())
84 { 84 {
@@ -307,230 +307,230 @@ void BackGammon::newgame()
307 dice4_played=true; 307 dice4_played=true;
308 dice_rolled=false; 308 dice_rolled=false;
309 setplayer(); 309 setplayer();
310 area->update(); 310 area->update();
311} 311}
312 312
313void BackGammon::playerselect() 313void BackGammon::playerselect()
314{ 314{
315 PlayerDialog* playerdialog=new PlayerDialog(this); 315 PlayerDialog* playerdialog=new PlayerDialog(this);
316 playerdialog->setAuto1(player1_auto); 316 playerdialog->setAuto1(player1_auto);
317 playerdialog->setAuto2(player2_auto); 317 playerdialog->setAuto2(player2_auto);
318 if(!playerdialog->exec()) 318 if(!playerdialog->exec())
319 return; 319 return;
320 player1_auto=playerdialog->getAuto1(); 320 player1_auto=playerdialog->getAuto1();
321 player2_auto=playerdialog->getAuto2(); 321 player2_auto=playerdialog->getAuto2();
322} 322}
323 323
324void BackGammon::loadgame() 324void BackGammon::loadgame()
325{ 325{
326 FileDialog* file=new FileDialog(this,"Load Game",".game"); 326 FileDialog* file=new FileDialog(this,"Load Game",".game");
327 if(!file->exec()) 327 if(!file->exec())
328 return; 328 return;
329 329
330 game_name=file->filename(); 330 game_name=file->filename();
331 QString game_file=QPEApplication::qpeDir()+"/backgammon/"+game_name+".game"; 331 QString game_file=QPEApplication::qpeDir()+"backgammon/"+game_name+".game";
332 332
333 Config game(game_file,Config::File); 333 Config game(game_file,Config::File);
334 game.setGroup("dice"); 334 game.setGroup("dice");
335 diceA1_value=game.readNumEntry("diceA1_value"); 335 diceA1_value=game.readNumEntry("diceA1_value");
336 diceA2_value=game.readNumEntry("diceA2_value"); 336 diceA2_value=game.readNumEntry("diceA2_value");
337 diceA3_value=game.readNumEntry("diceA3_value"); 337 diceA3_value=game.readNumEntry("diceA3_value");
338 diceA4_value=game.readNumEntry("diceA4_value"); 338 diceA4_value=game.readNumEntry("diceA4_value");
339 diceB1_value=game.readNumEntry("diceB1_value"); 339 diceB1_value=game.readNumEntry("diceB1_value");
340 diceB2_value=game.readNumEntry("diceB2_value"); 340 diceB2_value=game.readNumEntry("diceB2_value");
341 diceB3_value=game.readNumEntry("diceB3_value"); 341 diceB3_value=game.readNumEntry("diceB3_value");
342 diceB4_value=game.readNumEntry("diceB4_value"); 342 diceB4_value=game.readNumEntry("diceB4_value");
343 player=game.readNumEntry("player"); 343 player=game.readNumEntry("player");
344 dice1_played=game.readBoolEntry("dice1_played"); 344 dice1_played=game.readBoolEntry("dice1_played");
345 dice2_played=game.readBoolEntry("dice2_played"); 345 dice2_played=game.readBoolEntry("dice2_played");
346 dice3_played=game.readBoolEntry("dice3_played"); 346 dice3_played=game.readBoolEntry("dice3_played");
347 dice4_played=game.readBoolEntry("dice4_played"); 347 dice4_played=game.readBoolEntry("dice4_played");
348 dice_rolled=game.readBoolEntry("dice_rolled"); 348 dice_rolled=game.readBoolEntry("dice_rolled");
349 player1_auto=game.readBoolEntry("player1_auto"); 349 player1_auto=game.readBoolEntry("player1_auto");
350 player2_auto=game.readBoolEntry("player2_auto"); 350 player2_auto=game.readBoolEntry("player2_auto");
351 351
352 game.setGroup("pieces"); 352 game.setGroup("pieces");
353 QString label; 353 QString label;
354 LoadSave load; 354 LoadSave load;
355 for(int a=0;a<28;a++) 355 for(int a=0;a<28;a++)
356 { 356 {
357 label.setNum(a); 357 label.setNum(a);
358 load.pop[a].total = game.readNumEntry(label,0); 358 load.pop[a].total = game.readNumEntry(label,0);
359 } 359 }
360 360
361 move->loadGame(load); 361 move->loadGame(load);
362 setplayer(); 362 setplayer();
363 showdice(); 363 showdice();
364 draw(); 364 draw();
365 area->update(); 365 area->update();
366} 366}
367 367
368void BackGammon::savegame() 368void BackGammon::savegame()
369{ 369{
370 QString game_file=QPEApplication::qpeDir()+"/backgammon/"+game_name+".game"; 370 QString game_file=QPEApplication::qpeDir()+"backgammon/"+game_name+".game";
371 371
372 Config game(game_file,Config::File); 372 Config game(game_file,Config::File);
373 game.setGroup("dice"); 373 game.setGroup("dice");
374 game.writeEntry("diceA1_value",diceA1_value); 374 game.writeEntry("diceA1_value",diceA1_value);
375 game.writeEntry("diceA2_value",diceA2_value); 375 game.writeEntry("diceA2_value",diceA2_value);
376 game.writeEntry("diceA3_value",diceA3_value); 376 game.writeEntry("diceA3_value",diceA3_value);
377 game.writeEntry("diceA4_value",diceA4_value); 377 game.writeEntry("diceA4_value",diceA4_value);
378 game.writeEntry("diceB1_value",diceB1_value); 378 game.writeEntry("diceB1_value",diceB1_value);
379 game.writeEntry("diceB2_value",diceB3_value); 379 game.writeEntry("diceB2_value",diceB3_value);
380 game.writeEntry("diceB3_value",diceB4_value); 380 game.writeEntry("diceB3_value",diceB4_value);
381 game.writeEntry("diceB4_value",diceB4_value); 381 game.writeEntry("diceB4_value",diceB4_value);
382 game.writeEntry("player",player); 382 game.writeEntry("player",player);
383 game.writeEntry("dice1_played",dice1_played); 383 game.writeEntry("dice1_played",dice1_played);
384 game.writeEntry("dice2_played",dice2_played); 384 game.writeEntry("dice2_played",dice2_played);
385 game.writeEntry("dice3_played",dice3_played); 385 game.writeEntry("dice3_played",dice3_played);
386 game.writeEntry("dice4_played",dice4_played); 386 game.writeEntry("dice4_played",dice4_played);
387 game.writeEntry("dice_rolled",dice_rolled); 387 game.writeEntry("dice_rolled",dice_rolled);
388 game.writeEntry("player1_auto",player1_auto); 388 game.writeEntry("player1_auto",player1_auto);
389 game.writeEntry("player2_auto",player2_auto); 389 game.writeEntry("player2_auto",player2_auto);
390 390
391 game.setGroup("pieces"); 391 game.setGroup("pieces");
392 QString label; 392 QString label;
393 LoadSave save=move->saveGame(); 393 LoadSave save=move->saveGame();
394 for(int a=0;a<28;a++) 394 for(int a=0;a<28;a++)
395 { 395 {
396 label.setNum(a); 396 label.setNum(a);
397 game.writeEntry(label,save.pop[a].total); 397 game.writeEntry(label,save.pop[a].total);
398 } 398 }
399 QMessageBox::information(this,"Backgammon","Game saved","OK"); 399 QMessageBox::information(this,"Backgammon","Game saved","OK");
400} 400}
401 401
402void BackGammon::deletegame() 402void BackGammon::deletegame()
403{ 403{
404 FileDialog* file=new FileDialog(this,"Delete Game",".game"); 404 FileDialog* file=new FileDialog(this,"Delete Game",".game");
405 if(!file->exec()) 405 if(!file->exec())
406 return; 406 return;
407 407
408 game_name=file->filename(); 408 game_name=file->filename();
409 QString game_file=QPEApplication::qpeDir()+"/backgammon/"+game_name+".game"; 409 QString game_file=QPEApplication::qpeDir()+"backgammon/"+game_name+".game";
410 410
411 if(!QMessageBox::warning(this,"Backgammon","deleted game\n"+game_name+" ?","OK","Cancel")) 411 if(!QMessageBox::warning(this,"Backgammon","deleted game\n"+game_name+" ?","OK","Cancel"))
412 { 412 {
413 QFile(game_file).remove(); 413 QFile(game_file).remove();
414 } 414 }
415} 415}
416 416
417 417
418void BackGammon::newtheme() 418void BackGammon::newtheme()
419{ 419{
420 ThemeDialog* theme=new ThemeDialog(this); 420 ThemeDialog* theme=new ThemeDialog(this);
421 421
422 ImageNames names; 422 ImageNames names;
423 names.theme=theme_name; 423 names.theme=theme_name;
424 names.board=board_name; 424 names.board=board_name;
425 names.pieces1=piecesA_name; 425 names.pieces1=piecesA_name;
426 names.pieces2=piecesB_name; 426 names.pieces2=piecesB_name;
427 names.dice1=diceA_name; 427 names.dice1=diceA_name;
428 names.dice2=diceB_name; 428 names.dice2=diceB_name;
429 names.odds=odds_name; 429 names.odds=odds_name;
430 names.table=table_name; 430 names.table=table_name;
431 431
432 theme->setCurrent(names); 432 theme->setCurrent(names);
433 if(!theme->exec()) 433 if(!theme->exec())
434 return; 434 return;
435 435
436 names=theme->getNames(); 436 names=theme->getNames();
437 theme_name=names.theme; 437 theme_name=names.theme;
438 board_name=names.board; 438 board_name=names.board;
439 piecesA_name=names.pieces1; 439 piecesA_name=names.pieces1;
440 piecesB_name=names.pieces2; 440 piecesB_name=names.pieces2;
441 diceA_name=names.dice1; 441 diceA_name=names.dice1;
442 diceB_name=names.dice2; 442 diceB_name=names.dice2;
443 odds_name=names.odds; 443 odds_name=names.odds;
444 table_name=names.table; 444 table_name=names.table;
445 445
446 applytheme(); 446 applytheme();
447} 447}
448 448
449void BackGammon::loadtheme() 449void BackGammon::loadtheme()
450{ 450{
451 FileDialog* file=new FileDialog(this,"Load Theme",".theme"); 451 FileDialog* file=new FileDialog(this,"Load Theme",".theme");
452 if(!file->exec()) 452 if(!file->exec())
453 return; 453 return;
454 454
455 theme_name=file->filename(); 455 theme_name=file->filename();
456 QString theme_file=QPEApplication::qpeDir()+"/backgammon/"+theme_name+".theme"; 456 QString theme_file=QPEApplication::qpeDir()+"backgammon/"+theme_name+".theme";
457 457
458 Config theme(theme_file,Config::File); 458 Config theme(theme_file,Config::File);
459 theme.setGroup("theme"); 459 theme.setGroup("theme");
460 board_name=theme.readEntry("board","board_1"); 460 board_name=theme.readEntry("board","board_1");
461 piecesA_name=theme.readEntry("pieces1","pieces_1"); 461 piecesA_name=theme.readEntry("pieces1","pieces_1");
462 piecesB_name=theme.readEntry("pieces2","pieces_2"); 462 piecesB_name=theme.readEntry("pieces2","pieces_2");
463 diceA_name=theme.readEntry("dice1","dice_1"); 463 diceA_name=theme.readEntry("dice1","dice_1");
464 diceB_name=theme.readEntry("dice2","dice_2"); 464 diceB_name=theme.readEntry("dice2","dice_2");
465 table_name=theme.readEntry("table","table_1"); 465 table_name=theme.readEntry("table","table_1");
466 odds_name=theme.readEntry("odds","odds_1"); 466 odds_name=theme.readEntry("odds","odds_1");
467 467
468 applytheme(); 468 applytheme();
469 469
470} 470}
471 471
472void BackGammon::savetheme() 472void BackGammon::savetheme()
473{ 473{
474 if(theme_name=="default") 474 if(theme_name=="default")
475 { 475 {
476 QMessageBox::information(this,"Backgammon","Sorry\nCannot overwrite default.theme","OK"); 476 QMessageBox::information(this,"Backgammon","Sorry\nCannot overwrite default.theme","OK");
477 return; 477 return;
478 } 478 }
479 QString theme_file=QPEApplication::qpeDir()+"/backgammon/"+theme_name+".theme"; 479 QString theme_file=QPEApplication::qpeDir()+"backgammon/"+theme_name+".theme";
480 if(QMessageBox::information(this,"Backgammon","Save Theme\n"+theme_name,"Yes","No")) 480 if(QMessageBox::information(this,"Backgammon","Save Theme\n"+theme_name,"Yes","No"))
481 return; 481 return;
482 482
483 Config theme(theme_file,Config::File); 483 Config theme(theme_file,Config::File);
484 theme.setGroup("theme"); 484 theme.setGroup("theme");
485 theme.writeEntry("board",board_name); 485 theme.writeEntry("board",board_name);
486 theme.writeEntry("pieces1",piecesA_name); 486 theme.writeEntry("pieces1",piecesA_name);
487 theme.writeEntry("pieces2",piecesB_name); 487 theme.writeEntry("pieces2",piecesB_name);
488 theme.writeEntry("dice1",diceA_name); 488 theme.writeEntry("dice1",diceA_name);
489 theme.writeEntry("dice2",diceB_name); 489 theme.writeEntry("dice2",diceB_name);
490 theme.writeEntry("table",table_name); 490 theme.writeEntry("table",table_name);
491 theme.writeEntry("odds",odds_name); 491 theme.writeEntry("odds",odds_name);
492 492
493} 493}
494 494
495void BackGammon::themedefault() 495void BackGammon::themedefault()
496{ 496{
497 if(QMessageBox::information(this,"Backgammon","Make Theme\n"+theme_name+"\nthe default theme","Yes","No")) 497 if(QMessageBox::information(this,"Backgammon","Make Theme\n"+theme_name+"\nthe default theme","Yes","No"))
498 return; 498 return;
499 499
500 Config conf("backgammon"); 500 Config conf("backgammon");
501 conf.setGroup("general"); 501 conf.setGroup("general");
502 conf.writeEntry("theme",theme_name); 502 conf.writeEntry("theme",theme_name);
503} 503}
504 504
505void BackGammon::deletetheme() 505void BackGammon::deletetheme()
506{ 506{
507 FileDialog* file=new FileDialog(this,"Delete Theme",".theme"); 507 FileDialog* file=new FileDialog(this,"Delete Theme",".theme");
508 if(!file->exec()) 508 if(!file->exec())
509 return; 509 return;
510 510
511 theme_name=file->filename(); 511 theme_name=file->filename();
512 QString theme_file=QPEApplication::qpeDir()+"/backgammon/"+theme_name+".theme"; 512 QString theme_file=QPEApplication::qpeDir()+"backgammon/"+theme_name+".theme";
513 513
514 if(!QMessageBox::warning(this,tr( "Backgammon" ),tr( "deleted theme %1?").arg(theme_name),tr( "OK" ),tr( "Cancel" ))) 514 if(!QMessageBox::warning(this,tr( "Backgammon" ),tr( "deleted theme %1?").arg(theme_name),tr( "OK" ),tr( "Cancel" )))
515 { 515 {
516 QFile(theme_file).remove(); 516 QFile(theme_file).remove();
517 } 517 }
518} 518}
519 519
520void BackGammon::modify_AI() 520void BackGammon::modify_AI()
521{ 521{
522 AI_Dialog* ai_mod=new AI_Dialog(this,tr( "Load Theme" ),".theme"); 522 AI_Dialog* ai_mod=new AI_Dialog(this,tr( "Load Theme" ),".theme");
523 ai_mod->setAISettings(move->getAISettings()); 523 ai_mod->setAISettings(move->getAISettings());
524 if(!ai_mod->exec()) 524 if(!ai_mod->exec())
525 return; 525 return;
526 526
527 //get the AI settings 527 //get the AI settings
528 AISettings ai=ai_mod->getAISettings(); 528 AISettings ai=ai_mod->getAISettings();
529 move->setAISettings(ai); 529 move->setAISettings(ai);
530 //write new settings to conf file 530 //write new settings to conf file
531 Config conf("backgammon"); 531 Config conf("backgammon");
532 conf.setGroup("ai"); 532 conf.setGroup("ai");
533 conf.writeEntry("rescue",ai.rescue); 533 conf.writeEntry("rescue",ai.rescue);
534 conf.writeEntry("eliminate",ai.eliminate); 534 conf.writeEntry("eliminate",ai.eliminate);
535 conf.writeEntry("expose",ai.expose); 535 conf.writeEntry("expose",ai.expose);
536 conf.writeEntry("protect",ai.protect); 536 conf.writeEntry("protect",ai.protect);
diff --git a/noncore/games/backgammon/filedialog.cpp b/noncore/games/backgammon/filedialog.cpp
index e0a2914..f185188 100644
--- a/noncore/games/backgammon/filedialog.cpp
+++ b/noncore/games/backgammon/filedialog.cpp
@@ -16,46 +16,46 @@ FileDialog::FileDialog(QWidget* parent,QString header,QString extension,const ch
16 getCurrentDir(); 16 getCurrentDir();
17 17
18 file_name="user"; 18 file_name="user";
19 fileinput=new QLineEdit(file_name,this); 19 fileinput=new QLineEdit(file_name,this);
20 fileinput->setGeometry(1,220,235,20); 20 fileinput->setGeometry(1,220,235,20);
21 21
22 QPEApplication::showDialog( this ); 22 QPEApplication::showDialog( this );
23} 23}
24 24
25FileDialog::~FileDialog() 25FileDialog::~FileDialog()
26{} 26{}
27 27
28 28
29void FileDialog::selectorclicked(QListViewItem* entry) 29void FileDialog::selectorclicked(QListViewItem* entry)
30{ 30{
31 if(entry==NULL) 31 if(entry==NULL)
32 return; 32 return;
33 file_name=entry->text(0); 33 file_name=entry->text(0);
34 fileinput->setText(file_name); 34 fileinput->setText(file_name);
35} 35}
36 36
37void FileDialog::getCurrentDir() 37void FileDialog::getCurrentDir()
38{ 38{
39 dirselector->clear(); 39 dirselector->clear();
40 QDir dir(QPEApplication::qpeDir()+"/backgammon"); 40 QDir dir(QPEApplication::qpeDir()+"backgammon");
41 dir.setFilter(QDir::Files); 41 dir.setFilter(QDir::Files);
42 QFileInfoListIterator it(*(dir.entryInfoList())); 42 QFileInfoListIterator it(*(dir.entryInfoList()));
43 QFileInfo* fi; 43 QFileInfo* fi;
44 44
45 int ext_length=ext.length(); 45 int ext_length=ext.length();
46 while((fi=it.current())) // go through all file and subdirs 46 while((fi=it.current())) // go through all file and subdirs
47 { 47 {
48 QString file=fi->fileName(); 48 QString file=fi->fileName();
49 if(file.right(ext_length)==ext && file) 49 if(file.right(ext_length)==ext && file)
50 { 50 {
51 file=file.left(file.length()-ext_length); 51 file=file.left(file.length()-ext_length);
52 new QListViewItem(dirselector,file); 52 new QListViewItem(dirselector,file);
53 } 53 }
54 ++it; 54 ++it;
55 } 55 }
56} 56}
57 57
58QString FileDialog::filename() 58QString FileDialog::filename()
59{ 59{
60 return file_name; 60 return file_name;
61} 61}
diff --git a/noncore/games/backgammon/themedialog.cpp b/noncore/games/backgammon/themedialog.cpp
index afd6a1b..9bdb6a9 100644
--- a/noncore/games/backgammon/themedialog.cpp
+++ b/noncore/games/backgammon/themedialog.cpp
@@ -122,40 +122,40 @@ void ThemeDialog::setCurrent(const ImageNames& current)
122 break; 122 break;
123 } 123 }
124 } 124 }
125 for(a=0;a<boxodds->count();a++) 125 for(a=0;a<boxodds->count();a++)
126 { 126 {
127 if(boxodds->text(a)==current.odds) 127 if(boxodds->text(a)==current.odds)
128 { 128 {
129 boxodds->setCurrentItem(a); 129 boxodds->setCurrentItem(a);
130 break; 130 break;
131 } 131 }
132 } 132 }
133 for(a=0;a<boxtable->count();a++) 133 for(a=0;a<boxtable->count();a++)
134 { 134 {
135 if(boxtable->text(a)==current.table) 135 if(boxtable->text(a)==current.table)
136 { 136 {
137 boxtable->setCurrentItem(a); 137 boxtable->setCurrentItem(a);
138 break; 138 break;
139 } 139 }
140 } 140 }
141} 141}
142 142
143void ThemeDialog::fillBox(QString dirname,QComboBox* thebox) 143void ThemeDialog::fillBox(QString dirname,QComboBox* thebox)
144{ 144{
145 thebox->clear(); 145 thebox->clear();
146 QDir dir(QPEApplication::qpeDir()+"/pics/backgammon/"+dirname); 146 QDir dir(QPEApplication::qpeDir()+"pics/backgammon/"+dirname);
147 dir.setFilter(QDir::Dirs | QDir::Files); 147 dir.setFilter(QDir::Dirs | QDir::Files);
148 QFileInfoListIterator it(*(dir.entryInfoList())); 148 QFileInfoListIterator it(*(dir.entryInfoList()));
149 QFileInfo* fi; 149 QFileInfo* fi;
150 150
151 while((fi=it.current())) // go through all file and subdirs 151 while((fi=it.current())) // go through all file and subdirs
152 { 152 {
153 QString file=fi->fileName(); 153 QString file=fi->fileName();
154 if(file.right(4)==".png") 154 if(file.right(4)==".png")
155 { 155 {
156 thebox->insertItem(file.left(file.find(".png"))); 156 thebox->insertItem(file.left(file.find(".png")));
157 } 157 }
158 ++it; 158 ++it;
159 } 159 }
160 delete fi; 160 delete fi;
161} 161}
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index dc2c496..2e9553f 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -928,49 +928,49 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e ) {
928 928
929void PlayListWidget::pmViewActivated(int index) { 929void PlayListWidget::pmViewActivated(int index) {
930// odebug << "" << index << "" << oendl; 930// odebug << "" << index << "" << oendl;
931 switch(index) { 931 switch(index) {
932 case -16: 932 case -16:
933 { 933 {
934 mediaPlayerState->toggleFullscreen(); 934 mediaPlayerState->toggleFullscreen();
935 bool b=mediaPlayerState->isFullscreen(); 935 bool b=mediaPlayerState->isFullscreen();
936 pmView->setItemChecked( index, b); 936 pmView->setItemChecked( index, b);
937 Config cfg( "OpiePlayer" ); 937 Config cfg( "OpiePlayer" );
938 cfg.writeEntry( "FullScreen", b ); 938 cfg.writeEntry( "FullScreen", b );
939 } 939 }
940 break; 940 break;
941 }; 941 };
942} 942}
943 943
944void PlayListWidget::populateSkinsMenu() { 944void PlayListWidget::populateSkinsMenu() {
945 int item = 0; 945 int item = 0;
946 defaultSkinIndex = 0; 946 defaultSkinIndex = 0;
947 QString skinName; 947 QString skinName;
948 Config cfg( "OpiePlayer" ); 948 Config cfg( "OpiePlayer" );
949 cfg.setGroup("Options" ); 949 cfg.setGroup("Options" );
950 QString skin = cfg.readEntry( "Skin", "default" ); 950 QString skin = cfg.readEntry( "Skin", "default" );
951 951
952 QDir skinsDir( QPEApplication::qpeDir() + "/pics/opieplayer2/skins" ); 952 QDir skinsDir( QPEApplication::qpeDir() + "pics/opieplayer2/skins" );
953 skinsDir.setFilter( QDir::Dirs ); 953 skinsDir.setFilter( QDir::Dirs );
954 skinsDir.setSorting(QDir::Name ); 954 skinsDir.setSorting(QDir::Name );
955 const QFileInfoList *skinslist = skinsDir.entryInfoList(); 955 const QFileInfoList *skinslist = skinsDir.entryInfoList();
956 QFileInfoListIterator it( *skinslist ); 956 QFileInfoListIterator it( *skinslist );
957 QFileInfo *fi; 957 QFileInfo *fi;
958 while ( ( fi = it.current() ) ) { 958 while ( ( fi = it.current() ) ) {
959 skinName = fi->fileName(); 959 skinName = fi->fileName();
960// odebug << fi->fileName() << oendl; 960// odebug << fi->fileName() << oendl;
961 if( skinName != "." && skinName != ".." && skinName !="CVS" ) { 961 if( skinName != "." && skinName != ".." && skinName !="CVS" ) {
962 item = skinsMenu->insertItem( fi->fileName() ) ; 962 item = skinsMenu->insertItem( fi->fileName() ) ;
963 } 963 }
964 if( skinName == "default" ) { 964 if( skinName == "default" ) {
965 defaultSkinIndex = item; 965 defaultSkinIndex = item;
966 } 966 }
967 if( skinName == skin ) { 967 if( skinName == skin ) {
968 skinsMenu->setItemChecked( item, TRUE ); 968 skinsMenu->setItemChecked( item, TRUE );
969 } 969 }
970 ++it; 970 ++it;
971 } 971 }
972} 972}
973 973
974void PlayListWidget::skinsMenuActivated( int item ) { 974void PlayListWidget::skinsMenuActivated( int item ) {
975 for(unsigned int i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i-- ) { 975 for(unsigned int i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i-- ) {
976 skinsMenu->setItemChecked( i, FALSE ); 976 skinsMenu->setItemChecked( i, FALSE );
diff --git a/noncore/settings/language/language.cpp b/noncore/settings/language/language.cpp
index 81d6717..14750ac 100644
--- a/noncore/settings/language/language.cpp
+++ b/noncore/settings/language/language.cpp
@@ -36,49 +36,49 @@
36#include <qtabwidget.h> 36#include <qtabwidget.h>
37#include <qslider.h> 37#include <qslider.h>
38#include <qfile.h> 38#include <qfile.h>
39#include <qtextstream.h> 39#include <qtextstream.h>
40#include <qdatastream.h> 40#include <qdatastream.h>
41#include <qmessagebox.h> 41#include <qmessagebox.h>
42#include <qcombobox.h> 42#include <qcombobox.h>
43#include <qspinbox.h> 43#include <qspinbox.h>
44#include <qlistbox.h> 44#include <qlistbox.h>
45#include <qdir.h> 45#include <qdir.h>
46#if QT_VERSION >= 300 46#if QT_VERSION >= 300
47#include <qstylefactory.h> 47#include <qstylefactory.h>
48#endif 48#endif
49 49
50#include <stdlib.h> 50#include <stdlib.h>
51 51
52 52
53LanguageSettings::LanguageSettings( QWidget* parent, const char* name, WFlags fl ) 53LanguageSettings::LanguageSettings( QWidget* parent, const char* name, WFlags fl )
54 : LanguageSettingsBase( parent, name, TRUE, fl ) 54 : LanguageSettingsBase( parent, name, TRUE, fl )
55{ 55{
56 if ( FontManager::hasUnicodeFont() ) 56 if ( FontManager::hasUnicodeFont() )
57 languages->setFont(FontManager::unicodeFont(FontManager::Proportional)); 57 languages->setFont(FontManager::unicodeFont(FontManager::Proportional));
58 58
59 59
60 QString tfn = QPEApplication::qpeDir() + "/i18n/"; 60 QString tfn = QPEApplication::qpeDir() + "i18n/";
61 QDir langDir = tfn; 61 QDir langDir = tfn;
62 QStringList list = langDir.entryList("*", QDir::Dirs ); 62 QStringList list = langDir.entryList("*", QDir::Dirs );
63 63
64 QStringList::Iterator it; 64 QStringList::Iterator it;
65 65
66 for ( it = list.begin(); it != list.end(); ++it ) { 66 for ( it = list.begin(); it != list.end(); ++it ) {
67 QString name = (*it); 67 QString name = (*it);
68 QFileInfo desktopFile( tfn + "/" + name + "/.directory" ); 68 QFileInfo desktopFile( tfn + "/" + name + "/.directory" );
69 if ( desktopFile.exists() ) { 69 if ( desktopFile.exists() ) {
70 langAvail.append(name); 70 langAvail.append(name);
71 Config conf( desktopFile.filePath(), Config::File ); 71 Config conf( desktopFile.filePath(), Config::File );
72 QString langName = conf.readEntry( "Name" ); 72 QString langName = conf.readEntry( "Name" );
73 QString ownName = conf.readEntryDirect( "Name[" + name + "]" ); 73 QString ownName = conf.readEntryDirect( "Name[" + name + "]" );
74 if ( ownName.isEmpty() ) 74 if ( ownName.isEmpty() )
75 ownName = conf.readEntryDirect( "Name" ); 75 ownName = conf.readEntryDirect( "Name" );
76 if ( !ownName.isEmpty() && ownName != langName ) 76 if ( !ownName.isEmpty() && ownName != langName )
77 langName = langName + " [" + ownName + "]"; 77 langName = langName + " [" + ownName + "]";
78 languages->insertItem( langName ); 78 languages->insertItem( langName );
79 79
80 } 80 }
81 } 81 }
82 if ( langAvail. find ( "en" ) == -1 ) { 82 if ( langAvail. find ( "en" ) == -1 ) {
83 langAvail. prepend ( "" ); // no tr 83 langAvail. prepend ( "" ); // no tr
84 languages-> insertItem ( QString ( "English [%1] (%2)" /* no tr (!) */ ). arg ( tr ( "English" )). arg ( tr( "default" )), 0 ); 84 languages-> insertItem ( QString ( "English [%1] (%2)" /* no tr (!) */ ). arg ( tr ( "English" )). arg ( tr( "default" )), 0 );
diff --git a/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp
index fb7d7c9..5f23aea 100644
--- a/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp
@@ -267,49 +267,49 @@ void MainWindowImp::getAllInterfaces()
267 * and attempts to load them 267 * and attempts to load them
268 */ 268 */
269void MainWindowImp::loadModules(const QString &path) 269void MainWindowImp::loadModules(const QString &path)
270{ 270{
271#ifdef DEBUG 271#ifdef DEBUG
272 odebug << "MainWindowImp::loadModules: " << path.latin1() << "" << oendl; 272 odebug << "MainWindowImp::loadModules: " << path.latin1() << "" << oendl;
273#endif 273#endif
274 QDir d(path); 274 QDir d(path);
275 if(!d.exists()) 275 if(!d.exists())
276 return; 276 return;
277 277
278 QString lang = ::getenv("LANG"); 278 QString lang = ::getenv("LANG");
279 // Don't want sym links 279 // Don't want sym links
280 d.setFilter( QDir::Files | QDir::NoSymLinks ); 280 d.setFilter( QDir::Files | QDir::NoSymLinks );
281 const QFileInfoList *list = d.entryInfoList(); 281 const QFileInfoList *list = d.entryInfoList();
282 QFileInfoListIterator it( *list ); 282 QFileInfoListIterator it( *list );
283 QFileInfo *fi; 283 QFileInfo *fi;
284 while ( (fi=it.current()) ) 284 while ( (fi=it.current()) )
285 { 285 {
286 if(fi->fileName().contains(".so")) 286 if(fi->fileName().contains(".so"))
287 { 287 {
288 /* if loaded install translation */ 288 /* if loaded install translation */
289 if( loadPlugin(path + "/" + fi->fileName()) != 0l ){ 289 if( loadPlugin(path + "/" + fi->fileName()) != 0l ){
290 QTranslator *trans = new QTranslator(qApp); 290 QTranslator *trans = new QTranslator(qApp);
291 QString fn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+ fi->fileName().left( fi->fileName().find(".") )+".qm"; 291 QString fn = QPEApplication::qpeDir()+"i18n/"+lang+"/"+ fi->fileName().left( fi->fileName().find(".") )+".qm";
292 if( trans->load( fn ) ) 292 if( trans->load( fn ) )
293 qApp->installTranslator( trans ); 293 qApp->installTranslator( trans );
294 else 294 else
295 delete trans; 295 delete trans;
296 } 296 }
297 odebug << "loaded plugin: >" << QString(path + "/" + fi->fileName()).latin1() << "< " << oendl; 297 odebug << "loaded plugin: >" << QString(path + "/" + fi->fileName()).latin1() << "< " << oendl;
298 } 298 }
299 ++it; 299 ++it;
300 } 300 }
301} 301}
302 302
303/** 303/**
304 * Attempt to load a function and resolve a function. 304 * Attempt to load a function and resolve a function.
305 * @param pluginFileName - the name of the file in which to attempt to load 305 * @param pluginFileName - the name of the file in which to attempt to load
306 * @param resolveString - function pointer to resolve 306 * @param resolveString - function pointer to resolve
307 * @return pointer to the function with name resolveString or NULL 307 * @return pointer to the function with name resolveString or NULL
308 */ 308 */
309Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &resolveString) 309Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &resolveString)
310{ 310{
311#ifdef DEBUG 311#ifdef DEBUG
312 odebug << "MainWindowImp::loadPlugin: " << pluginFileName.latin1() << ": resolving " << resolveString.latin1() << "" << oendl; 312 odebug << "MainWindowImp::loadPlugin: " << pluginFileName.latin1() << ": resolving " << resolveString.latin1() << "" << oendl;
313#endif 313#endif
314 QLibrary *lib = new QLibrary(pluginFileName); 314 QLibrary *lib = new QLibrary(pluginFileName);
315 void *functionPointer = lib->resolve(resolveString); 315 void *functionPointer = lib->resolve(resolveString);
diff --git a/noncore/settings/sysinfo/benchmarkinfo.cpp b/noncore/settings/sysinfo/benchmarkinfo.cpp
index 793fcb1..060185a 100644
--- a/noncore/settings/sysinfo/benchmarkinfo.cpp
+++ b/noncore/settings/sysinfo/benchmarkinfo.cpp
@@ -121,49 +121,49 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags )
121 test_gfx->setText( 1, "n/a" ); 121 test_gfx->setText( 1, "n/a" );
122 test_ram->setText( 1, "n/a" ); 122 test_ram->setText( 1, "n/a" );
123#ifndef QT_QWS_RAMSES 123#ifndef QT_QWS_RAMSES
124 test_sd->setText( 1, "n/a" ); 124 test_sd->setText( 1, "n/a" );
125 test_cf->setText( 1, "n/a" ); 125 test_cf->setText( 1, "n/a" );
126#endif 126#endif
127 test_alu->setText( 2, "n/a" ); 127 test_alu->setText( 2, "n/a" );
128 test_fpu->setText( 2, "n/a" ); 128 test_fpu->setText( 2, "n/a" );
129 test_txt->setText( 2, "n/a" ); 129 test_txt->setText( 2, "n/a" );
130 test_gfx->setText( 2, "n/a" ); 130 test_gfx->setText( 2, "n/a" );
131 test_ram->setText( 2, "n/a" ); 131 test_ram->setText( 2, "n/a" );
132#ifndef QT_QWS_RAMSES 132#ifndef QT_QWS_RAMSES
133 test_sd->setText( 2, "n/a" ); 133 test_sd->setText( 2, "n/a" );
134 test_cf->setText( 2, "n/a" ); 134 test_cf->setText( 2, "n/a" );
135#endif 135#endif
136 136
137 startButton = new QPushButton( tr( "&Start Tests!" ), this ); 137 startButton = new QPushButton( tr( "&Start Tests!" ), this );
138 QWhatsThis::add( startButton, tr( "Click here to perform the selected tests." ) ); 138 QWhatsThis::add( startButton, tr( "Click here to perform the selected tests." ) );
139 connect( startButton, SIGNAL( clicked() ), this, SLOT( run() ) ); 139 connect( startButton, SIGNAL( clicked() ), this, SLOT( run() ) );
140 vb->addWidget( tests, 2 ); 140 vb->addWidget( tests, 2 );
141 141
142 QHBoxLayout* hb = new QHBoxLayout( vb ); 142 QHBoxLayout* hb = new QHBoxLayout( vb );
143 hb->addWidget( startButton, 2 ); 143 hb->addWidget( startButton, 2 );
144 144
145 QFile f( QPEApplication::qpeDir() + "/share/sysinfo/results" ); 145 QFile f( QPEApplication::qpeDir() + "share/sysinfo/results" );
146 if ( f.open( IO_ReadOnly ) ) 146 if ( f.open( IO_ReadOnly ) )
147 { 147 {
148 machineCombo = new QComboBox( this ); 148 machineCombo = new QComboBox( this );
149 QWhatsThis::add( machineCombo, tr( "Choose a model to compare your results with." ) ); 149 QWhatsThis::add( machineCombo, tr( "Choose a model to compare your results with." ) );
150 150
151 QTextStream ts( &f ); 151 QTextStream ts( &f );
152 while( !ts.eof() ) 152 while( !ts.eof() )
153 { 153 {
154 QString machline = ts.readLine(); 154 QString machline = ts.readLine();
155 odebug << "sysinfo: parsing benchmark results for '" << machline << "'" << oendl; 155 odebug << "sysinfo: parsing benchmark results for '" << machline << "'" << oendl;
156 QString resline = ts.readLine(); 156 QString resline = ts.readLine();
157 machines.insert( machline, new QStringList( QStringList::split( ",", resline ) ) ); 157 machines.insert( machline, new QStringList( QStringList::split( ",", resline ) ) );
158 machineCombo->insertItem( machline ); 158 machineCombo->insertItem( machline );
159 } 159 }
160 160
161 hb->addWidget( new QLabel( tr( "Compare:" ), this ) ); 161 hb->addWidget( new QLabel( tr( "Compare:" ), this ) );
162 hb->addWidget( machineCombo, 2 ); 162 hb->addWidget( machineCombo, 2 );
163 connect( machineCombo, SIGNAL( activated(int) ), this, SLOT( machineActivated(int) ) ); 163 connect( machineCombo, SIGNAL( activated(int) ), this, SLOT( machineActivated(int) ) );
164 } 164 }
165} 165}
166 166
167 167
168BenchmarkInfo::~BenchmarkInfo() 168BenchmarkInfo::~BenchmarkInfo()
169{} 169{}
diff --git a/noncore/settings/tabmanager/tabmanager.cpp b/noncore/settings/tabmanager/tabmanager.cpp
index 3eae424..85e5814 100644
--- a/noncore/settings/tabmanager/tabmanager.cpp
+++ b/noncore/settings/tabmanager/tabmanager.cpp
@@ -1,48 +1,48 @@
1#include "tabmanager.h" 1#include "tabmanager.h"
2#include "app.h" 2#include "app.h"
3#include "wait.h" 3#include "wait.h"
4#include "tabapplnk.h" 4#include "tabapplnk.h"
5 5
6#include <opie2/odebug.h> 6#include <opie2/odebug.h>
7 7
8#include <qpe/applnk.h> 8#include <qpe/applnk.h>
9#include <qdir.h> 9#include <qdir.h>
10#include <qfile.h> 10#include <qfile.h>
11#include <qtextstream.h> 11#include <qtextstream.h>
12#include <qlistview.h> 12#include <qlistview.h>
13#include <qheader.h> 13#include <qheader.h>
14#include <qcombobox.h> 14#include <qcombobox.h>
15#include <qlineedit.h> 15#include <qlineedit.h>
16#include <qlabel.h> 16#include <qlabel.h>
17#include <qmessagebox.h> 17#include <qmessagebox.h>
18#include <stdlib.h> 18#include <stdlib.h>
19#include <qpe/qcopenvelope_qws.h> 19#include <qpe/qcopenvelope_qws.h>
20#include <qpe/qpeapplication.h> 20#include <qpe/qpeapplication.h>
21#include <qpe/resource.h> 21#include <qpe/resource.h>
22 22
23 23
24#define HOME_APP_DIR QPEApplication::qpeDir()+"/apps" 24#define HOME_APP_DIR QPEApplication::qpeDir()+"apps"
25#define HOME_APP_INSTALL_DIR "/usr/lib/ipkg/info" 25#define HOME_APP_INSTALL_DIR "/usr/lib/ipkg/info"
26#define NEW_FOLDER "EmptyTab" 26#define NEW_FOLDER "EmptyTab"
27#define NEW_APPLICATION "NewApp" 27#define NEW_APPLICATION "NewApp"
28#define APPLICATION_EXTENSION ".desktop" 28#define APPLICATION_EXTENSION ".desktop"
29#define APPLICATION_EXTENSION_LENGTH 8 29#define APPLICATION_EXTENSION_LENGTH 8
30 30
31/** 31/**
32 * Constructor. Sets up signals. Performs initial scan of applications 32 * Constructor. Sets up signals. Performs initial scan of applications
33 * and tabs 33 * and tabs
34 */ 34 */
35TabManager::TabManager( QWidget* parent, const char* name):TabManagerBase(parent, name), changed(false), application(NULL){ 35TabManager::TabManager( QWidget* parent, const char* name):TabManagerBase(parent, name), changed(false), application(NULL){
36 rescanFolder(HOME_APP_DIR); 36 rescanFolder(HOME_APP_DIR);
37 37
38 // Connect the signals and slots 38 // Connect the signals and slots
39 connect(tabList, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(editItem(QListViewItem*))); 39 connect(tabList, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(editItem(QListViewItem*)));
40 (tabList->header())->hide(); 40 (tabList->header())->hide();
41 connect(tabList, SIGNAL(moveItem(QListViewItem*,QListViewItem*)), this, SLOT(moveApplication(QListViewItem*,QListViewItem*))); 41 connect(tabList, SIGNAL(moveItem(QListViewItem*,QListViewItem*)), this, SLOT(moveApplication(QListViewItem*,QListViewItem*)));
42} 42}
43 43
44/** 44/**
45 * If anything in the tab's have been changed then update the system or alert 45 * If anything in the tab's have been changed then update the system or alert
46 * the user. 46 * the user.
47 */ 47 */
48TabManager::~TabManager(){ 48TabManager::~TabManager(){
@@ -237,49 +237,49 @@ void TabManager::editCurrentItem(){
237 237
238/** 238/**
239 * Edit the item that is passed in. 239 * Edit the item that is passed in.
240 * Show application dialog and if anything changed 240 * Show application dialog and if anything changed
241 * @param item the item to edit. 241 * @param item the item to edit.
242 */ 242 */
243void TabManager::editItem( QListViewItem * item){ 243void TabManager::editItem( QListViewItem * item){
244 if(!item) 244 if(!item)
245 return; 245 return;
246 246
247 TabAppLnk app(itemList[item]); 247 TabAppLnk app(itemList[item]);
248 if(!app.isValid()){ 248 if(!app.isValid()){
249 odebug << QString("editItem: Not a valid applnk file: ") + itemList[item].latin1() << oendl; 249 odebug << QString("editItem: Not a valid applnk file: ") + itemList[item].latin1() << oendl;
250 return; 250 return;
251 } 251 }
252 252
253 // Fill with all of the icons 253 // Fill with all of the icons
254 if(!application){ 254 if(!application){
255 Wait waitDialog(this, "Wait dialog"); 255 Wait waitDialog(this, "Wait dialog");
256 waitDialog.waitLabel->setText(tr("Gathering icons...")); 256 waitDialog.waitLabel->setText(tr("Gathering icons..."));
257 waitDialog.show(); 257 waitDialog.show();
258 qApp->processEvents(); 258 qApp->processEvents();
259 application = new AppEdit(this, "Application edit", true); 259 application = new AppEdit(this, "Application edit", true);
260 260
261 QDir d(QPEApplication::qpeDir() + "/pics/"); 261 QDir d(QPEApplication::qpeDir() + "pics/");
262 d.setFilter( QDir::Files); 262 d.setFilter( QDir::Files);
263 263
264 const QFileInfoList *list = d.entryInfoList(); 264 const QFileInfoList *list = d.entryInfoList();
265 QFileInfoListIterator it( *list ); // create list iterator 265 QFileInfoListIterator it( *list ); // create list iterator
266 QFileInfo *fi; // pointer for traversing 266 QFileInfo *fi; // pointer for traversing
267 267
268 while ( (fi=it.current()) ) { // for each file... 268 while ( (fi=it.current()) ) { // for each file...
269 QString fileName = fi->fileName(); 269 QString fileName = fi->fileName();
270 if(fileName.right(4) == ".png"){ 270 if(fileName.right(4) == ".png"){
271 fileName = fileName.mid(0,fileName.length()-4); 271 fileName = fileName.mid(0,fileName.length()-4);
272 QPixmap imageOfFile(Resource::loadPixmap(fileName)); 272 QPixmap imageOfFile(Resource::loadPixmap(fileName));
273 QImage foo = imageOfFile.convertToImage(); 273 QImage foo = imageOfFile.convertToImage();
274 foo = foo.smoothScale(16,16); 274 foo = foo.smoothScale(16,16);
275 imageOfFile.convertFromImage(foo); 275 imageOfFile.convertFromImage(foo);
276 application->iconLineEdit->insertItem(imageOfFile,fileName); 276 application->iconLineEdit->insertItem(imageOfFile,fileName);
277 } 277 }
278 //odebug << fi->fileName().latin1() << oendl; 278 //odebug << fi->fileName().latin1() << oendl;
279 ++it; 279 ++it;
280 } 280 }
281 waitDialog.hide(); 281 waitDialog.hide();
282 } 282 }
283 int pixmap = -1; 283 int pixmap = -1;
284 QString pixmapText = app.pixmapString(); 284 QString pixmapText = app.pixmapString();
285 QComboBox *f = application->iconLineEdit; 285 QComboBox *f = application->iconLineEdit;
diff --git a/noncore/styles/theme/othemebase.cpp b/noncore/styles/theme/othemebase.cpp
index d2226e6..4275dd6 100644
--- a/noncore/styles/theme/othemebase.cpp
+++ b/noncore/styles/theme/othemebase.cpp
@@ -285,49 +285,49 @@ void OThemeBase::readConfig( Qt::GUIStyle /*style*/ )
285 for ( i = 0; i < WIDGETS; ++i ) 285 for ( i = 0; i < WIDGETS; ++i )
286 loaded[ i ] = false; 286 loaded[ i ] = false;
287 btnXShift = btnYShift = focus3DOffset = 0; 287 btnXShift = btnYShift = focus3DOffset = 0;
288 aTabLine = iTabLine = true; 288 aTabLine = iTabLine = true;
289 roundedButton = roundedCombo = roundedSlider = focus3D = false; 289 roundedButton = roundedCombo = roundedSlider = focus3D = false;
290 splitterWidth = 10; 290 splitterWidth = 10;
291 291
292 for ( i = 0; i < WIDGETS; ++i ) { 292 for ( i = 0; i < WIDGETS; ++i ) {
293 readResourceGroup( i, copyfrom, pixnames, brdnames, loaded ); 293 readResourceGroup( i, copyfrom, pixnames, brdnames, loaded );
294 } 294 }
295 295
296 // misc items 296 // misc items
297 readMiscResourceGroup(); 297 readMiscResourceGroup();
298 298
299 // Handle preblend items 299 // Handle preblend items
300 for ( i = 0; i < PREBLEND_ITEMS; ++i ) { 300 for ( i = 0; i < PREBLEND_ITEMS; ++i ) {
301 if ( pixmaps[ preBlend[ i ] ] != NULL && blends[ preBlend[ i ] ] != 0.0 ) 301 if ( pixmaps[ preBlend[ i ] ] != NULL && blends[ preBlend[ i ] ] != 0.0 )
302 blend( preBlend[ i ] ); 302 blend( preBlend[ i ] );
303 } 303 }
304} 304}
305 305
306OThemeBase::OThemeBase( const QString & configFile ) 306OThemeBase::OThemeBase( const QString & configFile )
307 : QWindowsStyle() 307 : QWindowsStyle()
308{ 308{
309 configFilePath = QPEApplication::qpeDir ( ) + "/plugins/styles/"; 309 configFilePath = QPEApplication::qpeDir ( ) + "plugins/styles/";
310 configFileName = configFile; 310 configFileName = configFile;
311 311
312 readConfig( Qt::WindowsStyle ); 312 readConfig( Qt::WindowsStyle );
313 cache = new OThemeCache( cacheSize ); 313 cache = new OThemeCache( cacheSize );
314} 314}
315 315
316void OThemeBase::applyConfigFile( const QString &/*file*/ ) 316void OThemeBase::applyConfigFile( const QString &/*file*/ )
317{ 317{
318#if 0 318#if 0
319 // handle std color scheme 319 // handle std color scheme
320 Config inConfig( file, Config::File ); 320 Config inConfig( file, Config::File );
321 Config globalConfig ( "qpe" ); 321 Config globalConfig ( "qpe" );
322 322
323 globalConfig. setGroup ( "Apperance" ); 323 globalConfig. setGroup ( "Apperance" );
324 inConfig. setGroup( "General" ); 324 inConfig. setGroup( "General" );
325 325
326 if ( inConfig.hasKey( "foreground" ) ) 326 if ( inConfig.hasKey( "foreground" ) )
327 globalConfig.writeEntry( "Text", inConfig.readEntry( "foreground", " " ) ); 327 globalConfig.writeEntry( "Text", inConfig.readEntry( "foreground", " " ) );
328 if ( inConfig.hasKey( "background" ) ) 328 if ( inConfig.hasKey( "background" ) )
329 globalConfig.writeEntry( "Background", inConfig.readEntry( "background", " " ) ); 329 globalConfig.writeEntry( "Background", inConfig.readEntry( "background", " " ) );
330 if ( inConfig.hasKey( "selectForeground" ) ) 330 if ( inConfig.hasKey( "selectForeground" ) )
331 globalConfig.writeEntry( "HighlightedText", inConfig.readEntry( "selectForeground", " " ) ); 331 globalConfig.writeEntry( "HighlightedText", inConfig.readEntry( "selectForeground", " " ) );
332 if ( inConfig.hasKey( "selectBackground" ) ) 332 if ( inConfig.hasKey( "selectBackground" ) )
333 globalConfig.writeEntry( "Highlight", inConfig.readEntry( "selectBackground", " " ) ); 333 globalConfig.writeEntry( "Highlight", inConfig.readEntry( "selectBackground", " " ) );
diff --git a/noncore/styles/theme/themeset.cpp b/noncore/styles/theme/themeset.cpp
index d4005bc..3205106 100644
--- a/noncore/styles/theme/themeset.cpp
+++ b/noncore/styles/theme/themeset.cpp
@@ -65,49 +65,49 @@ ThemeSettings::ThemeSettings ( QWidget* parent, const char *name, WFlags fl )
65 setCaption ( tr( "Theme Style" ) ); 65 setCaption ( tr( "Theme Style" ) );
66 66
67 Config config ( "qpe" ); 67 Config config ( "qpe" );
68 config. setGroup ( "Appearance" ); 68 config. setGroup ( "Appearance" );
69 69
70 QString active = config. readEntry ( "Theme", "default" ); 70 QString active = config. readEntry ( "Theme", "default" );
71 71
72 QVBoxLayout *vbox = new QVBoxLayout ( this ); 72 QVBoxLayout *vbox = new QVBoxLayout ( this );
73 vbox-> setSpacing ( 3 ); 73 vbox-> setSpacing ( 3 );
74 vbox-> setMargin ( 6 ); 74 vbox-> setMargin ( 6 );
75 75
76 vbox-> addWidget ( new QLabel ( tr( "Select the theme to be used" ), this )); 76 vbox-> addWidget ( new QLabel ( tr( "Select the theme to be used" ), this ));
77 77
78 m_list = new QListView ( this ); 78 m_list = new QListView ( this );
79 m_list-> addColumn ( tr( "Name" )); 79 m_list-> addColumn ( tr( "Name" ));
80 m_list-> addColumn ( tr( "Description" )); 80 m_list-> addColumn ( tr( "Description" ));
81 m_list-> setSelectionMode ( QListView::Single ); 81 m_list-> setSelectionMode ( QListView::Single );
82 m_list-> setAllColumnsShowFocus ( true ); 82 m_list-> setAllColumnsShowFocus ( true );
83 m_list-> setSorting ( -1 ); 83 m_list-> setSorting ( -1 );
84 vbox-> addWidget ( m_list, 10 ); 84 vbox-> addWidget ( m_list, 10 );
85 85
86 QListViewItem *item = new MyItem ( m_list, 0, tr( "[No theme]" ), "", "" ); 86 QListViewItem *item = new MyItem ( m_list, 0, tr( "[No theme]" ), "", "" );
87 m_list-> setSelected ( item, true ); 87 m_list-> setSelected ( item, true );
88 88
89 QString path = QPEApplication::qpeDir() + "/plugins/styles/themes"; 89 QString path = QPEApplication::qpeDir() + "plugins/styles/themes";
90 QStringList list = QDir ( path, "*.themerc" ). entryList ( ); 90 QStringList list = QDir ( path, "*.themerc" ). entryList ( );
91 91
92 for ( QStringList::Iterator it = list. begin(); it != list. end ( ); ++it ) { 92 for ( QStringList::Iterator it = list. begin(); it != list. end ( ); ++it ) {
93 MyConfig cfg ( path + "/" + *it, Config::File ); 93 MyConfig cfg ( path + "/" + *it, Config::File );
94 94
95 if ( cfg. hasGroup ( "Misc" )) { 95 if ( cfg. hasGroup ( "Misc" )) {
96 cfg. setGroup ( "Misc" ); 96 cfg. setGroup ( "Misc" );
97 97
98 QString name = cfg. readEntry ( "Name" ); 98 QString name = cfg. readEntry ( "Name" );
99 QString comm = cfg. readEntry ( "Comment" ); 99 QString comm = cfg. readEntry ( "Comment" );
100 100
101 if ( !name. isEmpty ( )) { 101 if ( !name. isEmpty ( )) {
102 QString fname = (*it). left ((*it). length ( ) - 8 ); 102 QString fname = (*it). left ((*it). length ( ) - 8 );
103 103
104 item = new MyItem ( m_list, item, name, comm, fname ); 104 item = new MyItem ( m_list, item, name, comm, fname );
105 if ( active == fname ) { 105 if ( active == fname ) {
106 m_list-> setSelected ( item, true ); 106 m_list-> setSelected ( item, true );
107 } 107 }
108 } 108 }
109 } 109 }
110 } 110 }
111} 111}
112 112
113bool ThemeSettings::writeConfig ( ) 113bool ThemeSettings::writeConfig ( )
diff --git a/noncore/tools/calc2/calc.cpp b/noncore/tools/calc2/calc.cpp
index 3dcdf6e..c7656bf 100644
--- a/noncore/tools/calc2/calc.cpp
+++ b/noncore/tools/calc2/calc.cpp
@@ -39,49 +39,49 @@ LCD->setSegmentStyle(QLCDNumber::Filled);
39 39
40// layout widgets 40// layout widgets
41 calculatorLayout = new QVBoxLayout (this); 41 calculatorLayout = new QVBoxLayout (this);
42 calculatorLayout->addWidget (LCD); 42 calculatorLayout->addWidget (LCD);
43 calculatorLayout->addWidget (pluginWidgetStack); 43 calculatorLayout->addWidget (pluginWidgetStack);
44 44
45// no formatting of display for now 45// no formatting of display for now
46 connect (&engine, SIGNAL(display(double)), LCD, SLOT(display(double))); 46 connect (&engine, SIGNAL(display(double)), LCD, SLOT(display(double)));
47 connect (&engine, SIGNAL(display(const QString&)), LCD, SLOT(display(const QString&))); 47 connect (&engine, SIGNAL(display(const QString&)), LCD, SLOT(display(const QString&)));
48 connect (&engine, SIGNAL(setBinMode()), LCD, SLOT(setBinMode())); 48 connect (&engine, SIGNAL(setBinMode()), LCD, SLOT(setBinMode()));
49 connect (&engine, SIGNAL(setOctMode()), LCD, SLOT(setOctMode())); 49 connect (&engine, SIGNAL(setOctMode()), LCD, SLOT(setOctMode()));
50 connect (&engine, SIGNAL(setDecMode()), LCD, SLOT(setDecMode())); 50 connect (&engine, SIGNAL(setDecMode()), LCD, SLOT(setDecMode()));
51 connect (&engine, SIGNAL(setHexMode()), LCD, SLOT(setHexMode())); 51 connect (&engine, SIGNAL(setHexMode()), LCD, SLOT(setHexMode()));
52 52
53#ifndef NO_PLUGINS 53#ifndef NO_PLUGINS
54// load plugins 54// load plugins
55 QValueList < Plugin >::Iterator mit; 55 QValueList < Plugin >::Iterator mit;
56 for (mit = pluginList.begin (); mit != pluginList.end (); ++mit) { 56 for (mit = pluginList.begin (); mit != pluginList.end (); ++mit) {
57 (*mit).interface->release (); 57 (*mit).interface->release ();
58 (*mit).library->unload (); 58 (*mit).library->unload ();
59 delete (*mit).library; 59 delete (*mit).library;
60 } 60 }
61 pluginList.clear (); 61 pluginList.clear ();
62 62
63 QString path = QPEApplication::qpeDir() + "/plugins/calculator"; 63 QString path = QPEApplication::qpeDir() + "plugins/calculator";
64 QDir dir (path, "lib*.so"); 64 QDir dir (path, "lib*.so");
65 QStringList list = dir.entryList (); 65 QStringList list = dir.entryList ();
66 66
67 QStringList::Iterator it; 67 QStringList::Iterator it;
68 for (it = list.begin (); it != list.end (); ++it) { 68 for (it = list.begin (); it != list.end (); ++it) {
69 CalcInterface *iface = 0; 69 CalcInterface *iface = 0;
70 QLibrary *lib = new QLibrary (path + "/" + *it); 70 QLibrary *lib = new QLibrary (path + "/" + *it);
71 71
72 Plugin plugin; 72 Plugin plugin;
73 plugin.pluginWidget = 0; 73 plugin.pluginWidget = 0;
74 74
75 if (lib->queryInterface (IID_Calc, (QUnknownInterface **) & iface) == 75 if (lib->queryInterface (IID_Calc, (QUnknownInterface **) & iface) ==
76 QS_OK) { 76 QS_OK) {
77 plugin.library = lib; 77 plugin.library = lib;
78 plugin.interface = iface; 78 plugin.interface = iface;
79 plugin.pluginWidget = plugin.interface->getPlugin(&engine,pluginWidgetStack); 79 plugin.pluginWidget = plugin.interface->getPlugin(&engine,pluginWidgetStack);
80 if (plugin.pluginWidget) 80 if (plugin.pluginWidget)
81 pluginWidgetStack->addWidget (plugin.pluginWidget, pluginList.count()); 81 pluginWidgetStack->addWidget (plugin.pluginWidget, pluginList.count());
82 pluginList.append (plugin); 82 pluginList.append (plugin);
83 } else { 83 } else {
84 delete lib; 84 delete lib;
85 } 85 }
86 } 86 }
87 setMode (1); 87 setMode (1);
diff --git a/x11/libqpe-x11/qpe/qpeapplication.cpp b/x11/libqpe-x11/qpe/qpeapplication.cpp
index 3cb8faf..73e7ce4 100644
--- a/x11/libqpe-x11/qpe/qpeapplication.cpp
+++ b/x11/libqpe-x11/qpe/qpeapplication.cpp
@@ -119,70 +119,70 @@ void QPEApplication::Private::sendQCopQ() {
119} 119}
120void QPEApplication::Private::show_mx(QWidget* mw, bool nomaximize ) { 120void QPEApplication::Private::show_mx(QWidget* mw, bool nomaximize ) {
121 if (mw->layout() && mw->inherits("QDialog") ) { 121 if (mw->layout() && mw->inherits("QDialog") ) {
122 QPEApplication::showDialog( (QDialog*)mw, nomaximize ); 122 QPEApplication::showDialog( (QDialog*)mw, nomaximize );
123 }else { 123 }else {
124 if (!nomaximize ) 124 if (!nomaximize )
125 mw->showMaximized(); 125 mw->showMaximized();
126 else 126 else
127 mw->show(); 127 mw->show();
128 } 128 }
129} 129}
130void QPEApplication::Private::show( QWidget* mw, bool nomax ) { 130void QPEApplication::Private::show( QWidget* mw, bool nomax ) {
131 nomaximize = nomax; 131 nomaximize = nomax;
132 qpe_main_widget = mw; 132 qpe_main_widget = mw;
133 133
134 sendQCopQ(); 134 sendQCopQ();
135 135
136 if ( preloaded ) { 136 if ( preloaded ) {
137 if (forceshow ) 137 if (forceshow )
138 show_mx(mw, nomax ); 138 show_mx(mw, nomax );
139 }else if ( keep_running ) 139 }else if ( keep_running )
140 show_mx( mw, nomax ); 140 show_mx( mw, nomax );
141} 141}
142void QPEApplication::Private::loadTextCodecs() { 142void QPEApplication::Private::loadTextCodecs() {
143 QString path = QPEApplication::qpeDir() + "/plugins/textcodecs"; 143 QString path = QPEApplication::qpeDir() + "plugins/textcodecs";
144 QDir dir( path, "lib*.so" ); 144 QDir dir( path, "lib*.so" );
145 QStringList list = dir.entryList(); 145 QStringList list = dir.entryList();
146 QStringList::Iterator it; 146 QStringList::Iterator it;
147 for ( it = list.begin(); it != list.end(); ++it ) { 147 for ( it = list.begin(); it != list.end(); ++it ) {
148 TextCodecInterface *iface = 0; 148 TextCodecInterface *iface = 0;
149 QLibrary *lib = new QLibrary( path + "/" + *it ); 149 QLibrary *lib = new QLibrary( path + "/" + *it );
150 if ( lib->queryInterface( IID_QtopiaTextCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) { 150 if ( lib->queryInterface( IID_QtopiaTextCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) {
151 QValueList<int> mibs = iface->mibEnums(); 151 QValueList<int> mibs = iface->mibEnums();
152 for (QValueList<int>::ConstIterator i = mibs.begin(); i != mibs.end(); ++i) { 152 for (QValueList<int>::ConstIterator i = mibs.begin(); i != mibs.end(); ++i) {
153 (void)iface->createForMib(*i); 153 (void)iface->createForMib(*i);
154 // ### it exists now; need to remember if we can delete it 154 // ### it exists now; need to remember if we can delete it
155 } 155 }
156 } 156 }
157 else { 157 else {
158 lib->unload(); 158 lib->unload();
159 delete lib; 159 delete lib;
160 } 160 }
161 } 161 }
162} 162}
163void QPEApplication::Private::loadImageCodecs() { 163void QPEApplication::Private::loadImageCodecs() {
164 QString path = QPEApplication::qpeDir() + "/plugins/imagecodecs"; 164 QString path = QPEApplication::qpeDir() + "plugins/imagecodecs";
165 QDir dir( path, "lib*.so" ); 165 QDir dir( path, "lib*.so" );
166 QStringList list = dir.entryList(); 166 QStringList list = dir.entryList();
167 QStringList::Iterator it; 167 QStringList::Iterator it;
168 for ( it = list.begin(); it != list.end(); ++it ) { 168 for ( it = list.begin(); it != list.end(); ++it ) {
169 ImageCodecInterface *iface = 0; 169 ImageCodecInterface *iface = 0;
170 QLibrary *lib = new QLibrary( path + "/" + *it ); 170 QLibrary *lib = new QLibrary( path + "/" + *it );
171 if ( lib->queryInterface( IID_QtopiaImageCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) { 171 if ( lib->queryInterface( IID_QtopiaImageCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) {
172 QStringList formats = iface->keys(); 172 QStringList formats = iface->keys();
173 for (QStringList::ConstIterator i = formats.begin(); i != formats.end(); ++i) { 173 for (QStringList::ConstIterator i = formats.begin(); i != formats.end(); ++i) {
174 (void)iface->installIOHandler(*i); 174 (void)iface->installIOHandler(*i);
175 // ### it exists now; need to remember if we can delete it 175 // ### it exists now; need to remember if we can delete it
176 } 176 }
177 } 177 }
178 else { 178 else {
179 lib->unload(); 179 lib->unload();
180 delete lib; 180 delete lib;
181 } 181 }
182 } 182 }
183} 183}
184 184
185// The Help System hook 185// The Help System hook
186namespace { 186namespace {
187 class ResourceMimeFactory : public QMimeSourceFactory 187 class ResourceMimeFactory : public QMimeSourceFactory
188 { 188 {