diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-04-26 00:56:51 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-04-26 00:56:51 (GMT) |
commit | 40e17b4d0ef1b9503f21509e697dd4dcb24d2bbf (patch) | |
tree | 561e9ff127559c915eea87631859c64a7a1d979a /src/fluxbox.cc | |
parent | c13bd3164e484befdc1dc5950137e0c4b58fa31c (diff) | |
download | fluxbox_pavel-40e17b4d0ef1b9503f21509e697dd4dcb24d2bbf.zip fluxbox_pavel-40e17b4d0ef1b9503f21509e697dd4dcb24d2bbf.tar.bz2 |
some updates for the startup file in modern times
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r-- | src/fluxbox.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 1045430..8fcc194 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -524,14 +524,16 @@ void Fluxbox::ungrab() { | |||
524 | void Fluxbox::setupConfigFiles() { | 524 | void Fluxbox::setupConfigFiles() { |
525 | 525 | ||
526 | bool create_init = false, create_keys = false, create_menu = false, | 526 | bool create_init = false, create_keys = false, create_menu = false, |
527 | create_apps = false; | 527 | create_apps = false, create_overlay = false; |
528 | 528 | ||
529 | string dirname = getenv("HOME") + string("/.") + m_RC_PATH + "/"; | 529 | string dirname = getenv("HOME") + string("/.") + m_RC_PATH + "/"; |
530 | string init_file, keys_file, menu_file, slitlist_file, apps_file; | 530 | string init_file, keys_file, menu_file, slitlist_file, apps_file, |
531 | overlay_file; | ||
531 | init_file = dirname + m_RC_INIT_FILE; | 532 | init_file = dirname + m_RC_INIT_FILE; |
532 | keys_file = dirname + "keys"; | 533 | keys_file = dirname + "keys"; |
533 | menu_file = dirname + "menu"; | 534 | menu_file = dirname + "menu"; |
534 | apps_file = dirname + "apps"; | 535 | apps_file = dirname + "apps"; |
536 | overlay_file = dirname + "overlay"; | ||
535 | 537 | ||
536 | struct stat buf; | 538 | struct stat buf; |
537 | 539 | ||
@@ -547,6 +549,8 @@ void Fluxbox::setupConfigFiles() { | |||
547 | create_menu = true; | 549 | create_menu = true; |
548 | if (stat(apps_file.c_str(), &buf)) | 550 | if (stat(apps_file.c_str(), &buf)) |
549 | create_apps = true; | 551 | create_apps = true; |
552 | if (stat(overlay_file.c_str(), &buf)) | ||
553 | create_overlay = true; | ||
550 | 554 | ||
551 | } else { | 555 | } else { |
552 | #ifdef DEBUG | 556 | #ifdef DEBUG |
@@ -580,6 +584,10 @@ void Fluxbox::setupConfigFiles() { | |||
580 | if (create_apps) | 584 | if (create_apps) |
581 | FbTk::FileUtil::copyFile(DEFAULT_APPSFILE, apps_file.c_str()); | 585 | FbTk::FileUtil::copyFile(DEFAULT_APPSFILE, apps_file.c_str()); |
582 | 586 | ||
587 | // copy overlay file | ||
588 | if (create_overlay) | ||
589 | FbTk::FileUtil::copyFile(DEFAULT_OVERLAY, overlay_file.c_str()); | ||
590 | |||
583 | // copy init file | 591 | // copy init file |
584 | if (create_init) | 592 | if (create_init) |
585 | FbTk::FileUtil::copyFile(DEFAULT_INITFILE, init_file.c_str()); | 593 | FbTk::FileUtil::copyFile(DEFAULT_INITFILE, init_file.c_str()); |