[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/kxkb
From:       Waldo Bastian <bastian () kde ! org>
Date:       2004-05-19 12:11:45
Message-ID: 20040519121145.D07A292AC () office ! kde ! org
[Download RAW message or body]

CVS commit by waba: 

Apply xkb options, if so selected, even if we don't run kxkb itself.


  M +1 -1      Makefile.am   1.37
  M +1 -1      extension.h   1.17
  M +13 -0     kcmlayout.cpp   1.84


--- kdebase/kxkb/Makefile.am  #1.36:1.37
@@ -11,5 +11,5 @@
 kde_module_LTLIBRARIES = kcm_keyboard.la
 
-kcm_keyboard_la_SOURCES = rules.cpp kcmlayout.cpp pixmap.cpp kcmlayoutwidget.ui \
kcmmisc.cpp kcmmiscwidget.ui +kcm_keyboard_la_SOURCES = extension.cpp rules.cpp \
kcmlayout.cpp pixmap.cpp kcmlayoutwidget.ui kcmmisc.cpp kcmmiscwidget.ui  \
kcm_keyboard_la_LDFLAGS  = $(all_libraries) -module -avoid-version -no-undefined  \
kcm_keyboard_la_LIBADD = -lxkbfile $(XTESTLIB) $(LIB_KIO)

--- kdebase/kxkb/extension.h  #1.16:1.17
@@ -15,5 +15,5 @@ public:
     bool init();
 
-    bool setXkbOptions(const QString& options, bool resetOldOptions);
+    static bool setXkbOptions(const QString& options, bool resetOldOptions);
     bool setLayout(const QString& model, const QString& layout, const char* variant, \
unsigned int group,  const char* baseGr);

--- kdebase/kxkb/kcmlayout.cpp  #1.83:1.84
@@ -25,4 +25,5 @@
 #include <kapplication.h>
 
+#include "extension.h"
 #include "rules.h"
 #include "kcmlayout.h"
@@ -741,4 +742,16 @@ extern "C"
     config = new KConfig("kxkbrc", true, false);
     config->setGroup("Layout");
+
+// Even if the layouts have been disabled we still want to set Xkb options
+// user can always switch them off now in the "Options" tab
+    bool enableXkbOptions = config->readBoolEntry("EnableXkbOptions", true);
+    if( enableXkbOptions ) {
+        bool resetOldOptions = config->readBoolEntry("ResetOldOptions", false);
+        QString options = config->readEntry("Options", "");
+        if( !XKBExtension::setXkbOptions(options, resetOldOptions) ) {
+            kdDebug() << "Setting XKB options failed!" << endl;
+        }
+    }
+
     if (config->readBoolEntry("Use", false) == true)
         kapp->startServiceByDesktopName("kxkb");


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic