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>()
|
.parse::<f64>()
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
);
|
);
|
||||||
{
|
let _frames_spin = frames_spin.to_owned();
|
||||||
let _frames_spin = frames_spin.to_owned();
|
frames_spin.connect_value_changed(move |_| {
|
||||||
frames_spin.connect_value_changed(move |_| {
|
config_management::set(
|
||||||
config_management::set(
|
"default",
|
||||||
"default",
|
"frame",
|
||||||
"frame",
|
_frames_spin.get_value().to_string().as_str(),
|
||||||
_frames_spin.get_value().to_string().as_str(),
|
);
|
||||||
);
|
});
|
||||||
});
|
let _delay_spin = delay_spin.to_owned();
|
||||||
}
|
delay_spin.connect_value_changed(move |_| {
|
||||||
{
|
config_management::set(
|
||||||
let _delay_spin = delay_spin.to_owned();
|
"default",
|
||||||
delay_spin.connect_value_changed(move |_| {
|
"delay",
|
||||||
config_management::set(
|
_delay_spin.get_value().to_string().as_str(),
|
||||||
"default",
|
);
|
||||||
"delay",
|
});
|
||||||
_delay_spin.get_value().to_string().as_str(),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
folder_chooser.set_uri(&config_management::get("default", "folder"));
|
folder_chooser.set_uri(&config_management::get("default", "folder"));
|
||||||
|
|
||||||
// --- connections
|
// --- connections
|
||||||
// show dialog window when about button clicked then hide it after close
|
// show dialog window when about button clicked then hide it after close
|
||||||
{
|
let _about_dialog: AboutDialog = about_dialog.to_owned();
|
||||||
let about_dialog: AboutDialog = about_dialog.to_owned();
|
about_menu_item.connect_activate(move |_| {
|
||||||
about_menu_item.connect_activate(move |_| {
|
_about_dialog.run();
|
||||||
about_dialog.run();
|
_about_dialog.hide();
|
||||||
about_dialog.hide();
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
{
|
let _area_chooser_window = area_chooser_window.to_owned();
|
||||||
let area_chooser_window = area_chooser_window.to_owned();
|
area_grab_button.connect_clicked(move |_| {
|
||||||
area_grab_button.connect_clicked(move |_| {
|
_area_chooser_window.show();
|
||||||
area_chooser_window.show();
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Windows
|
// Windows
|
||||||
// hide area chooser after it deleted.
|
// hide area chooser after it deleted.
|
||||||
{
|
let _area_chooser_window = area_chooser_window.to_owned();
|
||||||
let _area_chooser_window = area_chooser_window.to_owned();
|
area_chooser_window.connect_delete_event(move |_, _event: &gdk::Event| {
|
||||||
area_chooser_window.connect_delete_event(move |_, _event: &gdk::Event| {
|
_area_chooser_window.hide();
|
||||||
_area_chooser_window.hide();
|
Inhibit(true)
|
||||||
Inhibit(true)
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// close the application when main window destroy
|
// close the application when main window destroy
|
||||||
main_window.connect_destroy(|_| {
|
main_window.connect_destroy(|_| {
|
||||||
@ -245,7 +235,7 @@ fn main() {
|
|||||||
gtk::StyleContext::add_provider_for_screen(
|
gtk::StyleContext::add_provider_for_screen(
|
||||||
&gdk::Screen::get_default().unwrap(),
|
&gdk::Screen::get_default().unwrap(),
|
||||||
&provider,
|
&provider,
|
||||||
gtk::STYLE_PROVIDER_PRIORITY_USER,
|
gtk::STYLE_PROVIDER_PRIORITY_APPLICATION,
|
||||||
);
|
);
|
||||||
|
|
||||||
gtk::main();
|
gtk::main();
|
||||||
|
Loading…
Reference in New Issue
Block a user