summaryrefslogtreecommitdiff
path: root/core/launcher/taskbar.cpp
Unidiff
Diffstat (limited to 'core/launcher/taskbar.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/taskbar.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp
index abe238f..63361fe 100644
--- a/core/launcher/taskbar.cpp
+++ b/core/launcher/taskbar.cpp
@@ -167,27 +167,26 @@ private:
167 bool nl, cl; 167 bool nl, cl;
168}; 168};
169 169
170//--------------------------------------------------------------------------- 170//---------------------------------------------------------------------------
171 171
172TaskBar::~TaskBar() 172TaskBar::~TaskBar()
173{ 173{
174} 174}
175 175
176 176
177TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOnTop | WGroupLeader) 177TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOnTop | WGroupLeader)
178{ 178{
179 Config cfg( "Launcher" ); 179 /* Read InputMethod Config */
180 cfg.setGroup( "InputMethods" ); 180 readConfig();
181 resizeRunningApp = cfg.readBoolEntry( "Resize", true );
182 181
183 sm = new StartMenu( this ); 182 sm = new StartMenu( this );
184 connect( sm, SIGNAL(tabSelected(const QString&)), this, 183 connect( sm, SIGNAL(tabSelected(const QString&)), this,
185 SIGNAL(tabSelected(const QString&)) ); 184 SIGNAL(tabSelected(const QString&)) );
186 185
187 inputMethods = new InputMethods( this ); 186 inputMethods = new InputMethods( this );
188 connect( inputMethods, SIGNAL(inputToggled(bool)), 187 connect( inputMethods, SIGNAL(inputToggled(bool)),
189 this, SLOT(calcMaxWindowRect()) ); 188 this, SLOT(calcMaxWindowRect()) );
190 189
191 stack = new QWidgetStack( this ); 190 stack = new QWidgetStack( this );
192 stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); 191 stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) );
193 label = new QLabel(stack); 192 label = new QLabel(stack);
@@ -326,24 +325,26 @@ void TaskBar::receive( const QCString &msg, const QByteArray &data )
326 QString text; 325 QString text;
327 stream >> text; 326 stream >> text;
328 setStatusMessage( text ); 327 setStatusMessage( text );
329 } else if ( msg == "hideInputMethod()" ) { 328 } else if ( msg == "hideInputMethod()" ) {
330 inputMethods->hideInputMethod(); 329 inputMethods->hideInputMethod();
331 } else if ( msg == "showInputMethod()" ) { 330 } else if ( msg == "showInputMethod()" ) {
332 inputMethods->showInputMethod(); 331 inputMethods->showInputMethod();
333 } else if ( msg == "showInputMethod(QString)" ) { 332 } else if ( msg == "showInputMethod(QString)" ) {
334 QString name; 333 QString name;
335 stream >> name; 334 stream >> name;
336 inputMethods->showInputMethod(name); 335 inputMethods->showInputMethod(name);
337 } else if ( msg == "reloadInputMethods()" ) { 336 } else if ( msg == "reloadInputMethods()" ) {
337 readConfig();
338 inputMethods->readConfig();
338 inputMethods->loadInputMethods(); 339 inputMethods->loadInputMethods();
339 } else if ( msg == "reloadApplets()" ) { 340 } else if ( msg == "reloadApplets()" ) {
340 sysTray->clearApplets(); 341 sysTray->clearApplets();
341 sm->createMenu(); 342 sm->createMenu();
342 sysTray->addApplets(); 343 sysTray->addApplets();
343 }else if ( msg == "toggleMenu()" ) { 344 }else if ( msg == "toggleMenu()" ) {
344 if ( sm-> launchMenu-> isVisible() ) 345 if ( sm-> launchMenu-> isVisible() )
345 sm-> launch(); 346 sm-> launch();
346 else 347 else
347 QCopEnvelope e( "QPE/System", "toggleApplicationMenu()" ); 348 QCopEnvelope e( "QPE/System", "toggleApplicationMenu()" );
348 }else if ( msg == "toggleStartMenu()" ) 349 }else if ( msg == "toggleStartMenu()" )
349 sm->launch(); 350 sm->launch();
@@ -368,13 +369,19 @@ void TaskBar::toggleCapsLockState()
368} 369}
369 370
370void TaskBar::toggleSymbolInput() 371void TaskBar::toggleSymbolInput()
371{ 372{
372 QString unicodeInput = qApp->translate( "InputMethods", "Unicode" ); 373 QString unicodeInput = qApp->translate( "InputMethods", "Unicode" );
373 if ( inputMethods->currentShown() == unicodeInput ) { 374 if ( inputMethods->currentShown() == unicodeInput ) {
374 inputMethods->hideInputMethod(); 375 inputMethods->hideInputMethod();
375 } else { 376 } else {
376 inputMethods->showInputMethod( unicodeInput ); 377 inputMethods->showInputMethod( unicodeInput );
377 } 378 }
378} 379}
379 380
381void TaskBar::readConfig() {
382 Config cfg( "Launcher" );
383 cfg.setGroup( "InputMethods" );
384 resizeRunningApp = cfg.readBoolEntry( "Resize", true );
385}
386
380#include "taskbar.moc" 387#include "taskbar.moc"