Hide Steam info when not needed
This commit is contained in:
@@ -305,11 +305,12 @@ Kirigami.ApplicationWindow {
|
|||||||
level: 1
|
level: 1
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: i18n("Steam information")
|
text: i18n("Steam information")
|
||||||
opacity: root.server_started
|
opacity: steam_info.opacity
|
||||||
Layout.maximumHeight: root.server_started ? -1 : 0
|
Layout.maximumHeight: root.server_started ? -1 : 0
|
||||||
}
|
}
|
||||||
SteamLaunchOptions {
|
SteamLaunchOptions {
|
||||||
opacity: root.server_started
|
id: steam_info
|
||||||
|
opacity: root.server_started && WivrnServer.steamCommand != ""
|
||||||
Layout.maximumHeight: root.server_started ? -1 : 0
|
Layout.maximumHeight: root.server_started ? -1 : 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
-2
@@ -678,14 +678,18 @@ void on_json_configuration(WivrnServer * server, const GParamSpec * pspec, gpoin
|
|||||||
std::filesystem::path config_new = config;
|
std::filesystem::path config_new = config;
|
||||||
config_new += ".new";
|
config_new += ".new";
|
||||||
|
|
||||||
std::ofstream file(config_new);
|
{
|
||||||
file.write(json, strlen(json));
|
std::ofstream file(config_new);
|
||||||
|
file.write(json, strlen(json));
|
||||||
|
}
|
||||||
|
|
||||||
std::error_code ec;
|
std::error_code ec;
|
||||||
std::filesystem::rename(config_new, config, ec);
|
std::filesystem::rename(config_new, config, ec);
|
||||||
|
|
||||||
if (ec)
|
if (ec)
|
||||||
std::cerr << "Failed to save configuration: " << ec.message() << std::endl;
|
std::cerr << "Failed to save configuration: " << ec.message() << std::endl;
|
||||||
|
|
||||||
|
wivrn_server_set_steam_command(dbus_server, steam_command().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void expose_known_keys_on_dbus()
|
void expose_known_keys_on_dbus()
|
||||||
|
|||||||
Reference in New Issue
Block a user