show connection page only on socket info is available

This commit is contained in:
yggverse 2025-03-28 03:39:05 +02:00
parent 0b103c795e
commit 6443105986

View file

@ -95,12 +95,13 @@ impl Dialog for PreferencesDialog {
} // @TODO header size, total size, etc.
p
});
if let Some(ref socket) = info.socket {
d.add(&{
let p = PreferencesPage::builder()
.title("Connection")
.icon_name("network-transmit-receive")
.build();
if let Some(ref socket) = info.socket {
use gtk::{
gio::{SocketAddress, SocketFamily},
prelude::{SocketAddressExt, SocketConnectableExt},
@ -172,9 +173,9 @@ impl Dialog for PreferencesDialog {
}
g
});
}
p
});
}
if info.redirect.is_some() {
d.add(&{
let g = PreferencesGroup::new();