summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-11-06 09:50:40 (UTC)
committer mickeyl <mickeyl>2003-11-06 09:50:40 (UTC)
commit2f974fea9a432e9dd7b7a8ad235a4e6bc2ef51fe (patch) (unidiff)
treeab2089d9282c53146cd0e03b96345a34d74d156e
parent26ae86ca1e42b61bd0f0031b437ed90a640aa82b (diff)
downloadopie-2f974fea9a432e9dd7b7a8ad235a4e6bc2ef51fe.zip
opie-2f974fea9a432e9dd7b7a8ad235a4e6bc2ef51fe.tar.gz
opie-2f974fea9a432e9dd7b7a8ad235a4e6bc2ef51fe.tar.bz2
merge core/tools/*
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/tools/quicklauncher/config.in4
-rw-r--r--core/tools/quicklauncher/main.cpp22
-rw-r--r--core/tools/quicklauncher/opie-quicklauncher.control10
3 files changed, 34 insertions, 2 deletions
diff --git a/core/tools/quicklauncher/config.in b/core/tools/quicklauncher/config.in
new file mode 100644
index 0000000..c105e94
--- a/dev/null
+++ b/core/tools/quicklauncher/config.in
@@ -0,0 +1,4 @@
1 config QUICKLAUNCHER
2 boolean "The Quick Launcher Loader"
3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE
diff --git a/core/tools/quicklauncher/main.cpp b/core/tools/quicklauncher/main.cpp
index 7d368ab..cc411fd 100644
--- a/core/tools/quicklauncher/main.cpp
+++ b/core/tools/quicklauncher/main.cpp
@@ -3,49 +3,55 @@
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
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 <qpainter.h> 21#include <qpainter.h>
22#include <qstrlist.h> 22#include <qstrlist.h>
23#include <qtimer.h> 23#include <qtimer.h>
24#include <qguardedptr.h> 24#include <qguardedptr.h>
25#include <qcopchannel_qws.h> 25#include <qcopchannel_qws.h>
26#define QTOPIA_INTERNAL_INITAPP 26#define QTOPIA_INTERNAL_INITAPP
27
28#ifdef private
29# undef private
30#endif
31#define private public
27#include <qtopia/qpeapplication.h> 32#include <qtopia/qpeapplication.h>
33#undef private
28#include <stdio.h> 34#include <stdio.h>
29#include <stdlib.h> 35#include <stdlib.h>
30#include <sys/types.h> 36#include <sys/types.h>
31#include <sys/stat.h> 37#include <sys/stat.h>
32#include <unistd.h> 38#include <unistd.h>
33 39
34#include "dropins.h" 40#include "dropins.h"
35 41
36static QPEApplication *app = 0; 42static QPEApplication *app = 0;
37static PluginLoader *loader = 0; 43static PluginLoader *loader = 0;
38static ApplicationInterface *appIface = 0; 44static ApplicationInterface *appIface = 0;
39static QGuardedPtr<QWidget> mainWindow; 45static QGuardedPtr<QWidget> mainWindow;
40 46
41#ifdef _OS_LINUX_ 47#ifdef _OS_LINUX_
42static char **argv0 = 0; 48static char **argv0 = 0;
43static int argv_lth; 49static int argv_lth;
44extern char **environ; 50extern char **environ;
45#ifndef SPT_BUFSIZE 51#ifndef SPT_BUFSIZE
46#define SPT_BUFSIZE 2048 52#define SPT_BUFSIZE 2048
47#endif 53#endif
48#include <stdarg.h> 54#include <stdarg.h>
49void setproctitle (const char *fmt,...) { 55void setproctitle (const char *fmt,...) {
50 int i; 56 int i;
51 char buf[SPT_BUFSIZE]; 57 char buf[SPT_BUFSIZE];
@@ -214,34 +220,46 @@ int main( int argc, char** argv )
214 TimeString::currentDateFormat(); // create internal structures 220 TimeString::currentDateFormat(); // create internal structures
215 TimeString::currentAMPM(); 221 TimeString::currentAMPM();
216#endif 222#endif
217 Resource::loadIconSet("new"); // do internal init 223 Resource::loadIconSet("new"); // do internal init
218 224
219 /* make sure libopie gets lined in */ 225 /* make sure libopie gets lined in */
220 { 226 {
221 OWait item; 227 OWait item;
222 } 228 }
223 229
224 // Create a widget to force initialization of title bar images, etc. 230 // Create a widget to force initialization of title bar images, etc.
225 QObject::disconnect(app, SIGNAL(lastWindowClosed()), app, SLOT(hideOrQuit())); 231 QObject::disconnect(app, SIGNAL(lastWindowClosed()), app, SLOT(hideOrQuit()));
226 QWidget *w = new QWidget(0,0,Qt::WDestructiveClose|Qt::WStyle_ContextHelp|Qt::WStyle_Tool); 232 QWidget *w = new QWidget(0,0,Qt::WDestructiveClose|Qt::WStyle_ContextHelp|Qt::WStyle_Tool);
227 w->setGeometry( -100, -100, 10, 10 ); 233 w->setGeometry( -100, -100, 10, 10 );
228 w->show(); 234 w->show();
229 QTimer::singleShot( 0, w, SLOT(close()) ); 235 QTimer::singleShot( 0, w, SLOT(close()) );
230 236
231 app->enter_loop(); 237 app->enter_loop();
232 } 238 }
233 239
234 int rv = app->exec(); 240 int rv = app->exec();
235 241
236 if ( mainWindow ) 242 if ( mainWindow )
237 delete (QWidget*)mainWindow; 243 delete (QWidget*)mainWindow;
244
245 delete app;
238 if ( appIface ) 246 if ( appIface )
239 loader->releaseInterface( appIface ); 247 loader->releaseInterface( appIface );
240 delete loader; 248 delete loader;
241 249 // Neither QLibrary nor my Dropin is a QObject and they don't depend
242 delete app; 250 // on a qApp so we destroy QWidget::destroyMapper() without
251 // crashing the app
252 //
253 // The problem is there are some 'static' resources not freed
254 // in the apps and on destructing these objects are not available
255 // anymore. In future fix up the apps but for now
256 // we just skip deletion and hope things go well -zecke
257// delete app;
258 // hack instead -zecke
259// delete app->pidChannel;
260// app->pidChannel = 0;
243 261
244 return rv; 262 return rv;
245} 263}
246 264
247#include "main.moc" 265#include "main.moc"
diff --git a/core/tools/quicklauncher/opie-quicklauncher.control b/core/tools/quicklauncher/opie-quicklauncher.control
new file mode 100644
index 0000000..79b9493
--- a/dev/null
+++ b/core/tools/quicklauncher/opie-quicklauncher.control
@@ -0,0 +1,10 @@
1Package: opie-quicklauncher
2Files: bin/quicklauncher
3Priority: required
4Section: opie/system
5Maintainer: Trolltech (www.trolltech.com)
6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION
8Depends:
9Description: Quick launcher stub
10 Launcher stub for quick launch enabled applications.