From 14e3bd7565619b4430bb85b562ff3f356de986ab Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Mon, 24 Oct 2011 18:06:14 +0000 Subject: [PATCH] - MGR Skins: Fix numerious issues related to bad entries in the Skin XML file. clientgui/ SkinManager.cpp clientgui/skins/GridRepublic/ skin.xml clientgui/skins/Progress Thru Processors/ skin.xml svn path=/trunk/boinc/; revision=24470 --- checkin_notes | 11 +++++++++++ clientgui/SkinManager.cpp | 14 +++++++++----- clientgui/skins/GridRepublic/skin.xml | 4 ++-- clientgui/skins/Progress Thru Processors/skin.xml | 2 -- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/checkin_notes b/checkin_notes index 0eb4cf9ff6..d555ccb40d 100644 --- a/checkin_notes +++ b/checkin_notes @@ -7724,3 +7724,14 @@ David 21 Oct 2011 client_types.h sim.cpp rr_sim.cpp + +Rom 24 Oct 2011 + - MGR Skins: Fix numerious issues related to bad entries in the Skin XML + file. + + clientgui/ + SkinManager.cpp + clientgui/skins/GridRepublic/ + skin.xml + clientgui/skins/Progress Thru Processors/ + skin.xml diff --git a/clientgui/SkinManager.cpp b/clientgui/SkinManager.cpp index 112b286883..f28320172e 100644 --- a/clientgui/SkinManager.cpp +++ b/clientgui/SkinManager.cpp @@ -758,6 +758,7 @@ wxArrayString& CSkinManager::GetCurrentSkins() { unsigned int i; wxString strSkinLocation = wxString(GetSkinsLocation() + wxFileName::GetPathSeparator()); wxString strSkinFileName = wxString(wxFileName::GetPathSeparator() + GetSkinFileName()); + wxString strBuffer; // Initialize array m_astrSkins.Clear(); @@ -767,15 +768,18 @@ wxArrayString& CSkinManager::GetCurrentSkins() { // Trim out the path information for all the entries for (i = 0; i < m_astrSkins.GetCount(); i++) { - m_astrSkins[i] = - m_astrSkins[i].Remove(0, strSkinLocation.Length()); - m_astrSkins[i] = - m_astrSkins[i].Remove(m_astrSkins[i].Find(strSkinFileName.c_str()), strSkinFileName.Length()); + strBuffer = m_astrSkins[i]; + + strBuffer = strBuffer.Remove(0, strSkinLocation.Length()); + strBuffer = strBuffer.Remove(strBuffer.Find(strSkinFileName.c_str()), strSkinFileName.Length()); // Special case: 'Default' to mean the embedded default skin. // remove any duplicate entries - if (GetDefaultSkinName() == m_astrSkins[i]) { + if (GetDefaultSkinName() != strBuffer) { + m_astrSkins[i] = strBuffer; + } else { m_astrSkins.RemoveAt(i); + i--; } } diff --git a/clientgui/skins/GridRepublic/skin.xml b/clientgui/skins/GridRepublic/skin.xml index 9cceadbe61..4c8bc053a4 100644 --- a/clientgui/skins/GridRepublic/skin.xml +++ b/clientgui/skins/GridRepublic/skin.xml @@ -225,9 +225,9 @@ graphic/gr_about.ico - GridRepublic + GridRepublic - http://www.gridrepublic.org + http://www.gridrepublic.org http://www.gridrepublic.org/index.php?param=contact diff --git a/clientgui/skins/Progress Thru Processors/skin.xml b/clientgui/skins/Progress Thru Processors/skin.xml index bf63c5ce74..b4c6beba10 100644 --- a/clientgui/skins/Progress Thru Processors/skin.xml +++ b/clientgui/skins/Progress Thru Processors/skin.xml @@ -221,8 +221,6 @@ 0:0:0 - - graphic/gr_about.ico Progress Thru Processors