Changeset View
Changeset View
Standalone View
Standalone View
kcms/access/kcmaccess.cpp
Show All 29 Lines | |||||
30 | #include <QX11Info> | 30 | #include <QX11Info> | ||
31 | 31 | | |||
32 | #include <kaboutdata.h> | 32 | #include <kaboutdata.h> | ||
33 | #include <KConfigGroup> | 33 | #include <KConfigGroup> | ||
34 | #include <KSharedConfig> | 34 | #include <KSharedConfig> | ||
35 | #include <kkeyserver.h> | 35 | #include <kkeyserver.h> | ||
36 | #include <knotifyconfigwidget.h> | 36 | #include <knotifyconfigwidget.h> | ||
37 | #include <KPluginFactory> | 37 | #include <KPluginFactory> | ||
38 | #include <ktoolinvocation.h> | | |||
39 | 38 | | |||
40 | #include <X11/Xlib.h> | 39 | #include <X11/Xlib.h> | ||
41 | #include <X11/XKBlib.h> | 40 | #include <X11/XKBlib.h> | ||
42 | #define XK_MISCELLANY | 41 | #define XK_MISCELLANY | ||
43 | #define XK_XKB_KEYS | 42 | #define XK_XKB_KEYS | ||
44 | #include <X11/keysymdef.h> | 43 | #include <X11/keysymdef.h> | ||
45 | 44 | | |||
46 | K_PLUGIN_FACTORY(KAccessConfigFactory, registerPlugin<KAccessConfig>();) | 45 | K_PLUGIN_FACTORY(KAccessConfigFactory, registerPlugin<KAccessConfig>();) | ||
▲ Show 20 Lines • Show All 398 Lines • ▼ Show 20 Line(s) | 440 | if (ui.systemBell->isChecked() || | |||
445 | KConfigGroup cfg(&_cfg, "General"); | 444 | KConfigGroup cfg(&_cfg, "General"); | ||
446 | cfg.writeEntry("UseSystemBell", true); | 445 | cfg.writeEntry("UseSystemBell", true); | ||
447 | cfg.sync(); | 446 | cfg.sync(); | ||
448 | } | 447 | } | ||
449 | 448 | | |||
450 | // make kaccess reread the configuration | 449 | // make kaccess reread the configuration | ||
451 | // turning a11y features off needs to be done by kaccess | 450 | // turning a11y features off needs to be done by kaccess | ||
452 | // so run it to clear any enabled features and it will exit if it should | 451 | // so run it to clear any enabled features and it will exit if it should | ||
453 | KToolInvocation::startServiceByDesktopName(QStringLiteral("kaccess")); | 452 | QProcess::startDetached(QStringLiteral("kaccess")); | ||
454 | 453 | | |||
455 | emit changed(false); | 454 | emit changed(false); | ||
456 | } | 455 | } | ||
457 | 456 | | |||
458 | 457 | | |||
459 | void KAccessConfig::defaults() | 458 | void KAccessConfig::defaults() | ||
460 | { | 459 | { | ||
461 | ui.systemBell->setChecked(true); | 460 | ui.systemBell->setChecked(true); | ||
▲ Show 20 Lines • Show All 86 Lines • ▼ Show 20 Line(s) | 524 | { | |||
548 | bool bounce = ui.bounceKeys->isChecked(); | 547 | bool bounce = ui.bounceKeys->isChecked(); | ||
549 | ui.bounceKeysDelay->setEnabled(bounce); | 548 | ui.bounceKeysDelay->setEnabled(bounce); | ||
550 | ui.bounceKeysRejectBeep->setEnabled(bounce); | 549 | ui.bounceKeysRejectBeep->setEnabled(bounce); | ||
551 | 550 | | |||
552 | bool useTimeout = ui.timeout->isChecked(); | 551 | bool useTimeout = ui.timeout->isChecked(); | ||
553 | ui.timeoutDelay->setEnabled(useTimeout); | 552 | ui.timeoutDelay->setEnabled(useTimeout); | ||
554 | } | 553 | } | ||
555 | 554 | | |||
556 | extern "C" | | |||
557 | { | | |||
558 | /* This one gets called by kcminit | | |||
559 | | ||||
560 | */ | | |||
561 | Q_DECL_EXPORT void kcminit_access() | | |||
562 | { | | |||
563 | KToolInvocation::startServiceByDesktopName(QStringLiteral("kaccess")); | | |||
564 | } | | |||
565 | } | | |||
566 | | ||||
567 | #include "kcmaccess.moc" | 555 | #include "kcmaccess.moc" | ||
568 | 556 | |