mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
add exception for children items
This commit is contained in:
parent
8533e9daab
commit
2dcda0c798
1 changed files with 6 additions and 2 deletions
|
|
@ -272,8 +272,12 @@ fn ellipsize(value: &str, limit: usize) -> String {
|
||||||
/// as [MenuItem](https://docs.gtk.org/gio/class.MenuItem.html) label
|
/// as [MenuItem](https://docs.gtk.org/gio/class.MenuItem.html) label
|
||||||
fn uri_to_label(uri: &Uri, is_parent: bool) -> GString {
|
fn uri_to_label(uri: &Uri, is_parent: bool) -> GString {
|
||||||
let path = uri.path();
|
let path = uri.path();
|
||||||
if path == "/" || path.is_empty() || is_parent {
|
if path == "/" || path.is_empty() {
|
||||||
uri.host().unwrap_or(uri.to_str())
|
if is_parent {
|
||||||
|
uri.host().unwrap_or(uri.to_str())
|
||||||
|
} else {
|
||||||
|
gtk::glib::gformat!("{}{path}", uri.host().unwrap_or(uri.to_str()))
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
path
|
path
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue