pub fn click_open(builder: &Builder, window: &Window) {
    let open_file: Button = builder.get_object("open_btn").expect(
        "Couldn't get open_button",
    );
    open_file.connect_clicked(clone!(window => move |_| {
        let dialog = FileChooserDialog::new(Some("Choose a torrent file"),Some(&window),
                                                    FileChooserAction::Open);
        dialog.add_buttons(&[
            ("Open", ResponseType::Ok.into()),
            ("Cancel", ResponseType::Cancel.into())
        ]);

        dialog.set_select_multiple(true);
        dialog.run();
        let files = dialog.get_filenames();
        dialog.destroy();

        println!("Files: {:?}", files);
    }));
}
/*
 *   Here we define `click_open` function which opening
 *   File Chooser Dialog.
 */
Here we define `click_open` function which opening
File Chooser Dialog.
Here we define ` click_open ` function which opening File Chooser Dialog .
pub fn click_open(builder: &Builder, window: &Window) {
    let open_file: Button = builder.get_object("open_btn").expect(
        "Couldn't get open_button",
    );
    open_file.connect_clicked(clone!(window => move |_| {
        let dialog = FileChooserDialog::new(Some("Choose a torrent file"),Some(&window),
                                                    FileChooserAction::Open);
        dialog.add_buttons(&[
            ("Open", ResponseType::Ok.into()),
            ("Cancel", ResponseType::Cancel.into())
        ]);
        dialog.set_select_multiple(true);
        dialog.run();
        let files = dialog.get_filenames();
        dialog.destroy();
        println!("Files: {:?}", files);
    }));
}
pub fn click_open ( builder : & Builder , window : & Window ) { let open_file : Button = builder . get_object ( " " ) . expect ( " " , ) ; open_file . connect_clicked ( clone ! ( window move { let dialog FileChooserDialog new ( Some ( " " ) Some ( window ) FileChooserAction Open ) dialog add_buttons ( [ ( " " ResponseType Ok into ( ) ) ( " " ResponseType Cancel into ( ) ) ] ) dialog set_select_multiple ( true ) dialog run ( ) let files dialog get_filenames ( ) dialog destroy ( ) println ( " " files ) } ) ) ; }
Here we define `click_open` function which opening
   File Chooser Dialog.
Here we define ` click_open ` function which opening File Chooser Dialog .
builder
&Builder
window
&Window