all repos — fluxbox @ 6b3a626cbef1f50696c15937f77735ed1c916eb3

custom fork of the fluxbox windowmanager

filename fix, patch from Mathias Gumz
fluxgen fluxgen
commit

6b3a626cbef1f50696c15937f77735ed1c916eb3

parent

3c78d753c0c1b293d20ad52e38586929bf47f13e

4 files changed, 13 insertions(+), 21 deletions(-)

jump to
M src/Keys.ccsrc/Keys.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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 @@ // must have at least 1 argument

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;
M src/Slit.ccsrc/Slit.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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 @@ if (filename == 0 || filename[0] == '\0')

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 @@ FbTk::RefCount<FbTk::Command> cycle_down(new FbTk::SimpleCommand<Slit>(*this, &Slit::cycleClientsDown));

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::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;
M src/Workspace.ccsrc/Workspace.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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 @@ return false;

} 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)
M src/fluxbox.ccsrc/fluxbox.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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 @@ "Make sure you don't have another window manager running.");

} // 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 @@ *m_rc_colors_per_channel = 6;

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; }