mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 08:35:28 +00:00
show connection page only on socket info is available
This commit is contained in:
parent
0b103c795e
commit
6443105986
1 changed files with 10 additions and 9 deletions
|
|
@ -95,12 +95,13 @@ impl Dialog for PreferencesDialog {
|
||||||
} // @TODO header size, total size, etc.
|
} // @TODO header size, total size, etc.
|
||||||
p
|
p
|
||||||
});
|
});
|
||||||
d.add(&{
|
if let Some(ref socket) = info.socket {
|
||||||
let p = PreferencesPage::builder()
|
d.add(&{
|
||||||
.title("Connection")
|
let p = PreferencesPage::builder()
|
||||||
.icon_name("network-transmit-receive")
|
.title("Connection")
|
||||||
.build();
|
.icon_name("network-transmit-receive")
|
||||||
if let Some(ref socket) = info.socket {
|
.build();
|
||||||
|
|
||||||
use gtk::{
|
use gtk::{
|
||||||
gio::{SocketAddress, SocketFamily},
|
gio::{SocketAddress, SocketFamily},
|
||||||
prelude::{SocketAddressExt, SocketConnectableExt},
|
prelude::{SocketAddressExt, SocketConnectableExt},
|
||||||
|
|
@ -172,9 +173,9 @@ impl Dialog for PreferencesDialog {
|
||||||
}
|
}
|
||||||
g
|
g
|
||||||
});
|
});
|
||||||
}
|
p
|
||||||
p
|
});
|
||||||
});
|
}
|
||||||
if info.redirect.is_some() {
|
if info.redirect.is_some() {
|
||||||
d.add(&{
|
d.add(&{
|
||||||
let g = PreferencesGroup::new();
|
let g = PreferencesGroup::new();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue