From 6125d03dd2484c027c3c7da7be02691c28deed71 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 11 Jan 2007 21:46:18 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=11840 --- checkin_notes | 7 +++++++ clientgui/ViewWork.cpp | 7 ++++++- clientgui/ViewWorkGrid.cpp | 7 ++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index c537295f05..010eb209a6 100755 --- a/checkin_notes +++ b/checkin_notes @@ -455,3 +455,10 @@ David 11 Jan 2007 cache.inc project.sample/ cache_parameters.inc + +David 11 Jan 2007 + - manager: use user-friendly app names (fix to work w/ 5.4.11) + + clientgui/ + ViewWork.cpp + ViewWorkGrid.cpp diff --git a/clientgui/ViewWork.cpp b/clientgui/ViewWork.cpp index c11978a4cf..b52210afd2 100644 --- a/clientgui/ViewWork.cpp +++ b/clientgui/ViewWork.cpp @@ -596,9 +596,14 @@ wxInt32 CViewWork::FormatApplicationName(wxInt32 item, wxString& strBuffer) cons wxString strLocale = wxString(setlocale(LC_NUMERIC, NULL), wxConvUTF8); setlocale(LC_NUMERIC, "C"); + char buf[256]; + strcpy(buf, state_result->wup->app->user_friendly_name.c_str()); + if (!strlen(buf) { + strcpy(buf, state_result->wup->avp->app_name.c_str()); + } strBuffer.Printf( wxT("%s %.2f"), - wxString(state_result->wup->app->user_friendly_name.c_str(), wxConvUTF8).c_str(), + wxString(buf, wxConvUTF8).c_str(), state_result->wup->avp->version_num/100.0 ); setlocale(LC_NUMERIC, (const char*)strLocale.mb_str()); diff --git a/clientgui/ViewWorkGrid.cpp b/clientgui/ViewWorkGrid.cpp index 5ea73478bd..800f363216 100644 --- a/clientgui/ViewWorkGrid.cpp +++ b/clientgui/ViewWorkGrid.cpp @@ -512,9 +512,14 @@ wxInt32 CViewWorkGrid::FormatApplicationName(wxInt32 item, wxString& strBuffer) wxString strLocale = wxString(setlocale(LC_NUMERIC, NULL), wxConvUTF8); setlocale(LC_NUMERIC, "C"); + char buf[256]; + strcpy(buf, state_result->wup->app->user_friendly_name.c_str()); + if (!strlen(buf) { + strcpy(buf, state_result->wup->avp->app_name.c_str()); + } strBuffer.Printf( wxT(" %s %.2f"), - wxString(state_result->wup->app->user_friendly_name.c_str(), wxConvUTF8).c_str(), + wxString(buf, wxConvUTF8).c_str(), state_result->wup->avp->version_num/100.0 ); setlocale(LC_NUMERIC, (const char*)strLocale.mb_str());