author | sandman <sandman> | 2002-10-22 11:38:47 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-22 11:38:47 (UTC) |
commit | 1ee836bd1bb777dded54810909e508dc0470ada3 (patch) (unidiff) | |
tree | 7bba0cd910c49c7f7dc7ca61f80c471b039861af /inputmethods | |
parent | bbb2c5fee87baa345ff5c16404204054442f5c11 (diff) | |
download | opie-1ee836bd1bb777dded54810909e508dc0470ada3.zip opie-1ee836bd1bb777dded54810909e508dc0470ada3.tar.gz opie-1ee836bd1bb777dded54810909e508dc0470ada3.tar.bz2 |
- Always try to load the "en" keymap, if a user specified one cannot be
found
- Fix the divison by zero error in resizeEvent, in case there is a keymap
with 0 rows or no keymap at all.
-rw-r--r-- | inputmethods/multikey/keyboard.cpp | 7 | ||||
-rw-r--r-- | inputmethods/multikey/keyboardimpl.cpp | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp index 1dd8ca1..de3aa52 100644 --- a/inputmethods/multikey/keyboard.cpp +++ b/inputmethods/multikey/keyboard.cpp | |||
@@ -98,5 +98,5 @@ void Keyboard::resizeEvent(QResizeEvent*) | |||
98 | int ph = picks->sizeHint().height(); | 98 | int ph = picks->sizeHint().height(); |
99 | picks->setGeometry( 0, 0, width(), ph ); | 99 | picks->setGeometry( 0, 0, width(), ph ); |
100 | keyHeight = (height()-(usePicks ? ph : 0))/keys->rows(); | 100 | keyHeight = (height()-(usePicks ? ph : 0))/(keys->rows()?keys->rows():1); |
101 | 101 | ||
102 | int nk; // number of keys? | 102 | int nk; // number of keys? |
@@ -1322,5 +1322,8 @@ Keys::Keys() { | |||
1322 | 1322 | ||
1323 | } | 1323 | } |
1324 | 1324 | if (map.isNull() || !(QFile(map).exists())) { | |
1325 | map = QPEApplication::qpeDir() + "/share/multikey/en.keymap"; | ||
1326 | } | ||
1327 | |||
1325 | setKeysFromFile(map); | 1328 | setKeysFromFile(map); |
1326 | } | 1329 | } |
diff --git a/inputmethods/multikey/keyboardimpl.cpp b/inputmethods/multikey/keyboardimpl.cpp index 2bcb0fa..cebd43d 100644 --- a/inputmethods/multikey/keyboardimpl.cpp +++ b/inputmethods/multikey/keyboardimpl.cpp | |||
@@ -79,5 +79,4 @@ QString KeyboardImpl::name() | |||
79 | { | 79 | { |
80 | return qApp->translate( "InputMethods", "Multikey" ); | 80 | return qApp->translate( "InputMethods", "Multikey" ); |
81 | // return qApp->translate( "InputMethods", "Opti" ); | ||
82 | } | 81 | } |
83 | 82 | ||