summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-04-25 08:36:26 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-04-25 08:36:26 (GMT)
commit2301968bd96aa9406bf8dab008a5d9e313570ddb (patch)
tree98af3fe970dd7883bafbe57d0574b38af4284f6e /src
parent79daf5b1877c6fb98b80680b2f320bbbb92a6d63 (diff)
downloadfluxbox_lack-2301968bd96aa9406bf8dab008a5d9e313570ddb.zip
fluxbox_lack-2301968bd96aa9406bf8dab008a5d9e313570ddb.tar.bz2
add fbrun to default apps file
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/fluxbox.cc12
2 files changed, 12 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 1d489c1..8fe65a6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -27,6 +27,7 @@ SUBDIRS= FbTk
27DEFAULT_MENU=@DEFAULT_MENU@ 27DEFAULT_MENU=@DEFAULT_MENU@
28DEFAULT_STYLE=@DEFAULT_STYLE@ 28DEFAULT_STYLE=@DEFAULT_STYLE@
29DEFAULT_KEYSFILE=@DEFAULT_KEYS@ 29DEFAULT_KEYSFILE=@DEFAULT_KEYS@
30DEFAULT_APPSFILE=@DEFAULT_APPS@
30DEFAULT_INITFILE=@DEFAULT_INIT@ 31DEFAULT_INITFILE=@DEFAULT_INIT@
31PROGRAM_PREFIX=@program_prefix@ 32PROGRAM_PREFIX=@program_prefix@
32PROGRAM_SUFFIX=@program_suffix@ 33PROGRAM_SUFFIX=@program_suffix@
@@ -44,6 +45,7 @@ defaults.hh: Makefile
44 echo '#define DEFAULTMENU "$(DEFAULT_MENU)"'; \ 45 echo '#define DEFAULTMENU "$(DEFAULT_MENU)"'; \
45 echo '#define DEFAULTSTYLE "$(DEFAULT_STYLE)"'; \ 46 echo '#define DEFAULTSTYLE "$(DEFAULT_STYLE)"'; \
46 echo '#define DEFAULTKEYSFILE "$(DEFAULT_KEYSFILE)"'; \ 47 echo '#define DEFAULTKEYSFILE "$(DEFAULT_KEYSFILE)"'; \
48 echo '#define DEFAULT_APPSFILE "$(DEFAULT_APPSFILE)"'; \
47 echo '#define DEFAULT_INITFILE "$(DEFAULT_INITFILE)"'; \ 49 echo '#define DEFAULT_INITFILE "$(DEFAULT_INITFILE)"'; \
48 echo '#define PROGRAM_PREFIX "$(PROGRAM_PREFIX:NONE=)"'; \ 50 echo '#define PROGRAM_PREFIX "$(PROGRAM_PREFIX:NONE=)"'; \
49 echo '#define PROGRAM_SUFFIX "$(PROGRAM_SUFFIX:NONE=)"'; \ 51 echo '#define PROGRAM_SUFFIX "$(PROGRAM_SUFFIX:NONE=)"'; \
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index a1896e9..1045430 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -523,13 +523,15 @@ void Fluxbox::ungrab() {
523*/ 523*/
524void Fluxbox::setupConfigFiles() { 524void 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 528
528 string dirname = getenv("HOME") + string("/.") + m_RC_PATH + "/"; 529 string dirname = getenv("HOME") + string("/.") + m_RC_PATH + "/";
529 string init_file, keys_file, menu_file, slitlist_file; 530 string init_file, keys_file, menu_file, slitlist_file, apps_file;
530 init_file = dirname + m_RC_INIT_FILE; 531 init_file = dirname + m_RC_INIT_FILE;
531 keys_file = dirname + "keys"; 532 keys_file = dirname + "keys";
532 menu_file = dirname + "menu"; 533 menu_file = dirname + "menu";
534 apps_file = dirname + "apps";
533 535
534 struct stat buf; 536 struct stat buf;
535 537
@@ -543,6 +545,8 @@ void Fluxbox::setupConfigFiles() {
543 create_keys = true; 545 create_keys = true;
544 if (stat(menu_file.c_str(), &buf)) 546 if (stat(menu_file.c_str(), &buf))
545 create_menu = true; 547 create_menu = true;
548 if (stat(apps_file.c_str(), &buf))
549 create_apps = true;
546 550
547 } else { 551 } else {
548#ifdef DEBUG 552#ifdef DEBUG
@@ -572,6 +576,10 @@ void Fluxbox::setupConfigFiles() {
572 if (create_menu) 576 if (create_menu)
573 FbTk::FileUtil::copyFile(DEFAULTMENU, menu_file.c_str()); 577 FbTk::FileUtil::copyFile(DEFAULTMENU, menu_file.c_str());
574 578
579 // copy apps file
580 if (create_apps)
581 FbTk::FileUtil::copyFile(DEFAULT_APPSFILE, apps_file.c_str());
582
575 // copy init file 583 // copy init file
576 if (create_init) 584 if (create_init)
577 FbTk::FileUtil::copyFile(DEFAULT_INITFILE, init_file.c_str()); 585 FbTk::FileUtil::copyFile(DEFAULT_INITFILE, init_file.c_str());