|
|
|
@ -45,21 +45,21 @@ KBSwitchApp::KBSwitchApp()
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
m_intf = new KBSwitchIntf(this, &m_kbconf);
|
|
|
|
|
TQObject::connect(m_intf, SIGNAL(nextGroupSelected()), this, SLOT(slotSelectNextGroup()));
|
|
|
|
|
TQObject::connect(m_intf, SIGNAL(groupSelected(int)), this, SLOT(slotGroupSelected(int)));
|
|
|
|
|
TQObject::connect(m_intf, TQ_SIGNAL(nextGroupSelected()), this, TQ_SLOT(slotSelectNextGroup()));
|
|
|
|
|
TQObject::connect(m_intf, TQ_SIGNAL(groupSelected(int)), this, TQ_SLOT(slotGroupSelected(int)));
|
|
|
|
|
|
|
|
|
|
TQObject::connect(&m_xkb, SIGNAL(layoutChanged()), this, SLOT(reconfigure()));
|
|
|
|
|
TQObject::connect(&m_xkb, SIGNAL(groupChanged(int)), this, SLOT(slotXkbGroupChanged(int)));
|
|
|
|
|
TQObject::connect(&m_xkb, TQ_SIGNAL(layoutChanged()), this, TQ_SLOT(reconfigure()));
|
|
|
|
|
TQObject::connect(&m_xkb, TQ_SIGNAL(groupChanged(int)), this, TQ_SLOT(slotXkbGroupChanged(int)));
|
|
|
|
|
|
|
|
|
|
m_force_group_setting = false;
|
|
|
|
|
int start_group = m_kbconf.default_groupno();
|
|
|
|
|
|
|
|
|
|
m_trayicon = new KBSwitchTrayIcon(&m_kbconf);
|
|
|
|
|
TQObject::connect(m_trayicon, SIGNAL(groupSelected(int)), this,
|
|
|
|
|
SLOT(slotGroupSelected(int)));
|
|
|
|
|
TQObject::connect(m_trayicon, SIGNAL(clicked()), this, SLOT(slotSelectNextGroup()));
|
|
|
|
|
TQObject::connect(m_trayicon, SIGNAL(preferencesSelected()), this,
|
|
|
|
|
SLOT(slotPreferences()));
|
|
|
|
|
TQObject::connect(m_trayicon, TQ_SIGNAL(groupSelected(int)), this,
|
|
|
|
|
TQ_SLOT(slotGroupSelected(int)));
|
|
|
|
|
TQObject::connect(m_trayicon, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotSelectNextGroup()));
|
|
|
|
|
TQObject::connect(m_trayicon, TQ_SIGNAL(preferencesSelected()), this,
|
|
|
|
|
TQ_SLOT(slotPreferences()));
|
|
|
|
|
|
|
|
|
|
if (start_group != m_xkb.getGroupNo()) {
|
|
|
|
|
setStartGroup(start_group);
|
|
|
|
@ -154,10 +154,10 @@ void KBSwitchApp::slotSelectPrevGroup()
|
|
|
|
|
/** No descriptions */
|
|
|
|
|
void KBSwitchApp::slotPreferences(){
|
|
|
|
|
KBConfigDlg dlg(&m_kbconf);
|
|
|
|
|
TQObject::connect(&dlg, SIGNAL(okClicked()), m_trayicon, SLOT(slotUpdateIcons()));
|
|
|
|
|
TQObject::connect(&dlg, SIGNAL(applyClicked()), m_trayicon, SLOT(slotUpdateIcons()));
|
|
|
|
|
TQObject::connect(&dlg, SIGNAL(okClicked()), this, SLOT(slotPrefChanged()));
|
|
|
|
|
TQObject::connect(&dlg, SIGNAL(applyClicked()), this, SLOT(slotPrefChanged()));
|
|
|
|
|
TQObject::connect(&dlg, TQ_SIGNAL(okClicked()), m_trayicon, TQ_SLOT(slotUpdateIcons()));
|
|
|
|
|
TQObject::connect(&dlg, TQ_SIGNAL(applyClicked()), m_trayicon, TQ_SLOT(slotUpdateIcons()));
|
|
|
|
|
TQObject::connect(&dlg, TQ_SIGNAL(okClicked()), this, TQ_SLOT(slotPrefChanged()));
|
|
|
|
|
TQObject::connect(&dlg, TQ_SIGNAL(applyClicked()), this, TQ_SLOT(slotPrefChanged()));
|
|
|
|
|
dlg.exec();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -316,8 +316,8 @@ void KBSwitchApp::resetWindowMap()
|
|
|
|
|
{
|
|
|
|
|
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)));
|
|
|
|
|
connect(m_twin_module, TQ_SIGNAL(activeWindowChanged(WId)), TQ_SLOT(slotWindowChanged(WId)));
|
|
|
|
|
connect(m_twin_module, TQ_SIGNAL(windowRemoved(WId)), TQ_SLOT(slotWindowRemoved(WId)));
|
|
|
|
|
resetWindowMap();
|
|
|
|
|
if (m_cur_groupno != -1 && m_cur_groupno != m_kbconf.default_groupno())
|
|
|
|
|
setStartGroup(m_kbconf.default_groupno());
|
|
|
|
@ -354,8 +354,8 @@ void KBSwitchApp::enableWatcher()
|
|
|
|
|
else if (m_watcher_type == KBConfig::SCOPE_CLASS)
|
|
|
|
|
m_watcher = new WindowClassWatcher(&m_kbconf, this);
|
|
|
|
|
else return; // if scope is global, don't create watcher
|
|
|
|
|
connect(m_watcher, SIGNAL(windowChanged(int, int )),
|
|
|
|
|
SLOT(slotWindowChanged(int, int)));
|
|
|
|
|
connect(m_watcher, TQ_SIGNAL(windowChanged(int, int )),
|
|
|
|
|
TQ_SLOT(slotWindowChanged(int, int)));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|