summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/main.cpp104
-rwxr-xr-xmkipks1
-rw-r--r--packages1
3 files changed, 62 insertions, 44 deletions
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp
index 49b41d6..1e5eb46 100644
--- a/core/launcher/main.cpp
+++ b/core/launcher/main.cpp
@@ -40,138 +40,154 @@
40 40
41#include <stdlib.h> 41#include <stdlib.h>
42#include <stdio.h> 42#include <stdio.h>
43#include <signal.h> 43#include <signal.h>
44#include <unistd.h> 44#include <unistd.h>
45 45
46#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) 46#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
47#include "../calibrate/calibrate.h" 47#include "../calibrate/calibrate.h"
48#endif 48#endif
49 49
50using namespace Opie; 50using namespace Opie;
51 51
52void initEnvironment() 52void initEnvironment( )
53{ 53{
54 Config config("locale"); 54 Config config("locale");
55 config.setGroup( "Location" ); 55 config.setGroup( "Location" );
56 QString tz = config.readEntry( "Timezone", getenv("TZ") ); 56 QString tz = config.readEntry( "Timezone", getenv("TZ") );
57 57
58 // if not timezone set, pick New York 58 // if not timezone set, pick New York
59 if (tz.isNull()) 59 if (tz.isNull())
60 tz = "America/New_York"; 60 tz = "America/New_York";
61 61
62 setenv( "TZ", tz, 1 ); 62 setenv( "TZ", tz, 1 );
63 config.writeEntry( "Timezone", tz); 63 config.writeEntry( "Timezone", tz);
64
65 config.setGroup( "Language" );
66 QString lang = config.readEntry( "Language", getenv("LANG") );
67 if ( !lang.isNull() )
68 setenv( "LANG", lang, 1 );
64 69
65 config.setGroup( "Language" );
66 QString lang = config.readEntry( "Language", getenv("LANG") );
67 if ( !lang.isNull() )
68 setenv( "LANG", lang, 1 );
69} 70}
70 71
71 72
72int initApplication( int argc, char ** argv ) 73int initApplication( int argc, char ** argv )
73{ 74{
74 initEnvironment(); 75 struct ODevice *odev = ODevice::inst();
76
77 initEnvironment( );
75 78
76#if !defined(QT_QWS_CASSIOPEIA) && !defined(QT_QWS_IPAQ) && !defined(QT_QWS_EBX) 79#if !defined(QT_QWS_CASSIOPEIA) && !defined(QT_QWS_IPAQ) && !defined(QT_QWS_EBX)
77 setenv( "QWS_SIZE", "240x320", 0 ); 80 setenv( "QWS_SIZE", "240x320", 0 );
78#endif 81#endif
79 82
80 //Don't flicker at startup: 83 //Don't flicker at startup:
81 QWSServer::setDesktopBackground( QImage() ); 84 QWSServer::setDesktopBackground( QImage() );
82 DesktopApplication a( argc, argv, QApplication::GuiServer ); 85 DesktopApplication a( argc, argv, QApplication::GuiServer );
83 86
84 ODevice::inst ( )-> setSoftSuspend ( true ); 87 int rot;
88 switch ( odev-> rotation( ) ) {
89 case None:
90 rot = 0;
91 case Rot90:
92 rot = 90;
93 case Rot180:
94 rot = 180;
95 case Rot270:
96 rot = 270;
97 }
98 a.setDefaultRotation( rot );
99
100 odev-> setSoftSuspend ( true );
85 101
86 { // init backlight 102 { // init backlight
87 QCopEnvelope e("QPE/System", "setBacklight(int)" ); 103 QCopEnvelope e("QPE/System", "setBacklight(int)" );
88 e << -3; // Forced on 104 e << -3; // Forced on
89 } 105 }
90 106
91 AlarmServer::initialize(); 107 AlarmServer::initialize();
92 108
93 Desktop *d = new Desktop(); 109 Desktop *d = new Desktop();
94 110
95 QObject::connect( &a, SIGNAL(power()), d, SLOT(togglePower()) ); 111 QObject::connect( &a, SIGNAL(power()), d, SLOT(togglePower()) );
96 QObject::connect( &a, SIGNAL(backlight()), d, SLOT(toggleLight()) ); 112 QObject::connect( &a, SIGNAL(backlight()), d, SLOT(toggleLight()) );
97 QObject::connect( &a, SIGNAL(symbol()), d, SLOT(toggleSymbolInput()) ); 113 QObject::connect( &a, SIGNAL(symbol()), d, SLOT(toggleSymbolInput()) );
98 QObject::connect( &a, SIGNAL(numLockStateToggle()), d, SLOT(toggleNumLockState()) ); 114 QObject::connect( &a, SIGNAL(numLockStateToggle()), d, SLOT(toggleNumLockState()) );
99 QObject::connect( &a, SIGNAL(capsLockStateToggle()), d, SLOT(toggleCapsLockState()) ); 115 QObject::connect( &a, SIGNAL(capsLockStateToggle()), d, SLOT(toggleCapsLockState()) );
100 QObject::connect( &a, SIGNAL(prepareForRestart()), d, SLOT(terminateServers()) ); 116 QObject::connect( &a, SIGNAL(prepareForRestart()), d, SLOT(terminateServers()) );
101 117
102 (void)new SysFileMonitor(d); 118 (void)new SysFileMonitor(d);
103 Network::createServer(d); 119 Network::createServer(d);
104 120
105#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) 121#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
106 if ( !QFile::exists( "/etc/pointercal" ) ) { 122 if ( !QFile::exists( "/etc/pointercal" ) ) {
107 // Make sure calibration widget starts on top. 123 // Make sure calibration widget starts on top.
108 Calibrate *cal = new Calibrate; 124 Calibrate *cal = new Calibrate;
109 cal->exec(); 125 cal->exec();
110 delete cal; 126 delete cal;
111 } 127 }
112#endif 128#endif
113 129
114 d->show(); 130 d->show();
115 131
116 if ( QDate::currentDate ( ). year ( ) < 2000 ) { 132 if ( QDate::currentDate ( ). year ( ) < 2000 ) {
117 if ( QMessageBox::information ( 0, DesktopApplication::tr( "Information" ), DesktopApplication::tr( "<p>The system date doesn't seem to be valid.\n(%1)</p><p>Do you want to correct the clock ?</p>" ). arg( TimeString::dateString ( QDate::currentDate ( ))), QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { 133 if ( QMessageBox::information ( 0, DesktopApplication::tr( "Information" ), DesktopApplication::tr( "<p>The system date doesn't seem to be valid.\n(%1)</p><p>Do you want to correct the clock ?</p>" ). arg( TimeString::dateString ( QDate::currentDate ( ))), QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) {
118 QCopEnvelope e ( "QPE/Application/systemtime", "setDocument(QString)" ); 134 QCopEnvelope e ( "QPE/Application/systemtime", "setDocument(QString)" );
119 e << QString ( ); 135 e << QString ( );
120 } 136 }
121 } 137 }
122 138
123 int rv = a.exec(); 139 int rv = a.exec();
124 140
125 delete d; 141 delete d;
126 142
127 ODevice::inst ( )-> setSoftSuspend ( false ); 143 odev-> setSoftSuspend ( false );
128 144
129 return rv; 145 return rv;
130} 146}
131 147
132static const char *pidfile_path = "/var/run/opie.pid"; 148static const char *pidfile_path = "/var/run/opie.pid";
133 149
134void create_pidfile ( ) 150void create_pidfile ( )
135{ 151{
136 FILE *f; 152 FILE *f;
137 153
138 if (( f = ::fopen ( pidfile_path, "w" ))) { 154 if (( f = ::fopen ( pidfile_path, "w" ))) {
139 ::fprintf ( f, "%d", getpid ( )); 155 ::fprintf ( f, "%d", getpid ( ));
140 ::fclose ( f ); 156 ::fclose ( f );
141 } 157 }
142} 158}
143 159
144void remove_pidfile ( ) 160void remove_pidfile ( )
145{ 161{
146 ::unlink ( pidfile_path ); 162 ::unlink ( pidfile_path );
147} 163}
148 164
149void handle_sigterm ( int /* sig */ ) 165void handle_sigterm ( int /* sig */ )
150{ 166{
151 if ( qApp ) 167 if ( qApp )
152 qApp-> quit ( ); 168 qApp-> quit ( );
153} 169}
154 170
155int main( int argc, char ** argv ) 171int main( int argc, char ** argv )
156{ 172{
157 ::signal ( SIGCHLD, SIG_IGN ); 173 ::signal ( SIGCHLD, SIG_IGN );
158 174
159 ::signal ( SIGTERM, handle_sigterm ); 175 ::signal ( SIGTERM, handle_sigterm );
160 ::signal ( SIGINT, handle_sigterm ); 176 ::signal ( SIGINT, handle_sigterm );
161 177
162 ::setsid ( ); 178 ::setsid ( );
163 ::setpgid ( 0, 0 ); 179 ::setpgid ( 0, 0 );
164 180
165 ::atexit ( remove_pidfile ); 181 ::atexit ( remove_pidfile );
166 create_pidfile ( ); 182 create_pidfile ( );
167 183
168 int retVal = initApplication ( argc, argv ); 184 int retVal = initApplication ( argc, argv );
169 185
170 // Kill them. Kill them all. 186 // Kill them. Kill them all.
171 ::kill ( 0, SIGTERM ); 187 ::kill ( 0, SIGTERM );
172 ::sleep ( 1 ); 188 ::sleep ( 1 );
173 ::kill ( 0, SIGKILL ); 189 ::kill ( 0, SIGKILL );
174 190
175 return retVal; 191 return retVal;
176} 192}
177 193
diff --git a/mkipks b/mkipks
index ffa4ef5..d4e4b38 100755
--- a/mkipks
+++ b/mkipks
@@ -1,15 +1,16 @@
1#!/bin/sh 1#!/bin/sh
2 2
3[ -z "$QTE_VERSION" ] && QTE_VERSION=2.3.4 3[ -z "$QTE_VERSION" ] && QTE_VERSION=2.3.4
4[ -z "$QTE_BASEVERSION" ] && QTE_BASEVERSION=2.3.4
4[ -z "$QTE_REVISION" ] && QTE_REVISION=3 5[ -z "$QTE_REVISION" ] && QTE_REVISION=3
5DEB_VERSION=2.0 6DEB_VERSION=2.0
6 7
7# Have to do this here, since CVS can't store symlinks 8# Have to do this here, since CVS can't store symlinks
8 9
9mkdir -p $OPIEDIR/etc/rcS.d 10mkdir -p $OPIEDIR/etc/rcS.d
10ln -sf ../init.d/bootsplash $OPIEDIR/etc/rcS.d/S01bootsplash 11ln -sf ../init.d/bootsplash $OPIEDIR/etc/rcS.d/S01bootsplash
11 12
12VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\..*\..*".*/\1/p' <$OPIEDIR/include/qpe/version.h) 13VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\..*\..*".*/\1/p' <$OPIEDIR/include/qpe/version.h)
13VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION ".*\.\([0-9]*\)\..*".*/\1/p' <$OPIEDIR/include/qpe/version.h) 14VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION ".*\.\([0-9]*\)\..*".*/\1/p' <$OPIEDIR/include/qpe/version.h)
14VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION ".*\..*\.\([0-9]*\).*/\1/p' <$OPIEDIR/include/qpe/version.h) 15VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION ".*\..*\.\([0-9]*\).*/\1/p' <$OPIEDIR/include/qpe/version.h)
15SUB_VERSION=$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$OPIEDIR/include/qpe/version.h) 16SUB_VERSION=$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$OPIEDIR/include/qpe/version.h)
diff --git a/packages b/packages
index b05f90a..fc26ef8 100644
--- a/packages
+++ b/packages
@@ -1,22 +1,23 @@
1 CONFIG_APPSKEY noncore/settings/appskeyappskey.pro 1 CONFIG_APPSKEY noncore/settings/appskeyappskey.pro
2 CONFIG_BINARY noncore/tools/calc2/binarybinary.pro 2 CONFIG_BINARY noncore/tools/calc2/binarybinary.pro
3 CONFIG_CALC2 noncore/tools/calc2calc2.pro 3 CONFIG_CALC2 noncore/tools/calc2calc2.pro
4 CONFIG_CALIBRATE core/apps/calibratecalibrate.pro 4 CONFIG_CALIBRATE core/apps/calibratecalibrate.pro
5 CONFIG_CHESS noncore/games/chesschess.pro 5 CONFIG_CHESS noncore/games/chesschess.pro
6 CONFIG_CONVERTER noncore/unsupported/opiemail/converterconverter.pro 6 CONFIG_CONVERTER noncore/unsupported/opiemail/converterconverter.pro
7 CONFIG_DIALUP noncore/unsupported/netsetup/dialupdialup.pro 7 CONFIG_DIALUP noncore/unsupported/netsetup/dialupdialup.pro
8 CONFIG_DICTIONARY noncore/apps/dictionarydictionary.pro 8 CONFIG_DICTIONARY noncore/apps/dictionarydictionary.pro
9 CONFIG_GSMTOOL noncore/comm/gsmtoolgsmtool.pro 9 CONFIG_GSMTOOL noncore/comm/gsmtoolgsmtool.pro
10 CONFIG_KEYVIEW development/keyviewkeyview.pro 10 CONFIG_KEYVIEW development/keyviewkeyview.pro
11 CONFIG_ROTTEST development/rottestrottest.pro
11 CONFIG_LAN noncore/unsupported/netsetup/lanlan.pro 12 CONFIG_LAN noncore/unsupported/netsetup/lanlan.pro
12 CONFIG_LIB noncore/unsupported/opiemail/liblib.pro 13 CONFIG_LIB noncore/unsupported/opiemail/liblib.pro
13 CONFIG_LIBFFMPEG core/multimedia/opieplayer/libffmpeglibffmpeg.pro 14 CONFIG_LIBFFMPEG core/multimedia/opieplayer/libffmpeglibffmpeg.pro
14 CONFIG_LIBFLASH core/multimedia/opieplayer/libflashlibflash.pro 15 CONFIG_LIBFLASH core/multimedia/opieplayer/libflashlibflash.pro
15 CONFIG_LIBOPIE_PIM libopie/pimpim.pro 16 CONFIG_LIBOPIE_PIM libopie/pimpim.pro
16 CONFIG_LIBSQL libsqllibsql.pro 17 CONFIG_LIBSQL libsqllibsql.pro
17 CONFIG_MOBILEMSG noncore/comm/mobilemsgmobilemsg.pro 18 CONFIG_MOBILEMSG noncore/comm/mobilemsgmobilemsg.pro
18 CONFIG_NETMONAPPLET noncore/unsupported/netmonappletnetmonapplet.pro 19 CONFIG_NETMONAPPLET noncore/unsupported/netmonappletnetmonapplet.pro
19 CONFIG_NETSETUP noncore/unsupported/netsetupnetsetup.pro 20 CONFIG_NETSETUP noncore/unsupported/netsetupnetsetup.pro
20 CONFIG_OFILESELECTOR libopie/ofileselectorofileselector.pro 21 CONFIG_OFILESELECTOR libopie/ofileselectorofileselector.pro
21 CONFIG_OPIE-WRITE noncore/apps/opie-writeopie-write.pro 22 CONFIG_OPIE-WRITE noncore/apps/opie-writeopie-write.pro
22 CONFIG_OPIEMAIL noncore/unsupported/opiemailopiemail.pro 23 CONFIG_OPIEMAIL noncore/unsupported/opiemailopiemail.pro