Diffstat (limited to 'core/launcher/inputmethods.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/launcher/inputmethods.cpp | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/core/launcher/inputmethods.cpp b/core/launcher/inputmethods.cpp index 19e799a..cef16bf 100644 --- a/core/launcher/inputmethods.cpp +++ b/core/launcher/inputmethods.cpp | |||
@@ -20,33 +20,29 @@ | |||
20 | 20 | ||
21 | #define QTOPIA_INTERNAL_LANGLIST | 21 | #define QTOPIA_INTERNAL_LANGLIST |
22 | #include "inputmethods.h" | 22 | #include "inputmethods.h" |
23 | 23 | ||
24 | /* OPIE */ | ||
25 | #include <opie2/odebug.h> | ||
24 | #include <qtopia/config.h> | 26 | #include <qtopia/config.h> |
25 | #include <qtopia/qpeapplication.h> | 27 | #include <qtopia/qpeapplication.h> |
28 | using namespace Opie::Core; | ||
26 | 29 | ||
30 | /* QT */ | ||
27 | #include <qpopupmenu.h> | 31 | #include <qpopupmenu.h> |
28 | #include <qtoolbutton.h> | 32 | #include <qtoolbutton.h> |
29 | #include <qwidgetstack.h> | 33 | #include <qwidgetstack.h> |
30 | #include <qlayout.h> | 34 | #include <qlayout.h> |
31 | #include <qdir.h> | 35 | #include <qdir.h> |
32 | #include <stdlib.h> | ||
33 | #include <qtl.h> | 36 | #include <qtl.h> |
34 | |||
35 | #ifdef Q_WS_QWS | 37 | #ifdef Q_WS_QWS |
36 | #include <qwindowsystem_qws.h> | 38 | #include <qwindowsystem_qws.h> |
37 | #include <qwsevent_qws.h> | 39 | #include <qwsevent_qws.h> |
38 | #include <qcopchannel_qws.h> | 40 | #include <qcopchannel_qws.h> |
39 | #endif | 41 | #endif |
40 | 42 | ||
41 | /* ### SingleFloppy if someone is interested? */ | 43 | /* STD */ |
42 | #if 0 | 44 | #include <stdlib.h> |
43 | #ifdef QT_NO_COMPONENT | ||
44 | #include "../plugins/inputmethods/handwriting/handwritingimpl.h" | ||
45 | #include "../plugins/inputmethods/keyboard/keyboardimpl.h" | ||
46 | #include "../3rdparty/plugins/inputmethods/pickboard/pickboardimpl.h" | ||
47 | #endif | ||
48 | #endif | ||
49 | 45 | ||
50 | /* XPM */ | 46 | /* XPM */ |
51 | static const char * tri_xpm[]={ | 47 | static const char * tri_xpm[]={ |
52 | "9 9 2 1", | 48 | "9 9 2 1", |
@@ -261,9 +257,9 @@ void InputMethods::setPreferedHandlers() { | |||
261 | } | 257 | } |
262 | if (!inputMethodList.isEmpty() && !current.isEmpty() ) { | 258 | if (!inputMethodList.isEmpty() && !current.isEmpty() ) { |
263 | for (it = inputMethodList.begin(); it != inputMethodList.end(); ++it ) | 259 | for (it = inputMethodList.begin(); it != inputMethodList.end(); ++it ) |
264 | if ( (*it).name() == current ) { | 260 | if ( (*it).name() == current ) { |
265 | qWarning("preferred keyboard is %s", current.latin1() ); | 261 | owarn << "preferred keyboard is " << current << "" << oendl; |
266 | mkeyboard = &(*it); | 262 | mkeyboard = &(*it); |
267 | kbdButton->setPixmap( *mkeyboard->icon() ); | 263 | kbdButton->setPixmap( *mkeyboard->icon() ); |
268 | break; | 264 | break; |
269 | } | 265 | } |
@@ -304,15 +300,15 @@ void InputMethods::loadInputMethods() | |||
304 | input.extInterface = eface; | 300 | input.extInterface = eface; |
305 | input.widget = input.extInterface->keyboardWidget( 0, inputWidgetStyle ); | 301 | input.widget = input.extInterface->keyboardWidget( 0, inputWidgetStyle ); |
306 | // may be either a simple, or advanced. | 302 | // may be either a simple, or advanced. |
307 | if (input.widget) { | 303 | if (input.widget) { |
308 | //qDebug("its a keyboard"); | 304 | //odebug << "its a keyboard" << oendl; |
309 | inputMethodList.append( input ); | 305 | inputMethodList.append( input ); |
310 | } else { | 306 | } else { |
311 | //qDebug("its a real im"); | 307 | //odebug << "its a real im" << oendl; |
312 | input.widget = input.extInterface->statusWidget( 0, 0 ); | 308 | input.widget = input.extInterface->statusWidget( 0, 0 ); |
313 | if (input.widget) { | 309 | if (input.widget) { |
314 | //qDebug("blah"); | 310 | //odebug << "blah" << oendl; |
315 | inputModifierList.append( input ); | 311 | inputModifierList.append( input ); |
316 | imButton->addWidget(input.widget, inputModifierList.count()); | 312 | imButton->addWidget(input.widget, inputModifierList.count()); |
317 | } | 313 | } |
318 | } | 314 | } |
@@ -540,9 +536,9 @@ void InputMethods::showKbd( bool on ) | |||
540 | int top = mapToGlobal( QPoint() ).y() - height; | 536 | int top = mapToGlobal( QPoint() ).y() - height; |
541 | 537 | ||
542 | if ( inputWidgetStyle & QWidget::WStyle_DialogBorder ) | 538 | if ( inputWidgetStyle & QWidget::WStyle_DialogBorder ) |
543 | { | 539 | { |
544 | qDebug( "InputMethods: reading geometry." ); | 540 | odebug << "InputMethods: reading geometry." << oendl; |
545 | Config cfg( "Launcher" ); | 541 | Config cfg( "Launcher" ); |
546 | cfg.setGroup( "InputMethods" ); | 542 | cfg.setGroup( "InputMethods" ); |
547 | int l = cfg.readNumEntry( "absX", -1 ); | 543 | int l = cfg.readNumEntry( "absX", -1 ); |
548 | int t = cfg.readNumEntry( "absY", -1 ); | 544 | int t = cfg.readNumEntry( "absY", -1 ); |
@@ -550,22 +546,22 @@ void InputMethods::showKbd( bool on ) | |||
550 | int h = cfg.readNumEntry( "absHeight", -1 ); | 546 | int h = cfg.readNumEntry( "absHeight", -1 ); |
551 | 547 | ||
552 | if ( l > -1 && t > -1 && w > -1 && h > -1 ) | 548 | if ( l > -1 && t > -1 && w > -1 && h > -1 ) |
553 | { | 549 | { |
554 | qDebug( "InputMethods: config values ( %d, %d, %d, %d ) are ok.", l, t, w, h ); | 550 | odebug << "InputMethods: config values ( " << l << ", " << t << ", " << w << ", " << h << " ) are ok." << oendl; |
555 | left = l; | 551 | left = l; |
556 | top = t; | 552 | top = t; |
557 | width = w; | 553 | width = w; |
558 | height = h; | 554 | height = h; |
559 | } | 555 | } |
560 | else | 556 | else |
561 | { | 557 | { |
562 | qDebug( "InputMethods: config values are new or not ok." ); | 558 | odebug << "InputMethods: config values are new or not ok." << oendl; |
563 | } | 559 | } |
564 | } | 560 | } |
565 | else | 561 | else |
566 | { | 562 | { |
567 | qDebug( "InputMethods: no floating selected." ); | 563 | odebug << "InputMethods: no floating selected." << oendl; |
568 | } | 564 | } |
569 | mkeyboard->widget->resize( width, height ); | 565 | mkeyboard->widget->resize( width, height ); |
570 | mkeyboard->widget->move( left, top ); | 566 | mkeyboard->widget->move( left, top ); |
571 | mkeyboard->widget->show(); | 567 | mkeyboard->widget->show(); |
@@ -576,9 +572,9 @@ void InputMethods::showKbd( bool on ) | |||
576 | if ( inputWidgetStyle & QWidget::WStyle_DialogBorder ) | 572 | if ( inputWidgetStyle & QWidget::WStyle_DialogBorder ) |
577 | { | 573 | { |
578 | QPoint pos = mkeyboard->widget->pos(); | 574 | QPoint pos = mkeyboard->widget->pos(); |
579 | QSize siz = mkeyboard->widget->size(); | 575 | QSize siz = mkeyboard->widget->size(); |
580 | qDebug( "InputMethods: saving geometry." ); | 576 | odebug << "InputMethods: saving geometry." << oendl; |
581 | Config cfg( "Launcher" ); | 577 | Config cfg( "Launcher" ); |
582 | cfg.setGroup( "InputMethods" ); | 578 | cfg.setGroup( "InputMethods" ); |
583 | cfg.writeEntry( "absX", pos.x() ); | 579 | cfg.writeEntry( "absX", pos.x() ); |
584 | cfg.writeEntry( "absY", pos.y() ); | 580 | cfg.writeEntry( "absY", pos.y() ); |