#include "client.hh"
#include "openbox.hh"
#include "frame.hh"
+#include "bindings.hh"
+#include "python.hh"
#include "otk/display.hh"
static bool running;
namespace ob {
-OBScreen::OBScreen(int screen, const otk::Configuration &config)
+OBScreen::OBScreen(int screen)
: _number(screen),
_root(screen)
{
// initialize the screen's style
_style.setImageControl(_image_control);
- _style.load(config);
-
+ std::string stylepath;
+ python_get_string("theme", &stylepath);
+ otk::Configuration sconfig(false);
+ sconfig.setFile(otk::expandTilde(stylepath));
+ if (!sconfig.load()) {
+ sconfig.setFile(otk::expandTilde(DEFAULTSTYLE));
+ if (!sconfig.load()) {
+ printf(_("Unable to load default style: %s. Aborting.\n"), DEFAULTSTYLE);
+ ::exit(1);
+ }
+ }
+ _style.load(sconfig);
// Set the netwm atoms for geomtery and viewport
unsigned long geometry[] = { _info->width(),
}
-void OBScreen::loadStyle(const otk::Configuration &config)
-{
- _style.load(config);
-
- // XXX: make stuff redraw!
-}
-
-
void OBScreen::manageWindow(Window window)
{
OBClient *client = 0;