|
|
@ -511,27 +511,27 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tray = new KbdTray ( this );
|
|
|
|
tray = new KbdTray ( this );
|
|
|
|
tray->setPixmap ( UserIcon ( "tray" ) );
|
|
|
|
tray->setPixmap ( UserIcon ( "tray" ) );
|
|
|
|
|
|
|
|
|
|
|
|
TDEConfig *cfg = TDEApplication::kApplication()->config();
|
|
|
|
TDEConfig *cfg = TDEApplication::kApplication()->config();
|
|
|
|
|
|
|
|
|
|
|
|
TDEPopupMenu *m = tray->contextMenu();
|
|
|
|
TDEPopupMenu *m = tray->contextMenu();
|
|
|
|
m->setCheckable ( true );
|
|
|
|
m->setCheckable ( true );
|
|
|
|
|
|
|
|
|
|
|
|
KHelpMenu *h = new KHelpMenu ( tray, about );
|
|
|
|
KHelpMenu *h = new KHelpMenu ( tray, about );
|
|
|
|
m->insertItem ( "Font ...", this, TQT_SLOT ( chooseFont() ) );
|
|
|
|
m->insertItem ( "Font ...", this, TQT_SLOT ( chooseFont() ) );
|
|
|
|
|
|
|
|
|
|
|
|
mnu_autores = m->insertItem( "Auto resize font",this, TQT_SLOT ( toggleFontAutoRes() ) );
|
|
|
|
mnu_autores = m->insertItem( "Auto resize font",this, TQT_SLOT ( toggleFontAutoRes() ) );
|
|
|
|
bool fnt_autores = cfg->readBoolEntry("autoresfont",true);
|
|
|
|
bool fnt_autores = cfg->readBoolEntry("autoresfont",true);
|
|
|
|
m->setItemChecked(mnu_autores, fnt_autores);
|
|
|
|
m->setItemChecked(mnu_autores, fnt_autores);
|
|
|
|
|
|
|
|
|
|
|
|
m->insertItem ( i18n ("Background color"), this, TQT_SLOT ( chooseBackgroundColor() ) );
|
|
|
|
m->insertItem ( i18n ("Background color"), this, TQT_SLOT ( chooseBackgroundColor() ) );
|
|
|
|
m->insertItem ( i18n ("Keys color (requires restart)"), this, TQT_SLOT ( chooseKeysColor() ) );
|
|
|
|
m->insertItem ( i18n ("Keys color"), this, TQT_SLOT ( chooseKeysColor() ) );
|
|
|
|
|
|
|
|
|
|
|
|
m->insertSeparator();
|
|
|
|
m->insertSeparator();
|
|
|
|
mnu_dock = m->insertItem ( "Dock widget", this, TQT_SLOT ( showDock() ) );
|
|
|
|
mnu_dock = m->insertItem ( "Dock widget", this, TQT_SLOT ( showDock() ) );
|
|
|
|
bool show_dock = cfg->readBoolEntry("showdock",false);
|
|
|
|
bool show_dock = cfg->readBoolEntry("showdock",false);
|
|
|
|
m->setItemChecked(mnu_dock, show_dock);
|
|
|
|
m->setItemChecked(mnu_dock, show_dock);
|
|
|
|
|
|
|
|
|
|
|
|
mnu_lock = m->insertItem(i18n("Lock on screen"), this, TQT_SLOT(toggleLock()));
|
|
|
|
mnu_lock = m->insertItem(i18n("Lock on screen"), this, TQT_SLOT(toggleLock()));
|
|
|
|
locked = cfg->readBoolEntry("locked", false);
|
|
|
|
locked = cfg->readBoolEntry("locked", false);
|
|
|
|
m->setItemChecked(mnu_lock, locked);
|
|
|
|
m->setItemChecked(mnu_lock, locked);
|
|
|
@ -597,7 +597,23 @@ void MainWidget::chooseKeysColor()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cfg->writeEntry("keysColor", newkeysC.name()); // save as #rrbbgg
|
|
|
|
cfg->writeEntry("keysColor", newkeysC.name()); // save as #rrbbgg
|
|
|
|
cfg->sync();
|
|
|
|
cfg->sync();
|
|
|
|
// can't set PaletteBackgroundColor because it's in VButton::VButton - needs restart to read configuration entry
|
|
|
|
|
|
|
|
|
|
|
|
for (unsigned idx = 0; idx < btns.size(); ++idx)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
btns[idx]->setColor(newkeysC);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (unsigned idx = 0; idx < mod_keys.size(); ++idx)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
mod_keys[idx]->setColor(newkeysC);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (unsigned idx = 0; idx < other_keys.size(); ++idx)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
other_keys[idx]->setColor(newkeysC);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (unsigned idx = 0; idx < numl_keys.size(); ++idx)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
numl_keys[idx]->setColor(newkeysC);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|