[gnome-boxes/store-unattended-data-in-keyring: 3/4] unattended-setup-box: Don't monitor internet connection
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/store-unattended-data-in-keyring: 3/4] unattended-setup-box: Don't monitor internet connection
- Date: Fri, 7 Oct 2022 10:36:17 +0000 (UTC)
commit 59712955c780392b4b6ee1746fcba2c0fdcefa00
Author: Felipe Borges <felipeborges gnome org>
Date: Fri Oct 7 11:52:19 2022 +0200
unattended-setup-box: Don't monitor internet connection
We can simply state in the UI that the installation requires internet
connection without testing for it.
src/unattended-setup-box.vala | 28 +---------------------------
1 file changed, 1 insertion(+), 27 deletions(-)
---
diff --git a/src/unattended-setup-box.vala b/src/unattended-setup-box.vala
index 10e8fd21..79ef4a69 100644
--- a/src/unattended-setup-box.vala
+++ b/src/unattended-setup-box.vala
@@ -107,7 +107,7 @@ public UnattendedSetupBox (InstallerMedia media, string? product_key_format, boo
media_path = media.device_file;
- setup_express_toggle (media.os_media.live, needs_internet);
+ express_install = !media.os_media.live;
if (product_key_format != null) {
product_key_row.visible = true;
@@ -170,7 +170,6 @@ public override void dispose () {
}
public void clean_up () {
- NetworkMonitor.get_default ().network_changed.disconnect (update_express_toggle);
}
public async void save_credentials () {
@@ -197,31 +196,6 @@ public async void save_credentials () {
}, "gnome-boxes-media-path", media_path);
}
- private void setup_express_toggle (bool live, bool needs_internet) {
- try {
- express_install = keyfile.get_boolean (media_path, EXPRESS_KEY);
- } catch (GLib.Error error) {
- debug ("Failed to read key '%s' under '%s': %s\n", EXPRESS_KEY, media_path, error.message);
- express_install = !live;
- }
-
- if (!needs_internet)
- return;
-
- var network_monitor = NetworkMonitor.get_default ();
- update_express_toggle (network_monitor.get_network_available ());
- network_monitor.network_changed.connect (update_express_toggle);
- }
-
- private void update_express_toggle(bool network_available) {
- if (network_available) {
- express_toggle.sensitive = true;
- } else {
- express_toggle.sensitive = false;
- express_install = false;
- }
- }
-
[GtkCallback]
private void on_mandatory_input_changed () {
notify_property ("ready-to-create");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]