77a48ca6aa
* 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.
23 lines
696 B
Rust
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: >k::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")));
|
|
}
|
|
}
|