1
0
Fork 0
mirror of synced 2024-05-09 23:12:29 +12:00
czkawka/czkawka_gui/src/gui_progress_dialog.rs
Rafał Mikrut b5f8d6b028
Update to gtk-rs 0.14 (#383)
* Update to Gtk-rs 0.14
2021-06-25 18:07:13 +02:00

40 lines
1.2 KiB
Rust

use gtk::prelude::*;
#[derive(Clone)]
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,
}
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,
}
}
}