aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-08-10 18:35:05 (GMT)
committerfluxgen <fluxgen>2004-08-10 18:35:05 (GMT)
commit1a02439df1520a97e389a81a843df79d9b04e1d0 (patch)
tree49f1396fc66cf4eb83111fbf073835e6c3c00ec4
parentc1b226b7ff828a8190508aafb2735ce0f73d10e7 (diff)
downloadfluxbox_pavel-1a02439df1520a97e389a81a843df79d9b04e1d0.zip
fluxbox_pavel-1a02439df1520a97e389a81a843df79d9b04e1d0.tar.bz2
added literal for layer, patch from Mathias Gumz
-rw-r--r--src/Remember.cc58
1 files changed, 35 insertions, 23 deletions
diff --git a/src/Remember.cc b/src/Remember.cc
index 96bb127..74e6ce6 100644
--- a/src/Remember.cc
+++ b/src/Remember.cc
@@ -21,7 +21,7 @@
21// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22// DEALINGS IN THE SOFTWARE. 22// DEALINGS IN THE SOFTWARE.
23 23
24// $Id: Remember.cc,v 1.38 2004/06/07 21:16:13 fluxgen Exp $ 24// $Id: Remember.cc,v 1.39 2004/08/10 18:35:05 fluxgen Exp $
25 25
26#include "Remember.hh" 26#include "Remember.hh"
27#include "ClientPattern.hh" 27#include "ClientPattern.hh"
@@ -68,10 +68,6 @@
68 68
69using namespace std; 69using namespace std;
70 70
71#ifndef MAXPATHLEN
72#define MAXPATHLEN 255
73#endif // MAXPATHLEN
74
75namespace { 71namespace {
76 72
77class RememberMenuItem : public FbTk::MenuItem { 73class RememberMenuItem : public FbTk::MenuItem {
@@ -308,7 +304,7 @@ int Remember::parseApp(ifstream &file, Application &app, string *first_line) {
308 line.c_str() + err, 304 line.c_str() + err,
309 '(', ')'); 305 '(', ')');
310 if (tmp>0) 306 if (tmp>0)
311 err += tmp; 307 err += tmp;
312 } 308 }
313 if (err > 0 ) { 309 if (err > 0 ) {
314 parse_pos += err; 310 parse_pos += err;
@@ -330,8 +326,24 @@ int Remember::parseApp(ifstream &file, Application &app, string *first_line) {
330 app.rememberWorkspace(w); 326 app.rememberWorkspace(w);
331 } else if (str_key == "Layer") { 327 } else if (str_key == "Layer") {
332 unsigned int l; 328 unsigned int l;
333 FB_istringstream iss(str_label.c_str()); 329 if (str_label == "DESKTOP") {
334 iss >> l; 330 l = Fluxbox::instance()->getDesktopLayer();
331 } else if (str_label == "BOTTOM") {
332 l = Fluxbox::instance()->getBottomLayer();
333 } else if (str_label == "NORMAL") {
334 l = Fluxbox::instance()->getNormalLayer();
335 } else if (str_label == "TOP") {
336 l = Fluxbox::instance()->getNormalLayer();
337 } else if (str_label == "DOCK") {
338 l = Fluxbox::instance()->getDockLayer();
339 } else if (str_label == "ABOVEDOCK") {
340 l = Fluxbox::instance()->getAboveDockLayer();
341 } else if (str_label == "MENU") {
342 l = Fluxbox::instance()->getMenuLayer();
343 } else {
344 FB_istringstream iss(str_label.c_str());
345 iss >> l;
346 }
335 app.rememberLayer(l); 347 app.rememberLayer(l);
336 } else if (str_key == "Dimensions") { 348 } else if (str_key == "Dimensions") {
337 unsigned int h,w; 349 unsigned int h,w;
@@ -347,18 +359,18 @@ int Remember::parseApp(ifstream &file, Application &app, string *first_line) {
347 // in ::rememberPosition 359 // in ::rememberPosition
348 360
349 if ( str_option.length() ) 361 if ( str_option.length() )
350 { 362 {
351 if ( str_option == "UPPERLEFT" ) r= POS_UPPERLEFT; 363 if ( str_option == "UPPERLEFT" ) r= POS_UPPERLEFT;
352 else if ( str_option == "UPPERRIGHT" ) r= POS_UPPERRIGHT; 364 else if ( str_option == "UPPERRIGHT" ) r= POS_UPPERRIGHT;
353 else if ( str_option == "LOWERLEFT" ) r= POS_LOWERLEFT; 365 else if ( str_option == "LOWERLEFT" ) r= POS_LOWERLEFT;
354 else if ( str_option == "LOWERRIGHT" ) r= POS_LOWERRIGHT; 366 else if ( str_option == "LOWERRIGHT" ) r= POS_LOWERRIGHT;
355 else if ( str_option == "CENTER" ) r= POS_CENTER; 367 else if ( str_option == "CENTER" ) r= POS_CENTER;
356 else if ( str_option == "WINCENTER" ) r= POS_WINCENTER; 368 else if ( str_option == "WINCENTER" ) r= POS_WINCENTER;
357 else { 369 else {
358 iss.str(str_option); 370 iss.str(str_option);
359 iss >> r; 371 iss >> r;
360 } 372 }
361 } 373 }
362 374
363 iss.str(str_label.c_str()); 375 iss.str(str_label.c_str());
364 iss >> x >> y; 376 iss >> x >> y;
@@ -384,17 +396,17 @@ int Remember::parseApp(ifstream &file, Application &app, string *first_line) {
384 FluxboxWindow::DECORM_TITLEBAR 396 FluxboxWindow::DECORM_TITLEBAR
385 | FluxboxWindow::DECORM_ICONIFY 397 | FluxboxWindow::DECORM_ICONIFY
386 | FluxboxWindow::DECORM_MENU 398 | FluxboxWindow::DECORM_MENU
387 ); 399 );
388 } else if (str_label == "TOOL") { 400 } else if (str_label == "TOOL") {
389 app.rememberDecostate((unsigned int) 401 app.rememberDecostate((unsigned int)
390 FluxboxWindow::DECORM_TITLEBAR 402 FluxboxWindow::DECORM_TITLEBAR
391 | FluxboxWindow::DECORM_MENU 403 | FluxboxWindow::DECORM_MENU
392 ); 404 );
393 } else if (str_label == "BORDER") { 405 } else if (str_label == "BORDER") {
394 app.rememberDecostate((unsigned int) 406 app.rememberDecostate((unsigned int)
395 FluxboxWindow::DECORM_BORDER 407 FluxboxWindow::DECORM_BORDER
396 | FluxboxWindow::DECORM_MENU 408 | FluxboxWindow::DECORM_MENU
397 ); 409 );
398 } else { 410 } else {
399 unsigned int mask; 411 unsigned int mask;
400 const char * str = str_label.c_str(); 412 const char * str = str_label.c_str();