author | hash <hash> | 2002-08-12 07:55:58 (UTC) |
---|---|---|
committer | hash <hash> | 2002-08-12 07:55:58 (UTC) |
commit | 1e045c5b7b5278b4a5925ba878cbdbdea9d03e1d (patch) (unidiff) | |
tree | 9687a824bde2de00bd1b42c34988acd778660b9a /inputmethods/multikey | |
parent | 895a6e1cebade986110758c57cafdadd942a63ff (diff) | |
download | opie-1e045c5b7b5278b4a5925ba878cbdbdea9d03e1d.zip opie-1e045c5b7b5278b4a5925ba878cbdbdea9d03e1d.tar.gz opie-1e045c5b7b5278b4a5925ba878cbdbdea9d03e1d.tar.bz2 |
uses langauge setting to choose keymap
-rw-r--r-- | inputmethods/multikey/keyboard.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp index d0cfa51..8f4d562 100644 --- a/inputmethods/multikey/keyboard.cpp +++ b/inputmethods/multikey/keyboard.cpp | |||
@@ -53,26 +53,25 @@ Keyboard::Keyboard(QWidget* parent, const char* _name, WFlags f) : | |||
53 | picks = new KeyboardPicks( this ); | 53 | picks = new KeyboardPicks( this ); |
54 | picks->setFont( QFont( familyStr, 8 ) ); | 54 | picks->setFont( QFont( familyStr, 8 ) ); |
55 | picks->initialise(); | 55 | picks->initialise(); |
56 | if (usePicks) { | 56 | if (usePicks) { |
57 | 57 | ||
58 | QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ), | 58 | QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ), |
59 | this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); | 59 | this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); |
60 | 60 | ||
61 | } else picks->hide(); | 61 | } else picks->hide(); |
62 | 62 | ||
63 | Config config("locale"); | 63 | Config config("locale"); |
64 | config.setGroup( "Language" ); | 64 | config.setGroup( "Language" ); |
65 | //LANG = config.readEntry( "Language", "en" ); | 65 | LANG = config.readEntry( "Language", "en" ); |
66 | LANG = "ko"; | ||
67 | 66 | ||
68 | repeatTimer = new QTimer( this ); | 67 | repeatTimer = new QTimer( this ); |
69 | connect( repeatTimer, SIGNAL(timeout()), this, SLOT(repeat()) ); | 68 | connect( repeatTimer, SIGNAL(timeout()), this, SLOT(repeat()) ); |
70 | 69 | ||
71 | } | 70 | } |
72 | 71 | ||
73 | /* Keyboard::resizeEvent {{{1 */ | 72 | /* Keyboard::resizeEvent {{{1 */ |
74 | void Keyboard::resizeEvent(QResizeEvent*) | 73 | void Keyboard::resizeEvent(QResizeEvent*) |
75 | { | 74 | { |
76 | int ph = picks->sizeHint().height(); | 75 | int ph = picks->sizeHint().height(); |
77 | picks->setGeometry( 0, 0, width(), ph ); | 76 | picks->setGeometry( 0, 0, width(), ph ); |
78 | keyHeight = (height()-(usePicks ? ph : 0))/5; | 77 | keyHeight = (height()-(usePicks ? ph : 0))/5; |
@@ -765,26 +764,25 @@ ushort Keyboard::constoe(const ushort c) { | |||
765 | } | 764 | } |
766 | 765 | ||
767 | 766 | ||
768 | // Keys::Keys {{{1 | 767 | // Keys::Keys {{{1 |
769 | 768 | ||
770 | Keys::Keys() { | 769 | Keys::Keys() { |
771 | 770 | ||
772 | Config config("locale"); | 771 | Config config("locale"); |
773 | config.setGroup( "Language" ); | 772 | config.setGroup( "Language" ); |
774 | QString l = config.readEntry( "Language" , "en" ); | 773 | QString l = config.readEntry( "Language" , "en" ); |
775 | 774 | ||
776 | QString key_map = QPEApplication::qpeDir() + "/share/multikey/" | 775 | QString key_map = QPEApplication::qpeDir() + "/share/multikey/" |
777 | + /* l // testing korean for now */ | 776 | + l + ".keymap"; |
778 | + "ko.keymap"; | ||
779 | 777 | ||
780 | setKeysFromFile(key_map); | 778 | setKeysFromFile(key_map); |
781 | } | 779 | } |
782 | 780 | ||
783 | Keys::Keys(const char * filename) { | 781 | Keys::Keys(const char * filename) { |
784 | 782 | ||
785 | setKeysFromFile(filename); | 783 | setKeysFromFile(filename); |
786 | } | 784 | } |
787 | 785 | ||
788 | // Keys::setKeysFromFile {{{2 | 786 | // Keys::setKeysFromFile {{{2 |
789 | void Keys::setKeysFromFile(const char * filename) { | 787 | void Keys::setKeysFromFile(const char * filename) { |
790 | 788 | ||