summaryrefslogtreecommitdiff
path: root/src/openbox.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-12-23 00:04:32 +0000
committerDana Jansens <danakj@orodu.net>2002-12-23 00:04:32 +0000
commit5f78b51429b204f89b654d634bb4cc8cb78b95f6 (patch)
treea2a1d99ac17304a564d52494a3f2bb9752e62907 /src/openbox.cc
parent3cf5a8b6dd5b09a8550c9ecfc19f8e0e884778cc (diff)
using python and swig for now.
Diffstat (limited to 'src/openbox.cc')
-rw-r--r--src/openbox.cc29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/openbox.cc b/src/openbox.cc
index 01e23281..2254f9ef 100644
--- a/src/openbox.cc
+++ b/src/openbox.cc
@@ -1,4 +1,4 @@
-// -*- mode: C++; indent-tabs-mode: nil; -*-
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"
@@ -9,7 +9,6 @@
#include "client.hh"
#include "screen.hh"
#include "actions.hh"
-#include "python.hh"
#include "otk/property.hh"
#include "otk/display.hh"
#include "otk/assassin.hh"
@@ -43,7 +42,12 @@ extern "C" {
# include <sys/select.h>
#endif // HAVE_SYS_SELECT_H
-#include <python2.2/Python.h>
+//#include <guile/gh.h>
+
+#include <Python.h>
+
+// The initializer in openbox_wrap.cc
+extern void init_openbox(void);
#include "gettext.h"
#define _(str) gettext(str)
@@ -153,10 +157,24 @@ Openbox::Openbox(int argc, char **argv)
::exit(1);
}
- // initialize the python interface
+ /*
+ // make our guile interfaces exist
+ SWIG_init();
+
+ // run the guile of d3th
+ FILE *rcpyfd = fopen("/home/natas/.openbox/user.scm", "r");
+ if (!rcpyfd) {
+ printf("failed to load guile script /home/natas/.openbox/user.scm\n");
+ } else {
+ fclose(rcpyfd);
+ gh_load("/home/natas/.openbox/user.scm");
+ }
+ */
+
Py_SetProgramName(argv[0]);
Py_Initialize();
- initopenbox(); // initialize the static 'openbox' module
+ //initopenbox(); // initialize the static 'openbox' module
+ init_openbox();
FILE *rcpyfd = fopen("/home/natas/.openbox/user.py", "r");
if (!rcpyfd) {
printf("failed to load python file /home/natas/.openbox/user.py\n");
@@ -164,6 +182,7 @@ Openbox::Openbox(int argc, char **argv)
PyRun_SimpleFile(rcpyfd, "/home/natas/.openbox/user.py");
fclose(rcpyfd);
}
+
_state = State_Normal; // done starting
}