]> Dogcows Code - chaz/openbox/blobdiff - src/openbox.cc
rm prefixes for all elements in the otk namepsace
[chaz/openbox] / src / openbox.cc
index 3232827ff92d3eddd3cc1f5a072e00a9b67d1feb..600c9d8d90bcfdf372080c4b32d1ecd376e4c3e1 100644 (file)
@@ -4,7 +4,6 @@
 # include "../config.h"
 #endif
 
-#include "../version.h"
 #include "openbox.hh"
 #include "client.hh"
 #include "screen.hh"
@@ -14,7 +13,7 @@
 #include "otk/property.hh"
 #include "otk/display.hh"
 #include "otk/assassin.hh"
-#include "otk/util.hh" // TEMPORARY
+#include "otk/util.hh"
 
 extern "C" {
 #include <X11/cursorfont.h>
@@ -203,7 +202,7 @@ Openbox::~Openbox()
     if (!_restart_prog.empty()) {
       const std::string &dstr =
         otk::OBDisplay::screenInfo(first_screen)->displayString();
-      putenv(const_cast<char *>(dstr.c_str()));
+      otk::putenv(const_cast<char *>(dstr.c_str()));
       execlp(_restart_prog.c_str(), _restart_prog.c_str(), NULL);
       perror(_restart_prog.c_str());
     }
@@ -265,7 +264,7 @@ void Openbox::parseCommandLine(int argc, char **argv)
 
 void Openbox::showVersion()
 {
-  printf(_("Openbox - version %s\n"), OPENBOX_VERSION);
+  printf(_("Openbox - version %s\n"), VERSION);
   printf("    (c) 2002 - 2002 Ben Jansens\n\n");
 }
 
@@ -382,23 +381,9 @@ void Openbox::setFocusedClient(OBClient *c)
 
 void Openbox::execute(int screen, const std::string &bin)
 {
-#ifdef    __EMX__
-  // XXX: whats this for? windows?
-  spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", bin.c_str(), NULL);
-#else //  __EMX__
   if (screen >= ScreenCount(otk::OBDisplay::display))
     screen = 0;
-  const std::string &dstr =
-    otk::OBDisplay::screenInfo(screen)->displayString();
-  
-  if (! fork()) {
-      setsid();
-      int ret = putenv(const_cast<char *>(dstr.c_str()));
-      assert(ret != -1);
-      ret = execl("/bin/sh", "/bin/sh", "-c", bin.c_str(), NULL);
-      exit(ret);
-    }
-#endif // __EMX__
+  otk::bexec(bin, otk::OBDisplay::screenInfo(screen)->displayString());
 }
 
 }
This page took 0.02131 seconds and 4 git commands to generate.