-rw-r--r-- | core/launcher/firstuse.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/launcher/firstuse.cpp b/core/launcher/firstuse.cpp index 50ae6c2..4316648 100644 --- a/core/launcher/firstuse.cpp +++ b/core/launcher/firstuse.cpp | |||
@@ -77,50 +77,50 @@ settingsTable [] = | |||
77 | QT_TR_NOOP("Time and Date") }, | 77 | QT_TR_NOOP("Time and Date") }, |
78 | #endif | 78 | #endif |
79 | { FALSE, "addressbook", "editPersonalAndClose()", "accept()", // No tr | 79 | { FALSE, "addressbook", "editPersonalAndClose()", "accept()", // No tr |
80 | QT_TR_NOOP("Personal Information") }, | 80 | QT_TR_NOOP("Personal Information") }, |
81 | { FALSE, 0, 0, 0, 0 } | 81 | { FALSE, 0, 0, 0, 0 } |
82 | }; | 82 | }; |
83 | 83 | ||
84 | 84 | ||
85 | FirstUse::FirstUse(QWidget* parent, const char * name, WFlags wf) : | 85 | FirstUse::FirstUse(QWidget* parent, const char * name, WFlags wf) : |
86 | QDialog( parent, name, TRUE, wf), | 86 | QDialog( parent, name, TRUE, wf), |
87 | transApp(0), transLib(0), needCalibrate(FALSE), currApp(-1), | 87 | transApp(0), transLib(0), needCalibrate(FALSE), currApp(-1), |
88 | waitForExit(-1), waitingForLaunch(FALSE), needRestart(FALSE) | 88 | waitForExit(-1), waitingForLaunch(FALSE), needRestart(FALSE) |
89 | { | 89 | { |
90 | ServerApplication::allowRestart = FALSE; | 90 | ServerApplication::allowRestart = FALSE; |
91 | // we force our height beyound the maximum (which we set anyway) | 91 | // we force our height beyound the maximum (which we set anyway) |
92 | QRect desk = qApp->desktop()->geometry(); | 92 | QRect desk = qApp->desktop()->geometry(); |
93 | setGeometry( 0, 0, desk.width(), desk.height() ); | 93 | setGeometry( 0, 0, desk.width(), desk.height() ); |
94 | 94 | ||
95 | connect(qwsServer, SIGNAL(newChannel(const QString&)), | 95 | connect(qwsServer, SIGNAL(newChannel(const QString&)), |
96 | this, SLOT(newQcopChannel(const QString&))); | 96 | this, SLOT(newQcopChannel(const QString&))); |
97 | 97 | ||
98 | // Create a DocumentList so appLauncher has appLnkSet to search | 98 | // Create a DocumentList so appLauncher has appLnkSet to search |
99 | docList = new DocumentList( 0, FALSE ); | 99 | docList = new DocumentList( 0, FALSE ); |
100 | appLauncher = new AppLauncher( this ); | 100 | appLauncher = new AppLauncher( this ); |
101 | connect( appLauncher, SIGNAL(terminated(int, const QString&)), | 101 | connect( appLauncher, SIGNAL(terminated(int,const QString&)), |
102 | this, SLOT(terminated(int, const QString&)) ); | 102 | this, SLOT(terminated(int,const QString&)) ); |
103 | 103 | ||
104 | // more hackery | 104 | // more hackery |
105 | // I will be run as either the main server or as part of the main server | 105 | // I will be run as either the main server or as part of the main server |
106 | QWSServer::setScreenSaverIntervals(0); | 106 | QWSServer::setScreenSaverIntervals(0); |
107 | loadPixmaps(); | 107 | loadPixmaps(); |
108 | 108 | ||
109 | //check if there is a language program | 109 | //check if there is a language program |
110 | #ifndef Q_OS_WIN32 | 110 | #ifndef Q_OS_WIN32 |
111 | QString exeSuffix; | 111 | QString exeSuffix; |
112 | #else | 112 | #else |
113 | QString exeSuffix(".exe"); | 113 | QString exeSuffix(".exe"); |
114 | #endif | 114 | #endif |
115 | 115 | ||
116 | for ( int i = 0; settingsTable[i].app; i++ ) { | 116 | for ( int i = 0; settingsTable[i].app; i++ ) { |
117 | QString file = QPEApplication::qpeDir() + "bin/"; | 117 | QString file = QPEApplication::qpeDir() + "bin/"; |
118 | file += settingsTable[i].app; | 118 | file += settingsTable[i].app; |
119 | file += exeSuffix; | 119 | file += exeSuffix; |
120 | if ( QFile::exists(file) ) | 120 | if ( QFile::exists(file) ) |
121 | settingsTable[i].enabled = TRUE; | 121 | settingsTable[i].enabled = TRUE; |
122 | } | 122 | } |
123 | 123 | ||
124 | setFocusPolicy(NoFocus); | 124 | setFocusPolicy(NoFocus); |
125 | 125 | ||
126 | taskBar = new QWidget(0, 0, WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop | WGroupLeader); | 126 | taskBar = new QWidget(0, 0, WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop | WGroupLeader); |
@@ -136,50 +136,50 @@ FirstUse::FirstUse(QWidget* parent, const char * name, WFlags wf) : | |||
136 | next = new QPushButton(tr("Next >>"), taskBar); | 136 | next = new QPushButton(tr("Next >>"), taskBar); |
137 | next->setFocusPolicy(NoFocus); | 137 | next->setFocusPolicy(NoFocus); |
138 | connect(next, SIGNAL(clicked()), this, SLOT(nextDialog()) ); | 138 | connect(next, SIGNAL(clicked()), this, SLOT(nextDialog()) ); |
139 | 139 | ||
140 | // need to set the geom to lower corner | 140 | // need to set the geom to lower corner |
141 | QSize sz = inputMethods->sizeHint(); | 141 | QSize sz = inputMethods->sizeHint(); |
142 | int buttonWidth = (width() - sz.width()) / 2; | 142 | int buttonWidth = (width() - sz.width()) / 2; |
143 | int x = 0; | 143 | int x = 0; |
144 | 144 | ||
145 | controlHeight = back->sizeHint().height(); | 145 | controlHeight = back->sizeHint().height(); |
146 | 146 | ||
147 | inputMethods->setGeometry(0,0, sz.width(), controlHeight ); | 147 | inputMethods->setGeometry(0,0, sz.width(), controlHeight ); |
148 | x += sz.width(); | 148 | x += sz.width(); |
149 | 149 | ||
150 | back->setGeometry(x, 0, buttonWidth, controlHeight); | 150 | back->setGeometry(x, 0, buttonWidth, controlHeight); |
151 | x += buttonWidth; | 151 | x += buttonWidth; |
152 | next->setGeometry(x, 0, buttonWidth, controlHeight); | 152 | next->setGeometry(x, 0, buttonWidth, controlHeight); |
153 | 153 | ||
154 | taskBar->setGeometry( 0, height() - controlHeight, desk.width(), controlHeight); | 154 | taskBar->setGeometry( 0, height() - controlHeight, desk.width(), controlHeight); |
155 | taskBar->hide(); | 155 | taskBar->hide(); |
156 | 156 | ||
157 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 157 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) |
158 | qDebug("Setting up QCop to QPE/System"); | 158 | qDebug("Setting up QCop to QPE/System"); |
159 | QCopChannel* sysChannel = new QCopChannel( "QPE/System", this ); | 159 | QCopChannel* sysChannel = new QCopChannel( "QPE/System", this ); |
160 | connect(sysChannel, SIGNAL(received(const QCString &, const QByteArray &)), | 160 | connect(sysChannel, SIGNAL(received(const QCString&,const QByteArray&)), |
161 | this, SLOT(message(const QCString &, const QByteArray &)) ); | 161 | this, SLOT(message(const QCString&,const QByteArray&)) ); |
162 | #endif | 162 | #endif |
163 | calcMaxWindowRect(); | 163 | calcMaxWindowRect(); |
164 | 164 | ||
165 | m_calHandler = ( QWSServer::mouseHandler() && QWSServer::mouseHandler()->inherits("QCalibratedMouseHandler") ) ? true : false; | 165 | m_calHandler = ( QWSServer::mouseHandler() && QWSServer::mouseHandler()->inherits("QCalibratedMouseHandler") ) ? true : false; |
166 | 166 | ||
167 | if ( m_calHandler) { | 167 | if ( m_calHandler) { |
168 | if ( !QFile::exists("/etc/pointercal") ) { | 168 | if ( !QFile::exists("/etc/pointercal") ) { |
169 | needCalibrate = TRUE; | 169 | needCalibrate = TRUE; |
170 | grabMouse(); | 170 | grabMouse(); |
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
174 | Config config("locale"); | 174 | Config config("locale"); |
175 | config.setGroup( "Language"); | 175 | config.setGroup( "Language"); |
176 | lang = config.readEntry( "Language", "en"); | 176 | lang = config.readEntry( "Language", "en"); |
177 | 177 | ||
178 | defaultFont = font(); | 178 | defaultFont = font(); |
179 | 179 | ||
180 | //###language/font hack; should look it up somewhere | 180 | //###language/font hack; should look it up somewhere |
181 | #ifdef Q_WS_QWS | 181 | #ifdef Q_WS_QWS |
182 | if ( lang == "ja" || lang == "zh_CN" || lang == "zh_TW" || lang == "ko" ) { | 182 | if ( lang == "ja" || lang == "zh_CN" || lang == "zh_TW" || lang == "ko" ) { |
183 | QFont fn = FontManager::unicodeFont( FontManager::Proportional ); | 183 | QFont fn = FontManager::unicodeFont( FontManager::Proportional ); |
184 | qApp->setFont( fn, TRUE ); | 184 | qApp->setFont( fn, TRUE ); |
185 | } | 185 | } |