1
0
Fork 0
mirror of synced 2024-06-18 18:34:54 +12:00
czkawka/czkawka_gui/src/gui_about.rs
Rafał Mikrut 4871016a3c
Add option to not remove outdated cache entries (#472)
* Add option to not remove outdated cache entries

* Default duplicates cache size lowered to 512 KB

* Add some tooltips,
Add logic to opening cache/config folders

* Add option to clear cache files from outdated results(manually)
2021-11-30 12:45:09 +01:00

36 lines
1.3 KiB
Rust

use gtk::prelude::*;
use gtk::{Builder, WindowPosition};
#[derive(Clone)]
pub struct GuiAbout {
pub about_dialog: gtk::AboutDialog,
pub button_repository: gtk::Button,
pub button_donation: gtk::Button,
pub button_instruction: gtk::Button,
}
impl GuiAbout {
pub fn create_from_builder() -> Self {
let glade_src = include_str!("../ui/about_dialog.glade").to_string();
let builder = Builder::from_string(glade_src.as_str());
let about_dialog: gtk::AboutDialog = builder.object("about_dialog").unwrap();
about_dialog.set_position(WindowPosition::Center);
let button_repository: gtk::Button = builder.object("button_repository").unwrap();
button_repository.set_tooltip_text(Some("Link to repository page with source code."));
let button_donation: gtk::Button = builder.object("button_donation").unwrap();
button_donation.set_tooltip_text(Some("Link to donation page."));
let button_instruction: gtk::Button = builder.object("button_instruction").unwrap();
button_instruction.set_tooltip_text(Some("Link to instruction page."));
Self {
about_dialog,
button_repository,
button_donation,
button_instruction,
}
}
}