From 74b1d7eb062e5898e67bca44cc3972d22a912207 Mon Sep 17 00:00:00 2001 From: Tim Lan Date: Tue, 3 Jun 2003 21:30:40 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=1284 --- api/windows_opengl.cpp | 3 +++ client/gui_titles.C | 10 +++++----- client/win/wingui_mainwindow.cpp | 24 ++++++++++++++++++------ 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/api/windows_opengl.cpp b/api/windows_opengl.cpp index d92a2231e9..4ffdc29028 100755 --- a/api/windows_opengl.cpp +++ b/api/windows_opengl.cpp @@ -29,6 +29,7 @@ #include // Header File For The OpenGL32 Library #include // Header File For The GLu32 Library #include +#include #include "boinc_api.h" #include "graphics_api.h" @@ -121,6 +122,8 @@ void SetMode(int mode) { WindowRect.right-WindowRect.left,WindowRect.bottom-WindowRect.top, NULL, NULL, hInstance, NULL); + SetForegroundWindow(hWnd); + GetCursorPos(&mousePos); PIXELFORMATDESCRIPTOR pfd= // pfd Tells Windows How We Want Things To Be diff --git a/client/gui_titles.C b/client/gui_titles.C index 5e28f5e463..54e67ef538 100644 --- a/client/gui_titles.C +++ b/client/gui_titles.C @@ -16,11 +16,11 @@ char g_szColumnTitles[MAX_LIST_ID][MAX_COLS][256] = { }; char g_szUsageItems[MAX_USAGE_STR][256] = { - "Free space: not available for use", - "Free space: available for use", - "Used space: other than BOINC", - "Used space: BOINC", - "Used space:" + "Free space", + "Used space", + "Used space: BOINC" +// "BOINC: core application", +// "BOINC:" }; char g_szMiscItems[MAX_MISC_STR][256] = { diff --git a/client/win/wingui_mainwindow.cpp b/client/win/wingui_mainwindow.cpp index 5a80817ded..a3aa77f592 100755 --- a/client/win/wingui_mainwindow.cpp +++ b/client/win/wingui_mainwindow.cpp @@ -403,9 +403,10 @@ void CMainWindow::UpdateGUI(CLIENT_STATE* pcs) double xDiskTotal; double xDiskFree; get_host_disk_info(xDiskTotal, xDiskFree); double xDiskUsed = xDiskTotal - xDiskFree; - double xDiskAllow; gstate.allowed_disk_usage(xDiskAllow); + double xDiskAllow; gstate.allowed_disk_usage(xDiskAllow); xDiskAllow = xDiskFree - xDiskAllow; double xDiskUsage; gstate.current_disk_usage(xDiskUsage); + /* while(m_UsagePieCtrl.GetItemCount() - 4 < gstate.projects.size()) { m_UsagePieCtrl.AddPiece("", GetPieColor(m_UsagePieCtrl.GetItemCount()), 0); } @@ -413,11 +414,18 @@ void CMainWindow::UpdateGUI(CLIENT_STATE* pcs) while(m_UsagePieCtrl.GetItemCount() - 4 > gstate.projects.size()) { m_UsagePieCtrl.RemovePiece(m_UsagePieCtrl.GetItemCount() - 1); } + */ + + while(m_UsagePieCtrl.GetItemCount() < 3) { + m_UsagePieCtrl.AddPiece("", GetPieColor(m_UsagePieCtrl.GetItemCount()), 0); + } m_UsagePieCtrl.SetTotal(xDiskTotal); - m_UsagePieCtrl.SetPiece(0, xDiskFree - (xDiskAllow - xDiskUsage)); // Free (non-BOINC) - m_UsagePieCtrl.SetPiece(1, xDiskAllow - xDiskUsage); // Free (BOINC) - m_UsagePieCtrl.SetPiece(2, xDiskUsed - xDiskUsage); // Used (non-BOINC) + m_UsagePieCtrl.SetPiece(0, xDiskFree); // Free space + m_UsagePieCtrl.SetPiece(1, xDiskUsed - xDiskUsage); // Used space + m_UsagePieCtrl.SetPiece(2, xDiskUsage); // Used space: BOINC + + /* for(i = 0; i < gstate.projects.size(); i ++) { double xUsage; CString strLabel; @@ -427,7 +435,9 @@ void CMainWindow::UpdateGUI(CLIENT_STATE* pcs) m_UsagePieCtrl.SetPiece(i + 4, xUsage); xDiskUsage -= xUsage; } - m_UsagePieCtrl.SetPiece(3, xDiskUsage); // Used (BOINC) + m_UsagePieCtrl.SetPiece(3, xDiskUsage); // BOINC: core application + */ + m_UsagePieCtrl.RedrawWindow(NULL, NULL, RDW_INVALIDATE|RDW_UPDATENOW|RDW_NOERASE|RDW_FRAME); // make icon flash if needed @@ -454,6 +464,8 @@ void CMainWindow::MessageUser(char* szProject, char* szMessage, int szPriority) int nNewPos = m_MessageListCtrl.GetItemCount(); m_MessageListCtrl.InsertItem(nNewPos, szProject); + m_MessageListCtrl.Scroll(m_MessageListCtrl.ApproximateViewRect()); + CTime curTime = CTime::GetCurrentTime(); CString strTime; strTime = curTime.Format("%c"); @@ -1387,7 +1399,7 @@ int CMainWindow::OnCreate(LPCREATESTRUCT lpcs) m_UsagePieCtrl.AddPiece(g_szUsageItems[0], GetPieColor(0), 0); m_UsagePieCtrl.AddPiece(g_szUsageItems[1], GetPieColor(1), 0); m_UsagePieCtrl.AddPiece(g_szUsageItems[2], GetPieColor(2), 0); - m_UsagePieCtrl.AddPiece(g_szUsageItems[3], GetPieColor(3), 0); + //m_UsagePieCtrl.AddPiece(g_szUsageItems[3], GetPieColor(3), 0); // set up image list for tab control m_TabIL.Create(16, 16, ILC_COLOR8|ILC_MASK, MAX_TABS, 1);