Media keys working again
This commit is contained in:
@@ -90,8 +90,17 @@ void DaemonClient::on_daemon_signal(GDBusConnection* /*connection*/, const gchar
|
||||
return;
|
||||
}
|
||||
|
||||
// ConfigReloaded and DeviceChanged carry no state the footer does not
|
||||
// already get from GetStatus, so just refresh it.
|
||||
if (g_strcmp0(signalName, "ConfigReloaded") == 0) {
|
||||
// The daemon keeps the previous mappings when the file cannot be read,
|
||||
// so remember that and let the footer show it. It stays set until a
|
||||
// reload succeeds.
|
||||
gboolean ok = FALSE;
|
||||
g_variant_get(parameters, "(b)", &ok);
|
||||
self->configOk_ = ok != FALSE;
|
||||
}
|
||||
|
||||
// DeviceChanged and the config state carry nothing GetStatus does not
|
||||
// report, so a single status refresh covers both.
|
||||
self->fetch_status();
|
||||
}
|
||||
|
||||
@@ -147,6 +156,7 @@ void DaemonClient::on_status_reply(GObject* /*source*/, GAsyncResult* result, gp
|
||||
|
||||
DaemonStatus status;
|
||||
status.reachable = true;
|
||||
status.configOk = self->configOk_;
|
||||
status.version = version != nullptr ? version : "";
|
||||
status.device = device != nullptr ? device : "";
|
||||
status.configPath = configPath != nullptr ? configPath : "";
|
||||
|
||||
Reference in New Issue
Block a user