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

Commit

Permalink
Pop up error message dialog
Browse files Browse the repository at this point in the history
- An message dialog will pop when closed source driver(s) is detected.

- Primary and secondary error messages are hard coded.
  • Loading branch information
velurimithun authored and jlHertel committed Aug 3, 2018
1 parent 9bc65ae commit 1084d03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <gtkmm.h>
#include "GUI.h"
#include "DRIQuery.h"
#include <gtkmm/messagedialog.h>

int main(int argc, char *argv[]) {
/* Start the GUI work */
Expand All @@ -13,6 +14,9 @@ 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;
}

Expand Down

0 comments on commit 1084d03

Please sign in to comment.