aboutsummaryrefslogtreecommitdiff
path: root/src/MenuCreator.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-05-02 10:44:27 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-05-02 10:44:27 (GMT)
commitd7afd7b39e8e539b873ece690dd1fae76296d09c (patch)
tree2b00bac9e2b8c9d8eba9de9c60b0d5d908e5fd30 /src/MenuCreator.cc
parent50024d32bc40541f128d80139e58494663f955b4 (diff)
downloadfluxbox_pavel-d7afd7b39e8e539b873ece690dd1fae76296d09c.zip
fluxbox_pavel-d7afd7b39e8e539b873ece690dd1fae76296d09c.tar.bz2
remove some unnecessary arguments
Diffstat (limited to 'src/MenuCreator.cc')
-rw-r--r--src/MenuCreator.cc22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/MenuCreator.cc b/src/MenuCreator.cc
index 9f20155..b420d3f 100644
--- a/src/MenuCreator.cc
+++ b/src/MenuCreator.cc
@@ -255,13 +255,13 @@ void translateMenuItem(FbTk::Parser &parse, ParseItem &pitem, FbTk::StringConver
255 if (FbTk::FileUtil::isRegularFile(thisfile.c_str()) && 255 if (FbTk::FileUtil::isRegularFile(thisfile.c_str()) &&
256 (filelist[file_index][0] != '.') && 256 (filelist[file_index][0] != '.') &&
257 (thisfile[thisfile.length() - 1] != '~')) { 257 (thisfile[thisfile.length() - 1] != '~')) {
258 MenuCreator::createFromFile(thisfile, menu, false); 258 MenuCreator::createFromFile(thisfile, menu);
259 } 259 }
260 } 260 }
261 261
262 } else { 262 } else {
263 // inject this file into the current menu 263 // inject this file into the current menu
264 MenuCreator::createFromFile(newfile, menu, false); 264 MenuCreator::createFromFile(newfile, menu);
265 } 265 }
266 266
267 safe_counter--; 267 safe_counter--;
@@ -394,7 +394,7 @@ FbTk::Menu *MenuCreator::createMenu(const string &label, int screen_number) {
394 return menu; 394 return menu;
395} 395}
396 396
397FbTk::Menu *MenuCreator::createFromFile(const string &filename, int screen_number, bool require_begin) { 397FbTk::Menu *MenuCreator::createFromFile(const string &filename, int screen_number) {
398 string real_filename = FbTk::StringUtil::expandFilename(filename); 398 string real_filename = FbTk::StringUtil::expandFilename(filename);
399 Fluxbox::instance()->saveMenuFilename(real_filename.c_str()); 399 Fluxbox::instance()->saveMenuFilename(real_filename.c_str());
400 400
@@ -404,7 +404,7 @@ FbTk::Menu *MenuCreator::createFromFile(const string &filename, int screen_numbe
404 404
405 startFile(); 405 startFile();
406 string label; 406 string label;
407 if (require_begin && !getStart(parser, label, m_stringconvertor)) { 407 if (!getStart(parser, label, m_stringconvertor)) {
408 endFile(); 408 endFile();
409 return 0; 409 return 0;
410 } 410 }
@@ -420,7 +420,7 @@ FbTk::Menu *MenuCreator::createFromFile(const string &filename, int screen_numbe
420 420
421 421
422bool MenuCreator::createFromFile(const string &filename, 422bool MenuCreator::createFromFile(const string &filename,
423 FbTk::Menu &inject_into, bool require_begin) { 423 FbTk::Menu &inject_into) {
424 string real_filename = FbTk::StringUtil::expandFilename(filename); 424 string real_filename = FbTk::StringUtil::expandFilename(filename);
425 425
426 FbMenuParser parser(real_filename); 426 FbMenuParser parser(real_filename);
@@ -428,11 +428,6 @@ bool MenuCreator::createFromFile(const string &filename,
428 return false; 428 return false;
429 429
430 startFile(); 430 startFile();
431 string label;
432 if (require_begin && !getStart(parser, label, m_stringconvertor)) {
433 endFile();
434 return false;
435 }
436 431
437 // save menu filename, so we can check if it changes 432 // save menu filename, so we can check if it changes
438 Fluxbox::instance()->saveMenuFilename(real_filename.c_str()); 433 Fluxbox::instance()->saveMenuFilename(real_filename.c_str());
@@ -445,8 +440,7 @@ bool MenuCreator::createFromFile(const string &filename,
445 440
446 441
447bool MenuCreator::createWindowMenuFromFile(const string &filename, 442bool MenuCreator::createWindowMenuFromFile(const string &filename,
448 FbTk::Menu &inject_into, 443 FbTk::Menu &inject_into) {
449 bool require_begin) {
450 string real_filename = FbTk::StringUtil::expandFilename(filename); 444 string real_filename = FbTk::StringUtil::expandFilename(filename);
451 FbMenuParser parser(real_filename); 445 FbMenuParser parser(real_filename);
452 if (!parser.isLoaded()) 446 if (!parser.isLoaded())
@@ -455,7 +449,7 @@ bool MenuCreator::createWindowMenuFromFile(const string &filename,
455 string label; 449 string label;
456 450
457 startFile(); 451 startFile();
458 if (require_begin && !getStart(parser, label, m_stringconvertor)) { 452 if (!getStart(parser, label, m_stringconvertor)) {
459 endFile(); 453 endFile();
460 return false; 454 return false;
461 } 455 }
@@ -481,7 +475,7 @@ FbTk::Menu *MenuCreator::createMenuType(const string &type, int screen_num) {
481 475
482 menu->disableTitle(); // not titlebar 476 menu->disableTitle(); // not titlebar
483 if (screen->windowMenuFilename().empty() || 477 if (screen->windowMenuFilename().empty() ||
484 ! createWindowMenuFromFile(screen->windowMenuFilename(), *menu, true)) { 478 ! createWindowMenuFromFile(screen->windowMenuFilename(), *menu)) {
485 const char *default_menu[] = { 479 const char *default_menu[] = {
486 "shade", 480 "shade",
487 "stick", 481 "stick",