1
0
Fork 0
mirror of synced 2024-04-30 02:23:53 +12:00
czkawka/czkawka_gui/src/gui_header.rs
Rafał Mikrut 77a48ca6aa
Add support for translations (#469)
* Reformat code with idea tool

* Pierwsza działająca wersja tłumaczeń

* Działa? I dobrze, bo ma działać

* Ćma szła i się potkła

* Ściął śmiałek źółty rząd pąków.
2021-12-11 16:16:14 +01:00

23 lines
696 B
Rust

use crate::fl;
use gtk::prelude::*;
#[derive(Clone)]
pub struct GuiHeader {
pub button_settings: gtk::Button,
pub button_app_info: gtk::Button,
}
impl GuiHeader {
pub fn create_from_builder(builder: &gtk::Builder) -> Self {
let button_settings: gtk::Button = builder.object("button_settings").unwrap();
let button_app_info: gtk::Button = builder.object("button_app_info").unwrap();
Self { button_settings, button_app_info }
}
pub fn update_language(&self) {
self.button_settings.set_tooltip_text(Some(&fl!("header_setting_button_tooltip")));
self.button_app_info.set_tooltip_text(Some(&fl!("header_about_button_tooltip")));
}
}