mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
add view source menu item
This commit is contained in:
parent
85735d33e2
commit
e66b065fc3
8 changed files with 124 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -56,6 +56,19 @@ impl Menu {
|
|||
|
||||
main.append_section(None, &main_mark);
|
||||
|
||||
let main_tools = gtk::gio::Menu::new();
|
||||
|
||||
main_tools.append(
|
||||
Some("Source"),
|
||||
Some(&format!(
|
||||
"{}.{}",
|
||||
window_action.id,
|
||||
window_action.source.gobject.name()
|
||||
)),
|
||||
);
|
||||
|
||||
main.append_section(None, &main_tools);
|
||||
|
||||
let navigation = gtk::gio::Menu::new();
|
||||
|
||||
navigation.append(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue