check to make sure the style config could be loaded
This commit is contained in:
parent
6223b6a3ef
commit
804b8cc6e5
1 changed files with 12 additions and 2 deletions
|
@ -1,6 +1,12 @@
|
||||||
#include "application.hh"
|
#include "application.hh"
|
||||||
#include "eventhandler.hh"
|
#include "eventhandler.hh"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#ifdef HAVE_STDLIB_H
|
||||||
|
# include <stdlib.h>
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
namespace otk {
|
namespace otk {
|
||||||
|
@ -35,8 +41,12 @@ OtkApplication::~OtkApplication()
|
||||||
void OtkApplication::loadStyle(void)
|
void OtkApplication::loadStyle(void)
|
||||||
{
|
{
|
||||||
// find the style name as a property
|
// find the style name as a property
|
||||||
_style_conf->setFile("/usr/local/share/openbox/styles/artwiz");
|
std::string style = "/usr/local/share/openbox/styles/artwiz";
|
||||||
_style_conf->load();
|
_style_conf->setFile(style);
|
||||||
|
if (!_style_conf->load()) {
|
||||||
|
std::cerr << "Unable to load style \"" << style << "\". Aborting.\n";
|
||||||
|
::exit(1);
|
||||||
|
}
|
||||||
_style->load(*_style_conf);
|
_style->load(*_style_conf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue