diff options
-rw-r--r-- | kxkb/extension.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kxkb/extension.cpp b/kxkb/extension.cpp index 8197043aa..a7da41ead 100644 --- a/kxkb/extension.cpp +++ b/kxkb/extension.cpp @@ -85,7 +85,9 @@ bool XKBExtension::setXkbOptions(const XkbOptions options) { TQString exe = TDEGlobal::dirs()->findExe("setxkbmap"); if (exe.isEmpty()) + { return false; + } TDEProcess p; p << exe; @@ -136,6 +138,15 @@ bool XKBExtension::setXkbOptions(const XkbOptions options) } } + if (p.args().count() < 2) + { + // Either the user has not configured any Xkb options or these options + // are already set and we are in append mode so we want to avoid + // duplicates + kdWarning() << "[setXkbOptions] No options need to be set" << endl; + return true; + } + kdDebug() << "[setXkbOptions] Command: " << p.args() << endl; p.start(TDEProcess::Block); |