initial commit, lordsawar source, slightly modified
[lordsawar] / src / gui / error-utils.cpp
1 //  Copyright (C) 2007 Ole Laursen
2 //  Copyright (C) 2009 Ben Asselstine
3 //
4 //  This program is free software; you can redistribute it and/or modify
5 //  it under the terms of the GNU General Public License as published by
6 //  the Free Software Foundation; either version 3 of the License, or
7 //  (at your option) any later version.
8 //
9 //  This program is distributed in the hope that it will be useful,
10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 //  GNU Library General Public License for more details.
13 //
14 //  You should have received a copy of the GNU General Public License
15 //  along with this program; if not, write to the Free Software
16 //  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 
17 //  02110-1301, USA.
18
19 #include <config.h>
20
21 #include <gtkmm.h>
22
23 #include "defs.h"
24
25
26 void show_error(const Glib::ustring &msg)
27 {
28     Gtk::MessageDialog d(msg, Gtk::MESSAGE_ERROR);
29
30     d.set_modal();
31     d.set_title(_("Fatal error"));
32
33     d.run();
34 }
35
36 void show_fatal_error(const Glib::ustring &msg)
37 {
38     show_error(msg);
39     
40     exit(1);
41 }
42