aboutsummaryrefslogtreecommitdiff
path: root/src/Remember.cc
diff options
context:
space:
mode:
authorHenrik Kinnunen <fluxgen@fluxbox.org>2010-03-17 15:35:07 (GMT)
committerHenrik Kinnunen <fluxgen@fluxbox.org>2010-03-17 15:35:07 (GMT)
commitce0b41c8472135898a553d6d649d852beb80cffb (patch)
tree8cca2f6d8795c19c86ab70fa22e9c724e5f4453b /src/Remember.cc
parent7a86dad21b1d50b35857496c165e4e85cc0d2bd3 (diff)
downloadfluxbox-ce0b41c8472135898a553d6d649d852beb80cffb.zip
fluxbox-ce0b41c8472135898a553d6d649d852beb80cffb.tar.bz2
Changed #ifdef DEBUG ... cerr << to using fbdbg.
This will reduce the number of #ifdef DEBUG for simple debug messages. include "Debug.hh" and use fbdbg instead of cerr for debug.
Diffstat (limited to 'src/Remember.cc')
-rw-r--r--src/Remember.cc21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/Remember.cc b/src/Remember.cc
index 2eb39d4..41bb709 100644
--- a/src/Remember.cc
+++ b/src/Remember.cc
@@ -30,6 +30,7 @@
30#include "FbCommands.hh" 30#include "FbCommands.hh"
31#include "fluxbox.hh" 31#include "fluxbox.hh"
32#include "Layer.hh" 32#include "Layer.hh"
33#include "Debug.hh"
33 34
34#include "FbTk/I18n.hh" 35#include "FbTk/I18n.hh"
35#include "FbTk/StringUtil.hh" 36#include "FbTk/StringUtil.hh"
@@ -389,9 +390,9 @@ bool handleStartupItem(const string &line, int offset) {
389 return true; 390 return true;
390 391
391 FbCommands::ExecuteCmd *tmp_exec_cmd = new FbCommands::ExecuteCmd(str, screen); 392 FbCommands::ExecuteCmd *tmp_exec_cmd = new FbCommands::ExecuteCmd(str, screen);
392#ifdef DEBUG 393
393 cerr<<"Executing startup Command<void> '"<<str<<"' on screen "<<screen<<endl; 394 fbdbg<<"Executing startup Command<void> '"<<str<<"' on screen "<<screen<<endl;
394#endif // DEBUG 395
395 tmp_exec_cmd->execute(); 396 tmp_exec_cmd->execute();
396 delete tmp_exec_cmd; 397 delete tmp_exec_cmd;
397 return true; 398 return true;
@@ -708,9 +709,8 @@ void Remember::checkReload() {
708void Remember::reload() { 709void Remember::reload() {
709 string apps_string = FbTk::StringUtil::expandFilename(Fluxbox::instance()->getAppsFilename()); 710 string apps_string = FbTk::StringUtil::expandFilename(Fluxbox::instance()->getAppsFilename());
710 711
711#ifdef DEBUG 712
712 cerr<<__FILE__<<"("<<__FUNCTION__<<"): Loading apps file ["<<apps_string<<"]"<<endl; 713 fbdbg<<"("<<__FUNCTION__<<"): Loading apps file ["<<apps_string<<"]"<<endl;
713#endif // DEBUG
714 714
715 ifstream apps_file(apps_string.c_str()); 715 ifstream apps_file(apps_string.c_str());
716 716
@@ -810,9 +810,7 @@ void Remember::reload() {
810 810
811 } 811 }
812 } else { 812 } else {
813#ifdef DEBUG 813 fbdbg<<"("<<__FUNCTION__<< ") Empty apps file" << endl;
814 cerr<<__FILE__<<"("<<__FUNCTION__<< ") Empty apps file" << endl;
815#endif
816 } 814 }
817 } else { 815 } else {
818 cerr << "failed to open apps file" << endl; 816 cerr << "failed to open apps file" << endl;
@@ -857,9 +855,8 @@ void Remember::save() {
857 855
858 string apps_string = FbTk::StringUtil::expandFilename(Fluxbox::instance()->getAppsFilename()); 856 string apps_string = FbTk::StringUtil::expandFilename(Fluxbox::instance()->getAppsFilename());
859 857
860#ifdef DEBUG 858 fbdbg<<"("<<__FUNCTION__<<"): Saving apps file ["<<apps_string<<"]"<<endl;
861 cerr<<__FILE__<<"("<<__FUNCTION__<<"): Saving apps file ["<<apps_string<<"]"<<endl; 859
862#endif // DEBUG
863 ofstream apps_file(apps_string.c_str()); 860 ofstream apps_file(apps_string.c_str());
864 861
865 // first of all we output all the startup commands 862 // first of all we output all the startup commands