summaryrefslogtreecommitdiff
path: root/src/Remember.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Remember.cc')
-rw-r--r--src/Remember.cc26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/Remember.cc b/src/Remember.cc
index 2bf1e1f..fb65444 100644
--- a/src/Remember.cc
+++ b/src/Remember.cc
@@ -36,6 +36,7 @@
36#include "FbTk/StringUtil.hh" 36#include "FbTk/StringUtil.hh"
37#include "FbTk/MenuItem.hh" 37#include "FbTk/MenuItem.hh"
38#include "FbTk/App.hh" 38#include "FbTk/App.hh"
39#include "FbTk/stringstream.hh"
39 40
40 41
41#include <X11/Xlib.h> 42#include <X11/Xlib.h>
@@ -52,19 +53,6 @@
52#include <memory> 53#include <memory>
53#include <set> 54#include <set>
54 55
55#ifdef HAVE_CONFIG_H
56#include "config.h"
57#endif // HAVE_CONFIG_H
58
59#ifdef HAVE_SSTREAM
60#include <sstream>
61#define FB_istringstream istringstream
62#elif HAVE_STRSTREAM
63#include <strstream>
64#define FB_istringstream istrstream
65#else
66#error "You dont have sstream or strstream headers!"
67#endif // HAVE_STRSTREAM
68 56
69using namespace std; 57using namespace std;
70 58
@@ -173,7 +161,7 @@ bool handleStartupItem(const string &line, int offset) {
173 if (pos > 0) { 161 if (pos > 0) {
174 option = str.substr(0, pos); 162 option = str.substr(0, pos);
175 if (option == "screen") { 163 if (option == "screen") {
176 FB_istringstream iss(str.c_str() + pos + 1); 164 FbTk_istringstream iss(str.c_str() + pos + 1);
177 iss >> screen; 165 iss >> screen;
178 } else { 166 } else {
179 error = true; 167 error = true;
@@ -333,7 +321,7 @@ int Remember::parseApp(ifstream &file, Application &app, string *first_line) {
333 continue; //read next line 321 continue; //read next line
334 if (str_key == "Workspace") { 322 if (str_key == "Workspace") {
335 unsigned int w; 323 unsigned int w;
336 FB_istringstream iss(str_label.c_str()); 324 FbTk_istringstream iss(str_label.c_str());
337 iss >> w; 325 iss >> w;
338 app.rememberWorkspace(w); 326 app.rememberWorkspace(w);
339 } else if (str_key == "Head") { 327 } else if (str_key == "Head") {
@@ -356,17 +344,17 @@ int Remember::parseApp(ifstream &file, Application &app, string *first_line) {
356 } else if (str_label == "MENU") { 344 } else if (str_label == "MENU") {
357 l = Fluxbox::instance()->getMenuLayer(); 345 l = Fluxbox::instance()->getMenuLayer();
358 } else { 346 } else {
359 FB_istringstream iss(str_label.c_str()); 347 FbTk_istringstream iss(str_label.c_str());
360 iss >> l; 348 iss >> l;
361 } 349 }
362 app.rememberLayer(l); 350 app.rememberLayer(l);
363 } else if (str_key == "Dimensions") { 351 } else if (str_key == "Dimensions") {
364 unsigned int h,w; 352 unsigned int h,w;
365 FB_istringstream iss(str_label.c_str()); 353 FbTk_istringstream iss(str_label.c_str());
366 iss >> w >> h; 354 iss >> w >> h;
367 app.rememberDimensions(w,h); 355 app.rememberDimensions(w,h);
368 } else if (str_key == "Position") { 356 } else if (str_key == "Position") {
369 FB_istringstream iss; 357 FbTk_istringstream iss;
370 unsigned int r= 0; 358 unsigned int r= 0;
371 unsigned int x= 0; 359 unsigned int x= 0;
372 unsigned int y= 0; 360 unsigned int y= 0;
@@ -426,7 +414,7 @@ int Remember::parseApp(ifstream &file, Application &app, string *first_line) {
426 unsigned int mask; 414 unsigned int mask;
427 const char * str = str_label.c_str(); 415 const char * str = str_label.c_str();
428 // it'll have at least one char and \0, so this is safe 416 // it'll have at least one char and \0, so this is safe
429 FB_istringstream iss(str); 417 FbTk_istringstream iss(str);
430 // check for hex 418 // check for hex
431 if (str[0] == '0' && str[1] == 'x') { 419 if (str[0] == '0' && str[1] == 'x') {
432 iss.seekg(2); 420 iss.seekg(2);