From c851b36890c519c45c99a0ff7e9ea94ae447182b Mon Sep 17 00:00:00 2001 From: Eric Heien Date: Thu, 6 Mar 2003 22:16:42 +0000 Subject: [PATCH] windows fixes svn path=/trunk/boinc/; revision=1027 --- client/win/wingui.cpp | 2 +- client/win/wingui.h | 1 - client/win/wingui_mainwindow.cpp | 16 ++++++++-------- client/win/wingui_mainwindow.h | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/client/win/wingui.cpp b/client/win/wingui.cpp index 8e1d448f34..4a5e4f4b6d 100755 --- a/client/win/wingui.cpp +++ b/client/win/wingui.cpp @@ -22,7 +22,7 @@ #include "wingui.h" #include "wingui_mainwindow.h" -void show_message(PROJECT* p, char* message, char* priority) { +void show_message(PROJECT* p, char* message, int priority) { char proj_name[256]; if (p) { diff --git a/client/win/wingui.h b/client/win/wingui.h index 43f71102ea..1b81b4e5b7 100755 --- a/client/win/wingui.h +++ b/client/win/wingui.h @@ -42,7 +42,6 @@ // functions -void show_message(PROJECT *p, char* message, char* priority); int add_new_project(); void GetByteString(double nbytes, CString* str); BOOL RequestNetConnect(); diff --git a/client/win/wingui_mainwindow.cpp b/client/win/wingui_mainwindow.cpp index c782772579..01c7f6ea04 100755 --- a/client/win/wingui_mainwindow.cpp +++ b/client/win/wingui_mainwindow.cpp @@ -389,9 +389,9 @@ void CMainWindow::UpdateGUI(CLIENT_STATE* pcs) // arguments: message: message string to display // priority: string with priority of message // returns: void -// function: if message is "high" priority, flashes the status icon, then -// adds to message edit control. -void CMainWindow::MessageUser(char* szProject, char* szMessage, char* szPriority) +// function: if message is MSG_ERROR priority, flashes the status icon, +// then adds to message edit control. +void CMainWindow::MessageUser(char* szProject, char* szMessage, int szPriority) { if(!m_MessageListCtrl.GetSafeHwnd()) return; @@ -406,7 +406,7 @@ void CMainWindow::MessageUser(char* szProject, char* szMessage, char* szPriority m_MessageListCtrl.SetItemText(nNewPos, 2, szMessage); // set status icon to flash - if(!strcmp(szPriority, "high") && (m_TabCtrl.GetCurSel() != MESSAGE_ID || GetForegroundWindow() != this)) { + if((szPriority == MSG_ERROR) && (m_TabCtrl.GetCurSel() != MESSAGE_ID || GetForegroundWindow() != this)) { m_bMessage = true; } } @@ -1307,7 +1307,7 @@ void CMainWindow::OnCommandExit() TermFn fn; fn = (TermFn)GetProcAddress(m_hIdleDll, "IdleTrackerTerm"); if(!fn) { - show_message(NULL, "Error in DLL \"boinc.dll\"", "low"); + show_message(NULL, "Error in DLL \"boinc.dll\"", MSG_INFO); } else { fn(); } @@ -1477,18 +1477,18 @@ int CMainWindow::OnCreate(LPCREATESTRUCT lpcs) // load dll and start idle detection m_hIdleDll = LoadLibrary("boinc.dll"); if(!m_hIdleDll) { - show_message(NULL,"Can't load \"boinc.dll\", will not be able to determine idle time", "high"); + show_message(NULL,"Can't load \"boinc.dll\", will not be able to determine idle time", MSG_ERROR); } else { typedef BOOL (CALLBACK* InitFn)(); InitFn fn; fn = (InitFn)GetProcAddress(m_hIdleDll, "IdleTrackerInit"); if(!fn) { - show_message(NULL,"Error in DLL \"boinc.dll\", will not be able to determine idle time", "low"); + show_message(NULL,"Error in DLL \"boinc.dll\", will not be able to determine idle time", MSG_INFO); FreeLibrary(m_hIdleDll); m_hIdleDll = NULL; } else { if(!fn()) { - show_message(NULL,"Error in DLL \"boinc.dll\", will not be able to determine idle time", "low"); + show_message(NULL,"Error in DLL \"boinc.dll\", will not be able to determine idle time", MSG_INFO); FreeLibrary(m_hIdleDll); m_hIdleDll = NULL; } diff --git a/client/win/wingui_mainwindow.h b/client/win/wingui_mainwindow.h index c453378eeb..9a7a08015f 100755 --- a/client/win/wingui_mainwindow.h +++ b/client/win/wingui_mainwindow.h @@ -87,7 +87,7 @@ class CMainWindow : public CWnd public: CMainWindow (); void UpdateGUI(CLIENT_STATE*); - void MessageUser(char*,char*,char*); + void MessageUser(char*,char*,int); BOOL IsSuspended(); BOOL RequestNetConnect(); UINT m_nNetActivityMsg; // ID of net activity message