format request, begin download feature implementation

This commit is contained in:
yggverse 2024-12-09 14:55:20 +02:00
parent 88b3adaf2d
commit 09f2a17f22
6 changed files with 533 additions and 187 deletions

View file

@ -1,9 +1,14 @@
mod download;
mod failure;
mod identity;
mod loading;
use crate::app::browser::window::tab::item::Action;
use adw::StatusPage;
use gtk::{
gio::{Cancellable, File},
Label,
};
use std::{rc::Rc, time::Duration};
pub struct Status {
@ -13,6 +18,17 @@ pub struct Status {
impl Status {
// Constructors
/// Create new download preset
pub fn new_download(
initial_filename: &str,
cancellable: &Cancellable,
on_choose: impl Fn(File, Label) + 'static,
) -> Self {
Self {
gobject: download::new(initial_filename, cancellable, on_choose),
}
}
/// Create new failure preset
///
/// Useful as placeholder widget for error handlers