mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +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
|
||||
fn uri_to_label(uri: &Uri, is_parent: bool) -> GString {
|
||||
let path = uri.path();
|
||||
if path == "/" || path.is_empty() || is_parent {
|
||||
uri.host().unwrap_or(uri.to_str())
|
||||
if path == "/" || path.is_empty() {
|
||||
if is_parent {
|
||||
uri.host().unwrap_or(uri.to_str())
|
||||
} else {
|
||||
gtk::glib::gformat!("{}{path}", uri.host().unwrap_or(uri.to_str()))
|
||||
}
|
||||
} else {
|
||||
path
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue