Skip to content
This repository has been archived by the owner on Feb 14, 2021. It is now read-only.

Commit

Permalink
Close error window
Browse files Browse the repository at this point in the history
- When user clicks the 'close' button close the window and return
  from main() function.
  • Loading branch information
velurimithun authored and jlHertel committed Aug 4, 2018
1 parent 1084d03 commit da94aad
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ int main(int argc, char *argv[]) {
if (!check.canHandle()) {
std::cerr << "Not all screens have open source drivers" << std::endl;
//pop up error window here
Gtk::MessageDialog errorDialog = Gtk::MessageDialog("Closed source driver(s) detected!",
false, Gtk::MESSAGE_ERROR);
errorDialog.set_secondary_text("Currently adriconf cannot handle closed source drivers.");
return 0;
Gtk::MessageDialog *errorDialog = new Gtk::MessageDialog("Closed source driver(s) detected!",
false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_CLOSE);
errorDialog->set_secondary_text("Currently adriconf cannot handle closed source drivers.");
if (errorDialog->run()) {
errorDialog->close();
return 0;
}
}

GUI gui;
Expand Down

0 comments on commit da94aad

Please sign in to comment.