summaryrefslogtreecommitdiffstats
path: root/kkbswitch
diff options
context:
space:
mode:
Diffstat (limited to 'kkbswitch')
-rw-r--r--kkbswitch/Makefile.am2
-rw-r--r--kkbswitch/Makefile.am.kdeinit4
-rw-r--r--kkbswitch/boldmenuitem.cpp12
-rw-r--r--kkbswitch/kbconfig.cpp46
-rw-r--r--kkbswitch/kbconfig.h24
-rw-r--r--kkbswitch/kbconfigdlg.cpp32
-rw-r--r--kkbswitch/kbconfigdlg.h2
-rw-r--r--kkbswitch/kbpickicondlg.cpp20
-rw-r--r--kkbswitch/kbpickicondlg.h6
-rw-r--r--kkbswitch/kbswitchapp.cpp26
-rw-r--r--kkbswitch/kbswitchapp.h6
-rw-r--r--kkbswitch/kbswitchtrayicon.cpp46
-rw-r--r--kkbswitch/kbswitchtrayicon.h2
-rw-r--r--kkbswitch/kkbswitch.desktop10
-rw-r--r--kkbswitch/main.cpp16
-rw-r--r--kkbswitch/singlewindowwatcher.cpp4
-rw-r--r--kkbswitch/windowclasswatcher.cpp6
-rw-r--r--kkbswitch/windowwatcher.cpp10
-rw-r--r--kkbswitch/windowwatcher.h2
-rw-r--r--kkbswitch/xkeyboard.cpp2
20 files changed, 139 insertions, 139 deletions
diff --git a/kkbswitch/Makefile.am b/kkbswitch/Makefile.am
index f248900..89e1bef 100644
--- a/kkbswitch/Makefile.am
+++ b/kkbswitch/Makefile.am
@@ -7,7 +7,7 @@ kkbswitch_SOURCES = boldlistboxitem.cpp boldmenuitem.cpp kbconfig.cpp kbconfigdl
INCLUDES = $(all_includes)
-kkbswitch_LDADD = $(LIB_KIO) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) -lDCOP
+kkbswitch_LDADD = $(LIB_KIO) $(LIB_TDEUI) $(LIB_TDECORE) $(LIB_QT) -lDCOP
messages:
$(XGETTEXT) *.cpp -o $(podir)/kkbswitch.pot
diff --git a/kkbswitch/Makefile.am.kdeinit b/kkbswitch/Makefile.am.kdeinit
index 75ab6b8..918c856 100644
--- a/kkbswitch/Makefile.am.kdeinit
+++ b/kkbswitch/Makefile.am.kdeinit
@@ -3,13 +3,13 @@ METASOURCES = AUTO
bin_PROGRAMS =
lib_LTLIBRARIES =
-kdeinit_LTLIBRARIES = kkbswitch.la
+tdeinit_LTLIBRARIES = kkbswitch.la
kkbswitch_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -module -avoid-version
kkbswitch_la_SOURCES = boldlistboxitem.cpp boldmenuitem.cpp kbconfig.cpp kbconfigdlg.cpp kbgroup.cpp kbpickicondlg.cpp kbswitchapp.cpp kbswitchintf.cpp kbswitchtrayicon.cpp main.cpp pathlistboxitem.cpp xkeyboard.cpp kbswitchintf.skel boldlistboxitem.h boldmenuitem.h kbconfigdlg.h kbconfig.h kbgroup.h kbpickicondlg.h kbswitchapp.h kbswitchintf.h kbswitchtrayicon.h pathlistboxitem.h xkeyboard.h windowwatcher.cpp singlewindowwatcher.cpp windowclasswatcher.cpp
INCLUDES = $(all_includes)
-kkbswitch_la_LIBADD = $(LIB_KIO) $(LIB_KDEUI)
+kkbswitch_la_LIBADD = $(LIB_KIO) $(LIB_TDEUI)
messages:
$(XGETTEXT) *.cpp -o $(podir)/kkbswitch.pot
diff --git a/kkbswitch/boldmenuitem.cpp b/kkbswitch/boldmenuitem.cpp
index 69dee04..e98d3bb 100644
--- a/kkbswitch/boldmenuitem.cpp
+++ b/kkbswitch/boldmenuitem.cpp
@@ -21,10 +21,10 @@
#include <ntqpalette.h>
#include <ntqstyle.h>
#include <kdebug.h>
-#include <kglobalsettings.h>
-#include <kdeversion.h>
-#if KDE_VERSION_MAJOR >= 3
- #include <kapplication.h>
+#include <tdeglobalsettings.h>
+#include <tdeversion.h>
+#if TDE_VERSION_MAJOR >= 3
+ #include <tdeapplication.h>
#else
#include <kapp.h>
#endif
@@ -47,14 +47,14 @@ void BoldMenuItem::paint(TQPainter* painter, const TQColorGroup& /*cg*/,
font.setBold(m_bold);
painter->setFont(font);
}
- //if (act) painter->setPen(KGlobalSettings::highlightedTextColor());
+ //if (act) painter->setPen(TDEGlobalSettings::highlightedTextColor());
//if (act) painter->setPen(cg.highlightedText());
if (act) painter->setPen(m_active_text_color);
kdDebug() << "bg color = " << painter->brush().color().rgb() << endl;
painter->drawText(x, y, w, h, AlignLeft | AlignVCenter | ShowPrefix | DontClip,
m_text);
- //KApplication::style().drawItem(painter, TQRect(x, y, w, h), AlignLeft | AlignVCenter | ShowPrefix | DontClip,
+ //TDEApplication::style().drawItem(painter, TQRect(x, y, w, h), AlignLeft | AlignVCenter | ShowPrefix | DontClip,
// cg, enabled, 0, m_text);
}
diff --git a/kkbswitch/kbconfig.cpp b/kkbswitch/kbconfig.cpp
index 41bb6f1..02594af 100644
--- a/kkbswitch/kbconfig.cpp
+++ b/kkbswitch/kbconfig.cpp
@@ -16,17 +16,17 @@
***************************************************************************/
#include <config.h>
-#include <kdeversion.h>
-#include <klocale.h>
-#include <kglobal.h>
-#if KDE_VERSION_MAJOR >= 3
+#include <tdeversion.h>
+#include <tdelocale.h>
+#include <tdeglobal.h>
+#if TDE_VERSION_MAJOR >= 3
#include <kstandarddirs.h>
- #include <kapplication.h>
+ #include <tdeapplication.h>
#else
#include <kstddirs.h>
#include <kapp.h>
#endif
-#include <kglobalsettings.h>
+#include <tdeglobalsettings.h>
#include <kdebug.h>
#include <kglobalaccel.h>
@@ -58,7 +58,7 @@ KBConfig::KBConfig()
m_group_scope = SCOPE_GLOBAL;
m_autostart = true;
m_icon_style = ICON_CODE_AND_FLAG;
- //m_keys = new KGlobalAccel(NULL);
+ //m_keys = new TDEGlobalAccel(NULL);
m_keys = NULL;
}
@@ -67,8 +67,8 @@ KBConfig::~KBConfig()
delete m_keys;
}
-/** load the KBSwitch configration from the application KConfig object */
-void KBConfig::load(KConfig *config){
+/** load the KBSwitch configration from the application TDEConfig object */
+void KBConfig::load(TDEConfig *config){
config->setGroup(OPTIONS_SECTION);
m_toggle_mode = config->readBoolEntry(TOGGLE_MODE_ENTRY);
m_default_groupno = config->readNumEntry(DEFAULT_GROUP_ENTRY);
@@ -100,7 +100,7 @@ void KBConfig::load(KConfig *config){
}
if (m_keys) delete m_keys;
- m_keys = new KGlobalAccel(NULL);
+ m_keys = new TDEGlobalAccel(NULL);
for (int i = 0; i < groupCount(); i++) {
m_keys->insert(TQString::fromLatin1("SetGroup %1").arg(i),
i18n("Activate %1 keyboard layout").arg(m_groups[i]->getName()),
@@ -111,7 +111,7 @@ void KBConfig::load(KConfig *config){
checkKeysEnabled();
}
-void KBConfig::save(KConfig *config)
+void KBConfig::save(TDEConfig *config)
{
config->setGroup(OPTIONS_SECTION);
config->writeEntry(TOGGLE_MODE_ENTRY, m_toggle_mode);
@@ -130,9 +130,9 @@ void KBConfig::drawIcons(IconStyle icon_style, TQValueVector<TQPixmap> *icons,
TQString path, countryCode, langCode;
TQStringList layouts;
- KGlobal::dirs()->addResourceDir("appdata", ".");
- KConfig map("group_names", true, true, "appdata");
- KConfig *config = kapp->config();
+ TDEGlobal::dirs()->addResourceDir("appdata", ".");
+ TDEConfig map("group_names", true, true, "appdata");
+ TDEConfig *config = kapp->config();
config->setGroup(ICONS_SECTION);
getXkbLayouts(layouts);
@@ -163,8 +163,8 @@ void KBConfig::drawIcons(IconStyle icon_style, TQValueVector<TQPixmap> *icons,
/** No descriptions */
/*void KBConfig::guessGroupPixmaps(){
- KGlobal::dirs()->addResourceDir("appdata", ".");
- KConfig map("group_names", true, true, "appdata");
+ TDEGlobal::dirs()->addResourceDir("appdata", ".");
+ TDEConfig map("group_names", true, true, "appdata");
TQString path, countryCode, langCode;
TQPixmap pix;
@@ -188,7 +188,7 @@ void KBConfig::drawIcons(IconStyle icon_style, TQValueVector<TQPixmap> *icons,
}*/
bool KBConfig::getGroupImage(TQImage &img, TQString &path, const TQString &code,
- int group, KConfig *config)
+ int group, TDEConfig *config)
{
bool ret = true;
bool need_to_scale = false;
@@ -217,7 +217,7 @@ bool KBConfig::getGroupImage(TQImage &img, TQString &path, const TQString &code,
}
void KBConfig::drawFlagPixmap(TQPixmap &pix, TQString &path, const TQString &code,
- int group, KConfig *config)
+ int group, TDEConfig *config)
{
TQImage img;
if (getGroupImage(img, path, code, group, config))
@@ -232,9 +232,9 @@ void KBConfig::drawCodePixmap(TQPixmap &pix, const TQString &code)
TQFont font("helvetica", 9, TQFont::Bold);
font.setPixelSize(10);
painter.setFont(font);
- painter.setPen(KGlobalSettings::highlightedTextColor());
+ painter.setPen(TDEGlobalSettings::highlightedTextColor());
- pix.fill(KGlobalSettings::highlightColor());
+ pix.fill(TDEGlobalSettings::highlightColor());
painter.drawText(1, 0, pix.width(), pix.height(),
TQt::AlignHCenter | TQt::AlignVCenter, code.upper());
@@ -243,13 +243,13 @@ void KBConfig::drawCodePixmap(TQPixmap &pix, const TQString &code)
}
void KBConfig::drawCodeAndFlagPixmap(TQPixmap &pix, TQString &path,
- const TQString &countryCode, const TQString &langCode, int group, KConfig *config)
+ const TQString &countryCode, const TQString &langCode, int group, TDEConfig *config)
{
TQImage img;
if (!getGroupImage(img, path, countryCode, group, config)) return; // could not find flag
if (img.depth() <= 8) img = img.convertDepth(32);
- // the following code is taken from kdebase/kxkb/pixmap.cpp
+ // the following code is taken from tdebase/kxkb/pixmap.cpp
for (int y = 0; y < img.height(); y++)
for(int x = 0; x < img.width(); x++) {
TQRgb rgb = img.pixel(x, y);
@@ -297,7 +297,7 @@ void KBConfig::checkKeysEnabled()
}*/
/** No descriptions */
-/*void KBConfig::loadConfiguredPixmaps(KConfig *config){
+/*void KBConfig::loadConfiguredPixmaps(TDEConfig *config){
TQString path;
TQPixmap pix;
config->setGroup(ICONS_SECTION);
diff --git a/kkbswitch/kbconfig.h b/kkbswitch/kbconfig.h
index c5ecaac..5ff3936 100644
--- a/kkbswitch/kbconfig.h
+++ b/kkbswitch/kbconfig.h
@@ -22,7 +22,7 @@
#include <ntqptrvector.h>
#include <ntqvaluevector.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
#define ICONS_SECTION "Icons"
#define OPTIONS_SECTION "Options"
@@ -30,7 +30,7 @@
#define FLAG_ICON_WIDTH 21
#define FLAG_ICON_HEIGHT 14
-class KGlobalAccel;
+class TDEGlobalAccel;
typedef TQPtrVector<KBGroup> KBGroupVector;
@@ -51,7 +51,7 @@ private:
bool m_autostart;
bool m_use_shortcuts;
IconStyle m_icon_style;
- KGlobalAccel *m_keys;
+ TDEGlobalAccel *m_keys;
public:
KBConfig();
~KBConfig();
@@ -72,11 +72,11 @@ public:
void set_icon_style(IconStyle value) { m_icon_style = value; }
bool use_shortcuts() { return m_use_shortcuts; }
void set_use_shortcuts(bool value) { m_use_shortcuts = value; }
- KGlobalAccel *keys() { return m_keys; }
- /** Load the KBSwitch configration from the application KConfig object */
- void load(KConfig *config);
- /** Save the KBSwitch configration to the application KConfig object */
- void save(KConfig *config);
+ TDEGlobalAccel *keys() { return m_keys; }
+ /** Load the KBSwitch configration from the application TDEConfig object */
+ void load(TDEConfig *config);
+ /** Save the KBSwitch configration to the application TDEConfig object */
+ void save(TDEConfig *config);
/** No descriptions */
/*void notifyChanged();*/
/*static TQString entryForGroup(int i) {
@@ -94,16 +94,16 @@ private: // Private methods
/** No descriptions */
//void drawDefaultPixmaps();
/** No descriptions */
- //void loadConfiguredPixmaps(KConfig *config);
+ //void loadConfiguredPixmaps(TDEConfig *config);
void drawFlagPixmap(TQPixmap &pix, TQString &path, const TQString &code,
- int group, KConfig *config);
+ int group, TDEConfig *config);
void drawCodePixmap(TQPixmap &pix, const TQString &code);
void drawCodeAndFlagPixmap(TQPixmap &pix, TQString &path,
const TQString &countryCode, const TQString &langCode, int group,
- KConfig *config);
+ TDEConfig *config);
void drawDefaultPixmap(TQPixmap &pix, int group);
bool getGroupImage(TQImage &img, TQString &path, const TQString &code, int group,
- KConfig *config);
+ TDEConfig *config);
void getXkbLayouts(TQStringList &layouts);
};
diff --git a/kkbswitch/kbconfigdlg.cpp b/kkbswitch/kbconfigdlg.cpp
index 3a5b74d..e299aea 100644
--- a/kkbswitch/kbconfigdlg.cpp
+++ b/kkbswitch/kbconfigdlg.cpp
@@ -31,18 +31,18 @@
#include <ntqpushbutton.h>
#include <ntqcombobox.h>
-#include <kdeversion.h>
-#include <klistbox.h>
-#include <klocale.h>
+#include <tdeversion.h>
+#include <tdelistbox.h>
+#include <tdelocale.h>
#include <kdebug.h>
-#if KDE_VERSION_MAJOR >= 3
- #include <kapplication.h>
+#if TDE_VERSION_MAJOR >= 3
+ #include <tdeapplication.h>
#else
#include <kapp.h>
#endif
-#include <klistview.h>
+#include <tdelistview.h>
#include <kkeydialog.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
/* This little subclass of KKeyChooser reimplements sizeHint() to
look a little smaller in our config dialog. The default size
@@ -53,7 +53,7 @@ private:
TQSize m_size_hint;
void calcSizeHint();
public:
- SmallerKeyChooser(KGlobalAccel *accel, TQWidget *parent) :
+ SmallerKeyChooser(TDEGlobalAccel *accel, TQWidget *parent) :
KKeyChooser(accel, parent) { calcSizeHint(); }
virtual TQSize sizeHint() const { return m_size_hint; }
};
@@ -62,7 +62,7 @@ void SmallerKeyChooser::calcSizeHint()
{
m_size_hint = KKeyChooser::sizeHint();
- KListView *lv = NULL;
+ TDEListView *lv = NULL;
TQGroupBox *gb = NULL;
const TQObjectList *objects = children();
TQObjectListIt iter(*objects);
@@ -70,8 +70,8 @@ void SmallerKeyChooser::calcSizeHint()
while ( (obj = iter.current()) ) {
++iter;
- if (obj->inherits("KListView"))
- lv = dynamic_cast<KListView*>(obj);
+ if (obj->inherits("TDEListView"))
+ lv = dynamic_cast<TDEListView*>(obj);
else if (obj->inherits("TQGroupBox"))
gb = dynamic_cast<TQGroupBox*>(obj);
}
@@ -123,7 +123,7 @@ void KBConfigDlg::setupGeneralPage()
TQHBoxLayout *groupsLayout = new TQHBoxLayout(vlayout);
groupsLayout->setSpacing(2);
- lbGroups = new KListBox(page);
+ lbGroups = new TDEListBox(page);
TQObject::connect(lbGroups, SIGNAL(selectionChanged()), this, SLOT(slotLayoutSelected()));
TQObject::connect(lbGroups, SIGNAL(doubleClicked(TQListBoxItem *)), this,
SLOT(slotListBoxExecuted(TQListBoxItem *)));
@@ -231,7 +231,7 @@ void KBConfigDlg::setupShortcutsPage()
void KBConfigDlg::showConfig(){
int i;
KBGroup *group;
- KConfig *conf = kapp->config();
+ TDEConfig *conf = kapp->config();
m_iconpaths.clear();
conf->setGroup(ICONS_SECTION);
@@ -307,7 +307,7 @@ void KBConfigDlg::slotListBoxExecuted(TQListBoxItem *){
void KBConfigDlg::saveConfig(){
TQString path;
const TQPixmap *pix;
- KConfig *conf = kapp->config();
+ TDEConfig *conf = kapp->config();
conf->setGroup(ICONS_SECTION);
for (int i = 0; i < m_kbconf->groupCount(); i++) {
path = m_iconpaths[i];
@@ -368,7 +368,7 @@ void KBConfigDlg::redrawIcons(KBConfig::IconStyle icon_style)
void KBConfigDlg::slotCancel()
{
- KConfig *config = kapp->config();
+ TDEConfig *config = kapp->config();
config->rollback();
config->reparseConfiguration();
KDialogBase::slotCancel();
@@ -397,7 +397,7 @@ void KBConfigDlg::slotSetDefaultIcon()
*/
void KBConfigDlg::checkIconDefault(int index)
{
- KConfig *conf = kapp->config();
+ TDEConfig *conf = kapp->config();
if (index == -1 || ! iconTypeShowsFlag(KBConfig::IconStyle(cbxIconType->currentItem()))) {
btnSetDefaultIcon->setEnabled(false);
}
diff --git a/kkbswitch/kbconfigdlg.h b/kkbswitch/kbconfigdlg.h
index bead1ad..aa93fef 100644
--- a/kkbswitch/kbconfigdlg.h
+++ b/kkbswitch/kbconfigdlg.h
@@ -40,7 +40,7 @@ public:
~KBConfigDlg();
private: // Private attributes
/** */
- KListBox *lbGroups;
+ TDEListBox *lbGroups;
/** */
TQCheckBox *chkToggleMode;
//TQCheckBox *chkPerwindowGroup;
diff --git a/kkbswitch/kbpickicondlg.cpp b/kkbswitch/kbpickicondlg.cpp
index c4dc299..b3821ef 100644
--- a/kkbswitch/kbpickicondlg.cpp
+++ b/kkbswitch/kbpickicondlg.cpp
@@ -23,16 +23,16 @@
#include <ntqpushbutton.h>
#include <ntqimage.h>
-#include <kdeversion.h>
-#include <klocale.h>
-#if KDE_VERSION_MAJOR >= 3
+#include <tdeversion.h>
+#include <tdelocale.h>
+#if TDE_VERSION_MAJOR >= 3
#include <kstandarddirs.h>
#else
#include <kstddirs.h>
#endif
-#include <kglobal.h>
-#include <kfiledialog.h>
-#include <kmessagebox.h>
+#include <tdeglobal.h>
+#include <tdefiledialog.h>
+#include <tdemessagebox.h>
#include "kbconfig.h"
#include "pathlistboxitem.h"
@@ -42,7 +42,7 @@ KBPickIconDlg::KBPickIconDlg(const TQString &currentPath, const TQPixmap &curren
: KDialogBase(parent, name, true /*modal*/, i18n("Pick an icon") /*caption*/, Ok | Cancel) {
TQVBox *page = makeVBoxMainWidget();
- lbIcons = new KListBox(page);
+ lbIcons = new TDEListBox(page);
TQObject::connect(lbIcons, SIGNAL(doubleClicked(TQListBoxItem*)),
this, SLOT(slotOk()));
TQObject::connect(lbIcons, SIGNAL(returnPressed(TQListBoxItem*)),
@@ -133,7 +133,7 @@ void KBPickIconDlg::loadCountryFlags()
TQDir dir;
TQStringList locales;
TQString path;
- TQStringList dirs = KGlobal::dirs()->findDirs("locale", "l10n");
+ TQStringList dirs = TDEGlobal::dirs()->findDirs("locale", "l10n");
for (TQStringList::Iterator dirIter = dirs.begin(); dirIter != dirs.end(); dirIter++) {
dir.setPath(*dirIter);
@@ -141,7 +141,7 @@ void KBPickIconDlg::loadCountryFlags()
for (TQStringList::Iterator iter = locales.begin(); iter != locales.end(); iter++) {
path = dir.path() + "/" + *iter + "/flag.png";
if (*iter != "." && *iter != ".." && pix.load(path)) {
- KConfig config(dir.path() + "/" + *iter + "/entry.desktop", true, false,
+ TDEConfig config(dir.path() + "/" + *iter + "/entry.desktop", true, false,
"locale" /*doesn't really matter*/);
config.setGroup("KCM Locale");
new PathListBoxItem(lbIcons, pix, config.readEntry("Name"), path);
@@ -166,7 +166,7 @@ void KBPickIconDlg::loadGkbCountryFlags()
path = info->filePath();
code = info->baseName();
if (img.load(path)) {
- KConfig config("l10n/" + code + "/entry.desktop", true, false, "locale");
+ TDEConfig config("l10n/" + code + "/entry.desktop", true, false, "locale");
config.setGroup("KCM Locale");
name = config.readEntry("Name");
if (!name.isNull()) {
diff --git a/kkbswitch/kbpickicondlg.h b/kkbswitch/kbpickicondlg.h
index 0f5e0f4..fba5cd5 100644
--- a/kkbswitch/kbpickicondlg.h
+++ b/kkbswitch/kbpickicondlg.h
@@ -23,7 +23,7 @@
class TQWidget;
class TQStringList;
class TQPixmap;
-class KListBox;
+class TDEListBox;
/**A dialog to pick an icon for a keyboard layout
*@author Leonid Zeitlin
@@ -43,8 +43,8 @@ private: // Private attributes
/** */
//TQStringList m_pathnames;
//TQString m_iconpath;
- //KIconView *m_iconview;
- KListBox *lbIcons;
+ //TDEIconView *m_iconview;
+ TDEListBox *lbIcons;
//TQLabel *lblIcon;
//TQRadioButton *rbFlags;
//TQRadioButton *rbBrowse;
diff --git a/kkbswitch/kbswitchapp.cpp b/kkbswitch/kbswitchapp.cpp
index 7798be3..50ce80a 100644
--- a/kkbswitch/kbswitchapp.cpp
+++ b/kkbswitch/kbswitchapp.cpp
@@ -22,13 +22,13 @@
#include "windowclasswatcher.h"
#include <kdebug.h>
-#include <klocale.h>
-#include <kwinmodule.h>
+#include <tdelocale.h>
+#include <twinmodule.h>
KBSwitchApp::KBSwitchApp()
{
#ifndef HAVE_LIBXKLAVIER
- //m_kwin_module = NULL;
+ //m_twin_module = NULL;
m_watcher = NULL;
#endif
if (!m_xkb.xkbAvailable()) return; // oops! No XKB in the server
@@ -87,7 +87,7 @@ KBSwitchApp::~KBSwitchApp(){
bool KBSwitchApp::x11EventFilter(XEvent *e){
// let m_xkb process the event and emit signals if necessary
m_xkb.processEvent(e);
- return KApplication::x11EventFilter(e);
+ return TDEApplication::x11EventFilter(e);
}
/** Update the tray icon to show the flag corresponding to the current keyboard group */
@@ -295,7 +295,7 @@ void KBSwitchApp::resetWindowMap()
m_window_map.clear();
- if (m_kwin_module && (active_window_id = m_kwin_module->activeWindow()))
+ if (m_twin_module && (active_window_id = m_twin_module->activeWindow()))
addWindowToMap(active_window_id);
else
m_active_window = m_window_map.end();
@@ -304,10 +304,10 @@ void KBSwitchApp::resetWindowMap()
/** Enable window manager notifications */
/*void KBSwitchApp::enableKWinModule()
{
- if (m_kwin_module == NULL) {
- m_kwin_module = new KWinModule();
- connect(m_kwin_module, SIGNAL(activeWindowChanged(WId)), SLOT(slotWindowChanged(WId)));
- connect(m_kwin_module, SIGNAL(windowRemoved(WId)), SLOT(slotWindowRemoved(WId)));
+ if (m_twin_module == NULL) {
+ m_twin_module = new KWinModule();
+ connect(m_twin_module, SIGNAL(activeWindowChanged(WId)), SLOT(slotWindowChanged(WId)));
+ connect(m_twin_module, SIGNAL(windowRemoved(WId)), SLOT(slotWindowRemoved(WId)));
resetWindowMap();
if (m_cur_groupno != -1 && m_cur_groupno != m_kbconf.default_groupno())
setStartGroup(m_kbconf.default_groupno());
@@ -317,10 +317,10 @@ void KBSwitchApp::resetWindowMap()
/** Disable window manager notifications */
/*void KBSwitchApp::disableKWinModule()
{
- if (m_kwin_module) {
- m_kwin_module->disconnect();
- delete m_kwin_module;
- m_kwin_module = NULL;
+ if (m_twin_module) {
+ m_twin_module->disconnect();
+ delete m_twin_module;
+ m_twin_module = NULL;
resetWindowMap();
}
}*/
diff --git a/kkbswitch/kbswitchapp.h b/kkbswitch/kbswitchapp.h
index f59d120..b730252 100644
--- a/kkbswitch/kbswitchapp.h
+++ b/kkbswitch/kbswitchapp.h
@@ -22,8 +22,8 @@
#include <config.h>
#endif
-#include <kdeversion.h>
-#if KDE_VERSION_MAJOR >= 3
+#include <tdeversion.h>
+#if TDE_VERSION_MAJOR >= 3
#include <kuniqueapplication.h>
#else
#include <kuniqueapp.h>
@@ -72,7 +72,7 @@ private: // Private attributes
KBSwitchIntf *m_intf;
#ifndef HAVE_LIBXKLAVIER
/** Window manager interface */
- //KWinModule *m_kwin_module;
+ //KWinModule *m_twin_module;
/** Maps Window IDs to their keyboard groups */
//KBWindowMap m_window_map;
//KBWindowMap::iterator m_active_window;
diff --git a/kkbswitch/kbswitchtrayicon.cpp b/kkbswitch/kbswitchtrayicon.cpp
index 908875c..335f906 100644
--- a/kkbswitch/kbswitchtrayicon.cpp
+++ b/kkbswitch/kbswitchtrayicon.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include <kdeversion.h>
+#include <tdeversion.h>
#undef USE_BOLD_MENUITEM
@@ -24,37 +24,37 @@
#ifdef USE_BOLD_MENUITEM
#include "boldmenuitem.h"
#endif
-#include <kpopupmenu.h>
-#if KDE_VERSION_MAJOR >= 3
+#include <tdepopupmenu.h>
+#if TDE_VERSION_MAJOR >= 3
#include <kstandarddirs.h>
#else
#include <kstddirs.h>
#endif
-#include <klocale.h>
+#include <tdelocale.h>
#include <kstdaction.h>
-#include <kaction.h>
-#include <kaboutapplication.h>
-#if KDE_VERSION_MAJOR >= 3
- #include <kapplication.h>
+#include <tdeaction.h>
+#include <tdeaboutapplication.h>
+#if TDE_VERSION_MAJOR >= 3
+ #include <tdeapplication.h>
#else
#include <kapp.h>
#endif
#include <kiconloader.h>
#include <kdebug.h>
-#include <kdeversion.h>
+#include <tdeversion.h>
#include <ntqtooltip.h>
#include <ntqstyle.h>
#include <ntqpainter.h>
#ifdef USE_BOLD_MENUITEM
-static TQColor getActiveTextColor(KPopupMenu *menu)
+static TQColor getActiveTextColor(TDEPopupMenu *menu)
{
int id = menu->insertItem("test text");
TQMenuItem *item = menu->findItem(id);
TQStyleOption styleopt = TQStyleOption(item);
TQPainter painter(menu);
TQColorGroup &cg = menu->colorGroup();
- KApplication::style().drawControl(TQStyle::CE_PopupMenuItem, &painter, menu,
+ TDEApplication::style().drawControl(TQStyle::CE_PopupMenuItem, &painter, menu,
menu->contentsRect(), cg, TQStyle::Style_Enabled | TQStyle::Style_Active,
styleopt);
menu->removeItem(id);
@@ -64,8 +64,8 @@ static TQColor getActiveTextColor(KPopupMenu *menu)
KBSwitchTrayIcon::KBSwitchTrayIcon(KBConfig *conf){
TQPixmap pix;
-#if KDE_VERSION_MAJOR >= 3
- KActionCollection *actions = new KActionCollection(this);
+#if TDE_VERSION_MAJOR >= 3
+ TDEActionCollection *actions = new TDEActionCollection(this);
#define ACTION_PARENT actions
#else
#define ACTION_PARENT this
@@ -73,21 +73,21 @@ KBSwitchTrayIcon::KBSwitchTrayIcon(KBConfig *conf){
m_kbconf = conf;
//TQObject::connect(conf, SIGNAL(changed()), this, SLOT(updateMenuIcons()));
- KPopupMenu * menu = contextMenu();
+ TDEPopupMenu * menu = contextMenu();
addLayoutItems(menu, false);
TQObject::connect(menu, SIGNAL(activated(int)), this, SLOT(slotMenuActivated(int)));
menu->insertSeparator();
- KAction *pref = KStdAction::preferences(this, SIGNAL(preferencesSelected()), ACTION_PARENT);
+ TDEAction *pref = KStdAction::preferences(this, SIGNAL(preferencesSelected()), ACTION_PARENT);
pref->plug(menu);
- KAction *help = KStdAction::help(this, SLOT(slotHelp()), ACTION_PARENT);
+ TDEAction *help = KStdAction::help(this, SLOT(slotHelp()), ACTION_PARENT);
help->plug(menu);
- KAction *about = KStdAction::aboutApp(this, SLOT(slotAbout()), ACTION_PARENT);
+ TDEAction *about = KStdAction::aboutApp(this, SLOT(slotAbout()), ACTION_PARENT);
about->plug(menu);
/*TQString path = locate("icon", "hicolor/16x16/apps/locale.png");
if (!path.isEmpty()) pix.load(path);*/
- pix = kapp->iconLoader()->loadIcon("locale", KIcon::Small);
+ pix = kapp->iconLoader()->loadIcon("locale", TDEIcon::Small);
menu->changeTitle(menu->idAt(0), pix, i18n("Keyboard Switch"));
setAlignment(TQt::AlignHCenter | TQt::AlignCenter);
}
@@ -103,7 +103,7 @@ void KBSwitchTrayIcon::slotMenuActivated(int id){
/** No descriptions */
void KBSwitchTrayIcon::setActiveGroup(int groupno){
int i;
- KPopupMenu *menu = contextMenu();
+ TDEPopupMenu *menu = contextMenu();
for (i = 0; i < m_kbconf->groupCount(); i++)
menu->setItemChecked(i, false);
menu->setItemChecked(groupno, true);
@@ -113,7 +113,7 @@ void KBSwitchTrayIcon::setActiveGroup(int groupno){
void KBSwitchTrayIcon::setToggleGroups(int group1, int group2){
int i;
bool toggling;
- KPopupMenu *menu = contextMenu();
+ TDEPopupMenu *menu = contextMenu();
for (i = 0; i < m_kbconf->groupCount(); i++) {
toggling = (i == group1 || i == group2);
@@ -138,20 +138,20 @@ void KBSwitchTrayIcon::mouseReleaseEvent(TQMouseEvent *event){
/** No descriptions */
void KBSwitchTrayIcon::slotAbout(){
- KAboutApplication about;
+ TDEAboutApplication about;
about.exec();
}
/** No descriptions */
void KBSwitchTrayIcon::updateMenuIcons(){
- KPopupMenu *menu = contextMenu();
+ TDEPopupMenu *menu = contextMenu();
for (int i = 0; i < m_kbconf->groupCount(); i++) {
menu->changeItem(i, m_kbconf->getGroup(i)->getPixmap(), menu->text(i));
}
}
/** No descriptions */
-void KBSwitchTrayIcon::addLayoutItems(KPopupMenu *menu, bool clearOld) {
+void KBSwitchTrayIcon::addLayoutItems(TDEPopupMenu *menu, bool clearOld) {
KBGroup *group;
int index;
#ifdef USE_BOLD_MENUITEM
diff --git a/kkbswitch/kbswitchtrayicon.h b/kkbswitch/kbswitchtrayicon.h
index f9348ad..52f5e20 100644
--- a/kkbswitch/kbswitchtrayicon.h
+++ b/kkbswitch/kbswitchtrayicon.h
@@ -62,7 +62,7 @@ public slots: // Public slots
void slotUpdateIcons();
private: // Private methods
/** No descriptions */
- void addLayoutItems(KPopupMenu *menu, bool clearOld);
+ void addLayoutItems(TDEPopupMenu *menu, bool clearOld);
/** No descriptions */
void updateMenuIcons();
/** No descriptions */
diff --git a/kkbswitch/kkbswitch.desktop b/kkbswitch/kkbswitch.desktop
index b279abf..021f586 100644
--- a/kkbswitch/kkbswitch.desktop
+++ b/kkbswitch/kkbswitch.desktop
@@ -8,8 +8,8 @@ DocPath=kkbswitch/index.html
Comment=Keyboard Layout Indicator
Comment[ru]=Индикатор раскладки клавиатуры
Comment[uk]=Індикатор розкладки клавіатури
-X-KDE-autostart-after=panel
-X-KDE-autostart-condition=kkbswitchrc:Options:autostart:true
-X-KDE-autostart-phase=2
-X-KDE-StartupNotify=false
-Categories=Qt;KDE;Utility;
+X-TDE-autostart-after=panel
+X-TDE-autostart-condition=kkbswitchrc:Options:autostart:true
+X-TDE-autostart-phase=2
+X-TDE-StartupNotify=false
+Categories=Qt;TDE;Utility;
diff --git a/kkbswitch/main.cpp b/kkbswitch/main.cpp
index d803b4d..aa209fe 100644
--- a/kkbswitch/main.cpp
+++ b/kkbswitch/main.cpp
@@ -15,9 +15,9 @@
* *
***************************************************************************/
-#include <kcmdlineargs.h>
-#include <kaboutdata.h>
-#include <klocale.h>
+#include <tdecmdlineargs.h>
+#include <tdeaboutdata.h>
+#include <tdelocale.h>
#include <stdlib.h>
//#include "kkbswitch.h"
@@ -28,7 +28,7 @@ static const char *description =
// INSERT A DESCRIPTION FOR YOUR APPLICATION HERE
-static KCmdLineOptions options[] =
+static TDECmdLineOptions options[] =
{
{ 0, 0, 0 }
// INSERT YOUR COMMANDLINE OPTIONS HERE
@@ -38,8 +38,8 @@ static KCmdLineOptions options[] =
int main(int argc, char *argv[])
{
- KAboutData aboutData( "kkbswitch", I18N_NOOP("Keyboard Switch"),
- VERSION, description, KAboutData::License_GPL,
+ TDEAboutData aboutData( "kkbswitch", I18N_NOOP("Keyboard Switch"),
+ VERSION, description, TDEAboutData::License_GPL,
"(c) 2001-2005 Leonid Zeitlin", 0, 0, "lz@europe.com");
aboutData.addAuthor("Leonid Zeitlin", I18N_NOOP("Creator and maintainer"), "lz@europe.com");
aboutData.addCredit("Mikhail Senin", I18N_NOOP("Default group config and per-window groups"),
@@ -50,8 +50,8 @@ int main(int argc, char *argv[])
aboutData.addCredit("Sergey V Turchin", I18N_NOOP("Autostart patch"),"zerg@altlinux.org");
aboutData.addCredit("Stergios Dramis", I18N_NOOP("Greek translation"), "sdramis@egnatia.ee.auth.gr");
aboutData.addCredit("Michal Sulek", I18N_NOOP("Slovak translation"), "reloadshot@atlas.sk");
- KCmdLineArgs::init( argc, argv, &aboutData );
- KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
+ TDECmdLineArgs::init( argc, argv, &aboutData );
+ TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
if (!KUniqueApplication::start()) // starting a second instance - just exit
exit(0);
diff --git a/kkbswitch/singlewindowwatcher.cpp b/kkbswitch/singlewindowwatcher.cpp
index a4b4fa8..8080dc0 100644
--- a/kkbswitch/singlewindowwatcher.cpp
+++ b/kkbswitch/singlewindowwatcher.cpp
@@ -20,7 +20,7 @@
#include "singlewindowwatcher.h"
#include "kbconfig.h"
-#include <kwinmodule.h>
+#include <twinmodule.h>
#include <kdebug.h>
SingleWindowWatcher::SingleWindowWatcher(KBConfig *kbconf, TQObject *parent, const char *name)
@@ -66,7 +66,7 @@ void SingleWindowWatcher::changeGroup(int groupno, int next_groupno)
void SingleWindowWatcher::reset()
{
m_window_map.clear();
- WId active_window = m_kwin_module->activeWindow();
+ WId active_window = m_twin_module->activeWindow();
if (active_window)
addWindowToMap(active_window);
else m_active_window = m_window_map.end();
diff --git a/kkbswitch/windowclasswatcher.cpp b/kkbswitch/windowclasswatcher.cpp
index d345a54..74e82ef 100644
--- a/kkbswitch/windowclasswatcher.cpp
+++ b/kkbswitch/windowclasswatcher.cpp
@@ -20,7 +20,7 @@
#include "windowclasswatcher.h"
#include "kbconfig.h"
-#include <kwinmodule.h>
+#include <twinmodule.h>
#include <kdebug.h>
#include <X11/Xutil.h>
@@ -93,12 +93,12 @@ void WindowClassWatcher::reset()
m_class_group_map.clear();
// fill the map with existing windows
- const TQValueList<WId> windows = m_kwin_module->windows();
+ const TQValueList<WId> windows = m_twin_module->windows();
const TQValueList<WId>::ConstIterator end = windows.end();
for (TQValueList<WId>::ConstIterator it = windows.begin(); it != end; ++it)
windowAdded(*it);
- WId active_window = m_kwin_module->activeWindow();
+ WId active_window = m_twin_module->activeWindow();
if (active_window)
m_active_class = m_class_group_map.find(m_win_class_map[active_window]);
else m_active_class = m_class_group_map.end();
diff --git a/kkbswitch/windowwatcher.cpp b/kkbswitch/windowwatcher.cpp
index 586ea71..63371dd 100644
--- a/kkbswitch/windowwatcher.cpp
+++ b/kkbswitch/windowwatcher.cpp
@@ -19,16 +19,16 @@
***************************************************************************/
#include "windowwatcher.h"
-#include <kwinmodule.h>
+#include <twinmodule.h>
WindowWatcher::WindowWatcher(KBConfig *kbconf, TQObject *parent, const char *name)
: TQObject(parent, name)
{
m_kbconf = kbconf;
- m_kwin_module = new KWinModule(this);
- connect(m_kwin_module, SIGNAL(windowAdded(WId)), SLOT(windowAdded(WId)));
- connect(m_kwin_module, SIGNAL(windowRemoved(WId)), SLOT(windowRemoved(WId)));
- connect(m_kwin_module, SIGNAL(activeWindowChanged(WId)), SLOT(activeWindowChanged(WId)));
+ m_twin_module = new KWinModule(this);
+ connect(m_twin_module, SIGNAL(windowAdded(WId)), SLOT(windowAdded(WId)));
+ connect(m_twin_module, SIGNAL(windowRemoved(WId)), SLOT(windowRemoved(WId)));
+ connect(m_twin_module, SIGNAL(activeWindowChanged(WId)), SLOT(activeWindowChanged(WId)));
}
WindowWatcher::~WindowWatcher()
diff --git a/kkbswitch/windowwatcher.h b/kkbswitch/windowwatcher.h
index 28e59af..6861c5b 100644
--- a/kkbswitch/windowwatcher.h
+++ b/kkbswitch/windowwatcher.h
@@ -36,7 +36,7 @@ class WindowWatcher : public TQObject {
Q_OBJECT
protected:
KBConfig *m_kbconf;
- KWinModule *m_kwin_module;
+ KWinModule *m_twin_module;
protected slots:
virtual void windowAdded(WId id) = 0;
virtual void windowRemoved(WId id) = 0;
diff --git a/kkbswitch/xkeyboard.cpp b/kkbswitch/xkeyboard.cpp
index ff3b5cd..de78bc4 100644
--- a/kkbswitch/xkeyboard.cpp
+++ b/kkbswitch/xkeyboard.cpp
@@ -21,7 +21,7 @@
#include <ntqstringlist.h>
#include <kdebug.h>
-#include <klocale.h>
+#include <tdelocale.h>
XKeyboard *XKeyboard::m_self = 0;