2
0
mirror of https://github.com/qarmin/czkawka synced 2024-11-10 07:10:40 +00:00
czkawka/czkawka_gui/src/gui_progress_dialog.rs

40 lines
1.2 KiB
Rust
Raw Normal View History

use gtk::prelude::*;
#[derive(Clone)]
2021-03-27 12:14:02 +00:00
pub struct GuiProgressDialog {
pub window_progress: gtk::Window,
pub progress_bar_current_stage: gtk::ProgressBar,
pub progress_bar_all_stages: gtk::ProgressBar,
pub label_stage: gtk::Label,
pub grid_progress_stages: gtk::Grid,
pub button_stop_in_dialog: gtk::Button,
}
2021-03-27 12:14:02 +00:00
impl GuiProgressDialog {
pub fn create_from_builder(builder: &gtk::Builder) -> Self {
let window_progress: gtk::Window = builder.object("window_progress").unwrap();
let progress_bar_current_stage: gtk::ProgressBar = builder.object("progress_bar_current_stage").unwrap();
let progress_bar_all_stages: gtk::ProgressBar = builder.object("progress_bar_all_stages").unwrap();
let label_stage: gtk::Label = builder.object("label_stage").unwrap();
let grid_progress_stages: gtk::Grid = builder.object("grid_progress_stages").unwrap();
let button_stop_in_dialog: gtk::Button = builder.object("button_stop_in_dialog").unwrap();
Self {
window_progress,
progress_bar_current_stage,
progress_bar_all_stages,
label_stage,
grid_progress_stages,
button_stop_in_dialog,
}
}
}