mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=11486
This commit is contained in:
parent
2e9810d8b5
commit
6ff2e768c2
|
@ -12329,3 +12329,11 @@ David 6 Nov 2006
|
||||||
gui_rpc_client.C
|
gui_rpc_client.C
|
||||||
gui_rpc_client_ops.C
|
gui_rpc_client_ops.C
|
||||||
miofile.C,h
|
miofile.C,h
|
||||||
|
|
||||||
|
Rom 6 Nov 2006
|
||||||
|
- MGR: When deciding if two combo box's values are the same convert them to
|
||||||
|
there native data type and compare those as well. Sometimes comparing
|
||||||
|
just the strings isn't enough.
|
||||||
|
|
||||||
|
clientgi/
|
||||||
|
sg_DlgPreferences.cpp
|
||||||
|
|
|
@ -86,14 +86,18 @@ wxString astrTimeOfDayStrings[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
int iDiskUsageArraySize = 6;
|
int iDiskUsageArraySize = 10;
|
||||||
wxString astrDiskUsageStrings[] = {
|
wxString astrDiskUsageStrings[] = {
|
||||||
_("100 MB"),
|
_("100 MB"),
|
||||||
_("200 MB"),
|
_("200 MB"),
|
||||||
_("500 MB"),
|
_("500 MB"),
|
||||||
_("1 GB"),
|
_("1 GB"),
|
||||||
_("2 GB"),
|
_("2 GB"),
|
||||||
_("5 GB")
|
_("5 GB"),
|
||||||
|
_("10 GB"),
|
||||||
|
_("20 GB"),
|
||||||
|
_("50 GB"),
|
||||||
|
_("100 GB")
|
||||||
};
|
};
|
||||||
|
|
||||||
// Used for sorting disk usage values
|
// Used for sorting disk usage values
|
||||||
|
@ -680,6 +684,8 @@ bool CPanelPreferences::ClearPreferenceSettings() {
|
||||||
bool CPanelPreferences::ReadPreferenceSettings() {
|
bool CPanelPreferences::ReadPreferenceSettings() {
|
||||||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||||
GLOBAL_PREFS current_global_preferences;
|
GLOBAL_PREFS current_global_preferences;
|
||||||
|
double dTempValue1 = 0.0;
|
||||||
|
double dTempValue2 = 0.0;
|
||||||
|
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
|
@ -726,8 +732,18 @@ bool CPanelPreferences::ReadPreferenceSettings() {
|
||||||
|
|
||||||
// Null out strDiskUsage if it is a duplicate
|
// Null out strDiskUsage if it is a duplicate
|
||||||
for (i = 0; i < aDiskUsage.Count(); i++) {
|
for (i = 0; i < aDiskUsage.Count(); i++) {
|
||||||
if (strDiskUsage == aDiskUsage[i]) {
|
strDiskUsage.ToDouble(&dTempValue1);
|
||||||
|
if (strDiskUsage.Find(wxT("MB")) != -1) {
|
||||||
|
dTempValue1 /= 1000;
|
||||||
|
}
|
||||||
|
aDiskUsage[i].ToDouble(&dTempValue2);
|
||||||
|
if (aDiskUsage[i].Find(wxT("MB")) != -1) {
|
||||||
|
dTempValue2 /= 1000;
|
||||||
|
}
|
||||||
|
if ((strDiskUsage == aDiskUsage[i]) || (dTempValue1 == dTempValue2)) {
|
||||||
strDiskUsage = wxEmptyString;
|
strDiskUsage = wxEmptyString;
|
||||||
|
// Store this value so we know what to set the selection too in the
|
||||||
|
// combo box.
|
||||||
iDiskUsageIndex = i;
|
iDiskUsageIndex = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -756,8 +772,12 @@ bool CPanelPreferences::ReadPreferenceSettings() {
|
||||||
|
|
||||||
// Null out strCPUUsage if it is a duplicate
|
// Null out strCPUUsage if it is a duplicate
|
||||||
for (i=0; i < aCPUUsage.Count(); i++) {
|
for (i=0; i < aCPUUsage.Count(); i++) {
|
||||||
if (strCPUUsage == aCPUUsage[i]) {
|
strCPUUsage.ToDouble(&dTempValue1);
|
||||||
|
aCPUUsage[i].ToDouble(&dTempValue2);
|
||||||
|
if ((strCPUUsage == aCPUUsage[i]) || (dTempValue1 == dTempValue2)) {
|
||||||
strCPUUsage = wxEmptyString;
|
strCPUUsage = wxEmptyString;
|
||||||
|
// Store this value so we know what to set the selection too in the
|
||||||
|
// combo box.
|
||||||
iCPUUsageIndex = i;
|
iCPUUsageIndex = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -792,8 +812,12 @@ bool CPanelPreferences::ReadPreferenceSettings() {
|
||||||
|
|
||||||
// Null out strWorkWhenIdle if it is a duplicate
|
// Null out strWorkWhenIdle if it is a duplicate
|
||||||
for (i=0; i < aWorkWhenIdle.Count(); i++) {
|
for (i=0; i < aWorkWhenIdle.Count(); i++) {
|
||||||
if (strWorkWhenIdle == aWorkWhenIdle[i]) {
|
strWorkWhenIdle.ToDouble(&dTempValue1);
|
||||||
|
aWorkWhenIdle[i].ToDouble(&dTempValue2);
|
||||||
|
if ((strWorkWhenIdle == aWorkWhenIdle[i]) || (dTempValue1 == dTempValue2)) {
|
||||||
strWorkWhenIdle = wxEmptyString;
|
strWorkWhenIdle = wxEmptyString;
|
||||||
|
// Store this value so we know what to set the selection too in the
|
||||||
|
// combo box.
|
||||||
iWorkWhenIdleIndex = i;
|
iWorkWhenIdleIndex = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -873,7 +897,7 @@ bool CPanelPreferences::SavePreferenceSettings() {
|
||||||
|
|
||||||
// Use no more than %s of disk space
|
// Use no more than %s of disk space
|
||||||
m_strMaxDiskUsage.ToDouble((double*)&dTest);
|
m_strMaxDiskUsage.ToDouble((double*)&dTest);
|
||||||
if (m_strMaxDiskUsage.Find(wxT("GB")) == -1) {
|
if (m_strMaxDiskUsage.Find(wxT("MB")) != -1) {
|
||||||
dTest /= 1000;
|
dTest /= 1000;
|
||||||
}
|
}
|
||||||
if (dTest != current_global_preferences.disk_max_used_gb) {
|
if (dTest != current_global_preferences.disk_max_used_gb) {
|
||||||
|
|
Loading…
Reference in New Issue