OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [tools/] [src/] [tools/] [configtool/] [common/] [win32/] [IdleMessage.cpp] - Blame information for rev 174

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 26 unneback
//####COPYRIGHTBEGIN####
2
//                                                                          
3
// ----------------------------------------------------------------------------
4
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
5
//
6
// This program is part of the eCos host tools.
7
//
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) 
11
// any later version.
12
// 
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 
16
// more details.
17
// 
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.
21
//
22
// ----------------------------------------------------------------------------
23
//                                                                          
24
//####COPYRIGHTEND####
25
// IdleMessage.cpp: implementation of the CIdleMessage class.
26
//
27
//////////////////////////////////////////////////////////////////////
28
 
29
#include "stdafx.h"
30
#include "IdleMessage.h"
31
#ifdef PLUGIN
32
  #define INCLUDEFILE "ide.common.h"
33
  #include "IncludeSTL.h"
34
  #include "common/StatusBar.h"
35
#else
36
  #include "MainFrm.h"
37
#endif
38
#include "ConfigTool.h"
39
 
40
#ifdef _DEBUG
41
  #undef THIS_FILE
42
  static char THIS_FILE[]=__FILE__;
43
  #define new DEBUG_NEW
44
#endif
45
 
46
//////////////////////////////////////////////////////////////////////
47
// Construction/Destruction
48
//////////////////////////////////////////////////////////////////////
49
 
50
CIdleMessage::CIdleMessage(LPCTSTR pszMsg)
51
{
52
#ifdef PLUGIN
53
  AppInstance::getAppManager()->getStatusBar()->getIdleText().c_str();
54
#endif
55
  Set(pszMsg);
56
}
57
 
58
CIdleMessage::~CIdleMessage()
59
{
60
  Reset();
61
}
62
 
63
void CIdleMessage::Set(LPCTSTR pszMsg)
64
{
65
#ifdef PLUGIN
66
  AppInstance::getAppManager()->getStatusBar()->setIdleText(pszMsg);
67
#else
68
  if(CConfigTool::GetMain()){
69
    CConfigTool::GetMain()->SetIdleMessage(pszMsg);
70
  }
71
#endif
72
 
73
}
74
 
75
void CIdleMessage::Reset()
76
{
77
#ifdef PLUGIN
78
  AppInstance::getAppManager()->getStatusBar()->setIdleText((LPCTSTR)m_strPrevIdle);
79
#else
80
  if(CConfigTool::GetMain()){
81
    CConfigTool::GetMain()->SetIdleMessage();
82
  }
83
#endif
84
}

powered by: WebSVN 2.1.0

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