- ScreenList::iterator it, end = _screens.end();
- for (it = _screens.begin(); it != end; ++it) {
- (*it)->manageExisting();
+ assert(_focused_screen);
+
+ // initialize scripting
+ python_init(argv[0]);
+
+ // load the theme XXX TEMP SHIT
+ otk::RenderStyle::setStyle(0, "");
+
+ int ret = python_exec(_scriptfilepath.c_str());
+ if (ret == 2) {
+ std::string msg;
+ msg += _("An error occured while executing the python scripts.");
+ msg += "\n\n";
+ msg += _("See the exact error message in Openbox's output for details.");
+ otk::MessageDialog dia(this, _("Python Error"), msg);
+ otk::DialogButton ok(_("Okay"), true);
+ otk::DialogButton retry(_("Restart"));
+ dia.addButton(ok);
+ dia.addButton(retry);
+ dia.show();
+ dia.focus();
+ const otk::DialogButton &res = dia.run();
+ if (res == retry) {
+ _restart = _shutdown = true;
+ return;
+ }