OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [host/] [tools/] [configtool/] [common/] [win32/] [IdleMessage.cpp] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
// ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
2
// -------------------------------------------                              
3
// This file is part of the eCos host tools.                                
4
// Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.            
5
//
6
// This program is free software; you can redistribute it and/or modify     
7
// it under the terms of the GNU General Public License as published by     
8
// the Free Software Foundation; either version 2 or (at your option) any   
9
// later version.                                                           
10
//
11
// This program is distributed in the hope that it will be useful, but      
12
// WITHOUT ANY WARRANTY; without even the implied warranty of               
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU        
14
// General Public License for more details.                                 
15
//
16
// You should have received a copy of the GNU General Public License        
17
// along with this program; if not, write to the                            
18
// Free Software Foundation, Inc., 51 Franklin Street,                      
19
// Fifth Floor, Boston, MA  02110-1301, USA.                                
20
// -------------------------------------------                              
21
// ####ECOSHOSTGPLCOPYRIGHTEND####                                          
22
// IdleMessage.cpp: implementation of the CIdleMessage class.
23
//
24
//////////////////////////////////////////////////////////////////////
25
 
26
#include "stdafx.h"
27
#include "IdleMessage.h"
28
#ifdef PLUGIN
29
  #define INCLUDEFILE "ide.common.h"
30
  #include "IncludeSTL.h"
31
  #include "common/StatusBar.h"
32
#else
33
  #include "MainFrm.h"
34
#endif
35
#include "ConfigTool.h"
36
 
37
#ifdef _DEBUG
38
  #undef THIS_FILE
39
  static char THIS_FILE[]=__FILE__;
40
  #define new DEBUG_NEW
41
#endif
42
 
43
//////////////////////////////////////////////////////////////////////
44
// Construction/Destruction
45
//////////////////////////////////////////////////////////////////////
46
 
47
CIdleMessage::CIdleMessage(LPCTSTR pszMsg)
48
{
49
#ifdef PLUGIN
50
  AppInstance::getAppManager()->getStatusBar()->getIdleText().c_str();
51
#endif
52
  Set(pszMsg);
53
}
54
 
55
CIdleMessage::~CIdleMessage()
56
{
57
  Reset();
58
}
59
 
60
void CIdleMessage::Set(LPCTSTR pszMsg)
61
{
62
#ifdef PLUGIN
63
  AppInstance::getAppManager()->getStatusBar()->setIdleText(pszMsg);
64
#else
65
  if(CConfigTool::GetMain()){
66
    CConfigTool::GetMain()->SetIdleMessage(pszMsg);
67
  }
68
#endif
69
 
70
}
71
 
72
void CIdleMessage::Reset()
73
{
74
#ifdef PLUGIN
75
  AppInstance::getAppManager()->getStatusBar()->setIdleText((LPCTSTR)m_strPrevIdle);
76
#else
77
  if(CConfigTool::GetMain()){
78
    CConfigTool::GetMain()->SetIdleMessage();
79
  }
80
#endif
81
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.