aboutsummaryrefslogtreecommitdiff
path: root/src/Workspace.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-10-25 22:10:43 (GMT)
committerfluxgen <fluxgen>2003-10-25 22:10:43 (GMT)
commit4d161094576b29ca1a41e807fabb80d672fc1852 (patch)
tree80a85b0ed608a00a862f06dd6926b8f305355cc8 /src/Workspace.cc
parente8082ed519a3294d934029d0e478e31d8414ee97 (diff)
downloadfluxbox-4d161094576b29ca1a41e807fabb80d672fc1852.zip
fluxbox-4d161094576b29ca1a41e807fabb80d672fc1852.tar.bz2
removing trailing whitespace in filename
Diffstat (limited to 'src/Workspace.cc')
-rw-r--r--src/Workspace.cc16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/Workspace.cc b/src/Workspace.cc
index b0a4ab6..8886d3e 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.82 2003/10/06 06:22:43 rathnor Exp $ 25// $Id: Workspace.cc,v 1.83 2003/10/25 22:10:43 fluxgen Exp $
26 26
27#include "Workspace.hh" 27#include "Workspace.hh"
28 28
@@ -30,12 +30,13 @@
30#include "fluxbox.hh" 30#include "fluxbox.hh"
31#include "Screen.hh" 31#include "Screen.hh"
32#include "Window.hh" 32#include "Window.hh"
33#include "StringUtil.hh"
34#include "SimpleCommand.hh"
35#include "WinClient.hh" 33#include "WinClient.hh"
36#include "FbWinFrame.hh" 34#include "FbWinFrame.hh"
37#include "MenuItem.hh" 35#include "MenuItem.hh"
38 36
37#include "FbTk/StringUtil.hh"
38#include "FbTk/SimpleCommand.hh"
39
39// use GNU extensions 40// use GNU extensions
40#ifndef _GNU_SOURCE 41#ifndef _GNU_SOURCE
41#define _GNU_SOURCE 42#define _GNU_SOURCE
@@ -358,14 +359,7 @@ bool Workspace::checkGrouping(FluxboxWindow &win) {
358 359
359bool Workspace::loadGroups(const std::string &filename) { 360bool Workspace::loadGroups(const std::string &filename) {
360 string real_filename = filename; 361 string real_filename = filename;
361 // strip trailing whitespace 362 FbTk::StringUtil::removeTrailingWhitespace(real_filename);
362 string::size_type first_pos = real_filename.find_first_not_of(" \t");
363 if (first_pos != string::npos) {
364 string::size_type last_pos = real_filename.find_first_of(" \t", last_pos);
365 if (last_pos != string::npos)
366 real_filename.erase(last_pos);
367 }
368
369 ifstream infile(real_filename.c_str()); 363 ifstream infile(real_filename.c_str());
370 if (!infile) 364 if (!infile)
371 return false; 365 return false;