diff options
author | fluxgen <fluxgen> | 2004-02-20 09:29:07 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-02-20 09:29:07 (GMT) |
commit | 6b3a626cbef1f50696c15937f77735ed1c916eb3 (patch) | |
tree | fa43ca4e303c3392e8b53316fde2e95e6d959188 | |
parent | 3c78d753c0c1b293d20ad52e38586929bf47f13e (diff) | |
download | fluxbox_lack-6b3a626cbef1f50696c15937f77735ed1c916eb3.zip fluxbox_lack-6b3a626cbef1f50696c15937f77735ed1c916eb3.tar.bz2 |
filename fix, patch from Mathias Gumz
-rw-r--r-- | src/Keys.cc | 4 | ||||
-rw-r--r-- | src/Slit.cc | 13 | ||||
-rw-r--r-- | src/Workspace.cc | 4 | ||||
-rw-r--r-- | src/fluxbox.cc | 13 |
4 files changed, 13 insertions, 21 deletions
diff --git a/src/Keys.cc b/src/Keys.cc index 96a12c9..41af901 100644 --- a/src/Keys.cc +++ b/src/Keys.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | //$Id: Keys.cc,v 1.41 2003/12/30 18:14:33 fluxgen Exp $ | 22 | //$Id: Keys.cc,v 1.42 2004/02/20 09:29:07 fluxgen Exp $ |
23 | 23 | ||
24 | 24 | ||
25 | #include "Keys.hh" | 25 | #include "Keys.hh" |
@@ -158,7 +158,7 @@ bool Keys::addBinding(const std::string &linebuffer) { | |||
158 | if (val.size() <= 0) | 158 | if (val.size() <= 0) |
159 | return true; // empty lines are valid. | 159 | return true; // empty lines are valid. |
160 | 160 | ||
161 | if (val[0][0] == '#') //the line is commented | 161 | if (val[0][0] == '#' || val[0][0] == '!' ) //the line is commented |
162 | return true; // still a valid line. | 162 | return true; // still a valid line. |
163 | 163 | ||
164 | unsigned int key = 0, mod = 0; | 164 | unsigned int key = 0, mod = 0; |
diff --git a/src/Slit.cc b/src/Slit.cc index 3802d07..08378ed 100644 --- a/src/Slit.cc +++ b/src/Slit.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: Slit.cc,v 1.91 2004/02/12 10:29:24 rathnor Exp $ | 25 | // $Id: Slit.cc,v 1.92 2004/02/20 09:29:06 fluxgen Exp $ |
26 | 26 | ||
27 | #include "Slit.hh" | 27 | #include "Slit.hh" |
28 | 28 | ||
@@ -1129,11 +1129,12 @@ void Slit::loadClientList(const char *filename) { | |||
1129 | return; | 1129 | return; |
1130 | 1130 | ||
1131 | // save filename so we can save client list later | 1131 | // save filename so we can save client list later |
1132 | m_filename = FbTk::StringUtil::expandFilename(filename); | 1132 | m_filename = filename; |
1133 | std::string real_filename= FbTk::StringUtil::expandFilename(filename); | ||
1133 | 1134 | ||
1134 | struct stat buf; | 1135 | struct stat buf; |
1135 | if (stat(m_filename.c_str(), &buf) == 0) { | 1136 | if (stat(real_filename.c_str(), &buf) == 0) { |
1136 | std::ifstream file(m_filename.c_str()); | 1137 | std::ifstream file(real_filename.c_str()); |
1137 | std::string name; | 1138 | std::string name; |
1138 | while (! file.eof()) { | 1139 | while (! file.eof()) { |
1139 | name = ""; | 1140 | name = ""; |
@@ -1170,7 +1171,7 @@ void Slit::updateClientmenu() { | |||
1170 | m_clientlist_menu.insert("Cycle Up", cycle_up); | 1171 | m_clientlist_menu.insert("Cycle Up", cycle_up); |
1171 | m_clientlist_menu.insert("Cycle Down", cycle_down); | 1172 | m_clientlist_menu.insert("Cycle Down", cycle_down); |
1172 | 1173 | ||
1173 | FbTk::MenuItem *separator = new FbTk::MenuItem("-------"); | 1174 | FbTk::MenuItem *separator = new FbTk::MenuItem("---"); |
1174 | separator->setEnabled(false); | 1175 | separator->setEnabled(false); |
1175 | m_clientlist_menu.insert(separator); | 1176 | m_clientlist_menu.insert(separator); |
1176 | 1177 | ||
@@ -1186,7 +1187,7 @@ void Slit::updateClientmenu() { | |||
1186 | 1187 | ||
1187 | void Slit::saveClientList() { | 1188 | void Slit::saveClientList() { |
1188 | 1189 | ||
1189 | std::ofstream file(m_filename.c_str()); | 1190 | std::ofstream file(FbTk::StringUtil::expandFilename(m_filename).c_str()); |
1190 | SlitClients::iterator it = m_client_list.begin(); | 1191 | SlitClients::iterator it = m_client_list.begin(); |
1191 | SlitClients::iterator it_end = m_client_list.end(); | 1192 | SlitClients::iterator it_end = m_client_list.end(); |
1192 | std::string prevName; | 1193 | std::string prevName; |
diff --git a/src/Workspace.cc b/src/Workspace.cc index 304b3c7..66de402 100644 --- a/src/Workspace.cc +++ b/src/Workspace.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: Workspace.cc,v 1.90 2004/01/21 14:14:40 fluxgen Exp $ | 25 | // $Id: Workspace.cc,v 1.91 2004/02/20 09:29:07 fluxgen Exp $ |
26 | 26 | ||
27 | #include "Workspace.hh" | 27 | #include "Workspace.hh" |
28 | 28 | ||
@@ -339,7 +339,7 @@ bool Workspace::checkGrouping(FluxboxWindow &win) { | |||
339 | } | 339 | } |
340 | 340 | ||
341 | bool Workspace::loadGroups(const std::string &filename) { | 341 | bool Workspace::loadGroups(const std::string &filename) { |
342 | string real_filename = filename; | 342 | string real_filename = FbTk::StringUtil::expandFilename(filename); |
343 | FbTk::StringUtil::removeTrailingWhitespace(real_filename); | 343 | FbTk::StringUtil::removeTrailingWhitespace(real_filename); |
344 | ifstream infile(real_filename.c_str()); | 344 | ifstream infile(real_filename.c_str()); |
345 | if (!infile) | 345 | if (!infile) |
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index b45408a..b2a1dbb 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.230 2004/02/10 18:51:08 fluxgen Exp $ | 25 | // $Id: fluxbox.cc,v 1.231 2004/02/20 09:29:05 fluxgen Exp $ |
26 | 26 | ||
27 | #include "fluxbox.hh" | 27 | #include "fluxbox.hh" |
28 | 28 | ||
@@ -569,7 +569,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile | |||
569 | } | 569 | } |
570 | 570 | ||
571 | // setup theme manager to have our style file ready to be scanned | 571 | // setup theme manager to have our style file ready to be scanned |
572 | FbTk::ThemeManager::instance().load(getStyleFilename()); | 572 | FbTk::ThemeManager::instance().load(FbTk::StringUtil::expandFilename(getStyleFilename())); |
573 | 573 | ||
574 | XSynchronize(disp, False); | 574 | XSynchronize(disp, False); |
575 | sync(false); | 575 | sync(false); |
@@ -1642,16 +1642,7 @@ void Fluxbox::load_rc() { | |||
1642 | 1642 | ||
1643 | if (m_rc_stylefile->empty()) | 1643 | if (m_rc_stylefile->empty()) |
1644 | *m_rc_stylefile = DEFAULTSTYLE; | 1644 | *m_rc_stylefile = DEFAULTSTYLE; |
1645 | else // expand tilde | ||
1646 | *m_rc_stylefile = StringUtil::expandFilename(*m_rc_stylefile); | ||
1647 | |||
1648 | |||
1649 | // expand tilde | ||
1650 | *m_rc_groupfile = StringUtil::expandFilename(*m_rc_groupfile); | ||
1651 | 1645 | ||
1652 | #ifdef DEBUG | ||
1653 | cerr<<__FILE__<<": Loading groups ("<<*m_rc_groupfile<<")"<<endl; | ||
1654 | #endif // DEBUG | ||
1655 | if (!Workspace::loadGroups(*m_rc_groupfile)) { | 1646 | if (!Workspace::loadGroups(*m_rc_groupfile)) { |
1656 | cerr<<"Failed to load groupfile: "<<*m_rc_groupfile<<endl; | 1647 | cerr<<"Failed to load groupfile: "<<*m_rc_groupfile<<endl; |
1657 | } | 1648 | } |