Re: Cleaning default keyboard layouts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Michele

06.05.23 10:51, Michele Calgaro via tde-users wrote:
So it seems it is something related to the Ukrainian language translations. Hope this will point you into the right direction to fix it.

That related in marking for translation not translatable messages by the function i18n() and in case of kcmlayout.cpp that is "grp" and keys.

And the problem is represented at Ukrainain language due to me have translated that significantly, including "grp" and so on.

So, I have fixed "the changes" by appending of using the system configuration at disabling the "Layouts using" in TDE, as that must be.

I am going to test the patch some time yet.
--- tdebase-trinity-14.1.0/kxkb/kcmlayout.cpp~	2023-04-12 17:41:00.000000000 +0300
+++ tdebase-trinity-14.1.0/kxkb/kcmlayout.cpp	2023-05-07 14:05:01.468389428 +0300
@@ -287,7 +287,8 @@
 	widget->indOptsFrame->setEnabled( m_kxkbConfig.m_useKxkb );
 
 	// display xkb options
-	TQStringList activeOptions = TQStringList::split(',', m_kxkbConfig.m_options);
+	TQStringList activeOptions = TQStringList::split(",", XKBExtension::getServerOptions());
+				     //TQStringList::split(',', m_kxkbConfig.m_options);
 	bool foundGrp = false;
 	for (TQStringList::ConstIterator it = activeOptions.begin(); it != activeOptions.end(); ++it)
 	{
@@ -299,7 +300,7 @@
 			foundGrp = true;
 		}
 
-		OptionListItem *item = m_optionGroups[i18n(optionKey.latin1())];
+		OptionListItem *item = m_optionGroups[optionKey.latin1()];
 
 		if (item != NULL) {
 			OptionListItem *child = item->findChildItem( option );
@@ -681,7 +682,7 @@
             TQCheckListItem::CheckBoxController, it.currentKey());
       }
       parent->setOpen(true);
-      m_optionGroups.insert(i18n(it.currentKey().local8Bit()), parent);
+      m_optionGroups.insert(it.currentKey().local8Bit(), parent);
     }
   }
 
@@ -817,7 +818,7 @@
     kdDebug() << "resolveConflicts : " << current->optionName() << endl;
 
     if (current->optionName().startsWith("grp:")) {
-        OptionListItem *grpItem = m_optionGroups[i18n("grp")];
+        OptionListItem *grpItem = m_optionGroups["grp"];
         if (grpItem == NULL) {
             kdWarning() << "LayoutConfig: cannot find grp item group" << endl;
             return;
@@ -947,7 +948,7 @@
 }
 
 void LayoutConfig::updateHotkeyCombo(bool initial) {
-    OptionListItem *grpItem = m_optionGroups[i18n("grp")];
+    OptionListItem *grpItem = m_optionGroups["grp"];
     if (grpItem == NULL) {
         kdWarning() << "LayoutConfig: cannot find grp item group" << endl;
         return;
@@ -1051,7 +1052,7 @@
         }
     }
 
-    OptionListItem *grpItem = m_optionGroups[i18n("grp")];
+    OptionListItem *grpItem = m_optionGroups["grp"];
     if (grpItem == NULL) {
         kdWarning() << "LayoutConfig: cannot find grp item group" << endl;
         return;
@@ -1214,14 +1215,18 @@
 		KxkbConfig m_kxkbConfig;
 		m_kxkbConfig.load(KxkbConfig::LOAD_INIT_OPTIONS);
 
-		if( m_kxkbConfig.m_useKxkb == true ) {
+		/*if( m_kxkbConfig.m_useKxkb == true ) {
 			kapp->startServiceByDesktopName("kxkb");
+		}*/
+
+		XkbOptions opts = m_kxkbConfig.getKXkbOptions();
+		//Only Xkb options processing for compatibility
+		if(!m_kxkbConfig.m_useKxkb) {
+		    opts.layouts = opts.variants = opts.model = "";
+		    opts.resetOld = false;
 		}
-		else {
-			if (!XKBExtension::setXkbOptions(m_kxkbConfig.getKXkbOptions())) {
-				kdDebug() << "Setting XKB options failed!" << endl;
-			}
-		}
+		if(!XKBExtension::setXkbOptions(opts))
+		    kdDebug() << "Setting XKB options failed!" << endl;
 	}
 }
 
--- tdebase-trinity-14.1.0/kxkb/kxkb.cpp~	2023-04-12 17:41:00.000000000 +0300
+++ tdebase-trinity-14.1.0/kxkb/kxkb.cpp	2023-05-07 14:09:17.115729594 +0300
@@ -99,16 +99,19 @@
 
 bool KXKBApp::settingsRead()
 {
-	XkbOptions options = kxkbConfig.getKXkbOptions();
-	if( !m_extension->setXkbOptions(options) ) {
-		kdDebug() << "Setting XKB options failed!" << endl;
-	}
+    XkbOptions options = kxkbConfig.getKXkbOptions();
+    //Only Xkb options processing for compatibility
+    if(!kxkbConfig.m_useKxkb) {
+	options.layouts = options.variants = options.model = "";
+	options.resetOld = false;
+    }
+    if(!m_extension->setXkbOptions(options))
+	kdDebug() << "Setting XKB options failed!" << endl;
 
     if ( kxkbConfig.m_useKxkb == false ) {
         kapp->quit();
         return false;
     }
-	
 	m_prevWinId = X11Helper::UNKNOWN_WINDOW_ID;
 	
 	if( kxkbConfig.m_switchingPolicy == SWITCH_POLICY_GLOBAL ) {
BEGIN:VCARD
VERSION:4.0
EMAIL;PREF=1:roman@xxxxxxxxxx
FN:Roman Savochenko
ORG:OpenSCADA Team;
TITLE:OpenSCADA author and main developer
N:Savochenko;Roman;;;
ADR:;;;Kamjanske;Sicheslavska;51939;Ukraine
TEL;VALUE=TEXT:+380679859815
URL;TYPE=work;VALUE=URL:http://oscada.org
UID:bc92ca63-75ca-498b-801c-54be2b34328e
END:VCARD
____________________________________________________
tde-users mailing list -- users@xxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxx
Web mail archive available at https://mail.trinitydesktop.org/mailman3/hyperkitty/list/users@xxxxxxxxxxxxxxxxxx

[Index of Archives]     [Trinity Devel]     [KDE]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]     [Trinity Desktop Environment]

  Powered by Linux