Skip to content

Commit 0c0dde0

Browse files
authored
Merge pull request #4 from derenv/async_button_call
updated button in main program to proper user messages (handy to have…
2 parents 891d846 + 4545a52 commit 0c0dde0

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/main.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,9 @@ fn build_ui(app: &Application) {
6868
.build();
6969
// Connect to "clicked" signal of `button`
7070
button1.connect_clicked(move |_| {
71-
println!("Trying to open settings!"); //DEBUG
72-
73-
// Ideally we should grab if nvidia-settings 'failed' somehow or exited normally
7471
match subprocess::exec_check(&[OsStr::new("nvidia-settings")], None::<&gio::Cancellable>) {
75-
Ok(_x) => {
76-
println!("........yay"); //DEBUG
77-
}
78-
Err(_y) => {
79-
println!("........fak"); //DEBUG
80-
}
72+
Ok(_x) => println!("Opening the Nvidia Settings app.."),
73+
Err(_y) => println!("An error occured while opening the Nvidia Settings app..")
8174
};
8275
});
8376
// Button Child 2

0 commit comments

Comments
 (0)