filename fix, patch from Mathias Gumz

This commit is contained in:
fluxgen 2004-02-20 09:29:07 +00:00
parent 3c78d753c0
commit 6b3a626cbe
4 changed files with 13 additions and 21 deletions

View file

@ -19,7 +19,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//$Id: Keys.cc,v 1.41 2003/12/30 18:14:33 fluxgen Exp $
//$Id: Keys.cc,v 1.42 2004/02/20 09:29:07 fluxgen Exp $
#include "Keys.hh"
@ -158,7 +158,7 @@ bool Keys::addBinding(const std::string &linebuffer) {
if (val.size() <= 0)
return true; // empty lines are valid.
if (val[0][0] == '#') //the line is commented
if (val[0][0] == '#' || val[0][0] == '!' ) //the line is commented
return true; // still a valid line.
unsigned int key = 0, mod = 0;

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Slit.cc,v 1.91 2004/02/12 10:29:24 rathnor Exp $
// $Id: Slit.cc,v 1.92 2004/02/20 09:29:06 fluxgen Exp $
#include "Slit.hh"
@ -1129,11 +1129,12 @@ void Slit::loadClientList(const char *filename) {
return;
// save filename so we can save client list later
m_filename = FbTk::StringUtil::expandFilename(filename);
m_filename = filename;
std::string real_filename= FbTk::StringUtil::expandFilename(filename);
struct stat buf;
if (stat(m_filename.c_str(), &buf) == 0) {
std::ifstream file(m_filename.c_str());
if (stat(real_filename.c_str(), &buf) == 0) {
std::ifstream file(real_filename.c_str());
std::string name;
while (! file.eof()) {
name = "";
@ -1170,7 +1171,7 @@ void Slit::updateClientmenu() {
m_clientlist_menu.insert("Cycle Up", cycle_up);
m_clientlist_menu.insert("Cycle Down", cycle_down);
FbTk::MenuItem *separator = new FbTk::MenuItem("-------");
FbTk::MenuItem *separator = new FbTk::MenuItem("---");
separator->setEnabled(false);
m_clientlist_menu.insert(separator);
@ -1186,7 +1187,7 @@ void Slit::updateClientmenu() {
void Slit::saveClientList() {
std::ofstream file(m_filename.c_str());
std::ofstream file(FbTk::StringUtil::expandFilename(m_filename).c_str());
SlitClients::iterator it = m_client_list.begin();
SlitClients::iterator it_end = m_client_list.end();
std::string prevName;

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Workspace.cc,v 1.90 2004/01/21 14:14:40 fluxgen Exp $
// $Id: Workspace.cc,v 1.91 2004/02/20 09:29:07 fluxgen Exp $
#include "Workspace.hh"
@ -339,7 +339,7 @@ bool Workspace::checkGrouping(FluxboxWindow &win) {
}
bool Workspace::loadGroups(const std::string &filename) {
string real_filename = filename;
string real_filename = FbTk::StringUtil::expandFilename(filename);
FbTk::StringUtil::removeTrailingWhitespace(real_filename);
ifstream infile(real_filename.c_str());
if (!infile)

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: fluxbox.cc,v 1.230 2004/02/10 18:51:08 fluxgen Exp $
// $Id: fluxbox.cc,v 1.231 2004/02/20 09:29:05 fluxgen Exp $
#include "fluxbox.hh"
@ -569,7 +569,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
}
// setup theme manager to have our style file ready to be scanned
FbTk::ThemeManager::instance().load(getStyleFilename());
FbTk::ThemeManager::instance().load(FbTk::StringUtil::expandFilename(getStyleFilename()));
XSynchronize(disp, False);
sync(false);
@ -1642,16 +1642,7 @@ void Fluxbox::load_rc() {
if (m_rc_stylefile->empty())
*m_rc_stylefile = DEFAULTSTYLE;
else // expand tilde
*m_rc_stylefile = StringUtil::expandFilename(*m_rc_stylefile);
// expand tilde
*m_rc_groupfile = StringUtil::expandFilename(*m_rc_groupfile);
#ifdef DEBUG
cerr<<__FILE__<<": Loading groups ("<<*m_rc_groupfile<<")"<<endl;
#endif // DEBUG
if (!Workspace::loadGroups(*m_rc_groupfile)) {
cerr<<"Failed to load groupfile: "<<*m_rc_groupfile<<endl;
}