llittle rewrite for the FbTk_istringstream usage.. was needed coz gcc2.95.x
systems had problems before. with this change fluxbox should compile on such old compilers.
This commit is contained in:
parent
6280b9de05
commit
64336d4cec
3 changed files with 8 additions and 17 deletions
|
@ -358,7 +358,7 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command,
|
||||||
//
|
//
|
||||||
else if (command == "deiconify") {
|
else if (command == "deiconify") {
|
||||||
|
|
||||||
FbTk_istringstream iss(arguments);
|
FbTk_istringstream iss(arguments.c_str());
|
||||||
string mode;
|
string mode;
|
||||||
string d;
|
string d;
|
||||||
DeiconifyCmd::Destination dest;
|
DeiconifyCmd::Destination dest;
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include "StringUtil.hh"
|
#include "StringUtil.hh"
|
||||||
|
#include "stringstream.hh"
|
||||||
#include "Font.hh"
|
#include "Font.hh"
|
||||||
#include "FontImp.hh"
|
#include "FontImp.hh"
|
||||||
#include "I18n.hh"
|
#include "I18n.hh"
|
||||||
|
@ -69,15 +70,6 @@
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
#include <langinfo.h>
|
#include <langinfo.h>
|
||||||
|
|
||||||
#ifdef HAVE_SSTREAM
|
|
||||||
#include <sstream>
|
|
||||||
#define FB_istringstream istringstream
|
|
||||||
#elif HAVE_STRSTREAM
|
|
||||||
#include <strstream>
|
|
||||||
#define FB_istringstream istrstream
|
|
||||||
#else
|
|
||||||
#error "You dont have sstream or strstream headers!"
|
|
||||||
#endif // HAVE_STRSTREAM
|
|
||||||
|
|
||||||
#ifdef HAVE_CSTDLIB
|
#ifdef HAVE_CSTDLIB
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
@ -202,14 +194,14 @@ int extract_shadow_options(const std::string& opts,
|
||||||
}
|
}
|
||||||
else if ( (*token).find("offsetx=", 0) != std::string::npos ) {
|
else if ( (*token).find("offsetx=", 0) != std::string::npos ) {
|
||||||
size_t s= (*token).find_first_of('=');
|
size_t s= (*token).find_first_of('=');
|
||||||
FB_istringstream o((*token).substr(s + 1, (*token).length()));
|
FbTk_istringstream o((*token).substr(s + 1, (*token).length()).c_str());
|
||||||
if ( !o.eof() ) {
|
if ( !o.eof() ) {
|
||||||
o >> offx;
|
o >> offx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( (*token).find("offsety=", 0) != std::string::npos ) {
|
else if ( (*token).find("offsety=", 0) != std::string::npos ) {
|
||||||
size_t s= (*token).find_first_of('=');
|
size_t s= (*token).find_first_of('=');
|
||||||
FB_istringstream o((*token).substr(s + 1, (*token).length()));
|
FbTk_istringstream o((*token).substr(s + 1, (*token).length()).c_str());
|
||||||
if ( !o.eof() ) {
|
if ( !o.eof() ) {
|
||||||
o >> offy;
|
o >> offy;
|
||||||
}
|
}
|
||||||
|
|
|
@ -354,7 +354,6 @@ int Remember::parseApp(ifstream &file, Application &app, string *first_line) {
|
||||||
iss >> w >> h;
|
iss >> w >> h;
|
||||||
app.rememberDimensions(w,h);
|
app.rememberDimensions(w,h);
|
||||||
} else if (str_key == "Position") {
|
} else if (str_key == "Position") {
|
||||||
FbTk_istringstream iss;
|
|
||||||
unsigned int r= 0;
|
unsigned int r= 0;
|
||||||
unsigned int x= 0;
|
unsigned int x= 0;
|
||||||
unsigned int y= 0;
|
unsigned int y= 0;
|
||||||
|
@ -370,13 +369,13 @@ int Remember::parseApp(ifstream &file, Application &app, string *first_line) {
|
||||||
else if ( str_option == "CENTER" ) r= POS_CENTER;
|
else if ( str_option == "CENTER" ) r= POS_CENTER;
|
||||||
else if ( str_option == "WINCENTER" ) r= POS_WINCENTER;
|
else if ( str_option == "WINCENTER" ) r= POS_WINCENTER;
|
||||||
else {
|
else {
|
||||||
iss.str(str_option);
|
FbTk_istringstream iss_r(str_option.c_str());
|
||||||
iss >> r;
|
iss_r >> r;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
iss.str(str_label.c_str());
|
FbTk_istringstream iss_xy(str_label.c_str());
|
||||||
iss >> x >> y;
|
iss_xy >> x >> y;
|
||||||
app.rememberPosition(x, y, r);
|
app.rememberPosition(x, y, r);
|
||||||
} else if (str_key == "Shaded") {
|
} else if (str_key == "Shaded") {
|
||||||
app.rememberShadedstate((str_label=="yes"));
|
app.rememberShadedstate((str_label=="yes"));
|
||||||
|
|
Loading…
Reference in a new issue