add view source menu item

This commit is contained in:
yggverse 2024-12-11 16:52:42 +02:00
parent 85735d33e2
commit e66b065fc3
8 changed files with 124 additions and 0 deletions

View file

@ -94,6 +94,10 @@ impl Request {
self.widget.entry.set_text(&self.download());
}
pub fn to_source(&self) {
self.widget.entry.set_text(&self.source());
}
// Getters
pub fn uri(&self) -> Option<Uri> {
@ -120,6 +124,10 @@ impl Request {
pub fn download(&self) -> GString {
gformat!("download:{}", self.strip_prefix())
}
pub fn source(&self) -> GString {
gformat!("source:{}", self.strip_prefix())
}
}
// Tools