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 344422ba..258dec42 100644
--- a/kxkb/TODO
+++ b/kxkb/TODO
@@ -1,13 +1,13 @@
-- setting up own layout if you're not root - using xkbcomp
+- setting up own tqlayout if you're not root - using xkbcomp
- allowing other latin base groups instead of "us" (e.g. "dvorak")
-- 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
+- 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
-- check the problem with gnome apps, first switch of layout with keyboard shortcut locks input
+- check the problem with gnome apps, first switch of tqlayout with keyboard shortcut locks input
-- kdesktop_lock: layouts menu, flag icons, better error handling
+- kdesktop_lock: tqlayouts 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 3817a8c4..12b9b9bb 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& layout, const TQString& variant)
+static TQString getLayoutKey(const TQString& tqlayout, const TQString& variant)
{
- return layout + "." + variant;
+ return tqlayout + "." + variant;
}
-TQString XKBExtension::getPrecompiledLayoutFilename(const TQString& layoutKey)
+TQString XKBExtension::getPrecompiledLayoutFilename(const TQString& tqlayoutKey)
{
- TQString compiledLayoutFileName = m_tempDir + layoutKey + ".xkm";
+ TQString compiledLayoutFileName = m_tempDir + tqlayoutKey + ".xkm";
return compiledLayoutFileName;
}
@@ -115,28 +115,28 @@ bool XKBExtension::setXkbOptions(const TQString& options, bool resetOld)
}
bool XKBExtension::setLayout(const TQString& model,
- const TQString& layout, const TQString& variant,
+ const TQString& tqlayout, const TQString& variant,
const TQString& includeGroup, bool useCompiledLayouts)
{
if( useCompiledLayouts == false ) {
- return setLayoutInternal( model, layout, variant, includeGroup );
+ return setLayoutInternal( model, tqlayout, variant, includeGroup );
}
- const TQString layoutKey = getLayoutKey(layout, variant);
+ const TQString tqlayoutKey = getLayoutKey(tqlayout, variant);
bool res;
- if( fileCache.contains(layoutKey) ) {
- res = setCompiledLayout( layoutKey );
- kdDebug() << "setCompiledLayout " << layoutKey << ": " << res << endl;
+ if( fileCache.tqcontains(tqlayoutKey) ) {
+ res = setCompiledLayout( tqlayoutKey );
+ kdDebug() << "setCompiledLayout " << tqlayoutKey << ": " << res << endl;
if( res )
return res;
}
// else {
- res = setLayoutInternal( model, layout, variant, includeGroup );
- kdDebug() << "setRawLayout " << layoutKey << ": " << res << endl;
+ res = setLayoutInternal( model, tqlayout, variant, includeGroup );
+ kdDebug() << "setRawLayout " << tqlayoutKey << ": " << res << endl;
if( res )
- compileCurrentLayout( layoutKey );
+ compileCurrentLayout( tqlayoutKey );
// }
return res;
@@ -144,10 +144,10 @@ bool XKBExtension::setLayout(const TQString& model,
// private
bool XKBExtension::setLayoutInternal(const TQString& model,
- const TQString& layout, const TQString& variant,
+ const TQString& tqlayout, const TQString& variant,
const TQString& includeGroup)
{
- if ( layout.isEmpty() )
+ if ( tqlayout.isEmpty() )
return false;
TQString exe = KGlobal::dirs()->findExe("setxkbmap");
@@ -156,12 +156,12 @@ bool XKBExtension::setLayoutInternal(const TQString& model,
return false;
}
- TQString fullLayout = layout;
+ TQString fullLayout = tqlayout;
TQString fullVariant = variant;
if( includeGroup.isEmpty() == false ) {
fullLayout = includeGroup;
fullLayout += ",";
- fullLayout += layout;
+ fullLayout += tqlayout;
// fullVariant = baseVar;
fullVariant = ",";
@@ -173,7 +173,7 @@ bool XKBExtension::setLayoutInternal(const TQString& model,
// p << "-rules" << rule;
if( model.isEmpty() == false )
p << "-model" << model;
- p << "-layout" << fullLayout;
+ p << "-tqlayout" << fullLayout;
if( !fullVariant.isNull() && !fullVariant.isEmpty() )
p << "-variant" << fullVariant;
@@ -209,25 +209,25 @@ unsigned int XKBExtension::getGroup() const
}
/**
- * @brief Gets the current layout in its binary compiled form
+ * @brief Gets the current tqlayout in its binary compiled form
* and write it to the file specified by 'fileName'
- * @param[in] fileName file to store compiled layout to
+ * @param[in] fileName file to store compiled tqlayout to
* @return true if no problem, false otherwise
*/
-bool XKBExtension::compileCurrentLayout(const TQString &layoutKey)
+bool XKBExtension::compileCurrentLayout(const TQString &tqlayoutKey)
{
XkbFileInfo result;
memset(&result, 0, sizeof(result));
result.type = XkmKeymapFile;
XkbReadFromServer(m_dpy, XkbAllMapComponentsMask, XkbAllMapComponentsMask, &result);
- const TQString fileName = getPrecompiledLayoutFilename(layoutKey);
+ const TQString fileName = getPrecompiledLayoutFilename(tqlayoutKey);
- 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
+ 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
fileCache.remove(fileName);
}
@@ -241,41 +241,41 @@ bool XKBExtension::compileCurrentLayout(const TQString &layoutKey)
}
if( !XkbWriteXKMFile(output, &result) ) {
- kdWarning() << "Could not write compiled layout to " << fileName << endl;
+ kdWarning() << "Could not write compiled tqlayout 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[ layoutKey ] = input;
+ fileCache[ tqlayoutKey ] = input;
XkbFreeKeyboard(result.xkb, XkbAllControlsMask, True);
return true;
}
/**
- * @brief takes layout from its compiled binary snapshot in file
+ * @brief takes tqlayout from its compiled binary snapshot in file
* and sets it as current
- * TODO: cache layout in memory rather than in file
+ * TODO: cache tqlayout in memory rather than in file
*/
-bool XKBExtension::setCompiledLayout(const TQString &layoutKey)
+bool XKBExtension::setCompiledLayout(const TQString &tqlayoutKey)
{
FILE *input = NULL;
- if( fileCache.contains(layoutKey) ) {
- input = fileCache[ layoutKey ];
+ if( fileCache.tqcontains(tqlayoutKey) ) {
+ input = fileCache[ tqlayoutKey ];
}
if( input == NULL ) {
kdWarning() << "setCompiledLayout trying to reopen xkb file" << endl; // should never happen
- const TQString fileName = getPrecompiledLayoutFilename(layoutKey);
+ const TQString fileName = getPrecompiledLayoutFilename(tqlayoutKey);
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(layoutKey);
+ fileCache.remove(tqlayoutKey);
return false;
}
}
@@ -288,7 +288,7 @@ bool XKBExtension::setCompiledLayout(const TQString &layoutKey)
if ((result.xkb = XkbAllocKeyboard())==NULL) {
kdWarning() << "Unable to allocate memory for keyboard description" << endl;
// fclose(input);
-// fileCache.remove(layoutKey);
+// fileCache.remove(tqlayoutKey);
return false;
}
@@ -299,7 +299,7 @@ bool XKBExtension::setCompiledLayout(const TQString &layoutKey)
kdWarning() << "Unable to load map from file" << endl;
XkbFreeKeyboard(result.xkb, XkbAllControlsMask, True);
fclose(input);
- fileCache.remove(layoutKey);
+ fileCache.remove(tqlayoutKey);
return false;
}
@@ -309,14 +309,14 @@ bool XKBExtension::setCompiledLayout(const TQString &layoutKey)
{
if (!XkbWriteToServer(&result))
{
- kdWarning() << "Unable to write the keyboard layout to X display" << endl;
+ kdWarning() << "Unable to write the keyboard tqlayout to X display" << endl;
XkbFreeKeyboard(result.xkb, XkbAllControlsMask, True);
return false;
}
}
else
{
- kdWarning() << "Unable prepare the keyboard layout for X display" << endl;
+ kdWarning() << "Unable prepare the keyboard tqlayout for X display" << endl;
}
XkbFreeKeyboard(result.xkb, XkbAllControlsMask, True);
@@ -324,7 +324,7 @@ bool XKBExtension::setCompiledLayout(const TQString &layoutKey)
}
-// Deletes the precompiled layouts stored in temporary files
+// Deletes the precompiled tqlayouts stored in temporary files
// void XKBExtension::deletePrecompiledLayouts()
// {
// TQMapConstIterator<LayoutUnit, TQString> it, end;
diff --git a/kxkb/extension.h b/kxkb/extension.h
index bf4293d2..82ea9231 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& layout, const TQString& variant,
+ const TQString& tqlayout, 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& layout, const TQString& variant,
+ const TQString& tqlayout, const TQString& variant,
const TQString& includeGroup);
- bool compileCurrentLayout(const TQString& layoutKey);
- bool setCompiledLayout(const TQString& layoutKey);
+ bool compileCurrentLayout(const TQString& tqlayoutKey);
+ bool setCompiledLayout(const TQString& tqlayoutKey);
- TQString getPrecompiledLayoutFilename(const TQString& layoutKey);
+ TQString getPrecompiledLayoutFilename(const TQString& tqlayoutKey);
// void deletePrecompiledLayouts();
};
diff --git a/kxkb/kcmlayout.cpp b/kxkb/kcmlayout.cpp
index 7af7ae69..ef0cc168 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(layoutSelChanged(TQListViewItem *)));
+ this, TQT_SLOT(tqlayoutSelChanged(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_layouts;
+ TQValueList<LayoutUnit> otherLayouts = m_kxkbConfig.m_tqlayouts;
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 layoutUnit = *it;
+ LayoutUnit tqlayoutUnit = *it;
for ( ; src_it.current(); ++src_it ) {
TQListViewItem* srcItem = src_it.current();
- if ( layoutUnit.layout == src_it.current()->text(LAYOUT_COLUMN_MAP) ) { // check if current config knows about this layout
+ if ( tqlayoutUnit.tqlayout == src_it.current()->text(LAYOUT_COLUMN_MAP) ) { // check if current config knows about this tqlayout
TQListViewItem* newItem = copyLVI(srcItem, widget->listLayoutsDst);
- newItem->setText(LAYOUT_COLUMN_VARIANT, layoutUnit.variant);
- newItem->setText(LAYOUT_COLUMN_INCLUDE, layoutUnit.includeGroup);
- newItem->setText(LAYOUT_COLUMN_DISPLAY_NAME, layoutUnit.displayName);
+ newItem->setText(LAYOUT_COLUMN_VARIANT, tqlayoutUnit.variant);
+ newItem->setText(LAYOUT_COLUMN_INCLUDE, tqlayoutUnit.includeGroup);
+ newItem->setText(LAYOUT_COLUMN_DISPLAY_NAME, tqlayoutUnit.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> layouts;
+ TQValueList<LayoutUnit> tqlayouts;
while (item) {
- TQString layout = item->text(LAYOUT_COLUMN_MAP);
+ TQString tqlayout = 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 layoutUnit(layout, variant);
- layoutUnit.includeGroup = includes;
- layoutUnit.displayName = displayName;
- layouts.append( layoutUnit );
+ LayoutUnit tqlayoutUnit(tqlayout, variant);
+ tqlayoutUnit.includeGroup = includes;
+ tqlayoutUnit.displayName = displayName;
+ tqlayouts.append( tqlayoutUnit );
item = item->nextSibling();
- kdDebug() << "To save: layout " << layoutUnit.toPair()
- << ", inc: " << layoutUnit.includeGroup
- << ", disp: " << layoutUnit.displayName << endl;
+ kdDebug() << "To save: tqlayout " << tqlayoutUnit.toPair()
+ << ", inc: " << tqlayoutUnit.includeGroup
+ << ", disp: " << tqlayoutUnit.displayName << endl;
}
- m_kxkbConfig.m_layouts = layouts;
+ m_kxkbConfig.m_tqlayouts = tqlayouts;
- if( m_kxkbConfig.m_layouts.count() == 0 ) {
- m_kxkbConfig.m_layouts.append(LayoutUnit(DEFAULT_LAYOUT_UNIT));
+ if( m_kxkbConfig.m_tqlayouts.count() == 0 ) {
+ m_kxkbConfig.m_tqlayouts.append(LayoutUnit(DEFAULT_LAYOUT_UNIT));
widget->chkEnable->setChecked(false);
}
@@ -331,8 +331,8 @@ void LayoutConfig::save()
void LayoutConfig::updateStickyLimit()
{
- int layoutsCnt = widget->listLayoutsDst->childCount();
- int maxDepth = layoutsCnt - 1;
+ int tqlayoutsCnt = widget->listLayoutsDst->childCount();
+ int maxDepth = tqlayoutsCnt - 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 layout more
+ // Create a copy of the sel widget, as one might add the same tqlayout more
// than one time, with different variants.
TQListViewItem* toadd = copyLVI(sel, widget->listLayoutsDst);
- // Turn on "Include Latin layout" for new language by default (bnc:204402)
+ // Turn on "Include Latin tqlayout" 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);
-// layoutSelChanged(sel);
+// tqlayoutSelChanged(sel);
updateStickyLimit();
changed();
@@ -384,7 +384,7 @@ void LayoutConfig::remove()
delete sel;
if( newSel )
widget->listLayoutsSrc->setSelected(newSel, true);
- layoutSelChanged(newSel);
+ tqlayoutSelChanged(newSel);
updateStickyLimit();
changed();
@@ -443,23 +443,23 @@ void LayoutConfig::displayNameChanged(const TQString& newDisplayName)
if( selLayout == NULL )
return;
- const LayoutUnit layoutUnitKey = getLayoutUnitKey( selLayout );
- LayoutUnit& layoutUnit = *m_kxkbConfig.m_layouts.find(layoutUnitKey);
+ const LayoutUnit tqlayoutUnitKey = getLayoutUnitKey( selLayout );
+ LayoutUnit& tqlayoutUnit = *m_kxkbConfig.m_tqlayouts.find(tqlayoutUnitKey);
TQString oldName = selLayout->text(LAYOUT_COLUMN_DISPLAY_NAME);
if( oldName.isEmpty() )
- oldName = KxkbConfig::getDefaultDisplayName( layoutUnit );
+ oldName = KxkbConfig::getDefaultDisplayName( tqlayoutUnit );
if( oldName != newDisplayName ) {
- kdDebug() << "setting label for " << layoutUnit.toPair() << " : " << newDisplayName << endl;
+ kdDebug() << "setting label for " << tqlayoutUnit.toPair() << " : " << newDisplayName << endl;
selLayout->setText(LAYOUT_COLUMN_DISPLAY_NAME, newDisplayName);
updateIndicator(selLayout);
emit changed();
}
}
-/** will update flag with label if layout label has been edited
+/** will update flag with label if tqlayout label has been edited
*/
void LayoutConfig::updateIndicator(TQListViewItem* selLayout)
{
@@ -482,11 +482,11 @@ void LayoutConfig::latinChanged()
include = "";
selLayout->setText(LAYOUT_COLUMN_INCLUDE, include);
- LayoutUnit layoutUnitKey = getLayoutUnitKey(selLayout);
- kdDebug() << "layout " << layoutUnitKey.toPair() << ", inc: " << include << endl;
+ LayoutUnit tqlayoutUnitKey = getLayoutUnitKey(selLayout);
+ kdDebug() << "tqlayout " << tqlayoutUnitKey.toPair() << ", inc: " << include << endl;
}
-void LayoutConfig::layoutSelChanged(TQListViewItem *sel)
+void LayoutConfig::tqlayoutSelChanged(TQListViewItem *sel)
{
widget->comboVariant->clear();
widget->comboVariant->setEnabled( sel != NULL );
@@ -499,8 +499,8 @@ void LayoutConfig::layoutSelChanged(TQListViewItem *sel)
}
- LayoutUnit layoutUnitKey = getLayoutUnitKey(sel);
- TQString kbdLayout = layoutUnitKey.layout;
+ LayoutUnit tqlayoutUnitKey = getLayoutUnitKey(sel);
+ TQString kbdLayout = tqlayoutUnitKey.tqlayout;
// TODO: need better algorithm here for determining if needs us group
if ( ! m_rules->isSingleGroup(kbdLayout)
@@ -518,7 +518,7 @@ void LayoutConfig::layoutSelChanged(TQListViewItem *sel)
}
TQStringList vars = m_rules->getAvailableVariants(kbdLayout);
- kdDebug() << "layout " << kbdLayout << " has " << vars.count() << " variants" << endl;
+ kdDebug() << "tqlayout " << 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().contains(':'))
+ if (!it.currentKey().tqcontains(':'))
{
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.replace( "Cap$", "Caps." );
+ text = text.tqreplace( "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 layoutDisplayName;
+ TQString tqlayoutDisplayName;
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())
- + " -layout ";
+ + " -tqlayout ";
setxkbmap += kbdLayout;
if( widget->chkLatin->isChecked() )
setxkbmap += ",us";
-/* LayoutUnit layoutUnitKey = getLayoutUnitKey(sel);
- layoutDisplayName = m_kxkbConfig.getLayoutDisplayName( *m_kxkbConfig.m_layouts.find(layoutUnitKey) );*/
- layoutDisplayName = sel->text(LAYOUT_COLUMN_DISPLAY_NAME);
- if( layoutDisplayName.isEmpty() ) {
+/* LayoutUnit tqlayoutUnitKey = getLayoutUnitKey(sel);
+ tqlayoutDisplayName = m_kxkbConfig.getLayoutDisplayName( *m_kxkbConfig.m_tqlayouts.find(tqlayoutUnitKey) );*/
+ tqlayoutDisplayName = sel->text(LAYOUT_COLUMN_DISPLAY_NAME);
+ if( tqlayoutDisplayName.isEmpty() ) {
int count = 0;
TQListViewItem *item = widget->listLayoutsDst->firstChild();
while (item) {
- TQString layout_ = item->text(LAYOUT_COLUMN_MAP);
- if( layout_ == kbdLayout )
+ TQString tqlayout_ = item->text(LAYOUT_COLUMN_MAP);
+ if( tqlayout_ == kbdLayout )
++count;
item = item->nextSibling();
}
bool single = count < 2;
- layoutDisplayName = m_kxkbConfig.getDefaultDisplayName(LayoutUnit(kbdLayout, variant), single);
+ tqlayoutDisplayName = m_kxkbConfig.getDefaultDisplayName(LayoutUnit(kbdLayout, variant), single);
}
- kdDebug() << "disp: '" << layoutDisplayName << "'" << endl;
+ kdDebug() << "disp: '" << tqlayoutDisplayName << "'" << 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(layoutDisplayName);
+ widget->editDisplayName->setText(tqlayoutDisplayName);
}
void LayoutConfig::changed()
@@ -695,20 +695,20 @@ void LayoutConfig::loadRules()
widget->comboModel->insertStringList(modelsList);
widget->comboModel->setCurrentItem(0);
- // fill in the additional layouts
+ // fill in the additional tqlayouts
widget->listLayoutsSrc->clear();
widget->listLayoutsDst->clear();
- TQDictIterator<char> it2(m_rules->layouts());
+ TQDictIterator<char> it2(m_rules->tqlayouts());
while (it2.current())
{
- TQString layout = it2.currentKey();
- TQString layoutName = it2.current();
+ TQString tqlayout = it2.currentKey();
+ TQString tqlayoutName = it2.current();
TQListViewItem *item = new TQListViewItem(widget->listLayoutsSrc);
- item->setPixmap(LAYOUT_COLUMN_FLAG, LayoutIcon::getInstance().findPixmap(layout, true));
- item->setText(LAYOUT_COLUMN_NAME, i18n(layoutName.latin1()));
- item->setText(LAYOUT_COLUMN_MAP, layout);
+ item->setPixmap(LAYOUT_COLUMN_FLAG, LayoutIcon::getInstance().findPixmap(tqlayout, true));
+ item->setText(LAYOUT_COLUMN_NAME, i18n(tqlayoutName.latin1()));
+ item->setText(LAYOUT_COLUMN_MAP, tqlayout);
++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.contains(':')) {
+ if (option.tqcontains(':')) {
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_layout(TQWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_keyboard_tqlayout(TQWidget *parent, const char *)
{
- return new LayoutConfig(parent, "kcmlayout");
+ return new LayoutConfig(parent, "kcmtqlayout");
}
KDE_EXPORT KCModule *create_keyboard(TQWidget *parent, const char *)
{
- return new KeyboardConfig(parent, "kcmlayout");
+ return new KeyboardConfig(parent, "kcmtqlayout");
}
KDE_EXPORT void init_keyboard()
@@ -816,7 +816,7 @@ extern "C"
kapp->startServiceByDesktopName("kxkb");
}
else {
- // Even if the layouts have been disabled we still want to set Xkb options
+ // Even if the tqlayouts 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 6f61e9e0..5ff153fc 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 layoutSelChanged(TQListViewItem *);
+ void tqlayoutSelChanged(TQListViewItem *);
void loadRules();
void updateLayoutCommand();
void updateOptionsCommand();
diff --git a/kxkb/kcmlayoutwidget.ui b/kxkb/kcmlayoutwidget.ui
index 82c86600..8e9f9d79 100644
--- a/kxkb/kcmlayoutwidget.ui
+++ b/kxkb/kcmlayoutwidget.ui
@@ -4,7 +4,7 @@
<property name="name">
<cstring>LayoutConfigWidget</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -20,7 +20,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>600</width>
<height>510</height>
@@ -34,7 +34,7 @@
<property name="name">
<cstring>tabWidget</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>600</width>
<height>500</height>
@@ -56,7 +56,7 @@
<cstring>chkEnable</cstring>
</property>
<property name="text">
- <string>&amp;Enable keyboard layouts</string>
+ <string>&amp;Enable keyboard tqlayouts</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 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>
+ <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>
</property>
<grid>
<property name="name">
@@ -81,7 +81,7 @@
<cstring>textLabel1_4</cstring>
</property>
<property name="text">
- <string>Available layouts:</string>
+ <string>Available tqlayouts:</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 layouts:</string>
+ <string>Active tqlayouts:</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 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>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>
</property>
</widget>
@@ -194,12 +194,12 @@
<bool>true</bool>
</property>
<property name="whatsThis" stdset="0">
- <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>
+ <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>
</property>
</widget>
<widget class="QLayoutWidget" row="4" column="2" rowspan="1" colspan="3">
<property name="name">
- <cstring>layout10</cstring>
+ <cstring>tqlayout10</cstring>
</property>
<hbox>
<property name="name">
@@ -303,7 +303,7 @@
<property name="name">
<cstring>listLayoutsSrc</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<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 layouts in your system. You can add layout to the active list by selecting it and pressing "Add" button.</string>
+ <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>
</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 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>
+ <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>
</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 layout</string>
+ <string>Include latin tqlayout</string>
</property>
<property name="whatsThis" stdset="0">
- <string>If after you switch to this layout some keyboard shortcuts based on latin keys do not work try to enable this option.</string>
+ <string>If after you switch to this tqlayout 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 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>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>
</property>
</widget>
@@ -393,7 +393,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>210</width>
<height>20</height>
@@ -410,7 +410,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>210</width>
<height>20</height>
@@ -442,7 +442,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<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 layout will only affect the current application or window.</string>
+ <string>If you select "Application" or "Window" switching policy, changing the keyboard tqlayout 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 layout name in tray icon</string>
+ <string>Shows country flag on background of tqlayout 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 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>
+ <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>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
@@ -556,7 +556,7 @@
<bool>false</bool>
</property>
<property name="text">
- <string>Number of layouts to rotate:</string>
+ <string>Number of tqlayouts 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 layout</string>
+ <string>Show indicator for single tqlayout</string>
</property>
</widget>
</grid>
@@ -710,6 +710,6 @@
<include location="local" impldecl="in implementation">kdialogbase.h</include>
</includes>
<pixmapfunction>SmallIcon</pixmapfunction>
-<layoutdefaults spacing="6" margin="11"/>
-<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
+<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
</UI>
diff --git a/kxkb/kcmmisc.cpp b/kxkb/kcmmisc.cpp
index f66ea587..901b6bbe 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, "kcmlayout")
+ : KCModule (parent, "kcmtqlayout")
{
TQString wtstr;
TQBoxLayout* lay = new TQVBoxLayout(this, 0, KDialog::spacingHint());
@@ -286,7 +286,7 @@ int xkb_init()
&xkb_lmaj, &xkb_lmin );
}
-unsigned int xkb_mask_modifier( XkbDescPtr xkb, const char *name )
+unsigned int xkb_tqmask_modifier( XkbDescPtr xkb, const char *name )
{
int i;
if( !xkb || !xkb->names )
@@ -298,47 +298,47 @@ unsigned int xkb_mask_modifier( XkbDescPtr xkb, const char *name )
char* modStr = XGetAtomName( xkb->dpy, xkb->names->vmods[i] );
if( modStr != NULL && strcmp(name, modStr) == 0 )
{
- unsigned int mask;
- XkbVirtualModsToReal( xkb, 1 << i, &mask );
- return mask;
+ unsigned int tqmask;
+ XkbVirtualModsToReal( xkb, 1 << i, &tqmask );
+ return tqmask;
}
}
return 0;
}
-unsigned int xkb_numlock_mask()
+unsigned int xkb_numlock_tqmask()
{
XkbDescPtr xkb;
if(( xkb = XkbGetKeyboard( qt_xdisplay(), XkbAllComponentsMask, XkbUseCoreKbd )) != NULL )
{
- unsigned int mask = xkb_mask_modifier( xkb, "NumLock" );
+ unsigned int tqmask = xkb_tqmask_modifier( xkb, "NumLock" );
XkbFreeKeyboard( xkb, 0, True );
- return mask;
+ return tqmask;
}
return 0;
}
int xkb_set_on()
{
- unsigned int mask;
+ unsigned int tqmask;
if( !xkb_init())
return 0;
- mask = xkb_numlock_mask();
- if( mask == 0 )
+ tqmask = xkb_numlock_tqmask();
+ if( tqmask == 0 )
return 0;
- XkbLockModifiers ( qt_xdisplay(), XkbUseCoreKbd, mask, mask);
+ XkbLockModifiers ( qt_xdisplay(), XkbUseCoreKbd, tqmask, tqmask);
return 1;
}
int xkb_set_off()
{
- unsigned int mask;
+ unsigned int tqmask;
if( !xkb_init())
return 0;
- mask = xkb_numlock_mask();
- if( mask == 0 )
+ tqmask = xkb_numlock_tqmask();
+ if( tqmask == 0 )
return 0;
- XkbLockModifiers ( qt_xdisplay(), XkbUseCoreKbd, mask, 0);
+ XkbLockModifiers ( qt_xdisplay(), XkbUseCoreKbd, tqmask, 0);
return 1;
}
#endif
@@ -347,10 +347,10 @@ int xkb_set_off()
int xtest_get_numlock_state()
{
int i;
- int numlock_mask = 0;
+ int numlock_tqmask = 0;
Window dummy1, dummy2;
int dummy3, dummy4, dummy5, dummy6;
- unsigned int mask;
+ unsigned int tqmask;
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_mask = 1 << i;
+ numlock_tqmask = 1 << i;
}
XQueryPointer( qt_xdisplay(), DefaultRootWindow( qt_xdisplay() ), &dummy1, &dummy2,
- &dummy3, &dummy4, &dummy5, &dummy6, &mask );
+ &dummy3, &dummy4, &dummy5, &dummy6, &tqmask );
XFreeModifiermap( map );
- return mask & numlock_mask;
+ return tqmask & numlock_tqmask;
}
void xtest_change_numlock()
diff --git a/kxkb/kcmmiscwidget.ui b/kxkb/kcmmiscwidget.ui
index 47918829..ac0f3ca1 100644
--- a/kxkb/kcmmiscwidget.ui
+++ b/kxkb/kcmmiscwidget.ui
@@ -4,7 +4,7 @@
<property name="name">
<cstring>KeyboardConfigWidget</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<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>
-<layoutdefaults spacing="6" margin="11"/>
-<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
+<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
</UI>
diff --git a/kxkb/keyboard.desktop b/kxkb/keyboard.desktop
index 893d92d3..5840d629 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,layout,volume
+Keywords[it]=tastiera,ripetizione dei tasti,volume del clic,dispositivi di input,tqlayout,volume
Keywords[ja]=キーボード,キーボードリピート,クリック音量,入力デバイス,リピート,音量
Keywords[km]=ក្ដារចុច,ធ្វើ​ក្ដារចុច​ម្ដង​ទៀត,សំឡេង​ចុច,ឧបករណ៍​ព័ត៌មាន​បញ្ចូល,ធ្វើ​ម្ដង​ទៀត,សំឡេង
Keywords[lo]=ແປ້ນພິມ ,ການຈັດວາງແປ້ນພິມ,ອຸປະກອນຂໍ້ມູນເຂົ້າ
diff --git a/kxkb/keyboard_layout.desktop b/kxkb/keyboard_layout.desktop
index 2ba997aa..0d60fe66 100644
--- a/kxkb/keyboard_layout.desktop
+++ b/kxkb/keyboard_layout.desktop
@@ -1,12 +1,12 @@
[Desktop Entry]
-Exec=kcmshell keyboard_layout
+Exec=kcmshell keyboard_tqlayout
Icon=keyboard
Type=Application
DocPath=kxkb/index.html
X-KDE-ModuleType=Library
X-KDE-Library=keyboard
-X-KDE-FactoryName=keyboard_layout
+X-KDE-FactoryName=keyboard_tqlayout
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]=Tastaturlayout
-Name[de]=Tastaturlayout
+Name[da]=Tastaturtqlayout
+Name[de]=Tastaturtqlayout
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]=Tangentbordslayout
+Name[sv]=Tangentbordstqlayout
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]=Tastaturlayout
+Comment[da]=Tastaturtqlayout
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 layout
+Comment[sv]=Anpassa tangentbordets tqlayout
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 layout,toetseboerdyndieling,toetsenbordindeling,input devices,invoerapparaten,ynfierapparaten,randapparaten
+Keywords[fy]=keyboard,toetsenbord,toetseboerd,keyboard tqlayout,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 layout,Input Devices,Tipkovnica,Raspored tipkovnice,Međunarodno
+Keywords[hr]=Keyboard,Keyboard tqlayout,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 layout,toetsenbordindeling,input devices,invoerapparaten,randapparaten
+Keywords[nl]=keyboard,toetsenbord,keyboard tqlayout,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 43e9f804..576ddf4a 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 kcmlayout.cpp
+ // keep in sync with kcmtqlayout.cpp
keys = new KGlobalAccel(this);
#include "kxkbbindings.cpp"
keys->updateConnections();
- m_layoutOwnerMap = new LayoutMap(kxkbConfig);
+ m_tqlayoutOwnerMap = 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_layoutOwnerMap;
+ delete m_tqlayoutOwnerMap;
delete kWinModule;
}
@@ -101,7 +101,7 @@ int KXKBApp::newInstance()
m_extension->reset();
if( settingsRead() )
- layoutApply();
+ tqlayoutApply();
return 0;
}
@@ -143,29 +143,29 @@ bool KXKBApp::settingsRead()
kdDebug() << "Active window " << m_prevWinId << endl;
}
- m_layoutOwnerMap->reset();
- m_layoutOwnerMap->setCurrentWindow( m_prevWinId );
+ m_tqlayoutOwnerMap->reset();
+ m_tqlayoutOwnerMap->setCurrentWindow( m_prevWinId );
if( m_rules == NULL )
m_rules = new XkbRules(false);
- 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;
+ 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;
}
m_currentLayout = kxkbConfig.getDefaultLayout();
- if( kxkbConfig.m_layouts.count() == 1 ) {
- TQString layoutName = m_currentLayout.layout;
+ if( kxkbConfig.m_tqlayouts.count() == 1 ) {
+ TQString tqlayoutName = m_currentLayout.tqlayout;
TQString variantName = m_currentLayout.variant;
TQString includeName = m_currentLayout.includeGroup;
int group = m_currentLayout.defaultGroup;
- if( !m_extension->setLayout(kxkbConfig.m_model, layoutName, variantName, includeName, false)
+ if( !m_extension->setLayout(kxkbConfig.m_model, tqlayoutName, variantName, includeName, false)
|| !m_extension->setGroup( group ) ) {
- kdDebug() << "Error switching to single layout " << m_currentLayout.toPair() << endl;
+ kdDebug() << "Error switching to single tqlayout " << 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_layouts, *m_rules);
+ m_tray->initLayoutList(kxkbConfig.m_tqlayouts, *m_rules);
m_tray->setCurrentLayout(m_currentLayout);
m_tray->show();
}
-// This function activates the keyboard layout specified by the
+// This function activates the keyboard tqlayout specified by the
// configuration members (m_currentLayout)
-void KXKBApp::layoutApply()
+void KXKBApp::tqlayoutApply()
{
setLayout(m_currentLayout);
}
// kdcop
-bool KXKBApp::setLayout(const TQString& layoutPair)
+bool KXKBApp::setLayout(const TQString& tqlayoutPair)
{
- const LayoutUnit layoutUnitKey(layoutPair);
- if( kxkbConfig.m_layouts.contains(layoutUnitKey) ) {
- return setLayout( *kxkbConfig.m_layouts.find(layoutUnitKey) );
+ const LayoutUnit tqlayoutUnitKey(tqlayoutPair);
+ if( kxkbConfig.m_tqlayouts.tqcontains(tqlayoutUnitKey) ) {
+ return setLayout( *kxkbConfig.m_tqlayouts.find(tqlayoutUnitKey) );
}
return false;
}
-// Activates the keyboard layout specified by 'layoutUnit'
-bool KXKBApp::setLayout(const LayoutUnit& layoutUnit, int group)
+// Activates the keyboard tqlayout specified by 'tqlayoutUnit'
+bool KXKBApp::setLayout(const LayoutUnit& tqlayoutUnit, int group)
{
bool res = false;
if( group == -1 )
- group = layoutUnit.defaultGroup;
+ group = tqlayoutUnit.defaultGroup;
res = m_extension->setLayout(kxkbConfig.m_model,
- layoutUnit.layout, layoutUnit.variant,
- layoutUnit.includeGroup);
+ tqlayoutUnit.tqlayout, tqlayoutUnit.variant,
+ tqlayoutUnit.includeGroup);
if( res )
m_extension->setGroup(group); // not checking for ret - not important
if( res )
- m_currentLayout = layoutUnit;
+ m_currentLayout = tqlayoutUnit;
if (m_tray) {
if( res )
- m_tray->setCurrentLayout(layoutUnit);
+ m_tray->setCurrentLayout(tqlayoutUnit);
else
- m_tray->setError(layoutUnit.toPair());
+ m_tray->setError(tqlayoutUnit.toPair());
}
return res;
@@ -253,23 +253,23 @@ bool KXKBApp::setLayout(const LayoutUnit& layoutUnit, int group)
void KXKBApp::toggled()
{
- const LayoutUnit& layout = m_layoutOwnerMap->getNextLayout().layoutUnit;
- setLayout(layout);
+ const LayoutUnit& tqlayout = m_tqlayoutOwnerMap->getNextLayout().tqlayoutUnit;
+ setLayout(tqlayout);
}
void KXKBApp::menuActivated(int id)
{
if( KxkbLabelController::START_MENU_ID <= id
- && id < KxkbLabelController::START_MENU_ID + (int)kxkbConfig.m_layouts.count() )
+ && id < KxkbLabelController::START_MENU_ID + (int)kxkbConfig.m_tqlayouts.count() )
{
- const LayoutUnit& layout = kxkbConfig.m_layouts[id - KxkbLabelController::START_MENU_ID];
- m_layoutOwnerMap->setCurrentLayout( layout );
- setLayout( layout );
+ const LayoutUnit& tqlayout = kxkbConfig.m_tqlayouts[id - KxkbLabelController::START_MENU_ID];
+ m_tqlayoutOwnerMap->setCurrentLayout( tqlayout );
+ setLayout( tqlayout );
}
else if (id == KxkbLabelController::CONFIG_MENU_ID)
{
KProcess p;
- p << "kcmshell" << "keyboard_layout";
+ p << "kcmshell" << "keyboard_tqlayout";
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 layout/group from previous window
+ if( m_prevWinId != X11Helper::UNKNOWN_WINDOW_ID ) { // saving tqlayout/group from previous window
// kdDebug() << "storing " << m_currentLayout.toPair() << ":" << group << " for " << m_prevWinId << endl;
-// m_layoutOwnerMap->setCurrentWindow(m_prevWinId);
- m_layoutOwnerMap->setCurrentLayout(m_currentLayout);
- m_layoutOwnerMap->setCurrentGroup(group);
+// m_tqlayoutOwnerMap->setCurrentWindow(m_prevWinId);
+ m_tqlayoutOwnerMap->setCurrentLayout(m_currentLayout);
+ m_tqlayoutOwnerMap->setCurrentGroup(group);
}
m_prevWinId = winId;
if( winId != X11Helper::UNKNOWN_WINDOW_ID ) {
- m_layoutOwnerMap->setCurrentWindow(winId);
- const LayoutState& layoutState = m_layoutOwnerMap->getCurrentLayout();
+ m_tqlayoutOwnerMap->setCurrentWindow(winId);
+ const LayoutState& tqlayoutState = m_tqlayoutOwnerMap->getCurrentLayout();
- if( layoutState.layoutUnit != m_currentLayout ) {
- kdDebug() << "switching to " << layoutState.layoutUnit.toPair() << ":" << group << " for " << winId << endl;
- setLayout( layoutState.layoutUnit, layoutState.group );
+ if( tqlayoutState.tqlayoutUnit != m_currentLayout ) {
+ kdDebug() << "switching to " << tqlayoutState.tqlayoutUnit.toPair() << ":" << group << " for " << winId << endl;
+ setLayout( tqlayoutState.tqlayoutUnit, tqlayoutState.group );
}
- else if( layoutState.group != group ) { // we need to change only the group
- m_extension->setGroup(layoutState.group);
+ else if( tqlayoutState.group != group ) { // we need to change only the group
+ m_extension->setGroup(tqlayoutState.group);
}
}
}
@@ -331,18 +331,18 @@ void KXKBApp::slotSettingsChanged(int category)
/*
Viki (onscreen keyboard) has problems determining some modifiers states
- when kxkb uses precompiled layouts instead of setxkbmap. Probably a bug
- in the xkb functions used for the precompiled layouts *shrug*.
+ when kxkb uses precompiled tqlayouts instead of setxkbmap. Probably a bug
+ in the xkb functions used for the precompiled tqlayouts *shrug*.
*/
void KXKBApp::forceSetXKBMap( bool set )
{
if( m_forceSetXKBMap == set )
return;
m_forceSetXKBMap = set;
- layoutApply();
+ tqlayoutApply();
}
-/*Precompiles the keyboard layouts for faster activation later.
+/*Precompiles the keyboard tqlayouts 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_layouts.end();
+// TQValueList<LayoutUnit>::ConstIterator end = kxkbConfig.m_tqlayouts.end();
//
-// for (TQValueList<LayoutUnit>::ConstIterator it = kxkbConfig.m_layouts.begin(); it != end; ++it)
+// for (TQValueList<LayoutUnit>::ConstIterator it = kxkbConfig.m_tqlayouts.begin(); it != end; ++it)
// {
-// 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";
+// 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";
// // if( m_extension->getCompiledLayout(compiledLayoutFileName) )
-// m_compiledLayoutFileNames[layoutUnit.toPair()] = compiledLayoutFileName;
+// m_compiledLayoutFileNames[tqlayoutUnit.toPair()] = compiledLayoutFileName;
// // }
// // else {
-// // kdDebug() << "Error precompiling layout " << layout << endl;
+// // kdDebug() << "Error precompiling tqlayout " << tqlayout << endl;
// // }
// }
// }
diff --git a/kxkb/kxkb.desktop b/kxkb/kxkb.desktop
index 283e0a66..a68d98d0 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 Tastaturlayout
+Name[de]=Dienstprogramm zum Tastaturtqlayout
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 tangentbordslayout
+Name[sv]=Verktyg för tangentbordstqlayout
Name[ta]=விசைப்பலகை குறுக்குவழி கருவி
Name[tg]=Обзори нақшаи сафҳаи калид
Name[th]=เครื่องมือจัดตารางปุ่มพิมพ์
diff --git a/kxkb/kxkb.h b/kxkb/kxkb.h
index fc05c620..fafb26eb 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 layouts
+ and switching tqlayouts
*/
class KXKBApp : public KUniqueApplication
@@ -58,9 +58,9 @@ public:
virtual int newInstance();
- bool setLayout(const LayoutUnit& layoutUnit, int group=-1);
+ bool setLayout(const LayoutUnit& tqlayoutUnit, int group=-1);
k_dcop:
- bool setLayout(const TQString& layoutPair);
+ bool setLayout(const TQString& tqlayoutPair);
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 layoutApply();
+ void tqlayoutApply();
private:
void initTray();
@@ -84,7 +84,7 @@ private:
KxkbConfig kxkbConfig;
WId m_prevWinId; // for tricky part of saving xkb group
- LayoutMap* m_layoutOwnerMap;
+ LayoutMap* m_tqlayoutOwnerMap;
LayoutUnit m_currentLayout;
diff --git a/kxkb/kxkbconfig.cpp b/kxkb/kxkbconfig.cpp
index 0e62fbc2..0b285b86 100644
--- a/kxkb/kxkbconfig.cpp
+++ b/kxkb/kxkbconfig.cpp
@@ -32,10 +32,10 @@ const char* DEFAULT_MODEL = "pc104";
LayoutUnit KxkbConfig::getDefaultLayout()
{
- if( m_layouts.size() == 0 )
+ if( m_tqlayouts.size() == 0 )
return DEFAULT_LAYOUT_UNIT;
- return m_layouts[0];
+ return m_tqlayouts[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 layouts have been disabled we still want to set Xkb options
+// Even if the tqlayouts 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 layoutList;
+ TQStringList tqlayoutList;
if( config->hasKey("LayoutList") ) {
- layoutList = config->readListEntry("LayoutList");
+ tqlayoutList = config->readListEntry("LayoutList");
}
else { // old config
TQString mainLayout = config->readEntry("Layout", DEFAULT_LAYOUT_UNIT.toPair());
- layoutList = config->readListEntry("Additional");
- layoutList.prepend(mainLayout);
+ tqlayoutList = config->readListEntry("Additional");
+ tqlayoutList.prepend(mainLayout);
}
- if( layoutList.count() == 0 )
- layoutList.append("us");
+ if( tqlayoutList.count() == 0 )
+ tqlayoutList.append("us");
- 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;
+ 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;
}
- kdDebug() << "Found " << m_layouts.count() << " layouts, default is " << getDefaultLayout().toPair() << endl;
+ kdDebug() << "Found " << m_tqlayouts.count() << " tqlayouts, 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 layoutUnit( displayNamePair[0] );
- if( m_layouts.contains( layoutUnit ) ) {
- m_layouts[m_layouts.findIndex(layoutUnit)].displayName = displayNamePair[1].left(3);
+ LayoutUnit tqlayoutUnit( displayNamePair[0] );
+ if( m_tqlayouts.tqcontains( tqlayoutUnit ) ) {
+ m_tqlayouts[m_tqlayouts.findIndex(tqlayoutUnit)].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 layoutUnit( includePair[0] );
- if( m_layouts.contains( layoutUnit ) ) {
- m_layouts[m_layouts.findIndex(layoutUnit)].includeGroup = includePair[1];
+ LayoutUnit tqlayoutUnit( includePair[0] );
+ if( m_tqlayouts.tqcontains( tqlayoutUnit ) ) {
+ m_tqlayouts[m_tqlayouts.findIndex(tqlayoutUnit)].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 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 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 variantName = LayoutUnit::parseVariant(*it);
- m_layouts[m_layouts.findIndex(layoutUnit)].includeGroup = variantName;
- kdDebug() << "Got inc group: " << layoutUnit.toPair() << ": " << variantName << endl;
+ m_tqlayouts[m_tqlayouts.findIndex(tqlayoutUnit)].includeGroup = variantName;
+ kdDebug() << "Got inc group: " << tqlayoutUnit.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 layoutOwner = config->readEntry("SwitchMode", "Global");
+ TQString tqlayoutOwner = config->readEntry("SwitchMode", "Global");
- if( layoutOwner == "WinClass" ) {
+ if( tqlayoutOwner == "WinClass" ) {
m_switchingPolicy = SWITCH_POLICY_WIN_CLASS;
}
- else if( layoutOwner == "Window" ) {
+ else if( tqlayoutOwner == "Window" ) {
m_switchingPolicy = SWITCH_POLICY_WINDOW;
}
- else /*if( layoutOwner == "Global" )*/ {
+ else /*if( tqlayoutOwner == "Global" )*/ {
m_switchingPolicy = SWITCH_POLICY_GLOBAL;
}
- if( m_layouts.count() < 2 && m_switchingPolicy != SWITCH_POLICY_GLOBAL ) {
+ if( m_tqlayouts.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 " << layoutOwner << endl;
+ kdDebug() << "Layout owner mode " << tqlayoutOwner << 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_layouts.count() < 3 ) {
+ if( m_tqlayouts.count() < 3 ) {
kdWarning() << "Layout count is less than 3, sticky switching will be off" << endl;
m_stickySwitching = false;
}
else
- 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;
+ 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;
}
}
@@ -180,31 +180,31 @@ void KxkbConfig::save()
config->writeEntry("ResetOldOptions", m_resetOldOptions);
config->writeEntry("Options", m_options );
- TQStringList layoutList;
+ TQStringList tqlayoutList;
TQStringList includeList;
TQStringList displayNamesList;
TQValueList<LayoutUnit>::ConstIterator it;
- for(it = m_layouts.begin(); it != m_layouts.end(); ++it) {
- const LayoutUnit& layoutUnit = *it;
+ for(it = m_tqlayouts.begin(); it != m_tqlayouts.end(); ++it) {
+ const LayoutUnit& tqlayoutUnit = *it;
- layoutList.append( layoutUnit.toPair() );
+ tqlayoutList.append( tqlayoutUnit.toPair() );
- if( layoutUnit.includeGroup.isEmpty() == false ) {
- TQString incGroupUnit = TQString("%1:%2").arg(layoutUnit.toPair(), layoutUnit.includeGroup);
+ if( tqlayoutUnit.includeGroup.isEmpty() == false ) {
+ TQString incGroupUnit = TQString("%1:%2").arg(tqlayoutUnit.toPair(), tqlayoutUnit.includeGroup);
includeList.append( incGroupUnit );
}
- 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);
+ 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);
displayNamesList.append( displayName );
}
}
- config->writeEntry("LayoutList", layoutList);
- kdDebug() << "Saving Layouts: " << layoutList << endl;
+ config->writeEntry("LayoutList", tqlayoutList);
+ kdDebug() << "Saving Layouts: " << tqlayoutList << endl;
config->writeEntry("IncludeGroups", includeList);
kdDebug() << "Saving includeGroups: " << includeList << endl;
@@ -244,8 +244,8 @@ void KxkbConfig::setDefaults()
m_resetOldOptions = false;
m_options = "";
- m_layouts.clear();
- m_layouts.append( DEFAULT_LAYOUT_UNIT );
+ m_tqlayouts.clear();
+ m_tqlayouts.append( DEFAULT_LAYOUT_UNIT );
m_useKxkb = false;
m_showSingle = false;
@@ -259,12 +259,12 @@ void KxkbConfig::setDefaults()
TQStringList KxkbConfig::getLayoutStringList(/*bool compact*/)
{
- TQStringList layoutList;
- for(TQValueList<LayoutUnit>::ConstIterator it = m_layouts.begin(); it != m_layouts.end(); ++it) {
- const LayoutUnit& layoutUnit = *it;
- layoutList.append( layoutUnit.toPair() );
+ TQStringList tqlayoutList;
+ for(TQValueList<LayoutUnit>::ConstIterator it = m_tqlayouts.begin(); it != m_tqlayouts.end(); ++it) {
+ const LayoutUnit& tqlayoutUnit = *it;
+ tqlayoutList.append( tqlayoutUnit.toPair() );
}
- return layoutList;
+ return tqlayoutList;
}
@@ -291,21 +291,21 @@ TQString KxkbConfig::getDefaultDisplayName(const TQString& code_)
return displayName;
}
-TQString KxkbConfig::getDefaultDisplayName(const LayoutUnit& layoutUnit, bool single)
+TQString KxkbConfig::getDefaultDisplayName(const LayoutUnit& tqlayoutUnit, bool single)
{
- if( layoutUnit.variant == "" )
- return getDefaultDisplayName( layoutUnit.layout );
+ if( tqlayoutUnit.variant == "" )
+ return getDefaultDisplayName( tqlayoutUnit.tqlayout );
- TQString displayName = layoutUnit.layout.left(2);
+ TQString displayName = tqlayoutUnit.tqlayout.left(2);
if( single == false )
- displayName += layoutUnit.variant.left(1);
+ displayName += tqlayoutUnit.variant.left(1);
return displayName;
}
/**
- * @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
+ * @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
*/
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 layout(variant) string
- * @param[in] layvar String in form layout(variant) to parse
+ * @brief Gets the single variant part of a tqlayout(variant) string
+ * @param[in] layvar String in form tqlayout(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 82fe610c..9668a33d 100644
--- a/kxkb/kxkbconfig.h
+++ b/kxkb/kxkbconfig.h
@@ -18,7 +18,7 @@
#include <tqmap.h>
-/* Utility classes for per-window/per-application layout implementation
+/* Utility classes for per-window/per-application tqlayout implementation
*/
enum SwitchingPolicy {
SWITCH_POLICY_GLOBAL = 0,
@@ -37,7 +37,7 @@ inline TQString createPair(TQString key, TQString value)
}
struct LayoutUnit {
- TQString layout;
+ TQString tqlayout;
TQString variant;
TQString includeGroup;
TQString displayName;
@@ -45,8 +45,8 @@ struct LayoutUnit {
LayoutUnit() {}
- LayoutUnit(TQString layout_, TQString variant_):
- layout(layout_),
+ LayoutUnit(TQString tqlayout_, TQString variant_):
+ tqlayout(tqlayout_),
variant(variant_)
{}
@@ -55,26 +55,26 @@ struct LayoutUnit {
}
void setFromPair(const TQString& pair) {
- layout = parseLayout(pair);
+ tqlayout = parseLayout(pair);
variant = parseVariant(pair);
}
TQString toPair() const {
- return createPair(layout, variant);
+ return createPair(tqlayout, variant);
}
bool operator<(const LayoutUnit& lu) const {
- return layout<lu.layout ||
- (layout==lu.layout && variant<lu.variant);
+ return tqlayout<lu.tqlayout ||
+ (tqlayout==lu.tqlayout && variant<lu.variant);
}
bool operator!=(const LayoutUnit& lu) const {
- return layout!=lu.layout || variant!=lu.variant;
+ return tqlayout!=lu.tqlayout || variant!=lu.variant;
}
bool operator==(const LayoutUnit& lu) const {
-// kdDebug() << layout << "==" << lu.layout << "&&" << variant << "==" << lu.variant << endl;
- return layout==lu.layout && variant==lu.variant;
+// kdDebug() << tqlayout << "==" << lu.tqlayout << "&&" << variant << "==" << lu.variant << endl;
+ return tqlayout==lu.tqlayout && variant==lu.variant;
}
//private:
@@ -102,7 +102,7 @@ public:
TQString m_model;
TQString m_options;
- TQValueList<LayoutUnit> m_layouts;
+ TQValueList<LayoutUnit> m_tqlayouts;
LayoutUnit getDefaultLayout();
@@ -112,7 +112,7 @@ public:
TQStringList getLayoutStringList(/*bool compact*/);
static TQString getDefaultDisplayName(const TQString& code_);
- static TQString getDefaultDisplayName(const LayoutUnit& layoutUnit, bool single=false);
+ static TQString getDefaultDisplayName(const LayoutUnit& tqlayoutUnit, bool single=false);
private:
static const TQMap<TQString, TQString> parseIncludesMap(const TQStringList& pairList);
diff --git a/kxkb/kxkbtraywindow.cpp b/kxkb/kxkbtraywindow.cpp
index 749ef435..38cc5723 100644
--- a/kxkb/kxkbtraywindow.cpp
+++ b/kxkb/kxkbtraywindow.cpp
@@ -48,23 +48,23 @@ void KxkbLabelController::setPixmap(const TQPixmap& pixmap)
}
-void KxkbLabelController::setCurrentLayout(const LayoutUnit& layoutUnit)
+void KxkbLabelController::setCurrentLayout(const LayoutUnit& tqlayoutUnit)
{
- setToolTip(m_descriptionMap[layoutUnit.toPair()]);
- setPixmap( LayoutIcon::getInstance().findPixmap(layoutUnit.layout, m_showFlag, layoutUnit.displayName) );
+ setToolTip(m_descriptionMap[tqlayoutUnit.toPair()]);
+ setPixmap( LayoutIcon::getInstance().findPixmap(tqlayoutUnit.tqlayout, m_showFlag, tqlayoutUnit.displayName) );
}
-void KxkbLabelController::setError(const TQString& layoutInfo)
+void KxkbLabelController::setError(const TQString& tqlayoutInfo)
{
- TQString msg = i18n("Error changing keyboard layout to '%1'").arg(layoutInfo);
+ TQString msg = i18n("Error changing keyboard tqlayout to '%1'").arg(tqlayoutInfo);
setToolTip(msg);
label->setPixmap(LayoutIcon::getInstance().findPixmap("error", m_showFlag));
}
-void KxkbLabelController::initLayoutList(const TQValueList<LayoutUnit>& layouts, const XkbRules& rules)
+void KxkbLabelController::initLayoutList(const TQValueList<LayoutUnit>& tqlayouts, const XkbRules& rules)
{
// KPopupMenu* menu = contextMenu();
TQPopupMenu* menu = contextMenu;
@@ -85,15 +85,15 @@ void KxkbLabelController::initLayoutList(const TQValueList<LayoutUnit>& layouts,
int cnt = 0;
TQValueList<LayoutUnit>::ConstIterator it;
- for (it=layouts.begin(); it != layouts.end(); ++it)
+ for (it=tqlayouts.begin(); it != tqlayouts.end(); ++it)
{
- const TQString layoutName = (*it).layout;
+ const TQString tqlayoutName = (*it).tqlayout;
const TQString variantName = (*it).variant;
- const TQPixmap& layoutPixmap = LayoutIcon::getInstance().findPixmap(layoutName, m_showFlag, (*it).displayName);
- const TQPixmap pix = iconeffect.apply(layoutPixmap, KIcon::Small, KIcon::DefaultState);
+ const TQPixmap& tqlayoutPixmap = LayoutIcon::getInstance().findPixmap(tqlayoutName, m_showFlag, (*it).displayName);
+ const TQPixmap pix = iconeffect.apply(tqlayoutPixmap, KIcon::Small, KIcon::DefaultState);
- TQString fullName = i18n((rules.layouts()[layoutName]));
+ TQString fullName = i18n((rules.tqlayouts()[tqlayoutName]));
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 089a7906..66d1c722 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 layout,
+/* This class is responsible for displaying flag/label for the tqlayout,
catching keyboard/mouse events and displaying menu when selected
*/
@@ -37,10 +37,10 @@ public:
KxkbLabelController(TQLabel *label, TQPopupMenu* contextMenu);
- 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 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 setShowFlag(bool showFlag) { m_showFlag = showFlag; }
void show() { label->show(); }
diff --git a/kxkb/layoutmap.cpp b/kxkb/layoutmap.cpp
index 9c13fc49..93641d85 100644
--- a/kxkb/layoutmap.cpp
+++ b/kxkb/layoutmap.cpp
@@ -1,5 +1,5 @@
//
-// C++ Implementation: layoutmap
+// C++ Implementation: tqlayoutmap
//
// Description:
//
@@ -69,13 +69,13 @@ TQPtrQueue<LayoutState>& LayoutMap::getCurrentLayoutQueueInternal(WId winId)
//LayoutQueue&
TQPtrQueue<LayoutState>& LayoutMap::getCurrentLayoutQueue(WId winId)
{
- TQPtrQueue<LayoutState>& layoutQueue = getCurrentLayoutQueueInternal(winId);
- if( layoutQueue.count() == 0 ) {
- initLayoutQueue(layoutQueue);
- kdDebug() << "map: Created queue for " << winId << " size: " << layoutQueue.count() << endl;
+ TQPtrQueue<LayoutState>& tqlayoutQueue = getCurrentLayoutQueueInternal(winId);
+ if( tqlayoutQueue.count() == 0 ) {
+ initLayoutQueue(tqlayoutQueue);
+ kdDebug() << "map: Created queue for " << winId << " size: " << tqlayoutQueue.count() << endl;
}
- return layoutQueue;
+ return tqlayoutQueue;
}
LayoutState& LayoutMap::getCurrentLayout() {
@@ -83,50 +83,50 @@ LayoutState& LayoutMap::getCurrentLayout() {
}
LayoutState& LayoutMap::getNextLayout() {
- LayoutQueue& layoutQueue = getCurrentLayoutQueue(m_currentWinId);
- LayoutState* layoutState = layoutQueue.dequeue();
- layoutQueue.enqueue(layoutState);
+ LayoutQueue& tqlayoutQueue = getCurrentLayoutQueue(m_currentWinId);
+ LayoutState* tqlayoutState = tqlayoutQueue.dequeue();
+ tqlayoutQueue.enqueue(tqlayoutState);
- kdDebug() << "map: Next layout: " << layoutQueue.head()->layoutUnit.toPair()
- << " group: " << layoutQueue.head()->layoutUnit.defaultGroup << " for " << m_currentWinId << endl;
+ kdDebug() << "map: Next tqlayout: " << tqlayoutQueue.head()->tqlayoutUnit.toPair()
+ << " group: " << tqlayoutQueue.head()->tqlayoutUnit.defaultGroup << " for " << m_currentWinId << endl;
- return *layoutQueue.head();
+ return *tqlayoutQueue.head();
}
void LayoutMap::setCurrentGroup(int group) {
getCurrentLayout().group = group;
}
-void LayoutMap::setCurrentLayout(const LayoutUnit& layoutUnit) {
- LayoutQueue& layoutQueue = getCurrentLayoutQueue(m_currentWinId);
- kdDebug() << "map: Storing layout: " << layoutUnit.toPair()
- << " group: " << layoutUnit.defaultGroup << " for " << m_currentWinId << endl;
+void LayoutMap::setCurrentLayout(const LayoutUnit& tqlayoutUnit) {
+ LayoutQueue& tqlayoutQueue = getCurrentLayoutQueue(m_currentWinId);
+ kdDebug() << "map: Storing tqlayout: " << tqlayoutUnit.toPair()
+ << " group: " << tqlayoutUnit.defaultGroup << " for " << m_currentWinId << endl;
- int queueSize = (int)layoutQueue.count();
+ int queueSize = (int)tqlayoutQueue.count();
for(int ii=0; ii<queueSize; ii++) {
- if( layoutQueue.head()->layoutUnit == layoutUnit )
+ if( tqlayoutQueue.head()->tqlayoutUnit == tqlayoutUnit )
return; // if present return when it's in head
- LayoutState* layoutState = layoutQueue.dequeue();
+ LayoutState* tqlayoutState = tqlayoutQueue.dequeue();
if( ii < queueSize - 1 ) {
- layoutQueue.enqueue(layoutState);
+ tqlayoutQueue.enqueue(tqlayoutState);
}
else {
- delete layoutState;
- layoutQueue.enqueue(new LayoutState(layoutUnit));
+ delete tqlayoutState;
+ tqlayoutQueue.enqueue(new LayoutState(tqlayoutUnit));
}
}
for(int ii=0; ii<queueSize - 1; ii++) {
- LayoutState* layoutState = layoutQueue.dequeue();
- layoutQueue.enqueue(layoutState);
+ LayoutState* tqlayoutState = tqlayoutQueue.dequeue();
+ tqlayoutQueue.enqueue(tqlayoutState);
}
}
// private
-void LayoutMap::initLayoutQueue(LayoutQueue& layoutQueue) {
+void LayoutMap::initLayoutQueue(LayoutQueue& tqlayoutQueue) {
int queueSize = ( m_kxkbConfig.m_stickySwitching )
- ? m_kxkbConfig.m_stickySwitchingDepth : m_kxkbConfig.m_layouts.count();
+ ? m_kxkbConfig.m_stickySwitchingDepth : m_kxkbConfig.m_tqlayouts.count();
for(int ii=0; ii<queueSize; ii++) {
- layoutQueue.enqueue( new LayoutState(m_kxkbConfig.m_layouts[ii]) );
+ tqlayoutQueue.enqueue( new LayoutState(m_kxkbConfig.m_tqlayouts[ii]) );
}
}
diff --git a/kxkb/layoutmap.h b/kxkb/layoutmap.h
index 4be4cdfb..3a719796 100644
--- a/kxkb/layoutmap.h
+++ b/kxkb/layoutmap.h
@@ -1,5 +1,5 @@
//
-// C++ Interface: layoutmap
+// C++ Interface: tqlayoutmap
//
// Description:
//
@@ -26,14 +26,14 @@
// LayoutInfo is used for sticky switching and per-window/application switching policy
struct LayoutState {
- const LayoutUnit& layoutUnit;
+ const LayoutUnit& tqlayoutUnit;
int group;
- LayoutState(const LayoutUnit& layoutUnit_):
- layoutUnit(layoutUnit_),
- group(layoutUnit_.defaultGroup)
+ LayoutState(const LayoutUnit& tqlayoutUnit_):
+ tqlayoutUnit(tqlayoutUnit_),
+ group(tqlayoutUnit_.defaultGroup)
{
-// kdDebug() << "new LayoutState " << layoutUnit.toPair() << " group: " << group << endl;
+// kdDebug() << "new LayoutState " << tqlayoutUnit.toPair() << " group: " << group << endl;
}
};
@@ -48,7 +48,7 @@ public:
LayoutMap(const KxkbConfig& kxkbConfig);
// void setConfig(const KxkbConfig& kxkbConfig);
- void setCurrentLayout(const LayoutUnit& layoutUnit);
+ void setCurrentLayout(const LayoutUnit& tqlayoutUnit);
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& layoutQueue);
+ void initLayoutQueue(LayoutQueue& tqlayoutQueue);
LayoutQueue& getCurrentLayoutQueue(WId winId);
LayoutQueue& getCurrentLayoutQueueInternal(WId winId);
void clearMaps();
diff --git a/kxkb/pixmap.cpp b/kxkb/pixmap.cpp
index 0ca1500e..a059e954 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(qRgba(127,127,127,255)) );
-// TQBitmap mask;
-// mask.fill(1);
-// pix->setMask(mask);
+// pix->fill( TQColor(tqRgba(127,127,127,255)) );
+// TQBitmap tqmask;
+// tqmask.fill(1);
+// pix->setMask(tqmask);
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 layout name in xkb before xorg 6.9.0
+@brief Try to get country code from tqlayout name in xkb before xorg 6.9.0
*/
-TQString LayoutIcon::getCountryFromLayoutName(const TQString& layoutName)
+TQString LayoutIcon::getCountryFromLayoutName(const TQString& tqlayoutName)
{
TQString flag;
if( X11Helper::areLayoutsClean() ) { // >= Xorg 6.9.0
- if( layoutName == "mkd" )
+ if( tqlayoutName == "mkd" )
flag = "mk";
else
- if( layoutName == "srp" ) {
+ if( tqlayoutName == "srp" ) {
TQString csFlagFile = locate("locale", flagTemplate.arg("cs"));
flag = csFlagFile.isEmpty() ? "yu" : "cs";
}
else
- if( layoutName.endsWith("/jp") )
+ if( tqlayoutName.endsWith("/jp") )
flag = "jp";
else
- if( layoutName == "trq" || layoutName == "trf" || layoutName == "tralt" )
+ if( tqlayoutName == "trq" || tqlayoutName == "trf" || tqlayoutName == "tralt" )
flag = "tr";
else
- if( layoutName.length() > 2 )
+ if( tqlayoutName.length() > 2 )
flag = "";
else
- flag = layoutName;
+ flag = tqlayoutName;
}
else {
- if( layoutName == "ar" ) // Arabic - not argentina
+ if( tqlayoutName == "ar" ) // Arabic - not argentina
;
else
- if( layoutName == "sr" || layoutName == "cs") // Serbian language - Yugoslavia
+ if( tqlayoutName == "sr" || tqlayoutName == "cs") // Serbian language - Yugoslavia
flag = "yu";
else
- if( layoutName == "bs" ) // Bosnian language - Bosnia
+ if( tqlayoutName == "bs" ) // Bosnian language - Bosnia
flag = "ba";
else
- if( layoutName == "la" ) // Latin America
+ if( tqlayoutName == "la" ) // Latin America
;
else
- if( layoutName == "lo" ) // Lao
+ if( tqlayoutName == "lo" ) // Lao
flag = "la";
else
- if( layoutName == "pl2" ) // Poland
+ if( tqlayoutName == "pl2" ) // Poland
flag = "pl";
else
- if( layoutName == "iu" ) // Inuktitut - Canada
+ if( tqlayoutName == "iu" ) // Inuktitut - Canada
flag = "ca";
else
- if( layoutName == "syr" ) // Syriac
+ if( tqlayoutName == "syr" ) // Syriac
flag = "sy";
else
- if( layoutName == "dz" ) // Dzongka/Tibetian - Buthan
+ if( tqlayoutName == "dz" ) // Dzongka/Tibetian - Buthan
flag = "bt";
else
- if( layoutName == "ogham" ) // Ogham - Ireland
+ if( tqlayoutName == "ogham" ) // Ogham - Ireland
flag = "ie";
else
- if( layoutName == "ge_la" || layoutName == "ge_ru" )
+ if( tqlayoutName == "ge_la" || tqlayoutName == "ge_ru" )
flag = "ge";
else
- if( layoutName == "el" )
+ if( tqlayoutName == "el" )
flag = "gr";
else
- if( layoutName.endsWith("/jp") )
+ if( tqlayoutName.endsWith("/jp") )
flag = "jp";
else
- if( layoutName == "ml" || layoutName == "dev" || layoutName == "gur"
- || layoutName == "guj" || layoutName == "kan" || layoutName == "ori"
- || layoutName == "tel" || layoutName == "tml" || layoutName == "ben" ) // some Indian languages
+ if( tqlayoutName == "ml" || tqlayoutName == "dev" || tqlayoutName == "gur"
+ || tqlayoutName == "guj" || tqlayoutName == "kan" || tqlayoutName == "ori"
+ || tqlayoutName == "tel" || tqlayoutName == "tml" || tqlayoutName == "ben" ) // some Indian languages
flag = "in";
else {
- int sepPos = layoutName.find(TQRegExp("[-_]"));
- TQString leftCode = layoutName.mid(0, sepPos);
+ int sepPos = tqlayoutName.find(TQRegExp("[-_]"));
+ TQString leftCode = tqlayoutName.mid(0, sepPos);
TQString rightCode;
if( sepPos != -1 )
- rightCode = layoutName.mid(sepPos+1);
-// kdDebug() << "layout name breakup: " << leftCode << ":" << rightCode << endl;
+ rightCode = tqlayoutName.mid(sepPos+1);
+// kdDebug() << "tqlayout 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(qRgb(qRed(rgb)*3/4, qGreen(rgb)*3/4, qBlue(rgb)*3/4));
+ QRgb dimRgb(tqRgb(tqRed(rgb)*3/4, tqGreen(rgb)*3/4, tqBlue(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 layout)");
+ I18N_NOOP("Maltese (US tqlayout)");
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 7070d91b..661e74ef 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& layoutName);
+ TQString getCountryFromLayoutName(const TQString& tqlayoutName);
public:
static const TQString& ERROR_CODE;
diff --git a/kxkb/rules.cpp b/kxkb/rules.cpp
index dbf5b823..940b2db3 100644
--- a/kxkb/rules.cpp
+++ b/kxkb/rules.cpp
@@ -15,8 +15,8 @@
#include "rules.h"
-XkbRules::XkbRules(bool layoutsOnly):
- m_layouts(90)
+XkbRules::XkbRules(bool tqlayoutsOnly):
+ m_tqlayouts(90)
{
X11_DIR = X11Helper::findX11Dir();
@@ -34,23 +34,23 @@ XkbRules::XkbRules(bool layoutsOnly):
return;
}
- loadRules(rulesFile, layoutsOnly);
+ loadRules(rulesFile, tqlayoutsOnly);
loadOldLayouts(rulesFile);
loadGroups(::locate("config", "kxkb_groups"));
}
-void XkbRules::loadRules(TQString file, bool layoutsOnly)
+void XkbRules::loadRules(TQString file, bool tqlayoutsOnly)
{
- RulesInfo* rules = X11Helper::loadRules(file, layoutsOnly);
+ RulesInfo* rules = X11Helper::loadRules(file, tqlayoutsOnly);
if (rules == NULL) {
kdDebug() << "Unable to load rules" << endl;
return;
}
- m_layouts= rules->layouts;
- if( layoutsOnly == false ) {
+ m_tqlayouts= rules->tqlayouts;
+ if( tqlayoutsOnly == false ) {
m_models = rules->models;
m_options = rules->options;
}
@@ -65,7 +65,7 @@ void XkbRules::loadRules(TQString file, bool layoutsOnly)
// // the rule file wasn't found
// static struct {
// const char * locale;
-// const char * layout;
+// const char * tqlayout;
// } fixedLayouts[] = {
// { "ben", "Bengali" },
// { "ar", "Arabic" },
@@ -73,21 +73,21 @@ void XkbRules::loadRules(TQString file, bool layoutsOnly)
// { 0, 0 }
// };
//
-// 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);
+// 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);
// }
// }
-bool XkbRules::isSingleGroup(const TQString& layout)
+bool XkbRules::isSingleGroup(const TQString& tqlayout)
{
return X11Helper::areSingleGroupsSupported()
- && !m_oldLayouts.contains(layout)
- && !m_nonLatinLayouts.contains(layout);
+ && !m_oldLayouts.tqcontains(tqlayout)
+ && !m_nonLatinLayouts.tqcontains(tqlayout);
}
-// check $oldlayouts and $nonlatin groups for XFree 4.3 and later
+// check $oldtqlayouts 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 layouts in XFree 4.2 and older
-// or if layout is present in $oldlayout or $nonlatin groups
+// for multi-group tqlayouts in XFree 4.2 and older
+// or if tqlayout is present in $oldtqlayout 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& layout, const TQString& includeGroup)
+XkbRules::getDefaultGroup(const TQString& tqlayout, const TQString& includeGroup)
{
-// check for new one-group layouts in XFree 4.3 and older
- if( isSingleGroup(layout) ) {
+// check for new one-group tqlayouts in XFree 4.3 and older
+ if( isSingleGroup(tqlayout) ) {
if( includeGroup.isEmpty() == false )
return 1;
else
return 0;
}
- TQMap<TQString, unsigned int>::iterator it = m_initialGroups.find(layout);
+ TQMap<TQString, unsigned int>::iterator it = m_initialGroups.find(tqlayout);
return it == m_initialGroups.end() ? 0 : it.data();
}
QStringList
-XkbRules::getAvailableVariants(const TQString& layout)
+XkbRules::getAvailableVariants(const TQString& tqlayout)
{
- if( layout.isEmpty() || !layouts().find(layout) )
+ if( tqlayout.isEmpty() || !tqlayouts().find(tqlayout) )
return TQStringList();
- TQStringList* result1 = m_varLists[layout];
+ TQStringList* result1 = m_varLists[tqlayout];
if( result1 )
return *result1;
- bool oldLayouts = m_oldLayouts.contains(layout);
- TQStringList* result = X11Helper::getVariants(layout, X11_DIR, oldLayouts);
+ bool oldLayouts = m_oldLayouts.tqcontains(tqlayout);
+ TQStringList* result = X11Helper::getVariants(tqlayout, X11_DIR, oldLayouts);
- m_varLists.insert(layout, result);
+ m_varLists.insert(tqlayout, result);
return *result;
}
diff --git a/kxkb/rules.h b/kxkb/rules.h
index a4955317..27163a14 100644
--- a/kxkb/rules.h
+++ b/kxkb/rules.h
@@ -10,27 +10,27 @@ class XkbRules
{
public:
- XkbRules(bool layoutsOnly=false);
+ XkbRules(bool tqlayoutsOnly=false);
const TQDict<char> &models() const { return m_models; };
- const TQDict<char> &layouts() const { return m_layouts; };
+ const TQDict<char> &tqlayouts() const { return m_tqlayouts; };
const TQDict<char> &options() const { return m_options; };
- TQStringList getAvailableVariants(const TQString& layout);
- unsigned int getDefaultGroup(const TQString& layout, const TQString& includeGroup);
+ TQStringList getAvailableVariants(const TQString& tqlayout);
+ unsigned int getDefaultGroup(const TQString& tqlayout, const TQString& includeGroup);
- bool isSingleGroup(const TQString& layout);
+ bool isSingleGroup(const TQString& tqlayout);
protected:
- void loadRules(TQString filename, bool layoutsOnly=false);
+ void loadRules(TQString filename, bool tqlayoutsOnly=false);
void loadGroups(TQString filename);
void loadOldLayouts(TQString filename);
private:
TQDict<char> m_models;
- TQDict<char> m_layouts;
+ TQDict<char> m_tqlayouts;
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 e8f13f6a..c44ba797 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_layoutsClean = true;
+bool X11Helper::m_tqlayoutsClean = true;
const QString
X11Helper::findX11Dir()
@@ -107,7 +107,7 @@ X11Helper::findXkbRulesFile(TQString x11Dir, Display *dpy)
}
RulesInfo*
-X11Helper::loadRules(const TQString& file, bool layoutsOnly)
+X11Helper::loadRules(const TQString& file, bool tqlayoutsOnly)
{
XkbRF_RulesPtr xkbRules = XkbRF_Load(TQFile::encodeName(file).data(), "", true, true);
@@ -119,32 +119,32 @@ X11Helper::loadRules(const TQString& file, bool layoutsOnly)
RulesInfo* rulesInfo = new RulesInfo();
for (int i = 0; i < xkbRules->layouts.num_desc; ++i) {
- TQString layoutName(xkbRules->layouts.desc[i].name);
- rulesInfo->layouts.replace( layoutName, qstrdup( xkbRules->layouts.desc[i].desc ) );
+ TQString tqlayoutName(xkbRules->layouts.desc[i].name);
+ rulesInfo->tqlayouts.tqreplace( tqlayoutName, qstrdup( xkbRules->layouts.desc[i].desc ) );
- if( m_layoutsClean == true
- && layoutName.find( NON_CLEAN_LAYOUT_REGEXP ) != -1
- && layoutName.endsWith("/jp") == false ) {
+ if( m_tqlayoutsClean == true
+ && tqlayoutName.find( NON_CLEAN_LAYOUT_REGEXP ) != -1
+ && tqlayoutName.endsWith("/jp") == false ) {
kdDebug() << "Layouts are not clean (Xorg < 6.9.0 or XFree86)" << endl;
- m_layoutsClean = false;
+ m_tqlayoutsClean = false;
}
}
- if( layoutsOnly == true ) {
+ if( tqlayoutsOnly == true ) {
XkbRF_Free(xkbRules, true);
return rulesInfo;
}
for (int i = 0; i < xkbRules->models.num_desc; ++i)
- rulesInfo->models.replace(xkbRules->models.desc[i].name, qstrdup( xkbRules->models.desc[i].desc ) );
+ rulesInfo->models.tqreplace(xkbRules->models.desc[i].name, qstrdup( xkbRules->models.desc[i].desc ) );
for (int i = 0; i < xkbRules->options.num_desc; ++i)
- rulesInfo->options.replace(xkbRules->options.desc[i].name, qstrdup( xkbRules->options.desc[i].desc ) );
+ rulesInfo->options.tqreplace(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.replace("compose", "Compose Key Position");
+ rulesInfo->options.tqreplace("compose", "Compose Key Position");
}
for(TQDictIterator<char> it(rulesInfo->options) ; it.current() != NULL; ++it ) {
@@ -154,7 +154,7 @@ X11Helper::loadRules(const TQString& file, bool layoutsOnly)
if( columnPos != -1 ) {
TQString group = option.mid(0, columnPos);
if( rulesInfo->options.find(group) == NULL ) {
- rulesInfo->options.replace(group, group.latin1());
+ rulesInfo->options.tqreplace(group, group.latin1());
kdDebug() << "Added missing option group: " << group << endl;
}
}
@@ -162,17 +162,17 @@ X11Helper::loadRules(const TQString& file, bool layoutsOnly)
// // workaround for empty misc options group description in XFree86 4.4.0
// if( rulesInfo->options.find("numpad:microsoft") && !rulesInfo->options.find("misc") ) {
-// rulesInfo->options.replace("misc", "Miscellaneous compatibility options" );
+// rulesInfo->options.tqreplace("misc", "Miscellaneous compatibility options" );
// }
return rulesInfo;
}
-// check $oldlayouts and $nonlatin groups for XFree 4.3 and later
+// check $oldtqlayouts and $nonlatin groups for XFree 4.3 and later
OldLayouts*
X11Helper::loadOldLayouts(const TQString& rulesFile)
{
- static const char* oldLayoutsTag = "! $oldlayouts";
+ static const char* oldLayoutsTag = "! $oldtqlayouts";
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() << "oldlayouts " << m_oldLayouts.join("|") << endl;
+// kdDebug() << "oldtqlayouts " << m_oldLayouts.join("|") << endl;
if( !m_nonLatinLayouts.empty() )
break;
@@ -229,21 +229,21 @@ X11Helper::loadOldLayouts(const TQString& rulesFile)
}
-/* pretty simple algorithm - reads the layout file and
+/* pretty simple algorithm - reads the tqlayout file and
tries to find "xkb_symbols"
- also checks whether previous line contains "hidden" to skip it
+ also checks whether previous line tqcontains "hidden" to skip it
*/
TQStringList*
-X11Helper::getVariants(const TQString& layout, const TQString& x11Dir, bool oldLayouts)
+X11Helper::getVariants(const TQString& tqlayout, const TQString& x11Dir, bool oldLayouts)
{
TQStringList* result = new TQStringList();
TQString file = x11Dir + "xkb/symbols/";
- // workaround for XFree 4.3 new directory for one-group layouts
+ // workaround for XFree 4.3 new directory for one-group tqlayouts
if( TQDir(file+"pc").exists() && !oldLayouts )
file += "pc/";
- file += layout;
+ file += tqlayout;
// kdDebug() << "reading variants from " << file << endl;
diff --git a/kxkb/x11helper.h b/kxkb/x11helper.h
index 042fb4ce..058b3447 100644
--- a/kxkb/x11helper.h
+++ b/kxkb/x11helper.h
@@ -7,7 +7,7 @@
struct RulesInfo {
TQDict<char> models;
- TQDict<char> layouts;
+ TQDict<char> tqlayouts;
TQDict<char> options;
};
@@ -18,7 +18,7 @@ struct OldLayouts {
class X11Helper
{
- static bool m_layoutsClean;
+ static bool m_tqlayoutsClean;
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& layout, const TQString& x11Dir, bool oldLayouts=false);
- static RulesInfo* loadRules(const TQString& rulesFile, bool layoutsOnly=false);
+ static TQStringList* getVariants(const TQString& tqlayout, const TQString& x11Dir, bool oldLayouts=false);
+ static RulesInfo* loadRules(const TQString& rulesFile, bool tqlayoutsOnly=false);
static OldLayouts* loadOldLayouts(const TQString& rulesFile);
- static bool areLayoutsClean() { return m_layoutsClean; }
+ static bool areLayoutsClean() { return m_tqlayoutsClean; }
static bool areSingleGroupsSupported();
};