fixed "website" problem (missing "http://")

svn path=/trunk/boinc/; revision=1313
This commit is contained in:
Tim Lan 2003-06-05 22:15:51 +00:00
parent 85c3b6c2ea
commit 51bb28bc73
2 changed files with 10 additions and 4 deletions

View File

@ -4485,13 +4485,13 @@ David June 5 2003
add.C
Tim June 5, 2003
- Windiws GUI enhancement
- bug fix
fixed "uploading" "downloading" problem
fixed minor problem with updateGUI
- bug fix
fixed "time of day" suspension check (was parsing XML incorrectly)
fixed "website" problem (missing "http://")
client/
client_state.c
prefs.c
wingui_mainwindow.cpp
wingui_mainwindow.cpp

View File

@ -1164,8 +1164,14 @@ PROJECT* CMainWindow::GetProjectFromContextMenu() {
void CMainWindow::OnCommandProjectWebSite()
{
PROJECT *proj;
char url[263] = "";
proj = GetProjectFromContextMenu();
if (proj) ShellExecute(GetSafeHwnd(), "open", proj->master_url, "", "", SW_SHOWNORMAL);
if (proj) {
if (strncmp(proj->master_url, "http://", 7) != 0) // ***WARNING*** ASSUMING LOWER-CASE URL
sprintf(url, "http://");
ShellExecute(GetSafeHwnd(), "open", strcat(url, proj->master_url), "", "", SW_SHOWNORMAL);
}
}
//////////