mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-08-26 14:32:26 +00:00
remove deprecated optional arguments
This commit is contained in:
parent
3106844cc6
commit
e2ab831d57
@ -136,7 +136,7 @@ impl Browser {
|
|||||||
None => GString::new(), // @TODO
|
None => GString::new(), // @TODO
|
||||||
};
|
};
|
||||||
|
|
||||||
header.update(Some(title.as_str()), Some(subtitle.as_str()));
|
header.update(title.as_str(), subtitle.as_str());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ impl Header {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
pub fn update(&self, title: Option<&str>, description: Option<&str>) {
|
pub fn update(&self, title: &str, description: &str) {
|
||||||
self.title.update(title, description);
|
self.title.update(title, description);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,25 +16,20 @@ impl Title {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
pub fn update(&self, title: Option<&str>, subtitle: Option<&str>) {
|
pub fn update(&self, title: &str, subtitle: &str) {
|
||||||
// Update title
|
// Update title
|
||||||
let mut name = Vec::new();
|
let mut parts = Vec::new();
|
||||||
|
|
||||||
if let Some(value) = title {
|
if !title.is_empty() {
|
||||||
if !value.is_empty() {
|
parts.push(title);
|
||||||
name.push(value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
name.push(DEFAULT_TITLE);
|
parts.push(DEFAULT_TITLE);
|
||||||
|
|
||||||
self.gobject.set_title(&name.join(" - "));
|
self.gobject.set_title(&parts.join(" - "));
|
||||||
|
|
||||||
// Update subtitle
|
// Update subtitle
|
||||||
self.gobject.set_subtitle(&match subtitle {
|
self.gobject.set_subtitle(subtitle);
|
||||||
Some(value) => value,
|
|
||||||
None => "", // @TODO
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getters
|
// Getters
|
||||||
|
Loading…
x
Reference in New Issue
Block a user