Commit 2bda77a87196d5a9247e2df606c1d0a58904d77a
- Diff rendering mode:
- inline
- side by side
daemon/synaptiksdaemon.cpp
(21 / 11)
|   | |||
| 118 | 118 | QDBusConnection::ExportScriptableContents); | |
| 119 | 119 | ||
| 120 | 120 | if (!touchpad) { | |
| 121 | if (!Touchpad::isSupported()) { | ||
| 122 | this->notifyError( | ||
| 123 | i18nc("@info daemon error notification", | ||
| 124 | "<warning>The system does not support touchpad " | ||
| 125 | "configuration.</warning>")); | ||
| 126 | } else { | ||
| 127 | this->notifyError( | ||
| 128 | i18nc("@info daemon error notification", | ||
| 129 | "<warning>No configurable touchpad was " | ||
| 130 | "found.</warning>")); | ||
| 121 | // we did not yet know, that touchpad configuration is not supported | ||
| 122 | // on this system, so show an error message to the user | ||
| 123 | if (!d->config->touchpadNotSupported()) { | ||
| 124 | if (!Touchpad::isSupported()) { | ||
| 125 | this->notifyError( | ||
| 126 | i18nc("@info daemon error notification", | ||
| 127 | "<warning>The system does not support touchpad " | ||
| 128 | "configuration.</warning>")); | ||
| 129 | } else { | ||
| 130 | this->notifyError( | ||
| 131 | i18nc("@info daemon error notification", | ||
| 132 | "<warning>No configurable touchpad was " | ||
| 133 | "found.</warning>")); | ||
| 134 | } | ||
| 135 | // remember, that touchpad configuration is not supported to | ||
| 136 | // avoid needless repetitions of the above error messages | ||
| 137 | d->config->setTouchpadNotSupported(true); | ||
| 138 | d->config->writeConfig(); | ||
| 131 | 139 | } | |
| 132 | 140 | } else { | |
| 141 | // a touchpad is available, so enable the error messages again | ||
| 142 | d->config->setTouchpadNotSupported(false); | ||
| 143 | d->config->writeConfig(); | ||
| 133 | 144 | // create the touchpad manager | |
| 134 | 145 | d->touchpadManager = new TouchpadManager(touchpad, monitor, this); | |
| 135 | 146 | this->connect(d->touchpadManager, | |
| … | … | ||
| 151 | 151 | this->connect(d->touchpadManager, | |
| 152 | 152 | SIGNAL(touchpadError(const QString&)), | |
| 153 | 153 | SLOT(notifyError(const QString&))); | |
| 154 | |||
| 155 | 154 | ||
| 156 | 155 | // dump settings from touchpad driver to configuration and write the | |
| 157 | 156 | // settings to a file to make them available to the kcmodule |
synaptiks.kcfg
(5 / 0)
|   | |||
| 37 | 37 | </entry> | |
| 38 | 38 | </group> | |
| 39 | 39 | <group name="General"> | |
| 40 | <entry name="TouchpadNotSupported" type="Bool"> | ||
| 41 | <label>Used by the deamon to avoid repeated error messages on systems | ||
| 42 | with no configurable touchpad.</label> | ||
| 43 | <default>false</default> | ||
| 44 | </entry> | ||
| 40 | 45 | <entry name="TouchpadStateAtStartup" type="Enum"> | |
| 41 | 46 | <label>The initial state of the touchpad at daemon startup. Change | |
| 42 | 47 | this to forcibly enable or disable the touchpad.</label> |

