summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/multikey/keyboard.cpp7
-rw-r--r--inputmethods/multikey/keyboardimpl.cpp1
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
@@ -94,13 +94,13 @@ Keyboard::~Keyboard() {
/* Keyboard::resizeEvent {{{1 */
void Keyboard::resizeEvent(QResizeEvent*)
{
int ph = picks->sizeHint().height();
picks->setGeometry( 0, 0, width(), ph );
- keyHeight = (height()-(usePicks ? ph : 0))/keys->rows();
+ keyHeight = (height()-(usePicks ? ph : 0))/(keys->rows()?keys->rows():1);
int nk; // number of keys?
if ( useLargeKeys ) {
nk = 15;
} else {
nk = 19;
@@ -1318,13 +1318,16 @@ Keys::Keys() {
delete config;
map = QPEApplication::qpeDir() + "/share/multikey/"
+ l + ".keymap";
}
-
+ if (map.isNull() || !(QFile(map).exists())) {
+ map = QPEApplication::qpeDir() + "/share/multikey/en.keymap";
+ }
+
setKeysFromFile(map);
}
Keys::Keys(const char * filename) {
setKeysFromFile(filename);
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
@@ -75,13 +75,12 @@ QPixmap *KeyboardImpl::icon()
return icn;
}
QString KeyboardImpl::name()
{
return qApp->translate( "InputMethods", "Multikey" );
-// return qApp->translate( "InputMethods", "Opti" );
}
void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot )
{
if ( input )
QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );