|
|
|
|
@ -31,7 +31,7 @@ |
|
|
|
|
Osd::Osd(const KSharedConfig::Ptr &config, ShellCorona *corona) |
|
|
|
|
: QObject(corona) |
|
|
|
|
, m_osdUrl(corona->lookAndFeelPackage().fileUrl("osdmainscript")) |
|
|
|
|
, m_config(config) |
|
|
|
|
, m_osdConfigGroup(config, "OSD") |
|
|
|
|
{ |
|
|
|
|
QDBusConnection::sessionBus().registerObject(QStringLiteral("/org/kde/osdService"), |
|
|
|
|
this, |
|
|
|
|
@ -104,7 +104,9 @@ void Osd::mediaPlayerVolumeChanged(int percent, const QString &playerName, const |
|
|
|
|
|
|
|
|
|
void Osd::kbdLayoutChanged(const QString &layoutName) |
|
|
|
|
{ |
|
|
|
|
showText(QStringLiteral("keyboard-layout"), layoutName); |
|
|
|
|
if (m_osdConfigGroup.readEntry("kbdLayoutChangedEnabled", true)) { |
|
|
|
|
showText(QStringLiteral("keyboard-layout"), layoutName); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Osd::virtualDesktopChanged(const QString ¤tVirtualDesktopName) |
|
|
|
|
@ -162,7 +164,7 @@ void Osd::virtualKeyboardEnabledChanged(bool virtualKeyboardEnabled) |
|
|
|
|
|
|
|
|
|
bool Osd::init() |
|
|
|
|
{ |
|
|
|
|
if (m_config && !KConfigGroup(m_config, QStringLiteral("OSD")).readEntry(QStringLiteral("Enabled"), true)) { |
|
|
|
|
if (!m_osdConfigGroup.readEntry("Enabled", true)) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|