summaryrefslogtreecommitdiffstats
path: root/kxkb
diff options
context:
space:
mode:
Diffstat (limited to 'kxkb')
-rw-r--r--kxkb/TODO10
-rw-r--r--kxkb/extension.cpp82
-rw-r--r--kxkb/extension.h10
-rw-r--r--kxkb/kcmlayout.cpp122
-rw-r--r--kxkb/kcmlayout.h2
-rw-r--r--kxkb/kcmlayoutwidget.ui52
-rw-r--r--kxkb/kcmmisc.cpp42
-rw-r--r--kxkb/kcmmiscwidget.ui6
-rw-r--r--kxkb/keyboard.desktop2
-rw-r--r--kxkb/keyboard_layout.desktop20
-rw-r--r--kxkb/kxkb.cpp120
-rw-r--r--kxkb/kxkb.desktop4
-rw-r--r--kxkb/kxkb.h10
-rw-r--r--kxkb/kxkbconfig.cpp130
-rw-r--r--kxkb/kxkbconfig.h26
-rw-r--r--kxkb/kxkbtraywindow.cpp22
-rw-r--r--kxkb/kxkbtraywindow.h10
-rw-r--r--kxkb/layoutmap.cpp54
-rw-r--r--kxkb/layoutmap.h16
-rw-r--r--kxkb/pixmap.cpp68
-rw-r--r--kxkb/pixmap.h2
-rw-r--r--kxkb/rules.cpp54
-rw-r--r--kxkb/rules.h14
-rw-r--r--kxkb/x11helper.cpp44
-rw-r--r--kxkb/x11helper.h10
25 files changed, 466 insertions, 466 deletions
diff --git a/kxkb/TODO b/kxkb/TODO
index 258dec42b..344422bac 100644
--- a/kxkb/TODO
+++ b/kxkb/TODO
@@ -1,13 +1,13 @@
-- setting up own tqlayout if you're not root - using xkbcomp
+- setting up own layout if you're not root - using xkbcomp
- allowing other latin base groups instead of "us" (e.g. "dvorak")
-- checking each tqlayout in kxkb.cpp if it's ok for single group
-- checking each tqlayout in kcmtqlayout.cpp whether it's latin and don't need latin group
+- checking each layout in kxkb.cpp if it's ok for single group
+- checking each layout in kcmlayout.cpp whether it's latin and don't need latin group
-- check the problem with gnome apps, first switch of tqlayout with keyboard shortcut locks input
+- check the problem with gnome apps, first switch of layout with keyboard shortcut locks input
-- kdesktop_lock: tqlayouts menu, flag icons, better error handling
+- kdesktop_lock: layouts menu, flag icons, better error handling
- parse xfree86.xml instead of xfree86.lst for XFree86 4.3.0 and higher
diff --git a/kxkb/extension.cpp b/kxkb/extension.cpp
index 12b9b9bbe..3817a8c4c 100644
--- a/kxkb/extension.cpp
+++ b/kxkb/extension.cpp
@@ -24,14 +24,14 @@
TQMap<TQString, FILE*> XKBExtension::fileCache; //TODO: move to class?
-static TQString getLayoutKey(const TQString& tqlayout, const TQString& variant)
+static TQString getLayoutKey(const TQString& layout, const TQString& variant)
{
- return tqlayout + "." + variant;
+ return layout + "." + variant;
}
-TQString XKBExtension::getPrecompiledLayoutFilename(const TQString& tqlayoutKey)
+TQString XKBExtension::getPrecompiledLayoutFilename(const TQString& layoutKey)
{
- TQString compiledLayoutFileName = m_tempDir + tqlayoutKey + ".xkm";
+ TQString compiledLayoutFileName = m_tempDir + layoutKey + ".xkm";
return compiledLayoutFileName;
}
@@ -115,28 +115,28 @@ bool XKBExtension::setXkbOptions(const TQString& options, bool resetOld)
}
bool XKBExtension::setLayout(const TQString& model,
- const TQString& tqlayout, const TQString& variant,
+ const TQString& layout, const TQString& variant,
const TQString& includeGroup, bool useCompiledLayouts)
{
if( useCompiledLayouts == false ) {
- return setLayoutInternal( model, tqlayout, variant, includeGroup );
+ return setLayoutInternal( model, layout, variant, includeGroup );
}
- const TQString tqlayoutKey = getLayoutKey(tqlayout, variant);
+ const TQString layoutKey = getLayoutKey(layout, variant);
bool res;
- if( fileCache.tqcontains(tqlayoutKey) ) {
- res = setCompiledLayout( tqlayoutKey );
- kdDebug() << "setCompiledLayout " << tqlayoutKey << ": " << res << endl;
+ if( fileCache.contains(layoutKey) ) {
+ res = setCompiledLayout( layoutKey );
+ kdDebug() << "setCompiledLayout " << layoutKey << ": " << res << endl;
if( res )
return res;
}
// else {
- res = setLayoutInternal( model, tqlayout, variant, includeGroup );
- kdDebug() << "setRawLayout " << tqlayoutKey << ": " << res << endl;
+ res = setLayoutInternal( model, layout, variant, includeGroup );
+ kdDebug() << "setRawLayout " << layoutKey << ": " << res << endl;
if( res )
- compileCurrentLayout( tqlayoutKey );
+ compileCurrentLayout( layoutKey );
// }
return res;
@@ -144,10 +144,10 @@ bool XKBExtension::setLayout(const TQString& model,
// private
bool XKBExtension::setLayoutInternal(const TQString& model,
- const TQString& tqlayout, const TQString& variant,
+ const TQString& layout, const TQString& variant,
const TQString& includeGroup)
{
- if ( tqlayout.isEmpty() )
+ if ( layout.isEmpty() )
return false;
TQString exe = KGlobal::dirs()->findExe("setxkbmap");
@@ -156,12 +156,12 @@ bool XKBExtension::setLayoutInternal(const TQString& model,
return false;
}
- TQString fullLayout = tqlayout;
+ TQString fullLayout = layout;
TQString fullVariant = variant;
if( includeGroup.isEmpty() == false ) {
fullLayout = includeGroup;
fullLayout += ",";
- fullLayout += tqlayout;
+ fullLayout += layout;
// fullVariant = baseVar;
fullVariant = ",";
@@ -173,7 +173,7 @@ bool XKBExtension::setLayoutInternal(const TQString& model,
// p << "-rules" << rule;
if( model.isEmpty() == false )
p << "-model" << model;
- p << "-tqlayout" << fullLayout;
+ p << "-layout" << fullLayout;
if( !fullVariant.isNull() && !fullVariant.isEmpty() )
p << "-variant" << fullVariant;
@@ -209,25 +209,25 @@ unsigned int XKBExtension::getGroup() const
}
/**
- * @brief Gets the current tqlayout in its binary compiled form
+ * @brief Gets the current layout in its binary compiled form
* and write it to the file specified by 'fileName'
- * @param[in] fileName file to store compiled tqlayout to
+ * @param[in] fileName file to store compiled layout to
* @return true if no problem, false otherwise
*/
-bool XKBExtension::compileCurrentLayout(const TQString &tqlayoutKey)
+bool XKBExtension::compileCurrentLayout(const TQString &layoutKey)
{
XkbFileInfo result;
memset(&result, 0, sizeof(result));
result.type = XkmKeymapFile;
XkbReadFromServer(m_dpy, XkbAllMapComponentsMask, XkbAllMapComponentsMask, &result);
- const TQString fileName = getPrecompiledLayoutFilename(tqlayoutKey);
+ const TQString fileName = getPrecompiledLayoutFilename(layoutKey);
- kdDebug() << "compiling tqlayout " << this << " cache size: " << fileCache.count() << endl;
- if( fileCache.tqcontains(tqlayoutKey) ) {
- kdDebug() << "trashing old compiled tqlayout for " << fileName << endl;
- if( fileCache[ tqlayoutKey ] != NULL )
- fclose( fileCache[ tqlayoutKey ] ); // recompiling - trash the old file
+ kdDebug() << "compiling layout " << this << " cache size: " << fileCache.count() << endl;
+ if( fileCache.contains(layoutKey) ) {
+ kdDebug() << "trashing old compiled layout for " << fileName << endl;
+ if( fileCache[ layoutKey ] != NULL )
+ fclose( fileCache[ layoutKey ] ); // recompiling - trash the old file
fileCache.remove(fileName);
}
@@ -241,41 +241,41 @@ bool XKBExtension::compileCurrentLayout(const TQString &tqlayoutKey)
}
if( !XkbWriteXKMFile(output, &result) ) {
- kdWarning() << "Could not write compiled tqlayout to " << fileName << endl;
+ kdWarning() << "Could not write compiled layout to " << fileName << endl;
fclose(output);
return false;
}
fclose(output); // TODO: can we change mode w/out reopening?
FILE *input = fopen(TQFile::encodeName(fileName), "r");
- fileCache[ tqlayoutKey ] = input;
+ fileCache[ layoutKey ] = input;
XkbFreeKeyboard(result.xkb, XkbAllControlsMask, True);
return true;
}
/**
- * @brief takes tqlayout from its compiled binary snapshot in file
+ * @brief takes layout from its compiled binary snapshot in file
* and sets it as current
- * TODO: cache tqlayout in memory rather than in file
+ * TODO: cache layout in memory rather than in file
*/
-bool XKBExtension::setCompiledLayout(const TQString &tqlayoutKey)
+bool XKBExtension::setCompiledLayout(const TQString &layoutKey)
{
FILE *input = NULL;
- if( fileCache.tqcontains(tqlayoutKey) ) {
- input = fileCache[ tqlayoutKey ];
+ if( fileCache.contains(layoutKey) ) {
+ input = fileCache[ layoutKey ];
}
if( input == NULL ) {
kdWarning() << "setCompiledLayout trying to reopen xkb file" << endl; // should never happen
- const TQString fileName = getPrecompiledLayoutFilename(tqlayoutKey);
+ const TQString fileName = getPrecompiledLayoutFilename(layoutKey);
input = fopen(TQFile::encodeName(fileName), "r");
// FILE *input = fopen(TQFile::encodeName(fileName), "r");
if ( input == NULL ) {
kdDebug() << "Unable to open " << fileName << ": " << strerror(errno) << endl;
- fileCache.remove(tqlayoutKey);
+ fileCache.remove(layoutKey);
return false;
}
}
@@ -288,7 +288,7 @@ bool XKBExtension::setCompiledLayout(const TQString &tqlayoutKey)
if ((result.xkb = XkbAllocKeyboard())==NULL) {
kdWarning() << "Unable to allocate memory for keyboard description" << endl;
// fclose(input);
-// fileCache.remove(tqlayoutKey);
+// fileCache.remove(layoutKey);
return false;
}
@@ -299,7 +299,7 @@ bool XKBExtension::setCompiledLayout(const TQString &tqlayoutKey)
kdWarning() << "Unable to load map from file" << endl;
XkbFreeKeyboard(result.xkb, XkbAllControlsMask, True);
fclose(input);
- fileCache.remove(tqlayoutKey);
+ fileCache.remove(layoutKey);
return false;
}
@@ -309,14 +309,14 @@ bool XKBExtension::setCompiledLayout(const TQString &tqlayoutKey)
{
if (!XkbWriteToServer(&result))
{
- kdWarning() << "Unable to write the keyboard tqlayout to X display" << endl;
+ kdWarning() << "Unable to write the keyboard layout to X display" << endl;
XkbFreeKeyboard(result.xkb, XkbAllControlsMask, True);
return false;
}
}
else
{
- kdWarning() << "Unable prepare the keyboard tqlayout for X display" << endl;
+ kdWarning() << "Unable prepare the keyboard layout for X display" << endl;
}
XkbFreeKeyboard(result.xkb, XkbAllControlsMask, True);
@@ -324,7 +324,7 @@ bool XKBExtension::setCompiledLayout(const TQString &tqlayoutKey)
}
-// Deletes the precompiled tqlayouts stored in temporary files
+// Deletes the precompiled layouts stored in temporary files
// void XKBExtension::deletePrecompiledLayouts()
// {
// TQMapConstIterator<LayoutUnit, TQString> it, end;
diff --git a/kxkb/extension.h b/kxkb/extension.h
index 82ea9231b..bf4293d2b 100644
--- a/kxkb/extension.h
+++ b/kxkb/extension.h
@@ -14,7 +14,7 @@ public:
static bool setXkbOptions(const TQString& options, bool resetOldOptions);
bool setLayout(const TQString& model,
- const TQString& tqlayout, const TQString& variant,
+ const TQString& layout, const TQString& variant,
const TQString& includeGroup, bool useCompiledLayouts=true);
bool setGroup(unsigned int group);
unsigned int getGroup() const;
@@ -25,12 +25,12 @@ private:
static TQMap<TQString, FILE*> fileCache;
bool setLayoutInternal(const TQString& model,
- const TQString& tqlayout, const TQString& variant,
+ const TQString& layout, const TQString& variant,
const TQString& includeGroup);
- bool compileCurrentLayout(const TQString& tqlayoutKey);
- bool setCompiledLayout(const TQString& tqlayoutKey);
+ bool compileCurrentLayout(const TQString& layoutKey);
+ bool setCompiledLayout(const TQString& layoutKey);
- TQString getPrecompiledLayoutFilename(const TQString& tqlayoutKey);
+ TQString getPrecompiledLayoutFilename(const TQString& layoutKey);
// void deletePrecompiledLayouts();
};
diff --git a/kxkb/kcmlayout.cpp b/kxkb/kcmlayout.cpp
index ef0cc168f..7af7ae691 100644
--- a/kxkb/kcmlayout.cpp
+++ b/kxkb/kcmlayout.cpp
@@ -116,7 +116,7 @@ LayoutConfig::LayoutConfig(TQWidget *parent, const char *name)
connect( widget->comboVariant, TQT_SIGNAL(activated(int)), this, TQT_SLOT(changed()));
connect( widget->comboVariant, TQT_SIGNAL(activated(int)), this, TQT_SLOT(variantChanged()));
connect( widget->listLayoutsDst, TQT_SIGNAL(selectionChanged(TQListViewItem *)),
- this, TQT_SLOT(tqlayoutSelChanged(TQListViewItem *)));
+ this, TQT_SLOT(layoutSelChanged(TQListViewItem *)));
connect( widget->editDisplayName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(displayNameChanged(const TQString&)));
@@ -185,23 +185,23 @@ void LayoutConfig::initUI() {
widget->comboModel->setCurrentText(i18n(modelName));
- TQValueList<LayoutUnit> otherLayouts = m_kxkbConfig.m_tqlayouts;
+ TQValueList<LayoutUnit> otherLayouts = m_kxkbConfig.m_layouts;
widget->listLayoutsDst->clear();
// to optimize we should have gone from it.end to it.begin
TQValueList<LayoutUnit>::ConstIterator it;
for (it = otherLayouts.begin(); it != otherLayouts.end(); ++it ) {
TQListViewItemIterator src_it( widget->listLayoutsSrc );
- LayoutUnit tqlayoutUnit = *it;
+ LayoutUnit layoutUnit = *it;
for ( ; src_it.current(); ++src_it ) {
TQListViewItem* srcItem = src_it.current();
- if ( tqlayoutUnit.tqlayout == src_it.current()->text(LAYOUT_COLUMN_MAP) ) { // check if current config knows about this tqlayout
+ if ( layoutUnit.layout == src_it.current()->text(LAYOUT_COLUMN_MAP) ) { // check if current config knows about this layout
TQListViewItem* newItem = copyLVI(srcItem, widget->listLayoutsDst);
- newItem->setText(LAYOUT_COLUMN_VARIANT, tqlayoutUnit.variant);
- newItem->setText(LAYOUT_COLUMN_INCLUDE, tqlayoutUnit.includeGroup);
- newItem->setText(LAYOUT_COLUMN_DISPLAY_NAME, tqlayoutUnit.displayName);
+ newItem->setText(LAYOUT_COLUMN_VARIANT, layoutUnit.variant);
+ newItem->setText(LAYOUT_COLUMN_INCLUDE, layoutUnit.includeGroup);
+ newItem->setText(LAYOUT_COLUMN_DISPLAY_NAME, layoutUnit.displayName);
widget->listLayoutsDst->insertItem(newItem);
newItem->moveItem(widget->listLayoutsDst->lastItem());
@@ -277,27 +277,27 @@ void LayoutConfig::save()
m_kxkbConfig.m_options = createOptionString();
TQListViewItem *item = widget->listLayoutsDst->firstChild();
- TQValueList<LayoutUnit> tqlayouts;
+ TQValueList<LayoutUnit> layouts;
while (item) {
- TQString tqlayout = item->text(LAYOUT_COLUMN_MAP);
+ TQString layout = item->text(LAYOUT_COLUMN_MAP);
TQString variant = item->text(LAYOUT_COLUMN_VARIANT);
TQString includes = item->text(LAYOUT_COLUMN_INCLUDE);
TQString displayName = item->text(LAYOUT_COLUMN_DISPLAY_NAME);
- LayoutUnit tqlayoutUnit(tqlayout, variant);
- tqlayoutUnit.includeGroup = includes;
- tqlayoutUnit.displayName = displayName;
- tqlayouts.append( tqlayoutUnit );
+ LayoutUnit layoutUnit(layout, variant);
+ layoutUnit.includeGroup = includes;
+ layoutUnit.displayName = displayName;
+ layouts.append( layoutUnit );
item = item->nextSibling();
- kdDebug() << "To save: tqlayout " << tqlayoutUnit.toPair()
- << ", inc: " << tqlayoutUnit.includeGroup
- << ", disp: " << tqlayoutUnit.displayName << endl;
+ kdDebug() << "To save: layout " << layoutUnit.toPair()
+ << ", inc: " << layoutUnit.includeGroup
+ << ", disp: " << layoutUnit.displayName << endl;
}
- m_kxkbConfig.m_tqlayouts = tqlayouts;
+ m_kxkbConfig.m_layouts = layouts;
- if( m_kxkbConfig.m_tqlayouts.count() == 0 ) {
- m_kxkbConfig.m_tqlayouts.append(LayoutUnit(DEFAULT_LAYOUT_UNIT));
+ if( m_kxkbConfig.m_layouts.count() == 0 ) {
+ m_kxkbConfig.m_layouts.append(LayoutUnit(DEFAULT_LAYOUT_UNIT));
widget->chkEnable->setChecked(false);
}
@@ -331,8 +331,8 @@ void LayoutConfig::save()
void LayoutConfig::updateStickyLimit()
{
- int tqlayoutsCnt = widget->listLayoutsDst->childCount();
- int maxDepth = tqlayoutsCnt - 1;
+ int layoutsCnt = widget->listLayoutsDst->childCount();
+ int maxDepth = layoutsCnt - 1;
if( maxDepth < 2 ) {
maxDepth = 2;
@@ -349,11 +349,11 @@ void LayoutConfig::add()
if( sel == 0 )
return;
- // Create a copy of the sel widget, as one might add the same tqlayout more
+ // Create a copy of the sel widget, as one might add the same layout more
// than one time, with different variants.
TQListViewItem* toadd = copyLVI(sel, widget->listLayoutsDst);
- // Turn on "Include Latin tqlayout" for new language by default (bnc:204402)
+ // Turn on "Include Latin layout" for new language by default (bnc:204402)
toadd->setText(LAYOUT_COLUMN_INCLUDE, "us");
widget->listLayoutsDst->insertItem(toadd);
@@ -361,7 +361,7 @@ void LayoutConfig::add()
toadd->moveItem(widget->listLayoutsDst->lastItem());
// disabling temporary: does not work reliable in Qt :(
// widget->listLayoutsDst->setSelected(sel, true);
-// tqlayoutSelChanged(sel);
+// layoutSelChanged(sel);
updateStickyLimit();
changed();
@@ -384,7 +384,7 @@ void LayoutConfig::remove()
delete sel;
if( newSel )
widget->listLayoutsSrc->setSelected(newSel, true);
- tqlayoutSelChanged(newSel);
+ layoutSelChanged(newSel);
updateStickyLimit();
changed();
@@ -443,23 +443,23 @@ void LayoutConfig::displayNameChanged(const TQString& newDisplayName)
if( selLayout == NULL )
return;
- const LayoutUnit tqlayoutUnitKey = getLayoutUnitKey( selLayout );
- LayoutUnit& tqlayoutUnit = *m_kxkbConfig.m_tqlayouts.find(tqlayoutUnitKey);
+ const LayoutUnit layoutUnitKey = getLayoutUnitKey( selLayout );
+ LayoutUnit& layoutUnit = *m_kxkbConfig.m_layouts.find(layoutUnitKey);
TQString oldName = selLayout->text(LAYOUT_COLUMN_DISPLAY_NAME);
if( oldName.isEmpty() )
- oldName = KxkbConfig::getDefaultDisplayName( tqlayoutUnit );
+ oldName = KxkbConfig::getDefaultDisplayName( layoutUnit );
if( oldName != newDisplayName ) {
- kdDebug() << "setting label for " << tqlayoutUnit.toPair() << " : " << newDisplayName << endl;
+ kdDebug() << "setting label for " << layoutUnit.toPair() << " : " << newDisplayName << endl;
selLayout->setText(LAYOUT_COLUMN_DISPLAY_NAME, newDisplayName);
updateIndicator(selLayout);
emit changed();
}
}
-/** will update flag with label if tqlayout label has been edited
+/** will update flag with label if layout label has been edited
*/
void LayoutConfig::updateIndicator(TQListViewItem* selLayout)
{
@@ -482,11 +482,11 @@ void LayoutConfig::latinChanged()
include = "";
selLayout->setText(LAYOUT_COLUMN_INCLUDE, include);
- LayoutUnit tqlayoutUnitKey = getLayoutUnitKey(selLayout);
- kdDebug() << "tqlayout " << tqlayoutUnitKey.toPair() << ", inc: " << include << endl;
+ LayoutUnit layoutUnitKey = getLayoutUnitKey(selLayout);
+ kdDebug() << "layout " << layoutUnitKey.toPair() << ", inc: " << include << endl;
}
-void LayoutConfig::tqlayoutSelChanged(TQListViewItem *sel)
+void LayoutConfig::layoutSelChanged(TQListViewItem *sel)
{
widget->comboVariant->clear();
widget->comboVariant->setEnabled( sel != NULL );
@@ -499,8 +499,8 @@ void LayoutConfig::tqlayoutSelChanged(TQListViewItem *sel)
}
- LayoutUnit tqlayoutUnitKey = getLayoutUnitKey(sel);
- TQString kbdLayout = tqlayoutUnitKey.tqlayout;
+ LayoutUnit layoutUnitKey = getLayoutUnitKey(sel);
+ TQString kbdLayout = layoutUnitKey.layout;
// TODO: need better algorithm here for determining if needs us group
if ( ! m_rules->isSingleGroup(kbdLayout)
@@ -518,7 +518,7 @@ void LayoutConfig::tqlayoutSelChanged(TQListViewItem *sel)
}
TQStringList vars = m_rules->getAvailableVariants(kbdLayout);
- kdDebug() << "tqlayout " << kbdLayout << " has " << vars.count() << " variants" << endl;
+ kdDebug() << "layout " << kbdLayout << " has " << vars.count() << " variants" << endl;
if( vars.count() > 0 ) {
vars.prepend(DEFAULT_VARIANT_NAME);
@@ -557,7 +557,7 @@ TQWidget* LayoutConfig::makeOptionsTab()
OptionListItem *parent;
for (; it.current(); ++it)
{
- if (!it.currentKey().tqcontains(':'))
+ if (!it.currentKey().contains(':'))
{
if( it.currentKey() == "ctrl" || it.currentKey() == "caps"
|| it.currentKey() == "altwin" ) {
@@ -589,7 +589,7 @@ TQWidget* LayoutConfig::makeOptionsTab()
if (parent != NULL) {
// workaroung for mistake in rules file for xkb options in XFree 4.2.0
TQString text(it.current());
- text = text.tqreplace( "Cap$", "Caps." );
+ text = text.replace( "Cap$", "Caps." );
if( parent->type() == TQCheckListItem::RadioButtonController )
new OptionListItem(parent, i18n(text.utf8()),
TQCheckListItem::RadioButton, key);
@@ -622,7 +622,7 @@ void LayoutConfig::updateOptionsCommand()
void LayoutConfig::updateLayoutCommand()
{
TQString setxkbmap;
- TQString tqlayoutDisplayName;
+ TQString layoutDisplayName;
TQListViewItem* sel = widget->listLayoutsDst->selectedItem();
if( sel != NULL ) {
@@ -633,27 +633,27 @@ void LayoutConfig::updateLayoutCommand()
setxkbmap = "setxkbmap"; //-rules " + m_rule
setxkbmap += " -model " + lookupLocalized(m_rules->models(), widget->comboModel->currentText())
- + " -tqlayout ";
+ + " -layout ";
setxkbmap += kbdLayout;
if( widget->chkLatin->isChecked() )
setxkbmap += ",us";
-/* LayoutUnit tqlayoutUnitKey = getLayoutUnitKey(sel);
- tqlayoutDisplayName = m_kxkbConfig.getLayoutDisplayName( *m_kxkbConfig.m_tqlayouts.find(tqlayoutUnitKey) );*/
- tqlayoutDisplayName = sel->text(LAYOUT_COLUMN_DISPLAY_NAME);
- if( tqlayoutDisplayName.isEmpty() ) {
+/* LayoutUnit layoutUnitKey = getLayoutUnitKey(sel);
+ layoutDisplayName = m_kxkbConfig.getLayoutDisplayName( *m_kxkbConfig.m_layouts.find(layoutUnitKey) );*/
+ layoutDisplayName = sel->text(LAYOUT_COLUMN_DISPLAY_NAME);
+ if( layoutDisplayName.isEmpty() ) {
int count = 0;
TQListViewItem *item = widget->listLayoutsDst->firstChild();
while (item) {
- TQString tqlayout_ = item->text(LAYOUT_COLUMN_MAP);
- if( tqlayout_ == kbdLayout )
+ TQString layout_ = item->text(LAYOUT_COLUMN_MAP);
+ if( layout_ == kbdLayout )
++count;
item = item->nextSibling();
}
bool single = count < 2;
- tqlayoutDisplayName = m_kxkbConfig.getDefaultDisplayName(LayoutUnit(kbdLayout, variant), single);
+ layoutDisplayName = m_kxkbConfig.getDefaultDisplayName(LayoutUnit(kbdLayout, variant), single);
}
- kdDebug() << "disp: '" << tqlayoutDisplayName << "'" << endl;
+ kdDebug() << "disp: '" << layoutDisplayName << "'" << endl;
if( !variant.isEmpty() ) {
setxkbmap += " -variant ";
@@ -666,7 +666,7 @@ void LayoutConfig::updateLayoutCommand()
widget->editCmdLine->setText(setxkbmap);
widget->editDisplayName->setEnabled( sel != NULL );
- widget->editDisplayName->setText(tqlayoutDisplayName);
+ widget->editDisplayName->setText(layoutDisplayName);
}
void LayoutConfig::changed()
@@ -695,20 +695,20 @@ void LayoutConfig::loadRules()
widget->comboModel->insertStringList(modelsList);
widget->comboModel->setCurrentItem(0);
- // fill in the additional tqlayouts
+ // fill in the additional layouts
widget->listLayoutsSrc->clear();
widget->listLayoutsDst->clear();
- TQDictIterator<char> it2(m_rules->tqlayouts());
+ TQDictIterator<char> it2(m_rules->layouts());
while (it2.current())
{
- TQString tqlayout = it2.currentKey();
- TQString tqlayoutName = it2.current();
+ TQString layout = it2.currentKey();
+ TQString layoutName = it2.current();
TQListViewItem *item = new TQListViewItem(widget->listLayoutsSrc);
- item->setPixmap(LAYOUT_COLUMN_FLAG, LayoutIcon::getInstance().findPixmap(tqlayout, true));
- item->setText(LAYOUT_COLUMN_NAME, i18n(tqlayoutName.latin1()));
- item->setText(LAYOUT_COLUMN_MAP, tqlayout);
+ item->setPixmap(LAYOUT_COLUMN_FLAG, LayoutIcon::getInstance().findPixmap(layout, true));
+ item->setText(LAYOUT_COLUMN_NAME, i18n(layoutName.latin1()));
+ item->setText(LAYOUT_COLUMN_MAP, layout);
++it2;
}
widget->listLayoutsSrc->setSorting(LAYOUT_COLUMN_NAME); // from Qt3 TQListView sorts by language
@@ -724,7 +724,7 @@ TQString LayoutConfig::createOptionString()
{
TQString option(it.currentKey());
- if (option.tqcontains(':')) {
+ if (option.contains(':')) {
TQString optionKey = option.mid(0, option.find(':'));
OptionListItem *item = m_optionGroups[optionKey];
@@ -795,14 +795,14 @@ OptionListItem * OptionListItem::findChildItem( const TQString& optionName )
extern "C"
{
- KDE_EXPORT KCModule *create_keyboard_tqlayout(TQWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_keyboard_layout(TQWidget *parent, const char *)
{
- return new LayoutConfig(parent, "kcmtqlayout");
+ return new LayoutConfig(parent, "kcmlayout");
}
KDE_EXPORT KCModule *create_keyboard(TQWidget *parent, const char *)
{
- return new KeyboardConfig(parent, "kcmtqlayout");
+ return new KeyboardConfig(parent, "kcmlayout");
}
KDE_EXPORT void init_keyboard()
@@ -816,7 +816,7 @@ extern "C"
kapp->startServiceByDesktopName("kxkb");
}
else {
- // Even if the tqlayouts have been disabled we still want to set Xkb options
+ // 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
if( m_kxkbConfig.m_enableXkbOptions ) {
if( !XKBExtension::setXkbOptions(m_kxkbConfig.m_options, m_kxkbConfig.m_resetOldOptions) ) {
diff --git a/kxkb/kcmlayout.h b/kxkb/kcmlayout.h
index 5ff153fcf..6f61e9e06 100644
--- a/kxkb/kcmlayout.h
+++ b/kxkb/kcmlayout.h
@@ -37,7 +37,7 @@ protected slots:
void variantChanged();
void displayNameChanged(const TQString& name);
void latinChanged();
- void tqlayoutSelChanged(TQListViewItem *);
+ void layoutSelChanged(TQListViewItem *);
void loadRules();
void updateLayoutCommand();
void updateOptionsCommand();
diff --git a/kxkb/kcmlayoutwidget.ui b/kxkb/kcmlayoutwidget.ui
index 8e9f9d79e..82c866009 100644
--- a/kxkb/kcmlayoutwidget.ui
+++ b/kxkb/kcmlayoutwidget.ui
@@ -4,7 +4,7 @@
<property name="name">
<cstring>LayoutConfigWidget</cstring>
</property>
- <property name="tqgeometry">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@@ -20,7 +20,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="tqminimumSize">
+ <property name="minimumSize">
<size>
<width>600</width>
<height>510</height>
@@ -34,7 +34,7 @@
<property name="name">
<cstring>tabWidget</cstring>
</property>
- <property name="tqminimumSize">
+ <property name="minimumSize">
<size>
<width>600</width>
<height>500</height>
@@ -56,7 +56,7 @@
<cstring>chkEnable</cstring>
</property>
<property name="text">
- <string>&amp;Enable keyboard tqlayouts</string>
+ <string>&amp;Enable keyboard layouts</string>
</property>
<property name="checked">
<bool>true</bool>
@@ -70,7 +70,7 @@
<string></string>
</property>
<property name="whatsThis" stdset="0">
- <string>&lt;h1&gt;Keyboard Layout&lt;/h1&gt; Here you can choose your keyboard tqlayout and model. The 'model' refers to the type of keyboard that is connected to your computer, while the keyboard tqlayout defines "which key does what" and may be different for different countries.</string>
+ <string>&lt;h1&gt;Keyboard Layout&lt;/h1&gt; Here you can choose your keyboard layout and model. The 'model' refers to the type of keyboard that is connected to your computer, while the keyboard layout defines "which key does what" and may be different for different countries.</string>
</property>
<grid>
<property name="name">
@@ -81,7 +81,7 @@
<cstring>textLabel1_4</cstring>
</property>
<property name="text">
- <string>Available tqlayouts:</string>
+ <string>Available layouts:</string>
</property>
</widget>
<widget class="QLabel" row="2" column="2" rowspan="1" colspan="3">
@@ -89,7 +89,7 @@
<cstring>textLabel1_4_2</cstring>
</property>
<property name="text">
- <string>Active tqlayouts:</string>
+ <string>Active layouts:</string>
</property>
</widget>
<widget class="QLabel" row="0" column="2" rowspan="1" colspan="3">
@@ -116,7 +116,7 @@
</sizepolicy>
</property>
<property name="whatsThis" stdset="0">
- <string>Here you can choose a keyboard model. This setting is independent of your keyboard tqlayout and refers to the "hardware" model, i.e. the way your keyboard is manufactured. Modern keyboards that come with your computer usually have two extra keys and are referred to as "104-key" models, which is probably what you want if you do not know what kind of keyboard you have.
+ <string>Here you can choose a keyboard model. This setting is independent of your keyboard layout and refers to the "hardware" model, i.e. the way your keyboard is manufactured. Modern keyboards that come with your computer usually have two extra keys and are referred to as "104-key" models, which is probably what you want if you do not know what kind of keyboard you have.
</string>
</property>
</widget>
@@ -194,12 +194,12 @@
<bool>true</bool>
</property>
<property name="whatsThis" stdset="0">
- <string>If more than one tqlayout is present in this list, the KDE panel will offer a docked flag. By clicking on this flag you can easily switch between tqlayouts. The first tqlayout will be default one.</string>
+ <string>If more than one layout is present in this list, the KDE panel will offer a docked flag. By clicking on this flag you can easily switch between layouts. The first layout will be default one.</string>
</property>
</widget>
<widget class="QLayoutWidget" row="4" column="2" rowspan="1" colspan="3">
<property name="name">
- <cstring>tqlayout10</cstring>
+ <cstring>layout10</cstring>
</property>
<hbox>
<property name="name">
@@ -303,7 +303,7 @@
<property name="name">
<cstring>listLayoutsSrc</cstring>
</property>
- <property name="tqminimumSize">
+ <property name="minimumSize">
<size>
<width>260</width>
<height>0</height>
@@ -313,7 +313,7 @@
<bool>true</bool>
</property>
<property name="whatsThis" stdset="0">
- <string>This is the list of available keyboard tqlayouts in your system. You can add tqlayout to the active list by selecting it and pressing "Add" button.</string>
+ <string>This is the list of available keyboard layouts in your system. You can add layout to the active list by selecting it and pressing "Add" button.</string>
</property>
</widget>
<widget class="QLineEdit" row="8" column="1" rowspan="1" colspan="4">
@@ -324,7 +324,7 @@
<bool>true</bool>
</property>
<property name="whatsThis" stdset="0">
- <string>This is the command which is executed when switching to the selected tqlayout. It may help you if you want to debug tqlayout switching, or if you want to switch tqlayouts without the help of KDE.</string>
+ <string>This is the command which is executed when switching to the selected layout. It may help you if you want to debug layout switching, or if you want to switch layouts without the help of KDE.</string>
</property>
</widget>
<widget class="QCheckBox" row="7" column="2" rowspan="1" colspan="3">
@@ -335,10 +335,10 @@
<bool>false</bool>
</property>
<property name="text">
- <string>Include latin tqlayout</string>
+ <string>Include latin layout</string>
</property>
<property name="whatsThis" stdset="0">
- <string>If after you switch to this tqlayout some keyboard shortcuts based on latin keys do not work try to enable this option.</string>
+ <string>If after you switch to this layout some keyboard shortcuts based on latin keys do not work try to enable this option.</string>
</property>
</widget>
<widget class="QLabel" row="6" column="2">
@@ -379,7 +379,7 @@
<cstring>comboVariant</cstring>
</property>
<property name="whatsThis" stdset="0">
- <string>Here you can choose a variant of selected keyboard tqlayout. Layout variants usually represent different key maps for the same language. For example, Ukrainian tqlayout might have four variants: basic, winkeys (as in Windows), typewriter (as in typewriters) and phonetic (each Ukrainian letter is placed on a transliterated latin one).
+ <string>Here you can choose a variant of selected keyboard layout. Layout variants usually represent different key maps for the same language. For example, Ukrainian layout might have four variants: basic, winkeys (as in Windows), typewriter (as in typewriters) and phonetic (each Ukrainian letter is placed on a transliterated latin one).
</string>
</property>
</widget>
@@ -393,7 +393,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="tqsizeHint">
+ <property name="sizeHint">
<size>
<width>210</width>
<height>20</height>
@@ -410,7 +410,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="tqsizeHint">
+ <property name="sizeHint">
<size>
<width>210</width>
<height>20</height>
@@ -442,7 +442,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="tqsizeHint">
+ <property name="sizeHint">
<size>
<width>20</width>
<height>40</height>
@@ -477,7 +477,7 @@
<bool>true</bool>
</property>
<property name="whatsThis" stdset="0">
- <string>If you select "Application" or "Window" switching policy, changing the keyboard tqlayout will only affect the current application or window.</string>
+ <string>If you select "Application" or "Window" switching policy, changing the keyboard layout will only affect the current application or window.</string>
</property>
<vbox>
<property name="name">
@@ -523,7 +523,7 @@
<bool>true</bool>
</property>
<property name="whatsThis" stdset="0">
- <string>Shows country flag on background of tqlayout name in tray icon</string>
+ <string>Shows country flag on background of layout name in tray icon</string>
</property>
</widget>
<widget class="QGroupBox" row="2" column="1">
@@ -545,7 +545,7 @@
<string>Enable sticky switching</string>
</property>
<property name="whatsThis" stdset="0">
- <string>If you have more than two tqlayouts and turn this option on, switching with the keyboard shortcut or clicking on the kxkb indicator will only cycle through the last few tqlayouts. You can specify the number of tqlayouts to rotate below. You can still access all tqlayouts by right-clicking on the kxkb indicator.</string>
+ <string>If you have more than two layouts and turn this option on, switching with the keyboard shortcut or clicking on the kxkb indicator will only cycle through the last few layouts. You can specify the number of layouts to rotate below. You can still access all layouts by right-clicking on the kxkb indicator.</string>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
@@ -556,7 +556,7 @@
<bool>false</bool>
</property>
<property name="text">
- <string>Number of tqlayouts to rotate:</string>
+ <string>Number of layouts to rotate:</string>
</property>
<property name="buddy" stdset="0">
<cstring>spinBox1</cstring>
@@ -583,7 +583,7 @@
<cstring>chkShowSingle</cstring>
</property>
<property name="text">
- <string>Show indicator for single tqlayout</string>
+ <string>Show indicator for single layout</string>
</property>
</widget>
</grid>
@@ -710,6 +710,6 @@
<include location="local" impldecl="in implementation">kdialogbase.h</include>
</includes>
<pixmapfunction>SmallIcon</pixmapfunction>
-<tqlayoutdefaults spacing="6" margin="11"/>
-<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<layoutdefaults spacing="6" margin="11"/>
+<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
</UI>
diff --git a/kxkb/kcmmisc.cpp b/kxkb/kcmmisc.cpp
index 901b6bbe3..f66ea587c 100644
--- a/kxkb/kcmmisc.cpp
+++ b/kxkb/kcmmisc.cpp
@@ -51,7 +51,7 @@
#include <X11/Xlib.h>
KeyboardConfig::KeyboardConfig (TQWidget * parent, const char *)
- : KCModule (parent, "kcmtqlayout")
+ : KCModule (parent, "kcmlayout")
{
TQString wtstr;
TQBoxLayout* lay = new TQVBoxLayout(this, 0, KDialog::spacingHint());
@@ -286,7 +286,7 @@ int xkb_init()
&xkb_lmaj, &xkb_lmin );
}
-unsigned int xkb_tqmask_modifier( XkbDescPtr xkb, const char *name )
+unsigned int xkb_mask_modifier( XkbDescPtr xkb, const char *name )
{
int i;
if( !xkb || !xkb->names )
@@ -298,47 +298,47 @@ unsigned int xkb_tqmask_modifier( XkbDescPtr xkb, const char *name )
char* modStr = XGetAtomName( xkb->dpy, xkb->names->vmods[i] );
if( modStr != NULL && strcmp(name, modStr) == 0 )
{
- unsigned int tqmask;
- XkbVirtualModsToReal( xkb, 1 << i, &tqmask );
- return tqmask;
+ unsigned int mask;
+ XkbVirtualModsToReal( xkb, 1 << i, &mask );
+ return mask;
}
}
return 0;
}
-unsigned int xkb_numlock_tqmask()
+unsigned int xkb_numlock_mask()
{
XkbDescPtr xkb;
if(( xkb = XkbGetKeyboard( qt_xdisplay(), XkbAllComponentsMask, XkbUseCoreKbd )) != NULL )
{
- unsigned int tqmask = xkb_tqmask_modifier( xkb, "NumLock" );
+ unsigned int mask = xkb_mask_modifier( xkb, "NumLock" );
XkbFreeKeyboard( xkb, 0, True );
- return tqmask;
+ return mask;
}
return 0;
}
int xkb_set_on()
{
- unsigned int tqmask;
+ unsigned int mask;
if( !xkb_init())
return 0;
- tqmask = xkb_numlock_tqmask();
- if( tqmask == 0 )
+ mask = xkb_numlock_mask();
+ if( mask == 0 )
return 0;
- XkbLockModifiers ( qt_xdisplay(), XkbUseCoreKbd, tqmask, tqmask);
+ XkbLockModifiers ( qt_xdisplay(), XkbUseCoreKbd, mask, mask);
return 1;
}
int xkb_set_off()
{
- unsigned int tqmask;
+ unsigned int mask;
if( !xkb_init())
return 0;
- tqmask = xkb_numlock_tqmask();
- if( tqmask == 0 )
+ mask = xkb_numlock_mask();
+ if( mask == 0 )
return 0;
- XkbLockModifiers ( qt_xdisplay(), XkbUseCoreKbd, tqmask, 0);
+ XkbLockModifiers ( qt_xdisplay(), XkbUseCoreKbd, mask, 0);
return 1;
}
#endif
@@ -347,10 +347,10 @@ int xkb_set_off()
int xtest_get_numlock_state()
{
int i;
- int numlock_tqmask = 0;
+ int numlock_mask = 0;
Window dummy1, dummy2;
int dummy3, dummy4, dummy5, dummy6;
- unsigned int tqmask;
+ unsigned int mask;
KeyCode numlock_keycode = XKeysymToKeycode( qt_xdisplay(), XK_Num_Lock );
if( numlock_keycode == NoSymbol )
return 0;
@@ -360,12 +360,12 @@ int xtest_get_numlock_state()
++i )
{
if( map->modifiermap[ map->max_keypermod * i ] == numlock_keycode )
- numlock_tqmask = 1 << i;
+ numlock_mask = 1 << i;
}
XQueryPointer( qt_xdisplay(), DefaultRootWindow( qt_xdisplay() ), &dummy1, &dummy2,
- &dummy3, &dummy4, &dummy5, &dummy6, &tqmask );
+ &dummy3, &dummy4, &dummy5, &dummy6, &mask );
XFreeModifiermap( map );
- return tqmask & numlock_tqmask;
+ return mask & numlock_mask;
}
void xtest_change_numlock()
diff --git a/kxkb/kcmmiscwidget.ui b/kxkb/kcmmiscwidget.ui
index ac0f3ca13..479188293 100644
--- a/kxkb/kcmmiscwidget.ui
+++ b/kxkb/kcmmiscwidget.ui
@@ -4,7 +4,7 @@
<property name="name">
<cstring>KeyboardConfigWidget</cstring>
</property>
- <property name="tqgeometry">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@@ -339,6 +339,6 @@
<include location="global" impldecl="in implementation">kdialog.h</include>
<include location="global" impldecl="in implementation">knuminput.h</include>
</includes>
-<tqlayoutdefaults spacing="6" margin="11"/>
-<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<layoutdefaults spacing="6" margin="11"/>
+<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
</UI>
diff --git a/kxkb/keyboard.desktop b/kxkb/keyboard.desktop
index 5840d629f..893d92d36 100644
--- a/kxkb/keyboard.desktop
+++ b/kxkb/keyboard.desktop
@@ -198,7 +198,7 @@ Keywords[hr]=Keyboard,Keyboard repeat,Click volume,Input Devices,repeat,volme,Ti
Keywords[hu]=billentyűzet,billentyűismétlés,leütési hang,beviteli eszközök,ismétlés,hangerő
Keywords[id]=Keyboard,Pengulangan keyboard,Volume klik,Divais Input,repeat,volume
Keywords[is]=Lyklaborð,inntakstæki,endurtekning,útlit,alþjóðlegt
-Keywords[it]=tastiera,ripetizione dei tasti,volume del clic,dispositivi di input,tqlayout,volume
+Keywords[it]=tastiera,ripetizione dei tasti,volume del clic,dispositivi di input,layout,volume
Keywords[ja]=キーボード,キーボードリピート,クリック音量,入力デバイス,リピート,音量
Keywords[km]=ក្ដារចុច,ធ្វើ​ក្ដារចុច​ម្ដង​ទៀត,សំឡេង​ចុច,ឧបករណ៍​ព័ត៌មាន​បញ្ចូល,ធ្វើ​ម្ដង​ទៀត,សំឡេង
Keywords[lo]=ແປ້ນພິມ ,ການຈັດວາງແປ້ນພິມ,ອຸປະກອນຂໍ້ມູນເຂົ້າ
diff --git a/kxkb/keyboard_layout.desktop b/kxkb/keyboard_layout.desktop
index 0d60fe66e..2ba997aa0 100644
--- a/kxkb/keyboard_layout.desktop
+++ b/kxkb/keyboard_layout.desktop
@@ -1,12 +1,12 @@
[Desktop Entry]
-Exec=kcmshell keyboard_tqlayout
+Exec=kcmshell keyboard_layout
Icon=keyboard
Type=Application
DocPath=kxkb/index.html
X-KDE-ModuleType=Library
X-KDE-Library=keyboard
-X-KDE-FactoryName=keyboard_tqlayout
+X-KDE-FactoryName=keyboard_layout
X-KDE-ParentApp=kcontrol
Name=Keyboard Layout
@@ -22,8 +22,8 @@ Name[ca]=Disposició del teclat
Name[cs]=Rozvržení klávesnice
Name[csb]=Ùstôw klawiaturë
Name[cy]=Cynllun Bysellfwrdd
-Name[da]=Tastaturtqlayout
-Name[de]=Tastaturtqlayout
+Name[da]=Tastaturlayout
+Name[de]=Tastaturlayout
Name[el]=Διάταξη πληκτρολογίου
Name[eo]=Klavararanĝo
Name[es]=Disposición del teclado
@@ -72,7 +72,7 @@ Name[sk]=Rozloženie klávesnice
Name[sl]=Razpored tipk
Name[sr]=Распоред тастера
Name[sr@Latn]=Raspored tastera
-Name[sv]=Tangentbordstqlayout
+Name[sv]=Tangentbordslayout
Name[ta]=விசைப்பலகை உருவரை
Name[te]=కీబోర్డ్ కూర్పు
Name[tg]=Тарҳбандии забонак
@@ -102,7 +102,7 @@ Comment[ca]=Disposició del teclat
Comment[cs]=Rozvržení klávesnice
Comment[csb]=Ùstôw klawiaturë
Comment[cy]=Haenlun Bysellfwrdd
-Comment[da]=Tastaturtqlayout
+Comment[da]=Tastaturlayout
Comment[de]=Tastaturbelegung
Comment[el]=Διάταξη πληκτρολογίου
Comment[eo]=Klavararanĝo
@@ -150,7 +150,7 @@ Comment[sk]=Rozloženie klávesnice
Comment[sl]=Razpored tipk
Comment[sr]=Распоред тастера
Comment[sr@Latn]=Raspored tastera
-Comment[sv]=Anpassa tangentbordets tqlayout
+Comment[sv]=Anpassa tangentbordets layout
Comment[ta]=விசைப்பலகை உருவரை
Comment[te]=కీబోర్డ్ కూర్పు
Comment[tg]=Тарҳбандии забонак
@@ -186,12 +186,12 @@ Keywords[eu]=Teklatua,Diseinua,Nazio artekoa
Keywords[fa]=صفحه کلید، طرح‌بندی، بین‌المللی
Keywords[fi]=Näppäimistö,Näppäimistön järjestys,Kansainvälinen
Keywords[fr]=clavier,disposition du clavier,périphériques d'entrée,International
-Keywords[fy]=keyboard,toetsenbord,toetseboerd,keyboard tqlayout,toetseboerdyndieling,toetsenbordindeling,input devices,invoerapparaten,ynfierapparaten,randapparaten
+Keywords[fy]=keyboard,toetsenbord,toetseboerd,keyboard layout,toetseboerdyndieling,toetsenbordindeling,input devices,invoerapparaten,ynfierapparaten,randapparaten
Keywords[ga]=Méarchlár,Leagan Amach,Idirnáisiúnta
Keywords[gl]=Teclado,Tipo de teclado,Internacional
Keywords[he]=מקלדת,פריסה,בינלאומי, Keyboard,Layout,International
Keywords[hi]=कुंजीपट,ख़ाका,अंतर्राष्ट्रीय
-Keywords[hr]=Keyboard,Keyboard tqlayout,Input Devices,Tipkovnica,Raspored tipkovnice,Međunarodno
+Keywords[hr]=Keyboard,Keyboard layout,Input Devices,Tipkovnica,Raspored tipkovnice,Međunarodno
Keywords[hu]=billentyűzet,kiosztás,nemzetközi
Keywords[is]=Lyklaborð,inntakstæki,alþjóðlegt
Keywords[it]=tastiera,mappatura,internazionale
@@ -206,7 +206,7 @@ Keywords[mt]=Tastiera,Keyboard,Tqassim tal-keyboard,Input Devices
Keywords[nb]=tastatur,tasteoppsett,oppsett,språk,internasjonal
Keywords[nds]=Tastatuur,Tasttoornen,Layout,Internatschonaal
Keywords[ne]=कुञ्जीपाटी, सजावट, अन्तरराष्ट्रिय
-Keywords[nl]=keyboard,toetsenbord,keyboard tqlayout,toetsenbordindeling,input devices,invoerapparaten,randapparaten
+Keywords[nl]=keyboard,toetsenbord,keyboard layout,toetsenbordindeling,input devices,invoerapparaten,randapparaten
Keywords[nn]=tastatur,tasteoppsett,oppsett,språk,internasjonal
Keywords[nso]=Keyboard,Peakanyo,Boditshabatshaba
Keywords[pa]=ਕੀ-ਬੋਰਡ,ਖਾਕਾ,ਅੰਤਰਰਾਸ਼ਟਰੀ
diff --git a/kxkb/kxkb.cpp b/kxkb/kxkb.cpp
index 576ddf4a0..43e9f8046 100644
--- a/kxkb/kxkb.cpp
+++ b/kxkb/kxkb.cpp
@@ -72,12 +72,12 @@ KXKBApp::KXKBApp(bool allowStyles, bool GUIenabled)
::exit(1);
}
- // keep in sync with kcmtqlayout.cpp
+ // keep in sync with kcmlayout.cpp
keys = new KGlobalAccel(this);
#include "kxkbbindings.cpp"
keys->updateConnections();
- m_tqlayoutOwnerMap = new LayoutMap(kxkbConfig);
+ m_layoutOwnerMap = new LayoutMap(kxkbConfig);
connect( this, TQT_SIGNAL(settingsChanged(int)), TQT_SLOT(slotSettingsChanged(int)) );
addKipcEventMask( KIPC::SettingsChanged );
@@ -92,7 +92,7 @@ KXKBApp::~KXKBApp()
delete m_tray;
delete m_rules;
delete m_extension;
- delete m_tqlayoutOwnerMap;
+ delete m_layoutOwnerMap;
delete kWinModule;
}
@@ -101,7 +101,7 @@ int KXKBApp::newInstance()
m_extension->reset();
if( settingsRead() )
- tqlayoutApply();
+ layoutApply();
return 0;
}
@@ -143,29 +143,29 @@ bool KXKBApp::settingsRead()
kdDebug() << "Active window " << m_prevWinId << endl;
}
- m_tqlayoutOwnerMap->reset();
- m_tqlayoutOwnerMap->setCurrentWindow( m_prevWinId );
+ m_layoutOwnerMap->reset();
+ m_layoutOwnerMap->setCurrentWindow( m_prevWinId );
if( m_rules == NULL )
m_rules = new XkbRules(false);
- for(int ii=0; ii<(int)kxkbConfig.m_tqlayouts.count(); ii++) {
- LayoutUnit& tqlayoutUnit = kxkbConfig.m_tqlayouts[ii];
- tqlayoutUnit.defaultGroup = m_rules->getDefaultGroup(tqlayoutUnit.tqlayout, tqlayoutUnit.includeGroup);
- kdDebug() << "default group for " << tqlayoutUnit.toPair() << " is " << tqlayoutUnit.defaultGroup << endl;
+ for(int ii=0; ii<(int)kxkbConfig.m_layouts.count(); ii++) {
+ LayoutUnit& layoutUnit = kxkbConfig.m_layouts[ii];
+ layoutUnit.defaultGroup = m_rules->getDefaultGroup(layoutUnit.layout, layoutUnit.includeGroup);
+ kdDebug() << "default group for " << layoutUnit.toPair() << " is " << layoutUnit.defaultGroup << endl;
}
m_currentLayout = kxkbConfig.getDefaultLayout();
- if( kxkbConfig.m_tqlayouts.count() == 1 ) {
- TQString tqlayoutName = m_currentLayout.tqlayout;
+ if( kxkbConfig.m_layouts.count() == 1 ) {
+ TQString layoutName = m_currentLayout.layout;
TQString variantName = m_currentLayout.variant;
TQString includeName = m_currentLayout.includeGroup;
int group = m_currentLayout.defaultGroup;
- if( !m_extension->setLayout(kxkbConfig.m_model, tqlayoutName, variantName, includeName, false)
+ if( !m_extension->setLayout(kxkbConfig.m_model, layoutName, variantName, includeName, false)
|| !m_extension->setGroup( group ) ) {
- kdDebug() << "Error switching to single tqlayout " << m_currentLayout.toPair() << endl;
+ kdDebug() << "Error switching to single layout " << m_currentLayout.toPair() << endl;
// TODO: alert user
}
@@ -201,51 +201,51 @@ void KXKBApp::initTray()
}
m_tray->setShowFlag(kxkbConfig.m_showFlag);
- m_tray->initLayoutList(kxkbConfig.m_tqlayouts, *m_rules);
+ m_tray->initLayoutList(kxkbConfig.m_layouts, *m_rules);
m_tray->setCurrentLayout(m_currentLayout);
m_tray->show();
}
-// This function activates the keyboard tqlayout specified by the
+// This function activates the keyboard layout specified by the
// configuration members (m_currentLayout)
-void KXKBApp::tqlayoutApply()
+void KXKBApp::layoutApply()
{
setLayout(m_currentLayout);
}
// kdcop
-bool KXKBApp::setLayout(const TQString& tqlayoutPair)
+bool KXKBApp::setLayout(const TQString& layoutPair)
{
- const LayoutUnit tqlayoutUnitKey(tqlayoutPair);
- if( kxkbConfig.m_tqlayouts.tqcontains(tqlayoutUnitKey) ) {
- return setLayout( *kxkbConfig.m_tqlayouts.find(tqlayoutUnitKey) );
+ const LayoutUnit layoutUnitKey(layoutPair);
+ if( kxkbConfig.m_layouts.contains(layoutUnitKey) ) {
+ return setLayout( *kxkbConfig.m_layouts.find(layoutUnitKey) );
}
return false;
}
-// Activates the keyboard tqlayout specified by 'tqlayoutUnit'
-bool KXKBApp::setLayout(const LayoutUnit& tqlayoutUnit, int group)
+// Activates the keyboard layout specified by 'layoutUnit'
+bool KXKBApp::setLayout(const LayoutUnit& layoutUnit, int group)
{
bool res = false;
if( group == -1 )
- group = tqlayoutUnit.defaultGroup;
+ group = layoutUnit.defaultGroup;
res = m_extension->setLayout(kxkbConfig.m_model,
- tqlayoutUnit.tqlayout, tqlayoutUnit.variant,
- tqlayoutUnit.includeGroup);
+ layoutUnit.layout, layoutUnit.variant,
+ layoutUnit.includeGroup);
if( res )
m_extension->setGroup(group); // not checking for ret - not important
if( res )
- m_currentLayout = tqlayoutUnit;
+ m_currentLayout = layoutUnit;
if (m_tray) {
if( res )
- m_tray->setCurrentLayout(tqlayoutUnit);
+ m_tray->setCurrentLayout(layoutUnit);
else
- m_tray->setError(tqlayoutUnit.toPair());
+ m_tray->setError(layoutUnit.toPair());
}
return res;
@@ -253,23 +253,23 @@ bool KXKBApp::setLayout(const LayoutUnit& tqlayoutUnit, int group)
void KXKBApp::toggled()
{
- const LayoutUnit& tqlayout = m_tqlayoutOwnerMap->getNextLayout().tqlayoutUnit;
- setLayout(tqlayout);
+ const LayoutUnit& layout = m_layoutOwnerMap->getNextLayout().layoutUnit;
+ setLayout(layout);
}
void KXKBApp::menuActivated(int id)
{
if( KxkbLabelController::START_MENU_ID <= id
- && id < KxkbLabelController::START_MENU_ID + (int)kxkbConfig.m_tqlayouts.count() )
+ && id < KxkbLabelController::START_MENU_ID + (int)kxkbConfig.m_layouts.count() )
{
- const LayoutUnit& tqlayout = kxkbConfig.m_tqlayouts[id - KxkbLabelController::START_MENU_ID];
- m_tqlayoutOwnerMap->setCurrentLayout( tqlayout );
- setLayout( tqlayout );
+ const LayoutUnit& layout = kxkbConfig.m_layouts[id - KxkbLabelController::START_MENU_ID];
+ m_layoutOwnerMap->setCurrentLayout( layout );
+ setLayout( layout );
}
else if (id == KxkbLabelController::CONFIG_MENU_ID)
{
KProcess p;
- p << "kcmshell" << "keyboard_tqlayout";
+ p << "kcmshell" << "keyboard_layout";
p.start(KProcess::DontCare);
}
else if (id == KxkbLabelController::HELP_MENU_ID)
@@ -295,25 +295,25 @@ void KXKBApp::windowChanged(WId winId)
kdDebug() << "old WinId: " << m_prevWinId << ", new WinId: " << winId << endl;
- if( m_prevWinId != X11Helper::UNKNOWN_WINDOW_ID ) { // saving tqlayout/group from previous window
+ if( m_prevWinId != X11Helper::UNKNOWN_WINDOW_ID ) { // saving layout/group from previous window
// kdDebug() << "storing " << m_currentLayout.toPair() << ":" << group << " for " << m_prevWinId << endl;
-// m_tqlayoutOwnerMap->setCurrentWindow(m_prevWinId);
- m_tqlayoutOwnerMap->setCurrentLayout(m_currentLayout);
- m_tqlayoutOwnerMap->setCurrentGroup(group);
+// m_layoutOwnerMap->setCurrentWindow(m_prevWinId);
+ m_layoutOwnerMap->setCurrentLayout(m_currentLayout);
+ m_layoutOwnerMap->setCurrentGroup(group);
}
m_prevWinId = winId;
if( winId != X11Helper::UNKNOWN_WINDOW_ID ) {
- m_tqlayoutOwnerMap->setCurrentWindow(winId);
- const LayoutState& tqlayoutState = m_tqlayoutOwnerMap->getCurrentLayout();
+ m_layoutOwnerMap->setCurrentWindow(winId);
+ const LayoutState& layoutState = m_layoutOwnerMap->getCurrentLayout();
- if( tqlayoutState.tqlayoutUnit != m_currentLayout ) {
- kdDebug() << "switching to " << tqlayoutState.tqlayoutUnit.toPair() << ":" << group << " for " << winId << endl;
- setLayout( tqlayoutState.tqlayoutUnit, tqlayoutState.group );
+ if( layoutState.layoutUnit != m_currentLayout ) {
+ kdDebug() << "switching to " << layoutState.layoutUnit.toPair() << ":" << group << " for " << winId << endl;
+ setLayout( layoutState.layoutUnit, layoutState.group );
}
- else if( tqlayoutState.group != group ) { // we need to change only the group
- m_extension->setGroup(tqlayoutState.group);
+ else if( layoutState.group != group ) { // we need to change only the group
+ m_extension->setGroup(layoutState.group);
}
}
}
@@ -331,18 +331,18 @@ void KXKBApp::slotSettingsChanged(int category)
/*
Viki (onscreen keyboard) has problems determining some modifiers states
- when kxkb uses precompiled tqlayouts instead of setxkbmap. Probably a bug
- in the xkb functions used for the precompiled tqlayouts *shrug*.
+ when kxkb uses precompiled layouts instead of setxkbmap. Probably a bug
+ in the xkb functions used for the precompiled layouts *shrug*.
*/
void KXKBApp::forceSetXKBMap( bool set )
{
if( m_forceSetXKBMap == set )
return;
m_forceSetXKBMap = set;
- tqlayoutApply();
+ layoutApply();
}
-/*Precompiles the keyboard tqlayouts for faster activation later.
+/*Precompiles the keyboard layouts for faster activation later.
This is done by loading each one of them and then dumping the compiled
map from the X server into our local buffer.*/
// void KXKBApp::initPrecompiledLayouts()
@@ -350,20 +350,20 @@ map from the X server into our local buffer.*/
// TQStringList dirs = KGlobal::dirs()->findDirs ( "tmp", "" );
// TQString tempDir = dirs.count() == 0 ? "/tmp/" : dirs[0];
//
-// TQValueList<LayoutUnit>::ConstIterator end = kxkbConfig.m_tqlayouts.end();
+// TQValueList<LayoutUnit>::ConstIterator end = kxkbConfig.m_layouts.end();
//
-// for (TQValueList<LayoutUnit>::ConstIterator it = kxkbConfig.m_tqlayouts.begin(); it != end; ++it)
+// for (TQValueList<LayoutUnit>::ConstIterator it = kxkbConfig.m_layouts.begin(); it != end; ++it)
// {
-// LayoutUnit tqlayoutUnit(*it);
-// // const char* baseGr = m_includes[tqlayout];
-// // int group = m_rules->getGroup(tqlayout, baseGr);
-// // if( m_extension->setLayout(m_model, tqlayout, m_variants[tqlayout], group, baseGr) ) {
-// TQString compiledLayoutFileName = tempDir + tqlayoutUnit.tqlayout + "." + tqlayoutUnit.variant + ".xkm";
+// LayoutUnit layoutUnit(*it);
+// // const char* baseGr = m_includes[layout];
+// // int group = m_rules->getGroup(layout, baseGr);
+// // if( m_extension->setLayout(m_model, layout, m_variants[layout], group, baseGr) ) {
+// TQString compiledLayoutFileName = tempDir + layoutUnit.layout + "." + layoutUnit.variant + ".xkm";
// // if( m_extension->getCompiledLayout(compiledLayoutFileName) )
-// m_compiledLayoutFileNames[tqlayoutUnit.toPair()] = compiledLayoutFileName;
+// m_compiledLayoutFileNames[layoutUnit.toPair()] = compiledLayoutFileName;
// // }
// // else {
-// // kdDebug() << "Error precompiling tqlayout " << tqlayout << endl;
+// // kdDebug() << "Error precompiling layout " << layout << endl;
// // }
// }
// }
diff --git a/kxkb/kxkb.desktop b/kxkb/kxkb.desktop
index a68d98d0d..283e0a663 100644
--- a/kxkb/kxkb.desktop
+++ b/kxkb/kxkb.desktop
@@ -13,7 +13,7 @@ Name[cs]=Nástroj k nastavení klávesnice
Name[csb]=Nôrzãdze mapòwaniô klawiaturë
Name[cy]=Erfyn Map Bysellfwrdd
Name[da]=Tastaturkortværktøj
-Name[de]=Dienstprogramm zum Tastaturtqlayout
+Name[de]=Dienstprogramm zum Tastaturlayout
Name[el]=Εργαλείο χάρτη πληκτρολογίου
Name[eo]=Klavararanĝilo
Name[es]=Redefinición del teclado
@@ -62,7 +62,7 @@ Name[sk]=Nástroj pre rozloženie kláves
Name[sl]=Razpored tipk
Name[sr]=Алат за мапирање тастатуре
Name[sr@Latn]=Alat za mapiranje tastature
-Name[sv]=Verktyg för tangentbordstqlayout
+Name[sv]=Verktyg för tangentbordslayout
Name[ta]=விசைப்பலகை குறுக்குவழி கருவி
Name[tg]=Обзори нақшаи сафҳаи калид
Name[th]=เครื่องมือจัดตารางปุ่มพิมพ์
diff --git a/kxkb/kxkb.h b/kxkb/kxkb.h
index fafb26eb3..fc05c620a 100644
--- a/kxkb/kxkb.h
+++ b/kxkb/kxkb.h
@@ -44,7 +44,7 @@ class KWinModule;
class LayoutMap;
/* This is the main Kxkb class responsible for reading options
- and switching tqlayouts
+ and switching layouts
*/
class KXKBApp : public KUniqueApplication
@@ -58,9 +58,9 @@ public:
virtual int newInstance();
- bool setLayout(const LayoutUnit& tqlayoutUnit, int group=-1);
+ bool setLayout(const LayoutUnit& layoutUnit, int group=-1);
k_dcop:
- bool setLayout(const TQString& tqlayoutPair);
+ bool setLayout(const TQString& layoutPair);
TQString getCurrentLayout() { return m_currentLayout.toPair(); }
TQStringList getLayoutsList() { return kxkbConfig.getLayoutStringList(); }
void forceSetXKBMap( bool set );
@@ -75,7 +75,7 @@ protected slots:
protected:
// Read settings, and apply them.
bool settingsRead();
- void tqlayoutApply();
+ void layoutApply();
private:
void initTray();
@@ -84,7 +84,7 @@ private:
KxkbConfig kxkbConfig;
WId m_prevWinId; // for tricky part of saving xkb group
- LayoutMap* m_tqlayoutOwnerMap;
+ LayoutMap* m_layoutOwnerMap;
LayoutUnit m_currentLayout;
diff --git a/kxkb/kxkbconfig.cpp b/kxkb/kxkbconfig.cpp
index 0b285b869..0e62fbc21 100644
--- a/kxkb/kxkbconfig.cpp
+++ b/kxkb/kxkbconfig.cpp
@@ -32,10 +32,10 @@ const char* DEFAULT_MODEL = "pc104";
LayoutUnit KxkbConfig::getDefaultLayout()
{
- if( m_tqlayouts.size() == 0 )
+ if( m_layouts.size() == 0 )
return DEFAULT_LAYOUT_UNIT;
- return m_tqlayouts[0];
+ return m_layouts[0];
}
bool KxkbConfig::load(int loadMode)
@@ -43,7 +43,7 @@ bool KxkbConfig::load(int loadMode)
KConfig *config = new KConfig("kxkbrc", true, false);
config->setGroup("Layout");
-// Even if the tqlayouts have been disabled we still want to set Xkb options
+// 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
m_enableXkbOptions = config->readBoolEntry("EnableXkbOptions", false);
@@ -63,33 +63,33 @@ bool KxkbConfig::load(int loadMode)
m_model = config->readEntry("Model", DEFAULT_MODEL);
kdDebug() << "Model: " << m_model << endl;
- TQStringList tqlayoutList;
+ TQStringList layoutList;
if( config->hasKey("LayoutList") ) {
- tqlayoutList = config->readListEntry("LayoutList");
+ layoutList = config->readListEntry("LayoutList");
}
else { // old config
TQString mainLayout = config->readEntry("Layout", DEFAULT_LAYOUT_UNIT.toPair());
- tqlayoutList = config->readListEntry("Additional");
- tqlayoutList.prepend(mainLayout);
+ layoutList = config->readListEntry("Additional");
+ layoutList.prepend(mainLayout);
}
- if( tqlayoutList.count() == 0 )
- tqlayoutList.append("us");
+ if( layoutList.count() == 0 )
+ layoutList.append("us");
- m_tqlayouts.clear();
- for(TQStringList::ConstIterator it = tqlayoutList.begin(); it != tqlayoutList.end() ; ++it) {
- m_tqlayouts.append( LayoutUnit(*it) );
- kdDebug() << " tqlayout " << LayoutUnit(*it).toPair() << " in list: " << m_tqlayouts.tqcontains( LayoutUnit(*it) ) << endl;
+ m_layouts.clear();
+ for(TQStringList::ConstIterator it = layoutList.begin(); it != layoutList.end() ; ++it) {
+ m_layouts.append( LayoutUnit(*it) );
+ kdDebug() << " layout " << LayoutUnit(*it).toPair() << " in list: " << m_layouts.contains( LayoutUnit(*it) ) << endl;
}
- kdDebug() << "Found " << m_tqlayouts.count() << " tqlayouts, default is " << getDefaultLayout().toPair() << endl;
+ kdDebug() << "Found " << m_layouts.count() << " layouts, default is " << getDefaultLayout().toPair() << endl;
TQStringList displayNamesList = config->readListEntry("DisplayNames", ',');
for(TQStringList::ConstIterator it = displayNamesList.begin(); it != displayNamesList.end() ; ++it) {
TQStringList displayNamePair = TQStringList::split(':', *it );
if( displayNamePair.count() == 2 ) {
- LayoutUnit tqlayoutUnit( displayNamePair[0] );
- if( m_tqlayouts.tqcontains( tqlayoutUnit ) ) {
- m_tqlayouts[m_tqlayouts.findIndex(tqlayoutUnit)].displayName = displayNamePair[1].left(3);
+ LayoutUnit layoutUnit( displayNamePair[0] );
+ if( m_layouts.contains( layoutUnit ) ) {
+ m_layouts[m_layouts.findIndex(layoutUnit)].displayName = displayNamePair[1].left(3);
}
}
}
@@ -101,9 +101,9 @@ bool KxkbConfig::load(int loadMode)
for(TQStringList::ConstIterator it = includeList.begin(); it != includeList.end() ; ++it) {
TQStringList includePair = TQStringList::split(':', *it );
if( includePair.count() == 2 ) {
- LayoutUnit tqlayoutUnit( includePair[0] );
- if( m_tqlayouts.tqcontains( tqlayoutUnit ) ) {
- m_tqlayouts[m_tqlayouts.findIndex(tqlayoutUnit)].includeGroup = includePair[1];
+ LayoutUnit layoutUnit( includePair[0] );
+ if( m_layouts.contains( layoutUnit ) ) {
+ m_layouts[m_layouts.findIndex(layoutUnit)].includeGroup = includePair[1];
kdDebug() << "Got inc group: " << includePair[0] << ": " << includePair[1] << endl;
}
}
@@ -113,13 +113,13 @@ bool KxkbConfig::load(int loadMode)
kdDebug() << "Old includes..." << endl;
TQStringList includeList = config->readListEntry("Includes");
for(TQStringList::ConstIterator it = includeList.begin(); it != includeList.end() ; ++it) {
- TQString tqlayoutName = LayoutUnit::parseLayout( *it );
- LayoutUnit tqlayoutUnit( tqlayoutName, "" );
- kdDebug() << "old tqlayout for inc: " << tqlayoutUnit.toPair() << " included " << m_tqlayouts.tqcontains( tqlayoutUnit ) << endl;
- if( m_tqlayouts.tqcontains( tqlayoutUnit ) ) {
+ TQString layoutName = LayoutUnit::parseLayout( *it );
+ LayoutUnit layoutUnit( layoutName, "" );
+ kdDebug() << "old layout for inc: " << layoutUnit.toPair() << " included " << m_layouts.contains( layoutUnit ) << endl;
+ if( m_layouts.contains( layoutUnit ) ) {
TQString variantName = LayoutUnit::parseVariant(*it);
- m_tqlayouts[m_tqlayouts.findIndex(tqlayoutUnit)].includeGroup = variantName;
- kdDebug() << "Got inc group: " << tqlayoutUnit.toPair() << ": " << variantName << endl;
+ m_layouts[m_layouts.findIndex(layoutUnit)].includeGroup = variantName;
+ kdDebug() << "Got inc group: " << layoutUnit.toPair() << ": " << variantName << endl;
}
}
}
@@ -128,24 +128,24 @@ bool KxkbConfig::load(int loadMode)
m_showSingle = config->readBoolEntry("ShowSingle", false);
m_showFlag = config->readBoolEntry("ShowFlag", true);
- TQString tqlayoutOwner = config->readEntry("SwitchMode", "Global");
+ TQString layoutOwner = config->readEntry("SwitchMode", "Global");
- if( tqlayoutOwner == "WinClass" ) {
+ if( layoutOwner == "WinClass" ) {
m_switchingPolicy = SWITCH_POLICY_WIN_CLASS;
}
- else if( tqlayoutOwner == "Window" ) {
+ else if( layoutOwner == "Window" ) {
m_switchingPolicy = SWITCH_POLICY_WINDOW;
}
- else /*if( tqlayoutOwner == "Global" )*/ {
+ else /*if( layoutOwner == "Global" )*/ {
m_switchingPolicy = SWITCH_POLICY_GLOBAL;
}
- if( m_tqlayouts.count() < 2 && m_switchingPolicy != SWITCH_POLICY_GLOBAL ) {
+ if( m_layouts.count() < 2 && m_switchingPolicy != SWITCH_POLICY_GLOBAL ) {
kdWarning() << "Layout count is less than 2, using Global switching policy" << endl;
m_switchingPolicy = SWITCH_POLICY_GLOBAL;
}
- kdDebug() << "Layout owner mode " << tqlayoutOwner << endl;
+ kdDebug() << "Layout owner mode " << layoutOwner << endl;
m_stickySwitching = config->readBoolEntry("StickySwitching", false);
m_stickySwitchingDepth = config->readEntry("StickySwitchingDepth", "2").toInt();
@@ -153,14 +153,14 @@ bool KxkbConfig::load(int loadMode)
m_stickySwitchingDepth = 2;
if( m_stickySwitching == true ) {
- if( m_tqlayouts.count() < 3 ) {
+ if( m_layouts.count() < 3 ) {
kdWarning() << "Layout count is less than 3, sticky switching will be off" << endl;
m_stickySwitching = false;
}
else
- if( (int)m_tqlayouts.count() - 1 < m_stickySwitchingDepth ) {
- kdWarning() << "Sticky switching depth is more than tqlayout count -1, adjusting..." << endl;
- m_stickySwitchingDepth = m_tqlayouts.count() - 1;
+ if( (int)m_layouts.count() - 1 < m_stickySwitchingDepth ) {
+ kdWarning() << "Sticky switching depth is more than layout count -1, adjusting..." << endl;
+ m_stickySwitchingDepth = m_layouts.count() - 1;
}
}
@@ -180,31 +180,31 @@ void KxkbConfig::save()
config->writeEntry("ResetOldOptions", m_resetOldOptions);
config->writeEntry("Options", m_options );
- TQStringList tqlayoutList;
+ TQStringList layoutList;
TQStringList includeList;
TQStringList displayNamesList;
TQValueList<LayoutUnit>::ConstIterator it;
- for(it = m_tqlayouts.begin(); it != m_tqlayouts.end(); ++it) {
- const LayoutUnit& tqlayoutUnit = *it;
+ for(it = m_layouts.begin(); it != m_layouts.end(); ++it) {
+ const LayoutUnit& layoutUnit = *it;
- tqlayoutList.append( tqlayoutUnit.toPair() );
+ layoutList.append( layoutUnit.toPair() );
- if( tqlayoutUnit.includeGroup.isEmpty() == false ) {
- TQString incGroupUnit = TQString("%1:%2").arg(tqlayoutUnit.toPair(), tqlayoutUnit.includeGroup);
+ if( layoutUnit.includeGroup.isEmpty() == false ) {
+ TQString incGroupUnit = TQString("%1:%2").arg(layoutUnit.toPair(), layoutUnit.includeGroup);
includeList.append( incGroupUnit );
}
- TQString displayName( tqlayoutUnit.displayName );
- kdDebug() << " displayName " << tqlayoutUnit.toPair() << " : " << displayName << endl;
- if( displayName.isEmpty() == false && displayName != tqlayoutUnit.tqlayout ) {
- displayName = TQString("%1:%2").arg(tqlayoutUnit.toPair(), displayName);
+ TQString displayName( layoutUnit.displayName );
+ kdDebug() << " displayName " << layoutUnit.toPair() << " : " << displayName << endl;
+ if( displayName.isEmpty() == false && displayName != layoutUnit.layout ) {
+ displayName = TQString("%1:%2").arg(layoutUnit.toPair(), displayName);
displayNamesList.append( displayName );
}
}
- config->writeEntry("LayoutList", tqlayoutList);
- kdDebug() << "Saving Layouts: " << tqlayoutList << endl;
+ config->writeEntry("LayoutList", layoutList);
+ kdDebug() << "Saving Layouts: " << layoutList << endl;
config->writeEntry("IncludeGroups", includeList);
kdDebug() << "Saving includeGroups: " << includeList << endl;
@@ -244,8 +244,8 @@ void KxkbConfig::setDefaults()
m_resetOldOptions = false;
m_options = "";
- m_tqlayouts.clear();
- m_tqlayouts.append( DEFAULT_LAYOUT_UNIT );
+ m_layouts.clear();
+ m_layouts.append( DEFAULT_LAYOUT_UNIT );
m_useKxkb = false;
m_showSingle = false;
@@ -259,12 +259,12 @@ void KxkbConfig::setDefaults()
TQStringList KxkbConfig::getLayoutStringList(/*bool compact*/)
{
- TQStringList tqlayoutList;
- for(TQValueList<LayoutUnit>::ConstIterator it = m_tqlayouts.begin(); it != m_tqlayouts.end(); ++it) {
- const LayoutUnit& tqlayoutUnit = *it;
- tqlayoutList.append( tqlayoutUnit.toPair() );
+ TQStringList layoutList;
+ for(TQValueList<LayoutUnit>::ConstIterator it = m_layouts.begin(); it != m_layouts.end(); ++it) {
+ const LayoutUnit& layoutUnit = *it;
+ layoutList.append( layoutUnit.toPair() );
}
- return tqlayoutList;
+ return layoutList;
}
@@ -291,21 +291,21 @@ TQString KxkbConfig::getDefaultDisplayName(const TQString& code_)
return displayName;
}
-TQString KxkbConfig::getDefaultDisplayName(const LayoutUnit& tqlayoutUnit, bool single)
+TQString KxkbConfig::getDefaultDisplayName(const LayoutUnit& layoutUnit, bool single)
{
- if( tqlayoutUnit.variant == "" )
- return getDefaultDisplayName( tqlayoutUnit.tqlayout );
+ if( layoutUnit.variant == "" )
+ return getDefaultDisplayName( layoutUnit.layout );
- TQString displayName = tqlayoutUnit.tqlayout.left(2);
+ TQString displayName = layoutUnit.layout.left(2);
if( single == false )
- displayName += tqlayoutUnit.variant.left(1);
+ displayName += layoutUnit.variant.left(1);
return displayName;
}
/**
- * @brief Gets the single tqlayout part of a tqlayout(variant) string
- * @param[in] layvar String in form tqlayout(variant) to parse
- * @return The tqlayout found in the string
+ * @brief Gets the single layout part of a layout(variant) string
+ * @param[in] layvar String in form layout(variant) to parse
+ * @return The layout found in the string
*/
const TQString LayoutUnit::parseLayout(const TQString &layvar)
{
@@ -322,8 +322,8 @@ const TQString LayoutUnit::parseLayout(const TQString &layvar)
}
/**
- * @brief Gets the single variant part of a tqlayout(variant) string
- * @param[in] layvar String in form tqlayout(variant) to parse
+ * @brief Gets the single variant part of a layout(variant) string
+ * @param[in] layvar String in form layout(variant) to parse
* @return The variant found in the string, no check is performed
*/
const TQString LayoutUnit::parseVariant(const TQString &layvar)
diff --git a/kxkb/kxkbconfig.h b/kxkb/kxkbconfig.h
index 9668a33db..82fe610c9 100644
--- a/kxkb/kxkbconfig.h
+++ b/kxkb/kxkbconfig.h
@@ -18,7 +18,7 @@
#include <tqmap.h>
-/* Utility classes for per-window/per-application tqlayout implementation
+/* Utility classes for per-window/per-application layout implementation
*/
enum SwitchingPolicy {
SWITCH_POLICY_GLOBAL = 0,
@@ -37,7 +37,7 @@ inline TQString createPair(TQString key, TQString value)
}
struct LayoutUnit {
- TQString tqlayout;
+ TQString layout;
TQString variant;
TQString includeGroup;
TQString displayName;
@@ -45,8 +45,8 @@ struct LayoutUnit {
LayoutUnit() {}
- LayoutUnit(TQString tqlayout_, TQString variant_):
- tqlayout(tqlayout_),
+ LayoutUnit(TQString layout_, TQString variant_):
+ layout(layout_),
variant(variant_)
{}
@@ -55,26 +55,26 @@ struct LayoutUnit {
}
void setFromPair(const TQString& pair) {
- tqlayout = parseLayout(pair);
+ layout = parseLayout(pair);
variant = parseVariant(pair);
}
TQString toPair() const {
- return createPair(tqlayout, variant);
+ return createPair(layout, variant);
}
bool operator<(const LayoutUnit& lu) const {
- return tqlayout<lu.tqlayout ||
- (tqlayout==lu.tqlayout && variant<lu.variant);
+ return layout<lu.layout ||
+ (layout==lu.layout && variant<lu.variant);
}
bool operator!=(const LayoutUnit& lu) const {
- return tqlayout!=lu.tqlayout || variant!=lu.variant;
+ return layout!=lu.layout || variant!=lu.variant;
}
bool operator==(const LayoutUnit& lu) const {
-// kdDebug() << tqlayout << "==" << lu.tqlayout << "&&" << variant << "==" << lu.variant << endl;
- return tqlayout==lu.tqlayout && variant==lu.variant;
+// kdDebug() << layout << "==" << lu.layout << "&&" << variant << "==" << lu.variant << endl;
+ return layout==lu.layout && variant==lu.variant;
}
//private:
@@ -102,7 +102,7 @@ public:
TQString m_model;
TQString m_options;
- TQValueList<LayoutUnit> m_tqlayouts;
+ TQValueList<LayoutUnit> m_layouts;
LayoutUnit getDefaultLayout();
@@ -112,7 +112,7 @@ public:
TQStringList getLayoutStringList(/*bool compact*/);
static TQString getDefaultDisplayName(const TQString& code_);
- static TQString getDefaultDisplayName(const LayoutUnit& tqlayoutUnit, bool single=false);
+ static TQString getDefaultDisplayName(const LayoutUnit& layoutUnit, bool single=false);
private:
static const TQMap<TQString, TQString> parseIncludesMap(const TQStringList& pairList);
diff --git a/kxkb/kxkbtraywindow.cpp b/kxkb/kxkbtraywindow.cpp
index 38cc57231..749ef4353 100644
--- a/kxkb/kxkbtraywindow.cpp
+++ b/kxkb/kxkbtraywindow.cpp
@@ -48,23 +48,23 @@ void KxkbLabelController::setPixmap(const TQPixmap& pixmap)
}
-void KxkbLabelController::setCurrentLayout(const LayoutUnit& tqlayoutUnit)
+void KxkbLabelController::setCurrentLayout(const LayoutUnit& layoutUnit)
{
- setToolTip(m_descriptionMap[tqlayoutUnit.toPair()]);
- setPixmap( LayoutIcon::getInstance().findPixmap(tqlayoutUnit.tqlayout, m_showFlag, tqlayoutUnit.displayName) );
+ setToolTip(m_descriptionMap[layoutUnit.toPair()]);
+ setPixmap( LayoutIcon::getInstance().findPixmap(layoutUnit.layout, m_showFlag, layoutUnit.displayName) );
}
-void KxkbLabelController::setError(const TQString& tqlayoutInfo)
+void KxkbLabelController::setError(const TQString& layoutInfo)
{
- TQString msg = i18n("Error changing keyboard tqlayout to '%1'").arg(tqlayoutInfo);
+ TQString msg = i18n("Error changing keyboard layout to '%1'").arg(layoutInfo);
setToolTip(msg);
label->setPixmap(LayoutIcon::getInstance().findPixmap("error", m_showFlag));
}
-void KxkbLabelController::initLayoutList(const TQValueList<LayoutUnit>& tqlayouts, const XkbRules& rules)
+void KxkbLabelController::initLayoutList(const TQValueList<LayoutUnit>& layouts, const XkbRules& rules)
{
// KPopupMenu* menu = contextMenu();
TQPopupMenu* menu = contextMenu;
@@ -85,15 +85,15 @@ void KxkbLabelController::initLayoutList(const TQValueList<LayoutUnit>& tqlayout
int cnt = 0;
TQValueList<LayoutUnit>::ConstIterator it;
- for (it=tqlayouts.begin(); it != tqlayouts.end(); ++it)
+ for (it=layouts.begin(); it != layouts.end(); ++it)
{
- const TQString tqlayoutName = (*it).tqlayout;
+ const TQString layoutName = (*it).layout;
const TQString variantName = (*it).variant;
- const TQPixmap& tqlayoutPixmap = LayoutIcon::getInstance().findPixmap(tqlayoutName, m_showFlag, (*it).displayName);
- const TQPixmap pix = iconeffect.apply(tqlayoutPixmap, KIcon::Small, KIcon::DefaultState);
+ const TQPixmap& layoutPixmap = LayoutIcon::getInstance().findPixmap(layoutName, m_showFlag, (*it).displayName);
+ const TQPixmap pix = iconeffect.apply(layoutPixmap, KIcon::Small, KIcon::DefaultState);
- TQString fullName = i18n((rules.tqlayouts()[tqlayoutName]));
+ TQString fullName = i18n((rules.layouts()[layoutName]));
if( variantName.isEmpty() == false )
fullName += " (" + variantName + ")";
contextMenu->insertItem(pix, fullName, START_MENU_ID + cnt, m_menuStartIndex + cnt);
diff --git a/kxkb/kxkbtraywindow.h b/kxkb/kxkbtraywindow.h
index 66d1c7220..089a7906b 100644
--- a/kxkb/kxkbtraywindow.h
+++ b/kxkb/kxkbtraywindow.h
@@ -24,7 +24,7 @@ class TQLabel;
class TQPopupMenu;
class XkbRules;
-/* This class is responsible for displaying flag/label for the tqlayout,
+/* This class is responsible for displaying flag/label for the layout,
catching keyboard/mouse events and displaying menu when selected
*/
@@ -37,10 +37,10 @@ public:
KxkbLabelController(TQLabel *label, TQPopupMenu* contextMenu);
- void initLayoutList(const TQValueList<LayoutUnit>& tqlayouts, const XkbRules& rule);
- void setCurrentLayout(const LayoutUnit& tqlayout);
-// void setCurrentLayout(const TQString& tqlayout, const TQString &variant);
- void setError(const TQString& tqlayoutInfo="");
+ void initLayoutList(const TQValueList<LayoutUnit>& layouts, const XkbRules& rule);
+ void setCurrentLayout(const LayoutUnit& layout);
+// void setCurrentLayout(const TQString& layout, const TQString &variant);
+ void setError(const TQString& layoutInfo="");
void setShowFlag(bool showFlag) { m_showFlag = showFlag; }
void show() { label->show(); }
diff --git a/kxkb/layoutmap.cpp b/kxkb/layoutmap.cpp
index 93641d850..9c13fc49b 100644
--- a/kxkb/layoutmap.cpp
+++ b/kxkb/layoutmap.cpp
@@ -1,5 +1,5 @@
//
-// C++ Implementation: tqlayoutmap
+// C++ Implementation: layoutmap
//
// Description:
//
@@ -69,13 +69,13 @@ TQPtrQueue<LayoutState>& LayoutMap::getCurrentLayoutQueueInternal(WId winId)
//LayoutQueue&
TQPtrQueue<LayoutState>& LayoutMap::getCurrentLayoutQueue(WId winId)
{
- TQPtrQueue<LayoutState>& tqlayoutQueue = getCurrentLayoutQueueInternal(winId);
- if( tqlayoutQueue.count() == 0 ) {
- initLayoutQueue(tqlayoutQueue);
- kdDebug() << "map: Created queue for " << winId << " size: " << tqlayoutQueue.count() << endl;
+ TQPtrQueue<LayoutState>& layoutQueue = getCurrentLayoutQueueInternal(winId);
+ if( layoutQueue.count() == 0 ) {
+ initLayoutQueue(layoutQueue);
+ kdDebug() << "map: Created queue for " << winId << " size: " << layoutQueue.count() << endl;
}
- return tqlayoutQueue;
+ return layoutQueue;
}
LayoutState& LayoutMap::getCurrentLayout() {
@@ -83,50 +83,50 @@ LayoutState& LayoutMap::getCurrentLayout() {
}
LayoutState& LayoutMap::getNextLayout() {
- LayoutQueue& tqlayoutQueue = getCurrentLayoutQueue(m_currentWinId);
- LayoutState* tqlayoutState = tqlayoutQueue.dequeue();
- tqlayoutQueue.enqueue(tqlayoutState);
+ LayoutQueue& layoutQueue = getCurrentLayoutQueue(m_currentWinId);
+ LayoutState* layoutState = layoutQueue.dequeue();
+ layoutQueue.enqueue(layoutState);
- kdDebug() << "map: Next tqlayout: " << tqlayoutQueue.head()->tqlayoutUnit.toPair()
- << " group: " << tqlayoutQueue.head()->tqlayoutUnit.defaultGroup << " for " << m_currentWinId << endl;
+ kdDebug() << "map: Next layout: " << layoutQueue.head()->layoutUnit.toPair()
+ << " group: " << layoutQueue.head()->layoutUnit.defaultGroup << " for " << m_currentWinId << endl;
- return *tqlayoutQueue.head();
+ return *layoutQueue.head();
}
void LayoutMap::setCurrentGroup(int group) {
getCurrentLayout().group = group;
}
-void LayoutMap::setCurrentLayout(const LayoutUnit& tqlayoutUnit) {
- LayoutQueue& tqlayoutQueue = getCurrentLayoutQueue(m_currentWinId);
- kdDebug() << "map: Storing tqlayout: " << tqlayoutUnit.toPair()
- << " group: " << tqlayoutUnit.defaultGroup << " for " << m_currentWinId << endl;
+void LayoutMap::setCurrentLayout(const LayoutUnit& layoutUnit) {
+ LayoutQueue& layoutQueue = getCurrentLayoutQueue(m_currentWinId);
+ kdDebug() << "map: Storing layout: " << layoutUnit.toPair()
+ << " group: " << layoutUnit.defaultGroup << " for " << m_currentWinId << endl;
- int queueSize = (int)tqlayoutQueue.count();
+ int queueSize = (int)layoutQueue.count();
for(int ii=0; ii<queueSize; ii++) {
- if( tqlayoutQueue.head()->tqlayoutUnit == tqlayoutUnit )
+ if( layoutQueue.head()->layoutUnit == layoutUnit )
return; // if present return when it's in head
- LayoutState* tqlayoutState = tqlayoutQueue.dequeue();
+ LayoutState* layoutState = layoutQueue.dequeue();
if( ii < queueSize - 1 ) {
- tqlayoutQueue.enqueue(tqlayoutState);
+ layoutQueue.enqueue(layoutState);
}
else {
- delete tqlayoutState;
- tqlayoutQueue.enqueue(new LayoutState(tqlayoutUnit));
+ delete layoutState;
+ layoutQueue.enqueue(new LayoutState(layoutUnit));
}
}
for(int ii=0; ii<queueSize - 1; ii++) {
- LayoutState* tqlayoutState = tqlayoutQueue.dequeue();
- tqlayoutQueue.enqueue(tqlayoutState);
+ LayoutState* layoutState = layoutQueue.dequeue();
+ layoutQueue.enqueue(layoutState);
}
}
// private
-void LayoutMap::initLayoutQueue(LayoutQueue& tqlayoutQueue) {
+void LayoutMap::initLayoutQueue(LayoutQueue& layoutQueue) {
int queueSize = ( m_kxkbConfig.m_stickySwitching )
- ? m_kxkbConfig.m_stickySwitchingDepth : m_kxkbConfig.m_tqlayouts.count();
+ ? m_kxkbConfig.m_stickySwitchingDepth : m_kxkbConfig.m_layouts.count();
for(int ii=0; ii<queueSize; ii++) {
- tqlayoutQueue.enqueue( new LayoutState(m_kxkbConfig.m_tqlayouts[ii]) );
+ layoutQueue.enqueue( new LayoutState(m_kxkbConfig.m_layouts[ii]) );
}
}
diff --git a/kxkb/layoutmap.h b/kxkb/layoutmap.h
index 3a7197965..4be4cdfb2 100644
--- a/kxkb/layoutmap.h
+++ b/kxkb/layoutmap.h
@@ -1,5 +1,5 @@
//
-// C++ Interface: tqlayoutmap
+// C++ Interface: layoutmap
//
// Description:
//
@@ -26,14 +26,14 @@
// LayoutInfo is used for sticky switching and per-window/application switching policy
struct LayoutState {
- const LayoutUnit& tqlayoutUnit;
+ const LayoutUnit& layoutUnit;
int group;
- LayoutState(const LayoutUnit& tqlayoutUnit_):
- tqlayoutUnit(tqlayoutUnit_),
- group(tqlayoutUnit_.defaultGroup)
+ LayoutState(const LayoutUnit& layoutUnit_):
+ layoutUnit(layoutUnit_),
+ group(layoutUnit_.defaultGroup)
{
-// kdDebug() << "new LayoutState " << tqlayoutUnit.toPair() << " group: " << group << endl;
+// kdDebug() << "new LayoutState " << layoutUnit.toPair() << " group: " << group << endl;
}
};
@@ -48,7 +48,7 @@ public:
LayoutMap(const KxkbConfig& kxkbConfig);
// void setConfig(const KxkbConfig& kxkbConfig);
- void setCurrentLayout(const LayoutUnit& tqlayoutUnit);
+ void setCurrentLayout(const LayoutUnit& layoutUnit);
void setCurrentGroup(int group);
LayoutState& getNextLayout();
LayoutState& getCurrentLayout();
@@ -66,7 +66,7 @@ private:
WId m_currentWinId;
TQString m_currentWinClass; // only for SWITCH_POLICY_WIN_CLASS
- void initLayoutQueue(LayoutQueue& tqlayoutQueue);
+ void initLayoutQueue(LayoutQueue& layoutQueue);
LayoutQueue& getCurrentLayoutQueue(WId winId);
LayoutQueue& getCurrentLayoutQueueInternal(WId winId);
void clearMaps();
diff --git a/kxkb/pixmap.cpp b/kxkb/pixmap.cpp
index a059e954f..0ca1500e3 100644
--- a/kxkb/pixmap.cpp
+++ b/kxkb/pixmap.cpp
@@ -83,10 +83,10 @@ LayoutIcon::findPixmap(const TQString& code_, bool showFlag, const TQString& dis
if( pm->height() < FLAG_MAX_HEIGHT ) {
TQPixmap* pix = new TQPixmap(FLAG_MAX_WIDTH, FLAG_MAX_HEIGHT);
pix->fill( Qt::lightGray );
-// pix->fill( TQColor(tqRgba(127,127,127,255)) );
-// TQBitmap tqmask;
-// tqmask.fill(1);
-// pix->setMask(tqmask);
+// pix->fill( TQColor(qRgba(127,127,127,255)) );
+// TQBitmap mask;
+// mask.fill(1);
+// pix->setMask(mask);
int dy = (pix->height() - pm->height()) / 2;
copyBlt( pix, 0, dy, pm, 0, 0, -1, -1 );
@@ -112,83 +112,83 @@ LayoutIcon::findPixmap(const TQString& code_, bool showFlag, const TQString& dis
}
/**
-@brief Try to get country code from tqlayout name in xkb before xorg 6.9.0
+@brief Try to get country code from layout name in xkb before xorg 6.9.0
*/
-TQString LayoutIcon::getCountryFromLayoutName(const TQString& tqlayoutName)
+TQString LayoutIcon::getCountryFromLayoutName(const TQString& layoutName)
{
TQString flag;
if( X11Helper::areLayoutsClean() ) { // >= Xorg 6.9.0
- if( tqlayoutName == "mkd" )
+ if( layoutName == "mkd" )
flag = "mk";
else
- if( tqlayoutName == "srp" ) {
+ if( layoutName == "srp" ) {
TQString csFlagFile = locate("locale", flagTemplate.arg("cs"));
flag = csFlagFile.isEmpty() ? "yu" : "cs";
}
else
- if( tqlayoutName.endsWith("/jp") )
+ if( layoutName.endsWith("/jp") )
flag = "jp";
else
- if( tqlayoutName == "trq" || tqlayoutName == "trf" || tqlayoutName == "tralt" )
+ if( layoutName == "trq" || layoutName == "trf" || layoutName == "tralt" )
flag = "tr";
else
- if( tqlayoutName.length() > 2 )
+ if( layoutName.length() > 2 )
flag = "";
else
- flag = tqlayoutName;
+ flag = layoutName;
}
else {
- if( tqlayoutName == "ar" ) // Arabic - not argentina
+ if( layoutName == "ar" ) // Arabic - not argentina
;
else
- if( tqlayoutName == "sr" || tqlayoutName == "cs") // Serbian language - Yugoslavia
+ if( layoutName == "sr" || layoutName == "cs") // Serbian language - Yugoslavia
flag = "yu";
else
- if( tqlayoutName == "bs" ) // Bosnian language - Bosnia
+ if( layoutName == "bs" ) // Bosnian language - Bosnia
flag = "ba";
else
- if( tqlayoutName == "la" ) // Latin America
+ if( layoutName == "la" ) // Latin America
;
else
- if( tqlayoutName == "lo" ) // Lao
+ if( layoutName == "lo" ) // Lao
flag = "la";
else
- if( tqlayoutName == "pl2" ) // Poland
+ if( layoutName == "pl2" ) // Poland
flag = "pl";
else
- if( tqlayoutName == "iu" ) // Inuktitut - Canada
+ if( layoutName == "iu" ) // Inuktitut - Canada
flag = "ca";
else
- if( tqlayoutName == "syr" ) // Syriac
+ if( layoutName == "syr" ) // Syriac
flag = "sy";
else
- if( tqlayoutName == "dz" ) // Dzongka/Tibetian - Buthan
+ if( layoutName == "dz" ) // Dzongka/Tibetian - Buthan
flag = "bt";
else
- if( tqlayoutName == "ogham" ) // Ogham - Ireland
+ if( layoutName == "ogham" ) // Ogham - Ireland
flag = "ie";
else
- if( tqlayoutName == "ge_la" || tqlayoutName == "ge_ru" )
+ if( layoutName == "ge_la" || layoutName == "ge_ru" )
flag = "ge";
else
- if( tqlayoutName == "el" )
+ if( layoutName == "el" )
flag = "gr";
else
- if( tqlayoutName.endsWith("/jp") )
+ if( layoutName.endsWith("/jp") )
flag = "jp";
else
- if( tqlayoutName == "ml" || tqlayoutName == "dev" || tqlayoutName == "gur"
- || tqlayoutName == "guj" || tqlayoutName == "kan" || tqlayoutName == "ori"
- || tqlayoutName == "tel" || tqlayoutName == "tml" || tqlayoutName == "ben" ) // some Indian languages
+ if( layoutName == "ml" || layoutName == "dev" || layoutName == "gur"
+ || layoutName == "guj" || layoutName == "kan" || layoutName == "ori"
+ || layoutName == "tel" || layoutName == "tml" || layoutName == "ben" ) // some Indian languages
flag = "in";
else {
- int sepPos = tqlayoutName.find(TQRegExp("[-_]"));
- TQString leftCode = tqlayoutName.mid(0, sepPos);
+ int sepPos = layoutName.find(TQRegExp("[-_]"));
+ TQString leftCode = layoutName.mid(0, sepPos);
TQString rightCode;
if( sepPos != -1 )
- rightCode = tqlayoutName.mid(sepPos+1);
-// kdDebug() << "tqlayout name breakup: " << leftCode << ":" << rightCode << endl;
+ rightCode = layoutName.mid(sepPos+1);
+// kdDebug() << "layout name breakup: " << leftCode << ":" << rightCode << endl;
if( rightCode.length() == 2
&& TQRegExp("[A-Z][A-Z]").exactMatch(rightCode) ) {
@@ -211,7 +211,7 @@ void LayoutIcon::dimPixmap(TQPixmap& pm)
for(int x=0; x<image.width(); x++)
{
QRgb rgb = image.pixel(x,y);
- QRgb dimRgb(tqRgb(tqRed(rgb)*3/4, tqGreen(rgb)*3/4, tqBlue(rgb)*3/4));
+ QRgb dimRgb(qRgb(qRed(rgb)*3/4, qGreen(rgb)*3/4, qBlue(rgb)*3/4));
image.setPixel(x, y, dimRgb);
}
pm.convertFromImage(image);
@@ -313,7 +313,7 @@ TQPixmap* LayoutIcon::createErrorPixmap()
// I18N_NOOP("Iranian"); // should be not Iranian but Farsi
I18N_NOOP("Latin America");
I18N_NOOP("Maltese");
- I18N_NOOP("Maltese (US tqlayout)");
+ I18N_NOOP("Maltese (US layout)");
I18N_NOOP("Northern Saami (Finland)");
I18N_NOOP("Northern Saami (Norway)");
I18N_NOOP("Northern Saami (Sweden)");
diff --git a/kxkb/pixmap.h b/kxkb/pixmap.h
index 661e74eff..7070d91b2 100644
--- a/kxkb/pixmap.h
+++ b/kxkb/pixmap.h
@@ -19,7 +19,7 @@ private:
LayoutIcon();
TQPixmap* createErrorPixmap();
void dimPixmap(TQPixmap& pixmap);
- TQString getCountryFromLayoutName(const TQString& tqlayoutName);
+ TQString getCountryFromLayoutName(const TQString& layoutName);
public:
static const TQString& ERROR_CODE;
diff --git a/kxkb/rules.cpp b/kxkb/rules.cpp
index 940b2db35..dbf5b823d 100644
--- a/kxkb/rules.cpp
+++ b/kxkb/rules.cpp
@@ -15,8 +15,8 @@
#include "rules.h"
-XkbRules::XkbRules(bool tqlayoutsOnly):
- m_tqlayouts(90)
+XkbRules::XkbRules(bool layoutsOnly):
+ m_layouts(90)
{
X11_DIR = X11Helper::findX11Dir();
@@ -34,23 +34,23 @@ XkbRules::XkbRules(bool tqlayoutsOnly):
return;
}
- loadRules(rulesFile, tqlayoutsOnly);
+ loadRules(rulesFile, layoutsOnly);
loadOldLayouts(rulesFile);
loadGroups(::locate("config", "kxkb_groups"));
}
-void XkbRules::loadRules(TQString file, bool tqlayoutsOnly)
+void XkbRules::loadRules(TQString file, bool layoutsOnly)
{
- RulesInfo* rules = X11Helper::loadRules(file, tqlayoutsOnly);
+ RulesInfo* rules = X11Helper::loadRules(file, layoutsOnly);
if (rules == NULL) {
kdDebug() << "Unable to load rules" << endl;
return;
}
- m_tqlayouts= rules->tqlayouts;
- if( tqlayoutsOnly == false ) {
+ m_layouts= rules->layouts;
+ if( layoutsOnly == false ) {
m_models = rules->models;
m_options = rules->options;
}
@@ -65,7 +65,7 @@ void XkbRules::loadRules(TQString file, bool tqlayoutsOnly)
// // the rule file wasn't found
// static struct {
// const char * locale;
-// const char * tqlayout;
+// const char * layout;
// } fixedLayouts[] = {
// { "ben", "Bengali" },
// { "ar", "Arabic" },
@@ -73,21 +73,21 @@ void XkbRules::loadRules(TQString file, bool tqlayoutsOnly)
// { 0, 0 }
// };
//
-// for(int i=0; fixedLayouts[i].tqlayout != 0; i++ ) {
-// if( m_tqlayouts.find(fixedLayouts[i].locale) == 0 )
-// m_tqlayouts.insert(fixedLayouts[i].locale, fixedLayouts[i].tqlayout);
+// for(int i=0; fixedLayouts[i].layout != 0; i++ ) {
+// if( m_layouts.find(fixedLayouts[i].locale) == 0 )
+// m_layouts.insert(fixedLayouts[i].locale, fixedLayouts[i].layout);
// }
// }
-bool XkbRules::isSingleGroup(const TQString& tqlayout)
+bool XkbRules::isSingleGroup(const TQString& layout)
{
return X11Helper::areSingleGroupsSupported()
- && !m_oldLayouts.tqcontains(tqlayout)
- && !m_nonLatinLayouts.tqcontains(tqlayout);
+ && !m_oldLayouts.contains(layout)
+ && !m_nonLatinLayouts.contains(layout);
}
-// check $oldtqlayouts and $nonlatin groups for XFree 4.3 and later
+// check $oldlayouts and $nonlatin groups for XFree 4.3 and later
void XkbRules::loadOldLayouts(TQString rulesFile)
{
OldLayouts* oldLayoutsStruct = X11Helper::loadOldLayouts( rulesFile );
@@ -95,8 +95,8 @@ void XkbRules::loadOldLayouts(TQString rulesFile)
m_nonLatinLayouts = oldLayoutsStruct->nonLatinLayouts;
}
-// for multi-group tqlayouts in XFree 4.2 and older
-// or if tqlayout is present in $oldtqlayout or $nonlatin groups
+// for multi-group layouts in XFree 4.2 and older
+// or if layout is present in $oldlayout or $nonlatin groups
void XkbRules::loadGroups(TQString file)
{
TQFile f(file);
@@ -121,35 +121,35 @@ void XkbRules::loadGroups(TQString file)
}
unsigned int
-XkbRules::getDefaultGroup(const TQString& tqlayout, const TQString& includeGroup)
+XkbRules::getDefaultGroup(const TQString& layout, const TQString& includeGroup)
{
-// check for new one-group tqlayouts in XFree 4.3 and older
- if( isSingleGroup(tqlayout) ) {
+// check for new one-group layouts in XFree 4.3 and older
+ if( isSingleGroup(layout) ) {
if( includeGroup.isEmpty() == false )
return 1;
else
return 0;
}
- TQMap<TQString, unsigned int>::iterator it = m_initialGroups.find(tqlayout);
+ TQMap<TQString, unsigned int>::iterator it = m_initialGroups.find(layout);
return it == m_initialGroups.end() ? 0 : it.data();
}
QStringList
-XkbRules::getAvailableVariants(const TQString& tqlayout)
+XkbRules::getAvailableVariants(const TQString& layout)
{
- if( tqlayout.isEmpty() || !tqlayouts().find(tqlayout) )
+ if( layout.isEmpty() || !layouts().find(layout) )
return TQStringList();
- TQStringList* result1 = m_varLists[tqlayout];
+ TQStringList* result1 = m_varLists[layout];
if( result1 )
return *result1;
- bool oldLayouts = m_oldLayouts.tqcontains(tqlayout);
- TQStringList* result = X11Helper::getVariants(tqlayout, X11_DIR, oldLayouts);
+ bool oldLayouts = m_oldLayouts.contains(layout);
+ TQStringList* result = X11Helper::getVariants(layout, X11_DIR, oldLayouts);
- m_varLists.insert(tqlayout, result);
+ m_varLists.insert(layout, result);
return *result;
}
diff --git a/kxkb/rules.h b/kxkb/rules.h
index 27163a140..a4955317e 100644
--- a/kxkb/rules.h
+++ b/kxkb/rules.h
@@ -10,27 +10,27 @@ class XkbRules
{
public:
- XkbRules(bool tqlayoutsOnly=false);
+ XkbRules(bool layoutsOnly=false);
const TQDict<char> &models() const { return m_models; };
- const TQDict<char> &tqlayouts() const { return m_tqlayouts; };
+ const TQDict<char> &layouts() const { return m_layouts; };
const TQDict<char> &options() const { return m_options; };
- TQStringList getAvailableVariants(const TQString& tqlayout);
- unsigned int getDefaultGroup(const TQString& tqlayout, const TQString& includeGroup);
+ TQStringList getAvailableVariants(const TQString& layout);
+ unsigned int getDefaultGroup(const TQString& layout, const TQString& includeGroup);
- bool isSingleGroup(const TQString& tqlayout);
+ bool isSingleGroup(const TQString& layout);
protected:
- void loadRules(TQString filename, bool tqlayoutsOnly=false);
+ void loadRules(TQString filename, bool layoutsOnly=false);
void loadGroups(TQString filename);
void loadOldLayouts(TQString filename);
private:
TQDict<char> m_models;
- TQDict<char> m_tqlayouts;
+ TQDict<char> m_layouts;
TQDict<char> m_options;
TQMap<TQString, unsigned int> m_initialGroups;
TQDict<TQStringList> m_varLists;
diff --git a/kxkb/x11helper.cpp b/kxkb/x11helper.cpp
index c44ba7971..e8f13f6aa 100644
--- a/kxkb/x11helper.cpp
+++ b/kxkb/x11helper.cpp
@@ -57,7 +57,7 @@ const TQString X11Helper::X11_WIN_CLASS_UNKNOWN = "<unknown>";
static const TQRegExp NON_CLEAN_LAYOUT_REGEXP("[^a-z]");
-bool X11Helper::m_tqlayoutsClean = true;
+bool X11Helper::m_layoutsClean = true;
const QString
X11Helper::findX11Dir()
@@ -107,7 +107,7 @@ X11Helper::findXkbRulesFile(TQString x11Dir, Display *dpy)
}
RulesInfo*
-X11Helper::loadRules(const TQString& file, bool tqlayoutsOnly)
+X11Helper::loadRules(const TQString& file, bool layoutsOnly)
{
XkbRF_RulesPtr xkbRules = XkbRF_Load(TQFile::encodeName(file).data(), "", true, true);
@@ -119,32 +119,32 @@ X11Helper::loadRules(const TQString& file, bool tqlayoutsOnly)
RulesInfo* rulesInfo = new RulesInfo();
for (int i = 0; i < xkbRules->layouts.num_desc; ++i) {
- TQString tqlayoutName(xkbRules->layouts.desc[i].name);
- rulesInfo->tqlayouts.tqreplace( tqlayoutName, qstrdup( xkbRules->layouts.desc[i].desc ) );
+ TQString layoutName(xkbRules->layouts.desc[i].name);
+ rulesInfo->layouts.replace( layoutName, qstrdup( xkbRules->layouts.desc[i].desc ) );
- if( m_tqlayoutsClean == true
- && tqlayoutName.find( NON_CLEAN_LAYOUT_REGEXP ) != -1
- && tqlayoutName.endsWith("/jp") == false ) {
+ if( m_layoutsClean == true
+ && layoutName.find( NON_CLEAN_LAYOUT_REGEXP ) != -1
+ && layoutName.endsWith("/jp") == false ) {
kdDebug() << "Layouts are not clean (Xorg < 6.9.0 or XFree86)" << endl;
- m_tqlayoutsClean = false;
+ m_layoutsClean = false;
}
}
- if( tqlayoutsOnly == true ) {
+ if( layoutsOnly == true ) {
XkbRF_Free(xkbRules, true);
return rulesInfo;
}
for (int i = 0; i < xkbRules->models.num_desc; ++i)
- rulesInfo->models.tqreplace(xkbRules->models.desc[i].name, qstrdup( xkbRules->models.desc[i].desc ) );
+ rulesInfo->models.replace(xkbRules->models.desc[i].name, qstrdup( xkbRules->models.desc[i].desc ) );
for (int i = 0; i < xkbRules->options.num_desc; ++i)
- rulesInfo->options.tqreplace(xkbRules->options.desc[i].name, qstrdup( xkbRules->options.desc[i].desc ) );
+ rulesInfo->options.replace(xkbRules->options.desc[i].name, qstrdup( xkbRules->options.desc[i].desc ) );
XkbRF_Free(xkbRules, true);
// workaround for empty 'compose' options group description
if( rulesInfo->options.find("compose:menu") && !rulesInfo->options.find("compose") ) {
- rulesInfo->options.tqreplace("compose", "Compose Key Position");
+ rulesInfo->options.replace("compose", "Compose Key Position");
}
for(TQDictIterator<char> it(rulesInfo->options) ; it.current() != NULL; ++it ) {
@@ -154,7 +154,7 @@ X11Helper::loadRules(const TQString& file, bool tqlayoutsOnly)
if( columnPos != -1 ) {
TQString group = option.mid(0, columnPos);
if( rulesInfo->options.find(group) == NULL ) {
- rulesInfo->options.tqreplace(group, group.latin1());
+ rulesInfo->options.replace(group, group.latin1());
kdDebug() << "Added missing option group: " << group << endl;
}
}
@@ -162,17 +162,17 @@ X11Helper::loadRules(const TQString& file, bool tqlayoutsOnly)
// // workaround for empty misc options group description in XFree86 4.4.0
// if( rulesInfo->options.find("numpad:microsoft") && !rulesInfo->options.find("misc") ) {
-// rulesInfo->options.tqreplace("misc", "Miscellaneous compatibility options" );
+// rulesInfo->options.replace("misc", "Miscellaneous compatibility options" );
// }
return rulesInfo;
}
-// check $oldtqlayouts and $nonlatin groups for XFree 4.3 and later
+// check $oldlayouts and $nonlatin groups for XFree 4.3 and later
OldLayouts*
X11Helper::loadOldLayouts(const TQString& rulesFile)
{
- static const char* oldLayoutsTag = "! $oldtqlayouts";
+ static const char* oldLayoutsTag = "! $oldlayouts";
static const char* nonLatinLayoutsTag = "! $nonlatin";
TQStringList m_oldLayouts;
TQStringList m_nonLatinLayouts;
@@ -196,7 +196,7 @@ X11Helper::loadOldLayouts(const TQString& rulesFile)
line = line.simplifyWhiteSpace();
m_oldLayouts = TQStringList::split(TQRegExp("\\s"), line);
-// kdDebug() << "oldtqlayouts " << m_oldLayouts.join("|") << endl;
+// kdDebug() << "oldlayouts " << m_oldLayouts.join("|") << endl;
if( !m_nonLatinLayouts.empty() )
break;
@@ -229,21 +229,21 @@ X11Helper::loadOldLayouts(const TQString& rulesFile)
}
-/* pretty simple algorithm - reads the tqlayout file and
+/* pretty simple algorithm - reads the layout file and
tries to find "xkb_symbols"
- also checks whether previous line tqcontains "hidden" to skip it
+ also checks whether previous line contains "hidden" to skip it
*/
TQStringList*
-X11Helper::getVariants(const TQString& tqlayout, const TQString& x11Dir, bool oldLayouts)
+X11Helper::getVariants(const TQString& layout, const TQString& x11Dir, bool oldLayouts)
{
TQStringList* result = new TQStringList();
TQString file = x11Dir + "xkb/symbols/";
- // workaround for XFree 4.3 new directory for one-group tqlayouts
+ // workaround for XFree 4.3 new directory for one-group layouts
if( TQDir(file+"pc").exists() && !oldLayouts )
file += "pc/";
- file += tqlayout;
+ file += layout;
// kdDebug() << "reading variants from " << file << endl;
diff --git a/kxkb/x11helper.h b/kxkb/x11helper.h
index 058b34475..042fb4ce5 100644
--- a/kxkb/x11helper.h
+++ b/kxkb/x11helper.h
@@ -7,7 +7,7 @@
struct RulesInfo {
TQDict<char> models;
- TQDict<char> tqlayouts;
+ TQDict<char> layouts;
TQDict<char> options;
};
@@ -18,7 +18,7 @@ struct OldLayouts {
class X11Helper
{
- static bool m_tqlayoutsClean;
+ static bool m_layoutsClean;
public:
static const WId UNKNOWN_WINDOW_ID = (WId) 0;
@@ -30,11 +30,11 @@ public:
static const TQString findX11Dir();
static const TQString findXkbRulesFile(TQString x11Dir, Display* dpy);
static TQString getWindowClass(WId winId, Display* dpy);
- static TQStringList* getVariants(const TQString& tqlayout, const TQString& x11Dir, bool oldLayouts=false);
- static RulesInfo* loadRules(const TQString& rulesFile, bool tqlayoutsOnly=false);
+ static TQStringList* getVariants(const TQString& layout, const TQString& x11Dir, bool oldLayouts=false);
+ static RulesInfo* loadRules(const TQString& rulesFile, bool layoutsOnly=false);
static OldLayouts* loadOldLayouts(const TQString& rulesFile);
- static bool areLayoutsClean() { return m_tqlayoutsClean; }
+ static bool areLayoutsClean() { return m_layoutsClean; }
static bool areSingleGroupsSupported();
};