author | kergoth <kergoth> | 2003-01-26 03:30:49 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-01-26 03:30:49 (UTC) |
commit | 77af78cf44026f52cc119a16554749daefc59617 (patch) (unidiff) | |
tree | 8b2afa79b4efa5a1b0f0e4d5a488796067d904a1 | |
parent | 7efc361470c6c91eb06ae7e800bb64aa645f6f73 (diff) | |
download | opie-77af78cf44026f52cc119a16554749daefc59617.zip opie-77af78cf44026f52cc119a16554749daefc59617.tar.gz opie-77af78cf44026f52cc119a16554749daefc59617.tar.bz2 |
Undo unintentional commit
-rw-r--r-- | core/launcher/main.cpp | 104 | ||||
-rw-r--r-- | packages | 1 |
2 files changed, 44 insertions, 61 deletions
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index 1e5eb46..49b41d6 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp | |||
@@ -51,20 +51,19 @@ using namespace Opie; | |||
51 | 51 | ||
52 | void initEnvironment( ) | 52 | void 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 ); | ||
69 | 64 | ||
65 | config.setGroup( "Language" ); | ||
66 | QString lang = config.readEntry( "Language", getenv("LANG") ); | ||
67 | if ( !lang.isNull() ) | ||
68 | setenv( "LANG", lang, 1 ); | ||
70 | } | 69 | } |
@@ -74,5 +73,3 @@ int initApplication( int argc, char ** argv ) | |||
74 | { | 73 | { |
75 | struct ODevice *odev = ODevice::inst(); | 74 | initEnvironment(); |
76 | |||
77 | initEnvironment( ); | ||
78 | 75 | ||
@@ -86,21 +83,8 @@ int initApplication( int argc, char ** argv ) | |||
86 | 83 | ||
87 | int rot; | 84 | ODevice::inst ( )-> setSoftSuspend ( true ); |
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 ); | ||
101 | 85 | ||
102 | { // init backlight | 86 | { // init backlight |
103 | QCopEnvelope e("QPE/System", "setBacklight(int)" ); | 87 | QCopEnvelope e("QPE/System", "setBacklight(int)" ); |
104 | e << -3; // Forced on | 88 | e << -3; // Forced on |
105 | } | 89 | } |
106 | 90 | ||
@@ -122,6 +106,6 @@ int initApplication( int argc, char ** argv ) | |||
122 | if ( !QFile::exists( "/etc/pointercal" ) ) { | 106 | if ( !QFile::exists( "/etc/pointercal" ) ) { |
123 | // Make sure calibration widget starts on top. | 107 | // Make sure calibration widget starts on top. |
124 | Calibrate *cal = new Calibrate; | 108 | Calibrate *cal = new Calibrate; |
125 | cal->exec(); | 109 | cal->exec(); |
126 | delete cal; | 110 | delete cal; |
127 | } | 111 | } |
@@ -131,8 +115,8 @@ int initApplication( int argc, char ** argv ) | |||
131 | 115 | ||
132 | if ( QDate::currentDate ( ). year ( ) < 2000 ) { | 116 | if ( QDate::currentDate ( ). year ( ) < 2000 ) { |
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 ) { | 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 ) { |
134 | QCopEnvelope e ( "QPE/Application/systemtime", "setDocument(QString)" ); | 118 | QCopEnvelope e ( "QPE/Application/systemtime", "setDocument(QString)" ); |
135 | e << QString ( ); | 119 | e << QString ( ); |
136 | } | 120 | } |
137 | } | 121 | } |
138 | 122 | ||
@@ -142,3 +126,3 @@ int initApplication( int argc, char ** argv ) | |||
142 | 126 | ||
143 | odev-> setSoftSuspend ( false ); | 127 | ODevice::inst ( )-> setSoftSuspend ( false ); |
144 | 128 | ||
@@ -151,8 +135,8 @@ void create_pidfile ( ) | |||
151 | { | 135 | { |
152 | FILE *f; | 136 | FILE *f; |
153 | 137 | ||
154 | if (( f = ::fopen ( pidfile_path, "w" ))) { | 138 | if (( f = ::fopen ( pidfile_path, "w" ))) { |
155 | ::fprintf ( f, "%d", getpid ( )); | 139 | ::fprintf ( f, "%d", getpid ( )); |
156 | ::fclose ( f ); | 140 | ::fclose ( f ); |
157 | } | 141 | } |
158 | } | 142 | } |
@@ -161,3 +145,3 @@ void remove_pidfile ( ) | |||
161 | { | 145 | { |
162 | ::unlink ( pidfile_path ); | 146 | ::unlink ( pidfile_path ); |
163 | } | 147 | } |
@@ -166,4 +150,4 @@ void handle_sigterm ( int /* sig */ ) | |||
166 | { | 150 | { |
167 | if ( qApp ) | 151 | if ( qApp ) |
168 | qApp-> quit ( ); | 152 | qApp-> quit ( ); |
169 | } | 153 | } |
@@ -174,10 +158,10 @@ int main( int argc, char ** argv ) | |||
174 | 158 | ||
175 | ::signal ( SIGTERM, handle_sigterm ); | 159 | ::signal ( SIGTERM, handle_sigterm ); |
176 | ::signal ( SIGINT, handle_sigterm ); | 160 | ::signal ( SIGINT, handle_sigterm ); |
177 | 161 | ||
178 | ::setsid ( ); | 162 | ::setsid ( ); |
179 | ::setpgid ( 0, 0 ); | 163 | ::setpgid ( 0, 0 ); |
180 | 164 | ||
181 | ::atexit ( remove_pidfile ); | 165 | ::atexit ( remove_pidfile ); |
182 | create_pidfile ( ); | 166 | create_pidfile ( ); |
183 | 167 | ||
@@ -10,3 +10,2 @@ CONFIG_GSMTOOL noncore/comm/gsmtool gsmtool.pro | |||
10 | CONFIG_KEYVIEW development/keyviewkeyview.pro | 10 | CONFIG_KEYVIEW development/keyviewkeyview.pro |
11 | CONFIG_ROTTEST development/rottestrottest.pro | ||
12 | CONFIG_LAN noncore/unsupported/netsetup/lanlan.pro | 11 | CONFIG_LAN noncore/unsupported/netsetup/lanlan.pro |