Use tdeApp

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
master
Michele Calgaro 1 month ago
parent ffe3c92dd0
commit 16f7f7e63d
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -2,7 +2,7 @@
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" <!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN"
"dtd/kdex.dtd" [ "dtd/kdex.dtd" [
<!ENTITY kkbswitch '<application>KKBSwitch</application>'> <!ENTITY kkbswitch '<application>KKBSwitch</application>'>
<!ENTITY kapp "&kkbswitch;"><!-- replace KKBSwitch here --> <!ENTITY tdeApp "&kkbswitch;"><!-- replace KKBSwitch here -->
<!ENTITY kkbswitchVersion '1.4.3'> <!ENTITY kkbswitchVersion '1.4.3'>
<!ENTITY % addindex "IGNORE"> <!ENTITY % addindex "IGNORE">
<!ENTITY % English "INCLUDE"><!-- change language only here --> <!ENTITY % English "INCLUDE"><!-- change language only here -->
@ -78,7 +78,7 @@ Please report any problems or feature requests to the Trinity Desktop Environmen
</para> </para>
</chapter> </chapter>
<chapter id="using-kapp"> <chapter id="using-tdeApp">
<title>Using &kkbswitch;</title> <title>Using &kkbswitch;</title>
<para> <para>

@ -102,18 +102,18 @@ void KBConfig::load(TDEConfig *config){
m_keys->insert(TQString::fromLatin1("SetGroup %1").arg(i), m_keys->insert(TQString::fromLatin1("SetGroup %1").arg(i),
i18n("Activate %1 keyboard layout").arg(m_groups[i]->getName()), i18n("Activate %1 keyboard layout").arg(m_groups[i]->getName()),
TQString::null, TQt::ALT+TQt::CTRL+TQt::Key_1 + i, KKey::QtWIN+TQt::CTRL+TQt::Key_1 + i, TQString::null, TQt::ALT+TQt::CTRL+TQt::Key_1 + i, KKey::QtWIN+TQt::CTRL+TQt::Key_1 + i,
kapp, TQ_SLOT(slotGroupSelected(int))); tdeApp, TQ_SLOT(slotGroupSelected(int)));
} }
m_keys->insert("NextGroup", i18n("Cycle keyboard layouts"), m_keys->insert("NextGroup", i18n("Cycle keyboard layouts"),
i18n("Activates the next keyboard layout or, if the current layout is the last one, " i18n("Activates the next keyboard layout or, if the current layout is the last one, "
"activates the first layout."), "activates the first layout."),
TQt::SHIFT+TQt::CTRL+TQt::Key_Plus, TQt::SHIFT+TQt::CTRL+TQt::Key_Plus, TQt::SHIFT+TQt::CTRL+TQt::Key_Plus, TQt::SHIFT+TQt::CTRL+TQt::Key_Plus,
kapp, TQ_SLOT(slotSelectNextGroup())); tdeApp, TQ_SLOT(slotSelectNextGroup()));
m_keys->insert("PrevGroup", i18n("Cycle keyboard layouts (reverse)"), m_keys->insert("PrevGroup", i18n("Cycle keyboard layouts (reverse)"),
i18n("Activates the previous keyboard layout or, if the current layout is the first one, " i18n("Activates the previous keyboard layout or, if the current layout is the first one, "
"activates the last layout."), "activates the last layout."),
TQt::SHIFT+TQt::CTRL+TQt::Key_Minus, TQt::SHIFT+TQt::CTRL+TQt::Key_Minus, TQt::SHIFT+TQt::CTRL+TQt::Key_Minus, TQt::SHIFT+TQt::CTRL+TQt::Key_Minus,
kapp, TQ_SLOT(slotSelectPrevGroup())); tdeApp, TQ_SLOT(slotSelectPrevGroup()));
m_keys->readSettings(config); m_keys->readSettings(config);
checkKeysEnabled(); checkKeysEnabled();
} }
@ -139,7 +139,7 @@ void KBConfig::drawIcons(IconStyle icon_style, TQValueVector<TQPixmap> *icons,
TDEGlobal::dirs()->addResourceDir("appdata", "."); TDEGlobal::dirs()->addResourceDir("appdata", ".");
TDEConfig map("group_names", true, true, "appdata"); TDEConfig map("group_names", true, true, "appdata");
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
config->setGroup(ICONS_SECTION); config->setGroup(ICONS_SECTION);
getXkbLayouts(layouts); getXkbLayouts(layouts);

@ -227,7 +227,7 @@ void KBConfigDlg::setupShortcutsPage()
void KBConfigDlg::showConfig(){ void KBConfigDlg::showConfig(){
int i; int i;
KBGroup *group; KBGroup *group;
TDEConfig *conf = kapp->config(); TDEConfig *conf = tdeApp->config();
m_iconpaths.clear(); m_iconpaths.clear();
conf->setGroup(ICONS_SECTION); conf->setGroup(ICONS_SECTION);
@ -259,7 +259,7 @@ void KBConfigDlg::slotPickIcon(){
TQString path = dlg.getIconPath(); TQString path = dlg.getIconPath();
KBGroup *group = m_kbconf->getGroup(index); KBGroup *group = m_kbconf->getGroup(index);
if (!path.isEmpty() && path != group->getIconPath()) { if (!path.isEmpty() && path != group->getIconPath()) {
kapp->config()->writeEntry(group->getName()/*KBConfig::entryForGroup(index)*/, path); tdeApp->config()->writeEntry(group->getName()/*KBConfig::entryForGroup(index)*/, path);
redrawIcons(KBConfig::IconStyle(cbxIconType->currentItem())); redrawIcons(KBConfig::IconStyle(cbxIconType->currentItem()));
checkIconDefault(index); checkIconDefault(index);
} }
@ -303,7 +303,7 @@ void KBConfigDlg::slotListBoxExecuted(TQListBoxItem *){
void KBConfigDlg::saveConfig(){ void KBConfigDlg::saveConfig(){
TQString path; TQString path;
const TQPixmap *pix; const TQPixmap *pix;
TDEConfig *conf = kapp->config(); TDEConfig *conf = tdeApp->config();
conf->setGroup(ICONS_SECTION); conf->setGroup(ICONS_SECTION);
for (int i = 0; i < m_kbconf->groupCount(); i++) { for (int i = 0; i < m_kbconf->groupCount(); i++) {
path = m_iconpaths[i]; path = m_iconpaths[i];
@ -364,7 +364,7 @@ void KBConfigDlg::redrawIcons(KBConfig::IconStyle icon_style)
void KBConfigDlg::slotCancel() void KBConfigDlg::slotCancel()
{ {
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
config->rollback(); config->rollback();
config->reparseConfiguration(); config->reparseConfiguration();
KDialogBase::slotCancel(); KDialogBase::slotCancel();
@ -382,8 +382,8 @@ void KBConfigDlg::slotUseShortcutsToggled(bool on)
void KBConfigDlg::slotSetDefaultIcon() void KBConfigDlg::slotSetDefaultIcon()
{ {
int index = lbGroups->currentItem(); int index = lbGroups->currentItem();
kapp->config()->setGroup(ICONS_SECTION); tdeApp->config()->setGroup(ICONS_SECTION);
kapp->config()->deleteEntry(m_kbconf->getGroup(index)->getName()/*KBConfig::entryForGroup(index)*/); tdeApp->config()->deleteEntry(m_kbconf->getGroup(index)->getName()/*KBConfig::entryForGroup(index)*/);
redrawIcons(KBConfig::IconStyle(cbxIconType->currentItem())); redrawIcons(KBConfig::IconStyle(cbxIconType->currentItem()));
} }
@ -393,7 +393,7 @@ void KBConfigDlg::slotSetDefaultIcon()
*/ */
void KBConfigDlg::checkIconDefault(int index) void KBConfigDlg::checkIconDefault(int index)
{ {
TDEConfig *conf = kapp->config(); TDEConfig *conf = tdeApp->config();
if (index == -1 || ! iconTypeShowsFlag(KBConfig::IconStyle(cbxIconType->currentItem()))) { if (index == -1 || ! iconTypeShowsFlag(KBConfig::IconStyle(cbxIconType->currentItem()))) {
btnSetDefaultIcon->setEnabled(false); btnSetDefaultIcon->setEnabled(false);
} }

@ -74,7 +74,7 @@ KBSwitchTrayIcon::KBSwitchTrayIcon(KBConfig *conf){
/*TQString path = locate("icon", "hicolor/16x16/apps/locale.png"); /*TQString path = locate("icon", "hicolor/16x16/apps/locale.png");
if (!path.isEmpty()) pix.load(path);*/ if (!path.isEmpty()) pix.load(path);*/
pix = kapp->iconLoader()->loadIcon("locale", TDEIcon::Small); pix = tdeApp->iconLoader()->loadIcon("locale", TDEIcon::Small);
menu->changeTitle(menu->idAt(0), pix, i18n("Keyboard Switch")); menu->changeTitle(menu->idAt(0), pix, i18n("Keyboard Switch"));
setAlignment(TQt::AlignHCenter | TQt::AlignCenter); setAlignment(TQt::AlignHCenter | TQt::AlignCenter);
} }
@ -183,7 +183,7 @@ void KBSwitchTrayIcon::slotUpdateIcons(){
/** Display help */ /** Display help */
void KBSwitchTrayIcon::slotHelp(){ void KBSwitchTrayIcon::slotHelp(){
kapp->invokeHelp(); tdeApp->invokeHelp();
} }
#include "kbswitchtrayicon.moc" #include "kbswitchtrayicon.moc"

Loading…
Cancel
Save