use openbox/ dir for rc file and menu file. turn menu into a command line option instead of an rc file option

This commit is contained in:
Dana Jansens 2002-05-25 02:24:30 +00:00
parent e5bdc51167
commit b3737edc7c
22 changed files with 129 additions and 64 deletions

View file

@ -2,6 +2,8 @@ $set 14 #main
$ #RCRequiresArg
# error: '-rc' requires an argument\n
$ #MENURequiresArg
# error: '-menu' requires an argument\n
$ #DISPLAYRequiresArg
# error: '-display' requires an argument\n
$ #WarnDisplaySet
@ -11,6 +13,7 @@ $ #Usage
\t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
-display <string>\t\tuse display connection.\n\
-rc <string>\t\t\tuse alternate resource file.\n\
-menu <string>\t\t\tuse alternate menu file.\n\
-version\t\t\tdisplay version and exit.\n\
-help\t\t\t\tdisplay this help text and exit.\n\n
$ #CompileOptions

View file

@ -2,6 +2,8 @@ $set 14 #main
$ #RCRequiresArg
# fejl: '-rc' kræver et argument\n
$ #MENURequiresArg
# fejl: '-menu' kræver et argument\n
$ #DISPLAYRequiresArg
# fjel: '-display' kræver et argument\n
$ #WarnDisplaySet
@ -11,6 +13,7 @@ $ #Usage
\t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
-display <string>\t\tbrug skærm tilslutning.\n\
-rc <string>\t\t\tbrug alternativ resource fil.\n\
-menu <string>\t\t\tbrug alternativ menu fil.\n\
-version\t\t\tvis versionsnummer og afslut.\n\
-help\t\t\t\tvis denne hjælp og afslut.\n\n
$ #CompileOptions

View file

@ -2,6 +2,8 @@ $set 14 #main
$ #RCRequiresArg
# Fehler: '-rc' benötigt einen Parameter\n
$ #MENURequiresArg
# Fehler: '-menu' benötigt einen Parameter\n
$ #DISPLAYRequiresArg
# Fehler: '-display' benötigt einen Parameter\n
$ #WarnDisplaySet
@ -11,6 +13,7 @@ $ #Usage
\t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
-display <string>\t\tDisplay Verbindung.\n\
-rc <string>\t\t\talternative Konfigurationsdatei.\n\
-menu <string>\t\t\talternate menu file.\n\
-version\t\t\tzeige Versionsnummer und Beendung.\n\
-help\t\t\t\tzeige diesen Hilfstext und Beendung.\n\n
$ #CompileOptions

View file

@ -2,6 +2,8 @@ $set 14 #main
$ #RCRequiresArg
# error: '-rc' requiere un argumento
$ #MENURequiresArg
# error: '-menu' requiere un argumento
$ #DISPLAYRequiresArg
# error: '-display' requiere un argumento
$ #WarnDisplaySet
@ -11,6 +13,7 @@ $ #Usage
\t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
-display <string> conexión de despliegue.\n\
-rc <string> archivo alternativo de recuros.\n\
-menu <string> archivo alternativo de menu.\n\
-version mostrar la versión y cerrar.\n\
-help mostrar este texto de ayuda y cerrar.\n\n
$ #CompileOptions

View file

@ -2,6 +2,8 @@ $set 14 #main
$ #RCRequiresArg
# viga: '-rc' vajab argumenti\n
$ #MENURequiresArg
# viga: '-menu' vajab argumenti\n
$ #DISPLAYRequiresArg
# viga: '-display' vajab argumenti\n
$ #WarnDisplaySet
@ -11,6 +13,7 @@ $ #Usage
\t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
-display <string>\t\tkasuta displei ühendust.\n\
-rc <string>\t\t\tkasuta alternatiivseid resursse.\n\
-menu <string>\t\t\tkasuta alternatiivseid menu.\n\
-version\t\t\tnäita versiooninumber ja välju.\n\
-help\t\t\t\tnäita seda abiteksti ja välju.\n\n
$ #CompileOptions

View file

@ -2,6 +2,8 @@ $set 14 #main
$ #RCRequiresArg
# Erreur: '-rc' nécessite un argument\n
$ #MENURequiresArg
# Erreur: '-menu' nécessite un argument\n
$ #DISPLAYRequiresArg
# Erreur: '-display' nécessite un argument\n
$ #WarnDisplaySet
@ -11,6 +13,7 @@ $ #Usage
\t\t\t 1997 - 2000 Brad Hughes\n\n\
-display <chaîne>\t\tutilise la connexion à l'affichage.\n\
-rc <chaîne>\t\t\tutilise un autre fichier de configuration.\n\
-menu <chaîne>\t\t\tutilise un autre fichier de menu.\n\
-version\t\t\taffiche la version et quitte.\n\
-help\t\t\t\taffiche ce texte d'aide et quitte.\n\n
$ #CompileOptions

View file

@ -2,6 +2,8 @@ $set 14 #main
$ #RCRequiresArg
# Hiba: '-rc' kapcsoló paramétere hiányzik\n
$ #MENURequiresArg
# Hiba: '-menu' kapcsoló paramétere hiányzik\n
$ #DISPLAYRequiresArg
# Hiba: '-display' kapcsoló paramétere hiányzik\n
$ #WarnDisplaySet
@ -11,6 +13,7 @@ $ #Usage
\t\t\t 1997 - 2000 Brad Hughes\n\n\
-display <string>\t\thasználandó kijelzõ\n\
-rc <string>\t\t\tválasztható konfigurációs file.\n\
-menu <string>\t\t\tválasztható menu file.\n\
-version\t\t\tverziószám kijelzése és kilépés.\n\
-help\t\t\t\tsúgóképernyõ mutatása és kilépés.\n\n
$ #CompileOptions

View file

@ -2,6 +2,8 @@ $set 14 #main
$ #RCRequiresArg
# errore: '-rc' richiede un argomento\n
$ #MENURequiresArg
# errore: '-menu' richiede un argomento\n
$ #DISPLAYRequiresArg
# errore: '-display' richiede an argomento\n
$ #WarnDisplaySet
@ -11,6 +13,7 @@ $ #Usage
\t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
-display <string>\t\tusa connessione display.\n\
-rc <string>\t\t\tusa un file risorsa alternativo.\n\
-menu <string>\t\t\tusa un file menu alternativo.\n\
-version\t\t\tmostra la versione e esci.\n\
-help\t\t\t\tmostra questo aiuto e esci.\n\n
$ #CompileOptions

View file

@ -2,6 +2,8 @@ $set 14 #main
$ #RCRequiresArg
# : '-rc' \n
$ #MENURequiresArg
# : '-menu' \n
$ #DISPLAYRequiresArg
# : '-display' \n
$ #WarnDisplaySet
@ -11,6 +13,7 @@ $ #Usage
\t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
-display <string>\t\t\n\
-rc <string>\t\t\t使\n\
-menu <string>\t\t\tuse alternate menu file.\n\
-version\t\t\t\n\
-help\t\t\t\t\n\n
$ #CompileOptions

View file

@ -2,6 +2,8 @@ $set 14 #main
$ #RCRequiresArg
# fout: '-rc' heeft een argument nodig (bestandsnaam)\n
$ #MENURequiresArg
# fout: '-menu' heeft een argument nodig (bestandsnaam)\n
$ #DISPLAYRequiresArg
# fout: '-display' heeft een argument nodig (displaynaam)\n
$ #WarnDisplaySet
@ -11,6 +13,7 @@ $ #Usage
\t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
-display <displaynaam> gebruik aangegeven display.\n\
-rc <bestandsnaam> gebruik alternatief resource bestand.\n\
-menu <bestandsnaam> gebruik alternatief menu bestand.\n\
-version toon versie en stop.\n\
-help toon deze hulp tekst en stop.\n\n
$ #CompileOptions

View file

@ -2,6 +2,8 @@ $set 14 #main
$ #RCRequiresArg
# erro: '-rc' requer um argumento\n
$ #MENURequiresArg
# erro: '-menu' requer um argumento\n
$ #DISPLAYRequiresArg
# erro: '-display' requer um argumento\n
$ #WarnDisplaySet
@ -11,6 +13,7 @@ $ #Usage
\t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
-display <string>\t\tusar conexão com o display.\n\
-rc <string>\t\t\tusar arquivo alternativo de recursos.\n\
-menu <string>\t\t\tusar arquivo alternativo de menu.\n\
-version\t\t\tmostrar versao e sair.\n\
-help\t\t\t\tmostrar esta ajuda e sair.\n\n
$ #CompileOptions

View file

@ -2,6 +2,8 @@ $set 14 #main
$ #RCRequiresArg
# ошибка: '-rc' требует наличие аргумента\n
$ #MENURequiresArg
# ÏÛÉÂËÁ: '-menu' ÔÒÅÂÕÅÔ ÎÁÌÉÞÉÅ ÁÒÇÕÍÅÎÔÁ\n
$ #DISPLAYRequiresArg
# ошибка: '-display' требует наличие аргумента\n
$ #WarnDisplaySet
@ -11,6 +13,7 @@ $ #Usage
\t\t\t 1997 - 2000 Brad Hughes\n\n\
-display <string>\t\tиспользовать заданный дисплей.\n\
-rc <string>\t\t\tиспользовать альтернативный файл ресурсов.\n\
-menu <string>\t\t\tuse alternate menu file.\n\
-version\t\t\tвывести номер версии и выйти.\n\
-help\t\t\t\tвывести эту подсказку и выйти.\n\n
$ #CompileOptions

View file

@ -2,6 +2,8 @@ $set 14 #main
$ #RCRequiresArg
# napaka: '-rc' zahteva argument\n
$ #MENURequiresArg
# napaka: '-menu' zahteva argument\n
$ #DISPLAYRequiresArg
# napaka: '-display' zahteva argument\n
$ #WarnDisplaySet
@ -11,6 +13,7 @@ $ #Usage
\t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
-display <string>\t\tuporabi prikazovalnik.\n\
-rc <string>\t\t\tuporabi nadomestno datoteko z viri.\n\
-menu <string>\t\t\tuse alternate menu file.\n\
-version\t\t\tprika¾i oznako razlièice in konèaj.\n\
-help\t\t\t\prika¾i ta navodila in konèaj.\n\n
$ #CompileOptions

View file

@ -2,6 +2,8 @@ $set 14 #main
$ #RCRequiresArg
# fel: '-rc' kräver ett argument\n
$ #MENURequiresArg
# fel: '-menu' kräver ett argument\n
$ #DISPLAYRequiresArg
# fel: '-display' kräver ett argument\n
$ #WarnDisplaySet
@ -11,6 +13,7 @@ $ #Usage
\t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
-display <string>\t\tanvänd skärmanslutning.\n\
-rc <string>\t\t\tanvänd alternativ resursfil.\n\
-menu <string>\t\t\tanvänd alternativ menufil.\n\
-version\t\t\tvisa version och avsluta.\n\
-help\t\t\t\tvisa denna hjälptext och avsluta.\n\n
$ #CompileOptions

View file

@ -2,6 +2,8 @@ $set 14 #main
$ #RCRequiresArg
# hata : '-rc' bir argüman bekler\n
$ #MENURequiresArg
# hata : '-menu' bir argüman bekler\n
$ #DISPLAYRequiresArg
# hata : '-display' bir argüman bekler\n
$ #WarnDisplaySet
@ -11,6 +13,7 @@ $ #Usage
\t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
-display <metin>\t\tekranı kullan.\n\
-rc <metin>\t\t\tbaşka bir ayarlama dosyasını kullan.\n\
-menu <metin>\t\t\tuse alternate menu file.\n\
-version\t\t\tnesil bilgisini gösterir ve çıkar.\n\
-help\t\t\t\tbu yardım iletisini gösterir ve çıkar.\n\n
$ #CompileOptions

View file

@ -2,6 +2,8 @@ $set 14 #main
$ #RCRequiresArg
# ÐÏÍÉÌËÁ: "-rc" ×ÉÍÁÇÁ¤ ÁÒÇÕÍÅÎÔ\n
$ #MENURequiresArg
# ÐÏÍÉÌËÁ: "-menu" ×ÉÍÁÇÁ¤ ÁÒÇÕÍÅÎÔ\n
$ #DISPLAYRequiresArg
# ÐÏÍÉÌËÁ: "-display" ×ÉÍÁÇÁ¤ ÁÒÇÕÍÅÎÔ\n
$ #WarnDisplaySet
@ -10,6 +12,7 @@ $ #Usage
# Blackbox %s: (c) 1997 - 2000 Brad Hughes\n\n\
-display <string>\t\tÏÂÓÌÕÇÏ×Õ×ÁÔÉ ×ËÁÚÁÎÉÊ ÄÉÓÐÌÅÊ.\n\
-rc <string>\t\t\t×ÉËÏÒÉÓÔÏ×Õ×ÁÔÉ ÁÌØÔÅÒÎÁÔÉ×ÎÉÊ ÆÁÊÌ ÒÅÓÕÒÓ¦×.\n\
-menu <string>\t\t\tuse alternate menu file.\n\
-version\t\t\t×É×ÅÓÔÉ ÎÏÍÅÒ ×ÅÒÓ¦§ ¦ ×ÉÊÔÉ.\n\
-help\t\t\t\t×É×ÅÓÔÉ ÃÀ ЦÄËÁÚËÕ ¦ ×ÉÊÔÉ.\n\n
$ #CompileOptions
@ -17,5 +20,4 @@ $ #CompileOptions
Debugging\t\t\t%s\n\
Interlacing:\t\t\t%s\n\
Shape:\t\t\t%s\n\
Slit:\t\t\t\t%s\n\
8bpp Ordered Dithering:\t%s\n\n

View file

@ -2,6 +2,8 @@ $set 14 #main
$ #RCRequiresArg
# : '-rc' \n
$ #MENURequiresArg
# : '-menu' \n
$ #DISPLAYRequiresArg
# : '-display' \n
$ #WarnDisplaySet
@ -11,6 +13,7 @@ $ #Usage
\t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
-display <string>\t\t使.\n\
-rc <string>\t\t\t使.\n\
-menu <string>\t\t\tuse alternate menu file.\n\
-version\t\t\t.\n\
-help\t\t\t\t.\n\n
$ #CompileOptions

View file

@ -2,6 +2,8 @@ $set 14 #main
$ #RCRequiresArg
# error: '-rc' requires an argument\n
$ #MENURequiresArg
# error: '-menu' requires an argument\n
$ #DISPLAYRequiresArg
# error: '-display' requires an argument\n
$ #WarnDisplaySet
@ -11,6 +13,7 @@ $ #Usage
\t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
-display <string>\t\tuse display connection.\n\
-rc <string>\t\t\tuse alternate resource file.\n\
-menu <string>\t\t\tuse alternate menu file.\n\
-version\t\t\tdisplay version and exit.\n\
-help\t\t\t\tdisplay this help text and exit.\n\n
$ #CompileOptions

View file

@ -1118,56 +1118,64 @@ void BScreen::InitMenu(void) {
}
bool defaultMenu = True;
if (blackbox->getMenuFilename()) {
FILE *menu_file = fopen(blackbox->getMenuFilename(), "r");
FILE *menu_file = (FILE *) 0;
const char *menu_filename = blackbox->getMenuFilename();
if (!menu_file) {
perror(blackbox->getMenuFilename());
if (menu_filename)
if (!(menu_file = fopen(menu_filename, "r")))
perror(menu_filename);
if (!menu_file) { // opening the menu file failed, try the default menu
menu_filename = DEFAULTMENU;
if (!(menu_file = fopen(menu_filename, "r")))
perror(menu_filename);
}
if (menu_file) {
if (feof(menu_file)) {
fprintf(stderr, i18n(ScreenSet, ScreenEmptyMenuFile,
"%s: Empty menu file"),
menu_filename);
} else {
if (feof(menu_file)) {
fprintf(stderr, i18n(ScreenSet, ScreenEmptyMenuFile,
"%s: Empty menu file"),
blackbox->getMenuFilename());
} else {
char line[1024], label[1024];
memset(line, 0, 1024);
memset(label, 0, 1024);
char line[1024], label[1024];
memset(line, 0, 1024);
memset(label, 0, 1024);
while (fgets(line, 1024, menu_file) && ! feof(menu_file)) {
if (line[0] != '#') {
int i, key = 0, index = -1, len = strlen(line);
while (fgets(line, 1024, menu_file) && ! feof(menu_file)) {
if (line[0] != '#') {
int i, key = 0, index = -1, len = strlen(line);
for (i = 0; i < len; i++) {
if (line[i] == '[') index = 0;
else if (line[i] == ']') break;
else if (line[i] != ' ')
if (index++ >= 0)
key += tolower(line[i]);
}
for (i = 0; i < len; i++) {
if (line[i] == '[') index = 0;
else if (line[i] == ']') break;
else if (line[i] != ' ')
if (index++ >= 0)
key += tolower(line[i]);
}
if (key == 517) { // [begin]
index = -1;
for (i = index; i < len; i++) {
if (line[i] == '(') index = 0;
else if (line[i] == ')') break;
else if (index++ >= 0) {
if (line[i] == '\\' && i < len - 1) i++;
label[index - 1] = line[i];
}
if (key == 517) { // [begin]
index = -1;
for (i = index; i < len; i++) {
if (line[i] == '(') index = 0;
else if (line[i] == ')') break;
else if (index++ >= 0) {
if (line[i] == '\\' && i < len - 1) i++;
label[index - 1] = line[i];
}
if (index == -1) index = 0;
label[index] = '\0';
rootmenu->setLabel(label);
defaultMenu = parseMenuFile(menu_file, rootmenu);
break;
}
if (index == -1) index = 0;
label[index] = '\0';
rootmenu->setLabel(label);
defaultMenu = parseMenuFile(menu_file, rootmenu);
if (!defaultMenu)
blackbox->addMenuTimestamp(menu_filename);
break;
}
}
}
fclose(menu_file);
}
fclose(menu_file);
}
if (defaultMenu) {
@ -1180,9 +1188,7 @@ void BScreen::InitMenu(void) {
rootmenu->insert(i18n(ScreenSet, ScreenExit, "Exit"),
BScreen::Exit);
rootmenu->setLabel(i18n(BasemenuSet, BasemenuBlackboxMenu,
"Blackbox Menu"));
} else {
blackbox->saveMenuFilename(blackbox->getMenuFilename());
"Openbox Menu"));
}
}
@ -1339,7 +1345,7 @@ bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) {
if (! feof(submenufile)) {
if (! parseMenuFile(submenufile, menu))
blackbox->saveMenuFilename(newfile);
blackbox->addMenuTimestamp(newfile);
fclose(submenufile);
}
@ -1470,7 +1476,7 @@ bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) {
rootmenuList.push_back(stylesmenu);
}
blackbox->saveMenuFilename(stylesdir);
blackbox->addMenuTimestamp(stylesdir);
} else {
fprintf(stderr,
i18n(ScreenSet, ScreenSTYLESDIRErrorNotDir,

View file

@ -134,7 +134,7 @@ static Bool queueScanner(Display *, XEvent *e, char *args) {
Blackbox *blackbox;
Blackbox::Blackbox(char **m_argv, char *dpy_name, char *rc)
Blackbox::Blackbox(char **m_argv, char *dpy_name, char *rc, char *menu)
: BaseDisplay(m_argv[0], dpy_name) {
if (! XSupportsLocale())
fprintf(stderr, "X server does not support locale\n");
@ -144,8 +144,10 @@ Blackbox::Blackbox(char **m_argv, char *dpy_name, char *rc)
::blackbox = this;
argv = m_argv;
if (! rc) rc = "~/.blackboxrc";
if (! rc) rc = "~/.openbox/rc";
rc_file = expandTilde(rc);
if (! menu) menu = "~/.openbox/menu";
menu_file = expandTilde(menu);
no_focus = False;
@ -978,9 +980,6 @@ void Blackbox::save_rc(void) {
load_rc();
sprintf(rc_string, "session.menuFile: %s", getMenuFilename());
XrmPutLineResource(&new_blackboxrc, rc_string);
sprintf(rc_string, "session.colorsPerChannel: %d",
resource.colors_per_channel);
XrmPutLineResource(&new_blackboxrc, rc_string);
@ -1186,13 +1185,6 @@ void Blackbox::load_rc(void) {
int int_value;
unsigned long long_value;
if (XrmGetResource(database, "session.menuFile", "Session.MenuFile",
&value_type, &value)) {
resource.menu_file = expandTilde(value.addr);
} else {
resource.menu_file = DEFAULTMENU;
}
resource.colors_per_channel = 4;
if (XrmGetResource(database, "session.colorsPerChannel",
"Session.ColorsPerChannel", &value_type, &value) &&
@ -1595,7 +1587,7 @@ void Blackbox::saveStyleFilename(const string& filename) {
}
void Blackbox::saveMenuFilename(const string& filename) {
void Blackbox::addMenuTimestamp(const string& filename) {
assert(! filename.empty());
bool found = False;

View file

@ -109,7 +109,7 @@ private:
struct BResource {
Time double_click_interval;
std::string menu_file, style_file;
std::string style_file;
int colors_per_channel;
timeval auto_raise_delay;
unsigned long cache_life, cache_max;
@ -148,7 +148,7 @@ private:
bool no_focus, reconfigure_wait, reread_menu_wait;
Time last_time;
char **argv;
std::string rc_file;
std::string menu_file, rc_file;
Atom xa_wm_colormap_windows, xa_wm_protocols, xa_wm_state,
xa_wm_delete_window, xa_wm_take_focus, xa_wm_change_state,
@ -205,7 +205,7 @@ private:
public:
Blackbox(char **m_argv, char *dpy_name = 0, char *rc = 0);
Blackbox(char **m_argv, char *dpy_name = 0, char *rc = 0, char *menu = 0);
virtual ~Blackbox(void);
Basemenu *searchMenu(Window window);
@ -235,7 +235,7 @@ public:
inline const char *getStyleFilename(void) const
{ return resource.style_file.c_str(); }
inline const char *getMenuFilename(void) const
{ return resource.menu_file.c_str(); }
{ return menu_file.c_str(); }
inline int getColorsPerChannel(void) const
{ return resource.colors_per_channel; }
@ -263,7 +263,7 @@ public:
void shutdown(void);
void load_rc(BScreen *screen);
void saveStyleFilename(const std::string& filename);
void saveMenuFilename(const std::string& filename);
void addMenuTimestamp(const std::string& filename);
void restart(const char *prog = 0);
void reconfigure(void);
void rereadMenu(void);

View file

@ -65,6 +65,7 @@ static void showHelp(int exitval) {
"\t\t\t 1997 - 2000, 2002 Brad Hughes\n\n"
" -display <string>\t\tuse display connection.\n"
" -rc <string>\t\t\tuse alternate resource file.\n"
" -menu <string>\t\t\tuse alternate menu file.\n"
" -version\t\t\tdisplay version and exit.\n"
" -help\t\t\t\tdisplay this help text and exit.\n\n"),
__openbox_version);
@ -101,6 +102,7 @@ static void showHelp(int exitval) {
int main(int argc, char **argv) {
char *session_display = (char *) 0;
char *rc_file = (char *) 0;
char *menu_file = (char *) 0;
i18n.openCatalog("blackbox.cat");
@ -117,6 +119,18 @@ int main(int argc, char **argv) {
}
rc_file = argv[i];
} else if (! strcmp(argv[i], "-menu")) {
// look for alternative menu file to use
if ((++i) >= argc) {
fprintf(stderr,
i18n(mainSet, mainMENURequiresArg,
"error: '-menu' requires and argument\n"));
::exit(1);
}
menu_file = argv[i];
} else if (! strcmp(argv[i], "-display")) {
// check for -display option... to run on a display other than the one
// set by the environment variable DISPLAY
@ -156,7 +170,7 @@ int main(int argc, char **argv) {
_chdir2(getenv("X11ROOT"));
#endif // __EMX__
Blackbox blackbox(argv, session_display, rc_file);
Blackbox blackbox(argv, session_display, rc_file, menu_file);
blackbox.eventLoop();
return(0);