*** empty log message ***

svn path=/trunk/boinc/; revision=2830
This commit is contained in:
David Anderson 2003-12-25 05:15:29 +00:00
parent d68e9c92b9
commit a65db04a79
12 changed files with 65 additions and 27 deletions

View File

@ -8744,3 +8744,18 @@ David 24 Dec 2003
sched/
handle_request.C
sched_shmem.C
David 23 Dec 2003 (supplied by Rom Walton)
- new message class: warnings and network (with corresponding icons)
client/
message.h
win/
resource.h
resource.rc
wingui_mainwindow.cpp,h
res/
iconnetwork.ico (new)
iconwarning.ico (new)
win_build/
boinc_gui.dsp

View File

@ -31,6 +31,7 @@
#define MSG_ERROR 2
// cmdline: write to stderr
// GUI: write to msg window in bold or red
#define MSG_WARNING 3
extern void show_message(class PROJECT *p, char* message, int priority);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@ -25,6 +25,8 @@
#define IDI_ICONSMALL 132
#define IDI_ICONERROR 134
#define IDI_ICONINFO 135
#define IDI_ICONNETWORK 138
#define IDI_ICONWARNING 139
#define IDC_LOGIN_URL 1000
#define IDC_LOGIN_AUTH 1002
#define IDC_LIST 1006
@ -101,7 +103,7 @@
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 136
#define _APS_NEXT_RESOURCE_VALUE 140
#define _APS_NEXT_COMMAND_VALUE 40051
#define _APS_NEXT_CONTROL_VALUE 1035
#define _APS_NEXT_SYMED_VALUE 101

View File

@ -275,6 +275,8 @@ IDI_ICONHIGHLIGHT ICON DISCARDABLE "res\\iconhigh.ico"
IDI_ICONSMALL ICON DISCARDABLE "res\\iconsmall.ico"
IDI_ICONERROR ICON DISCARDABLE "res\\iconerror.ico"
IDI_ICONINFO ICON DISCARDABLE "res\\iconinfo.ico"
IDI_ICONNETWORK ICON DISCARDABLE "res\\iconnetwork.ico"
IDI_ICONWARNING ICON DISCARDABLE "res\\iconwarning.ico"
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////

View File

@ -647,47 +647,37 @@ void CMainWindow::UpdateGUI(CLIENT_STATE* pcs)
// make icon flash if needed
TCITEM tcItem;
memset(&tcItem, 0, sizeof(TCITEMW)); // start with NULL defaults
tcItem.mask = TCIF_STATE;
tcItem.dwStateMask = TCIS_HIGHLIGHTED;
if(m_bMessage || m_bRequest) {
if(m_bRequest){
if(m_nToggleIconState == ICON_NORMAL){
SetStatusIcon(ICON_NORMAL);
m_nToggleIconState = ICON_HIGHLIGHT;
m_nToggleIconState = ICON_NETWORK;
} else {
SetStatusIcon(ICON_HIGHLIGHT);
SetStatusIcon(ICON_NETWORK);
m_nToggleIconState = ICON_NORMAL;
}
} else {
if(m_nToggleIconState == ICON_NORMAL){
SetStatusIcon(ICON_NORMAL);
tcItem.mask = TCIF_STATE;
tcItem.dwStateMask = TCIS_HIGHLIGHTED;
m_TabCtrl.SetItem(3, &tcItem);
switch(m_nMessage)
{
case MSG_INFO: m_nToggleIconState = ICON_INFO; break;
case MSG_ERROR: m_nToggleIconState = ICON_ERROR; break;
case MSG_WARNING: m_nToggleIconState = ICON_WARNING; break;
}
} else {
SetStatusIcon(m_nToggleIconState);
tcItem.mask = TCIF_STATE;
tcItem.dwState = TCIS_HIGHLIGHTED;
tcItem.dwStateMask = TCIS_HIGHLIGHTED;
m_TabCtrl.SetItem(3, &tcItem);
m_nToggleIconState = ICON_NORMAL;
}
}
} else {
SetStatusIcon(ICON_NORMAL);
tcItem.mask = TCIF_STATE;
tcItem.dwStateMask = TCIS_HIGHLIGHTED;
m_TabCtrl.SetItem(3, &tcItem);
}
m_TabCtrl.SetItem(3, &tcItem);
}
//////////
@ -714,7 +704,9 @@ void CMainWindow::MessageUser(char* szProject, char* szMessage, int nPriority)
if (nPriority == MSG_ERROR){
m_nMessage = nPriority;
} else if ((nPriority == MSG_INFO) && (m_nMessage != MSG_ERROR)){
} else if ((nPriority == MSG_WARNING) && (m_nMessage != MSG_ERROR)){
m_nMessage = nPriority;
} else if ((nPriority == MSG_INFO) && ((m_nMessage != MSG_WARNING) || (m_nMessage != MSG_ERROR))){
m_nMessage = nPriority;
}
}
@ -795,10 +787,10 @@ bool CMainWindow::SetStatusIcon(DWORD dwMessage)
if((dwMessage != ICON_OFF) &&
(dwMessage != ICON_NORMAL) &&
(dwMessage != ICON_HIGHLIGHT) &&
(dwMessage != ICON_NETWORK) &&
(dwMessage != ICON_ERROR) &&
(dwMessage != ICON_INFO)
){
(dwMessage != ICON_INFO) &&
(dwMessage != ICON_WARNING)) {
return false;
}
@ -822,8 +814,8 @@ bool CMainWindow::SetStatusIcon(DWORD dwMessage)
} else {
success = Shell_NotifyIcon(NIM_MODIFY, &icon_data);
}
} else if(dwMessage == ICON_HIGHLIGHT) {
icon_data.hIcon = g_myApp.LoadIcon(IDI_ICONHIGHLIGHT);
} else if(dwMessage == ICON_NETWORK) {
icon_data.hIcon = g_myApp.LoadIcon(IDI_ICONNETWORK);
if(m_nIconState == ICON_OFF) {
success = Shell_NotifyIcon(NIM_ADD, &icon_data);
} else {
@ -843,6 +835,13 @@ bool CMainWindow::SetStatusIcon(DWORD dwMessage)
} else {
success = Shell_NotifyIcon(NIM_MODIFY, &icon_data);
}
} else if(dwMessage == ICON_WARNING) {
icon_data.hIcon = g_myApp.LoadIcon(IDI_ICONWARNING);
if(m_nIconState == ICON_OFF) {
success = Shell_NotifyIcon(NIM_ADD, &icon_data);
} else {
success = Shell_NotifyIcon(NIM_MODIFY, &icon_data);
}
}
if (!success) return false;
@ -2128,9 +2127,11 @@ LRESULT CMainWindow::OnStatusIcon(WPARAM wParam, LPARAM lParam)
SetForegroundWindow();
}
} else if(lParam == WM_LBUTTONDBLCLK) {
if(IsWindowVisible()) {
ShowWindow(SW_HIDE);
} else {
if (IsIconic()) {
ShowWindow(SW_RESTORE);
} else if(IsWindowVisible()) {
ShowWindow(SW_HIDE);
} else {
ShowWindow(SW_SHOWNORMAL);
}
}

View File

@ -35,9 +35,10 @@
#define ICON_OFF 0 // remove icon
#define ICON_NORMAL 1 // normal icon
#define ICON_HIGHLIGHT 2 // highlighted icon
#define ICON_NETWORK 2 // network icon
#define ICON_ERROR 3 // error icon
#define ICON_INFO 4 // info icon
#define ICON_WARNING 5 // warning icon
#define DEF_COL_WIDTH 80 // default width of list columns

View File

@ -486,14 +486,30 @@ SOURCE=..\client\win\res\icon.ico
# End Source File
# Begin Source File
SOURCE=..\client\win\res\iconerror.ico
# End Source File
# Begin Source File
SOURCE=..\client\win\res\iconhigh.ico
# End Source File
# Begin Source File
SOURCE=..\client\win\res\iconinfo.ico
# End Source File
# Begin Source File
SOURCE=..\client\win\res\iconnetwork.ico
# End Source File
# Begin Source File
SOURCE=..\client\win\res\iconsmall.ico
# End Source File
# Begin Source File
SOURCE=..\client\win\res\iconwarning.ico
# End Source File
# Begin Source File
SOURCE=..\client\win\res\mess.bmp
# End Source File
# Begin Source File