You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: connect_add_folders_button.rs
    path of file: ./repos/szyszka/src/gui_connection
    
    the code of the file until where you have to start completion: use std::cell::RefCell;
use std::path::PathBuf;
use std::rc::Rc;

use glib::Propagation;
use gtk4::prelude::*;
use gtk4::{Orientation, ResponseType, Widget, Window};

use crate::add_files_folders::add_folders_to_check;
use crate::fls;
use crate::gui_data_things::gui_data::GuiData;
use crate::help_function::{get_list_store_from_tree_view, get_selected_folders_files_in_dialog, ResultEntries};
use crate::rule::rules::Rules;
use crate::update_records::{update_records, UpdateMode};

pub fn connect_add_folders_button(gui_data: &GuiData) {
    let button_add_folders = gui_data.upper_buttons.button_add_folders.clone();
    let tree_view_results = gui_data.results.tree_view_results.clone();
    let shared_result_entries = gui_data.shared_result_entries.clone();
    let rules = gui_data.rules.clone();

    let label_files_folders = gui_data.upper_buttons.label_files_folders.clone();

    let window_main = gui_data.window_main.clone();

    let file_chooser_dialog_add_folders = gui_data.upper_buttons.file_chooser_dialog_add_folders.clone();

    file_chooser_dialog_add_folders.connect_response(move |file_chooser_dialog_add_folders, response| {
        let shared_result_entries = shared_result_entries.clone();
        if response == ResponseType::Accept {
    
    
pub fn connect_add_folders_button(gui_data: &GuiData) {
    let button_add_folders = gui_data.upper_buttons.button_add_folders.clone();
    let tree_view_results = gui_data.results.tree_view_results.clone();
    let shared_result_entries = gui_data.shared_result_entries.clone();
    let rules = gui_data.rules.clone();

    let label_files_folders = gui_data.upper_buttons.label_files_folders.clone();

    let window_main = gui_data.window_main.clone();

    let file_chooser_dialog_add_folders = gui_data.upper_buttons.file_chooser_dialog_add_folders.clone();

    file_chooser_dialog_add_folders.connect_response(move |file_chooser_dialog_add_folders, response| {
        let shared_result_entries = shared_result_entries.clone();
        if response == ResponseType::Accept {
            let folders_to_check = get_selected_folders_files_in_dialog(file_chooser_dialog_add_folders);
            if !folders_to_check.is_empty() {
                create_scan_inside_ignore_files_dialog(
                    folders_to_check,
                    tree_view_results.clone(),
                    shared_result_entries,
                    rules.clone(),
                    label_files_folders.clone(),
                    &window_main,
                );
            }
        }
    });

    button_add_folders.connect_clicked(move |_| {
        file_chooser_dialog_add_folders.show();
    });
}