1 //####COPYRIGHTBEGIN####
3 // ----------------------------------------------------------------------------
4 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
6 // This program is part of the eCos host tools.
8 // This program is free software; you can redistribute it and/or modify it
9 // under the terms of the GNU General Public License as published by the Free
10 // Software Foundation; either version 2 of the License, or (at your option)
13 // This program is distributed in the hope that it will be useful, but WITHOUT
14 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18 // You should have received a copy of the GNU General Public License along with
19 // this program; if not, write to the Free Software Foundation, Inc.,
20 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 // ----------------------------------------------------------------------------
24 //####COPYRIGHTEND####
25 // IdleMessage.cpp: implementation of the CIdleMessage class.
27 //////////////////////////////////////////////////////////////////////
30 #include "IdleMessage.h"
32 #define INCLUDEFILE "ide.common.h"
33 #include "IncludeSTL.h"
34 #include "common/StatusBar.h"
38 #include "ConfigTool.h"
42 static char THIS_FILE[]=__FILE__;
46 //////////////////////////////////////////////////////////////////////
47 // Construction/Destruction
48 //////////////////////////////////////////////////////////////////////
50 CIdleMessage::CIdleMessage(LPCTSTR pszMsg)
53 AppInstance::getAppManager()->getStatusBar()->getIdleText().c_str();
58 CIdleMessage::~CIdleMessage()
63 void CIdleMessage::Set(LPCTSTR pszMsg)
66 AppInstance::getAppManager()->getStatusBar()->setIdleText(pszMsg);
68 if(CConfigTool::GetMain()){
69 CConfigTool::GetMain()->SetIdleMessage(pszMsg);
75 void CIdleMessage::Reset()
78 AppInstance::getAppManager()->getStatusBar()->setIdleText((LPCTSTR)m_strPrevIdle);
80 if(CConfigTool::GetMain()){
81 CConfigTool::GetMain()->SetIdleMessage();