mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
format request, begin download feature implementation
This commit is contained in:
parent
88b3adaf2d
commit
09f2a17f22
6 changed files with 533 additions and 187 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue