Definition in file main.cc.
#include "gettext.h"
#include "openbox.hh"
#include "otk/util.hh"
Include dependency graph for main.cc:

Go to the source code of this file.
Functions | |
| int | main (int argc, char **argv) |
|
||||||||||||
|
Definition at line 31 of file main.cc. References ob::openbox.
00031 {
00032 // initialize the locale
00033 if (!setlocale(LC_ALL, ""))
00034 printf("Couldn't set locale from environment.\n");
00035 bindtextdomain(PACKAGE, LOCALEDIR);
00036 bind_textdomain_codeset(PACKAGE, "UTF-8");
00037 textdomain(PACKAGE);
00038
00039 ob::Openbox *openbox = new ob::Openbox(argc, argv);
00040 openbox->eventLoop();
00041
00042 if (openbox->doRestart()) {
00043 std::string prog = openbox->restartProgram();
00044
00045 delete openbox; // shutdown the current one!
00046
00047 if (!prog.empty()) {
00048 execl("/bin/sh", "/bin/sh", "-c", prog.c_str(), NULL);
00049 perror(prog.c_str());
00050 }
00051
00052 // fall back in case the above execlp doesn't work
00053 execvp(argv[0], argv);
00054 execvp(otk::basename(argv[0]).c_str(), argv);
00055 }
00056
00057 delete openbox; // shutdown
00058 }
|
1.3-rc2