diff options
author | fluxgen <fluxgen> | 2002-05-29 06:22:31 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-05-29 06:22:31 (GMT) |
commit | ffbf15dd45734c06a27896a54b1ab62adb8918a0 (patch) | |
tree | 3bfe47ed15b65b43e883f46cc7a24874e81c0676 /src/fluxbox.cc | |
parent | 095ed342bd5c0c2b25858e50e8786e4a212e59b0 (diff) | |
download | fluxbox_pavel-ffbf15dd45734c06a27896a54b1ab62adb8918a0.zip fluxbox_pavel-ffbf15dd45734c06a27896a54b1ab62adb8918a0.tar.bz2 |
slit order filename
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r-- | src/fluxbox.cc | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 34752a3..3fcf743 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: fluxbox.cc,v 1.59 2002/05/24 13:25:25 fluxgen Exp $ | 25 | // $Id: fluxbox.cc,v 1.60 2002/05/29 06:22:31 fluxgen Exp $ |
26 | 26 | ||
27 | //Use GNU extensions | 27 | //Use GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -300,6 +300,7 @@ m_rc_colors_per_channel(m_resourcemanager, 4, "session.colorsPerChannel", "Sessi | |||
300 | m_rc_stylefile(m_resourcemanager, "", "session.styleFile", "Session.StyleFile"), | 300 | m_rc_stylefile(m_resourcemanager, "", "session.styleFile", "Session.StyleFile"), |
301 | m_rc_menufile(m_resourcemanager, DEFAULTMENU, "session.menuFile", "Session.MenuFile"), | 301 | m_rc_menufile(m_resourcemanager, DEFAULTMENU, "session.menuFile", "Session.MenuFile"), |
302 | m_rc_keyfile(m_resourcemanager, DEFAULTKEYSFILE, "session.keyFile", "Session.KeyFile"), | 302 | m_rc_keyfile(m_resourcemanager, DEFAULTKEYSFILE, "session.keyFile", "Session.KeyFile"), |
303 | m_rc_slitlistfile(m_resourcemanager, "", "session.slitlistFile", "Session.SlitlistFile"), | ||
303 | m_rc_titlebar_left(m_resourcemanager, TitlebarList(&m_titlebar_left[0], &m_titlebar_left[1]), "session.titlebar.left", "Session.Titlebar.Left"), | 304 | m_rc_titlebar_left(m_resourcemanager, TitlebarList(&m_titlebar_left[0], &m_titlebar_left[1]), "session.titlebar.left", "Session.Titlebar.Left"), |
304 | m_rc_titlebar_right(m_resourcemanager, TitlebarList(&m_titlebar_right[0], &m_titlebar_right[3]), "session.titlebar.right", "Session.Titlebar.Right"), | 305 | m_rc_titlebar_right(m_resourcemanager, TitlebarList(&m_titlebar_right[0], &m_titlebar_right[3]), "session.titlebar.right", "Session.Titlebar.Right"), |
305 | m_rc_cache_life(m_resourcemanager, 5, "session.cacheLife", "Session.CacheLife"), | 306 | m_rc_cache_life(m_resourcemanager, 5, "session.cacheLife", "Session.CacheLife"), |
@@ -415,7 +416,7 @@ void Fluxbox::setupConfigFiles() { | |||
415 | createInit = createKeys = createMenu = false; | 416 | createInit = createKeys = createMenu = false; |
416 | 417 | ||
417 | string dirname = getenv("HOME")+string("/.")+string(RC_PATH) + "/"; | 418 | string dirname = getenv("HOME")+string("/.")+string(RC_PATH) + "/"; |
418 | string initFile, keysFile, menuFile; | 419 | string initFile, keysFile, menuFile, slitlistFile; |
419 | initFile = dirname+RC_INIT_FILE; | 420 | initFile = dirname+RC_INIT_FILE; |
420 | keysFile = dirname+"keys"; | 421 | keysFile = dirname+"keys"; |
421 | menuFile = dirname+"menu"; | 422 | menuFile = dirname+"menu"; |
@@ -1923,6 +1924,13 @@ char *Fluxbox::getRcFilename() { | |||
1923 | return dbfile; | 1924 | return dbfile; |
1924 | } | 1925 | } |
1925 | 1926 | ||
1927 | //-------- getDefaultDataFilename ------------- | ||
1928 | // Provides default filename of data file | ||
1929 | //--------------------------------------------- | ||
1930 | void Fluxbox::getDefaultDataFilename(char *name, string &filename) { | ||
1931 | filename = string(getenv("HOME")+string("/.")+RC_PATH+string("/")+name); | ||
1932 | } | ||
1933 | |||
1926 | void Fluxbox::load_rc(void) { | 1934 | void Fluxbox::load_rc(void) { |
1927 | XrmDatabaseHelper database; | 1935 | XrmDatabaseHelper database; |
1928 | 1936 | ||
@@ -1952,6 +1960,17 @@ void Fluxbox::load_rc(void) { | |||
1952 | delete [] tmpvar; | 1960 | delete [] tmpvar; |
1953 | } else | 1961 | } else |
1954 | m_rc_menufile.setDefaultValue(); | 1962 | m_rc_menufile.setDefaultValue(); |
1963 | |||
1964 | if (m_rc_slitlistfile->size()) { | ||
1965 | char *tmpvar =StringUtil::expandFilename(m_rc_slitlistfile->c_str()); | ||
1966 | *m_rc_slitlistfile = (tmpvar==0 ? "" : tmpvar); | ||
1967 | delete [] tmpvar; | ||
1968 | } | ||
1969 | if (!m_rc_slitlistfile->size()) { | ||
1970 | string filename; | ||
1971 | getDefaultDataFilename("slitlist", filename); | ||
1972 | m_rc_slitlistfile.setFromString(filename.c_str()); | ||
1973 | } | ||
1955 | 1974 | ||
1956 | if (*m_rc_colors_per_channel < 2) | 1975 | if (*m_rc_colors_per_channel < 2) |
1957 | *m_rc_colors_per_channel = 2; | 1976 | *m_rc_colors_per_channel = 2; |