mirror of https://github.com/qarmin/czkawka
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
807 B
Rust
24 lines
807 B
Rust
3 years ago
|
use gtk::prelude::*;
|
||
|
|
||
3 years ago
|
use crate::gui_structs::gui_data::GuiData;
|
||
4 years ago
|
use crate::help_functions::*;
|
||
4 years ago
|
use crate::notebook_enums::*;
|
||
4 years ago
|
|
||
|
pub fn connect_notebook_tabs(gui_data: &GuiData) {
|
||
|
let shared_buttons = gui_data.shared_buttons.clone();
|
||
4 years ago
|
let buttons_array = gui_data.bottom_buttons.buttons_array.clone();
|
||
|
let notebook_main_clone = gui_data.main_notebook.notebook_main.clone();
|
||
|
let buttons_names = gui_data.bottom_buttons.buttons_names.clone();
|
||
4 years ago
|
|
||
4 years ago
|
notebook_main_clone.connect_switch_page(move |_, _, number| {
|
||
4 years ago
|
let current_tab_in_main_notebook = to_notebook_main_enum(number);
|
||
|
|
||
4 years ago
|
// Buttons
|
||
3 years ago
|
set_buttons(
|
||
|
&mut *shared_buttons.borrow_mut().get_mut(¤t_tab_in_main_notebook).unwrap(),
|
||
|
&buttons_array,
|
||
|
&buttons_names,
|
||
|
);
|
||
4 years ago
|
});
|
||
|
}
|