aboutsummaryrefslogtreecommitdiff
path: root/src/fluxbox.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-07-07 23:11:04 (GMT)
committermarkt <markt>2007-07-07 23:11:04 (GMT)
commit135019abf97c7adb236c061d46e3906e51c8a145 (patch)
tree2e675ac4d9dfda48301e0b2a40b057448174692e /src/fluxbox.cc
parentb735d405f58ac226e025d6ef4dbd91a0129bb12e (diff)
downloadfluxbox-135019abf97c7adb236c061d46e3906e51c8a145.zip
fluxbox-135019abf97c7adb236c061d46e3906e51c8a145.tar.bz2
fixes for --program-prefix and --program-suffix, plus fixed overwriting init file on reconfigure
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r--src/fluxbox.cc25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 4ebfe95..7745a89 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -202,12 +202,12 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
202 m_rc_double_click_interval(m_resourcemanager, 250, "session.doubleClickInterval", "Session.DoubleClickInterval"), 202 m_rc_double_click_interval(m_resourcemanager, 250, "session.doubleClickInterval", "Session.DoubleClickInterval"),
203 m_rc_tabs_padding(m_resourcemanager, 0, "session.tabPadding", "Session.TabPadding"), 203 m_rc_tabs_padding(m_resourcemanager, 0, "session.tabPadding", "Session.TabPadding"),
204 m_rc_stylefile(m_resourcemanager, DEFAULTSTYLE, "session.styleFile", "Session.StyleFile"), 204 m_rc_stylefile(m_resourcemanager, DEFAULTSTYLE, "session.styleFile", "Session.StyleFile"),
205 m_rc_styleoverlayfile(m_resourcemanager, "~/.fluxbox/overlay", "session.styleOverlay", "Session.StyleOverlay"), 205 m_rc_styleoverlayfile(m_resourcemanager, "~/." + realProgramName("fluxbox") + "/overlay", "session.styleOverlay", "Session.StyleOverlay"),
206 m_rc_menufile(m_resourcemanager, DEFAULTMENU, "session.menuFile", "Session.MenuFile"), 206 m_rc_menufile(m_resourcemanager, DEFAULTMENU, "session.menuFile", "Session.MenuFile"),
207 m_rc_keyfile(m_resourcemanager, DEFAULTKEYSFILE, "session.keyFile", "Session.KeyFile"), 207 m_rc_keyfile(m_resourcemanager, DEFAULTKEYSFILE, "session.keyFile", "Session.KeyFile"),
208 m_rc_slitlistfile(m_resourcemanager, "~/.fluxbox/slitlist", "session.slitlistFile", "Session.SlitlistFile"), 208 m_rc_slitlistfile(m_resourcemanager, "~/." + realProgramName("fluxbox") + "/slitlist", "session.slitlistFile", "Session.SlitlistFile"),
209 m_rc_groupfile(m_resourcemanager, "~/.fluxbox/groups", "session.groupFile", "Session.GroupFile"), 209 m_rc_groupfile(m_resourcemanager, "~/." + realProgramName("fluxbox") + "/groups", "session.groupFile", "Session.GroupFile"),
210 m_rc_appsfile(m_resourcemanager, "~/.fluxbox/apps", "session.appsFile", "Session.AppsFile"), 210 m_rc_appsfile(m_resourcemanager, "~/." + realProgramName("fluxbox") + "/apps", "session.appsFile", "Session.AppsFile"),
211 m_rc_tabs_attach_area(m_resourcemanager, ATTACH_AREA_WINDOW, "session.tabsAttachArea", "Session.TabsAttachArea"), 211 m_rc_tabs_attach_area(m_resourcemanager, ATTACH_AREA_WINDOW, "session.tabsAttachArea", "Session.TabsAttachArea"),
212 m_rc_cache_life(m_resourcemanager, 5, "session.cacheLife", "Session.CacheLife"), 212 m_rc_cache_life(m_resourcemanager, 5, "session.cacheLife", "Session.CacheLife"),
213 m_rc_cache_max(m_resourcemanager, 200, "session.cacheMax", "Session.CacheMax"), 213 m_rc_cache_max(m_resourcemanager, 200, "session.cacheMax", "Session.CacheMax"),
@@ -227,7 +227,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
227 m_shutdown(false), 227 m_shutdown(false),
228 m_server_grabs(0), 228 m_server_grabs(0),
229 m_randr_event_type(0), 229 m_randr_event_type(0),
230 m_RC_PATH("fluxbox"), 230 m_RC_PATH(realProgramName("fluxbox")),
231 m_RC_INIT_FILE("init") { 231 m_RC_INIT_FILE("init") {
232 232
233 _FB_USES_NLS; 233 _FB_USES_NLS;
@@ -588,7 +588,7 @@ void Fluxbox::setupConfigFiles() {
588 588
589 bool create_init = false, create_keys = false, create_menu = false; 589 bool create_init = false, create_keys = false, create_menu = false;
590 590
591 string dirname = getenv("HOME") + string("/.") + string(m_RC_PATH) + "/"; 591 string dirname = getenv("HOME") + string("/.") + m_RC_PATH + "/";
592 string init_file, keys_file, menu_file, slitlist_file; 592 string init_file, keys_file, menu_file, slitlist_file;
593 init_file = dirname + m_RC_INIT_FILE; 593 init_file = dirname + m_RC_INIT_FILE;
594 keys_file = dirname + "keys"; 594 keys_file = dirname + "keys";
@@ -645,8 +645,8 @@ void Fluxbox::setupConfigFiles() {
645 if (*config_version < CONFIG_VERSION) { 645 if (*config_version < CONFIG_VERSION) {
646 // configs are out of date, so run fluxbox-update_configs 646 // configs are out of date, so run fluxbox-update_configs
647 647
648 string commandargs = "fluxbox-update_configs -rc "; 648 string commandargs = realProgramName("fluxbox-update_configs");
649 commandargs += init_file; 649 commandargs += " -rc " + init_file;
650 650
651#ifdef HAVE_GETPID 651#ifdef HAVE_GETPID
652 // add the fluxbox pid so fbuc can have us reload rc if necessary 652 // add the fluxbox pid so fbuc can have us reload rc if necessary
@@ -1084,7 +1084,7 @@ void Fluxbox::handleSignal(int signum) {
1084 load_rc(); 1084 load_rc();
1085 break; 1085 break;
1086 case SIGUSR2: 1086 case SIGUSR2:
1087 reload_rc(); 1087 reconfigure();
1088 break; 1088 break;
1089 case SIGSEGV: 1089 case SIGSEGV:
1090 abort(); 1090 abort();
@@ -1559,13 +1559,8 @@ void Fluxbox::load_rc(BScreen &screen) {
1559 } 1559 }
1560} 1560}
1561 1561
1562void Fluxbox::reload_rc() {
1563 load_rc();
1564 reconfigure();
1565}
1566
1567
1568void Fluxbox::reconfigure() { 1562void Fluxbox::reconfigure() {
1563 load_rc();
1569 m_reconfigure_wait = true; 1564 m_reconfigure_wait = true;
1570 m_reconfig_timer.start(); 1565 m_reconfig_timer.start();
1571} 1566}