mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
update indication icon on page handle
This commit is contained in:
parent
abb9de617d
commit
556a1eba89
2 changed files with 46 additions and 54 deletions
|
|
@ -188,22 +188,11 @@ impl Request {
|
|||
}
|
||||
|
||||
// Actions
|
||||
|
||||
pub fn escape(&self) {
|
||||
self.suggestion.hide()
|
||||
}
|
||||
|
||||
/// Try build home [Uri](https://docs.gtk.org/glib/struct.Uri.html) for `Self`
|
||||
/// * return `None` if current request already match home or Uri not parsable
|
||||
pub fn home(&self) -> Option<Uri> {
|
||||
home(&self.entry)
|
||||
}
|
||||
|
||||
/// Try get current request value as [Uri](https://docs.gtk.org/glib/struct.Uri.html)
|
||||
/// * `strip_prefix` on parse
|
||||
pub fn uri(&self) -> Option<Uri> {
|
||||
uri(&self.entry)
|
||||
}
|
||||
|
||||
pub fn show_identity_dialog(&self) {
|
||||
show_identity_dialog(&self.entry, &self.profile)
|
||||
}
|
||||
|
|
@ -258,6 +247,10 @@ impl Request {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn update_secondary_icon(&self, info: &Info) {
|
||||
update_secondary_icon(&self.entry, info);
|
||||
}
|
||||
|
||||
// Setters
|
||||
|
||||
pub fn to_download(&self) {
|
||||
|
|
@ -270,6 +263,18 @@ impl Request {
|
|||
|
||||
// Getters
|
||||
|
||||
/// Try build home [Uri](https://docs.gtk.org/glib/struct.Uri.html) for `Self`
|
||||
/// * return `None` if current request already match home or Uri not parsable
|
||||
pub fn home(&self) -> Option<Uri> {
|
||||
home(&self.entry)
|
||||
}
|
||||
|
||||
/// Try get current request value as [Uri](https://docs.gtk.org/glib/struct.Uri.html)
|
||||
/// * `strip_prefix` on parse
|
||||
pub fn uri(&self) -> Option<Uri> {
|
||||
uri(&self.entry)
|
||||
}
|
||||
|
||||
pub fn is_file(&self) -> bool {
|
||||
self.entry.text().starts_with("file://")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue