mirror of
https://github.com/xlmnxp/blue-recorder.git
synced 2024-11-23 17:13:11 +03:00
remove unnecessary brackets
This commit is contained in:
parent
977e4c2e0a
commit
59d48a1070
72
src/main.rs
72
src/main.rs
@ -180,57 +180,47 @@ fn main() {
|
||||
.parse::<f64>()
|
||||
.unwrap(),
|
||||
);
|
||||
{
|
||||
let _frames_spin = frames_spin.to_owned();
|
||||
frames_spin.connect_value_changed(move |_| {
|
||||
config_management::set(
|
||||
"default",
|
||||
"frame",
|
||||
_frames_spin.get_value().to_string().as_str(),
|
||||
);
|
||||
});
|
||||
}
|
||||
{
|
||||
let _delay_spin = delay_spin.to_owned();
|
||||
delay_spin.connect_value_changed(move |_| {
|
||||
config_management::set(
|
||||
"default",
|
||||
"delay",
|
||||
_delay_spin.get_value().to_string().as_str(),
|
||||
);
|
||||
});
|
||||
}
|
||||
let _frames_spin = frames_spin.to_owned();
|
||||
frames_spin.connect_value_changed(move |_| {
|
||||
config_management::set(
|
||||
"default",
|
||||
"frame",
|
||||
_frames_spin.get_value().to_string().as_str(),
|
||||
);
|
||||
});
|
||||
let _delay_spin = delay_spin.to_owned();
|
||||
delay_spin.connect_value_changed(move |_| {
|
||||
config_management::set(
|
||||
"default",
|
||||
"delay",
|
||||
_delay_spin.get_value().to_string().as_str(),
|
||||
);
|
||||
});
|
||||
|
||||
// Other
|
||||
folder_chooser.set_uri(&config_management::get("default", "folder"));
|
||||
|
||||
// --- connections
|
||||
// show dialog window when about button clicked then hide it after close
|
||||
{
|
||||
let about_dialog: AboutDialog = about_dialog.to_owned();
|
||||
about_menu_item.connect_activate(move |_| {
|
||||
about_dialog.run();
|
||||
about_dialog.hide();
|
||||
});
|
||||
}
|
||||
let _about_dialog: AboutDialog = about_dialog.to_owned();
|
||||
about_menu_item.connect_activate(move |_| {
|
||||
_about_dialog.run();
|
||||
_about_dialog.hide();
|
||||
});
|
||||
|
||||
// Buttons
|
||||
{
|
||||
let area_chooser_window = area_chooser_window.to_owned();
|
||||
area_grab_button.connect_clicked(move |_| {
|
||||
area_chooser_window.show();
|
||||
});
|
||||
}
|
||||
let _area_chooser_window = area_chooser_window.to_owned();
|
||||
area_grab_button.connect_clicked(move |_| {
|
||||
_area_chooser_window.show();
|
||||
});
|
||||
|
||||
// Windows
|
||||
// hide area chooser after it deleted.
|
||||
{
|
||||
let _area_chooser_window = area_chooser_window.to_owned();
|
||||
area_chooser_window.connect_delete_event(move |_, _event: &gdk::Event| {
|
||||
_area_chooser_window.hide();
|
||||
Inhibit(true)
|
||||
});
|
||||
}
|
||||
let _area_chooser_window = area_chooser_window.to_owned();
|
||||
area_chooser_window.connect_delete_event(move |_, _event: &gdk::Event| {
|
||||
_area_chooser_window.hide();
|
||||
Inhibit(true)
|
||||
});
|
||||
|
||||
// close the application when main window destroy
|
||||
main_window.connect_destroy(|_| {
|
||||
@ -245,7 +235,7 @@ fn main() {
|
||||
gtk::StyleContext::add_provider_for_screen(
|
||||
&gdk::Screen::get_default().unwrap(),
|
||||
&provider,
|
||||
gtk::STYLE_PROVIDER_PRIORITY_USER,
|
||||
gtk::STYLE_PROVIDER_PRIORITY_APPLICATION,
|
||||
);
|
||||
|
||||
gtk::main();
|
||||
|
Loading…
Reference in New Issue
Block a user