aboutsummaryrefslogtreecommitdiffstats
path: root/src/gui/WidgetFactory.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/WidgetFactory.hpp')
-rw-r--r--src/gui/WidgetFactory.hpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/WidgetFactory.hpp b/src/gui/WidgetFactory.hpp
index 6d706dd..41e8200 100644
--- a/src/gui/WidgetFactory.hpp
+++ b/src/gui/WidgetFactory.hpp
@@ -30,17 +30,18 @@ public:
Glib::RefPtr<Gtk::Builder> xml;
// Check for the .ui file in current directory
- std::string ui_filename = "./machina.ui";
+ std::string ui_filename = "./machina.ui";
std::ifstream fs(ui_filename.c_str());
- if (fs.fail()) { // didn't find it, check MACHINA_DATA_DIR
+ if (fs.fail()) {
+ // didn't find it, check MACHINA_DATA_DIR
fs.clear();
- ui_filename = MACHINA_DATA_DIR;
+ ui_filename = MACHINA_DATA_DIR;
ui_filename += "/machina.ui";
fs.open(ui_filename.c_str());
if (fs.fail()) {
- std::cerr << "Unable to find machina.ui in current directory or "
- << MACHINA_DATA_DIR << "." << std::endl;
+ std::cerr << "No machina.ui in current directory or "
+ << MACHINA_DATA_DIR << "." << std::endl;
exit(EXIT_FAILURE);
}
fs.close();
@@ -48,12 +49,12 @@ public:
try {
xml = Gtk::Builder::create_from_file(ui_filename);
- } catch(const Gtk::BuilderError& ex) {
+ } catch (const Gtk::BuilderError& ex) {
std::cerr << ex.what() << std::endl;
throw ex;
}
return xml;
}
-};
+};