diff --git a/.codecov.yml b/.codecov.yml
index 628a7617868..aa664c10245 100644
--- a/.codecov.yml
+++ b/.codecov.yml
@@ -17,7 +17,7 @@ comment:
require_changes: yes # if true: only post the comment if coverage changes
require_base: no # [yes :: must have a base report to post]
require_head: yes # [yes :: must have a head report to post]
- branches:
+ branches:
- master
after_n_builds: 3
diff --git a/.github/workflows/snap.yml b/.github/workflows/snap.yml
index c70ccd00001..b3d1d135dfe 100644
--- a/.github/workflows/snap.yml
+++ b/.github/workflows/snap.yml
@@ -9,7 +9,7 @@ on:
schedule:
- cron: '10 12 * * 0'
-concurrency:
+concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
@@ -47,7 +47,7 @@ jobs:
if: ${{ success() && (env.AWS_ACCESS_KEY_ID == 0 || env.AWS_SECRET_ACCESS_KEY == 0) }}
run: |
echo "VCPKG_BINARY_SOURCES=clear;x-aws-config,no-sign-request;x-aws,s3://vcpkg.cache.boinc/,read" >> $GITHUB_ENV
-
+
- name: Configure docker qemu
if: success()
uses: docker/setup-qemu-action@v2
@@ -105,7 +105,7 @@ jobs:
path: deploy/logs.7z
- name: Prepare artifacts for deploy
- if: success()
+ if: success()
run: python ./deploy/prepare_deployment.py linux_snap
- name: Upload artifacts
diff --git a/.github/workflows/source-code-check.yml b/.github/workflows/source-code-check.yml
index 5f1277f6d69..b04f9f02a85 100644
--- a/.github/workflows/source-code-check.yml
+++ b/.github/workflows/source-code-check.yml
@@ -27,3 +27,7 @@ jobs:
if: ${{ success() }}
run: |
python ./ci_tools/source_code_check.py .
+ - name: Check source code for trailing whitespaces
+ if: ${{ success() }}
+ run: |
+ python ./ci_tools/trailing_whitespaces_check.py .
diff --git a/3rdParty/vcpkg_ports/configs/client/vcpkg.json b/3rdParty/vcpkg_ports/configs/client/vcpkg.json
index a7827dfbb20..cd0ce00ddb6 100644
--- a/3rdParty/vcpkg_ports/configs/client/vcpkg.json
+++ b/3rdParty/vcpkg_ports/configs/client/vcpkg.json
@@ -7,5 +7,5 @@
"features": ["openssl"],
"default-features": false
}
- ]
+ ]
}
diff --git a/3rdParty/vcpkg_ports/configs/client/wasm/vcpkg.json b/3rdParty/vcpkg_ports/configs/client/wasm/vcpkg.json
index 8e96173cdea..c101fb1fa7e 100644
--- a/3rdParty/vcpkg_ports/configs/client/wasm/vcpkg.json
+++ b/3rdParty/vcpkg_ports/configs/client/wasm/vcpkg.json
@@ -8,5 +8,5 @@
"default-features": false
},
"rappture"
- ]
+ ]
}
diff --git a/3rdParty/vcpkg_ports/configs/libs/vcpkg.json b/3rdParty/vcpkg_ports/configs/libs/vcpkg.json
index d4a2f4423e8..28dbe2ed8ed 100644
--- a/3rdParty/vcpkg_ports/configs/libs/vcpkg.json
+++ b/3rdParty/vcpkg_ports/configs/libs/vcpkg.json
@@ -7,5 +7,5 @@
"features": ["openssl"],
"default-features": false
}
- ]
+ ]
}
diff --git a/3rdParty/vcpkg_ports/configs/libs/windows/vcpkg.json b/3rdParty/vcpkg_ports/configs/libs/windows/vcpkg.json
index 820d665e302..ce7a4afe9f6 100644
--- a/3rdParty/vcpkg_ports/configs/libs/windows/vcpkg.json
+++ b/3rdParty/vcpkg_ports/configs/libs/windows/vcpkg.json
@@ -8,5 +8,5 @@
"default-features": false
},
"openssl"
- ]
+ ]
}
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index be5bd941644..8371ba06bc6 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -27,5 +27,5 @@ Social and technical disagreements should not be left to fester, leaving others
Don't forget that it is human to err and that blaming each other isn't productive. Instead, focus on helping to resolve issues and learning from mistakes. Participants in the project should try to resolve disagreements constructively. When it is impossible to reach an agreement, follow the [process outlined in the Governance document](https://github.com/BOINC/boinc-policy/blob/master/Governance.md#5-decision-processes) to come to a solution.
-We also adhere to the Github community guidelines, please see https://help.github.com/articles/github-community-guidelines/
+We also adhere to the Github community guidelines, please see https://help.github.com/articles/github-community-guidelines/
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 86ef3e8b41d..d5b2d7dda6d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -16,13 +16,13 @@ Want to connect with contributors?
* The BOINC Contributor call occurs every other week and is announced on the [BOINC Development email list](https://groups.google.com/a/ssl.berkeley.edu/forum/#!forum/boinc_dev)
### Promote Volunteer Computing
-Want to help promote volunteer computing and work on ways to attract new users? Join the #communications channel on [Slack](https://join.slack.com/t/boincworkspace/shared_invite/enQtNzA3MTQ4NDA0Njc4LTM4NTEyZTY1MWEwZjAyNTVmOTg3NDA2NjVjZDQzMWQ3NmFjYTc4MTNkNTEyNjRkOTQ4MWU5Nzk3NzRhNTg0NDI)
+Want to help promote volunteer computing and work on ways to attract new users? Join the #communications channel on [Slack](https://join.slack.com/t/boincworkspace/shared_invite/enQtNzA3MTQ4NDA0Njc4LTM4NTEyZTY1MWEwZjAyNTVmOTg3NDA2NjVjZDQzMWQ3NmFjYTc4MTNkNTEyNjRkOTQ4MWU5Nzk3NzRhNTg0NDI)
### Help Translate
See: https://boinc.berkeley.edu/trac/wiki/TranslateIntro
### Help Test
-You can help new versions of the client.
+You can help new versions of the client.
* Become an [Alpha Tester](https://boinc.berkeley.edu/trac/wiki/AlphaInstructions)
* Signup to be a [BOINC Android Tester](https://groups.google.com/forum/#!forum/boinc-android-testing)
diff --git a/COPYING.LESSER b/COPYING.LESSER
index fc8a5de7edf..cca7fc278f5 100644
--- a/COPYING.LESSER
+++ b/COPYING.LESSER
@@ -10,7 +10,7 @@
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
- 0. Additional Definitions.
+ 0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
@@ -111,7 +111,7 @@ the following:
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
- Version.
+ Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
diff --git a/Makefile.incl b/Makefile.incl
index 0b593708ac3..7ac132ba6c6 100644
--- a/Makefile.incl
+++ b/Makefile.incl
@@ -31,7 +31,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/vda \
$(PTHREAD_CFLAGS)
-AM_CFLAGS = -Wall -Wextra -Wshadow -Wredundant-decls -Wdisabled-optimization -Wpointer-arith -Wstrict-aliasing -Wcast-align
+AM_CFLAGS = -Wall -Wextra -Wshadow -Wredundant-decls -Wdisabled-optimization -Wpointer-arith -Wstrict-aliasing -Wcast-align
AM_CXXFLAGS = $(AM_CFLAGS)
diff --git a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/AccountIn.aidl b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/AccountIn.aidl
index 47ff85901f2..a76cf1875ca 100644
--- a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/AccountIn.aidl
+++ b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/AccountIn.aidl
@@ -2,20 +2,20 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2012 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
******************************************************************************/
package edu.berkeley.boinc.rpc;
-parcelable AccountIn;
\ No newline at end of file
+parcelable AccountIn;
diff --git a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/AccountManager.aidl b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/AccountManager.aidl
index 30bc43ee95f..20ebfe7648e 100644
--- a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/AccountManager.aidl
+++ b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/AccountManager.aidl
@@ -2,20 +2,20 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2012 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
******************************************************************************/
package edu.berkeley.boinc.rpc;
-parcelable AccountManager;
\ No newline at end of file
+parcelable AccountManager;
diff --git a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/AccountOut.aidl b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/AccountOut.aidl
index 0d0a8efa1dd..f440afd5a26 100644
--- a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/AccountOut.aidl
+++ b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/AccountOut.aidl
@@ -2,20 +2,20 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2012 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
******************************************************************************/
package edu.berkeley.boinc.rpc;
-parcelable AccountOut;
\ No newline at end of file
+parcelable AccountOut;
diff --git a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/AcctMgrInfo.aidl b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/AcctMgrInfo.aidl
index c80631f750d..ac7edd93a13 100644
--- a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/AcctMgrInfo.aidl
+++ b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/AcctMgrInfo.aidl
@@ -2,20 +2,20 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2012 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
******************************************************************************/
package edu.berkeley.boinc.rpc;
-parcelable AcctMgrInfo;
\ No newline at end of file
+parcelable AcctMgrInfo;
diff --git a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/GlobalPreferences.aidl b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/GlobalPreferences.aidl
index 4d95e4c10ad..aa8961797b4 100644
--- a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/GlobalPreferences.aidl
+++ b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/GlobalPreferences.aidl
@@ -2,20 +2,20 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2012 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
******************************************************************************/
package edu.berkeley.boinc.rpc;
-parcelable GlobalPreferences;
\ No newline at end of file
+parcelable GlobalPreferences;
diff --git a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/HostInfo.aidl b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/HostInfo.aidl
index b5504247a2b..67ba1a86ec0 100644
--- a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/HostInfo.aidl
+++ b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/HostInfo.aidl
@@ -2,20 +2,20 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2012 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
******************************************************************************/
package edu.berkeley.boinc.rpc;
-parcelable HostInfo;
\ No newline at end of file
+parcelable HostInfo;
diff --git a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/ImageWrapper.aidl b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/ImageWrapper.aidl
index 71e52b353d8..31451fda06c 100644
--- a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/ImageWrapper.aidl
+++ b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/ImageWrapper.aidl
@@ -2,20 +2,20 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2012 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
******************************************************************************/
package edu.berkeley.boinc.rpc;
-parcelable ImageWrapper;
\ No newline at end of file
+parcelable ImageWrapper;
diff --git a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Message.aidl b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Message.aidl
index d643b00ad37..8f28509f768 100644
--- a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Message.aidl
+++ b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Message.aidl
@@ -2,20 +2,20 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2012 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
******************************************************************************/
package edu.berkeley.boinc.rpc;
-parcelable Message;
\ No newline at end of file
+parcelable Message;
diff --git a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Notice.aidl b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Notice.aidl
index 76435d87b97..a5e12c4a209 100644
--- a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Notice.aidl
+++ b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Notice.aidl
@@ -2,20 +2,20 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2012 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
******************************************************************************/
package edu.berkeley.boinc.rpc;
-parcelable Notice;
\ No newline at end of file
+parcelable Notice;
diff --git a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Project.aidl b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Project.aidl
index 3daf21f3900..8509d5afb68 100644
--- a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Project.aidl
+++ b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Project.aidl
@@ -2,20 +2,20 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2012 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
******************************************************************************/
package edu.berkeley.boinc.rpc;
-parcelable Project;
\ No newline at end of file
+parcelable Project;
diff --git a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/ProjectConfig.aidl b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/ProjectConfig.aidl
index 454111307cb..b7d9ab44b06 100644
--- a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/ProjectConfig.aidl
+++ b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/ProjectConfig.aidl
@@ -2,20 +2,20 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2012 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
******************************************************************************/
package edu.berkeley.boinc.rpc;
-parcelable ProjectConfig;
\ No newline at end of file
+parcelable ProjectConfig;
diff --git a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/ProjectInfo.aidl b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/ProjectInfo.aidl
index cf6b95a0078..1171f36e1e6 100644
--- a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/ProjectInfo.aidl
+++ b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/ProjectInfo.aidl
@@ -2,20 +2,20 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2012 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
******************************************************************************/
package edu.berkeley.boinc.rpc;
-parcelable ProjectInfo;
\ No newline at end of file
+parcelable ProjectInfo;
diff --git a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Result.aidl b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Result.aidl
index b729566d54e..a2d9cdb175c 100644
--- a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Result.aidl
+++ b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Result.aidl
@@ -2,20 +2,20 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2012 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
******************************************************************************/
package edu.berkeley.boinc.rpc;
-parcelable Result;
\ No newline at end of file
+parcelable Result;
diff --git a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Transfer.aidl b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Transfer.aidl
index 4654e41853d..8eee7cb2d23 100644
--- a/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Transfer.aidl
+++ b/android/BOINC/app/src/main/aidl/edu/berkeley/boinc/rpc/Transfer.aidl
@@ -2,20 +2,20 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2012 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
******************************************************************************/
package edu.berkeley.boinc.rpc;
-parcelable Transfer;
\ No newline at end of file
+parcelable Transfer;
diff --git a/android/BOINC/app/src/main/java/edu/berkeley/boinc/attach/AttachAccountManagerActivity.kt b/android/BOINC/app/src/main/java/edu/berkeley/boinc/attach/AttachAccountManagerActivity.kt
index a63d76ba561..aa76e377734 100644
--- a/android/BOINC/app/src/main/java/edu/berkeley/boinc/attach/AttachAccountManagerActivity.kt
+++ b/android/BOINC/app/src/main/java/edu/berkeley/boinc/attach/AttachAccountManagerActivity.kt
@@ -234,7 +234,7 @@ class AttachAccountManagerActivity : AppCompatActivity() {
// This should not happen
monitor = null
mIsBound = false
-
+
Logging.logError(Logging.Category.GUI_ACTIVITY, "AttachAccountManagerActivity onServiceDisconnected")
}
}
diff --git a/android/BOINC/app/src/main/java/edu/berkeley/boinc/attach/ManualUrlInputFragment.java b/android/BOINC/app/src/main/java/edu/berkeley/boinc/attach/ManualUrlInputFragment.java
index 3b059a606ce..57da19389fa 100644
--- a/android/BOINC/app/src/main/java/edu/berkeley/boinc/attach/ManualUrlInputFragment.java
+++ b/android/BOINC/app/src/main/java/edu/berkeley/boinc/attach/ManualUrlInputFragment.java
@@ -95,7 +95,7 @@ private boolean checkDeviceOnline() {
if(!online) {
Toast toast = Toast.makeText(getActivity(), R.string.attachproject_list_no_internet, Toast.LENGTH_SHORT);
toast.show();
-
+
Logging.logDebug(Logging.Category.GUI_ACTIVITY, "ManualUrlInputFragment not online, stop!");
}
return online;
diff --git a/android/BOINC/app/src/main/java/edu/berkeley/boinc/client/ClientInterfaceImplementation.java b/android/BOINC/app/src/main/java/edu/berkeley/boinc/client/ClientInterfaceImplementation.java
index 429d5337a34..20fc5e953f9 100644
--- a/android/BOINC/app/src/main/java/edu/berkeley/boinc/client/ClientInterfaceImplementation.java
+++ b/android/BOINC/app/src/main/java/edu/berkeley/boinc/client/ClientInterfaceImplementation.java
@@ -560,7 +560,7 @@ boolean setDomainName(String deviceName) {
boolean success = setDomainNameRpc(deviceName);
Logging.logDebug(Logging.Category.CLIENT, "setDomainName: success " + success);
-
+
return success;
}
diff --git a/android/BOINC/app/src/main/java/edu/berkeley/boinc/client/NoticeNotification.kt b/android/BOINC/app/src/main/java/edu/berkeley/boinc/client/NoticeNotification.kt
index 719b0da0827..f74e831c18c 100644
--- a/android/BOINC/app/src/main/java/edu/berkeley/boinc/client/NoticeNotification.kt
+++ b/android/BOINC/app/src/main/java/edu/berkeley/boinc/client/NoticeNotification.kt
@@ -2,17 +2,17 @@
This file is part of BOINC.
https://boinc.berkeley.edu
Copyright (C) 2022 University of California
-
+
BOINC is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.
-
+
BOINC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public License
along with BOINC. If not, see .
**/
diff --git a/android/BOINC/app/src/main/java/edu/berkeley/boinc/rpc/AccountManagerParser.kt b/android/BOINC/app/src/main/java/edu/berkeley/boinc/rpc/AccountManagerParser.kt
index 475dd404676..795c3a2aa04 100644
--- a/android/BOINC/app/src/main/java/edu/berkeley/boinc/rpc/AccountManagerParser.kt
+++ b/android/BOINC/app/src/main/java/edu/berkeley/boinc/rpc/AccountManagerParser.kt
@@ -2,17 +2,17 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2021 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
*/
diff --git a/android/BOINC/app/src/main/java/edu/berkeley/boinc/rpc/AccountOutParser.kt b/android/BOINC/app/src/main/java/edu/berkeley/boinc/rpc/AccountOutParser.kt
index ebe271b3067..ce79c3cc557 100644
--- a/android/BOINC/app/src/main/java/edu/berkeley/boinc/rpc/AccountOutParser.kt
+++ b/android/BOINC/app/src/main/java/edu/berkeley/boinc/rpc/AccountOutParser.kt
@@ -81,7 +81,7 @@ class AccountOutParser : BaseParser() {
} catch (e: SAXException) {
Logging.logException(Logging.Category.RPC, "AccountOutParser: malformed XML ", e)
Logging.logDebug(Logging.Category.XML, "AccountOutParser: $rpcResult")
-
+
null
}
}
diff --git a/android/BOINC/app/src/main/java/edu/berkeley/boinc/rpc/SimpleReplyParser.kt b/android/BOINC/app/src/main/java/edu/berkeley/boinc/rpc/SimpleReplyParser.kt
index 2991f4a911f..38192a04196 100644
--- a/android/BOINC/app/src/main/java/edu/berkeley/boinc/rpc/SimpleReplyParser.kt
+++ b/android/BOINC/app/src/main/java/edu/berkeley/boinc/rpc/SimpleReplyParser.kt
@@ -81,7 +81,7 @@ class SimpleReplyParser : BaseParser() {
} catch (e: SAXException) {
Logging.logException(Logging.Category.RPC, "SimpleReplyParser: malformed XML ", e)
Logging.logDebug(Logging.Category.XML, "SimpleReplyParser: $reply")
-
+
null
}
}
diff --git a/android/BOINC/app/src/main/java/edu/berkeley/boinc/ui/eventlog/EventLogClientFragment.kt b/android/BOINC/app/src/main/java/edu/berkeley/boinc/ui/eventlog/EventLogClientFragment.kt
index f69a1af2f26..830e59fb5e0 100644
--- a/android/BOINC/app/src/main/java/edu/berkeley/boinc/ui/eventlog/EventLogClientFragment.kt
+++ b/android/BOINC/app/src/main/java/edu/berkeley/boinc/ui/eventlog/EventLogClientFragment.kt
@@ -112,7 +112,7 @@ class EventLogClientFragment : Fragment() {
// message retrieval
// amount messages loaded when end of list is reached
val pastMsgsLoadingRange = 50
-
+
Logging.logDebug(Logging.Category.CLIENT, "calling monitor with: " + pastSeqNo + " / " +
pastMsgsLoadingRange)
diff --git a/android/BOINC/app/src/test/java/edu/berkeley/boinc/adapter/ProjectListEntryTest.kt b/android/BOINC/app/src/test/java/edu/berkeley/boinc/adapter/ProjectListEntryTest.kt
index 7c7ef27863f..949ef5d720d 100644
--- a/android/BOINC/app/src/test/java/edu/berkeley/boinc/adapter/ProjectListEntryTest.kt
+++ b/android/BOINC/app/src/test/java/edu/berkeley/boinc/adapter/ProjectListEntryTest.kt
@@ -26,11 +26,11 @@ class ProjectListEntryTest {
@Test
fun `Check that ProjectInfo is saved when passed to constructor`()
{
- val projectInfo = ProjectInfo("ProjectName", "https://testproject.com",
- "Mathematics", "Combinatorics",
- "Test Project Description",
+ val projectInfo = ProjectInfo("ProjectName", "https://testproject.com",
+ "Mathematics", "Combinatorics",
+ "Test Project Description",
"Home Sweet Home", listOf("windows"),
- "https://testproject.com/favicon.png",
+ "https://testproject.com/favicon.png",
"Test Summary of the Project")
val projectListEntry = ProjectListEntry(projectInfo)
diff --git a/android/ProjectApp/AndroidManifest.xml b/android/ProjectApp/AndroidManifest.xml
index 1719a5f89cc..0c6211462f8 100644
--- a/android/ProjectApp/AndroidManifest.xml
+++ b/android/ProjectApp/AndroidManifest.xml
@@ -3,17 +3,17 @@
This file is part of BOINC.
http://boinc.berkeley.edu
Copyright (C) 2012 University of California
-
+
BOINC is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.
-
+
BOINC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public License
along with BOINC. If not, see .
-->
@@ -49,4 +49,4 @@
-
\ No newline at end of file
+
diff --git a/android/ProjectApp/res/values/client_configuration.xml b/android/ProjectApp/res/values/client_configuration.xml
index 22dd5e0243a..6ebd911f4e0 100644
--- a/android/ProjectApp/res/values/client_configuration.xml
+++ b/android/ProjectApp/res/values/client_configuration.xml
@@ -3,17 +3,17 @@
This file is part of BOINC.
http://boinc.berkeley.edu
Copyright (C) 2012 University of California
-
+
BOINC is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.
-
+
BOINC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public License
along with BOINC. If not, see .
-->
@@ -25,4 +25,4 @@
edu.berkeley.boinc.client.ClientRemoteService
edu.berkeley.boinc.BOINCActivity
-
\ No newline at end of file
+
diff --git a/android/ProjectApp/res/values/configuration.xml b/android/ProjectApp/res/values/configuration.xml
index c2bd072249a..1903ba976a3 100644
--- a/android/ProjectApp/res/values/configuration.xml
+++ b/android/ProjectApp/res/values/configuration.xml
@@ -3,17 +3,17 @@
This file is part of BOINC.
http://boinc.berkeley.edu
Copyright (C) 2012 University of California
-
+
BOINC is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.
-
+
BOINC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public License
along with BOINC. If not, see .
-->
@@ -21,12 +21,12 @@
BOINC Test Project
http://isaac.ssl.berkeley.edu/test/
-
+
BOINC Project App
com.example.project.serviceupdate
5000
-
+
com.example.project.serviceupdate
-
\ No newline at end of file
+
diff --git a/android/ProjectApp/src/com/example/projectapp/BoincInteractionService.java b/android/ProjectApp/src/com/example/projectapp/BoincInteractionService.java
index d9d69a27f59..0efd0da7ae9 100644
--- a/android/ProjectApp/src/com/example/projectapp/BoincInteractionService.java
+++ b/android/ProjectApp/src/com/example/projectapp/BoincInteractionService.java
@@ -2,17 +2,17 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2012 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
******************************************************************************/
@@ -45,9 +45,9 @@
public class BoincInteractionService extends Service {
private final String TAG = "BoincInteractionService";
-
+
public Integer boincStatus = BoincStatus.INITIALIZING; //TODO could be replaced by sticky broadcasts??!
-
+
//IClientRemoteService attributes
private IClientRemoteService mIClientRemoteService;
private Boolean mClientRemoteServiceIsBound = false;
@@ -80,16 +80,16 @@ public BoincInteractionService getService() {
return BoincInteractionService.this;
}
}
-
+
// service lifecycle methods
@Override
public void onCreate() {
Log.d(TAG,"onCreate()");
-
+
//start of setup routine
checkBoincClientAvailable();
}
-
+
@Override
public void onDestroy() {
Log.d(TAG, "onDestroy");
@@ -103,14 +103,14 @@ public void onDestroy() {
public IBinder onBind(Intent intent) {
return mBinder;
}
-
+
private void bindClientRemoteService () {
publishAndDispatch(BoincStatus.BINDING_BOINC_CLIENT_REMOTE_SERVICE);
Intent i = new Intent();
- i.setClassName(getResources().getString(R.string.client_android_package_name), getResources().getString(R.string.client_remote_service_name));
+ i.setClassName(getResources().getString(R.string.client_android_package_name), getResources().getString(R.string.client_remote_service_name));
bindService(i, mClientRemoteServiceConnection, BIND_AUTO_CREATE);
}
-
+
private void unbindClientRemoteService() {
if(mClientRemoteServiceIsBound) {
unbindService(mClientRemoteServiceConnection);
@@ -118,15 +118,15 @@ private void unbindClientRemoteService() {
mIClientRemoteService = null;
}
}
-
+
private void checkBoincClientAvailable() {
- (new CheckBoincClientAvailable()).execute(); //asynchronous call.
+ (new CheckBoincClientAvailable()).execute(); //asynchronous call.
}
-
+
public void downloadAndInstallClient() {
- (new DownloadAndInstallClientApp()).execute(); //asynchronous call.
+ (new DownloadAndInstallClientApp()).execute(); //asynchronous call.
}
-
+
private void tryClientRemoteServiceInterface() {
publishAndDispatch(BoincStatus.TRYING_CRS_INTERFACE);
//busy waiting until interface returns true
@@ -150,7 +150,7 @@ private void tryClientRemoteServiceInterface() {
publishAndDispatch(BoincStatus.CRS_INTERFACE_TIMEOUT);
}
}
-
+
private void checkProjectAttached() {
//TODO
publishAndDispatch(BoincStatus.PROJECT_ATTACHED);
@@ -166,7 +166,7 @@ private void checkProjectAttached() {
publishAndDispatch(BoincStatus.PROJECT_NOT_ATTACHED);
}*/
}
-
+
private void openBoincApp() {
Intent i = new Intent();
i.setClassName(getResources().getString(R.string.client_android_package_name),getResources().getString(R.string.client_main_activity_name));
@@ -175,7 +175,7 @@ private void openBoincApp() {
i.putExtra("project_name", getResources().getString(R.string.project_name));
startActivity(i);
}
-
+
private final class CheckBoincClientAvailable extends AsyncTask {
private final String TAG = "CheckBoincClientAvailable";
@@ -184,11 +184,11 @@ private final class CheckBoincClientAvailable extends AsyncTask {
//TODO download official Client app from PlayStore
//TODO remove write external storage permission if not needed anymore
private final String TAG = "DownloadAndInstallClientApp";
-
+
@Override
protected void onPreExecute() {
publishAndDispatch(BoincStatus.INSTALLING_BOINC);
}
-
+
@Override
protected Boolean doInBackground(Void... params) {
Log.d(TAG+"-doInBackground", "installing Client...");
try{
if(Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { //checking whether SD card is present
-
+
//downloading apk
URL url = new URL(getResources().getString(R.string.client_download_url));
HttpURLConnection c = (HttpURLConnection) url.openConnection();
c.setRequestMethod("GET");
c.setDoOutput(true);
c.connect();
- File tmpDir = new File(Environment.getExternalStorageDirectory(),"/boinc_download/");
+ File tmpDir = new File(Environment.getExternalStorageDirectory(),"/boinc_download/");
tmpDir.mkdirs();
File app = new File(tmpDir,"boinc_client.apk");
FileOutputStream fos = new FileOutputStream(app);
@@ -251,18 +251,18 @@ protected Boolean doInBackground(Void... params) {
}
fos.close();
is.close();
-
+
//register receiver for successful install
IntentFilter mIntentFilter = new IntentFilter();
mIntentFilter.addAction(Intent.ACTION_PACKAGE_ADDED);
mIntentFilter.addDataScheme("package");
registerReceiver(clientInstalledReceiver, mIntentFilter);
-
+
//installation in new activity
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(app), "application/vnd.android.package-archive");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- startActivity(intent);
+ startActivity(intent);
} else{
Log.d(TAG, "getExternalStorageState() does not return MEDIA_MOUNTED");
return false;
@@ -273,9 +273,9 @@ protected Boolean doInBackground(Void... params) {
}
BroadcastReceiver clientInstalledReceiver = new BroadcastReceiver() {
-
+
private final String TAG = "clientInstalledReceiver";
-
+
@Override
public void onReceive(Context context, Intent intent) {
Log.d(TAG,"onReceive");
@@ -288,20 +288,20 @@ public void onReceive(Context context, Intent intent) {
publishAndDispatch(BoincStatus.BOINC_INSTALLED);
}
}
- }
+ }
};
-
+
private void publishAndDispatch(Integer status) {
Log.d(TAG,"publishAndDispatch with status: " + status);
-
+
//write in variable, to allow status pulling
boincStatus = status;
-
+
//send broadcast for activities to update layout
Intent i = new Intent(getResources().getString(R.string.bis_broadcast_name));
i.putExtra("status", status);
sendBroadcast(i);
-
+
//dispatch next task:
switch(status) {
case BoincStatus.CHECKING_BOINC_AVAILABLILITY:
diff --git a/android/ProjectApp/src/com/example/projectapp/BoincStatus.java b/android/ProjectApp/src/com/example/projectapp/BoincStatus.java
index d8f1bb76039..687d0bded38 100644
--- a/android/ProjectApp/src/com/example/projectapp/BoincStatus.java
+++ b/android/ProjectApp/src/com/example/projectapp/BoincStatus.java
@@ -2,22 +2,22 @@
public class BoincStatus {
public static final int INITIALIZING = 0; //default
-
+
public static final int CHECKING_BOINC_AVAILABLILITY = 1;
public static final int BOINC_AVAILABLE = 11;
public static final int BOINC_NOT_AVAILABLE = 12;
-
+
public static final int INSTALLING_BOINC = 2;
public static final int BOINC_INSTALLED = 21;
-
+
public static final int BINDING_BOINC_CLIENT_REMOTE_SERVICE = 3;
public static final int CRS_BOUND = 31;
public static final int CRS_BINDING_FAILED = 32;
-
+
public static final int TRYING_CRS_INTERFACE = 4;
public static final int CRS_INTERFACE_READY = 41;
public static final int CRS_INTERFACE_TIMEOUT = 42;
-
+
public static final int ATTACHING_PROJECT = 5;
public static final int CHECKING_PROJECT_ATTACHED = 50;
public static final int PROJECT_ATTACHED = 51;
diff --git a/android/ProjectApp/src/com/example/projectapp/ProjectExampleMainActivity.java b/android/ProjectApp/src/com/example/projectapp/ProjectExampleMainActivity.java
index f09f32d9a11..4778722db8a 100644
--- a/android/ProjectApp/src/com/example/projectapp/ProjectExampleMainActivity.java
+++ b/android/ProjectApp/src/com/example/projectapp/ProjectExampleMainActivity.java
@@ -2,17 +2,17 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2012 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
******************************************************************************/
@@ -38,16 +38,16 @@
public class ProjectExampleMainActivity extends Activity implements OnClickListener{
private final String TAG = "MainActivity";
-
+
private BoincInteractionService bis;
private Boolean mIsBound;
-
+
private BroadcastReceiver bisUpdateReceiver;
@Override
protected void onCreate(Bundle savedInstanceState) {
Log.d(TAG, "onCreate");
-
+
bisUpdateReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
@@ -55,11 +55,11 @@ public void onReceive(Context context, Intent intent) {
}
};
registerReceiver(bisUpdateReceiver, new IntentFilter(getResources().getString(R.string.bis_broadcast_name)));
-
+
super.onCreate(savedInstanceState);
-
+
layout(BoincStatus.INITIALIZING); //default
-
+
bindBoincInteractionService();
}
@@ -69,7 +69,7 @@ public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
-
+
@Override
protected void onDestroy() {
Log.d(TAG, "onDestroy");
@@ -94,13 +94,13 @@ public void onServiceDisconnected(ComponentName className) {
Toast.makeText(getApplicationContext(), "service disconnected", Toast.LENGTH_SHORT).show();
}
};
-
+
private void bindBoincInteractionService() {
// Establish a connection with the service, onServiceConnected gets called when finished.
Intent i = new Intent(this,BoincInteractionService.class);
bindService(i, mBoincInteractionServiceConnection, Context.BIND_AUTO_CREATE);
}
-
+
private void unbindBoincInteractionService() {
if (mIsBound) {
// Detach existing connection.
@@ -109,7 +109,7 @@ private void unbindBoincInteractionService() {
mIsBound = false;
}
}
-
+
private void layout(Integer boincStatus) {
Log.d(TAG,"layout boincStatus: " + boincStatus);
switch(boincStatus){
@@ -155,7 +155,7 @@ public void onClick(View v) {
bis.downloadAndInstallClient();
}
}
-
+
}
}
diff --git a/android/ProjectApp/src/edu/berkeley/boinc/client/IClientRemoteService.aidl b/android/ProjectApp/src/edu/berkeley/boinc/client/IClientRemoteService.aidl
index 50ab5a0c008..d83f8f79f92 100644
--- a/android/ProjectApp/src/edu/berkeley/boinc/client/IClientRemoteService.aidl
+++ b/android/ProjectApp/src/edu/berkeley/boinc/client/IClientRemoteService.aidl
@@ -2,17 +2,17 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2012 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
******************************************************************************/
@@ -33,7 +33,7 @@ interface IClientRemoteService {
/* Checks whether interface recipient is ready to serve commands.
* returns success*/
boolean isReady();
-
+
/* Returns the version code specified in AndroidManifest.xml.
* can be used to detect new AIDL versions.
* returns version code as Integer*/
@@ -47,12 +47,12 @@ interface IClientRemoteService {
* pwd: project login password in plain text. Password gets encrypted by BOINC before transmitted over the internet.
* returns success*/
boolean attachProject(in String packageName, in String url, in String id, in String authenticator);
-
+
/* Check whether given project URL is attached to BOINC
* url: project URL
* returns success*/
boolean checkProjectAttached(in String url);
-
+
/* Verifies given credentials to project account
* url: project URL
* id: project login identifier, i.e. email address
@@ -61,13 +61,13 @@ interface IClientRemoteService {
* returns AccountOut object including status code (0:verified, -206:pwd incorrect, -136:id unknown,
* -113:internet connection error) status message and authenticator required by attachProject*/
AccountOut verifyCredentials(in String url, in String id, in String pwd);
-
+
/* Detaches given project from BOINC application.
* packageName: package name of Android application causing this detach
* url: project URL
* returns success*/
boolean detachProject(in String packageName, in String url);
-
+
/* Creates new account at specified project URL
* url: project URL
* email: email address
@@ -77,10 +77,10 @@ interface IClientRemoteService {
*
* returns AccountOut object including status code, status message and authenticator required by attachProject*/
AccountOut createAccount(in String url, in String email, in String userName, in String pwd, in String teamName);
-
+
//== authentication ==
/* Retrieval the web-RPC authentication token, required to open a socket connection to the BOINC Client directly.
- * please make sure, you attached all required projects using this interface!
+ * please make sure, you attached all required projects using this interface!
* returns token, null if error*/
String getRpcAuthToken();
}
diff --git a/android/ProjectApp/src/edu/berkeley/boinc/rpc/AccountOut.java b/android/ProjectApp/src/edu/berkeley/boinc/rpc/AccountOut.java
index 9193d2a64b5..99a3681c753 100644
--- a/android/ProjectApp/src/edu/berkeley/boinc/rpc/AccountOut.java
+++ b/android/ProjectApp/src/edu/berkeley/boinc/rpc/AccountOut.java
@@ -2,17 +2,17 @@
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2012 University of California
- *
+ *
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
- *
+ *
* BOINC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with BOINC. If not, see .
******************************************************************************/
@@ -25,7 +25,7 @@ public class AccountOut implements Parcelable {
public int error_num = 0;
public String error_msg = "";
public String authenticator = "";
-
+
public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
public AccountOut createFromParcel(Parcel in) {
return new AccountOut(in);
diff --git a/android/Vagrantfile b/android/Vagrantfile
index 1e162d7eae4..aa0d729f3fe 100644
--- a/android/Vagrantfile
+++ b/android/Vagrantfile
@@ -39,7 +39,7 @@ Vagrant.configure("2") do |config|
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
config.vm.synced_folder ".", "/vagrant_data", disabled: true
-
+
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
@@ -80,8 +80,8 @@ Vagrant.configure("2") do |config|
# Customize the amount of memory on the VM:
hv.memory = "4096"
-
- # Enable virtualization extensions for the virtual CPUs.
+
+ # Enable virtualization extensions for the virtual CPUs.
hv.enable_virtualization_extensions = true
hv.vm_integration_services = {
diff --git a/android/WSL.README.md b/android/WSL.README.md
index 113fddc07de..2cc200afa9e 100644
--- a/android/WSL.README.md
+++ b/android/WSL.README.md
@@ -46,7 +46,7 @@ We are going to use Ubuntu 20.04 as an example, other versions should be similar
===== BOINC for all platforms build done =====
If you ever had problem at this point, try `git clean -fxd ..` and run again
-
+
While waiting please do another repository cloning at Android Studio.
## Android Studio
diff --git a/android/build_boinc_arm.sh b/android/build_boinc_arm.sh
index a6490befb52..9e41cc7ac77 100755
--- a/android/build_boinc_arm.sh
+++ b/android/build_boinc_arm.sh
@@ -60,7 +60,7 @@ fi
if [ -n "$COMPILEBOINC" ]; then
cd "$BOINC"
- echo "===== building BOINC for arm from $PWD ====="
+ echo "===== building BOINC for arm from $PWD ====="
if [ -n "$MAKECLEAN" ] && [ -f "Makefile" ]; then
if [ "$VERBOSE" = "no" ]; then
make distclean 1>$STDOUT_TARGET 2>&1
diff --git a/android/build_boinc_arm64.sh b/android/build_boinc_arm64.sh
index b47a5f8b04f..9327e26be7f 100755
--- a/android/build_boinc_arm64.sh
+++ b/android/build_boinc_arm64.sh
@@ -58,7 +58,7 @@ fi
if [ -n "$COMPILEBOINC" ]; then
cd "$BOINC"
- echo "===== building BOINC for arm64 from $PWD ====="
+ echo "===== building BOINC for arm64 from $PWD ====="
if [ -n "$MAKECLEAN" ] && [ -f "Makefile" ]; then
if [ "$VERBOSE" = "no" ]; then
make distclean 1>$STDOUT_TARGET 2>&1
diff --git a/android/build_boinc_x86.sh b/android/build_boinc_x86.sh
index 094f7292579..2613da7ed1b 100755
--- a/android/build_boinc_x86.sh
+++ b/android/build_boinc_x86.sh
@@ -57,7 +57,7 @@ fi
if [ -n "$COMPILEBOINC" ]; then
cd "$BOINC"
- echo "===== building BOINC for x86 from $PWD ====="
+ echo "===== building BOINC for x86 from $PWD ====="
if [ -n "$MAKECLEAN" ] && [ -f "Makefile" ]; then
if [ "$VERBOSE" = "no" ]; then
make distclean 1>$STDOUT_TARGET 2>&1
diff --git a/android/build_boinc_x86_64.sh b/android/build_boinc_x86_64.sh
index 34811351a9a..529eb757d0a 100755
--- a/android/build_boinc_x86_64.sh
+++ b/android/build_boinc_x86_64.sh
@@ -58,7 +58,7 @@ fi
if [ -n "$COMPILEBOINC" ]; then
cd "$BOINC"
- echo "===== building BOINC for x86-64 from $PWD ====="
+ echo "===== building BOINC for x86-64 from $PWD ====="
if [ -n "$MAKECLEAN" ] && [ -f "Makefile" ]; then
if [ "$VERBOSE" = "no" ]; then
make distclean 1>$STDOUT_TARGET 2>&1
diff --git a/android/build_example_arm64.sh b/android/build_example_arm64.sh
index b3981d94816..82543af6afe 100755
--- a/android/build_example_arm64.sh
+++ b/android/build_example_arm64.sh
@@ -61,7 +61,7 @@ else
fi
if [ -n "$COMPILEBOINC" ]; then
- cd $BOINC
+ cd $BOINC
echo "===== building example for arm64 from $PWD ====="
if [ -n "$MAKECLEAN" ] && [ -f "Makefile" ]; then
echo "=== building example clean ==="
diff --git a/android/build_libraries_arm64.sh b/android/build_libraries_arm64.sh
index 72a1fd20550..362e2e9f20e 100755
--- a/android/build_libraries_arm64.sh
+++ b/android/build_libraries_arm64.sh
@@ -76,7 +76,7 @@ if [ -n "$COMPILEBOINC" ]; then
make $MAKE_FLAGS
make stage $MAKE_FLAGS
make install $MAKE_FLAGS
-
+
echo "\e[1;32m===== building BOINC Libraries for arm64 done =====\e[0m"
fi
diff --git a/android/build_libraries_armv6.sh b/android/build_libraries_armv6.sh
index d7d3695a71a..bc8d1a780c0 100755
--- a/android/build_libraries_armv6.sh
+++ b/android/build_libraries_armv6.sh
@@ -77,7 +77,7 @@ if [ -n "$COMPILEBOINC" ]; then
make $MAKE_FLAGS
make stage $MAKE_FLAGS
make install $MAKE_FLAGS
-
+
echo "\e[1;32m===== building BOINC Libraries for armv6 done =====\e[0m"
fi
diff --git a/android/build_libraries_x86.sh b/android/build_libraries_x86.sh
index c8241b7ea5e..2ba05e8e385 100755
--- a/android/build_libraries_x86.sh
+++ b/android/build_libraries_x86.sh
@@ -76,7 +76,7 @@ if [ -n "$COMPILEBOINC" ]; then
make $MAKE_FLAGS
make stage $MAKE_FLAGS
make install $MAKE_FLAGS
-
+
echo "\e[1;32m===== building BOINC Libraries for x86 done =====\e[0m"
fi
diff --git a/android/build_libraries_x86_64.sh b/android/build_libraries_x86_64.sh
index 5899e76555d..063fd18e184 100755
--- a/android/build_libraries_x86_64.sh
+++ b/android/build_libraries_x86_64.sh
@@ -76,7 +76,7 @@ if [ -n "$COMPILEBOINC" ]; then
make $MAKE_FLAGS
make stage $MAKE_FLAGS
make install $MAKE_FLAGS
-
+
echo "\e[1;32m===== building BOINC Libraries for x86-64 done =====\e[0m"
fi
diff --git a/android/ci_build_libs_cmake.sh b/android/ci_build_libs_cmake.sh
index 8c1df7f3ae7..ed498c1bfb1 100755
--- a/android/ci_build_libs_cmake.sh
+++ b/android/ci_build_libs_cmake.sh
@@ -28,7 +28,7 @@ TRIPLETS_LIST="armv6-android arm-android arm-neon-android arm64-android x86-andr
for TRIPLET in $TRIPLETS_LIST ; do
echo "\e[0;35m building $TRIPLET ... \e[0m"
-
+
if [ "$TRIPLET" = "armv6-android" ]; then
export ANDROID_NDK_HOME=$NDK_ARMV6_ROOT
else
diff --git a/android/ci_build_vcpkg_manager.sh b/android/ci_build_vcpkg_manager.sh
index 16c3cdb03dc..dbc55277d48 100755
--- a/android/ci_build_vcpkg_manager.sh
+++ b/android/ci_build_vcpkg_manager.sh
@@ -15,7 +15,7 @@ fi
android/ci_build_vcpkg_client.sh
-cd android/BOINC
+cd android/BOINC
echo '===== BOINC Manager build start ====='
diff --git a/api/Makefile.am b/api/Makefile.am
index 342e034343d..6d13d3dc396 100644
--- a/api/Makefile.am
+++ b/api/Makefile.am
@@ -16,14 +16,14 @@ graphics2_files = \
gutil.cpp \
gutil_text.cpp \
reduce_lib.cpp \
- graphics2.cpp
+ graphics2.cpp
if OS_WIN32
graphics2_files += graphics2_win.cpp \
$(top_srcdir)/samples/image_libs/bmplib.cpp \
$(top_srcdir)/samples/image_libs/tgalib.cpp
else
- graphics2_files += graphics2_unix.cpp
+ graphics2_files += graphics2_unix.cpp
endif
if OS_DARWIN
diff --git a/api/boinc_api.h b/api/boinc_api.h
index c4387d6e5cb..3924bad1bfc 100644
--- a/api/boinc_api.h
+++ b/api/boinc_api.h
@@ -123,7 +123,7 @@ extern int setMacIcon(char *filename, char *iconData, long iconSize);
} // extern "C" {
#endif
-// C++ API follows
+// C++ API follows
#ifdef __cplusplus
#include
diff --git a/api/boinc_api_fortran.cpp b/api/boinc_api_fortran.cpp
index 44284e4bdee..3cd58726185 100644
--- a/api/boinc_api_fortran.cpp
+++ b/api/boinc_api_fortran.cpp
@@ -138,7 +138,7 @@ void boinc_zip_(int* zipmode, const char* zipfile,
zipfileff.strip_whitespace();
pathff.strip_whitespace();
boinc_zip(*zipmode,zipfileff.c_str(),pathff.c_str());
-}
+}
#endif
} // extern "C"
diff --git a/api/boinc_opencl.cpp b/api/boinc_opencl.cpp
index f31b73d0948..8ce90476b76 100644
--- a/api/boinc_opencl.cpp
+++ b/api/boinc_opencl.cpp
@@ -17,7 +17,7 @@
// BOINC API for OpenCL
//
-// To get the cl_device_id and cl_platform_id for the OpenCL GPU
+// To get the cl_device_id and cl_platform_id for the OpenCL GPU
// assigned to your application call this function:
// int boinc_get_opencl_ids(int argc, char** argv, char *type, cl_device_id* device, cl_platform_id* platform);
//
@@ -48,8 +48,8 @@ static int compareBOINCVersionTo(int toMajor, int toMinor, int toRelease);
// In all systems, opencl_device_indexes start at 0 for each platform
// and device_nums start at 0 for each vendor.
//
-// On Macs, OpenCL does not always recognize all GPU models detected by
-// CUDA, so a device_num may not correspond to its opencl_device_index
+// On Macs, OpenCL does not always recognize all GPU models detected by
+// CUDA, so a device_num may not correspond to its opencl_device_index
// even if all GPUs are from NVIDIA.
//
int get_vendor(cl_device_id device_id, char* vendor, int len) {
@@ -60,13 +60,13 @@ int get_vendor(cl_device_id device_id, char* vendor, int len) {
);
if (retval != CL_SUCCESS) return retval;
if (!strlen(vendor)) return CL_INVALID_DEVICE_TYPE;
-
+
if ((strstr(vendor, "AMD")) ||
(strstr(vendor, "Advanced Micro Devices, Inc."))
) {
strlcpy(vendor, GPU_TYPE_ATI, len); // "ATI"
}
-
+
if (strcasestr(vendor, "nvidia")) {
strlcpy(vendor, GPU_TYPE_NVIDIA, len); // "NVIDIA"
}
@@ -99,7 +99,7 @@ int boinc_get_opencl_ids_aux(
retval = clGetPlatformIDs(MAX_OPENCL_PLATFORMS, platforms, &num_platforms);
if (num_platforms == 0) return CL_DEVICE_NOT_FOUND;
if (retval != CL_SUCCESS) return retval;
-
+
for (platform_index=0; platform_index= 0) {
// gpu_opencl_dev_index was added in BOINC version 7.0.12.
@@ -212,7 +212,7 @@ int boinc_get_opencl_ids(
aid.gpu_opencl_dev_index, aid.major_version, aid.minor_version, aid.release);
return CL_INVALID_DEVICE;
}
-
+
// Older versions of init_data.xml don't have the gpu_opencl_dev_index
// field so use the value of gpu_device_num if available.
gpu_device_num = aid.gpu_device_num;
@@ -228,7 +228,7 @@ int boinc_get_opencl_ids(
}
}
}
-
+
if (gpu_device_num < 0) {
// BOINC client apparently did not assign a GPU to this task.
fprintf(stderr, "Illegal value for gpu_device_num: %d in BOINC Client %d.%d.%d\n",
@@ -264,12 +264,12 @@ int boinc_get_opencl_ids(cl_device_id* device, cl_platform_id* platform) {
retval = boinc_parse_init_data_file();
if (retval) return retval;
boinc_get_init_data(aid);
-
+
if (!strlen(aid.gpu_type)) {
fprintf(stderr, "GPU type not found in %s\n", INIT_DATA_FILE);
return CL_INVALID_DEVICE_TYPE;
}
-
+
if (aid.gpu_opencl_dev_index < 0) {
if (compareBOINCVersionTo(7,0,12) >= 0) {
// gpu_opencl_dev_index was added in BOINC version 7.0.12.
@@ -279,7 +279,7 @@ int boinc_get_opencl_ids(cl_device_id* device, cl_platform_id* platform) {
aid.gpu_opencl_dev_index, aid.major_version, aid.minor_version, aid.release);
return CL_INVALID_DEVICE;
}
-
+
if (aid.gpu_device_num < 0) {
if (compareBOINCVersionTo(6,13,3) >= 0) {
// gpu_device_num and gpu_type fields were added in BOINC version 6.13.3.
@@ -301,7 +301,7 @@ int boinc_get_opencl_ids(cl_device_id* device, cl_platform_id* platform) {
static int compareBOINCVersionTo(int toMajor, int toMinor, int toRelease) {
APP_INIT_DATA aid;
-
+
boinc_get_init_data(aid);
if (aid.major_version < toMajor) return -1;
diff --git a/api/boinc_opencl.h b/api/boinc_opencl.h
index 7f744614b68..57d74c6a1f0 100644
--- a/api/boinc_opencl.h
+++ b/api/boinc_opencl.h
@@ -17,7 +17,7 @@
// BOINC API for OpenCL apps
-// Get the cl_device_id and cl_platform_id for the OpenCL GPU
+// Get the cl_device_id and cl_platform_id for the OpenCL GPU
// assigned to your job.
//
// NOTE: Compile and link this function with your application;
diff --git a/api/graphics2.cpp b/api/graphics2.cpp
index 13d78eb82f9..965d963207c 100644
--- a/api/graphics2.cpp
+++ b/api/graphics2.cpp
@@ -83,7 +83,7 @@ bool throttled_app_render(int x, int y, double t) {
if (boinc_max_gfx_cpu_frac) {
boinc_calling_thread_cpu_time(t0);
}
-
+
app_graphics_render(x, y, t);
#ifdef __APPLE__
diff --git a/api/graphics2_unix.cpp b/api/graphics2_unix.cpp
index 4d60585834d..e500bad3940 100644
--- a/api/graphics2_unix.cpp
+++ b/api/graphics2_unix.cpp
@@ -19,10 +19,10 @@
//
#include "config.h"
#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
#include
#include
#include "x_opengl.h"
@@ -112,7 +112,7 @@ void mouse_click_move(int x, int y){
static void maybe_render() {
int new_xpos, new_ypos, new_width, new_height;
static int size_changed = 0;
-
+
new_xpos = glutGet(GLUT_WINDOW_X);
new_ypos = glutGet(GLUT_WINDOW_Y);
new_width = glutGet(GLUT_WINDOW_WIDTH);
@@ -127,9 +127,9 @@ static void maybe_render() {
#endif
glutSwapBuffers();
if (! fullscreen) {
- // If user has changed window size, wait until it stops
+ // If user has changed window size, wait until it stops
// changing and then write the new dimensions to file
- if ((new_xpos != xpos) || (new_ypos != ypos) ||
+ if ((new_xpos != xpos) || (new_ypos != ypos) ||
(new_width != width) || (new_height != height)
) {
size_changed = 1;
@@ -151,7 +151,7 @@ static void maybe_render() {
fclose(f);
}
}
- } // End if (new size != previous size) else
+ } // End if (new size != previous size) else
} // End if (! fullscreen)
#ifdef __APPLE__
MacGLUTFix(fullscreen);
@@ -171,22 +171,22 @@ static void make_window(const char* title) {
get_window_title(window_title, 256);
}
- win = glutCreateWindow(window_title);
+ win = glutCreateWindow(window_title);
glutReshapeFunc(app_graphics_resize);
glutKeyboardFunc(keyboardD);
glutKeyboardUpFunc(keyboardU);
glutMouseFunc(mouse_click);
glutMotionFunc(mouse_click_move);
- glutDisplayFunc(maybe_render);
+ glutDisplayFunc(maybe_render);
glEnable(GL_DEPTH_TEST);
app_graphics_init();
-
+
#ifdef __APPLE__
glutWMCloseFunc(boinc_close_window_and_quit_aux); // Enable the window's close box
BringAppToFront();
// Show window only after a successful call to throttled_app_render();
- // this avoids momentary display of old image when screensaver restarts
+ // this avoids momentary display of old image when screensaver restarts
// which made image appear to "jump."
need_show = true;
#endif
@@ -210,9 +210,9 @@ static void boinc_glut_init(int *argc, char** argv) {
}
glutInit (argc, argv);
- glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_ALPHA);
+ glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_ALPHA);
glutInitWindowPosition(xpos, ypos);
- glutInitWindowSize(width, height);
+ glutInitWindowSize(width, height);
}
static void timer_handler(int) {
@@ -248,7 +248,7 @@ void boinc_graphics_loop(int argc, char** argv, const char* title) {
}
boinc_glut_init(&argc, argv);
make_window(title);
- glutTimerFunc(TIMER_INTERVAL_MSEC, timer_handler, 0);
+ glutTimerFunc(TIMER_INTERVAL_MSEC, timer_handler, 0);
#ifdef __APPLE__
// Apparently glut changed our working directory in OS 10.3.9
chdir(dir);
diff --git a/api/graphics2_win.cpp b/api/graphics2_win.cpp
index 2c748b0a137..63f29898e81 100644
--- a/api/graphics2_win.cpp
+++ b/api/graphics2_win.cpp
@@ -250,19 +250,19 @@ LRESULT CALLBACK WndProc(
case WM_ERASEBKGND:
return 0;
case WM_KEYDOWN:
- if(!window_ready) return 0;
+ if(!window_ready) return 0;
if (fullscreen) {
boinc_close_window_and_quit("key down");
- } else {
+ } else {
boinc_app_key_press((int)wParam, (int)lParam);
}
return 0;
case WM_KEYUP:
- if(!window_ready) return 0;
+ if(!window_ready) return 0;
if (fullscreen) {
boinc_close_window_and_quit("key up");
} else {
- boinc_app_key_release((int)wParam, (int)lParam);
+ boinc_app_key_release((int)wParam, (int)lParam);
}
return 0;
case WM_LBUTTONDOWN:
@@ -271,7 +271,7 @@ LRESULT CALLBACK WndProc(
case WM_LBUTTONUP:
case WM_MBUTTONUP:
case WM_RBUTTONUP:
- if(!window_ready) return 0;
+ if(!window_ready) return 0;
if (fullscreen) {
boinc_close_window_and_quit("button up");
@@ -286,8 +286,8 @@ LRESULT CALLBACK WndProc(
}
return 0;
case WM_MOUSEMOVE:
- if(!window_ready) return 0;
- if (fullscreen) {
+ if(!window_ready) return 0;
+ if (fullscreen) {
if((int)(short)LOWORD(lParam) != mousePos.x || (int)(short)HIWORD(lParam) != mousePos.y) {
boinc_close_window_and_quit("mouse move");
}
@@ -323,8 +323,8 @@ LRESULT CALLBACK WndProc(
visible = FALSE;
} else {
visible = TRUE;
- }
- if(!window_ready) return 0;
+ }
+ if(!window_ready) return 0;
app_graphics_resize(LOWORD(lParam), HIWORD(lParam));
return 0;
}
@@ -381,10 +381,10 @@ static VOID CALLBACK timer_handler(HWND, UINT, UINT, DWORD) {
if (throttled_app_render(width, height, dtime())) {
SwapBuffers(win_dc);
if (!fullscreen) {
- // If user has changed window size, wait until it stops
+ // If user has changed window size, wait until it stops
// changing and then write the new dimensions to file
//
- if ((rt.left != rect.left) || (rt.top != rect.top) ||
+ if ((rt.left != rect.left) || (rt.top != rect.top) ||
(rt.right != rect.right) || (rt.bottom != rect.bottom)
) {
if (IsZoomed(window)) return;
@@ -407,7 +407,7 @@ static VOID CALLBACK timer_handler(HWND, UINT, UINT, DWORD) {
fclose(f);
}
}
- } // End if (new size != previous size) else
+ } // End if (new size != previous size) else
}
}
}
@@ -436,7 +436,7 @@ void boinc_graphics_loop(int argc, char** argv, const char* title) {
//
reg_win_class();
- wglMakeCurrent(NULL,NULL);
+ wglMakeCurrent(NULL,NULL);
make_window(title);
// Create a timer thread to do rendering
diff --git a/api/graphics_api.h b/api/graphics_api.h
index 314bbea57fc..bcc886902fd 100644
--- a/api/graphics_api.h
+++ b/api/graphics_api.h
@@ -31,7 +31,7 @@ extern int boinc_init_graphics(WORKER_FUNC_PTR);
extern void app_graphics_render(int xs, int ys, double time_of_day);
extern void app_graphics_init(void);
// called each time a window is opened;
- // called in the graphics thread
+ // called in the graphics thread
extern void app_graphics_reread_prefs(void);
// called when get REREAD_PREFS message from core client.
// called in the graphics thread
@@ -43,7 +43,7 @@ extern void boinc_app_key_release(int, int);
extern void boinc_suspend_graphics_thread(void);
extern void boinc_resume_graphics_thread(void);
-// C++ API follows here
+// C++ API follows here
#ifdef __cplusplus
} // end extern "C"
diff --git a/api/graphics_impl.cpp b/api/graphics_impl.cpp
index af6236f0780..905250c043d 100644
--- a/api/graphics_impl.cpp
+++ b/api/graphics_impl.cpp
@@ -117,27 +117,27 @@ static int start_worker_thread(
//
retval = pthread_attr_init(&worker_thread_attr);
if (retval) return ERR_THREAD;
-
+
retval = pthread_attr_getschedparam(&worker_thread_attr, ¶m);
if (retval) return ERR_THREAD;
-
+
// Note: this sets the scheduling policy for the worker thread to
// be the same as the scheduling policy of the main thread.
// This may not be a wise choice.
//
retval = pthread_attr_getschedpolicy(&worker_thread_attr, ¤tpolicy);
if (retval) return ERR_THREAD;
-
+
minpriority = sched_get_priority_min(currentpolicy);
if (minpriority == -1) return ERR_THREAD;
-
+
param.sched_priority = minpriority;
retval = pthread_attr_setschedparam(&worker_thread_attr, ¶m);
if (retval) return ERR_THREAD;
// initialize ID of calling thread (the graphics-thread!)
graphics_thread = pthread_self();
-
+
// set worker stack size if specified
//
if (options.worker_thread_stack_size) {
diff --git a/api/graphics_lib.cpp b/api/graphics_lib.cpp
index 15b1eb86f3c..00be328f196 100644
--- a/api/graphics_lib.cpp
+++ b/api/graphics_lib.cpp
@@ -32,7 +32,7 @@
#include
#include
-#include "boinc_api.h"
+#include "boinc_api.h"
#include "graphics_api.h"
#include "graphics_impl.h"
#include "graphics_lib.h"
@@ -84,7 +84,7 @@ int boinc_init_options_graphics_lib(
}
strlcpy(graphics_lib, ptr, sizeof(graphics_lib));
strlcat(graphics_lib, ".so", sizeof(graphics_lib));
-
+
// boinc-resolve library name: it could be a XML symlink
//
if (boinc_resolve_filename(graphics_lib, resolved_name, MAXPATHLEN)) {
@@ -100,7 +100,7 @@ int boinc_init_options_graphics_lib(
if (!strcmp(graphics_lib, resolved_name)) {
snprintf(resolved_name, sizeof(resolved_name), "./%s", graphics_lib);
}
-
+
// get handle for shared library.
// This handle is a global variable, so it can be declared 'extern'
// in worker() and thus worker() has access to functions
@@ -114,7 +114,7 @@ int boinc_init_options_graphics_lib(
);
goto no_graphics;
}
-
+
// use handle from shared library to resolve the 'initialize
// graphics' routine from shared library
//
@@ -137,18 +137,18 @@ int boinc_init_options_graphics_lib(
retval = boinc_init_options_graphics_impl_hook(
opt, worker, &boinc_main_state
);
-
+
if (retval) {
fprintf(stderr,
"boinc_init_options_graphics_impl() returned %d: unable to create worker thread\n",
retval
);
}
-
+
boinc_finish(retval);
// never get here...
return 1;
-
+
no_graphics:
// unable to resolve the shared object file, or unable to resolve
// library dependencies on machine (eg, no X11, no GL libraries,
@@ -156,7 +156,7 @@ int boinc_init_options_graphics_lib(
//
boinc_init_options(&opt);
worker();
-
+
// worker() should call boinc_finish so we should NEVER get here!
//
boinc_finish(1);
diff --git a/api/gutil_text.cpp b/api/gutil_text.cpp
index a6483ed593b..ff4407ddd30 100644
--- a/api/gutil_text.cpp
+++ b/api/gutil_text.cpp
@@ -232,8 +232,8 @@ void draw_text_right(
}
-MOVING_TEXT_PANEL::MOVING_TEXT_PANEL() :
- theta(0), dtheta(0), color(0), char_height(0), line_width(0), line_spacing(0), margin(0)
+MOVING_TEXT_PANEL::MOVING_TEXT_PANEL() :
+ theta(0), dtheta(0), color(0), char_height(0), line_width(0), line_spacing(0), margin(0)
{
int i;
for (i=0;i<3;i++) {
diff --git a/api/macglutfix.m b/api/macglutfix.m
index d237cf5a770..2953b10c1b9 100644
--- a/api/macglutfix.m
+++ b/api/macglutfix.m
@@ -39,7 +39,7 @@
extern bool fullscreen; // set in graphics2_unix.cpp
-// For unknown reason, "boinc_api.h" gets a compile
+// For unknown reason, "boinc_api.h" gets a compile
// error here so just declare boinc_is_standalone()
//#include "boinc_api.h"
extern int boinc_is_standalone(void);
@@ -49,8 +49,8 @@
void BringAppToFront(void);
int compareOSVersionTo(int toMajor, int toMinor);
-// The standard ScreenSaverView class actually sets the window
-// level to 2002, not the 1000 defined by NSScreenSaverWindowLevel
+// The standard ScreenSaverView class actually sets the window
+// level to 2002, not the 1000 defined by NSScreenSaverWindowLevel
// and kCGScreenSaverWindowLevel
#define RealSaverLevel 2002
// Glut sets the window level to 100 when it sets full screen mode
@@ -76,7 +76,7 @@ void MacGLUTFix(bool isScreenSaver) {
if (count == 2) ClearDocumentEditedDot();
if (count++ > 2) return; // Do the code below only twice
-
+
if (! boinc_is_standalone()) {
if (emptyMenu == nil) {
emptyMenu = [ NSMenu alloc ];
@@ -91,20 +91,20 @@ void MacGLUTFix(bool isScreenSaver) {
myWindow = [ myView window ];
if (myWindow == nil)
return;
-
- // Retina displays have 2X2 pixels per point. When OpenGL / GLUT apps built
- // using Xcode 11 are run on a Retina display under OS 10.15, they fail to
- // adjust their pixel dimesions to double the window size, and so fill only
- // 1/4 of the window (display at half width and height) until they are
- // resized by calls to glutReshapeWindow(), glutFullScreen(). etc.
+
+ // Retina displays have 2X2 pixels per point. When OpenGL / GLUT apps built
+ // using Xcode 11 are run on a Retina display under OS 10.15, they fail to
+ // adjust their pixel dimesions to double the window size, and so fill only
+ // 1/4 of the window (display at half width and height) until they are
+ // resized by calls to glutReshapeWindow(), glutFullScreen(). etc.
// However, they work correctly when run on earlier versions of OS X.
//
- // OpenGL / GLUT apps built using earlier versions of Xcode do not have this
- // problem on OS 10.15, but glutReshapeWindow().
+ // OpenGL / GLUT apps built using earlier versions of Xcode do not have this
+ // problem on OS 10.15, but glutReshapeWindow().
//
- // We work around this by calling glutReshapeWindow() twice, restoring the
- // window's original size. This transparently fixes the problem when necessary
- // without actually changing the window's size, and does no harm when not
+ // We work around this by calling glutReshapeWindow() twice, restoring the
+ // window's original size. This transparently fixes the problem when necessary
+ // without actually changing the window's size, and does no harm when not
// necessary.
if (!isScreenSaver) {
@@ -115,9 +115,9 @@ void MacGLUTFix(bool isScreenSaver) {
} else {
glutReshapeWindow(requestedWidth, requestedHeight);
}
-
+
[myWindow setStyleMask:[myWindow styleMask] | NSWindowStyleMaskClosable];
-
+
return;
}
@@ -148,10 +148,10 @@ void ClearDocumentEditedDot(void) {
int set_realtime(int period, int computation, int constraint) {
mach_timebase_info_data_t timebase_info;
mach_timebase_info(&timebase_info);
-
+
const uint64_t NANOS_PER_MSEC = 1000000ULL;
double clock2abs = ((double)timebase_info.denom / (double)timebase_info.numer) * NANOS_PER_MSEC;
-
+
thread_time_constraint_policy_data_t policy;
policy.period = period;
policy.computation = (uint32_t)(computation * clock2abs); // computation ms of work
@@ -191,10 +191,10 @@ @interface ServerController : NSObject
{
NSMachPort *serverPort;
NSMachPort *localPort;
-
+
uint32_t serverPortName;
uint32_t localPortName;
-
+
NSMachPort *clientPort[16];
uint32_t clientPortNames[16];
uint32_t clientPortCount;
@@ -222,11 +222,11 @@ - (ServerController *)init
{
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(portDied:) name:NSPortDidBecomeInvalidNotification object:nil];
-
+
mach_port_t servicePortNum = MACH_PORT_NULL;
kern_return_t machErr;
char *portName = "edu.berkeley.boincsaver";
-
+
// NSMachBootstrapServer is deprecated in OS 10.13, so use bootstrap_look_up
// serverPort = [(NSMachPort *)([[NSMachBootstrapServer sharedInstance] servicePortWithName:@"edu.berkeley.boincsaver"]) retain];
machErr = bootstrap_check_in(bootstrap_port, portName, &servicePortNum);
@@ -234,10 +234,10 @@ - (ServerController *)init
[NSApp terminate:self];
}
serverPort = (NSMachPort*)[NSMachPort portWithMachPort:servicePortNum];
-
+
// Create a local dummy reply port to use with the mig reply stuff
localPort = [[NSMachPort alloc] init];
-
+
// Retrieve raw mach port names.
serverPortName = [serverPort machPort];
localPortName = [localPort machPort];
@@ -267,7 +267,7 @@ - (void)portDied:(NSNotification *)notification
[NSApp terminate:self];
}
else
- {
+ {
int i;
for(i = 0; i < clientPortCount+1; i++)
{
@@ -284,10 +284,10 @@ - (void)portDied:(NSNotification *)notification
- (void)handleMachMessage:(void *)msg
{
union __ReplyUnion___MGCMGSServer_subsystem reply;
-
+
mach_msg_header_t *reply_header = (void *)&reply;
kern_return_t kr;
-
+
if(MGSServer_server(msg, reply_header) && reply_header->msgh_remote_port != MACH_PORT_NULL)
{
kr = mach_msg(reply_header, MACH_SEND_MSG, reply_header->msgh_size, 0, MACH_PORT_NULL,
@@ -298,11 +298,11 @@ - (void)handleMachMessage:(void *)msg
}
- (kern_return_t)checkInClient:(mach_port_t)client_port index:(int32_t *)client_index
-{
+{
clientPortCount++; // clients always start at index 1
clientPortNames[clientPortCount] = client_port;
clientPort[clientPortCount] = [[NSMachPort alloc] initWithMachPort:client_port];
-
+
*client_index = clientPortCount;
return 0;
}
@@ -333,16 +333,16 @@ - (void)sendIOSurfaceMachPortToClients:(uint32_t)index withMachPort:(mach_port_t
@end
-// OpenGL / GLUT apps which call glutFullScreen() and are built using
-// Xcode 11 apparently use window dimensions based on the number of
-// backing store pixels. That is, they double the window dimensions
-// for Retina displays (which have 2X2 pixels per point.) But OpenGL
+// OpenGL / GLUT apps which call glutFullScreen() and are built using
+// Xcode 11 apparently use window dimensions based on the number of
+// backing store pixels. That is, they double the window dimensions
+// for Retina displays (which have 2X2 pixels per point.) But OpenGL
// apps built under earlier versions of Xcode don't.
//
-// OS 10.15 Catalina assumes OpenGL / GLUT apps work as built under
-// Xcode 11, so it displays older builds at half width and height,
-// unless we compensate in our code. To ensure that BOINC graphics apps
-// built on all versions of Xcode work properly on all versions of OS X,
+// OS 10.15 Catalina assumes OpenGL / GLUT apps work as built under
+// Xcode 11, so it displays older builds at half width and height,
+// unless we compensate in our code. To ensure that BOINC graphics apps
+// built on all versions of Xcode work properly on all versions of OS X,
// we set the IOSurface dimensions in this module to the viewportRect
// dimensions.
//
@@ -377,13 +377,13 @@ void MacPassOffscreenBufferToScreenSaver() {
ioSurfaceMachPorts[i] = IOSurfaceCreateMachPort(ioSurfaceBuffers[i]);
}
}
-
+
if(!textureNames[currentFrameIndex])
{
CGLContextObj cgl_ctx = (CGLContextObj)[myContext CGLContextObj];
-
+
glGenTextures(1, &name);
-
+
glBindTexture(GL_TEXTURE_RECTANGLE, name);
// At the moment, CGLTexImageIOSurface2D requires the GL_TEXTURE_RECTANGLE target
CGLTexImageIOSurface2D(cgl_ctx, GL_TEXTURE_RECTANGLE, GL_RGBA, w, h, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
@@ -392,10 +392,10 @@ void MacPassOffscreenBufferToScreenSaver() {
glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
+
// Generate an FBO and bind the texture to it as a render target.
glBindTexture(GL_TEXTURE_RECTANGLE, 0);
-
+
glGenFramebuffers(1, &namef);
glBindFramebuffer(GL_FRAMEBUFFER, namef);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_RECTANGLE, name, 0);
@@ -468,7 +468,7 @@ int compareOSVersionTo(int toMajor, int toMinor) {
p1 = strchr(vers, '.');
minor = atoi(p1+1);
}
-
+
if (major < toMajor) return -1;
if (major > toMajor) return 1;
// if (major == toMajor) compare minor version numbers
@@ -520,7 +520,7 @@ void print_to_log_file(const char *format, ...) {
va_start(args, format);
vfprintf(f, format, args);
va_end(args);
-
+
fputs("\n", f);
fflush(f);
fclose(f);
diff --git a/api/make_app_icon_h.cpp b/api/make_app_icon_h.cpp
index cb91968556a..62a9c0bceb7 100644
--- a/api/make_app_icon_h.cpp
+++ b/api/make_app_icon_h.cpp
@@ -16,7 +16,7 @@
// along with BOINC. If not, see .
// make_app_icon_h.C
-// Utility to convert *.icns file into app_icon.h file for use
+// Utility to convert *.icns file into app_icon.h file for use
// with api/setMacIcon() in science applications.
// THIS CODE IS OBSOLETE! A better way to add an icon to science applications
@@ -43,20 +43,20 @@ int main(int argc, char** argv) {
puts ("usage: make_app_icon_h source_path dest_path\n");
return 0;
}
-
+
inFile = fopen(argv[1], "rb");
if (inFile == NULL) {
printf ("Couldn't open input file %s\n", argv[1]);
return 0;
}
-
+
outFile = fopen(argv[2], "w");
if (outFile == NULL) {
printf ("Couldn't create output file %s\n", argv[2]);
fclose(inFile);
return 0;
}
-
+
fputs("char MacAppIconData[] = {\n\t", outFile);
count = 16;
c = getc(inFile);
@@ -66,9 +66,9 @@ int main(int argc, char** argv) {
fclose(outFile);
return 0;
}
-
+
fprintf(outFile, "0X%02X", c);
-
+
while ((c = getc(inFile)) != EOF) {
if (--count)
fputs(",", outFile);
@@ -76,14 +76,14 @@ int main(int argc, char** argv) {
fputs(",\n\t", outFile);
count = 16;
}
-
+
fprintf(outFile, "0X%02X", c);
}
-
+
fputs("\n};\n", outFile);
fclose(inFile);
fclose(outFile);
-
+
return retval;
}
-
+
diff --git a/api/reduce.h b/api/reduce.h
index f75403ad73e..94f59e6cf59 100644
--- a/api/reduce.h
+++ b/api/reduce.h
@@ -116,7 +116,7 @@ struct REDUCED_ARRAY_RENDER: REDUCED_ARRAY_DATA {
void draw_part(double frac);
void draw_axes();
void draw_axis_labels();
- void draw_labels();
+ void draw_labels();
};
#endif
diff --git a/api/reduce_lib.cpp b/api/reduce_lib.cpp
index ca4494e5634..6dfe9c02540 100644
--- a/api/reduce_lib.cpp
+++ b/api/reduce_lib.cpp
@@ -147,7 +147,7 @@ void REDUCED_ARRAY_RENDER::draw_row_rect_x(int row) {
glVertex3f(x1, y0, z0);
glVertex3f(x1, y1, z0);
glVertex3f(x0, y1, z0);
-
+
//back
glVertex3f(x0, y0, z1);
glVertex3f(x1, y0, z1);
diff --git a/api/ttfont.cpp b/api/ttfont.cpp
index 3a310bc0c2f..2fc049c0478 100644
--- a/api/ttfont.cpp
+++ b/api/ttfont.cpp
@@ -43,17 +43,17 @@
// I put in it's own namespace so call TTFont::ttf_load_fonts() etc
//
-namespace TTFont {
+namespace TTFont {
-// The Liberation version 2.00.0 fonts referenced below are free
-// fonts under the SIL Open Font License version 1.1. You can
+// The Liberation version 2.00.0 fonts referenced below are free
+// fonts under the SIL Open Font License version 1.1. You can
// download the license and fonts from
// https://fedorahosted.org/liberation-fonts
//
-// Another source of free fonts is the GNU FreeFont project
+// Another source of free fonts is the GNU FreeFont project
// at http://www.gnu.org/software/freefont
-// you'll want to define a 2-d array of char as appropriate for your
+// you'll want to define a 2-d array of char as appropriate for your
// truetype font filenames (path is set in the call to ttf_load_fonts)
//
static const char *g_cstrFont[] = {
@@ -70,7 +70,7 @@ static const char *g_cstrFont[] = {
"LiberationMono-Italic.ttf", // 10
"LiberationMono-BoldItalic.ttf" // 11
};
-
+
// define the number of fonts supported
#define NUM_FONT (sizeof(g_cstrFont) / sizeof(char*))
@@ -127,7 +127,7 @@ void ttf_load_fonts(
}
#endif
}
- }
+ }
}
// remove our objects
diff --git a/api/windows_opengl.cpp b/api/windows_opengl.cpp
index cd1b16da2d5..1aed36d2774 100644
--- a/api/windows_opengl.cpp
+++ b/api/windows_opengl.cpp
@@ -181,7 +181,7 @@ static void make_new_window() {
SetFocus(hWnd);
app_graphics_init();
- app_graphics_resize(width, height);
+ app_graphics_resize(width, height);
window_ready=true;
}
@@ -215,15 +215,15 @@ static void set_mode(int mode) {
if (!is_windows_9x) {
GetUserObjectInformation(
- GetProcessWindowStation(),
- UOI_NAME,
+ GetProcessWindowStation(),
+ UOI_NAME,
current_desktop.window_station,
(sizeof(current_desktop.window_station) / sizeof(char)),
NULL
);
GetUserObjectInformation(
- GetThreadDesktop(GetCurrentThreadId()),
- UOI_NAME,
+ GetThreadDesktop(GetCurrentThreadId()),
+ UOI_NAME,
current_desktop.desktop,
(sizeof(current_desktop.desktop) / sizeof(char)),
NULL
@@ -231,7 +231,7 @@ static void set_mode(int mode) {
}
if (!is_windows_9x &&
- !boinc_is_standalone() &&
+ !boinc_is_standalone() &&
strlen(graphics_msg.window_station) > 0 &&
strlen(graphics_msg.desktop) > 0 &&
(strcmp(current_desktop.window_station, graphics_msg.window_station) ||
@@ -278,7 +278,7 @@ static void set_mode(int mode) {
}
}
}
-
+
current_graphics_mode = new_mode;
if (new_mode != MODE_HIDE_GRAPHICS && new_mode != MODE_UNSUPPORTED) {
make_new_window();
@@ -309,19 +309,19 @@ LRESULT CALLBACK WndProc(
case WM_ERASEBKGND: // Check To See If Windows Is Trying To Erase The Background
return 0;
case WM_KEYDOWN:
- if(!window_ready) return 0;
+ if(!window_ready) return 0;
if (current_graphics_mode == MODE_FULLSCREEN) {
set_mode(MODE_HIDE_GRAPHICS);
- } else {
+ } else {
boinc_app_key_press((int)wParam, (int)lParam);
}
return 0;
case WM_KEYUP:
- if(!window_ready) return 0;
+ if(!window_ready) return 0;
if (current_graphics_mode == MODE_FULLSCREEN) {
set_mode(MODE_HIDE_GRAPHICS);
} else {
- boinc_app_key_release((int)wParam, (int)lParam);
+ boinc_app_key_release((int)wParam, (int)lParam);
}
return 0;
case WM_LBUTTONDOWN:
@@ -330,7 +330,7 @@ LRESULT CALLBACK WndProc(
case WM_LBUTTONUP:
case WM_MBUTTONUP:
case WM_RBUTTONUP:
- if(!window_ready) return 0;
+ if(!window_ready) return 0;
if (current_graphics_mode == MODE_FULLSCREEN) {
set_mode(MODE_HIDE_GRAPHICS);
@@ -344,10 +344,10 @@ LRESULT CALLBACK WndProc(
}
return 0;
case WM_MOUSEMOVE:
- if(!window_ready) return 0;
+ if(!window_ready) return 0;
POINT cPos;
GetCursorPos(&cPos);
- if (current_graphics_mode == MODE_FULLSCREEN) {
+ if (current_graphics_mode == MODE_FULLSCREEN) {
if(cPos.x != mousePos.x || cPos.y != mousePos.y) {
set_mode(MODE_HIDE_GRAPHICS);
}
@@ -374,7 +374,7 @@ LRESULT CALLBACK WndProc(
set_mode(MODE_HIDE_GRAPHICS);
suspend_activities();
return TRUE;
- }
+ }
if (PBT_APMQUERYSUSPENDFAILED == wParam || PBT_APMRESUMESUSPEND == wParam) {
set_mode(acked_graphics_mode);
restore_activities();
@@ -388,7 +388,7 @@ LRESULT CALLBACK WndProc(
PAINTSTRUCT ps;
RECT winRect;
HDC pdc;
- if (!graphics_threadh) graphics_threadh=(HANDLE)GetCurrentThreadId();
+ if (!graphics_threadh) graphics_threadh=(HANDLE)GetCurrentThreadId();
pdc = BeginPaint(hWnd, &ps);
GetClientRect(hWnd, &winRect);
FillRect(pdc, &winRect, (HBRUSH)GetStockObject(BLACK_BRUSH));
@@ -399,8 +399,8 @@ LRESULT CALLBACK WndProc(
visible = FALSE;
} else {
visible = TRUE;
- }
- if(!window_ready) return 0;
+ }
+ if(!window_ready) return 0;
app_graphics_resize(LOWORD(lParam), HIWORD(lParam));
return 0;
case WM_SHUTDOWNGFX:
@@ -510,7 +510,7 @@ void win_graphics_event_loop() {
// Get platform information
//
- OSVERSIONINFO osvi;
+ OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof(osvi);
GetVersionEx(&osvi);
is_windows_9x = (osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS);
diff --git a/api/x_opengl.cpp b/api/x_opengl.cpp
index d818813d93f..1d9ef50dcae 100644
--- a/api/x_opengl.cpp
+++ b/api/x_opengl.cpp
@@ -19,9 +19,9 @@
#include "config.h"
#include
-#include
-#include
-#include
+#include
+#include
+#include
#include
#include
#include
@@ -106,7 +106,7 @@ static bool suspend_render = false;
// If running freeglut, also get the version.
//
#ifdef __APPLE__
-static bool glut_is_freeglut = false; // Avoid warning message to stderr from glutGet(GLUT_VERSION)
+static bool glut_is_freeglut = false; // Avoid warning message to stderr from glutGet(GLUT_VERSION)
static bool need_show = false;
#else
static bool glut_is_freeglut = true;
@@ -119,7 +119,7 @@ static int glut_version = 0;
// hide/show it as necessary.
//
static int fg_window_state; // values same as mode
-static bool fg_window_is_fullscreen;
+static bool fg_window_is_fullscreen;
static jmp_buf jbuf; // longjump/setjump for exit/signal handler
static struct sigaction original_signal_handler; // store previous ABRT signal-handler
@@ -134,14 +134,14 @@ extern pthread_t worker_thread;
// possible longjmp-values to signal from where we jumped:
//
-enum {
+enum {
JUMP_NONE = 0,
JUMP_EXIT,
JUMP_ABORT,
JUMP_LAST
};
// 1= exit caught by atexit, 2 = signal caught by handler
-
+
int xwin_glut_is_initialized() {
return glut_is_initialized;
}
@@ -193,7 +193,7 @@ void mouse_click_move(int x, int y){
}
}
-// maybe_render() can be called directly by GLUT when a window is
+// maybe_render() can be called directly by GLUT when a window is
// uncovered, so we let that happen even if suspend_render is true.
static void maybe_render() {
int width, height;
@@ -273,14 +273,14 @@ static void make_new_window(int mode) {
}
fg_window_state = MODE_WINDOW;
}
-
+
#ifdef __APPLE__
if (win)
have_window = true;
#endif
if (!have_window) {
- win = glutCreateWindow(window_title);
+ win = glutCreateWindow(window_title);
if (debug) fprintf(stderr, "glutCreateWindow() succeeded. win = %d\n", win);
glutReshapeFunc(app_graphics_resize);
@@ -288,17 +288,17 @@ static void make_new_window(int mode) {
glutKeyboardUpFunc(keyboardU);
glutMouseFunc(mouse_click);
glutMotionFunc(mouse_click_move);
- glutDisplayFunc(maybe_render);
+ glutDisplayFunc(maybe_render);
glEnable(GL_DEPTH_TEST);
-
+
app_graphics_init();
}
-
+
#ifdef __APPLE__
glutWMCloseFunc(CloseWindow); // Enable the window's close box
BringAppToFront();
- // Show window only after a successful call to throttled_app_render();
- // this avoids momentary display of old image when screensaver restarts
+ // Show window only after a successful call to throttled_app_render();
+ // this avoids momentary display of old image when screensaver restarts
// which made image appear to "jump."
need_show = true;
#endif
@@ -324,17 +324,17 @@ static void boinc_glut_init() {
const char* args[2] = {"screensaver", NULL};
int one=1;
static bool first = true;
-
+
win = 0;
if (debug) fprintf(stderr, "Calling glutInit()... \n");
glutInit (&one, (char**)args);
if (debug) fprintf(stderr, "survived glutInit(). \n");
// figure out whether we're running GLUT or freeglut.
- //
+ //
// note - glutGet(GLUT_VERSION) is supported in freeglut,
// other GLUT returns -1 and outputs a warning
- // message to stderr.
+ // message to stderr.
// - must be after glutInit or will get SIGABRT
//
if (first) {
@@ -353,9 +353,9 @@ static void boinc_glut_init() {
}
}
- glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
+ glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowPosition(xpos, ypos);
- glutInitWindowSize(600, 400);
+ glutInitWindowSize(600, 400);
g_bmsp->boinc_get_init_data_hook(aid);
if (!strlen(aid.app_name)) {
strlcpy(aid.app_name, "BOINC Application", sizeof(aid.app_name));
@@ -386,18 +386,18 @@ void KillWindow() {
xpos = glutGet(GLUT_WINDOW_X);
ypos = glutGet(GLUT_WINDOW_Y);
} else {
- // If fullscreen, resize now to avoid ugly flash if we subsequently
+ // If fullscreen, resize now to avoid ugly flash if we subsequently
// redisplay as MODE_WINDOW.
glutPositionWindow(xpos, ypos);
glutReshapeWindow(win_width, win_height);
}
-
- // On Intel Macs (but not on PowerPC Macs) GLUT's destructors often crash when
+
+ // On Intel Macs (but not on PowerPC Macs) GLUT's destructors often crash when
// glutDestroyWindow() is called. So far, this has only been reported for
- // SETI@home. Since it doesn't occur on PowerPC Macs, we suspect a bug in GLUT.
- // To work around this, we just hide the window instead. Though this does not
- // free up RAM and VM used by the graphics, glutDestroyWindow() doesn't free
- // them either (surprisingly), so there is no additional penalty for doing it
+ // SETI@home. Since it doesn't occur on PowerPC Macs, we suspect a bug in GLUT.
+ // To work around this, we just hide the window instead. Though this does not
+ // free up RAM and VM used by the graphics, glutDestroyWindow() doesn't free
+ // them either (surprisingly), so there is no additional penalty for doing it
// this way.
glutHideWindow();
#else
@@ -409,7 +409,7 @@ void KillWindow() {
glutDestroyWindow(oldwin);
}
#endif
- }
+ }
}
void set_mode(int mode) {
@@ -423,7 +423,7 @@ void set_mode(int mode) {
// glutPopWindow();
glutShowWindow();
}
-#endif
+#endif
}
return;
}
@@ -434,9 +434,9 @@ void set_mode(int mode) {
KillWindow();
if (debug) fprintf(stderr, "KillWindow() survived.\n");
}
-
+
if (mode != MODE_HIDE_GRAPHICS) {
- if (debug) fprintf(stderr, "set_mode(): Calling make_new_window(%d)\n", mode);
+ if (debug) fprintf(stderr, "set_mode(): Calling make_new_window(%d)\n", mode);
make_new_window(mode);
if (debug) fprintf(stderr, "make_new_window() survived.\n");
}
@@ -527,7 +527,7 @@ void restart() {
// if we are standalone and glut was initialized,
// we assume user pressed 'close', and we exit the app
//
- //
+ //
if (glut_is_initialized ) {
if (boinc_is_standalone()) {
if (debug) fprintf(stderr,
@@ -629,7 +629,7 @@ void xwin_graphics_event_loop() {
if (glut_is_initialized && glut_is_freeglut) {
if (1 == (glut_is_initialized = FREEGLUT_IS_INITIALIZED)) {
if (!GLUT_HAVE_WINDOW) {
- win = 0;
+ win = 0;
}
}
}
@@ -642,7 +642,7 @@ void xwin_graphics_event_loop() {
} else {
// open the graphics-window
set_mode(MODE_WINDOW);
- glutTimerFunc(TIMER_INTERVAL_MSEC, timer_handler, 0);
+ glutTimerFunc(TIMER_INTERVAL_MSEC, timer_handler, 0);
}
} else {
if (!glut_is_initialized) {
diff --git a/api/x_opengl.h b/api/x_opengl.h
index 18cc7f9d51f..eecbf05fff5 100644
--- a/api/x_opengl.h
+++ b/api/x_opengl.h
@@ -22,7 +22,7 @@
extern "C" {
#endif
-extern int xwin_glut_is_initialized();
+extern int xwin_glut_is_initialized();
#ifdef __APPLE__
extern void MacGLUTFix(bool isScreenSaver);
diff --git a/ci_tools/source_code_check.py b/ci_tools/source_code_check.py
index 4a1c9e53527..03833465023 100644
--- a/ci_tools/source_code_check.py
+++ b/ci_tools/source_code_check.py
@@ -39,40 +39,40 @@ def check(directory, bytes_to_check, exclude_dirs, exclude_extensions, exclude_f
exclude_dirs = [
os.path.join(directory, ".git"),
- os.path.join(directory, "3rdParty/android"),
- os.path.join(directory, "3rdParty/buildCache"),
- os.path.join(directory, "3rdParty/linux"),
- os.path.join(directory, "3rdParty/Windows"),
- os.path.join(directory, "android/BOINC/.gradle"),
- os.path.join(directory, "android/BOINC/app/build"),
- os.path.join(directory, "android/BOINC/app/src/main/assets"),
- os.path.join(directory, "android/BOINC/app/src/main/res"),
- os.path.join(directory, "doc/manpages"),
- os.path.join(directory, "drupal/sites/all/libraries"),
- os.path.join(directory, "drupal/sites/all/themes"),
- os.path.join(directory, "drupal/sites/default/boinc/modules/contrib"),
- os.path.join(directory, "drupal/sites/default/boinc/themes"),
+ os.path.join(directory, "3rdParty", "android"),
+ os.path.join(directory, "3rdParty", "buildCache"),
+ os.path.join(directory, "3rdParty", "linux"),
+ os.path.join(directory, "3rdParty", "Windows"),
+ os.path.join(directory, "android", "BOINC", ".gradle"),
+ os.path.join(directory, "android", "BOINC", "app", "build"),
+ os.path.join(directory, "android", "BOINC", "app", "src", "main", "assets"),
+ os.path.join(directory, "android", "BOINC", "app", "src", "main", "res"),
+ os.path.join(directory, "doc", "manpages"),
+ os.path.join(directory, "drupal", "sites", "all", "libraries"),
+ os.path.join(directory, "drupal", "sites", "all", "themes"),
+ os.path.join(directory, "drupal", "sites", "default", "boinc", "modules", "contrib"),
+ os.path.join(directory, "drupal", "sites", "default", "boinc", "themes"),
os.path.join(directory, "fastlane"),
- os.path.join(directory, "samples/example_app/bin"),
+ os.path.join(directory, "samples", "example_app", "bin"),
]
exclude_files = [
os.path.join(directory, "aclocal.m4"),
- os.path.join(directory, "client/boinc_client"),
- os.path.join(directory, "client/boinccmd"),
- os.path.join(directory, "client/boinc"),
- os.path.join(directory, "client/switcher"),
- os.path.join(directory, "clientgui/BOINCBaseView.cpp"),
- os.path.join(directory, "clientscr/progress/simt"),
- os.path.join(directory, "drupal/sites/default/boinc/modules/boinc_solr_search/boinc_solr_comments/README.txt"),
- os.path.join(directory, "drupal/sites/default/boinc/modules/boinc_solr_search/boinc_solr_comments/INSTALL.txt"),
- os.path.join(directory, "html/inc/GeoIP.dat"),
- os.path.join(directory, "mac_installer/BOINC.pmproj"),
- os.path.join(directory, "mac_build/boinc.xcodeproj/project.pbxproj"),
- os.path.join(directory, "stage/usr/local/bin/boinc_client"),
- os.path.join(directory, "stage/usr/local/bin/boinccmd"),
- os.path.join(directory, "stage/usr/local/bin/boinc"),
- os.path.join(directory, "stage/usr/local/bin/switcher"),
+ os.path.join(directory, "client", "boinc_client"),
+ os.path.join(directory, "client", "boinccmd"),
+ os.path.join(directory, "client", "boinc"),
+ os.path.join(directory, "client", "switcher"),
+ os.path.join(directory, "clientgui", "BOINCBaseView.cpp"),
+ os.path.join(directory, "clientscr", "progress", "simt"),
+ os.path.join(directory, "drupal", "sites", "default", "boinc", "modules", "boinc_solr_search", "boinc_solr_comments", "README.txt"),
+ os.path.join(directory, "drupal", "sites", "default", "boinc", "modules", "boinc_solr_search", "boinc_solr_comments", "INSTALL.txt"),
+ os.path.join(directory, "html", "inc", "GeoIP.dat"),
+ os.path.join(directory, "mac_installer", "BOINC.pmproj"),
+ os.path.join(directory, "mac_build", "boinc.xcodeproj", "project.pbxproj"),
+ os.path.join(directory, "stage", "usr", "local", "bin", "boinc_client"),
+ os.path.join(directory, "stage", "usr", "local", "bin", "boinccmd"),
+ os.path.join(directory, "stage", "usr", "local", "bin", "boinc"),
+ os.path.join(directory, "stage", "usr", "local", "bin", "switcher"),
]
exclude_extensions = [
diff --git a/ci_tools/trailing_whitespaces_check.py b/ci_tools/trailing_whitespaces_check.py
new file mode 100644
index 00000000000..a90cbdb41bf
--- /dev/null
+++ b/ci_tools/trailing_whitespaces_check.py
@@ -0,0 +1,179 @@
+import os
+import pathlib
+import sys
+
+def help():
+ print('Usage:')
+ print('python trailing_whitespaces_check.py ')
+
+def check(directory, exclude_dirs, exclude_extensions, exclude_files, fix_errors=False):
+ if not os.path.isdir(directory):
+ return None
+
+ files_with_errors = []
+
+ for root, dirs, files in os.walk(directory, topdown=True):
+ dirs[:] = [d for d in dirs if os.path.join(root, d) not in exclude_dirs]
+ for filename in files:
+ if (pathlib.Path(filename).suffix in exclude_extensions):
+ continue
+ src_file = os.path.join(root, filename)
+ if (os.path.islink(src_file) or src_file in exclude_files):
+ continue
+ with open(src_file, "rb") as f:
+ if verbose:
+ print('Checking file: ' + src_file)
+ lines = f.read().splitlines()
+ count = 0
+ changed = False
+ for line in lines:
+ count += 1
+ if line.rstrip() != line:
+ if fix_errors:
+ lines[count - 1] = line.rstrip()
+ changed = True
+ else:
+ files_with_errors.append("{}:{}".format(src_file, count))
+ if changed:
+ print('Fixing file: ' + src_file + '...')
+ with open(src_file, "wb") as f:
+ f.write(str.encode(os.linesep).join(lines))
+ f.write(str.encode(os.linesep))
+ return files_with_errors
+
+
+if (len(sys.argv) < 2):
+ help()
+ sys.exit(1)
+
+verbose = False
+fix = False
+directory = sys.argv[1]
+
+for arg in sys.argv:
+ if arg == "--verbose":
+ verbose = True
+ continue
+ if arg == "--fix":
+ fix = True
+ continue
+
+exclude_dirs = [
+ os.path.join(directory, ".git"),
+ os.path.join(directory, ".github", "ISSUE_TEMPLATE"),
+ os.path.join(directory, "3rdParty", "android"),
+ os.path.join(directory, "3rdParty", "buildCache"),
+ os.path.join(directory, "3rdParty", "linux"),
+ os.path.join(directory, "3rdParty", "Windows"),
+ os.path.join(directory, "android", "BOINC", ".gradle"),
+ os.path.join(directory, "android", "BOINC", ".idea"),
+ os.path.join(directory, "android", "BOINC", "app", "build"),
+ os.path.join(directory, "android", "BOINC", "app", "src", "main", "assets"),
+ os.path.join(directory, "android", "BOINC", "app", "src", "main", "res"),
+ os.path.join(directory, "api", "ttf"),
+ os.path.join(directory, "coprocs", "NVIDIA", "include"),
+ os.path.join(directory, "doc", "manpages"),
+ os.path.join(directory, "drupal", "sites", "all", "libraries"),
+ os.path.join(directory, "drupal", "sites", "all", "themes"),
+ os.path.join(directory, "drupal", "sites", "default", "boinc", "modules", "contrib"),
+ os.path.join(directory, "drupal", "sites", "default", "boinc", "modules", "boincstats", "includes", "pchart"),
+ os.path.join(directory, "drupal", "sites", "default", "boinc", "themes", "boinc", "webfonts"),
+ os.path.join(directory, "html", "inc", "password_compat"),
+ os.path.join(directory, "html", "inc", "random_compat"),
+ os.path.join(directory, "html", "inc", "ReCaptcha"),
+ os.path.join(directory, "locale"),
+ os.path.join(directory, "samples", "example_app", "bin"),
+ os.path.join(directory, "samples", "gfx_html"),
+ os.path.join(directory, "samples", "glut"),
+ os.path.join(directory, "samples", "image_libs"),
+ os.path.join(directory, "samples", "jpeglib"),
+ os.path.join(directory, "tests", "old"),
+ os.path.join(directory, "win_build", "Build"),
+ os.path.join(directory, "win_build", ".vs"),
+ os.path.join(directory, "win_build", "ipch"),
+ os.path.join(directory, "win_build", "installerv2", "redist"),
+ os.path.join(directory, "zip", "unzip"),
+ os.path.join(directory, "zip", "zip"),
+]
+
+exclude_files = [
+ os.path.join(directory, "bolt_checkin_notes.txt"),
+ os.path.join(directory, "checkin_notes"),
+ os.path.join(directory, "checkin_notes_2004"),
+ os.path.join(directory, "checkin_notes_2005"),
+ os.path.join(directory, "checkin_notes_2006"),
+ os.path.join(directory, "checkin_notes_2007"),
+ os.path.join(directory, "checkin_notes_2008"),
+ os.path.join(directory, "checkin_notes_2009"),
+ os.path.join(directory, "checkin_notes_2010"),
+ os.path.join(directory, "checkin_notes_2011"),
+ os.path.join(directory, "checkin_notes_2012"),
+ os.path.join(directory, "checkin_notes_samples"),
+ os.path.join(directory, "checkin_notes_samples"),
+ os.path.join(directory, "todo"),
+ os.path.join(directory, "TODO_OLD"),
+ os.path.join(directory, "aclocal.m4"),
+ os.path.join(directory, "client", "boinc_client"),
+ os.path.join(directory, "client", "boinccmd"),
+ os.path.join(directory, "client", "boinc"),
+ os.path.join(directory, "client", "switcher"),
+ os.path.join(directory, "clientscr", "progress", "simt"),
+ os.path.join(directory, "html", "inc", "GeoIP.dat"),
+ os.path.join(directory, "html", "inc", "geoip.inc"),
+ os.path.join(directory, "html", "inc", "htmLawed.php"),
+ os.path.join(directory, "html", "inc", "recaptcha_loader.php"),
+ os.path.join(directory, "samples", "wrapper", "regerror.c"),
+ os.path.join(directory, "samples", "wrapper", "regexp_custom.h"),
+ os.path.join(directory, "samples", "wrapper", "regexp_int.h"),
+ os.path.join(directory, "samples", "wrapper", "regexp_memory.c"),
+ os.path.join(directory, "samples", "wrapper", "regexp_report.c"),
+ os.path.join(directory, "samples", "wrapper", "regexp.c"),
+ os.path.join(directory, "samples", "wrapper", "regexp.h"),
+ os.path.join(directory, "samples", "wrapper", "regmagic.h"),
+ os.path.join(directory, "samples", "wrapper", "regsub.c"),
+ os.path.join(directory, "stage", "usr", "local", "bin", "boinc_client"),
+ os.path.join(directory, "stage", "usr", "local", "bin", "boinccmd"),
+ os.path.join(directory, "stage", "usr", "local", "bin", "boinc"),
+ os.path.join(directory, "stage", "usr", "local", "bin", "switcher"),
+]
+
+exclude_extensions = [
+ ".a",
+ ".bmp",
+ ".dll",
+ ".exe",
+ ".gif",
+ ".icns",
+ ".ico",
+ ".jar",
+ ".jpg",
+ ".lib",
+ ".mo",
+ ".nib",
+ ".o",
+ ".pdb",
+ ".pdf",
+ ".pdn",
+ ".png",
+ ".po",
+ ".psd",
+ ".rgb",
+ ".rtf",
+ ".so",
+ ".tif",
+ ".tiff",
+ ".tlb",
+ ".ttf",
+ ".zip",
+]
+
+files_with_errors = check(directory, exclude_dirs, exclude_extensions, exclude_files, fix)
+
+if files_with_errors:
+ print('Found files with errors:')
+ for file in files_with_errors:
+ print(file)
+ print('To fix errors run locally:\n\tpython3 ci_tools/trailing_whitespaces_check.py . --fix')
+ sys.exit(1)
+
+sys.exit(0)
diff --git a/client/acct_mgr.cpp b/client/acct_mgr.cpp
index 6edf4d50bc2..04a084618d8 100644
--- a/client/acct_mgr.cpp
+++ b/client/acct_mgr.cpp
@@ -185,7 +185,7 @@ int ACCT_MGR_OP::do_rpc(ACCT_MGR_INFO& _ami, bool _via_gui) {
p->disk_usage,
p->disk_share
);
-
+
// send work and starvation-related info
//
if (ami.dynamic) {
diff --git a/client/app.cpp b/client/app.cpp
index 1b700f13cff..cdfaaf886bb 100644
--- a/client/app.cpp
+++ b/client/app.cpp
@@ -1190,7 +1190,7 @@ void ACTIVE_TASK_SET::network_available() {
void ACTIVE_TASK::upload_notify_app(const FILE_INFO* fip, const FILE_REF* frp) {
char path[MAXPATHLEN];
- snprintf(path, sizeof(path),
+ snprintf(path, sizeof(path),
"%s/%s%s",
slot_dir, UPLOAD_FILE_STATUS_PREFIX, frp->open_name
);
diff --git a/client/app_graphics.cpp b/client/app_graphics.cpp
index b85e52c457c..23dc87f6b86 100644
--- a/client/app_graphics.cpp
+++ b/client/app_graphics.cpp
@@ -55,7 +55,7 @@ void ACTIVE_TASK::request_graphics_mode(GRAPHICS_MSG& m) {
// Restore mode from before screensaver
m.mode = graphics_mode_before_ss;
}
-
+
graphics_msg = m; // save graphics_station, desktop, display
safe_strcpy(buf, xml_graphics_modes[m.mode]);
diff --git a/client/app_start.cpp b/client/app_start.cpp
index e6d1da393c5..6144ba0b70d 100644
--- a/client/app_start.cpp
+++ b/client/app_start.cpp
@@ -835,7 +835,7 @@ int ACTIVE_TASK::start(bool test) {
// see which one was used for this job, and show it
//
if (log_flags.task_debug && gstate.host_info.n_processor_groups > 0) {
- msg_printf(wup->project, MSG_INFO,
+ msg_printf(wup->project, MSG_INFO,
"[task_debug] task is running in processor group %d",
get_processor_group(process_handle)
);
@@ -1096,7 +1096,7 @@ int ACTIVE_TASK::start(bool test) {
}
if (g_use_sandbox) {
char switcher_path[MAXPATHLEN];
- snprintf(switcher_path, sizeof(switcher_path),
+ snprintf(switcher_path, sizeof(switcher_path),
"../../%s/%s",
SWITCHER_DIR, SWITCHER_FILE_NAME
);
diff --git a/client/async_file.cpp b/client/async_file.cpp
index 9b036f6a2b9..55b23c0a644 100644
--- a/client/async_file.cpp
+++ b/client/async_file.cpp
@@ -128,7 +128,7 @@ int ASYNC_COPY::copy_chunk() {
"[async] async copy of %s finished", to_path
);
}
-
+
atp->async_copy = NULL;
fip->set_permissions(to_path);
diff --git a/client/boinc.xml b/client/boinc.xml
index 1612f666334..b1f5d94a419 100644
--- a/client/boinc.xml
+++ b/client/boinc.xml
@@ -1,5 +1,5 @@
-
+
BOINC Client
diff --git a/client/boinc_cmd.cpp b/client/boinc_cmd.cpp
index ffb70052595..30250725ab5 100644
--- a/client/boinc_cmd.cpp
+++ b/client/boinc_cmd.cpp
@@ -222,7 +222,7 @@ void show_str_lists(vector &lines, size_t ncols) {
}
}
-// given
+// given
// show list of tasks, 1 line per task,
// similar to the Manager's Tasks pane
// fields per task:
diff --git a/client/boinc_log.cpp b/client/boinc_log.cpp
index 2fef7343cc0..62d0e06296a 100644
--- a/client/boinc_log.cpp
+++ b/client/boinc_log.cpp
@@ -17,7 +17,7 @@
// boinc_log: show stream of event-log messages from a client
//
-// usage: boinc_log [--host hostname] [--passwd passwd]
+// usage: boinc_log [--host hostname] [--passwd passwd]
#ifdef _WIN32
#include "boinc_win.h"
diff --git a/client/check_security.cpp b/client/check_security.cpp
index c377999bc63..e5d548467c1 100644
--- a/client/check_security.cpp
+++ b/client/check_security.cpp
@@ -40,8 +40,8 @@ bool IsUserInGroup(char* groupName);
#endif
static int CheckNestedDirectories(
- char * basepath, int depth,
- int use_sandbox, int isManager,
+ char * basepath, int depth,
+ int use_sandbox, int isManager,
bool isSlotDir, char * path_to_error,
int len
);
@@ -93,7 +93,7 @@ int use_sandbox, int isManager, char* path_to_error, int len
// or LLDB on sandbox-specific code, as long as the code is run as the
// current user (i.e., not as boinc_master or boinc_project), and the
// current user is a member of both groups boinc_master and boinc_project.
- // Note that this newer approach supersedes the old one described and
+ // Note that this newer approach supersedes the old one described and
// implemented below. But since it has not been thoroughly tested, I have
// not removed the old code.
if (IsUserInGroup(REAL_BOINC_MASTER_NAME) && IsUserInGroup(REAL_BOINC_PROJECT_NAME)) {
@@ -107,7 +107,7 @@ int use_sandbox, int isManager, char* path_to_error, int len
// GDB can't attach to applications which are running as a different user or group so
// it ignores the S_ISUID and S_ISGID permission bits when launching an application.
// To work around this, and to allow testing the uninstalled Deployment version, we
-// assume that the BOINC Client has the correct user and group.
+// assume that the BOINC Client has the correct user and group.
// We must get the BOINC Client's user and group differently depending on whether we
// were called from the Manager or from the Client
@@ -217,12 +217,12 @@ int use_sandbox, int isManager, char* path_to_error, int len
strlcat(full_path, p+1, sizeof(full_path));
p = strrchr(full_path, '.'); // Strip off bundle extension (".app")
if (p)
- *p = '\0';
+ *p = '\0';
retval = lstat(full_path, &sbuf);
if (retval)
return -1013; // Should never happen
-
+
if (sbuf.st_gid != boinc_master_gid)
return -1014;
@@ -245,7 +245,7 @@ int use_sandbox, int isManager, char* path_to_error, int len
retval = stat(full_path, &sbuf);
if (retval)
return -1016; // Should never happen
-
+
if (sbuf.st_gid != boinc_master_gid)
return -1017;
@@ -255,9 +255,9 @@ int use_sandbox, int isManager, char* path_to_error, int len
#if (defined(__WXMAC__) || defined(_MAC_INSTALLER)) // If Mac BOINC Manager or installer
// Version 6 screensaver has its own embedded switcher application, but older versions don't.
- // We don't allow unauthorized users to run the standard switcher application in the BOINC
- // Data directory because they could use it to run as user & group boinc_project and damage
- // project files. The screensaver's gfx_switcher application has very limited functionality
+ // We don't allow unauthorized users to run the standard switcher application in the BOINC
+ // Data directory because they could use it to run as user & group boinc_project and damage
+ // project files. The screensaver's gfx_switcher application has very limited functionality
// to avoid this risk.
if (use_sandbox) {
@@ -317,15 +317,15 @@ int use_sandbox, int isManager, char* path_to_error, int len
if (use_sandbox) {
- // The top-level BOINC Data directory can have a different user if created by the Manager,
+ // The top-level BOINC Data directory can have a different user if created by the Manager,
// but it should always have group boinc_master.
if (sbuf.st_gid != boinc_master_gid)
return -1022;
-
+
// The top-level BOINC Data directory should have permission 771 or 571
if ((sbuf.st_mode & 0577) != 0571)
return -1023;
-
+
} else {
if (sbuf.st_uid != boinc_master_uid)
@@ -336,7 +336,7 @@ int use_sandbox, int isManager, char* path_to_error, int len
snprintf(full_path, sizeof(full_path), "%s/%s", dir_path, PROJECTS_DIR);
retval = stat(full_path, &sbuf);
if (!retval) {
- // Client can create projects directory if it does not yet exist.
+ // Client can create projects directory if it does not yet exist.
//
if (use_sandbox) {
if (sbuf.st_gid != boinc_project_gid)
@@ -345,7 +345,7 @@ int use_sandbox, int isManager, char* path_to_error, int len
if ((sbuf.st_mode & 0777) != 0770)
return -1025;
}
-
+
if (sbuf.st_uid != boinc_master_uid)
return -1026;
@@ -357,7 +357,7 @@ int use_sandbox, int isManager, char* path_to_error, int len
snprintf(full_path, sizeof(full_path), "%s/%s", dir_path, SLOTS_DIR);
retval = stat(full_path, &sbuf);
- if (! retval) { // Client can create slots directory if it does not yet exist.
+ if (! retval) { // Client can create slots directory if it does not yet exist.
if (use_sandbox) {
if (sbuf.st_gid != boinc_project_gid)
return -1027;
@@ -365,7 +365,7 @@ int use_sandbox, int isManager, char* path_to_error, int len
if ((sbuf.st_mode & 0777) != 0770)
return -1028;
}
-
+
if (sbuf.st_uid != boinc_master_uid)
return -1029;
@@ -379,7 +379,7 @@ int use_sandbox, int isManager, char* path_to_error, int len
"%s/%s", dir_path, GUI_RPC_PASSWD_FILE
);
retval = stat(full_path, &sbuf);
- if (! retval) { // Client can create RPC password file if it does not yet exist.
+ if (! retval) { // Client can create RPC password file if it does not yet exist.
if (use_sandbox) {
if (sbuf.st_gid != boinc_master_gid)
return -1030;
@@ -390,7 +390,7 @@ int use_sandbox, int isManager, char* path_to_error, int len
if ((sbuf.st_mode & 0717) != 0600)
return -1032;
}
-
+
if (sbuf.st_uid != boinc_master_uid)
return -1031;
}
@@ -400,7 +400,7 @@ int use_sandbox, int isManager, char* path_to_error, int len
retval = stat(full_path, &sbuf);
if (retval)
return -1033;
-
+
if (sbuf.st_gid != boinc_master_gid)
return -1034;
@@ -415,7 +415,7 @@ int use_sandbox, int isManager, char* path_to_error, int len
retval = stat(full_path, &sbuf);
if (retval)
return -1037;
-
+
if (sbuf.st_gid != boinc_master_gid)
return -1038;
@@ -431,7 +431,7 @@ int use_sandbox, int isManager, char* path_to_error, int len
retval = stat(full_path, &sbuf);
if (retval)
return -1041;
-
+
if (sbuf.st_gid != boinc_master_gid)
return -1042;
@@ -448,7 +448,7 @@ int use_sandbox, int isManager, char* path_to_error, int len
retval = stat(full_path, &sbuf);
if (retval)
return -1045;
-
+
if (sbuf.st_gid != boinc_master_gid)
return -1046;
@@ -475,17 +475,17 @@ int use_sandbox, int isManager, char* path_to_error, int len
if ((sbuf.st_mode & 0777) != 0664)
return -1053;
} // Screensaver config file ss_config.xml exists
-
+
} // if (use_sandbox)
-
+
return 0;
}
static int CheckNestedDirectories(
char * basepath, int depth,
- int use_sandbox, int isManager,
- bool isSlotDir,
+ int use_sandbox, int isManager,
+ bool isSlotDir,
char * path_to_error, int len
) {
int isDirectory;
@@ -498,10 +498,10 @@ static int CheckNestedDirectories(
dirp = opendir(basepath);
if (dirp == NULL) {
- // Ideally, all project-created subdirectories under project or slot
- // directoriesshould have read-by-group and execute-by-group permission
- // bits set, but some don't. If these permission bits are missing, the
- // project applications will run OK but we can't access the contents of
+ // Ideally, all project-created subdirectories under project or slot
+ // directoriesshould have read-by-group and execute-by-group permission
+ // bits set, but some don't. If these permission bits are missing, the
+ // project applications will run OK but we can't access the contents of
// the subdirectory to check them.
strlcpy(full_path, basepath, sizeof(full_path));
if ((depth > 1) && (errno == EACCES)) {
@@ -515,7 +515,7 @@ static int CheckNestedDirectories(
dp = readdir(dirp);
if (dp == NULL)
break; // End of list
-
+
if (dp->d_name[0] == '.')
continue; // Ignore names beginning with '.'
@@ -534,12 +534,12 @@ static int CheckNestedDirectories(
retval = -1202;
break;
} else { // Slots
- // Graphics apps called by screensaver or Manager (via Show
+ // Graphics apps called by screensaver or Manager (via Show
// Graphics button) now write files in their slot directory
// as the logged in user, not boinc_master. In most cases,
// the manager or screensaver will tell the client to fix
- // all ownerships in that slot directory, but a crash can
- // prevent that. As a backup strategy, we ignore ownership
+ // all ownerships in that slot directory, but a crash can
+ // prevent that. As a backup strategy, we ignore ownership
// of files in slot directories under the Manager, and fix
// them in the client.
#if (! defined(__WXMAC__) && ! defined(_MAC_INSTALLER))
@@ -559,23 +559,23 @@ static int CheckNestedDirectories(
} // isSlotDir
} // bad uid
} else { // depth == 1
- // project & slot directories (projects/setiathome.berkeley.edu, slots/0 etc.)
+ // project & slot directories (projects/setiathome.berkeley.edu, slots/0 etc.)
// must have owner boinc_master
if (sbuf.st_uid != boinc_master_uid) {
retval = -1202;
break;
}
}
-
+
if (use_sandbox) {
if (sbuf.st_gid != boinc_project_gid) {
retval = -1201;
break;
}
-
+
if (isDirectory) {
if (depth == 1) {
- // project & slot directories (projects/setiathome.berkeley.edu, slots/0 etc.)
+ // project & slot directories (projects/setiathome.berkeley.edu, slots/0 etc.)
// must be readable & executable by other
if ((sbuf.st_mode & 0777) != 0775) {
retval = -1203;
@@ -600,10 +600,10 @@ static int CheckNestedDirectories(
}
} // if (use_sandbox)
} // if (!S_ISLNK(sbuf.st_mode))
-
+
if (isDirectory && !S_ISLNK(sbuf.st_mode)) {
if (use_sandbox && (depth > 1)) {
-#if 0 // No longer check project-created subdirectories under project or slot directories
+#if 0 // No longer check project-created subdirectories under project or slot directories
// because we have not told projects these must be readable and executable by group
if ((! isManager) && (sbuf.st_uid != boinc_master_uid))
#endif
@@ -619,7 +619,7 @@ static int CheckNestedDirectories(
if (dirp) {
closedir(dirp);
}
-
+
if (retval && !errShown) {
fprintf(stderr, "Permissions error %d at %s\n", retval, full_path);
if (path_to_error) {
@@ -658,12 +658,12 @@ static void GetPathToThisProcess(char* outbuf, size_t maxLen) {
pid_t aPID = getpid();
*outbuf = '\0';
-
+
snprintf(buf, sizeof(buf), "ps -xwo command -p %d", (int)aPID);
f = popen(buf, "r");
if (f == NULL)
return;
-
+
PersistentFGets (outbuf, maxLen, f); // Discard header line
PersistentFGets (outbuf, maxLen, f);
pclose(f);
@@ -672,7 +672,7 @@ static void GetPathToThisProcess(char* outbuf, size_t maxLen) {
p = strchr(outbuf, '\n');
if (p)
*p = '\0';
-
+
// Strip off any arguments
p = strstr(outbuf, " -");
q = p;
@@ -683,7 +683,7 @@ static void GetPathToThisProcess(char* outbuf, size_t maxLen) {
break;
}
}
-
+
if (q)
*q = '\0';
}
@@ -704,7 +704,7 @@ bool IsUserInGroup(char* groupName) {
return true; // User's primary group is boinc_master
}
- // On some systems with Automatic Login set, getlogin() returns "root" for a
+ // On some systems with Automatic Login set, getlogin() returns "root" for a
// time after the system is first booted, so we check "USER" environment variable.
userName = getenv("USER");
if (userName) {
diff --git a/client/client_msgs.cpp b/client/client_msgs.cpp
index 4115d876f4a..669e70e217c 100644
--- a/client/client_msgs.cpp
+++ b/client/client_msgs.cpp
@@ -130,7 +130,7 @@ void show_message(
#endif
// print message to the debugger view port
- diagnostics_trace_to_debugger(evt_message);
+ diagnostics_trace_to_debugger(evt_message);
}
#endif
diff --git a/client/client_state.cpp b/client/client_state.cpp
index c5309a17cc4..3d27daf8016 100644
--- a/client/client_state.cpp
+++ b/client/client_state.cpp
@@ -363,7 +363,7 @@ void CLIENT_STATE::set_now() {
#ifdef _WIN32
// On Win, check for evidence that we're awake after a suspension
// (in case we missed the event announcing this)
- //
+ //
if (os_requested_suspend) {
if (x > now+10) {
msg_printf(0, MSG_INFO, "Resuming after OS suspension");
@@ -584,9 +584,9 @@ int CLIENT_STATE::init() {
}
}
coprocs.add_other_coproc_types();
-
+
host_info.coprocs = coprocs;
-
+
if (coprocs.none() ) {
msg_printf(NULL, MSG_INFO, "No usable GPUs found");
}
@@ -812,7 +812,7 @@ int CLIENT_STATE::init() {
#endif
http_ops->cleanup_temp_files();
-
+
// must parse env vars after parsing state file
// otherwise items will get overwritten with state file info
//
diff --git a/client/client_types.cpp b/client/client_types.cpp
index 7d78aa587f5..afe9aa9d143 100644
--- a/client/client_types.cpp
+++ b/client/client_types.cpp
@@ -685,7 +685,7 @@ bool FILE_INFO::had_failure(int& failnum) {
void FILE_INFO::failure_message(string& s) {
char buf[1024];
- snprintf(buf, sizeof(buf),
+ snprintf(buf, sizeof(buf),
"\n"
" %s \n"
" %d (%s) \n",
@@ -1432,7 +1432,7 @@ void USER_CPIDS::init_from_projects() {
strcpy(uc.cpid, p->cross_project_id);
uc.time = p->user_create_time;
cpids.push_back(uc);
-
+
}
}
}
diff --git a/client/cpu_benchmark.h b/client/cpu_benchmark.h
index f20c182bed6..5e6c082efcd 100644
--- a/client/cpu_benchmark.h
+++ b/client/cpu_benchmark.h
@@ -18,7 +18,7 @@
#define MAX_CPU_BENCHMARKS_SECONDS 300
#define CPU_BENCHMARKS_RUNNING 0
#define CPU_BENCHMARKS_COMPLETE 1
-#define CPU_BENCHMARKS_NOT_RUNNING 2
+#define CPU_BENCHMARKS_NOT_RUNNING 2
#define CPU_BENCHMARKS_ERROR 3
#define BM_TYPE_FP 0
diff --git a/client/cpu_sched.cpp b/client/cpu_sched.cpp
index ecf55b78d4f..ca1cf379999 100644
--- a/client/cpu_sched.cpp
+++ b/client/cpu_sched.cpp
@@ -204,7 +204,7 @@ struct PROC_RESOURCES {
if (log_flags.cpu_sched_debug) {
msg_printf(rp->project, MSG_INFO,
"[cpu_sched_debug] add to run list: %s (%s, %s) (prio %f)",
- rp->name,
+ rp->name,
rsc_name_long(rt),
is_edf?"EDF":"FIFO",
rp->project->sched_priority
diff --git a/client/cs_account.cpp b/client/cs_account.cpp
index 6174437782f..5fbabc61dc3 100644
--- a/client/cs_account.cpp
+++ b/client/cs_account.cpp
@@ -466,7 +466,7 @@ int PROJECT::write_statistics_file() {
get_statistics_filename(master_url, path, sizeof(path));
f = boinc_fopen(TEMP_STATS_FILE_NAME, "w");
if (!f) return ERR_FOPEN;
- fprintf(f,
+ fprintf(f,
"\n"
" %s \n",
master_url
@@ -475,7 +475,7 @@ int PROJECT::write_statistics_file() {
for (std::vector::iterator i=statistics.begin();
i!=statistics.end(); ++i
) {
- fprintf(f,
+ fprintf(f,
" \n"
" %f \n"
" %f \n"
@@ -491,7 +491,7 @@ int PROJECT::write_statistics_file() {
);
}
- fprintf(f,
+ fprintf(f,
" \n"
);
diff --git a/client/cs_apps.cpp b/client/cs_apps.cpp
index 768acf9fe4f..ae24a110340 100644
--- a/client/cs_apps.cpp
+++ b/client/cs_apps.cpp
@@ -235,7 +235,7 @@ int CLIENT_STATE::task_files_present(
WORKUNIT* wup = rp->wup;
FILE_INFO* fip;
unsigned int i;
- APP_VERSION* avp = rp->avp;
+ APP_VERSION* avp = rp->avp;
int retval, ret = 0;
for (i=0; iapp_files.size(); i++) {
@@ -278,7 +278,7 @@ int CLIENT_STATE::verify_app_version_files(RESULT* rp) {
PROJECT* project = rp->project;
if (project->anonymous_platform) return 0;
- APP_VERSION* avp = rp->avp;
+ APP_VERSION* avp = rp->avp;
for (unsigned int i=0; iapp_files.size(); i++) {
fip = avp->app_files[i].file_info;
int retval = fip->verify_file(true, true, false);
diff --git a/client/cs_benchmark.cpp b/client/cs_benchmark.cpp
index 3483419333f..e215e37738d 100644
--- a/client/cs_benchmark.cpp
+++ b/client/cs_benchmark.cpp
@@ -175,21 +175,21 @@ int cpu_benchmarks(BENCHMARK_DESC* bdp) {
#if defined(ANDROID) && defined(__arm__)
#if defined(ARMV6)
retval = whetstone(host_info.p_fpops, fp_time, MIN_CPU_TIME);
-#else
+#else
// check for FP accelerator: VFP, Neon, or none;
// run the appropriate version of Whetstone
// (separated using namespaces)
//
- if (strstr(gstate.host_info.p_features, " neon ")) {
+ if (strstr(gstate.host_info.p_features, " neon ")) {
// have ARM neon FP capabilities
retval = android_neon::whetstone(host_info.p_fpops, fp_time, MIN_CPU_TIME);
- } else if (strstr(gstate.host_info.p_features, " vfp ")) {
+ } else if (strstr(gstate.host_info.p_features, " vfp ")) {
// have ARM vfp FP capabilities
retval = android_vfp::whetstone(host_info.p_fpops, fp_time, MIN_CPU_TIME);
} else { // just run normal test
retval = whetstone(host_info.p_fpops, fp_time, MIN_CPU_TIME);
}
-#endif
+#endif
#else
retval = whetstone(host_info.p_fpops, fp_time, MIN_CPU_TIME);
#endif
diff --git a/client/cs_cmdline.cpp b/client/cs_cmdline.cpp
index 9d26181a3b7..1d14ec7b8b7 100644
--- a/client/cs_cmdline.cpp
+++ b/client/cs_cmdline.cpp
@@ -249,10 +249,10 @@ void CLIENT_STATE::parse_cmdline(int argc, char** argv) {
printf(BOINC_VERSION_STRING " " HOSTTYPE "\n");
exit(0);
#ifdef __APPLE__
- // workaround for bug in XCode 4.2: accept but ignore
- // argument -NSDocumentRevisionsDebugMode=YES
+ // workaround for bug in XCode 4.2: accept but ignore
+ // argument -NSDocumentRevisionsDebugMode=YES
} else if (ARG(NSDocumentRevisionsDebugMode)) {
- ++i;
+ ++i;
#endif
// detect_gpus is for internal use only - do not
// add it to show_options() or doc/client.php
diff --git a/client/cs_notice.cpp b/client/cs_notice.cpp
index 6790a3f0bfc..d6c23acd459 100644
--- a/client/cs_notice.cpp
+++ b/client/cs_notice.cpp
@@ -417,7 +417,7 @@ bool NOTICES::remove_dups(NOTICE& n) {
}
// add a notice.
-//
+//
bool NOTICES::append(NOTICE& n) {
if (log_flags.notice_debug) {
msg_printf(0, MSG_INFO,
diff --git a/client/cs_prefs.cpp b/client/cs_prefs.cpp
index 9ac10c217ee..dedbe47eee9 100644
--- a/client/cs_prefs.cpp
+++ b/client/cs_prefs.cpp
@@ -119,7 +119,7 @@ int CLIENT_STATE::get_disk_usages() {
// - each project has a "disk_resource_share" (DRS)
// This is the resource share plus .1*(max resource share).
// This ensures that backup projects get some disk.
-// - each project has a "desired_disk_usage (DDU)",
+// - each project has a "desired_disk_usage (DDU)",
// which is either its current usage
// or an amount sent from the scheduler.
// - each project has a "quota": (available space)*(drs/total_drs).
@@ -289,7 +289,7 @@ int CLIENT_STATE::check_suspend_processing() {
return SUSPEND_REASON_BATTERY_CHARGING;
}
}
-
+
// user active.
// Do this check after checks that user can not influence on Android.
// E.g.
@@ -417,7 +417,7 @@ void CLIENT_STATE::check_suspend_network() {
);
switch(network_run_mode.get_current()) {
- case RUN_MODE_ALWAYS:
+ case RUN_MODE_ALWAYS:
goto done;
case RUN_MODE_NEVER:
file_xfers_suspended = true;
@@ -463,7 +463,7 @@ void CLIENT_STATE::check_suspend_network() {
if (!recent_rpc) network_suspended = true;
network_suspend_reason = SUSPEND_REASON_USER_ACTIVE;
}
-#endif
+#endif
if (global_prefs.net_times.suspended(now)) {
file_xfers_suspended = true;
if (!recent_rpc) network_suspended = true;
diff --git a/client/cs_statefile.cpp b/client/cs_statefile.cpp
index eea7d819461..323728bc6d6 100644
--- a/client/cs_statefile.cpp
+++ b/client/cs_statefile.cpp
@@ -273,7 +273,7 @@ int CLIENT_STATE::parse_state_file_aux(const char* fname) {
);
delete avp;
continue;
- }
+ }
if (strlen(avp->platform) == 0) {
safe_strcpy(avp->platform, get_primary_platform());
} else {
@@ -540,7 +540,7 @@ int CLIENT_STATE::parse_state_file_aux(const char* fname) {
}
sort_results();
fclose(f);
-
+
// if total resource share is zero, set all shares to 1
//
if (projects.size()) {
@@ -620,7 +620,7 @@ int CLIENT_STATE::write_state_file() {
for (attempt=1; attempt<=MAX_STATE_FILE_WRITE_ATTEMPTS; attempt++) {
if (attempt > 1) boinc_sleep(1.0);
-
+
if (log_flags.statefile_debug) {
msg_printf(0, MSG_INFO,
"[statefile] Writing state file"
@@ -681,7 +681,7 @@ int CLIENT_STATE::write_state_file() {
if (attempt < MAX_STATE_FILE_WRITE_ATTEMPTS) continue;
}
}
-
+
retval = boinc_rename(STATE_FILE_NAME, STATE_FILE_PREV);
if (retval) {
if ((attempt == MAX_STATE_FILE_WRITE_ATTEMPTS) || log_flags.statefile_debug) {
@@ -691,8 +691,8 @@ int CLIENT_STATE::write_state_file() {
windows_format_error_string(GetLastError(), win_error_msg, sizeof(win_error_msg))
);
#else
- msg_printf(0, MSG_INFO,
- "Can't rename current state file to previous state file: %s",
+ msg_printf(0, MSG_INFO,
+ "Can't rename current state file to previous state file: %s",
strerror(errno)
);
#endif
@@ -708,7 +708,7 @@ int CLIENT_STATE::write_state_file() {
);
}
if (!retval) break; // Success!
-
+
if ((attempt == MAX_STATE_FILE_WRITE_ATTEMPTS) || log_flags.statefile_debug) {
#ifdef _WIN32
msg_printf(0, MSG_INFO,
diff --git a/client/current_version.cpp b/client/current_version.cpp
index 48a1338c017..24b6a11ab10 100644
--- a/client/current_version.cpp
+++ b/client/current_version.cpp
@@ -28,15 +28,15 @@
#include "current_version.h"
-// NVC_CONFIG allows branded installers to have the client check for a new
+// NVC_CONFIG allows branded installers to have the client check for a new
// branded client on their serve instead of checking the Berkeley server for
// a new standard (unbranded) BOINC client.
//
-// If the nvc_config.xml file is absent from the BOINC Data folder, use
+// If the nvc_config.xml file is absent from the BOINC Data folder, use
// default values (Berkeley server.)
-// Unbranded BOINC should not have an nvc_config.xml file.
+// Unbranded BOINC should not have an nvc_config.xml file.
// Branded installers can create or replace this file to customize these values.
-// Standard (unbranded) BOINC installers should either delete the file or
+// Standard (unbranded) BOINC installers should either delete the file or
// create or replace it with one containing default values.
NVC_CONFIG nvc_config;
@@ -167,7 +167,7 @@ static int get_current_macos_version() {
if (buf[0] == '\0') {
return 0;
}
-
+
// Extract the major system version number
vers = atoi(buf) * 10000;
// Extract the minor system version number
@@ -201,7 +201,7 @@ static bool parse_version(FILE* f, char* new_version, int len) {
while (!xp.get_tag()) {
if (xp.match_tag("/version")) {
#ifdef __APPLE__
- return (same_platform
+ return (same_platform
&& newer_version_exists
&& min_macos_OK
&& max_macos_OK
@@ -215,9 +215,9 @@ static bool parse_version(FILE* f, char* new_version, int len) {
}
if (xp.parse_str("version_num", buf2, sizeof(buf2))) {
newer_version_exists = is_version_newer(
- buf2,
- gstate.core_client_version.major,
- gstate.core_client_version.minor,
+ buf2,
+ gstate.core_client_version.major,
+ gstate.core_client_version.minor,
gstate.core_client_version.release
);
strlcpy(new_version, buf2, len);
@@ -247,7 +247,7 @@ static void show_newer_version_msg(const char* new_vers) {
_("Download")
);
} else {
- snprintf(buf, sizeof(buf), _("A new version of %s is available"),
+ snprintf(buf, sizeof(buf), _("A new version of %s is available"),
nvc_config.client_new_version_name.c_str()
);
msg_printf_notice(0, true, NULL,
@@ -282,11 +282,11 @@ void GET_CURRENT_VERSION_OP::handle_reply(int http_op_retval) {
}
}
fclose(f);
-
+
if (newest_version[0]) {
show_newer_version_msg(newest_version);
}
-
+
// Cache neweer version number. Empty string if no newer version
gstate.newer_version = string(newest_version);
}
@@ -306,9 +306,9 @@ void newer_version_startup_check() {
}
if (!gstate.newer_version.empty()) {
- if (is_version_newer(gstate.newer_version.c_str(),
- gstate.core_client_version.major,
- gstate.core_client_version.minor,
+ if (is_version_newer(gstate.newer_version.c_str(),
+ gstate.core_client_version.major,
+ gstate.core_client_version.minor,
gstate.core_client_version.release)
) {
show_newer_version_msg(gstate.newer_version.c_str());
diff --git a/client/file_xfer.cpp b/client/file_xfer.cpp
index ef5c0a618c2..012d53ce856 100644
--- a/client/file_xfer.cpp
+++ b/client/file_xfer.cpp
@@ -112,7 +112,7 @@ int FILE_XFER::init_upload(FILE_INFO& file_info) {
}
if (file_info.upload_offset < 0) {
bytes_xferred = 0;
- snprintf(header, sizeof(header),
+ snprintf(header, sizeof(header),
"\n"
" %d \n"
" %d \n"
@@ -130,7 +130,7 @@ int FILE_XFER::init_upload(FILE_INFO& file_info) {
);
} else {
bytes_xferred = file_info.upload_offset;
- snprintf(header, sizeof(header),
+ snprintf(header, sizeof(header),
"\n"
" %d \n"
" %d \n"
diff --git a/client/file_xfer.h b/client/file_xfer.h
index 0f4dfaf7b1f..2f380c2e5b0 100644
--- a/client/file_xfer.h
+++ b/client/file_xfer.h
@@ -21,7 +21,7 @@
// A FILE_XFER object represents a file transfer "episode"
// (see pers_file_xfer.h), i.e. an HTTP transaction with a
// particular data server.
-//
+//
#include "client_types.h"
#include "http_curl.h"
diff --git a/client/gpu_amd.cpp b/client/gpu_amd.cpp
index 2e5444a19cd..abab0b9100d 100644
--- a/client/gpu_amd.cpp
+++ b/client/gpu_amd.cpp
@@ -448,9 +448,9 @@ void COPROC_ATI::correlate(
// * It must be called from a separate child process on
// dual-GPU laptops (e.g., Macbook Pros) with the results
// communicated to the main client process via IPC or a
-// temp file. See the comments about dual-GPU laptops
+// temp file. See the comments about dual-GPU laptops
// in gpu_detect.cpp and main.cpp for more details.
-// * The CAL library must be loaded and calInit() called
+// * The CAL library must be loaded and calInit() called
// first.
// * See client/coproc_detect.cpp and cpu_sched.cpp in
// BOINC 6.12.36 for an earlier attempt to call this
diff --git a/client/gpu_detect.cpp b/client/gpu_detect.cpp
index 10bb864b91d..37c963db0ac 100644
--- a/client/gpu_detect.cpp
+++ b/client/gpu_detect.cpp
@@ -155,13 +155,13 @@ void COPROCS::detect_gpus(vector &warnings) {
#endif
try {
ati.get(warnings);
- }
+ }
catch (...) {
gpu_warning(warnings, "Caught SIGSEGV in ATI GPU detection");
}
try {
intel_gpu.get(warnings);
- }
+ }
catch (...) {
gpu_warning(warnings, "Caught SIGSEGV in INTEL GPU detection");
}
@@ -179,7 +179,7 @@ void COPROCS::detect_gpus(vector &warnings) {
} else {
nvidia.get(warnings);
}
-
+
#ifndef __APPLE__ // ATI does not yet support CAL on Macs
if (setjmp(resume)) {
@@ -224,7 +224,7 @@ void COPROCS::correlate_gpus(
intel_gpu.correlate(use_all, ignore_gpu_instance[PROC_TYPE_INTEL_GPU]);
correlate_opencl(use_all, ignore_gpu_instance);
- // NOTE: OpenCL can report a max of only 4GB.
+ // NOTE: OpenCL can report a max of only 4GB.
//
for (i=0; i= MAX_RSC) {
retval = ERR_BUFFER_OVERFLOW;
break;
}
-
+
COPROC c;
// For device types other than NVIDIA, ATI or Intel GPU.
// we put each instance into a separate other_opencls element,
@@ -391,9 +391,9 @@ int COPROCS::add_other_coproc_types() {
// Don't call COPROCS::add() because duplicate type is legal here
coprocs[n_rsc++] = c;
-
+
}
-
+
other_opencls.clear();
return retval;
}
@@ -408,18 +408,18 @@ int COPROCS::write_coproc_info_file(vector &warnings) {
MIOFILE mf;
unsigned int i, temp;
FILE* f;
-
+
f = boinc_fopen(COPROC_INFO_FILENAME, "wb");
if (!f) return ERR_FOPEN;
mf.init_file(f);
-
+
mf.printf(" \n");
if (nvidia.have_cuda) {
mf.printf(" 1 \n");
mf.printf(" %d \n", nvidia.cuda_version);
}
-
+
for (i=0; i &warnings) {
fclose(f);
return ERR_XML_PARSE;
}
-
+
while (!xp.get_tag()) {
if (xp.match_tag("/coprocs")) {
fclose(f);
@@ -536,7 +536,7 @@ int COPROCS::read_coproc_info_file(vector &warnings) {
}
continue;
}
-
+
if (xp.match_tag("ati_opencl")) {
ati_opencl.clear();
retval = ati_opencl.parse(xp, "/ati_opencl");
@@ -596,7 +596,7 @@ int COPROCS::read_coproc_info_file(vector &warnings) {
}
continue;
}
-
+
if (xp.parse_string("warning", s)) {
warnings.push_back(s);
continue;
@@ -606,7 +606,7 @@ int COPROCS::read_coproc_info_file(vector &warnings) {
// gstate.host_info.have_cpu_opencl
// gstate.host_info.cpu_opencl_prop
}
-
+
fclose(f);
return ERR_XML_PARSE;
}
@@ -620,7 +620,7 @@ int COPROCS::launch_child_process_to_detect_gpus() {
char quoted_data_dir[MAXPATHLEN+2];
char data_dir[MAXPATHLEN];
int retval = 0;
-
+
retval = boinc_delete_file(COPROC_INFO_FILENAME);
if (retval) {
msg_printf(0, MSG_INFO,
@@ -633,7 +633,7 @@ int COPROCS::launch_child_process_to_detect_gpus() {
boinc_sleep(0.01);
}
}
-
+
// use full path to exe if possible, otherwise keep using argv[0]
char execpath[MAXPATHLEN];
if (!get_real_executable_path(execpath, sizeof(execpath))) {
@@ -666,15 +666,15 @@ int COPROCS::launch_child_process_to_detect_gpus() {
quoted_data_dir
);
}
-
+
int argc = 4;
char* const argv[5] = {
const_cast(client_path),
- const_cast("--detect_gpus"),
- const_cast("--dir"),
+ const_cast("--detect_gpus"),
+ const_cast("--dir"),
const_cast(quoted_data_dir),
NULL
- };
+ };
retval = run_program(
client_dir,
diff --git a/client/gpu_nvidia.cpp b/client/gpu_nvidia.cpp
index b89f3e4fa2e..d8b4985e098 100644
--- a/client/gpu_nvidia.cpp
+++ b/client/gpu_nvidia.cpp
@@ -24,7 +24,7 @@
#include "sal.h"
/* These are just an annotations. They don't do anything */
#ifndef __success
-#define __success(x)
+#define __success(x)
#endif
#ifndef __in
#define __in
@@ -58,13 +58,13 @@
#endif
#ifndef __inout_ecount_part_opt
#define __inout_ecount_part_opt(x,y)
-#endif
+#endif
#ifndef __inout_ecount_full_opt
#define __inout_ecount_full_opt(x,y)
-#endif
+#endif
#ifndef __out_ecount_full_opt
#define __out_ecount_full_opt(x)
-#endif
+#endif
#include "nvapi.h"
@@ -132,7 +132,7 @@ static int nvidia_driver_version() {
return dri_ver;
}
-#endif
+#endif
#endif // SIM
// return 1/-1/0 if device 1 is more/less/same capable than device 2.
@@ -376,7 +376,7 @@ void* cudalib = NULL;
}
}
#endif
-
+
if (retval) {
snprintf(buf, sizeof(buf), "NVIDIA drivers present but no GPUs found");
gpu_warning(warnings, buf);
@@ -470,7 +470,7 @@ void* cudalib = NULL;
if (!nvidia_gpus.size()) {
gpu_warning(warnings, "No CUDA-capable NVIDIA GPUs found");
}
-
+
leave:
#ifdef _WIN32
if (cudalib) FreeLibrary(cudalib);
@@ -490,7 +490,7 @@ void COPROC_NVIDIA::correlate(
unsigned int i;
if (!nvidia_gpus.size()) return;
-
+
// identify the most capable non-ignored instance
//
bool first = true;
@@ -542,14 +542,14 @@ void COPROC_NVIDIA::correlate(
// See how much RAM is available on this GPU.
//
// CAUTION: as currently written, this method should be
-// called only from COPROC_NVIDIA::get(). If in the
+// called only from COPROC_NVIDIA::get(). If in the
// future you wish to call it from additional places:
// * It must be called from a separate child process on
// dual-GPU laptops (e.g., Macbook Pros) with the results
// communicated to the main client process via IPC or a
-// temp file. See the comments about dual-GPU laptops
+// temp file. See the comments about dual-GPU laptops
// in gpu_detect.cpp and main.cpp for more details.
-// * The CUDA library must be loaded and cuInit() called
+// * The CUDA library must be loaded and cuInit() called
// first.
// * See client/coproc_detect.cpp and cpu_sched.cpp in
// BOINC 6.12.36 for an earlier attempt to call this
@@ -562,7 +562,7 @@ static void get_available_nvidia_ram(COPROC_NVIDIA &cc, vector& warnings
int device;
void* ctx;
char buf[256];
-
+
cc.available_ram = cc.prop.totalGlobalMem;
if (!p_cuDeviceGet) {
gpu_warning(warnings, "cuDeviceGet() missing from NVIDIA library");
@@ -623,9 +623,9 @@ static void get_available_nvidia_ram(COPROC_NVIDIA &cc, vector& warnings
// * It must be called from a separate child process on
// dual-GPU laptops (e.g., Macbook Pros) with the results
// communicated to the main client process via IPC or a
-// temp file. See the comments about dual-GPU laptops
+// temp file. See the comments about dual-GPU laptops
// in gpu_detect.cpp and main.cpp for more details.
-// * The CUDA library must be loaded and cuInit() called
+// * The CUDA library must be loaded and cuInit() called
// first.
//
#if 0
diff --git a/client/gpu_opencl.cpp b/client/gpu_opencl.cpp
index 2d207417962..5f0c48a5b11 100644
--- a/client/gpu_opencl.cpp
+++ b/client/gpu_opencl.cpp
@@ -166,7 +166,7 @@ int compareOSVersionTo(int toMajor, int toMinor) {
p1 = strchr(vers, '.');
minor = atoi(p1+1);
}
-
+
if (major < toMajor) return -1;
if (major > toMajor) return 1;
// if (major == toMajor) compare minor version numbers
@@ -337,7 +337,7 @@ void COPROCS::get_opencl(
}
//////////// GPUs and Accelerators //////////////
-
+
ciErrNum = (*p_clGetDeviceIDs)(
platforms[platform_index],
(CL_DEVICE_TYPE_GPU | CL_DEVICE_TYPE_ACCELERATOR),
@@ -432,15 +432,15 @@ void COPROCS::get_opencl(
bool cuda_match_found = false;
if (nvidia.have_cuda) {
// Mac OpenCL does not recognize all NVIDIA GPUs returned by
- // CUDA but we assume that OpenCL and CUDA return devices
+ // CUDA but we assume that OpenCL and CUDA return devices
// with identical model name strings and that OpenCL returns
// devices in order of ascending PCI slot.
//
- // On other systems, assume OpenCL and CUDA return devices
+ // On other systems, assume OpenCL and CUDA return devices
// in the same order.
//
int saved_CUDA_index = current_CUDA_index;
-
+
while (1) {
if (current_CUDA_index >= (int)(nvidia_gpus.size())) {
snprintf(buf, sizeof(buf),
@@ -494,16 +494,16 @@ void COPROCS::get_opencl(
} else {
prop.opencl_available_ram = prop.global_mem_size;
}
-
+
// Build nvidia_opencls vector in device_num order
for (it=nvidia_opencls.begin(); it != nvidia_opencls.end(); ++it) {
if (it->device_num > prop.device_num) break;
}
nvidia_opencls.insert(it, prop);
-
+
if (cuda_match_found) ++current_CUDA_index;
}
-
+
//////////// AMD / ATI //////////////
else if (is_AMD(prop.vendor)) {
prop.opencl_device_index = device_index;
@@ -605,7 +605,7 @@ void COPROCS::get_opencl(
opencl_device_index++; // Another OpenCL device from same vendor
}
}
-
+
prop.device_num = 0; // Each vector entry has only one device
prop.opencl_device_index = opencl_device_index;
prop.opencl_available_ram = prop.global_mem_size;
@@ -632,8 +632,8 @@ void COPROCS::get_opencl(
}
}
}
-
- // Neither nvidia.count, ati.count nor intel_gpu.count have been set yet,
+
+ // Neither nvidia.count, ati.count nor intel_gpu.count have been set yet,
// so we can't test have_nvidia(), have_ati() or have_intel_gpu() here.
//
if ((nvidia_opencls.size() > 0) || nvidia.have_cuda) max_other_coprocs--;
@@ -693,7 +693,7 @@ void COPROCS::correlate_opencl(
safe_strcpy(nvidia.prop.name, nvidia.opencl_prop.name);
}
}
-
+
if (ati_opencls.size() > 0) {
if (ati.have_cal) { // If CAL already found the "best" CAL GPU
ati.merge_opencl(ati_opencls, ignore_gpu_instance[PROC_TYPE_AMD_GPU]);
@@ -705,7 +705,7 @@ void COPROCS::correlate_opencl(
safe_strcpy(ati.name, ati.opencl_prop.name);
}
}
-
+
if (intel_gpu_opencls.size() > 0) {
intel_gpu.find_best_opencls(use_all, intel_gpu_opencls, ignore_gpu_instance[PROC_TYPE_INTEL_GPU]);
intel_gpu.available_ram = intel_gpu.opencl_prop.global_mem_size;
@@ -958,7 +958,7 @@ cl_int COPROCS::get_opencl_info(
gpu_warning(warnings, buf);
return ciErrNum;
}
-
+
ciErrNum = (*p_clGetDeviceInfo)(prop.device_id, CL_DEVICE_SIMD_PER_COMPUTE_UNIT_AMD, sizeof(prop.amd_simd_per_compute_unit), &prop.amd_simd_per_compute_unit, NULL);
if (ciErrNum != CL_SUCCESS) {
snprintf(buf, sizeof(buf),
@@ -1007,7 +1007,7 @@ void COPROC::merge_opencl(
for (i=0; imaster_url, gstate.project_init.url)) {
- gstate.project_init.remove();
- break;
+ for (unsigned i=0; imaster_url, gstate.project_init.url)) {
+ gstate.project_init.remove();
+ break;
}
}
@@ -835,10 +835,10 @@ void handle_lookup_account_poll(GUI_RPC_CONN& grc) {
);
} else {
const char *p = grc.lookup_account_op.reply.c_str();
- const char *q = strstr(p, "(SWITCHER_FILE_NAME);
@@ -1343,27 +1343,27 @@ static void stop_graphics_app(pid_t thePID,
argv[2] = "-kill_gfx";
argv[3] = pidString;
argc = 4;
-#else
+#else
argv[0] = const_cast(SWITCHER_FILE_NAME);
argv[1] = "/bin/kill";
argv[2] = "-kill";
argv[3] = (char *)pidString;
argc = 4;
#endif
- // Graphics apps called by screensaver or Manager (via Show
+ // Graphics apps called by screensaver or Manager (via Show
// Graphics button) now write files in their slot directory
- // as the logged in user, not boinc_master. This ugly hack
+ // as the logged in user, not boinc_master. This ugly hack
// uses setprojectgrp to fix all ownerships in this slot
// directory.
- // To fix all ownerships in the slot directory, invoke the
- // run_graphics_app RPC with operation "stop", slot number
+ // To fix all ownerships in the slot directory, invoke the
+ // run_graphics_app RPC with operation "stop", slot number
// for the operand and empty string for screensaverLoginUser
// after the graphics app stops.
if (theScreensaverLoginUser.empty()) {
fix_slot_owners(thePID); // Manager passes slot # instead of PID
return;
}
-
+
argv[argc++] = "--ScreensaverLoginUser";
safe_strcpy(screensaverLoginUser, theScreensaverLoginUser.c_str());
argv[argc++] = screensaverLoginUser;
@@ -1417,7 +1417,7 @@ static void handle_run_graphics_app(GUI_RPC_CONN& grc) {
int newPID = 0;
ACTIVE_TASK* atp = NULL;
char cmd[256];
-
+
while (!grc.xp.get_tag()) {
if (grc.xp.match_tag("/run_graphics_app")) break;
if (grc.xp.parse_int("slot", slot)) continue;
@@ -1428,7 +1428,7 @@ static void handle_run_graphics_app(GUI_RPC_CONN& grc) {
if (grc.xp.parse_int("graphics_pid", thePID)) continue;
if (grc.xp.parse_string("ScreensaverLoginUser", theScreensaverLoginUser)) continue;
}
-
+
if (stop) {
if (theScreensaverLoginUser.empty() ){
if (thePID < 0) {
@@ -1485,14 +1485,14 @@ static void handle_run_graphics_app(GUI_RPC_CONN& grc) {
getcwd(current_dir, sizeof(current_dir));
if (g_use_sandbox) {
- snprintf(switcher_path, sizeof(switcher_path),
+ snprintf(switcher_path, sizeof(switcher_path),
"%s/%s/%s",
current_dir, SWITCHER_DIR, SWITCHER_FILE_NAME
);
}
if (stop) {
- stop_graphics_app(thePID, iBrandID, current_dir, switcher_path,
+ stop_graphics_app(thePID, iBrandID, current_dir, switcher_path,
theScreensaverLoginUser, grc);
grc.mfout.printf(" \n");
return;
@@ -1520,7 +1520,7 @@ static void handle_run_graphics_app(GUI_RPC_CONN& grc) {
grc.mfout.printf("job has no graphics app \n");
return;
}
-
+
execPath = atp->app_version->graphics_exec_path;
execName = atp->app_version->graphics_exec_file;
execDir = atp->slot_path;
@@ -1544,7 +1544,7 @@ static void handle_run_graphics_app(GUI_RPC_CONN& grc) {
argv[4] = (char *)theSlot;
argc = 5;
}
-
+
if (runfullscreen) {
argv[argc++] = "--fullscreen";
}
@@ -1571,10 +1571,10 @@ static void handle_run_graphics_app(GUI_RPC_CONN& grc) {
argv[argc] = 0;
retval = run_program(execDir, execPath, argc, argv, newPID);
}
-
+
if (retval) {
grc.mfout.printf("couldn't run graphics app \n");
- stop_graphics_app(thePID, iBrandID, current_dir, switcher_path,
+ stop_graphics_app(thePID, iBrandID, current_dir, switcher_path,
theScreensaverLoginUser, grc);
} else {
grc.mfout.printf(" \n");
diff --git a/client/hostinfo_network.cpp b/client/hostinfo_network.cpp
index d6f0d97e722..cbbdabfbc65 100644
--- a/client/hostinfo_network.cpp
+++ b/client/hostinfo_network.cpp
@@ -19,7 +19,7 @@
#ifdef _WIN32
#include "boinc_win.h"
-#else
+#else
#include "config.h"
#include
#include
@@ -94,7 +94,7 @@ int HOST_INFO::get_local_network_info() {
#endif
struct sockaddr_storage s;
-
+
safe_strcpy(domain_name, "");
// it seems like we should use getdomainname() instead of gethostname(),
diff --git a/client/hostinfo_unix.cpp b/client/hostinfo_unix.cpp
index 35b7b3f6dbd..cec9401f5f7 100644
--- a/client/hostinfo_unix.cpp
+++ b/client/hostinfo_unix.cpp
@@ -2151,29 +2151,29 @@ union headeru {
};
// Get the architecture of this computer's CPU: x86_64 or arm64.
-// Read the executable file's mach-o headers to determine the
+// Read the executable file's mach-o headers to determine the
// architecture(s) of its code.
// Returns 1 if application can run natively on this computer,
// else returns 0.
//
-// ToDo: determine whether x86_64 graphics apps emulated on arm64 Macs
-// properly run under Rosetta 2. Note: years ago, PowerPC apps emulated
+// ToDo: determine whether x86_64 graphics apps emulated on arm64 Macs
+// properly run under Rosetta 2. Note: years ago, PowerPC apps emulated
// by Rosetta on i386 Macs crashed when running graphics.
//
bool can_run_on_this_CPU(char* exec_path) {
FILE *f;
int retval = false;
-
+
headeru myHeader;
fat_arch fatHeader;
-
+
static bool x86_64_CPU = false;
static bool arm64_cpu = false;
static bool need_CPU_architecture = true;
uint32_t n, i, len;
uint32_t theMagic;
integer_t file_architecture;
-
+
if (need_CPU_architecture) {
// Determine the architecture of the CPU we are running on
// ToDo: adjust this code accordingly.
@@ -2181,21 +2181,21 @@ bool can_run_on_this_CPU(char* exec_path) {
size_t size = sizeof (cputype);
int res = sysctlbyname ("hw.cputype", &cputype, &size, NULL, 0);
if (res) return false; // Should never happen
- // Since we require MacOS >= 10.7, the CPU must be x86_64 or arm64
+ // Since we require MacOS >= 10.7, the CPU must be x86_64 or arm64
x86_64_CPU = ((cputype &0xff) == CPU_TYPE_X86);
arm64_cpu = ((cputype &0xff) == CPU_TYPE_ARM);
need_CPU_architecture = false;
}
-
+
f = boinc_fopen(exec_path, "rb");
if (!f) {
return retval; // Should never happen
}
-
+
myHeader.fat.magic = 0;
myHeader.fat.nfat_arch = 0;
-
+
fread(&myHeader, 1, sizeof(fat_header), f);
theMagic = myHeader.mach.magic;
switch (theMagic) {
diff --git a/client/hostinfo_win.cpp b/client/hostinfo_win.cpp
index 7e5daa20b4a..b895ee9fca8 100644
--- a/client/hostinfo_win.cpp
+++ b/client/hostinfo_win.cpp
@@ -213,7 +213,7 @@ static unsigned long long _xgetbv(unsigned int index){
unsigned int A=0, D=0;
#ifdef __GNUC__
- #ifdef ASM_SUPPORTS_XGETBV
+ #ifdef ASM_SUPPORTS_XGETBV
__asm__ __volatile__("xgetbv" : "=a"(A), "=d"(D) : "c"(index));
#else
__asm__ __volatile__(".byte 0x0f, 0x01, 0xd0": "=a"(A), "=d"(D) : "c"(index));
@@ -248,14 +248,14 @@ static unsigned long long _xgetbv(unsigned int index){
#else
static void __cpuid(unsigned int cpuinfo[4], unsigned int type) {
#ifdef __GNUC__
- #ifdef ASM_SUPPORTS_CPUID
- __asm__ __volatile__("cpuid"
- : "=a" (cpuinfo[0]), "=b" (cpuinfo[1]),
- "=c" (cpuinfo[2]), "=d" (cpuinfo[3])
+ #ifdef ASM_SUPPORTS_CPUID
+ __asm__ __volatile__("cpuid"
+ : "=a" (cpuinfo[0]), "=b" (cpuinfo[1]),
+ "=c" (cpuinfo[2]), "=d" (cpuinfo[3])
: "a" (type));
#else
__asm__ __volatile__(".byte 0x0f, 0xa2"
- : "=a" (cpuinfo[0]), "=b" (cpuinfo[1]),
+ : "=a" (cpuinfo[0]), "=b" (cpuinfo[1]),
"=c" (cpuinfo[2]), "=d" (cpuinfo[3])
: "a" (type));
#endif
@@ -1202,10 +1202,10 @@ bool is_avx_supported() {
// the instruction needs to be conditionally run.
unsigned int a,b,c,d;
get_cpuid(1, a, b, c, d);
-
+
bool osUsesXSAVE_XRSTORE = c & (1 << 27) || false;
bool cpuAVXSuport = c & (1 << 28) || false;
-
+
if (osUsesXSAVE_XRSTORE && cpuAVXSuport)
{
// Check if the OS will save the YMM registers
@@ -1276,7 +1276,7 @@ int get_processor_features(char* vendor, char* features, int features_size) {
struc_ext_supported = 1;
get_cpuid(0x00000007, struc_eax, struc_ebx, struc_ecx, struc_edx);
}
-
+
FEATURE_TEST(std_supported, (std_edx & (1 << 0)), "fpu ");
FEATURE_TEST(std_supported, (std_edx & (1 << 1)), "vme ");
FEATURE_TEST(std_supported, (std_edx & (1 << 2)), "de ");
@@ -1425,7 +1425,7 @@ int get_processor_info(
);
#else
int family = 0, model = 0, stepping = 0;
- get_processor_version(family, model, stepping);
+ get_processor_version(family, model, stepping);
snprintf(p_model, p_model_size,
"%s [Family %d Model %d Stepping %d]",
processor_name, family, model, stepping
diff --git a/client/hostinfo_wsl.cpp b/client/hostinfo_wsl.cpp
index 6ab80600f09..211c45fbb0a 100644
--- a/client/hostinfo_wsl.cpp
+++ b/client/hostinfo_wsl.cpp
@@ -27,7 +27,7 @@ bool get_available_wsls(std::vector& wsls, std::string& default_wsl
const std::string lxss_path = "Software\\Microsoft\\Windows\\CurrentVersion\\Lxss";
HKEY hKey;
-
+
default_wsl.clear();
LONG lRet = RegOpenKeyEx(HKEY_CURRENT_USER,
@@ -44,7 +44,7 @@ bool get_available_wsls(std::vector& wsls, std::string& default_wsl
(LPBYTE)default_wsl_guid, &default_wsl_guid_len);
if ((lRet != ERROR_SUCCESS) || (default_wsl_guid_len > buf_len))
return false;
-
+
int i = 0;
while(true) {
char wsl_guid[buf_len];
@@ -84,7 +84,7 @@ bool get_available_wsls(std::vector& wsls, std::string& default_wsl
}
RegCloseKey(hSubKey);
- }
+ }
}
RegCloseKey(hKey);
diff --git a/client/http_curl.cpp b/client/http_curl.cpp
index 4d754f3b5b4..e3bc770d8e5 100644
--- a/client/http_curl.cpp
+++ b/client/http_curl.cpp
@@ -680,9 +680,9 @@ int HTTP_OP::libcurl_exec(
}
#ifdef __APPLE__
- // cURL 7.19.7 with c-ares 1.7.0 did not fall back to IPv4 when IPv6
- // DNS lookup failed on Macs with certain default settings if connected
- // to the Internet by an AT&T U-Verse 2-Wire Gateway. This work-around
+ // cURL 7.19.7 with c-ares 1.7.0 did not fall back to IPv4 when IPv6
+ // DNS lookup failed on Macs with certain default settings if connected
+ // to the Internet by an AT&T U-Verse 2-Wire Gateway. This work-around
// may not be needed any more for cURL 7.21.7, but keep it to be safe.
curl_easy_setopt(curlEasy, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
#endif
@@ -796,7 +796,7 @@ void HTTP_OP::setup_proxy_session(bool no_proxy) {
} else {
curl_easy_setopt(curlEasy, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
}
- snprintf(m_curl_user_credentials, sizeof(m_curl_user_credentials),
+ snprintf(m_curl_user_credentials, sizeof(m_curl_user_credentials),
"%s:%s",
pi.http_user_name, pi.http_user_passwd
);
@@ -817,7 +817,7 @@ void HTTP_OP::setup_proxy_session(bool no_proxy) {
if (
strlen(pi.socks5_user_passwd) || strlen(pi.socks5_user_name)
) {
- snprintf(m_curl_user_credentials, sizeof(m_curl_user_credentials),
+ snprintf(m_curl_user_credentials, sizeof(m_curl_user_credentials),
"%s:%s",
pi.socks5_user_name, pi.socks5_user_passwd
);
diff --git a/client/http_curl.h b/client/http_curl.h
index 8c47cba3158..03e9c6e2325 100644
--- a/client/http_curl.h
+++ b/client/http_curl.h
@@ -57,7 +57,7 @@ class HTTP_OP {
PROXY_INFO pi;
PROJECT* project; // associated project, if any
- char m_url[1024];
+ char m_url[1024];
char m_curl_user_credentials[1024];
// string needed for proxy username/password
@@ -90,7 +90,7 @@ class HTTP_OP {
//
// reply is always written to a file
char outfile[256];
- // if specified, it's written to this file w/ optional offset
+ // if specified, it's written to this file w/ optional offset
// otherwise it's written to a temp file
// if type POST2, copy output to req1 buffer
int req1_len;
@@ -176,7 +176,7 @@ class HTTP_OP {
private:
// take an init_get/post/post2 and turns it into a libcurl request
//
- int libcurl_exec(const char* url, const char* in, const char* out,
+ int libcurl_exec(const char* url, const char* in, const char* out,
double offset, double size, bool is_post
);
};
diff --git a/client/install-sh b/client/install-sh
index e9de23842dc..594a4edbffd 100644
--- a/client/install-sh
+++ b/client/install-sh
@@ -115,7 +115,7 @@ fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
-
+
if [ -d $dst ]; then
instcmd=:
chmodcmd=""
@@ -125,7 +125,7 @@ if [ x"$dir_arg" != x ]; then
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
+# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
@@ -135,7 +135,7 @@ else
echo "install: $src does not exist"
exit 1
fi
-
+
if [ x"$dst" = x ]
then
echo "install: no destination specified"
@@ -163,7 +163,7 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
-defaultIFS='
+defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
@@ -202,17 +202,17 @@ else
# If we're going to rename the final executable, determine the name now.
- if [ x"$transformarg" = x ]
+ if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
- dstfile=`basename $dst $transformbasename |
+ dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
- if [ x"$dstfile" = x ]
+ if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
@@ -243,7 +243,7 @@ else
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
diff --git a/client/log_flags.cpp b/client/log_flags.cpp
index 1e585ba2334..842d6a4f283 100644
--- a/client/log_flags.cpp
+++ b/client/log_flags.cpp
@@ -469,8 +469,8 @@ int CC_CONFIG::parse_options_client(XML_PARSER& xp) {
if (xp.parse_string("device_name", device_name)) continue;
// The following tags have been moved to nvc_config and NVC_CONFIG_FILE,
- // but CC_CONFIG::write() in older clients
- // may have written their default values to CONFIG_FILE.
+ // but CC_CONFIG::write() in older clients
+ // may have written their default values to CONFIG_FILE.
// Silently skip them if present.
//
if (xp.parse_string("client_download_url", s)) continue;
diff --git a/client/mac_address.cpp b/client/mac_address.cpp
index 03de5281b6e..9cd1c5aa8f6 100644
--- a/client/mac_address.cpp
+++ b/client/mac_address.cpp
@@ -70,7 +70,7 @@
#if defined(__FreeBSD__)
#include
#include
-#endif
+#endif
#include "mac_address.h"
@@ -164,7 +164,7 @@ int get_mac_address(char* address) {
PIP_ADAPTER_INFO pAdapterInfo = AdapterInfo; // Contains pointer to current adapter info
while (pAdapterInfo) {
snprintf(address, sizeof(address), "%02x:%02x:%02x:%02x:%02x:%02x",
- pAdapterInfo->Address[0], pAdapterInfo->Address[1], pAdapterInfo->Address[2],
+ pAdapterInfo->Address[0], pAdapterInfo->Address[1], pAdapterInfo->Address[2],
pAdapterInfo->Address[3], pAdapterInfo->Address[4], pAdapterInfo->Address[5]
);
if (pAdapterInfo->Type == MIB_IF_TYPE_ETHERNET) break;
@@ -250,7 +250,7 @@ int get_mac_address(char* address) {
#else
struct ifreq *item = &ifr[i];
#endif
- struct ether_addr *hw_addr;
+ struct ether_addr *hw_addr;
/* Get the MAC address */
#ifdef SIOCGIFHWADDR
if(ioctl(sck, SIOCGIFHWADDR, item) < 0) {
@@ -265,7 +265,7 @@ int get_mac_address(char* address) {
close(sck);
return -1;
}
- hw_addr = (struct ether_addr *)&(item->lifr_lifru.lifru_enaddr);
+ hw_addr = (struct ether_addr *)&(item->lifr_lifru.lifru_enaddr);
#elif defined(__FreeBSD__)
struct ifaddrs *ifap, *ifaptr;
unsigned char *ptr;
diff --git a/client/main.cpp b/client/main.cpp
index 0c10f5827e5..75f376a0282 100644
--- a/client/main.cpp
+++ b/client/main.cpp
@@ -231,7 +231,7 @@ static void init_core_client(int argc, char** argv) {
#endif
read_config_file(true);
-
+
// NOTE: this must be called BEFORE newer_version_startup_check()
// Only branded builds of BOINC should have an nvc_config.xml file
// in the BOINC Data directory. See comments in current_version.cpp.
@@ -239,7 +239,7 @@ static void init_core_client(int argc, char** argv) {
if (read_nvc_config_file()) {
// msg_printf(NULL, MSG_INFO, "nvc_config.xml not found - using defaults");
}
-
+
// Win32 - detach from console if requested
#ifdef _WIN32
if (gstate.detach_console) {
@@ -271,7 +271,7 @@ static void init_core_client(int argc, char** argv) {
//
static void do_gpu_detection(int argc, char** argv) {
vector warnings;
-
+
boinc_install_signal_handlers();
gstate.parse_cmdline(argc, argv);
gstate.now = dtime();
diff --git a/client/net_stats.cpp b/client/net_stats.cpp
index 558df99ff27..bd90bd0ecd8 100644
--- a/client/net_stats.cpp
+++ b/client/net_stats.cpp
@@ -271,10 +271,10 @@ void NET_STATUS::poll() {
// otherwise might show spurious "need connection" message
//
if (gstate.now < gstate.last_wakeup_time + 30) return;
- // wait until after a round of automatic proxy detection
+ // wait until after a round of automatic proxy detection
// before attempting to contact the reference site
//
- if (working_proxy_info.autodetect_proxy_supported &&
+ if (working_proxy_info.autodetect_proxy_supported &&
working_proxy_info.need_autodetect_proxy_settings &&
!working_proxy_info.have_autodetect_proxy_settings) return;
diff --git a/client/os2/boinc_attach.cmd b/client/os2/boinc_attach.cmd
index 6321e710806..9c6a2c34a92 100644
--- a/client/os2/boinc_attach.cmd
+++ b/client/os2/boinc_attach.cmd
@@ -1,4 +1,4 @@
-/*
+/*
* Boinc Attach - (c) 2005 Yuri Dario
*
* Attach a new project to boinc client
diff --git a/client/project.h b/client/project.h
index d7c06da34d3..56b6d0ca427 100644
--- a/client/project.h
+++ b/client/project.h
@@ -188,7 +188,7 @@ struct PROJECT : PROJ_AM {
bool dont_use_dcf;
bool suspended_via_gui;
- bool dont_request_more_work;
+ bool dont_request_more_work;
// Return work, but don't request more
// Used for a clean exit to a project,
// or if a user wants to pause doing work for the project
@@ -219,7 +219,7 @@ struct PROJECT : PROJ_AM {
// If it's the last one, set project_files_downloaded_time to now
void update_duration_correction_factor(ACTIVE_TASK*);
-
+
// fields used by CPU scheduler and work fetch
// everything from here on applies only to CPU intensive projects
diff --git a/client/result.cpp b/client/result.cpp
index 20d707b0354..c5f4bd57291 100644
--- a/client/result.cpp
+++ b/client/result.cpp
@@ -440,7 +440,7 @@ int RESULT::write_gui(MIOFILE& out, bool check_resources) {
}
}
// update app version resources
- if (strlen(resources)>1) {
+ if (strlen(resources)>1) {
char buf[256];
safe_strcpy(buf, "");
if (atp && atp->scheduler_state == CPU_SCHED_SCHEDULED) {
diff --git a/client/result.h b/client/result.h
index 40743d50908..38cf2a8a1a0 100644
--- a/client/result.h
+++ b/client/result.h
@@ -129,7 +129,7 @@ struct RESULT {
}
inline bool computing_done() {
- if (state() >= RESULT_COMPUTE_ERROR) return true;
+ if (state() >= RESULT_COMPUTE_ERROR) return true;
if (ready_to_report) return true;
return false;
}
diff --git a/client/rrsim_test.cpp b/client/rrsim_test.cpp
index 46f989cf90c..602c5bd7532 100644
--- a/client/rrsim_test.cpp
+++ b/client/rrsim_test.cpp
@@ -366,7 +366,7 @@ bool CLIENT_STATE::rr_simulation() {
if (end_time < buf_end) {
d_time = buf_end - end_time;
// if this is the last result for this project, account for the tail
- if (!pbest->active.size()) {
+ if (!pbest->active.size()) {
pbest->cpu_shortfall += d_time * proj_cpu_share;
if (log_flags.rr_simulation) {
msg_printf(pbest, MSG_INFO, "rr_sim proj out of work; shortfall %f d %f pcs %f",
@@ -379,7 +379,7 @@ bool CLIENT_STATE::rr_simulation() {
msg_printf(0, MSG_INFO,
"rr_sim total: idle cpus %d, last active %d, active %d, shortfall %f",
nidle_cpus, last_active_size, (int)active.size(), cpu_shortfall
-
+
);
msg_printf(0, MSG_INFO,
"rr_sim proj %s: last active %d, active %d, shortfall %f",
diff --git a/client/sandbox.cpp b/client/sandbox.cpp
index 4ca8e928422..86255be6c8a 100644
--- a/client/sandbox.cpp
+++ b/client/sandbox.cpp
@@ -25,7 +25,7 @@
#include
#include
#include
-#include
+#include
#include
#include
#include
@@ -48,10 +48,10 @@ bool g_use_sandbox = false;
#ifndef _WIN32
-// POSIX requires that shells run from an application will use the
-// real UID and GID if different from the effective UID and GID.
-// Mac OS 10.4 did not enforce this, but OS 10.5 does. Since
-// system() invokes a shell, we can't use it to run the switcher
+// POSIX requires that shells run from an application will use the
+// real UID and GID if different from the effective UID and GID.
+// Mac OS 10.4 did not enforce this, but OS 10.5 does. Since
+// system() invokes a shell, we can't use it to run the switcher
// or setprojectgrp utilities, so we must do a fork() and execv().
//
int switcher_exec(const char *util_filename, const char* cmdline) {
@@ -75,7 +75,7 @@ int switcher_exec(const char *util_filename, const char* cmdline) {
perror("pipe() for fds_out failed in switcher_exec");
return ERR_PIPE;
}
-
+
if (pipe(fds_err) == -1) {
perror("pipe() for fds_err failed in switcher_exec");
return ERR_PIPE;
@@ -104,7 +104,7 @@ int switcher_exec(const char *util_filename, const char* cmdline) {
// Parent only needs one-way (read) pipes so close write pipes
close(fds_out[1]);
close(fds_err[1]);
-
+
// Capture stdout output
while (1) {
ssize_t count = read(fds_out[0], buffer, sizeof(buffer));
@@ -167,10 +167,10 @@ int switcher_exec(const char *util_filename, const char* cmdline) {
int kill_via_switcher(int pid) {
char cmd[1024];
-
+
if (!g_use_sandbox) return 0;
- // if project application is running as user boinc_project and
+ // if project application is running as user boinc_project and
// client is running as user boinc_master,
// we cannot send a signal directly, so use switcher.
//
@@ -202,7 +202,7 @@ int remove_project_owned_file_or_dir(const char* path) {
int get_project_gid() {
if (g_use_sandbox) {
#ifdef _DEBUG
- // GDB can't attach to applications which are running as a different user
+ // GDB can't attach to applications which are running as a different user
// or group, so fix up data with current user and group during debugging
gstate.boinc_project_gid = getegid();
#else
@@ -214,15 +214,15 @@ int get_project_gid() {
return 0;
}
-// Graphics apps called by screensaver or Manager (via Show
+// Graphics apps called by screensaver or Manager (via Show
// Graphics button) now write files in their slot directory as
-// the logged in user, not boinc_master. This ugly hack uses
+// the logged in user, not boinc_master. This ugly hack uses
// setprojectgrp to fix all ownerships in this slot directory.
#ifdef __APPLE__
int fix_slot_owners(const int slot){
char relative_path[100];
char full_path[MAXPATHLEN];
-
+
if (g_use_sandbox) {
snprintf(relative_path, sizeof(relative_path), "slots/%d", slot);
realpath(relative_path, full_path);
@@ -247,7 +247,7 @@ int fix_owners_in_directory(char* dir_path) {
uid_t boinc_master_uid = -1;
uid_t boinc_project_uid = -1;
gid_t boinc_project_gid = -1;
-
+
pw = getpwnam(BOINC_MASTER_USER_NAME);
if (pw == NULL) return -1;
boinc_master_uid = pw->pw_uid;
@@ -255,7 +255,7 @@ int fix_owners_in_directory(char* dir_path) {
pw = getpwnam(BOINC_PROJECT_USER_NAME);
if (pw == NULL) return -1;
boinc_project_uid = pw->pw_uid;
-
+
lookup_group(BOINC_PROJECT_GROUP_NAME, boinc_project_gid);
dirp = opendir(dir_path);
diff --git a/client/scheduler_op.h b/client/scheduler_op.h
index 576a556b821..583de64e91b 100644
--- a/client/scheduler_op.h
+++ b/client/scheduler_op.h
@@ -38,7 +38,7 @@
#define RETRY_CAP 10
// cap on nrpc_failures
#define MASTER_FETCH_RETRY_CAP 3
- // after this many master-fetch failures,
+ // after this many master-fetch failures,
// move into a state in which we retry master fetch
// at the frequency below
#define MASTER_FETCH_INTERVAL (86400) // 1 day
@@ -121,9 +121,9 @@ struct SCHEDULER_REPLY {
char* code_sign_key_signature;
bool message_ack;
bool project_is_down;
- bool send_file_list;
- bool send_full_workload;
- bool dont_use_dcf;
+ bool send_file_list;
+ bool send_full_workload;
+ bool dont_use_dcf;
int send_time_stats_log;
int send_job_log;
int scheduler_version;
diff --git a/client/scripts/boinc-client.conf b/client/scripts/boinc-client.conf
index 10ca6cc73e9..6c87c759ac7 100644
--- a/client/scripts/boinc-client.conf
+++ b/client/scripts/boinc-client.conf
@@ -24,18 +24,18 @@
#LOCKFILE=/var/run/${BOINCEXE_NAME}.lock
-# BOINC options: for the command line when running the client.
+# BOINC options: for the command line when running the client.
# Be aware that --allow_remote_gui_rpc opens up your machine to the world!
#
# Add this option if you want to allow boinc manager connections from remote
# machines
-#BOINCOPTS="--allow_remote_gui_rpc"
+#BOINCOPTS="--allow_remote_gui_rpc"
# Add this option if you want to turn off all logging
#BOINCOPTS="--daemon"
# Add this option if you want to redirect logging to the files stderrdae.txt
# and stdoutdae.txt in BOINCDIR rather than LOGFILE and ERRORLOG
#BOINCOPTS="--redirectio"
-# Add this option if you want to run only when no logins from anywhere are
+# Add this option if you want to run only when no logins from anywhere are
# active
#BOINCOPTS="--check_all_logins"
# The default is no options.
diff --git a/client/scripts/boinc-client.in b/client/scripts/boinc-client.in
index 4fb2ed04e6e..9efd7f028e4 100755
--- a/client/scripts/boinc-client.in
+++ b/client/scripts/boinc-client.in
@@ -1,18 +1,18 @@
-#!/bin/sh
+#!/bin/sh
#
# BOINC - start and stop the BOINC client daemon on Unix
#
# Unix start/stop script to run the BOINC client as a daemon at
# system startup, as the 'boinc' user (not root!).
#
-# This version should work on unixes that have bash, zsh, or ksh. If
-# started with another Bourne compatible shell, it will attempt to restart
+# This version should work on unixes that have bash, zsh, or ksh. If
+# started with another Bourne compatible shell, it will attempt to restart
# in bash, zsh, or ksh.
#
# Metadata for chkconfig and the SUSE equivalent INIT info are included below.
#
# Usage: boinc { start | stop | status | reload | restart }
-#
+#
###
# chkconfig: 345 98 02
# description: This script starts the local BOINC client as a daemon
@@ -25,7 +25,7 @@
# Provides: boinc
# Required-Start: $network
# Required-Stop: $network
-# Default-Start: 3 4 5
+# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: This script monitors the BOINC client.
# Description: This script starts the local BOINC client as a daemon
@@ -35,15 +35,15 @@
#
# Eric Myers - 27 July 2004
# Department of Physics and Astronomy, Vassar College, Poughkeepsie NY
-# Eric Myers
+# Eric Myers
# Spy Hill Research, Poughkeepsie, New York
# @(#) $Id: boinc,v 1.10 2007/12/27 20:09:09 myers Exp $
#
# Modified by Eric Korpela - 11 Apr 2008
########################################################################
-# Defaults, which can be overridden by putting new NAME=value lines
-# in /etc/sysconfig/boinc-client, /etc/default/boinc-client,
+# Defaults, which can be overridden by putting new NAME=value lines
+# in /etc/sysconfig/boinc-client, /etc/default/boinc-client,
# /etc/boinc-client.conf, or the same files under ${sysconfdir}
## These 4 installation dirs set by autoconf. ##########################
@@ -67,7 +67,7 @@ fi
########################################################################
#
-# Figure out if we are running under an acceptable shell
+# Figure out if we are running under an acceptable shell
# (bash, ksh, zsh) which supports functions.
#
########################################################################
@@ -86,7 +86,7 @@ if [ -z "$BASH_VERSION" -a -z "$ZSH_VERSION" ] ; then
# as far as I can tell we aren't in an approved shell
TRIES=`expr $TRIES + 1`
# have we tried too many times?
- if [ $TRIES -gt 4 ] ; then
+ if [ $TRIES -gt 4 ] ; then
echo "ERROR: endless loop discovered in $0 [ERROR]"
exit 1
fi
@@ -118,12 +118,12 @@ fi
BOINCUSER=boinc
# Working directory. Could be /home/boinc, /var/lib/boinc, etc..
-# The reason I prefer /var/lib/boinc is that this works best for a
+# The reason I prefer /var/lib/boinc is that this works best for a
# cluster of computers where /home/anything might be shared between machines
#
BOINCDIR=/var/lib/boinc
-# Name of the client executable. This is the file "boinc" if you
+# Name of the client executable. This is the file "boinc" if you
# unpacked the download file boinc_M.mm.rr_i686-pc-linux-gnu.sh,
# but I like to rename it and put it in a public place.
# (Hint: move boincmgr to /usr/local/bin too so anyone can easily use it).
@@ -141,18 +141,18 @@ ERRORLOG=/var/log/${BOINCEXE_NAME}_err.log
# PID file
PIDFILE=/var/run/${BOINCEXE_NAME}.pid
-# BOINC options: for the command line when running the client.
+# BOINC options: for the command line when running the client.
# Be aware that --allow_remote_gui_rpc opens up your machine to the world!
#
# Add this option if you want to allow boinc manager connections from remote
# machines
-#BOINCOPTS="--allow_remote_gui_rpc"
+#BOINCOPTS="--allow_remote_gui_rpc"
# Add this option if you want to turn off all logging
#BOINCOPTS="--daemon"
# Add this option if you want to redirect logging to the files stderrdae.txt
# and stdoutdae.txt in BOINCDIR rather than LOGFILE and ERRORLOG
#BOINCOPTS="--redirectio"
-# Add this option if you want to run only when no logins from anywhere are
+# Add this option if you want to run only when no logins from anywhere are
# active
#BOINCOPTS="--check_all_logins"
# The default is no options.
@@ -196,15 +196,15 @@ else
function echo_warning () { $printcol "[WARNING]" ; }
function killproc() {
PID=`local_pidof $1`
- [ $PID ] && kill $PID
+ [ $PID ] && kill $PID
}
fi
# check if we have pidof. If not use ps and grep for the same job.
-if [ -x /sbin/pidof ] ; then
- function local_pidof() {
- pidof -s -x -o $$ -o $PPID -o %PPID $1
- }
+if [ -x /sbin/pidof ] ; then
+ function local_pidof() {
+ pidof -s -x -o $$ -o $PPID -o %PPID $1
+ }
else
function local_pidof() {
${PS} xaugww | sed 's/$/ /' | grep "[ /]$1 " | grep -v $$ | grep -v $PPID | grep -v %PPID | grep -v grep | awk '{print $2}' | head -1
@@ -212,12 +212,12 @@ else
fi
#
-# Check if we have runuser, since it will never hang waiting for a password.
+# Check if we have runuser, since it will never hang waiting for a password.
# If we don't have it, use su for the same job.
-#
+#
if [ ! -x /sbin/runuser ] ; then
RUNUSER="su -s /bin/sh"
-else
+else
RUNUSER=runuser
fi
@@ -248,8 +248,8 @@ none
## find the correct config file
for config_file in $config_files ; do
- if [ -f ${config_file} ] ; then
- break;
+ if [ -f ${config_file} ] ; then
+ break;
fi
done
@@ -303,8 +303,8 @@ fi
## Check that BOINCUSER actually exists
if [ -z "`grep ^${BOINCUSER}: /etc/passwd`" ] ; then
- if [ -z "`ypcat passwd 2>/dev/null | grep ^${BOINCUSER}:`" ] ; then
- if [ -z "`nidump passwd / 2>/dev/null | grep ^${BOINCUSER}:`" ] ; then
+ if [ -z "`ypcat passwd 2>/dev/null | grep ^${BOINCUSER}:`" ] ; then
+ if [ -z "`nidump passwd / 2>/dev/null | grep ^${BOINCUSER}:`" ] ; then
echo -n ERROR: user ${BOINCUSER} does not exist.
echo_failure
echo
@@ -339,7 +339,7 @@ elif [ "${USERNOW}" = "root" ] ; then
fi
-## Locate the executable, either boinc_client, boinc,
+## Locate the executable, either boinc_client, boinc,
## or boinc_M.mm_.... with highest version number
## We only do this if BOINCEXE set above isn't found or is not executable.
if [ ! -x $BOINCEXE ]; then
@@ -352,7 +352,7 @@ fi
if [ ! -x "$BOINCEXE" ]; then
echo -n "Cannot find an executable for the BOINC client."
echo_failure
- echo
+ echo
exit 2
fi
@@ -384,10 +384,10 @@ case "$1" in
if [ -z "$PID" ] ; then
# a lockfile exists, but boinc_client isn't running
/bin/rm -f lockfile $LOCKFILE $PIDFILE 2>&1 > /dev/null
- else
+ else
echo -n "Another instance of BOINC is running (PID=${PID})."
echo_failure
- echo
+ echo
exit 1
fi
fi
@@ -395,24 +395,24 @@ case "$1" in
if [ ! -d projects ] ; then
echo -n "The BOINC client requires initialization."
echo_warning
- echo
+ echo
fi
touch ${LOGFILE} ${ERRORLOG}
NOCORE="ulimit -c 0 2>&1 >/dev/null"
echo -n "Starting BOINC client as a daemon: "
- if [ "${BOINCUSER}" = "${USERNOW}" ] ; then
+ if [ "${BOINCUSER}" = "${USERNOW}" ] ; then
# I am BOINCUSER. Just start client as me.
$NOCORE
$BOINCEXE $BOINCOPTS >>$LOGFILE 2>>$ERRORLOG &
else
chown ${BOINCUSER} ${LOGFILE} ${ERRORLOG}
if [ -f gui_rpc_auth.cfg ] ; then
- chmod g+r gui_rpc_auth.cfg
+ chmod g+r gui_rpc_auth.cfg
fi
${RUNUSER} - $BOINCUSER -c "$NOCORE ; $BOINCEXE $BOINCOPTS >>$LOGFILE 2>>$ERRORLOG" 2>/dev/null > /dev/null &
fi
- sleep 3
+ sleep 3
PID=`local_pidof $BOINCEXE_NAME`
if [ $PID ]; then
echo $PID > $PIDFILE
@@ -426,7 +426,7 @@ case "$1" in
echo -n "BOINC is not running (no lockfiles found)."
echo_success
else
- echo -n "Stopping BOINC client daemon: "
+ echo -n "Stopping BOINC client daemon: "
if [ -f $PIDFILE ] ; then
PID=`cat $PIDFILE`
if [ -n "`${PS} $PID | grep $PID`" ] ; then
@@ -440,7 +440,7 @@ case "$1" in
echo
fi
else
- killproc $BOINCEXE_NAME && echo_success || echo_failure
+ killproc $BOINCEXE_NAME && echo_success || echo_failure
fi
# clean up in any case
rm -f lockfile 2>/dev/null >/dev/null
@@ -480,10 +480,10 @@ case "$1" in
if [ "$PID" != "" ]; then
echo "BOINC client is running (pid $PID)."
else
- if [ -f $BOINCDIR/lockfile -o -f $LOCKFILE ]; then
+ if [ -f $BOINCDIR/lockfile -o -f $LOCKFILE ]; then
echo "BOINC is stopped but lockfile(s) exist."
exit 2
- else
+ else
echo "BOINC client is stopped."
exit 3
fi
diff --git a/client/setprojectgrp.cpp b/client/setprojectgrp.cpp
index e06c35ce39d..7939ef17ca5 100644
--- a/client/setprojectgrp.cpp
+++ b/client/setprojectgrp.cpp
@@ -69,13 +69,13 @@ int main(int argc, char** argv) {
print_to_log_file("setprojectgrp: argc=%d, arg[1]= %s, boinc_project gid = %d\n", argc, argv[1], project_gid);
#endif
- // chown() doesn't change ownership of symbolic links; it follows the link and
+ // chown() doesn't change ownership of symbolic links; it follows the link and
// changes the file is not available in OS 10.3.9.
//
- // But we don't really need to worry about this, because the system ignores
+ // But we don't really need to worry about this, because the system ignores
// ownership & permissions of symbolic links anyway.
//
- // Also, the target of a symbolic link may not be present if the slot containing
+ // Also, the target of a symbolic link may not be present if the slot containing
// the link is no longer in use.
//
if (lstat(argv[1], &sbuf) == 0) {
@@ -101,7 +101,7 @@ static void print_to_log_file(const char *format, ...) {
va_list args;
char buf[256];
time_t t;
-
+
f = fopen("/Users/Shared/test_log_gfx_switcher.txt", "a");
if (!f) return;
@@ -118,7 +118,7 @@ static void print_to_log_file(const char *format, ...) {
va_start(args, format);
vfprintf(f, format, args);
va_end(args);
-
+
fputs("\n", f);
fflush(f);
fclose(f);
diff --git a/client/sim.cpp b/client/sim.cpp
index d4955aaadf0..4698b8989c3 100644
--- a/client/sim.cpp
+++ b/client/sim.cpp
@@ -514,7 +514,7 @@ bool CLIENT_STATE::scheduler_rpc_poll() {
break;
}
#endif
-
+
p = find_project_with_overdue_results(false);
if (p) {
msg_printf(p, MSG_INFO, "doing RPC to report results");
diff --git a/client/switcher.cpp b/client/switcher.cpp
index 95066a92772..2d20acabbf7 100644
--- a/client/switcher.cpp
+++ b/client/switcher.cpp
@@ -81,11 +81,11 @@ int main(int /*argc*/, char** argv) {
strcpy(boinc_master_user_name, "boinc_master");
#if VERBOSE // For debugging only
- print_to_log_file("\n\nEntered switcher with euid %d, egid %d, uid %d and gid %d\n", geteuid(), getegid(), getuid(), getgid());
+ print_to_log_file("\n\nEntered switcher with euid %d, egid %d, uid %d and gid %d\n", geteuid(), getegid(), getuid(), getgid());
getcwd( current_dir, sizeof(current_dir));
print_to_log_file("current directory = %s\n", current_dir);
fflush(stderr);
-
+
i = 0;
while(argv[i]) {
print_to_log_file("switcher arg %d: %s\n", i, argv[i]);
@@ -110,7 +110,7 @@ int main(int /*argc*/, char** argv) {
#ifdef __APPLE__
// Under fast user switching, the BOINC client may be running under a
- // different login than the screensaver
+ // different login than the screensaver
//
// If we need to join a different process group, it must be the last argument.
// This is currently used for OS 10.15+
@@ -123,7 +123,7 @@ int main(int /*argc*/, char** argv) {
++i;
}
#endif
-
+
if (!screensaverLoginUser) {
// Satisfy an error / warning from rpmlint: ensure that
// we drop any supplementary groups associated with root
@@ -192,29 +192,29 @@ int main(int /*argc*/, char** argv) {
// Used under OS 10.15 Catalina and later to launch screensaver graphics apps
//
// BOINC screensaver plugin BOINCSaver.saver (BOINC Screensaver Coordinator)
- // sends a run_graphics_app RPC to the BOINC client. The BOINC client then
+ // sends a run_graphics_app RPC to the BOINC client. The BOINC client then
// launches switcher, which submits a script to launchd as a LaunchAgent
// for the user that invoked the screensaver (the currently logged in user.)
//
- // We must go through launchd to establish a connection to the windowserver
+ // We must go through launchd to establish a connection to the windowserver
// in the currently logged in user's space for use by the project graphics
- // app. This script then launches gfx_switcher, which uses fork and execv to
- // launch the project graphics app. gfx_switcher writes the graphics app's
- // process ID to shared memory, to be read by the Screensaver Coordinator.
- // gfx_switcher waits for the graphics app to exit and notifies then notifies
+ // app. This script then launches gfx_switcher, which uses fork and execv to
+ // launch the project graphics app. gfx_switcher writes the graphics app's
+ // process ID to shared memory, to be read by the Screensaver Coordinator.
+ // gfx_switcher waits for the graphics app to exit and notifies then notifies
// the Screensaver Coordinator by writing 0 to the shared memory.
//
// This Rube Goldberg process is necessary due to limitations on screensavers
// introduced in OS 10.15 Catalina.
char cmd[1024];
- // We are running setuid root, so setuid() sets real user ID,
+ // We are running setuid root, so setuid() sets real user ID,
// effective user ID and saved set_user-ID for this process
setuid(geteuid());
- // We are running setuid root, so setgid() sets real group ID,
+ // We are running setuid root, so setgid() sets real group ID,
// effective group ID and saved set_group-ID for this process
setgid(getegid());
-
+
getcwd(current_dir, sizeof(current_dir));
i = 0;
@@ -231,7 +231,7 @@ int main(int /*argc*/, char** argv) {
retval = callPosixSpawn(cmd);
return retval;
} else {
- // A new submit of edu.berkeley.boinc-ss_helper will be ignored if for some reason
+ // A new submit of edu.berkeley.boinc-ss_helper will be ignored if for some reason
// edu.berkeley.boinc-ss_helper is still loaded, so ensure it is removed.
snprintf(cmd, sizeof(cmd), "su -l \"%s\" -c 'launchctl remove edu.berkeley.boinc-ss_helper'", screensaverLoginUser);
retval = callPosixSpawn(cmd);
@@ -277,7 +277,7 @@ static void print_to_log_file(const char *format, ...) {
va_list args;
char buf[256];
time_t t;
-
+
f = fopen("/Users/Shared/test_log_gfx_switcher.txt", "a");
if (!f) return;
@@ -294,7 +294,7 @@ static void print_to_log_file(const char *format, ...) {
va_start(args, format);
vfprintf(f, format, args);
va_end(args);
-
+
fputs("\n", f);
fflush(f);
fclose(f);
diff --git a/client/sysmon_win.h b/client/sysmon_win.h
index a961d3e1e1a..8aa0d03cde4 100644
--- a/client/sysmon_win.h
+++ b/client/sysmon_win.h
@@ -41,7 +41,7 @@ extern int cleanup_system_monitor();
#define SERVICE_ACCEPTED_ACTIONS ( \
SERVICE_ACCEPT_STOP | \
SERVICE_ACCEPT_PAUSE_CONTINUE | \
- SERVICE_ACCEPT_SHUTDOWN )
+ SERVICE_ACCEPT_SHUTDOWN )
// Service Control Manager Routines
extern VOID WINAPI BOINCServiceMain(DWORD dwArgc, LPTSTR *lpszArgv);
diff --git a/client/win/boinc_cli.h b/client/win/boinc_cli.h
index feddfe408d5..9f2a30b6bff 100644
--- a/client/win/boinc_cli.h
+++ b/client/win/boinc_cli.h
@@ -4,7 +4,7 @@
//
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
diff --git a/client/win/boinc_cli.rc b/client/win/boinc_cli.rc
index 9edd8253cdf..0e80e4e0e96 100644
--- a/client/win/boinc_cli.rc
+++ b/client/win/boinc_cli.rc
@@ -62,19 +62,19 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// TEXTINCLUDE
//
-1 TEXTINCLUDE
+1 TEXTINCLUDE
BEGIN
"boinc_cli.h\0"
END
-2 TEXTINCLUDE
+2 TEXTINCLUDE
BEGIN
"#include ""winresrc.h""\r\n"
"#include ""version.h""\r\n"
"\0"
END
-3 TEXTINCLUDE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
diff --git a/client/win/boinc_cmd.h b/client/win/boinc_cmd.h
index 71f85b38a46..4d6c70a4eae 100644
--- a/client/win/boinc_cmd.h
+++ b/client/win/boinc_cmd.h
@@ -4,7 +4,7 @@
//
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
diff --git a/client/win/boinc_cmd.rc b/client/win/boinc_cmd.rc
index bfb09cb5bbd..cde9b897f91 100644
--- a/client/win/boinc_cmd.rc
+++ b/client/win/boinc_cmd.rc
@@ -61,19 +61,19 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// TEXTINCLUDE
//
-1 TEXTINCLUDE
+1 TEXTINCLUDE
BEGIN
"boinc_cmd.h\0"
END
-2 TEXTINCLUDE
+2 TEXTINCLUDE
BEGIN
"#include ""winresrc.h""\r\n"
"#include ""version.h""\r\n"
"\0"
END
-3 TEXTINCLUDE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
diff --git a/client/win/boinc_log.h b/client/win/boinc_log.h
index 71f85b38a46..4d6c70a4eae 100644
--- a/client/win/boinc_log.h
+++ b/client/win/boinc_log.h
@@ -4,7 +4,7 @@
//
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
diff --git a/client/win/boinc_log.rc b/client/win/boinc_log.rc
index 6587808bf5a..aeab5c5632c 100644
--- a/client/win/boinc_log.rc
+++ b/client/win/boinc_log.rc
@@ -59,19 +59,19 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// TEXTINCLUDE
//
-1 TEXTINCLUDE
+1 TEXTINCLUDE
BEGIN
"boinc_log.h\0"
END
-2 TEXTINCLUDE
+2 TEXTINCLUDE
BEGIN
"#include ""winresrc.h""\r\n"
"#include ""version.h""\r\n"
"\0"
END
-3 TEXTINCLUDE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
diff --git a/clientctrl/boincsvcctrl.h b/clientctrl/boincsvcctrl.h
index 72668211c8f..0e1b7d498fa 100644
--- a/clientctrl/boincsvcctrl.h
+++ b/clientctrl/boincsvcctrl.h
@@ -4,7 +4,7 @@
//
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
diff --git a/clientctrl/boincsvcctrl.rc b/clientctrl/boincsvcctrl.rc
index 7e282e60513..72cb118a2ed 100644
--- a/clientctrl/boincsvcctrl.rc
+++ b/clientctrl/boincsvcctrl.rc
@@ -43,19 +43,19 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// TEXTINCLUDE
//
-1 TEXTINCLUDE
+1 TEXTINCLUDE
BEGIN
"boincsvcctrl.h\0"
END
-2 TEXTINCLUDE
+2 TEXTINCLUDE
BEGIN
"#include ""winresrc.h""\r\n"
"#include ""version.h""\r\n"
"\0"
END
-3 TEXTINCLUDE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
diff --git a/clientgui/AccountInfoPage.cpp b/clientgui/AccountInfoPage.cpp
index 9720490eed3..140f965bdf9 100644
--- a/clientgui/AccountInfoPage.cpp
+++ b/clientgui/AccountInfoPage.cpp
@@ -44,15 +44,15 @@
/*!
* CAccountInfoPage type definition
*/
-
+
IMPLEMENT_DYNAMIC_CLASS( CAccountInfoPage, wxWizardPageEx )
-
+
/*!
* CAccountInfoPage event table definition
*/
-
+
BEGIN_EVENT_TABLE( CAccountInfoPage, wxWizardPageEx )
-
+
////@begin CAccountInfoPage event table entries
EVT_WIZARDEX_PAGE_CHANGED( wxID_ANY, CAccountInfoPage::OnPageChanged )
EVT_WIZARDEX_PAGE_CHANGING( wxID_ANY, CAccountInfoPage::OnPageChanging )
@@ -60,26 +60,26 @@ BEGIN_EVENT_TABLE( CAccountInfoPage, wxWizardPageEx )
EVT_RADIOBUTTON( ID_ACCOUNTCREATECTRL, CAccountInfoPage::OnAccountCreateCtrlSelected )
EVT_RADIOBUTTON( ID_ACCOUNTUSEEXISTINGCTRL, CAccountInfoPage::OnAccountUseExistingCtrlSelected )
////@end CAccountInfoPage event table entries
-
+
END_EVENT_TABLE()
-
+
/*!
* CAccountInfoPage constructors
*/
-
+
CAccountInfoPage::CAccountInfoPage( )
{
}
-
+
CAccountInfoPage::CAccountInfoPage( CBOINCBaseWizard* parent )
{
Create( parent );
}
-
+
/*!
* AccountInfoPage creator
*/
-
+
bool CAccountInfoPage::Create( CBOINCBaseWizard* parent )
{
@@ -99,7 +99,7 @@ bool CAccountInfoPage::Create( CBOINCBaseWizard* parent )
m_pAccountManagerLinkLabelStaticCtrl = NULL;
m_pAccountForgotPasswordCtrl = NULL;
////@end CAccountInfoPage member initialisation
-
+
////@begin CAccountInfoPage creation
wxWizardPageEx::Create( parent, ID_ACCOUNTINFOPAGE );
@@ -109,13 +109,13 @@ bool CAccountInfoPage::Create( CBOINCBaseWizard* parent )
return TRUE;
}
-
+
/*!
* Control creation for AccountInfoPage
*/
-
+
void CAccountInfoPage::CreateControls()
-{
+{
////@begin CAccountInfoPage content construction
CAccountInfoPage* itemWizardPage56 = this;
@@ -216,7 +216,7 @@ wxWizardPageEx* CAccountInfoPage::GetPrev() const
/*!
* Gets the next page.
*/
-
+
wxWizardPageEx* CAccountInfoPage::GetNext() const
{
if (CHECK_CLOSINGINPROGRESS()) {
@@ -229,20 +229,20 @@ wxWizardPageEx* CAccountInfoPage::GetNext() const
}
return NULL;
}
-
+
/*!
* Should we show tooltips?
*/
-
+
bool CAccountInfoPage::ShowToolTips()
{
return TRUE;
}
-
+
/*!
* Get bitmap resources
*/
-
+
wxBitmap CAccountInfoPage::GetBitmapResource( const wxString& WXUNUSED(name) )
{
// Bitmap retrieval
@@ -250,11 +250,11 @@ wxBitmap CAccountInfoPage::GetBitmapResource( const wxString& WXUNUSED(name) )
return wxNullBitmap;
////@end CAccountInfoPage bitmap retrieval
}
-
+
/*!
* Get icon resources
*/
-
+
wxIcon CAccountInfoPage::GetIconResource( const wxString& WXUNUSED(name) )
{
// Icon retrieval
@@ -262,11 +262,11 @@ wxIcon CAccountInfoPage::GetIconResource( const wxString& WXUNUSED(name) )
return wxNullIcon;
////@end CAccountInfoPage icon retrieval
}
-
+
/*!
* wxEVT_WIZARD_PAGE_CHANGED event handler for ID_ACCOUNTINFOPAGE
*/
-
+
void CAccountInfoPage::OnPageChanged( wxWizardExEvent& /* event */ ) {
CWizardAttach* pWA = ((CWizardAttach*)GetParent());
CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced();
@@ -274,7 +274,7 @@ void CAccountInfoPage::OnPageChanged( wxWizardExEvent& /* event */ ) {
PROJECT_CONFIG& pc = pWA->project_config;
wxString strBaseConfigLocation = wxString(wxT("/Wizards"));
wxConfigBase* pConfig = wxConfigBase::Get(FALSE);
-
+
wxASSERT(pSkinAdvanced);
wxASSERT(pSkinWizardATAM);
wxASSERT(wxDynamicCast(pSkinAdvanced, CSkinAdvanced));
@@ -350,7 +350,7 @@ void CAccountInfoPage::OnPageChanged( wxWizardExEvent& /* event */ ) {
_("&Yes, existing user")
);
} else {
- if (pSkinAdvanced->IsBranded() &&
+ if (pSkinAdvanced->IsBranded() &&
!pSkinWizardATAM->GetAccountInfoMessage().IsEmpty()) {
m_pAccountInformationStaticCtrl->SetLabel(
pSkinWizardATAM->GetAccountInfoMessage()
@@ -388,7 +388,7 @@ void CAccountInfoPage::OnPageChanged( wxWizardExEvent& /* event */ ) {
if (pc.uses_username) {
if (IS_ACCOUNTMANAGERWIZARD()) {
- if (pSkinAdvanced->IsBranded() &&
+ if (pSkinAdvanced->IsBranded() &&
!pSkinWizardATAM->GetAccountInfoMessage().IsEmpty()) {
m_pAccountInformationStaticCtrl->SetLabel(
pSkinWizardATAM->GetAccountInfoMessage()
@@ -396,7 +396,7 @@ void CAccountInfoPage::OnPageChanged( wxWizardExEvent& /* event */ ) {
}
}
- m_pAccountEmailAddressCtrl->SetValidator(
+ m_pAccountEmailAddressCtrl->SetValidator(
wxTextValidator(wxFILTER_NONE, &m_strAccountEmailAddress)
);
m_pAccountUsernameCtrl->SetValidator(
@@ -414,7 +414,7 @@ void CAccountInfoPage::OnPageChanged( wxWizardExEvent& /* event */ ) {
m_pAccountUsernameCtrl->SetValue(m_strAccountUsername);
} else {
if (IS_ACCOUNTMANAGERWIZARD()) {
- if (pSkinAdvanced->IsBranded() &&
+ if (pSkinAdvanced->IsBranded() &&
!pSkinWizardATAM->GetAccountInfoMessage().IsEmpty()) {
m_pAccountInformationStaticCtrl->SetLabel(
pSkinWizardATAM->GetAccountInfoMessage()
@@ -482,11 +482,11 @@ void CAccountInfoPage::OnPageChanged( wxWizardExEvent& /* event */ ) {
Fit();
}
-
+
/*!
* wxEVT_WIZARD_PAGE_CHANGING event handler for ID_ACCOUNTINFOPAGE
*/
-
+
void CAccountInfoPage::OnPageChanging( wxWizardExEvent& event ) {
if (event.GetDirection() == false) return;
@@ -506,7 +506,7 @@ void CAccountInfoPage::OnPageChanging( wxWizardExEvent& event ) {
pConfig->Write(wxT("DefaultUsername"), m_strAccountUsername);
pConfig->Flush();
-
+
// Construct potential dialog title
if (IS_ATTACHTOPROJECTWIZARD()) {
strTitle = _("Add project");
@@ -515,7 +515,7 @@ void CAccountInfoPage::OnPageChanging( wxWizardExEvent& event ) {
} else if (IS_ACCOUNTMANAGERWIZARD()) {
strTitle = _("Use account manager");
}
-
+
// Verify minimum username length
if (!m_pAccountUseExistingCtrl->GetValue()) {
if (!(m_pAccountPasswordCtrl->GetValue().Length() > 0)) {
@@ -546,7 +546,7 @@ void CAccountInfoPage::OnPageChanging( wxWizardExEvent& event ) {
bDisplayError = true;
}
}
-
+
if (bDisplayError) {
wxGetApp().SafeMessageBox(
@@ -567,19 +567,19 @@ void CAccountInfoPage::OnPageChanging( wxWizardExEvent& event ) {
}
}
}
-
+
/*!
* wxEVT_WIZARD_CANCEL event handler for ID_ACCOUNTINFOPAGE
*/
-
+
void CAccountInfoPage::OnCancel( wxWizardExEvent& event ) {
PROCESS_CANCELEVENT(event);
}
-
+
/*!
* wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_ACCOUNTUSEXISTINGBUTTON
*/
-
+
void CAccountInfoPage::OnAccountUseExistingCtrlSelected( wxCommandEvent& WXUNUSED(event) ) {
CWizardAttach* pWA = ((CWizardAttach*)GetParent());
PROJECT_CONFIG& pc = pWA->project_config;
@@ -599,11 +599,11 @@ void CAccountInfoPage::OnAccountUseExistingCtrlSelected( wxCommandEvent& WXUNUSE
Fit();
}
-
+
/*!
* wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_ACCOUNTCREATEBUTTON
*/
-
+
void CAccountInfoPage::OnAccountCreateCtrlSelected( wxCommandEvent& WXUNUSED(event) ) {
CWizardAttach* pWA = ((CWizardAttach*)GetParent());
PROJECT_CONFIG& pc = pWA->project_config;
diff --git a/clientgui/AccountInfoPage.h b/clientgui/AccountInfoPage.h
index cb4d2cd6cc6..22d96a7c2c1 100644
--- a/clientgui/AccountInfoPage.h
+++ b/clientgui/AccountInfoPage.h
@@ -28,7 +28,7 @@
*/
class CAccountInfoPage: public wxWizardPageEx
-{
+{
DECLARE_DYNAMIC_CLASS( CAccountInfoPage )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/AccountManagerInfoPage.h b/clientgui/AccountManagerInfoPage.h
index 7d94714736a..0e52ea51572 100644
--- a/clientgui/AccountManagerInfoPage.h
+++ b/clientgui/AccountManagerInfoPage.h
@@ -27,7 +27,7 @@
*/
class CAcctMgrListItem: public wxObject
-{
+{
DECLARE_DYNAMIC_CLASS( CAcctMgrListItem )
public:
@@ -56,7 +56,7 @@ class CAcctMgrListItem: public wxObject
*/
class CAccountManagerInfoPage: public wxWizardPageEx
-{
+{
DECLARE_DYNAMIC_CLASS( CAccountManagerInfoPage )
DECLARE_EVENT_TABLE()
@@ -85,7 +85,7 @@ class CAccountManagerInfoPage: public wxWizardPageEx
/// wxEVT_TEXT event handler for ID_PROJECTURLCTRL
void OnURLChanged( wxCommandEvent& event );
-
+
/// wxEVT_BUTTON event handler for ID_PROJECTWEBPAGECTRL
void OnProjectItemDisplay( wxCommandEvent& event );
diff --git a/clientgui/AccountManagerProcessingPage.h b/clientgui/AccountManagerProcessingPage.h
index 7299f98d532..0a8d0cd39cc 100644
--- a/clientgui/AccountManagerProcessingPage.h
+++ b/clientgui/AccountManagerProcessingPage.h
@@ -61,7 +61,7 @@ END_DECLARE_EVENT_TYPES()
*/
class CAccountManagerProcessingPage: public wxWizardPageEx
-{
+{
DECLARE_DYNAMIC_CLASS( CAccountManagerProcessingPage )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/AccountManagerPropertiesPage.h b/clientgui/AccountManagerPropertiesPage.h
index b4f69c1fd14..b6445a8174e 100644
--- a/clientgui/AccountManagerPropertiesPage.h
+++ b/clientgui/AccountManagerPropertiesPage.h
@@ -65,7 +65,7 @@ END_DECLARE_EVENT_TYPES()
*/
class CAccountManagerPropertiesPage: public wxWizardPageEx
-{
+{
DECLARE_DYNAMIC_CLASS( CAccountManagerPropertiesPage )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/AlreadyExistsPage.cpp b/clientgui/AlreadyExistsPage.cpp
index 3924b3e36fd..042ab7b6e9c 100644
--- a/clientgui/AlreadyExistsPage.cpp
+++ b/clientgui/AlreadyExistsPage.cpp
@@ -39,47 +39,47 @@
/*!
* CErrAlreadyExistsPage type definition
*/
-
+
IMPLEMENT_DYNAMIC_CLASS( CErrAlreadyExistsPage, wxWizardPageEx )
-
+
/*!
* CErrAlreadyExistsPage event table definition
*/
-
+
BEGIN_EVENT_TABLE( CErrAlreadyExistsPage, wxWizardPageEx )
-
+
////@begin CErrAlreadyExistsPage event table entries
EVT_WIZARDEX_PAGE_CHANGED( -1, CErrAlreadyExistsPage::OnPageChanged )
EVT_WIZARDEX_CANCEL( -1, CErrAlreadyExistsPage::OnCancel )
////@end CErrAlreadyExistsPage event table entries
-
+
END_EVENT_TABLE()
-
+
/*!
* CErrAlreadyExistsPage constructors
*/
-
+
CErrAlreadyExistsPage::CErrAlreadyExistsPage( )
{
}
-
+
CErrAlreadyExistsPage::CErrAlreadyExistsPage( CBOINCBaseWizard* parent )
{
Create( parent );
}
-
+
/*!
* CErrAccountAlreadyExists creator
*/
-
+
bool CErrAlreadyExistsPage::Create( CBOINCBaseWizard* parent )
{
////@begin CErrAlreadyExistsPage member initialisation
m_pTitleStaticCtrl = NULL;
m_pDirectionsStaticCtrl = NULL;
////@end CErrAlreadyExistsPage member initialisation
-
+
////@begin CErrAlreadyExistsPage creation
wxWizardPageEx::Create( parent, ID_ERRALREADYEXISTSPAGE );
@@ -89,13 +89,13 @@ bool CErrAlreadyExistsPage::Create( CBOINCBaseWizard* parent )
return TRUE;
}
-
+
/*!
* Control creation for CErrAccountAlreadyExists
*/
-
+
void CErrAlreadyExistsPage::CreateControls()
-{
+{
////@begin CErrAlreadyExistsPage content construction
CErrAlreadyExistsPage* itemWizardPage96 = this;
@@ -114,38 +114,38 @@ void CErrAlreadyExistsPage::CreateControls()
itemBoxSizer97->Add(m_pDirectionsStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
////@end CErrAlreadyExistsPage content construction
}
-
+
/*!
* Gets the previous page.
*/
-
+
wxWizardPageEx* CErrAlreadyExistsPage::GetPrev() const
{
return PAGE_TRANSITION_BACK;
}
-
+
/*!
* Gets the next page.
*/
-
+
wxWizardPageEx* CErrAlreadyExistsPage::GetNext() const
{
return NULL;
}
-
+
/*!
* Should we show tooltips?
*/
-
+
bool CErrAlreadyExistsPage::ShowToolTips()
{
return TRUE;
}
-
+
/*!
* Get bitmap resources
*/
-
+
wxBitmap CErrAlreadyExistsPage::GetBitmapResource( const wxString& WXUNUSED(name) )
{
// Bitmap retrieval
@@ -153,11 +153,11 @@ wxBitmap CErrAlreadyExistsPage::GetBitmapResource( const wxString& WXUNUSED(name
return wxNullBitmap;
////@end CErrAlreadyExistsPage bitmap retrieval
}
-
+
/*!
* Get icon resources
*/
-
+
wxIcon CErrAlreadyExistsPage::GetIconResource( const wxString& WXUNUSED(name) )
{
// Icon retrieval
@@ -166,11 +166,11 @@ wxIcon CErrAlreadyExistsPage::GetIconResource( const wxString& WXUNUSED(name) )
return wxNullIcon;
////@end CErrAlreadyExistsPage icon retrieval
}
-
+
/*!
* wxEVT_WIZARD_PAGE_CHANGED event handler for ID_ERRACCOUNTALREADYEXISTSPAGE
*/
-
+
void CErrAlreadyExistsPage::OnPageChanged( wxWizardExEvent& event ) {
if (event.GetDirection() == false) return;
@@ -197,11 +197,11 @@ void CErrAlreadyExistsPage::OnPageChanged( wxWizardExEvent& event ) {
Fit();
}
-
+
/*!
* wxEVT_WIZARD_CANCEL event handler for ID_ERRACCOUNTALREADYEXISTSPAGE
*/
-
+
void CErrAlreadyExistsPage::OnCancel( wxWizardExEvent& event ) {
PROCESS_CANCELEVENT(event);
}
diff --git a/clientgui/AlreadyExistsPage.h b/clientgui/AlreadyExistsPage.h
index 02539538969..326b17fefde 100644
--- a/clientgui/AlreadyExistsPage.h
+++ b/clientgui/AlreadyExistsPage.h
@@ -27,7 +27,7 @@
*/
class CErrAlreadyExistsPage: public wxWizardPageEx
-{
+{
DECLARE_DYNAMIC_CLASS( CErrAlreadyExistsPage )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/AsyncRPC.cpp b/clientgui/AsyncRPC.cpp
index 1f8831638f3..c34fc5c8f4a 100644
--- a/clientgui/AsyncRPC.cpp
+++ b/clientgui/AsyncRPC.cpp
@@ -99,7 +99,7 @@ AsyncRPC::AsyncRPC(CMainDocument *pDoc) {
AsyncRPC::~AsyncRPC() {}
-int AsyncRPC::RPC_Wait(RPC_SELECTOR which_rpc, void *arg1, void *arg2,
+int AsyncRPC::RPC_Wait(RPC_SELECTOR which_rpc, void *arg1, void *arg2,
void *arg3, void *arg4, bool hasPriority
) {
ASYNC_RPC_REQUEST request;
@@ -121,10 +121,10 @@ int AsyncRPC::RPC_Wait(RPC_SELECTOR which_rpc, void *arg1, void *arg2,
}
-RPCThread::RPCThread(CMainDocument *pDoc,
- BOINC_Mutex* pRPC_Thread_Mutex,
- BOINC_Condition* pRPC_Thread_Condition,
- BOINC_Mutex* pRPC_Request_Mutex,
+RPCThread::RPCThread(CMainDocument *pDoc,
+ BOINC_Mutex* pRPC_Thread_Mutex,
+ BOINC_Condition* pRPC_Thread_Condition,
+ BOINC_Mutex* pRPC_Request_Mutex,
BOINC_Condition* pRPC_Request_Condition)
: wxThread() {
m_pDoc = pDoc;
@@ -151,7 +151,7 @@ void *RPCThread::Entry() {
locale_t RPC_Thread_Locale = newlocale(LC_ALL_MASK, "C", (locale_t) 0);
uselocale(RPC_Thread_Locale);
#endif
-
+
m_pRPC_Thread_Mutex->Lock();
@@ -166,23 +166,23 @@ void *RPCThread::Entry() {
#endif
m_pRPC_Thread_Condition->Wait();
wxASSERT(condErr == wxCOND_NO_ERROR);
-
+
if (m_pDoc->m_bShutDownRPCThread) {
#ifdef HAVE_USELOCALE
uselocale(LC_GLOBAL_LOCALE);
freelocale(RPC_Thread_Locale);
#endif
m_pRPC_Thread_Mutex->Unlock(); // Just for safety - not really needed
- // Tell CMainDocument that thread has gracefully ended
+ // Tell CMainDocument that thread has gracefully ended
// We do this here because OnExit() is not called on Windows
m_pDoc->m_RPCThread = NULL;
return 0;
}
-
+
current_request = m_pDoc->GetCurrentRPCRequest();
if (!current_request->isActive) continue; // Should never happen
-
+
if (current_request->RPCExecutionTime) {
startTime = dtime();
}
@@ -190,7 +190,7 @@ void *RPCThread::Entry() {
if (current_request->RPCExecutionTime) {
*(current_request->RPCExecutionTime) = dtime() - startTime;
}
-
+
current_request->retval = retval;
#if wxDEBUG_LEVEL
@@ -201,10 +201,10 @@ void *RPCThread::Entry() {
current_request->isActive = false;
wxPostEvent( wxTheApp, RPC_done_event );
- // Signal() is ignored / discarded unless the main thread is
+ // Signal() is ignored / discarded unless the main thread is
// currently blocked by m_pRPC_Request_Condition->Wait[Timeout]()
m_pRPC_Request_Condition->Signal();
-
+
#if wxDEBUG_LEVEL
mutexErr =
#endif
@@ -219,7 +219,7 @@ void *RPCThread::Entry() {
int RPCThread::ProcessRPCRequest() {
int retval = 0;
ASYNC_RPC_REQUEST *current_request = m_pDoc->GetCurrentRPCRequest();
-
+
switch (current_request->which_rpc) {
// RPC_SELECTORS with no arguments
case RPC_RUN_BENCHMARKS:
@@ -257,7 +257,7 @@ int RPCThread::ProcessRPCRequest() {
retval = (m_pDoc->rpcClient).get_simple_gui_info(*(SIMPLE_GUI_INFO*)(current_request->arg1));
break;
case RPC_GET_SIMPLE_GUI_INFO2:
- // RPC_GET_SIMPLE_GUI_INFO2 is equivalent to doing both
+ // RPC_GET_SIMPLE_GUI_INFO2 is equivalent to doing both
// RPC_GET_PROJECT_STATUS1 and RPC_GET_RESULTS
retval = (m_pDoc->rpcClient).get_results(*(RESULTS*)(current_request->arg3), *(bool*)(current_request->arg4));
if (!retval) {
@@ -278,19 +278,19 @@ int RPCThread::ProcessRPCRequest() {
break;
case RPC_PROJECT_OP:
retval = (m_pDoc->rpcClient).project_op(
- *(PROJECT*)(current_request->arg1),
+ *(PROJECT*)(current_request->arg1),
(const char*)(current_request->arg2)
);
break;
case RPC_SET_RUN_MODE:
retval = (m_pDoc->rpcClient).set_run_mode(
- *(int*)(current_request->arg1),
+ *(int*)(current_request->arg1),
*(double*)(current_request->arg2)
);
break;
case RPC_SET_GPU_MODE:
retval = (m_pDoc->rpcClient).set_gpu_mode(
- *(int*)(current_request->arg1),
+ *(int*)(current_request->arg1),
*(double*)(current_request->arg2)
);
break;
@@ -317,20 +317,20 @@ int RPCThread::ProcessRPCRequest() {
break;
case RPC_GET_NOTICES:
retval = (m_pDoc->rpcClient).get_notices(
- *(int*)(current_request->arg1),
+ *(int*)(current_request->arg1),
*(NOTICES*)(current_request->arg2)
);
break;
case RPC_GET_MESSAGES:
retval = (m_pDoc->rpcClient).get_messages(
- *(int*)(current_request->arg1),
+ *(int*)(current_request->arg1),
*(MESSAGES*)(current_request->arg2),
*(bool*)(current_request->arg3)
);
break;
case RPC_FILE_TRANSFER_OP:
retval = (m_pDoc->rpcClient).file_transfer_op(
- *(FILE_TRANSFER*)(current_request->arg1),
+ *(FILE_TRANSFER*)(current_request->arg1),
(const char*)(current_request->arg2)
);
break;
@@ -378,8 +378,8 @@ int RPCThread::ProcessRPCRequest() {
break;
case RPC_PROJECT_ATTACH:
retval = (m_pDoc->rpcClient).project_attach(
- (const char*)(current_request->arg1),
- (const char*)(current_request->arg2),
+ (const char*)(current_request->arg1),
+ (const char*)(current_request->arg2),
(const char*)(current_request->arg3),
(const char*)(current_request->arg4)
);
@@ -392,8 +392,8 @@ int RPCThread::ProcessRPCRequest() {
break;
case RPC_ACCT_MGR_RPC:
retval = (m_pDoc->rpcClient).acct_mgr_rpc(
- (const char*)(current_request->arg1),
- (const char*)(current_request->arg2),
+ (const char*)(current_request->arg1),
+ (const char*)(current_request->arg2),
(const char*)(current_request->arg3),
(bool)(current_request->arg4 != NULL)
);
@@ -424,7 +424,7 @@ int RPCThread::ProcessRPCRequest() {
break;
case RPC_GET_GLOBAL_PREFS_WORKING_STRUCT:
retval = (m_pDoc->rpcClient).get_global_prefs_working_struct(
- *(GLOBAL_PREFS*)(current_request->arg1),
+ *(GLOBAL_PREFS*)(current_request->arg1),
*(GLOBAL_PREFS_MASK*)(current_request->arg2)
);
break;
@@ -436,13 +436,13 @@ int RPCThread::ProcessRPCRequest() {
break;
case RPC_GET_GLOBAL_PREFS_OVERRIDE_STRUCT:
retval = (m_pDoc->rpcClient).get_global_prefs_override_struct(
- *(GLOBAL_PREFS*)(current_request->arg1),
+ *(GLOBAL_PREFS*)(current_request->arg1),
*(GLOBAL_PREFS_MASK*)(current_request->arg2)
);
break;
case RPC_SET_GLOBAL_PREFS_OVERRIDE_STRUCT:
retval = (m_pDoc->rpcClient).set_global_prefs_override_struct(
- *(GLOBAL_PREFS*)(current_request->arg1),
+ *(GLOBAL_PREFS*)(current_request->arg1),
*(GLOBAL_PREFS_MASK*)(current_request->arg2)
);
break;
@@ -482,15 +482,15 @@ int CMainDocument::RequestRPC(ASYNC_RPC_REQUEST& request, bool hasPriority) {
#endif
long timeToDelay, delayTimeRemaining, timeToSleep;
bool shown = false;
-
+
if (!m_RPCThread) return -1;
- if ( (request.rpcType < RPC_TYPE_WAIT_FOR_COMPLETION) ||
+ if ( (request.rpcType < RPC_TYPE_WAIT_FOR_COMPLETION) ||
(request.rpcType >= NUM_RPC_TYPES) ) {
wxASSERT(false);
return -1;
}
-
+
// If we are quitting, cancel any pending RPCs
if (request.which_rpc == RPC_QUIT) {
if (current_rpc_request.isActive) {
@@ -500,7 +500,7 @@ int CMainDocument::RequestRPC(ASYNC_RPC_REQUEST& request, bool hasPriority) {
RPC_requests.clear();
}
}
-
+
// Check if a duplicate request is already on the queue
for (iter=RPC_requests.begin(); iter!=RPC_requests.end(); ++iter) {
if (iter->isSameAs(request)) {
@@ -511,16 +511,16 @@ int CMainDocument::RequestRPC(ASYNC_RPC_REQUEST& request, bool hasPriority) {
if ((request.rpcType == RPC_TYPE_WAIT_FOR_COMPLETION) && (request.resultPtr == NULL)) {
request.resultPtr = &retval;
}
-
+
if (hasPriority) {
- // We may want to set hasPriority for some user-initiated events.
+ // We may want to set hasPriority for some user-initiated events.
// Since the user is waiting, insert this at head of request queue.
// As of 8/14/08, hasPriority is never set true, so hasn't been tested.
iter = RPC_requests.insert(RPC_requests.begin(), request);
} else {
RPC_requests.push_back(request);
}
-
+
// Start this RPC if no other RPC is already in progress.
if (RPC_requests.size() == 1) {
// Wait for thread to unlock mutex with m_pRPC_Thread_Condition->Wait()
@@ -537,7 +537,7 @@ int CMainDocument::RequestRPC(ASYNC_RPC_REQUEST& request, bool hasPriority) {
m_pRPC_Thread_Condition->Signal(); // Unblock the thread
- // m_pRPC_Thread_Condition->Wait() will Lock() the mutex upon receiving Signal(),
+ // m_pRPC_Thread_Condition->Wait() will Lock() the mutex upon receiving Signal(),
// causing it to block again if we still have our lock on the mutex.
#if wxDEBUG_LEVEL
mutexErr =
@@ -546,7 +546,7 @@ int CMainDocument::RequestRPC(ASYNC_RPC_REQUEST& request, bool hasPriority) {
wxASSERT(mutexErr == wxMUTEX_NO_ERROR);
}
- // If this is a user-initiated event wait for completion but show
+ // If this is a user-initiated event wait for completion but show
// a dialog allowing the user to cancel.
if (request.rpcType == RPC_TYPE_WAIT_FOR_COMPLETION) {
// TODO: proper handling if a second user request is received while first is pending ??
@@ -558,7 +558,7 @@ int CMainDocument::RequestRPC(ASYNC_RPC_REQUEST& request, bool hasPriority) {
// Don't show dialog if RPC completes before RPC_WAIT_DLG_DELAY
// or while BOINC is minimized or during auto-attach to project
CBOINCBaseFrame* pFrame = wxGetApp().GetFrame();
- wxStopWatch Dlgdelay = wxStopWatch();
+ wxStopWatch Dlgdelay = wxStopWatch();
m_RPCWaitDlg = new AsyncRPCDlg();
m_bWaitingForRPC = true;
if (m_bAutoAttaching) {
@@ -566,60 +566,60 @@ int CMainDocument::RequestRPC(ASYNC_RPC_REQUEST& request, bool hasPriority) {
// so don't keep checking once it is false
m_bAutoAttaching = autoattach_in_progress();
}
-
- // Allow RPC_WAIT_DLG_DELAY seconds for Demand RPC to complete before
+
+ // Allow RPC_WAIT_DLG_DELAY seconds for Demand RPC to complete before
// displaying "Please Wait" dialog, but keep checking for completion.
if (m_bAutoAttaching) {
timeToDelay = RPC_WAIT_DLG_DELAY_DURING_AUTOATTACH;
} else {
timeToDelay = RPC_WAIT_DLG_DELAY;
}
-
+
delayTimeRemaining = timeToDelay;
while (true) {
if (delayTimeRemaining >= 0) { // Prevent overflow if minimized for a very long time
delayTimeRemaining = timeToDelay - Dlgdelay.Time();
}
-
+
if (pFrame) {
shown = pFrame->IsShown();
} else {
shown = false;
}
-
+
if (shown) {
if (delayTimeRemaining <= 0) break; // Display the Please Wait dialog
timeToSleep = delayTimeRemaining;
} else {
- // Don't show dialog while Manager is minimized, but do
- // process events so user can maximize the manager.
+ // Don't show dialog while Manager is minimized, but do
+ // process events so user can maximize the manager.
//
- // NOTE: CBOINCGUIApp::FilterEvent() discards those events
- // which might cause posting of more RPC requests while
+ // NOTE: CBOINCGUIApp::FilterEvent() discards those events
+ // which might cause posting of more RPC requests while
// we are in this loop, to prevent undesirable recursion.
- // Since the manager is minimized, we don't have to worry about
- // discarding crucial drawing or command events.
- // The filter does allow the the Open Manager menu item from
- // the system tray icon and wxEVT_RPC_FINISHED event.
+ // Since the manager is minimized, we don't have to worry about
+ // discarding crucial drawing or command events.
+ // The filter does allow the the Open Manager menu item from
+ // the system tray icon and wxEVT_RPC_FINISHED event.
//
timeToSleep = DELAY_WHEN_MINIMIZED; // Allow user to maximize Manager
wxSafeYield(NULL, true);
}
-
+
// OnRPCComplete() clears m_bWaitingForRPC and deletes m_RPCWaitDlg if RPC completed
if (! m_bWaitingForRPC) {
return retval;
}
-
+
#if wxDEBUG_LEVEL
mutexErr =
#endif
m_pRPC_Request_Mutex->Lock();
wxASSERT(mutexErr == wxMUTEX_NO_ERROR);
- // Simulate handling of CRPCFinishedEvent but don't allow any other
+ // Simulate handling of CRPCFinishedEvent but don't allow any other
// events (so no user activity) to prevent undesirable recursion.
- // Since we don't need to filter and discard events, they remain on
+ // Since we don't need to filter and discard events, they remain on
// the queue until it is safe to process them.
// Allow RPC thread to run while we wait for it.
if (!current_rpc_request.isActive) {
@@ -628,7 +628,7 @@ int CMainDocument::RequestRPC(ASYNC_RPC_REQUEST& request, bool hasPriority) {
#endif
m_pRPC_Request_Mutex->Unlock();
wxASSERT(mutexErr == wxMUTEX_NO_ERROR);
-
+
HandleCompletedRPC();
continue;
}
@@ -645,15 +645,15 @@ int CMainDocument::RequestRPC(ASYNC_RPC_REQUEST& request, bool hasPriority) {
m_pRPC_Request_Mutex->Unlock();
wxASSERT(mutexErr == wxMUTEX_NO_ERROR);
}
-
- // Demand RPC has taken longer than RPC_WAIT_DLG_DELAY seconds and
- // Manager is not minimized, so display the "Please Wait" dialog
- // with a Cancel button. If the RPC does complete while the dialog
+
+ // Demand RPC has taken longer than RPC_WAIT_DLG_DELAY seconds and
+ // Manager is not minimized, so display the "Please Wait" dialog
+ // with a Cancel button. If the RPC does complete while the dialog
// is up, HandleCompletedRPC() will call EndModal with wxID_OK.
//
- // NOTE: the Modal dialog permits processing of all events, but
- // CBOINCGUIApp::FilterEvent() blocks those events which might cause
- // posting of more RPC requests while in this dialog, to prevent
+ // NOTE: the Modal dialog permits processing of all events, but
+ // CBOINCGUIApp::FilterEvent() blocks those events which might cause
+ // posting of more RPC requests while in this dialog, to prevent
// undesirable recursion.
//
if (m_RPCWaitDlg) {
@@ -661,17 +661,17 @@ int CMainDocument::RequestRPC(ASYNC_RPC_REQUEST& request, bool hasPriority) {
// Remember time the dialog was closed for use by RunPeriodicRPCs()
m_dtLasAsyncRPCDlgTime = wxDateTime::Now();
if (response != wxID_OK) {
- // TODO: If user presses Cancel in Please Wait dialog but request
- // has not yet been started, should we just remove it from queue?
- // If we make that change, should we also add a separate menu item
+ // TODO: If user presses Cancel in Please Wait dialog but request
+ // has not yet been started, should we just remove it from queue?
+ // If we make that change, should we also add a separate menu item
// to reset the RPC connection (or does one already exist)?
retval = -1;
- // If the RPC continues to get data after we return to
+ // If the RPC continues to get data after we return to
// our caller, it may try to write into a buffer or struct
- // which the caller has already deleted. To prevent this,
+ // which the caller has already deleted. To prevent this,
// we close the socket (disconnect) and kill the RPC thread.
- // This is ugly but necessary. We must then reconnect and
+ // This is ugly but necessary. We must then reconnect and
// start a new RPC thread.
if (current_rpc_request.isActive) {
current_rpc_request.isActive = false;
@@ -681,7 +681,7 @@ int CMainDocument::RequestRPC(ASYNC_RPC_REQUEST& request, bool hasPriority) {
m_bNeedRefresh = false;
m_bNeedTaskBarRefresh = false;
- // We will be reconnected to the same client (if possible) by
+ // We will be reconnected to the same client (if possible) by
// CBOINCDialUpManager::OnPoll() and CNetworkConnection::Poll().
m_pNetworkConnection->SetStateDisconnected();
}
@@ -715,9 +715,9 @@ void CMainDocument::KillRPCThread() {
m_bNeedRefresh = false;
m_bNeedTaskBarRefresh = false;
-
+
rpcClient.close(); // Abort any async RPC in progress (in case hung)
-
+
// On some platforms, Delete() takes effect only when thread calls TestDestroy()
// Wait for thread to unlock mutex with m_pRPC_Thread_Condition->Wait()
#if wxDEBUG_LEVEL
@@ -752,7 +752,7 @@ void CMainDocument::KillRPCThread() {
void CMainDocument::OnRPCComplete(CRPCFinishedEvent&) {
HandleCompletedRPC();
-}
+}
void CMainDocument::HandleCompletedRPC() {
@@ -762,14 +762,14 @@ void CMainDocument::HandleCompletedRPC() {
#endif
int i, n, requestIndex = -1;
bool stillWaitingForPendingRequests = false;
-
+
if (!m_RPCThread) return;
-
+
if (current_rpc_request.isActive) return;
-
- // We can get here either via a CRPCFinishedEvent event posted
- // by the RPC thread or by a call from RequestRPC. If we were
- // called from RequestRPC, the CRPCFinishedEvent will still be
+
+ // We can get here either via a CRPCFinishedEvent event posted
+ // by the RPC thread or by a call from RequestRPC. If we were
+ // called from RequestRPC, the CRPCFinishedEvent will still be
// on the event queue, so we get called twice. Check for this here.
if (current_rpc_request.which_rpc == 0) return; // already handled by a call from RequestRPC
@@ -784,7 +784,7 @@ void CMainDocument::HandleCompletedRPC() {
}
}
}
-
+
if (! stillWaitingForPendingRequests) {
if (m_RPCWaitDlg) {
if (m_RPCWaitDlg->IsShown()) {
@@ -800,18 +800,18 @@ void CMainDocument::HandleCompletedRPC() {
// Remove completed request from the queue
RPC_requests.erase(RPC_requests.begin()+requestIndex);
}
-
+
retval = current_rpc_request.retval;
-
+
if (current_rpc_request.completionTime) {
*(current_rpc_request.completionTime) = wxDateTime::Now();
}
-
+
if (current_rpc_request.resultPtr) {
*(current_rpc_request.resultPtr) = retval;
}
-
+
// Post-processing
if (! retval) {
if (current_rpc_request.rpcType == RPC_TYPE_ASYNC_WITH_REFRESH_AFTER) {
@@ -819,13 +819,13 @@ void CMainDocument::HandleCompletedRPC() {
m_bNeedRefresh = true;
}
}
-
+
if (current_rpc_request.rpcType == RPC_TYPE_ASYNC_WITH_UPDATE_TASKBAR_ICON_AFTER) {
if (!retval) {
m_bNeedTaskBarRefresh = true;
}
}
-
+
switch (current_rpc_request.which_rpc) {
case RPC_GET_STATE:
if (current_rpc_request.exchangeBuf && !retval) {
@@ -927,7 +927,7 @@ void CMainDocument::HandleCompletedRPC() {
arg1->projects.swap(exchangeBuf->projects);
}
break;
-
+
case RPC_GET_CC_STATUS:
if (current_rpc_request.exchangeBuf && !retval) {
CC_STATUS* arg1 = (CC_STATUS*)current_rpc_request.arg1;
@@ -943,35 +943,35 @@ void CMainDocument::HandleCompletedRPC() {
}
break;
default:
- // We don't support double buffering for other RPC calls
+ // We don't support double buffering for other RPC calls
wxASSERT(current_rpc_request.exchangeBuf == NULL);
break;
}
}
-
+
if (current_rpc_request.resultPtr) {
// In case post-processing changed retval
*(current_rpc_request.resultPtr) = retval;
}
- // We must call ProcessEvent() rather than AddPendingEvent() here to
- // guarantee integrity of data when other events are handled (such as
- // Abort, Suspend/Resume, Show Graphics, Update, Detach, Reset, No
- // New Work, etc.) Otherwise, if one of those events is pending it
- // might be processed first, and the data in the selected rows may not
- // match the data which the user selected if any rows were added or
- // deleted due to the RPC.
- // The refresh event called here adjusts the selections to fix any
- // such mismatch before other pending events are processed.
+ // We must call ProcessEvent() rather than AddPendingEvent() here to
+ // guarantee integrity of data when other events are handled (such as
+ // Abort, Suspend/Resume, Show Graphics, Update, Detach, Reset, No
+ // New Work, etc.) Otherwise, if one of those events is pending it
+ // might be processed first, and the data in the selected rows may not
+ // match the data which the user selected if any rows were added or
+ // deleted due to the RPC.
+ // The refresh event called here adjusts the selections to fix any
+ // such mismatch before other pending events are processed.
//
- // However, the refresh code may itself request a Demand RPC, which
- // would cause undesirable recursion if we are already waiting for
- // another Demand RPC to complete. In that case, we defer the refresh
+ // However, the refresh code may itself request a Demand RPC, which
+ // would cause undesirable recursion if we are already waiting for
+ // another Demand RPC to complete. In that case, we defer the refresh
// until all pending Demand RPCs have been done.
//
if (m_bNeedRefresh && !m_bWaitingForRPC) {
m_bNeedRefresh = false;
- // We must get the frame immediately before using it,
+ // We must get the frame immediately before using it,
// since it may have been changed by SetActiveGUI().
CBOINCBaseFrame* pFrame = wxGetApp().GetFrame();
if (pFrame) {
@@ -997,11 +997,11 @@ void CMainDocument::HandleCompletedRPC() {
eventLog->OnRefresh();
}
}
-
+
current_rpc_request.clear();
- // Start the next RPC request.
- // We can't start this until finished processing the previous RPC's
+ // Start the next RPC request.
+ // We can't start this until finished processing the previous RPC's
// event because the two requests may write into the same buffer.
if (RPC_requests.size() > 0) {
// Wait for thread to unlock mutex with m_pRPC_Thread_Condition->Wait()
@@ -1018,7 +1018,7 @@ void CMainDocument::HandleCompletedRPC() {
m_pRPC_Thread_Condition->Signal(); // Unblock the thread
- // m_pRPC_Thread_Condition->Wait() will Lock() the mutex upon receiving Signal(),
+ // m_pRPC_Thread_Condition->Wait() will Lock() the mutex upon receiving Signal(),
// causing it to block again if we still have our lock on the mutex.
#if wxDEBUG_LEVEL
mutexErr =
@@ -1043,7 +1043,7 @@ int CMainDocument::CopyProjectsToStateBuffer(PROJECTS& p, CC_STATE& ccstate) {
for (i=0; imaster_url);
if (state_project && (!strcmp(p.projects[i]->master_url, state_project->master_url))) {
- // Because the CC_STATE contains several pointers to each element of the
+ // Because the CC_STATE contains several pointers to each element of the
// CC_STATE::projects vector, we must update these elements in place.
*state_project = *(p.projects[i]);
state_project->flag_for_delete = false;
@@ -1062,7 +1062,7 @@ int CMainDocument::CopyProjectsToStateBuffer(PROJECTS& p, CC_STATE& ccstate) {
}
}
}
-
+
return retval;
}
@@ -1079,7 +1079,7 @@ AsyncRPCDlg::AsyncRPCDlg() : wxDialog( NULL, wxID_ANY, wxT(""), wxDefaultPositio
wxASSERT(pSkinAdvanced);
wxString message = wxString(_("Communicating with BOINC client. Please wait ..."));
-
+
#ifdef __WXMAC__
exit_label.Printf(_("&Quit %s"), pSkinAdvanced->GetApplicationName().c_str());
#else
@@ -1095,9 +1095,9 @@ AsyncRPCDlg::AsyncRPCDlg() : wxDialog( NULL, wxID_ANY, wxT(""), wxDefaultPositio
icon_text->Add( CreateTextSizer( message ), 0, wxALIGN_CENTER | wxLEFT, 10 );
topsizer->Add( icon_text, 1, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 );
-
+
wxStdDialogButtonSizer *sizerBtn = CreateStdDialogButtonSizer(0);
-
+
wxButton* exitbutton = new wxButton;
exitbutton->Create( this, wxID_EXIT, exit_label, wxDefaultPosition, wxDefaultSize, 0 );
sizerBtn->Add(exitbutton, 0, wxLEFT|wxRIGHT|wxALL, 5);
@@ -1105,7 +1105,7 @@ AsyncRPCDlg::AsyncRPCDlg() : wxDialog( NULL, wxID_ANY, wxT(""), wxDefaultPositio
wxButton* cancelbutton = new wxButton;
cancelbutton->Create( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
sizerBtn->Add(cancelbutton, 0, wxLEFT|wxRIGHT|wxALL, 5);
-
+
if ( sizerBtn )
topsizer->Add(sizerBtn, 0, wxEXPAND | wxALL, 10 );
@@ -1152,7 +1152,7 @@ void CMainDocument::TestAsyncRPC() {
// request.result = NULL;
request.resultPtr = &rpc_result; // For testing async RPCs
request.isActive = false;
-
+
//retval = rpcClient.get_all_projects_list(pl);
req_retval = RequestRPC(request, true);
diff --git a/clientgui/AsyncRPC.h b/clientgui/AsyncRPC.h
index 16bf842d1df..b61e809b387 100644
--- a/clientgui/AsyncRPC.h
+++ b/clientgui/AsyncRPC.h
@@ -144,19 +144,19 @@ enum RPC_SELECTOR {
enum ASYNC_RPC_TYPE {
- // Demand RPC: wait for completion before returning (usually
+ // Demand RPC: wait for completion before returning (usually
// a user-initiated request.)
RPC_TYPE_WAIT_FOR_COMPLETION = 1,
- // Periodic RPC: post request on queue and return immediately
+ // Periodic RPC: post request on queue and return immediately
// (requested due to a timer interrupt.)
RPC_TYPE_ASYNC_NO_REFRESH,
- // Periodic RPC as above, but on completion also process a
+ // Periodic RPC as above, but on completion also process a
// wxEVT_FRAME_REFRESHVIEW event to refresh the display.
RPC_TYPE_ASYNC_WITH_REFRESH_AFTER,
- // Periodic RPC as above, but on completion also process a
+ // Periodic RPC as above, but on completion also process a
// wxEVT_FRAME_REFRESHVIEW event to refresh the display.
RPC_TYPE_ASYNC_WITH_REFRESH_EVENT_LOG_AFTER,
- // Periodic RPC as above, but on completion also process a
+ // Periodic RPC as above, but on completion also process a
// wxEVT_TASKBAR_REFRESH event to refresh the taskbar icon.
RPC_TYPE_ASYNC_WITH_UPDATE_TASKBAR_ICON_AFTER,
NUM_RPC_TYPES
@@ -167,19 +167,19 @@ enum ASYNC_RPC_TYPE {
//
// arg1 is usually the buffer to read into
//
-// exchangeBuf is the (optional) buffer to exchange with after
+// exchangeBuf is the (optional) buffer to exchange with after
// completing the RPC, the buffer used by the Manager code.
// Pass NULL if you don't want the buffer exchanged.
//
-// arg2, arg3, arg4 are additional arguments when needed by the
+// arg2, arg3, arg4 are additional arguments when needed by the
// RPC call; their usage varies for different RPC requests.
//
-// rpcType is as described above
+// rpcType is as described above
//
-// completionTime is a pointer to a wxDateTime variable into which
+// completionTime is a pointer to a wxDateTime variable into which
// to write the completion time of the RPC. It may be NULL.
//
-// resultPtr is a pointer to an int into which to write the result
+// resultPtr is a pointer to an int into which to write the result
// returned by the RPC call. It may be NULL.
//
// retval is for internal use by the async RPC logic; do not use.
@@ -216,13 +216,13 @@ class AsyncRPC
~AsyncRPC();
int RPC_Wait(
- RPC_SELECTOR which_rpc, void* arg1 = NULL, void*
- arg2 = NULL, void* arg3 = NULL, void* arg4 = NULL,
+ RPC_SELECTOR which_rpc, void* arg1 = NULL, void*
+ arg2 = NULL, void* arg3 = NULL, void* arg4 = NULL,
bool hasPriority = false
);
- // Manager must do all RPC data transfers through AsyncRPC calls, so
- // this class must have methods corresponding to all RPC_CLIENT data
+ // Manager must do all RPC data transfers through AsyncRPC calls, so
+ // this class must have methods corresponding to all RPC_CLIENT data
// transfer operations, but NOT init(), init_async(), close(), etc.
int authorize(const char* passwd)
{ return RPC_Wait(RPC_AUTHORIZE, (void*)passwd); }
@@ -355,14 +355,14 @@ class AsyncRPC
class RPCThread : public wxThread
{
public:
- RPCThread(CMainDocument *pDoc,
- BOINC_Mutex* pRPC_Thread_Mutex,
- BOINC_Condition* pRPC_Thread_Condition,
- BOINC_Mutex* pRPC_Request_Mutex,
+ RPCThread(CMainDocument *pDoc,
+ BOINC_Mutex* pRPC_Thread_Mutex,
+ BOINC_Condition* pRPC_Thread_Condition,
+ BOINC_Mutex* pRPC_Request_Mutex,
BOINC_Condition* RPC_Request_Condition
);
virtual void *Entry();
-
+
private:
int ProcessRPCRequest();
CMainDocument* m_pDoc;
diff --git a/clientgui/BOINCBaseFrame.cpp b/clientgui/BOINCBaseFrame.cpp
index dac079d4a84..07c00ab5c95 100644
--- a/clientgui/BOINCBaseFrame.cpp
+++ b/clientgui/BOINCBaseFrame.cpp
@@ -73,7 +73,7 @@ CBOINCBaseFrame::CBOINCBaseFrame()
CBOINCBaseFrame::CBOINCBaseFrame(wxWindow* parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const long style) :
- wxFrame(parent, id, title, pos, size, style)
+ wxFrame(parent, id, title, pos, size, style)
{
wxLogTrace(wxT("Function Start/End"), wxT("CBOINCBaseFrame::CBOINCBaseFrame - Function Begin"));
@@ -110,7 +110,7 @@ CBOINCBaseFrame::CBOINCBaseFrame(wxWindow* parent, const wxWindowID id, const wx
wxUpdateUIEvent::SetUpdateInterval(500);
m_ptFramePos = wxPoint(0, 0);
-
+
// The second half of the initialization process picks up in the OnFrameRender()
// routine since the menus' and status bars' are drawn in the frameworks
// on idle routines, on idle events are sent in between the end of the
@@ -165,7 +165,7 @@ void CBOINCBaseFrame::OnPeriodicRPC(wxTimerEvent& WXUNUSED(event)) {
first = false;
wxGetApp().OnFinishInit();
}
-
+
wxGetApp().CheckPartialActivation();
#endif
@@ -173,7 +173,7 @@ void CBOINCBaseFrame::OnPeriodicRPC(wxTimerEvent& WXUNUSED(event)) {
bAlreadyRunningLoop = true;
pDoc->RunPeriodicRPCs(m_iFrameRefreshRate);
-
+
bAlreadyRunningLoop = false;
}
}
@@ -186,11 +186,11 @@ void CBOINCBaseFrame::OnDocumentPoll(wxTimerEvent& WXUNUSED(event)) {
wxASSERT(pDoc);
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
- // Timer events are handled while the RPC Wait dialog is shown
- // which may cause unintended recursion and repeatedly posting
+ // Timer events are handled while the RPC Wait dialog is shown
+ // which may cause unintended recursion and repeatedly posting
// the same RPC requests from timer routines.
if (pDoc->WaitingForRPC()) return;
-
+
if (!bAlreadyRunOnce && m_pDocumentPollTimer->IsRunning()) {
// Complete any remaining initialization that has to happen after we are up
// and running
@@ -215,8 +215,8 @@ void CBOINCBaseFrame::OnAlertPoll(wxTimerEvent& WXUNUSED(event)) {
// Check to see if there is anything that we need to do from the
// dial up user perspective.
if (pDoc && m_pDialupManager) {
- // Timer events are handled while the RPC Wait dialog is shown
- // which may cause unintended recursion and repeatedly posting
+ // Timer events are handled while the RPC Wait dialog is shown
+ // which may cause unintended recursion and repeatedly posting
// the same RPC requests from timer routines.
if (pDoc->IsConnected() && !pDoc->WaitingForRPC()) {
m_pDialupManager->OnPoll();
@@ -227,7 +227,7 @@ void CBOINCBaseFrame::OnAlertPoll(wxTimerEvent& WXUNUSED(event)) {
m_bShowConnectionFailedAlert = false;
ShowConnectionFailedAlert();
}
-
+
bAlreadyRunningLoop = false;
}
}
@@ -296,9 +296,9 @@ void CBOINCBaseFrame::OnAlert(CFrameAlertEvent& event) {
// Currently, the only non-notification-only alert is Connection Failed,
// which is now has logic to be displayed when Manager is maximized.
- // Notification only events on platforms other than Windows are
- // currently discarded. Otherwise the application would be restored
- // and input focus set on the notification which interrupts whatever
+ // Notification only events on platforms other than Windows are
+ // currently discarded. Otherwise the application would be restored
+ // and input focus set on the notification which interrupts whatever
// the user was doing.
if (IsShown() && !event.m_notification_only) {
int retval = 0;
@@ -393,7 +393,7 @@ void CBOINCBaseFrame::FireRefreshView() {
wxASSERT(pDoc);
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
-
+
pDoc->RefreshRPCs();
pDoc->RunPeriodicRPCs(0);
}
@@ -424,7 +424,7 @@ bool CBOINCBaseFrame::SelectComputer(wxString& hostName, int& portNum, wxString&
size_t lIndex = 0;
wxArrayString aComputerNames;
bool bResult = false;
-
+
// Lets copy the template store in the system state
aComputerNames = m_aSelectedComputerMRU;
@@ -443,13 +443,13 @@ bool CBOINCBaseFrame::SelectComputer(wxString& hostName, int& portNum, wxString&
password = wxEmptyString;
} else {
// Parse the remote machine info
- wxString sHost = dlg.m_ComputerNameCtrl->GetValue();
- long lPort = GUI_RPC_PORT;
- int iPos = sHost.Find(wxT(":"));
- if (iPos != wxNOT_FOUND) {
- wxString sPort = sHost.substr(iPos + 1);
- if (!sPort.ToLong(&lPort)) lPort = GUI_RPC_PORT;
- sHost.erase(iPos);
+ wxString sHost = dlg.m_ComputerNameCtrl->GetValue();
+ long lPort = GUI_RPC_PORT;
+ int iPos = sHost.Find(wxT(":"));
+ if (iPos != wxNOT_FOUND) {
+ wxString sPort = sHost.substr(iPos + 1);
+ if (!sPort.ToLong(&lPort)) lPort = GUI_RPC_PORT;
+ sHost.erase(iPos);
}
hostName = sHost;
portNum = (int)lPort;
@@ -475,7 +475,7 @@ bool CBOINCBaseFrame::SelectComputer(wxString& hostName, int& portNum, wxString&
} else {
bResult = false; // User cancelled
}
-
+
wxLogTrace(wxT("Function Start/End"), wxT("CBOINCBaseFrame::SelectComputer - Function End"));
return bResult;
}
@@ -534,7 +534,7 @@ void CBOINCBaseFrame::ShowConnectionFailedAlert() {
if (pDoc->m_pClientManager->AutoRestart()) {
boinc_sleep(0.5); // Allow time for Client to restart
if (pDoc->m_pClientManager->IsBOINCCoreRunning()) {
- pDoc->Reconnect();
+ pDoc->Reconnect();
return;
}
} else {
@@ -576,7 +576,7 @@ void CBOINCBaseFrame::ShowConnectionFailedAlert() {
// If we are minimized, set flag to show alert when maximized
m_bShowConnectionFailedAlert = !IsShown();
-
+
wxLogTrace(wxT("Function Start/End"), wxT("CBOINCBaseFrame::ShowConnectionFailedAlert - Function End"));
}
@@ -645,7 +645,7 @@ void CBOINCBaseFrame::ShowNotCurrentlyConnectedAlert() {
if (pDoc->m_pClientManager->AutoRestart()) {
boinc_sleep(0.5); // Allow time for Client to restart
if (pDoc->m_pClientManager->IsBOINCCoreRunning()) {
- pDoc->Reconnect();
+ pDoc->Reconnect();
return;
}
} else {
@@ -655,7 +655,7 @@ void CBOINCBaseFrame::ShowNotCurrentlyConnectedAlert() {
}
}
}
-
+
// %s is the application name
// i.e. 'BOINC Manager', 'GridRepublic Manager'
strDialogTitle.Printf(
@@ -837,7 +837,7 @@ bool CBOINCBaseFrame::Show(bool bShow) {
}
}
}
-
+
CDlgEventLog* pEventLog = wxGetApp().GetEventLog();
if (pEventLog) {
#ifdef __WXMAC__
@@ -870,7 +870,7 @@ int CBOINCBaseFrame::_GetCurrentViewPage() {
void CFrameAlertEvent::ProcessResponse(const int response) const {
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
wxASSERT(pDoc);
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
@@ -967,7 +967,7 @@ void CBOINCBaseFrame::OnWizardDetach(wxCommandEvent& WXUNUSED(event)) {
CMainDocument* pDoc = wxGetApp().GetDocument();
CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced();
- wxInt32 iAnswer = 0;
+ wxInt32 iAnswer = 0;
wxString strTitle = wxEmptyString;
wxString strMessage = wxEmptyString;
ACCT_MGR_INFO ami;
@@ -990,7 +990,7 @@ void CBOINCBaseFrame::OnWizardDetach(wxCommandEvent& WXUNUSED(event)) {
wxString(ami.acct_mgr_name.c_str(), wxConvUTF8).c_str()
);
strMessage.Printf(
- _("If you stop using %s,\nyou'll keep all your current projects,\nbut you'll have to manage projects manually.\n\nDo you want to stop using %s?"),
+ _("If you stop using %s,\nyou'll keep all your current projects,\nbut you'll have to manage projects manually.\n\nDo you want to stop using %s?"),
wxString(ami.acct_mgr_name.c_str(), wxConvUTF8).c_str(),
wxString(ami.acct_mgr_name.c_str(), wxConvUTF8).c_str()
);
diff --git a/clientgui/BOINCBaseFrame.h b/clientgui/BOINCBaseFrame.h
index cc45da22eed..d7eab32e18b 100644
--- a/clientgui/BOINCBaseFrame.h
+++ b/clientgui/BOINCBaseFrame.h
@@ -94,7 +94,7 @@ class CBOINCBaseFrame : public wxFrame {
virtual void StopTimers() {}
virtual void UpdateRefreshTimerInterval();
- void ShowAlert(
+ void ShowAlert(
const wxString title,
const wxString message,
const int style,
@@ -103,7 +103,7 @@ class CBOINCBaseFrame : public wxFrame {
);
bool Show( bool bShow = true );
-
+
virtual bool RestoreState();
virtual bool SaveState();
virtual bool CreateMenus(){return true;}
diff --git a/clientgui/BOINCBaseView.cpp b/clientgui/BOINCBaseView.cpp
index eb2e3df6eb3..2d2b4049d0e 100644
--- a/clientgui/BOINCBaseView.cpp
+++ b/clientgui/BOINCBaseView.cpp
@@ -57,11 +57,11 @@ CBOINCBaseView::CBOINCBaseView(wxNotebook* pNotebook) :
m_iProgressColumn = -1;
m_iSortColumnID = -1;
m_SortArrows = NULL;
-
+
m_aStdColNameOrder = NULL;
m_iDefaultShownColumns = NULL;
m_iNumDefaultShownColumns = 0;
-
+
SetName(GetViewName());
SetAutoLayout(TRUE);
}
@@ -99,7 +99,7 @@ CBOINCBaseView::CBOINCBaseView(wxNotebook* pNotebook, wxWindowID iTaskWindowID,
m_pListPane = new CBOINCListCtrl(this, iListWindowID, iListWindowFlags);
wxASSERT(m_pListPane);
-
+
itemFlexGridSizer->Add(m_pTaskPane, 1, wxGROW|wxALL, 1);
itemFlexGridSizer->Add(m_pListPane, 1, wxGROW|wxALL, 1);
@@ -115,7 +115,7 @@ CBOINCBaseView::CBOINCBaseView(wxNotebook* pNotebook, wxWindowID iTaskWindowID,
m_SortArrows->Add( wxIcon( sortascending_xpm ) );
m_SortArrows->Add( wxIcon( sortdescending_xpm ) );
m_pListPane->SetImageList(m_SortArrows, wxIMAGE_LIST_SMALL);
-
+
m_aStdColNameOrder = NULL;
m_iDefaultShownColumns = NULL;
m_iNumDefaultShownColumns = 0;
@@ -241,7 +241,7 @@ void CBOINCBaseView::OnListRender(wxTimerEvent& event) {
// Remember the key values of currently selected items
SaveSelections();
-
+
int iDocCount = GetDocCount();
int iCacheCount = GetCacheCount();
if (iDocCount != iCacheCount) {
@@ -268,7 +268,7 @@ void CBOINCBaseView::OnListRender(wxTimerEvent& event) {
m_pListPane->SetItemCount(iDocCount);
m_bNeedSort = true;
} else {
- // The virtual ListCtrl keeps a separate its list of selected rows;
+ // The virtual ListCtrl keeps a separate its list of selected rows;
// make sure it does not reference any rows beyond the new last row.
// We can ClearSelections() because we called SaveSelections() above.
ClearSelections();
@@ -306,7 +306,7 @@ void CBOINCBaseView::OnListRender(wxTimerEvent& event) {
}
}
}
-
+
// Find the previously selected items by their key values and reselect them
RestoreSelections();
@@ -353,7 +353,7 @@ bool CBOINCBaseView::OnRestoreState(wxConfigBase* pConfig) {
}
-// We don't use this because multiple selection virtual
+// We don't use this because multiple selection virtual
// wxListCtrl does not generate selection events for
// shift-click; see OnCheckSelectionChanged() below.
void CBOINCBaseView::OnListSelected(wxListEvent& event) {
@@ -369,7 +369,7 @@ void CBOINCBaseView::OnListSelected(wxListEvent& event) {
}
-// We don't use this because multiple selection virtual
+// We don't use this because multiple selection virtual
// wxListCtrl does generates deselection events only for
// control-click; see OnCheckSelectionChanged() below.
void CBOINCBaseView::OnListDeselected(wxListEvent& event) {
@@ -406,7 +406,7 @@ void CBOINCBaseView::OnCacheHint(wxListEvent& ) {
void CBOINCBaseView::CheckSelectionChanged() {
int newSelectionCount = m_pListPane->GetSelectedItemCount();
long currentSelection = m_pListPane->GetFirstSelected();
-
+
if ((newSelectionCount != m_iPreviousSelectionCount) ||
(currentSelection != m_lPreviousFirstSelection)
) {
@@ -450,7 +450,7 @@ int CBOINCBaseView::AddCacheElement() {
return -1;
}
-
+
int CBOINCBaseView::EmptyCache() {
return -1;
}
@@ -505,7 +505,7 @@ int CBOINCBaseView::SynchronizeCache() {
sortData(); // Will mark moved items as needing refresh
m_bNeedSort = false;
}
-
+
return 0;
}
@@ -519,13 +519,13 @@ void CBOINCBaseView::OnColClick(wxListEvent& event) {
wxListItem item;
int newSortColIndex = event.GetColumn();
int oldSortColIndex = -1;
-
+
if (newSortColIndex < 0) return; // Clicked past last column
-
+
if (m_iSortColumnID >= 0) {
oldSortColIndex = m_iColumnIDToColumnIndex[m_iSortColumnID];
}
-
+
item.SetMask(wxLIST_MASK_IMAGE);
if (newSortColIndex == oldSortColIndex) {
m_bReverseSort = !m_bReverseSort;
@@ -542,7 +542,7 @@ void CBOINCBaseView::OnColClick(wxListEvent& event) {
SetSortColumn(newSortColIndex);
}
-
+
// Write the change to the registry
// Do this here because SetListColumnOrder() can call SetSortColumn()
// even when neither m_iSortColumnID nor m_bReverseSort changes
@@ -550,7 +550,7 @@ void CBOINCBaseView::OnColClick(wxListEvent& event) {
pConfig->SetPath(wxT("/") + GetViewName());
m_pListPane->OnSaveState(pConfig);
}
-
+
void CBOINCBaseView::SetSortColumn(int newSortColIndex) {
wxListItem item;
int i, j, m;
@@ -558,7 +558,7 @@ void CBOINCBaseView::SetSortColumn(int newSortColIndex) {
item.SetImage(m_bReverseSort ? 0 : 1);
m_pListPane->SetColumn(newSortColIndex, item);
-
+
Freeze(); // To reduce flicker
// Remember which cache elements are selected and deselect them
m_bIgnoreUIEvents = true;
@@ -569,10 +569,10 @@ void CBOINCBaseView::SetSortColumn(int newSortColIndex) {
selections.Add(m_iSortedIndexes[i]);
m_pListPane->SelectRow(i, false);
}
-
+
sortData();
- // Reselect previously selected cache elements in the sorted list
+ // Reselect previously selected cache elements in the sorted list
m = (int)selections.GetCount();
for (i=0; i= 0) {
@@ -592,7 +592,7 @@ void CBOINCBaseView::InitSort() {
if (m_iSortColumnID < 0) return;
int newSortColIndex = m_iColumnIDToColumnIndex[m_iSortColumnID];
if (newSortColIndex < 0) return;
-
+
item.SetMask(wxLIST_MASK_IMAGE);
item.SetImage(m_bReverseSort ? 0 : 1);
m_pListPane->SetColumn(newSortColIndex, item);
@@ -605,12 +605,12 @@ void CBOINCBaseView::InitSort() {
void CBOINCBaseView::sortData() {
if (m_iSortColumnID < 0) return;
if (m_iColumnIDToColumnIndex[m_iSortColumnID] < 0) return;
-
+
wxArrayInt oldSortedIndexes(m_iSortedIndexes);
int i, n = (int)m_iSortedIndexes.GetCount();
-
+
std::stable_sort(m_iSortedIndexes.begin(), m_iSortedIndexes.end(), m_funcSortCompare);
-
+
// Refresh rows which have moved
for (i=0; iSelectRow(i, false); // This row should no longer be selected
}
}
-
+
// Now select those rows which were not previously selected but should now be
m = (int)arrSelRows.GetCount();
for (j=0; jSelectRow(arrSelRows[j], true);
}
m_bIgnoreUIEvents = false;
-
+
if (oldCount != newCount) {
m_bForceUpdateSelection = true; // OnListRender() will call UpdateSelection()
}
@@ -722,7 +722,7 @@ void CBOINCBaseView::RestoreSelections() {
void CBOINCBaseView::ClearSelections() {
if (!m_pListPane) return;
-
+
m_bIgnoreUIEvents = true;
int i = -1;
while (1) {
@@ -745,7 +745,7 @@ void CBOINCBaseView::UpdateSelection(){
void CBOINCBaseView::PostUpdateSelection(){
wxASSERT(m_pTaskPane);
if (m_pTaskPane->UpdateControls()) {
- // Under wxWidgets 2.9.4, Layout() causes ListCtrl
+ // Under wxWidgets 2.9.4, Layout() causes ListCtrl
// to repaint, so call only when actually needed.
Layout();
}
@@ -791,8 +791,8 @@ void CBOINCBaseView::UpdateWebsiteSelection(long lControlGroup, PROJECT* project
// Default project url
pItem = new CTaskItem(
- wxString("Home page", wxConvUTF8),
- wxString(project->project_name.c_str(), wxConvUTF8) + wxT(" web site"),
+ wxString("Home page", wxConvUTF8),
+ wxString(project->project_name.c_str(), wxConvUTF8) + wxT(" web site"),
wxString(project->master_url, wxConvUTF8),
ID_TASK_PROJECT_WEB_PROJDEF_MIN
);
@@ -843,7 +843,7 @@ void CBOINCBaseView::OnKeyPressed(wxKeyEvent &event) {
if (m_pTaskPane) {
int keyCode = event.GetKeyCode();
wxUint32 keyFlags = event.GetRawKeyFlags();
-
+
if (keyCode == WXK_TAB) {
wxWindow* focused = wxWindow::FindFocus();
if (!m_pTaskPane->IsDescendant(focused)) {
diff --git a/clientgui/BOINCBaseView.h b/clientgui/BOINCBaseView.h
index 8bef7d1dfdc..b89a966dbe9 100644
--- a/clientgui/BOINCBaseView.h
+++ b/clientgui/BOINCBaseView.h
@@ -39,7 +39,7 @@ class CTaskItem : wxObject {
m_strName(strName), m_strDescription(strDescription), m_iEventID(iEventID),
m_pButton(NULL), m_strWebSiteLink(wxT("")) {};
CTaskItem( wxString strName, wxString strDescription, wxString strWebSiteLink, wxInt32 iEventID ) :
- m_strName(strName), m_strDescription(strDescription), m_iEventID(iEventID),
+ m_strName(strName), m_strDescription(strDescription), m_iEventID(iEventID),
m_pButton(NULL), m_strWebSiteLink(strWebSiteLink) {};
~CTaskItem() {};
@@ -118,7 +118,7 @@ class CBOINCBaseView : public wxPanel {
virtual double GetProgressValue(long item);
virtual wxString GetProgressText( long item);
virtual void AppendColumn(int columnID);
-
+
void InitSort();
void SetSortColumn(int newSortColIndex);
void SaveSelections();
@@ -126,13 +126,13 @@ class CBOINCBaseView : public wxPanel {
void ClearSavedSelections();
void ClearSelections();
void RefreshTaskPane();
-
+
CBOINCListCtrl* GetListCtrl() { return m_pListPane; }
-
+
#ifdef __WXMAC__
void OnKeyPressed(wxKeyEvent &event);
-#endif
-
+#endif
+
std::vector m_TaskGroups;
int m_iSortColumnID; // ColumnID of sort column
@@ -144,7 +144,7 @@ class CBOINCBaseView : public wxPanel {
int* m_iDefaultShownColumns;
int m_iNumDefaultShownColumns;
-
+
private:
wxArrayString m_arrSelectedKeys1; //array for remembering the current selected rows by primary key column value
@@ -165,7 +165,7 @@ class CBOINCBaseView : public wxPanel {
virtual int OnListGetItemImage( long item ) const;
void OnColClick(wxListEvent& event);
-
+
virtual int GetDocCount();
virtual wxString OnDocGetItemImage( long item ) const;
virtual wxString OnDocGetItemAttr( long item ) const;
@@ -203,7 +203,7 @@ class CBOINCBaseView : public wxPanel {
bool m_bForceUpdateSelection;
bool m_bIgnoreUIEvents;
bool m_bNeedSort;
-
+
int m_iPreviousSelectionCount;
long m_lPreviousFirstSelection;
int m_iProgressColumn;
diff --git a/clientgui/BOINCBaseWizard.cpp b/clientgui/BOINCBaseWizard.cpp
index 60bf6e192fb..ff2e941e4f7 100644
--- a/clientgui/BOINCBaseWizard.cpp
+++ b/clientgui/BOINCBaseWizard.cpp
@@ -37,13 +37,13 @@
/*!
* CBOINCBaseWizard type definition
*/
-
+
IMPLEMENT_DYNAMIC_CLASS( CBOINCBaseWizard, wxWizardEx )
-
+
/*!
* CBOINCBaseWizard constructors
*/
-
+
CBOINCBaseWizard::CBOINCBaseWizard() :
wxWizardEx()
{
@@ -60,7 +60,7 @@ CBOINCBaseWizard::CBOINCBaseWizard(wxWindow *parent, int id, const wxString& tit
* Process Cancel Event
*/
bool CBOINCBaseWizard::IsCancelInProgress() const
-{
+{
return m_bCancelInProgress;
}
@@ -78,7 +78,7 @@ void CBOINCBaseWizard::_ProcessCancelEvent( wxWizardExEvent& WXUNUSED(event) )
* Button Controls
*/
-wxButton* CBOINCBaseWizard::GetNextButton() const {
+wxButton* CBOINCBaseWizard::GetNextButton() const {
return m_btnNext;
}
@@ -105,7 +105,7 @@ void CBOINCBaseWizard::SimulateBackButton() {
event.SetEventObject(GetNextButton());
AddPendingEvent(event);
}
-
+
void CBOINCBaseWizard::EnableBackButton() {
m_btnPrev->Enable();
}
@@ -123,7 +123,7 @@ void CBOINCBaseWizard::SimulateCancelButton() {
event.SetEventObject(GetCancelButton());
AddPendingEvent(event);
}
-
+
void CBOINCBaseWizard::EnableCancelButton() {
m_btnCancel->Enable();
}
diff --git a/clientgui/BOINCBaseWizard.h b/clientgui/BOINCBaseWizard.h
index 3327b288123..2eb801dcc2a 100644
--- a/clientgui/BOINCBaseWizard.h
+++ b/clientgui/BOINCBaseWizard.h
@@ -26,7 +26,7 @@
* CBOINCBaseWizard class declaration
*/
-class CBOINCBaseWizard: public wxWizardEx {
+class CBOINCBaseWizard: public wxWizardEx {
DECLARE_DYNAMIC_CLASS( CBOINCBaseWizard )
public:
diff --git a/clientgui/BOINCClientManager.cpp b/clientgui/BOINCClientManager.cpp
index 8eb10dc53e4..a5d80cd6aa2 100644
--- a/clientgui/BOINCClientManager.cpp
+++ b/clientgui/BOINCClientManager.cpp
@@ -87,8 +87,8 @@ CBOINCClientManager::~CBOINCClientManager() {
bool CBOINCClientManager::AutoRestart() {
double timeNow, timeDiff;
if (IsBOINCCoreRunning()) return true;
-#if ! (defined(__WXMAC__) || defined(__WXMSW__))
-// Mac and Windows can restart Client as a daemon, but
+#if ! (defined(__WXMAC__) || defined(__WXMSW__))
+// Mac and Windows can restart Client as a daemon, but
// Linux may not know Client's location if it didn't start the Client
if (!m_bBOINCStartedByManager) return false;
#endif
@@ -122,7 +122,7 @@ bool CBOINCClientManager::AutoRestart() {
bool CBOINCClientManager::IsSystemBooting() {
bool bReturnValue = false;
#if defined(__WXMSW__)
- if (GetTickCount() < (1000*60*5)) bReturnValue = true; // If system has been up for less than 5 minutes
+ if (GetTickCount() < (1000*60*5)) bReturnValue = true; // If system has been up for less than 5 minutes
#elif defined(__WXMAC__)
if (getTimeSinceBoot() < (120)) bReturnValue = true; // If system has been up for less than 2 minutes
#endif
@@ -165,7 +165,7 @@ bool CBOINCClientManager::IsBOINCCoreRunning() {
// Look for BOINC Client in list of all running processes
retval = procinfo_setup(pm);
if (retval) return false; // Should never happen
-
+
PROC_MAP::iterator i;
for (i=pm.begin(); i!=pm.end(); ++i) {
PROCINFO& pi = i->second;
@@ -274,11 +274,11 @@ bool CBOINCClientManager::StartupBOINCCore() {
}
}
} else {
-
+
// Get the full path to core client inside this application's bundle
getPathToThisApp(buf, sizeof(buf));
#if 0 // The Mac version of wxExecute(wxString& ...) crashes if there is a space in the path
- strExecute = wxT("\"");
+ strExecute = wxT("\"");
strExecute += wxT(buf);
strExecute += wxT("/Contents/Resources/boinc\" --redirectio --launched_by_manager");
m_lBOINCCoreProcessId = ::wxExecute(strExecute);
@@ -308,9 +308,9 @@ bool CBOINCClientManager::StartupBOINCCore() {
#else // Unix based systems
wxString savedWD = ::wxGetCwd();
-
+
wxSetWorkingDirectory(wxGetApp().GetDataDirectory());
-
+
// Append boinc.exe to the end of the strExecute string and get ready to rock
strExecute = wxGetApp().GetRootDirectory() + wxT("boinc --redirectio --launched_by_manager");
#ifdef SANDBOX
@@ -323,7 +323,7 @@ bool CBOINCClientManager::StartupBOINCCore() {
wxLogTrace(wxT("Function Status"), wxT("CMainDocument::StartupBOINCCore - szDataDirectory '%s'\n"), wxGetApp().GetDataDirectory().c_str());
m_lBOINCCoreProcessId = ::wxExecute(strExecute);
-
+
wxSetWorkingDirectory(savedWD);
#endif
@@ -394,7 +394,7 @@ void CBOINCClientManager::KillClient() {
void CBOINCClientManager::KillClient() {
PROC_MAP pm;
int retval;
-
+
if (m_lBOINCCoreProcessId) {
kill_process(m_lBOINCCoreProcessId);
return;
@@ -402,7 +402,7 @@ void CBOINCClientManager::KillClient() {
retval = procinfo_setup(pm);
if (retval) return; // Should never happen
-
+
PROC_MAP::iterator i;
for (i=pm.begin(); i!=pm.end(); ++i) {
PROCINFO& procinfo = i->second;
@@ -469,7 +469,7 @@ void CBOINCClientManager::ShutdownBOINCCore(bool ShuttingDownManager) {
} else {
if (IsBOINCCoreRunning()) {
if (ShuttingDownManager) {
- // Set event filtering to allow RPC completion
+ // Set event filtering to allow RPC completion
// events but not events which start new RPCs
wxGetApp().SetEventFiltering(true);
}
@@ -525,7 +525,7 @@ ClientCrashDlg::ClientCrashDlg(double timeDiff) : wxDialog( NULL, wxID_ANY, wxT(
int minutes = wxMax((int)((timeDiff + 59.) / 60.), 2);
CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced();
wxASSERT(pSkinAdvanced);
-
+
// %s is the application name
// i.e. 'BOINC Manager', 'GridRepublic Manager'
strDialogTitle.Printf(
@@ -541,18 +541,18 @@ ClientCrashDlg::ClientCrashDlg(double timeDiff) : wxDialog( NULL, wxID_ANY, wxT(
strDialogMessage.Printf(
_("The %s client has exited unexpectedly 3 times within the last %d minutes.\nWould you like to restart it again?"),
pSkinAdvanced->GetApplicationShortName().c_str(),
- minutes
+ minutes
);
-
+
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer *icon_text = new wxBoxSizer( wxHORIZONTAL );
icon_text->Add( CreateTextSizer( strDialogMessage ), 0, wxALIGN_CENTER | wxLEFT, 10 );
topsizer->Add( icon_text, 1, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 );
-
+
wxStdDialogButtonSizer *sizerBtn = CreateStdDialogButtonSizer(wxYES | wxNO | wxHELP);
SetEscapeId(wxID_NO); // Changes return value of NO button to wxID_CANCEL
-
+
if ( sizerBtn )
topsizer->Add(sizerBtn, 0, wxEXPAND | wxALL, 10 );
diff --git a/clientgui/BOINCDialupManager.cpp b/clientgui/BOINCDialupManager.cpp
index 37d15d8f8c0..5fcdbe10568 100644
--- a/clientgui/BOINCDialupManager.cpp
+++ b/clientgui/BOINCDialupManager.cpp
@@ -127,7 +127,7 @@ void CBOINCDialUpManager::OnPoll() {
// Log out the trace information for debugging purposes.
/*
wxLogTrace(wxT("Function Status"), wxT("CBOINCDialUpManager::poll - Dialup Flags"));
- wxLogTrace(wxT("Function Status"),
+ wxLogTrace(wxT("Function Status"),
wxT("CBOINCDialUpManager::poll - -- bIsOnline = '%d', bIsDialing = '%d', m_bWasDialing = '%d', iNetworkStatus = '%d', bWantConnection = '%d'"),
bIsOnline, bIsDialing, m_bWasDialing, iNetworkStatus, bWantConnection
);
diff --git a/clientgui/BOINCGUIApp.cpp b/clientgui/BOINCGUIApp.cpp
index 313a133d072..d7fe6832371 100644
--- a/clientgui/BOINCGUIApp.cpp
+++ b/clientgui/BOINCGUIApp.cpp
@@ -204,7 +204,7 @@ bool CBOINCGUIApp::OnInit() {
// Detect if the daemon should be launched
m_bNeedRunDaemon = m_bNeedRunDaemon && m_bRunDaemon;
-
+
// Should we abort the BOINC Manager startup process?
if (m_bBOINCMGRAutoStarted && m_iBOINCMGRDisableAutoStart) {
return false;
@@ -242,7 +242,7 @@ bool CBOINCGUIApp::OnInit() {
BOINC_DIAG_HEAPCHECKENABLED |
BOINC_DIAG_MEMORYLEAKCHECKENABLED |
#endif
- BOINC_DIAG_DUMPCALLSTACKENABLED |
+ BOINC_DIAG_DUMPCALLSTACKENABLED |
BOINC_DIAG_PERUSERLOGFILES |
BOINC_DIAG_REDIRECTSTDERR |
BOINC_DIAG_REDIRECTSTDOUT |
@@ -320,7 +320,7 @@ bool CBOINCGUIApp::OnInit() {
//
char path_to_error[MAXPATHLEN];
path_to_error[0] = '\0';
-
+
if (!iErrorCode) {
iErrorCode = check_security(
g_use_sandbox, true, path_to_error, sizeof(path_to_error)
@@ -365,14 +365,14 @@ bool CBOINCGUIApp::OnInit() {
strDialogMessage += wxString::FromUTF8(path_to_error);
}
strDialogMessage += _(")");
-
+
fprintf(stderr, "%s\n", (const char*)strDialogMessage.utf8_str());
}
wxMessageDialog* pDlg = new wxMessageDialog(
- NULL,
- strDialogMessage,
- m_pSkinManager->GetAdvanced()->GetApplicationName(),
+ NULL,
+ strDialogMessage,
+ m_pSkinManager->GetAdvanced()->GetApplicationName(),
wxOK
);
@@ -388,9 +388,9 @@ bool CBOINCGUIApp::OnInit() {
#ifdef __WXMSW__
// Perform any last minute checks that should keep the manager
// from starting up.
- wxString strRebootPendingFile =
+ wxString strRebootPendingFile =
GetRootDirectory() + wxFileName::GetPathSeparator() + wxT("RebootPending.txt");
-
+
if (wxFile::Exists(strRebootPendingFile)) {
wxMessageDialog dialog(
NULL,
@@ -443,7 +443,7 @@ bool CBOINCGUIApp::OnInit() {
#ifndef __WXGTK__
// Initialize the task bar icon
m_pTaskBarIcon = new CTaskBarIcon(
- m_pSkinManager->GetAdvanced()->GetApplicationName(),
+ m_pSkinManager->GetAdvanced()->GetApplicationName(),
m_pSkinManager->GetAdvanced()->GetApplicationIcon(),
m_pSkinManager->GetAdvanced()->GetApplicationDisconnectedIcon(),
m_pSkinManager->GetAdvanced()->GetApplicationSnoozeIcon()
@@ -455,7 +455,7 @@ bool CBOINCGUIApp::OnInit() {
#endif // __WXGTK__
#ifdef __WXMAC__
m_pMacDockIcon = new CTaskBarIcon(
- m_pSkinManager->GetAdvanced()->GetApplicationName(),
+ m_pSkinManager->GetAdvanced()->GetApplicationName(),
m_pSkinManager->GetAdvanced()->GetApplicationIcon(),
m_pSkinManager->GetAdvanced()->GetApplicationDisconnectedIcon(),
m_pSkinManager->GetAdvanced()->GetApplicationSnoozeIcon()
@@ -466,7 +466,7 @@ bool CBOINCGUIApp::OnInit() {
// Startup the System Idle Detection code
IdleTrackerAttach();
-
+
// Show the UI
SetActiveGUI(m_iGUISelected, m_bGUIVisible);
@@ -480,14 +480,14 @@ bool CBOINCGUIApp::OnInit() {
m_pFrame->Raise();
}
}
-
+
return true;
}
#ifdef __WXMAC__
// We can "show" (unhide) the main window when the
// application is hidden and it won't be visible.
-// If we don't do this under wxCocoa 3.0, the Dock
+// If we don't do this under wxCocoa 3.0, the Dock
// icon will bounce (as in notification) when we
// click on our menu bar icon.
// But wxFrame::Show(true) makes the application
@@ -498,13 +498,13 @@ bool CBOINCGUIApp::OnInit() {
// loop is running, so this is called from
// CBOINCBaseFrame::OnPeriodicRPC() at the first
// firing of ID_PERIODICRPCTIMER.
-//
+//
void CBOINCGUIApp::OnFinishInit() {
if (!m_bGUIVisible) {
HideThisApp();
-
+
m_pFrame->wxWindow::Show();
-
+
if (m_pEventLog) {
m_pEventLog->wxWindow::Show();
}
@@ -679,7 +679,7 @@ bool CBOINCGUIApp::OnCmdLineParsed(wxCmdLineParser &parser) {
if (m_strBOINCMGRDataDirectory.Last() != '/') {
m_strBOINCMGRDataDirectory.Append('/');
}
-#endif
+#endif
if (parser.Found(wxT("namehost"), &m_strHostNameArg)) {
hostNameSpecified = true;
@@ -696,7 +696,7 @@ bool CBOINCGUIApp::OnCmdLineParsed(wxCmdLineParser &parser) {
} else {
m_iRPCPortArg = GUI_RPC_PORT;
}
-
+
if (parser.Found(wxT("password"), &m_strPasswordArg)) {
passwordSpecified = true;
} else {
@@ -751,7 +751,7 @@ void CBOINCGUIApp::DetectExecutableName() {
// change the current directory to the boinc install directory
GetModuleFileName(NULL, szPath, (sizeof(szPath)/sizeof(TCHAR)));
-
+
TCHAR *pszProg = _tcsrchr(szPath, '\\');
if (pszProg) {
pszProg++;
@@ -782,7 +782,7 @@ void CBOINCGUIApp::DetectRootDirectory() {
// change the current directory to the boinc install directory
GetModuleFileName(NULL, szPath, (sizeof(szPath)/sizeof(TCHAR)));
-
+
TCHAR *pszProg = _tcsrchr(szPath, '\\');
if (pszProg) {
szPath[pszProg - szPath + 1] = 0;
@@ -823,9 +823,9 @@ void CBOINCGUIApp::DetectDataDirectory() {
// change the current directory to the boinc data directory if it exists
lReturnValue = RegOpenKeyEx(
- HKEY_LOCAL_MACHINE,
+ HKEY_LOCAL_MACHINE,
_T("SOFTWARE\\Space Sciences Laboratory, U.C. Berkeley\\BOINC Setup"),
- 0,
+ 0,
KEY_READ,
&hkSetupHive
);
@@ -845,7 +845,7 @@ void CBOINCGUIApp::DetectDataDirectory() {
(*lpszValue) = NULL;
// Now get the data
- lReturnValue = RegQueryValueEx(
+ lReturnValue = RegQueryValueEx(
hkSetupHive,
_T("DATADIR"),
NULL,
@@ -858,13 +858,13 @@ void CBOINCGUIApp::DetectDataDirectory() {
// We need to get the size of the buffer needed
dwSize = 0;
lReturnValue = ExpandEnvironmentStrings(lpszValue, NULL, dwSize);
-
+
if (lReturnValue) {
// Make the buffer big enough for the expanded string
lpszExpandedValue = (LPTSTR) malloc(lReturnValue*sizeof(TCHAR));
(*lpszExpandedValue) = NULL;
dwSize = lReturnValue;
-
+
ExpandEnvironmentStrings(lpszValue, lpszExpandedValue, dwSize);
// Store the root directory for later use.
@@ -945,7 +945,7 @@ void CBOINCGUIApp::OnActivateApp(wxActivateEvent& event) {
#endif
{
bool keepEventLogInFront = m_bEventLogWasActive;
-
+
if (m_pEventLog && !m_pEventLog->IsIconized() && !keepEventLogInFront) {
m_pEventLog->Raise();
}
@@ -960,17 +960,17 @@ void CBOINCGUIApp::OnActivateApp(wxActivateEvent& event) {
}
event.Skip();
-
+
m_bProcessingActivateAppEvent = false;
}
void CBOINCGUIApp::OnRPCFinished( CRPCFinishedEvent& event ) {
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
wxASSERT(pDoc);
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
-
+
pDoc->OnRPCComplete(event);
}
@@ -1049,7 +1049,7 @@ void CBOINCGUIApp::OnEventLogClose() {
}
}
-
+
// The skin has changed and all UI elements need to reload their bitmaps.
//
void CBOINCGUIApp::FireReloadSkin() {
@@ -1097,7 +1097,7 @@ bool CBOINCGUIApp::SetActiveGUI(int iGUISelection, bool bShowWindow) {
m_pConfig->Read(wxT("YPos"), &iTop, 30);
m_pConfig->Read(wxT("XPos"), &iLeft, 30);
- // We don't save Simple View's width & height since it's
+ // We don't save Simple View's width & height since it's
// window is not resizable, so don't try to read them
#ifdef __WXMAC__
// m_pConfig->Read(wxT("Width"), &iWidth, 409);
@@ -1139,7 +1139,7 @@ bool CBOINCGUIApp::SetActiveGUI(int iGUISelection, bool bShowWindow) {
if (BOINC_ADVANCEDGUI == iGUISelection) {
// Initialize the advanced gui window
pNewFrame = new CAdvancedFrame(
- m_pSkinManager->GetAdvanced()->GetApplicationName(),
+ m_pSkinManager->GetAdvanced()->GetApplicationName(),
m_pSkinManager->GetAdvanced()->GetApplicationIcon(),
wxPoint(iLeft, iTop),
wxSize(iWidth, iHeight)
@@ -1147,7 +1147,7 @@ bool CBOINCGUIApp::SetActiveGUI(int iGUISelection, bool bShowWindow) {
} else {
// Initialize the simple gui window
pNewFrame = new CSimpleFrame(
- m_pSkinManager->GetAdvanced()->GetApplicationName(),
+ m_pSkinManager->GetAdvanced()->GetApplicationName(),
m_pSkinManager->GetAdvanced()->GetApplicationIcon(),
wxPoint(iLeft, iTop),
wxSize(iWidth, iHeight)
@@ -1162,7 +1162,7 @@ bool CBOINCGUIApp::SetActiveGUI(int iGUISelection, bool bShowWindow) {
// Store the new frame for future use
m_pFrame = pNewFrame;
- // Hide the old one if it exists. We must do this
+ // Hide the old one if it exists. We must do this
// after updating m_pFrame to prevent Mac OSX from
// hiding the application
if (pOldFrame) pOldFrame->Hide();
@@ -1179,7 +1179,7 @@ bool CBOINCGUIApp::SetActiveGUI(int iGUISelection, bool bShowWindow) {
}
}
- // Show the new frame if needed
+ // Show the new frame if needed
if (!m_bProcessingActivateAppEvent) {
if (m_pFrame && bShowWindow) {
if (m_pEventLog && !m_pEventLog->IsIconized()) {
@@ -1223,18 +1223,18 @@ int CBOINCGUIApp::ConfirmExit() {
wxASSERT(pSkinAdvanced);
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
wxASSERT(wxDynamicCast(pSkinAdvanced, CSkinAdvanced));
-
+
pDoc->GetConnectedComputerName(strConnectedCompter);
if (!pDoc->IsComputerNameLocal(strConnectedCompter)) {
// Don't shut down remote clients on Manager exit
return 1;
}
- // Don't run confirmation dialog if logging out or shutting down Mac,
+ // Don't run confirmation dialog if logging out or shutting down Mac,
// or if emergency exit from AsyncRPCDlg
if (s_bSkipExitConfirmation) return 1;
- // Don't run confirmation dialog if second instance of Manager
+ // Don't run confirmation dialog if second instance of Manager
if (IsMgrMultipleInstance()) return 1;
if (!m_iDisplayExitDialog) {
@@ -1284,16 +1284,16 @@ int CBOINCGUIApp::ConfirmExit() {
}
-// Use this instead of wxMessageBox from all tab Views to suppress
+// Use this instead of wxMessageBox from all tab Views to suppress
// Periodic RPCs. See comment in CMainDocument::RunPeriodicRPCs()
// for a fuller explanation.
int CBOINCGUIApp::SafeMessageBox(const wxString& message, const wxString& caption, long style,
wxWindow *parent, int x, int y )
{
int retval;
-
+
m_bSafeMessageBoxDisplayed++;
-
+
retval = wxMessageBox(message, caption, style, parent, x, y);
m_bSafeMessageBoxDisplayed--;
@@ -1309,7 +1309,7 @@ int CBOINCGUIApp::SafeMessageBox(const wxString& message, const wxString& captio
///
/// @return
/// true if the current process is visible, otherwise false.
-///
+///
bool CBOINCGUIApp::IsApplicationVisible() {
return false;
}
@@ -1346,13 +1346,13 @@ bool CBOINCGUIApp::ShowNotifications() {
bool CBOINCGUIApp::IsModalDialogDisplayed() {
if (m_bSafeMessageBoxDisplayed) return true;
-
- // Search for the dialog by ID since all of BOINC Manager's
+
+ // Search for the dialog by ID since all of BOINC Manager's
// dialog IDs are 10000.
if (wxDynamicCast(wxWindow::FindWindowById(ID_ANYDIALOG), wxDialog)) {
return true;
}
-
+
if (m_pDocument) {
if (m_pDocument->WaitingForRPC()) {
return true;
@@ -1372,14 +1372,14 @@ int CBOINCGUIApp::FilterEvent(wxEvent &event) {
theEventType = event.GetEventType();
if (m_pDocument->WaitingForRPC()) {
- // If in RPC Please Wait dialog, reject all command
- // and timer events except:
+ // If in RPC Please Wait dialog, reject all command
+ // and timer events except:
// - RPC Finished
// - those for that dialog or its children
// - Open Manager menu item from system tray icon
if ((theEventType == wxEVT_COMMAND_MENU_SELECTED) && (event.GetId() == wxID_OPEN)) {
- return -1;
+ return -1;
}
theRPCWaitDialog = m_pDocument->GetRPCWaitDialog();
@@ -1391,7 +1391,7 @@ int CBOINCGUIApp::FilterEvent(wxEvent &event) {
}
// Continue with rest of filtering below
} else {
- // Do limited filtering if shutting down to allow RPC
+ // Do limited filtering if shutting down to allow RPC
// completion events but not events which start new RPCs
if (!m_bFilterEvents) return -1;
}
@@ -1400,17 +1400,17 @@ int CBOINCGUIApp::FilterEvent(wxEvent &event) {
if (event.IsCommandEvent()) {
return false;
}
-
+
if (theEventType == wxEVT_TIMER) {
return false;
}
-
+
#ifdef __WXMSW__
if (theEventType == wxEVT_TASKBAR_MOVE) {
return false;
}
#endif
-
+
return -1;
}
diff --git a/clientgui/BOINCGUIApp.h b/clientgui/BOINCGUIApp.h
index 057c601ac71..5cc91220dfa 100644
--- a/clientgui/BOINCGUIApp.h
+++ b/clientgui/BOINCGUIApp.h
@@ -58,7 +58,7 @@ class CBOINCGUIApp : public wxApp {
#ifndef __WXMAC__
void OnEndSession(wxCloseEvent& event);
#endif
-
+
void OnInitCmdLine(wxCmdLineParser &parser);
bool OnCmdLineParsed(wxCmdLineParser &parser);
@@ -107,21 +107,21 @@ class CBOINCGUIApp : public wxApp {
#endif
bool m_bGUIVisible;
-
+
int m_iGUISelected;
bool m_bDebugSkins;
bool m_bMultipleInstancesOK;
bool m_bHostnamePasswordSet;
bool m_bFilterEvents;
bool m_bAboutDialogIsOpen;
- bool m_bRunDaemon;
- bool m_bNeedRunDaemon;
+ bool m_bRunDaemon;
+ bool m_bNeedRunDaemon;
// The last value defined in the wxLanguage enum is wxLANGUAGE_USER_DEFINED.
// defined in: wx/intl.h
wxArrayString m_astrLanguages;
wxString m_strISOLanguageCode;
-
+
int m_bSafeMessageBoxDisplayed;
public:
@@ -136,8 +136,8 @@ class CBOINCGUIApp : public wxApp {
wxString GetExecutableName() { return m_strBOINCMGRExecutableName; }
wxString GetRootDirectory() { return m_strBOINCMGRRootDirectory; }
wxString GetDataDirectory() { return m_strBOINCMGRDataDirectory; }
- wxString GetClientHostNameArg() { return m_strHostNameArg; }
- wxString GetClientPasswordArg() { return m_strPasswordArg; }
+ wxString GetClientHostNameArg() { return m_strHostNameArg; }
+ wxString GetClientPasswordArg() { return m_strPasswordArg; }
wxString GetArguments() { return m_strBOINCArguments; }
int GetClientRPCPortArg() { return m_iRPCPortArg; }
CDlgEventLog* GetEventLog() { return m_pEventLog; }
@@ -180,18 +180,18 @@ class CBOINCGUIApp : public wxApp {
#endif
bool GetRunDaemon()
- { return m_bRunDaemon; }
- void SetRunDaemon(bool bRunDaemon)
- { m_bRunDaemon = bRunDaemon; }
-
- bool GetNeedRunDaemon()
- { return m_bNeedRunDaemon; }
+ { return m_bRunDaemon; }
+ void SetRunDaemon(bool bRunDaemon)
+ { m_bRunDaemon = bRunDaemon; }
+
+ bool GetNeedRunDaemon()
+ { return m_bNeedRunDaemon; }
wxArrayString& GetSupportedLanguages() { return m_astrLanguages; }
wxString GetISOLanguageCode() { return m_strISOLanguageCode; }
void SetISOLanguageCode(wxString strISOLanguageCode)
{ m_strISOLanguageCode = strISOLanguageCode; }
-
+
void SetEventLogWasActive(bool wasActive) { m_bEventLogWasActive = wasActive; }
void DisplayEventLog(bool bShowWindow = true);
void OnEventLogClose();
@@ -203,10 +203,10 @@ class CBOINCGUIApp : public wxApp {
int StartBOINCDefaultScreensaverTest();
bool SetActiveGUI(int iGUISelection, bool bShowWindow = true);
-
+
void OnActivateApp( wxActivateEvent& event );
void OnRPCFinished( CRPCFinishedEvent& event );
-
+
int ConfirmExit();
int SafeMessageBox(
@@ -230,9 +230,9 @@ class CBOINCGUIApp : public wxApp {
int UpdateSystemIdleDetection();
-
+
void SetEventFiltering(bool set) { m_bFilterEvents = set; }
-
+
void SetAboutDialogIsOpen(bool set) { m_bAboutDialogIsOpen = set; }
bool GetAboutDialogIsOpen() { return m_bAboutDialogIsOpen; }
@@ -242,13 +242,13 @@ class CBOINCGUIApp : public wxApp {
bool WasFileModifiedBeforeSystemBoot(char * filePath);
void HideThisApp(void);
void getDisplayNameForThisApp(char* pathBuf, size_t bufSize);
-
+
#if !wxCHECK_VERSION(3,0,1)
// This should be fixed after wxCocoa 3.0.0:
// http://trac.wxwidgets.org/ticket/16156
// Override standard wxCocoa wxApp::CallOnInit() to allow Manager
- // to run properly when launched hidden on login via Login Item.
+ // to run properly when launched hidden on login via Login Item.
bool CallOnInit();
#endif
diff --git a/clientgui/BOINCGUIApp.rc b/clientgui/BOINCGUIApp.rc
index af0c53693d3..11b6906c809 100644
--- a/clientgui/BOINCGUIApp.rc
+++ b/clientgui/BOINCGUIApp.rc
@@ -80,14 +80,14 @@ boincsnooze ICON "res\\boincsnooze.ico"
// TEXTINCLUDE
//
-1 TEXTINCLUDE
+1 TEXTINCLUDE
BEGIN
"#include \r\n"
"#include ""win_config.h""\r\n"
"\0"
END
-2 TEXTINCLUDE
+2 TEXTINCLUDE
BEGIN
"\0"
END
diff --git a/clientgui/BOINCListCtrl.cpp b/clientgui/BOINCListCtrl.cpp
index 5b830c20250..8c867eba9a7 100644
--- a/clientgui/BOINCListCtrl.cpp
+++ b/clientgui/BOINCListCtrl.cpp
@@ -237,13 +237,13 @@ bool CBOINCListCtrl::OnRestoreState(wxConfigBase* pConfig) {
// If the user installed a new version of BOINC, new columns may have
// been added that didn't exist in the older version. Check for this.
//
- // This will also be triggered if the locale is changed, which will cause
- // SetListColumnOrder() to be called again so the wxListCtrl will be set
+ // This will also be triggered if the locale is changed, which will cause
+ // SetListColumnOrder() to be called again so the wxListCtrl will be set
// up with the correctly labeled columns.
//
bool foundNewColumns = false;
bool foundNewDefaultColumns = false;
-
+
if (pConfig->Read(wxT("HiddenColumns"), &strHiddenColumns)) {
wxArrayString hiddenArray;
wxArrayString defaultArray;
@@ -695,7 +695,7 @@ void CBOINCListCtrl::OnMouseDown(wxMouseEvent& event) {
#endif
-// To reduce flicker, refresh only changed columns (except
+// To reduce flicker, refresh only changed columns (except
// on Mac, which is double-buffered to eliminate flicker.)
void CBOINCListCtrl::RefreshCell(int row, int col) {
wxRect r;
diff --git a/clientgui/BOINCListCtrl.h b/clientgui/BOINCListCtrl.h
index d0589d5bd63..ac206b8b643 100644
--- a/clientgui/BOINCListCtrl.h
+++ b/clientgui/BOINCListCtrl.h
@@ -31,14 +31,14 @@
// Virtual wxListCtrl does not reliably generate selection and
// deselection events, so we must check for these differently.
-// We get more events than we need using EVT_LIST_CACHE_HINT,
+// We get more events than we need using EVT_LIST_CACHE_HINT,
// so testing on mouse events is more efficient, but it doesn't
// work on Windows.
#ifdef __WXMSW__
-// On Windows, check for selection / deselection on EVT_LIST_CACHE_HINT.
+// On Windows, check for selection / deselection on EVT_LIST_CACHE_HINT.
#define USE_LIST_CACHE_HINT 1
#else
-// On Mac & Linux, check for selection / deselection on EVT_LEFT_DOWN.
+// On Mac & Linux, check for selection / deselection on EVT_LEFT_DOWN.
#define USE_LIST_CACHE_HINT 0
#endif
@@ -87,7 +87,7 @@ class CBOINCListCtrl : public LISTCTRL_BASE {
void SelectRow(int row, bool setSelected);
void AddPendingProgressBar(int row);
void RefreshCell(int row, int col);
-
+
private:
virtual wxString OnGetItemText(long item, long column) const;
virtual int OnGetItemImage(long item) const;
@@ -108,7 +108,7 @@ class CBOINCListCtrl : public LISTCTRL_BASE {
private:
void OnDrawProgressBar(CDrawProgressBarEvent& event);
void DrawProgressBars(void);
-
+
bool m_bProgressBarEventPending;
#else
public:
@@ -176,7 +176,7 @@ class MyEvtHandler : public wxEvtHandler
private:
CBOINCListCtrl * m_listCtrl;
-
+
#if !USE_NATIVE_LISTCONTROL
#ifdef __WXGTK__
int m_view_startX;
diff --git a/clientgui/BOINCTaskBar.cpp b/clientgui/BOINCTaskBar.cpp
index 3a706372a67..428833d0fe0 100644
--- a/clientgui/BOINCTaskBar.cpp
+++ b/clientgui/BOINCTaskBar.cpp
@@ -425,7 +425,7 @@ bool CTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& )
#if wxCHECK_VERSION(3,1,6)
wxIcon icon = newIcon.GetIcon(wxDefaultSize);
#endif
-
+
if (m_iconType != wxTBI_DOCK) {
if (wxGetApp().GetBOINCMGRHideMenuBarIcon()) {
RemoveIcon();
@@ -445,7 +445,7 @@ bool CTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& )
macIcon = wxImage(macsnoozebadge);
else {
#if wxDEBUG_LEVEL
- err =
+ err =
#endif
SetDockBadge(NULL);
return true;
@@ -481,7 +481,7 @@ bool CTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& )
// Actually set the dock image
#if wxDEBUG_LEVEL
- err =
+ err =
#endif
SetDockBadge(&bmp);
diff --git a/clientgui/BOINCTaskBar.h b/clientgui/BOINCTaskBar.h
index a1f459bd9fe..c3419b6c987 100644
--- a/clientgui/BOINCTaskBar.h
+++ b/clientgui/BOINCTaskBar.h
@@ -91,7 +91,7 @@ class CTaskBarIcon : public wxTaskBarIconEx {
bool IsBalloonsSupported();
bool QueueBalloon(
- const wxIcon& icon,
+ const wxIcon& icon,
const wxString title = wxEmptyString,
const wxString message = wxEmptyString,
unsigned int iconballoon = BALLOONTYPE_INFO
@@ -101,7 +101,7 @@ class CTaskBarIcon : public wxTaskBarIconEx {
wxIcon m_iconTaskBarNormal;
wxIcon m_iconTaskBarDisconnected;
wxIcon m_iconTaskBarSnooze;
-
+
wxIcon m_iconCurrentIcon;
bool m_bTaskbarInitiatedShutdown;
diff --git a/clientgui/CompletionErrorPage.cpp b/clientgui/CompletionErrorPage.cpp
index a9f4875ea5b..3f961b01293 100644
--- a/clientgui/CompletionErrorPage.cpp
+++ b/clientgui/CompletionErrorPage.cpp
@@ -39,40 +39,40 @@
/*!
* CCompletionErrorPage type definition
*/
-
+
IMPLEMENT_DYNAMIC_CLASS( CCompletionErrorPage, wxWizardPageEx )
-
+
/*!
* CCompletionErrorPage event table definition
*/
-
+
BEGIN_EVENT_TABLE( CCompletionErrorPage, wxWizardPageEx )
-
+
////@begin CCompletionErrorPage event table entries
EVT_WIZARDEX_PAGE_CHANGED( -1, CCompletionErrorPage::OnPageChanged )
EVT_WIZARDEX_CANCEL( -1, CCompletionErrorPage::OnCancel )
////@end CCompletionErrorPage event table entries
-
+
END_EVENT_TABLE()
-
+
/*!
* CCompletionErrorPage constructors
*/
-
+
CCompletionErrorPage::CCompletionErrorPage( )
{
}
-
+
CCompletionErrorPage::CCompletionErrorPage( CBOINCBaseWizard* parent )
{
Create( parent );
}
-
+
/*!
* CAccountResultPage creator
*/
-
+
bool CCompletionErrorPage::Create( CBOINCBaseWizard* parent )
{
////@begin CCompletionErrorPage member initialisation
@@ -82,7 +82,7 @@ bool CCompletionErrorPage::Create( CBOINCBaseWizard* parent )
m_pServerMessagesStaticBoxSizerCtrl = NULL;
m_pServerMessagesCtrl = NULL;
////@end CCompletionErrorPage member initialisation
-
+
////@begin CCompletionErrorPage creation
wxWizardPageEx::Create( parent, ID_COMPLETIONERRORPAGE );
@@ -92,13 +92,13 @@ bool CCompletionErrorPage::Create( CBOINCBaseWizard* parent )
return TRUE;
}
-
+
/*!
* Control creation for CAccountResultPage
*/
-
+
void CCompletionErrorPage::CreateControls()
-{
+{
////@begin CCompletionErrorPage content construction
CCompletionErrorPage* itemWizardPage85 = this;
@@ -127,38 +127,38 @@ void CCompletionErrorPage::CreateControls()
m_pServerMessagesStaticBoxSizerCtrl->Add(m_pServerMessagesCtrl, 0, wxGROW|wxALL, 5);
////@end CCompletionErrorPage content construction
}
-
+
/*!
* Gets the previous page.
*/
-
+
wxWizardPageEx* CCompletionErrorPage::GetPrev() const
{
return NULL;
}
-
+
/*!
* Gets the next page.
*/
-
+
wxWizardPageEx* CCompletionErrorPage::GetNext() const
{
return NULL;
}
-
+
/*!
* Should we show tooltips?
*/
-
+
bool CCompletionErrorPage::ShowToolTips()
{
return TRUE;
}
-
+
/*!
* Get bitmap resources
*/
-
+
wxBitmap CCompletionErrorPage::GetBitmapResource( const wxString& WXUNUSED(name) )
{
// Bitmap retrieval
@@ -167,11 +167,11 @@ wxBitmap CCompletionErrorPage::GetBitmapResource( const wxString& WXUNUSED(name)
return wxNullBitmap;
////@end CCompletionErrorPage bitmap retrieval
}
-
+
/*!
* Get icon resources
*/
-
+
wxIcon CCompletionErrorPage::GetIconResource( const wxString& WXUNUSED(name) )
{
// Icon retrieval
@@ -180,11 +180,11 @@ wxIcon CCompletionErrorPage::GetIconResource( const wxString& WXUNUSED(name) )
return wxNullIcon;
////@end CCompletionErrorPage icon retrieval
}
-
+
/*!
* wxEVT_WIZARD_PAGE_CHANGED event handler for ID_COMPLETIONERRORPAGE
*/
-
+
void CCompletionErrorPage::OnPageChanged( wxWizardExEvent& event ) {
if (event.GetDirection() == false) return;
@@ -239,11 +239,11 @@ void CCompletionErrorPage::OnPageChanged( wxWizardExEvent& event ) {
Fit();
}
-
+
/*!
* wxEVT_WIZARD_CANCEL event handler for ID_COMPLETIONERRORPAGE
*/
-
+
void CCompletionErrorPage::OnCancel( wxWizardExEvent& event ) {
PROCESS_CANCELEVENT(event);
}
diff --git a/clientgui/CompletionErrorPage.h b/clientgui/CompletionErrorPage.h
index cfad043f6a2..910034837c4 100644
--- a/clientgui/CompletionErrorPage.h
+++ b/clientgui/CompletionErrorPage.h
@@ -27,7 +27,7 @@
*/
class CCompletionErrorPage: public wxWizardPageEx
-{
+{
DECLARE_DYNAMIC_CLASS( CCompletionErrorPage )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/CompletionPage.cpp b/clientgui/CompletionPage.cpp
index ebb18c3e1d9..0c20f83f51e 100644
--- a/clientgui/CompletionPage.cpp
+++ b/clientgui/CompletionPage.cpp
@@ -40,40 +40,40 @@
/*!
* CCompletionPage type definition
*/
-
+
IMPLEMENT_DYNAMIC_CLASS( CCompletionPage, wxWizardPageEx )
-
+
/*!
* CCompletionPage event table definition
*/
-
+
BEGIN_EVENT_TABLE( CCompletionPage, wxWizardPageEx )
-
+
////@begin CCompletionPage event table entries
EVT_WIZARDEX_PAGE_CHANGED( -1, CCompletionPage::OnPageChanged )
EVT_WIZARDEX_CANCEL( -1, CCompletionPage::OnCancel )
EVT_WIZARDEX_FINISHED( ID_COMPLETIONPAGE, CCompletionPage::OnFinished )
////@end CCompletionPage event table entries
-
+
END_EVENT_TABLE()
-
+
/*!
* CCompletionPage constructors
*/
-
+
CCompletionPage::CCompletionPage( )
{
}
-
+
CCompletionPage::CCompletionPage( CBOINCBaseWizard* parent )
{
Create( parent );
}
-
+
/*!
* CCompletionPage creator
*/
-
+
bool CCompletionPage::Create( CBOINCBaseWizard* parent )
{
////@begin CCompletionPage member initialisation
@@ -82,23 +82,23 @@ bool CCompletionPage::Create( CBOINCBaseWizard* parent )
m_pCompletionBrandedMessage = NULL;
m_pCompletionMessage = NULL;
////@end CCompletionPage member initialisation
-
+
////@begin CCompletionPage creation
wxWizardPageEx::Create( parent, ID_COMPLETIONPAGE );
CreateControls();
GetSizer()->Fit(this);
////@end CCompletionPage creation
-
+
return TRUE;
}
-
+
/*!
* Control creation for CCompletionPage
*/
-
+
void CCompletionPage::CreateControls()
-{
+{
////@begin CCompletionPage content construction
CCompletionPage* itemWizardPage79 = this;
@@ -124,38 +124,38 @@ void CCompletionPage::CreateControls()
itemBoxSizer80->Add(m_pCompletionMessage, 0, wxALIGN_LEFT|wxALL, 5);
////@end CCompletionPage content construction
}
-
+
/*!
* Gets the previous page.
*/
-
+
wxWizardPageEx* CCompletionPage::GetPrev() const
{
return NULL;
}
-
+
/*!
* Gets the next page.
*/
-
+
wxWizardPageEx* CCompletionPage::GetNext() const
{
return NULL;
}
-
+
/*!
* Should we show tooltips?
*/
-
+
bool CCompletionPage::ShowToolTips()
{
return TRUE;
}
-
+
/*!
* Get bitmap resources
*/
-
+
wxBitmap CCompletionPage::GetBitmapResource( const wxString& WXUNUSED(name) )
{
// Bitmap retrieval
@@ -163,11 +163,11 @@ wxBitmap CCompletionPage::GetBitmapResource( const wxString& WXUNUSED(name) )
return wxNullBitmap;
////@end CCompletionPage bitmap retrieval
}
-
+
/*!
* Get icon resources
*/
-
+
wxIcon CCompletionPage::GetIconResource( const wxString& WXUNUSED(name) )
{
// Icon retrieval
@@ -175,11 +175,11 @@ wxIcon CCompletionPage::GetIconResource( const wxString& WXUNUSED(name) )
return wxNullIcon;
////@end CCompletionPage icon retrieval
}
-
+
/*!
* wxEVT_WIZARD_PAGE_CHANGED event handler for ID_COMPLETIONPAGE
*/
-
+
void CCompletionPage::OnPageChanged( wxWizardExEvent& event ) {
if (event.GetDirection() == false) return;
@@ -275,26 +275,26 @@ void CCompletionPage::OnPageChanged( wxWizardExEvent& event ) {
pWAP->GetSize(&w, &h);
m_pCompletionBrandedMessage->Wrap(w - x - x1 - 5);
Fit();
-
+
// Is this supposed to be completely automated?
// If so, then go ahead and close the wizard down now.
if (pWAP->IsCloseWhenCompleted()) {
pWAP->SimulateNextButton();
}
}
-
+
/*!
* wxEVT_WIZARD_CANCEL event handler for ID_COMPLETIONPAGE
*/
-
+
void CCompletionPage::OnCancel( wxWizardExEvent& event ) {
PROCESS_CANCELEVENT(event);
}
-
+
/*!
* wxEVT_WIZARD_FINISHED event handler for ID_COMPLETIONPAGE
*/
-
+
void CCompletionPage::OnFinished( wxWizardExEvent& event ) {
event.Skip();
}
diff --git a/clientgui/CompletionPage.h b/clientgui/CompletionPage.h
index a4c0dee4c2e..f179a101bb6 100644
--- a/clientgui/CompletionPage.h
+++ b/clientgui/CompletionPage.h
@@ -27,7 +27,7 @@
*/
class CCompletionPage: public wxWizardPageEx
-{
+{
DECLARE_DYNAMIC_CLASS( CCompletionPage )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/DlgAbout.cpp b/clientgui/DlgAbout.cpp
index 0be0ec7b7d0..7374b0986e4 100644
--- a/clientgui/DlgAbout.cpp
+++ b/clientgui/DlgAbout.cpp
@@ -98,7 +98,7 @@ bool CDlgAbout::Create(wxWindow* parent, wxWindowID id, const wxString& caption,
#endif
m_strWidgetsVersion.Printf(wxT("%d.%d.%d"), wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER);
////@end CDlgAbout member initialisation
-
+
CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced();
wxASSERT(pSkinAdvanced);
wxASSERT(wxDynamicCast(pSkinAdvanced, CSkinAdvanced));
@@ -143,7 +143,7 @@ bool CDlgAbout::Create(wxWindow* parent, wxWindowID id, const wxString& caption,
* Control creation for CDlgHelpAbout
*/
-void CDlgAbout::CreateControls() {
+void CDlgAbout::CreateControls() {
////@begin CDlgAbout content construction
CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced();
wxASSERT(pSkinAdvanced);
diff --git a/clientgui/DlgAbout.h b/clientgui/DlgAbout.h
index e42b9b7b2e6..3a0b39790e8 100644
--- a/clientgui/DlgAbout.h
+++ b/clientgui/DlgAbout.h
@@ -68,7 +68,7 @@
*/
class CDlgAbout: public wxDialog
-{
+{
DECLARE_DYNAMIC_CLASS( CDlgAbout )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/DlgAdvPreferences.cpp b/clientgui/DlgAdvPreferences.cpp
index 8f68829a154..1ed9ce99c89 100644
--- a/clientgui/DlgAdvPreferences.cpp
+++ b/clientgui/DlgAdvPreferences.cpp
@@ -478,7 +478,7 @@ bool CDlgAdvPreferences::SavePreferencesSettings() {
m_txtProcUseProcessorsNotInUse->GetValue().ToDouble(&td);
prefs.niu_max_ncpus_pct = RoundToHundredths(td);
mask.niu_max_ncpus_pct=true;
-
+
m_txtProcUseCPUTime->GetValue().ToDouble(&td);
prefs.cpu_usage_limit=RoundToHundredths(td);
mask.cpu_usage_limit=true;
diff --git a/clientgui/DlgDiagnosticLogFlags.h b/clientgui/DlgDiagnosticLogFlags.h
index bbf1b23feae..78809a8256b 100644
--- a/clientgui/DlgDiagnosticLogFlags.h
+++ b/clientgui/DlgDiagnosticLogFlags.h
@@ -55,13 +55,13 @@ class CDlgDiagnosticLogFlags : public wxDialog {
//generic layout methods
bool SaveState();
bool RestoreState();
-
+
void CreateCheckboxes();
void SaveFlags();
-
+
LOG_FLAGS log_flags;
CC_CONFIG m_cc_config;
-
+
wxGridSizer* m_headingSizer;
std::vector m_checkbox_list;
wxButton* m_btnApply;
diff --git a/clientgui/DlgEventLogListCtrl.cpp b/clientgui/DlgEventLogListCtrl.cpp
index e49cd030570..60f4728f98a 100644
--- a/clientgui/DlgEventLogListCtrl.cpp
+++ b/clientgui/DlgEventLogListCtrl.cpp
@@ -85,12 +85,12 @@ END_EVENT_TABLE()
CDlgEventLogListCtrl::CDlgEventLogListCtrl() {}
CDlgEventLogListCtrl::CDlgEventLogListCtrl(CDlgEventLog* pView, wxWindowID iListWindowID, wxInt32 iListWindowFlags)
- : DLG_LISTCTRL_BASE(pView, iListWindowID, wxDefaultPosition, wxDefaultSize, iListWindowFlags)
+ : DLG_LISTCTRL_BASE(pView, iListWindowID, wxDefaultPosition, wxDefaultSize, iListWindowFlags)
{
m_pParentView = pView;
m_bIsSingleSelection = (iListWindowFlags & wxLC_SINGLE_SEL) ? true : false ;
-
+
#ifdef __WXGTK__
savedHandler = GetMainWin()->GetEventHandler();
GetMainWin()->PushEventHandler(new MyEvtLogEvtHandler(this));
diff --git a/clientgui/DlgEventLogListCtrl.h b/clientgui/DlgEventLogListCtrl.h
index 175c97414cb..bdc1641b8c9 100644
--- a/clientgui/DlgEventLogListCtrl.h
+++ b/clientgui/DlgEventLogListCtrl.h
@@ -48,7 +48,7 @@ class CDlgEventLogListCtrl : public DLG_LISTCTRL_BASE
#endif
private:
-
+
virtual wxString OnGetItemText(long item, long column) const;
virtual int OnGetItemImage(long item) const;
virtual wxListItemAttr* OnGetItemAttr(long item) const;
diff --git a/clientgui/DlgExclusiveApps.cpp b/clientgui/DlgExclusiveApps.cpp
index cd2b8093556..e146089f53e 100644
--- a/clientgui/DlgExclusiveApps.cpp
+++ b/clientgui/DlgExclusiveApps.cpp
@@ -80,9 +80,9 @@ CDlgExclusiveApps::CDlgExclusiveApps(wxWindow* parent) :
m_addExclusiveAppButton = new wxButton( exclusiveAppsListStaticBox, ID_ADDEXCLUSIVEAPPBUTTON, _("Add..."), wxDefaultPosition, wxDefaultSize, 0 );
m_addExclusiveAppButton->SetToolTip( _("Add an application to this list"));
exclusiveAppsButtonSizer->Add( m_addExclusiveAppButton, 0, wxRIGHT, 5 );
-
+
exclusiveAppsButtonSizer->AddStretchSpacer();
-
+
m_removeExclusiveAppButton = new wxButton( exclusiveAppsListStaticBox, ID_REMOVEEXCLUSIVEAPPBUTTON, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
m_removeExclusiveAppButton->SetToolTip( _("Remove an application from this list"));
exclusiveAppsButtonSizer->Add( m_removeExclusiveAppButton, 0, wxLEFT, 5 );
@@ -104,9 +104,9 @@ CDlgExclusiveApps::CDlgExclusiveApps(wxWindow* parent) :
m_addExclusiveGPUAppButton = new wxButton( exclusiveGPUAppsListStaticBox, ID_ADDEXCLUSIVEGPUAPPBUTTON, _("Add..."), wxDefaultPosition, wxDefaultSize, 0 );
m_addExclusiveGPUAppButton->SetToolTip( _("Add an application to this list"));
exclusiveGPUAppsButtonSizer->Add( m_addExclusiveGPUAppButton, 0, wxRIGHT, 5 );
-
+
exclusiveGPUAppsButtonSizer->AddStretchSpacer();
-
+
m_removeExclusiveGPUAppButton = new wxButton( exclusiveGPUAppsListStaticBox, ID_REMOVEEXCLUSIVEGPUAPPBUTTON, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
m_removeExclusiveGPUAppButton->SetToolTip( _("Remove an application from this list"));
exclusiveGPUAppsButtonSizer->Add( m_removeExclusiveGPUAppButton, 0, wxLEFT, 5 );
@@ -128,7 +128,7 @@ CDlgExclusiveApps::CDlgExclusiveApps(wxWindow* parent) :
moreOptionsLinkSizer->Add(
new wxHyperlinkCtrl(
this, wxID_ANY, wxT("https://boinc.berkeley.edu/wiki/Client_configuration"),
- wxT("https://boinc.berkeley.edu/wiki/Client_configuration"),
+ wxT("https://boinc.berkeley.edu/wiki/Client_configuration"),
wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE
),
#ifdef __WXMAC__
diff --git a/clientgui/DlgExclusiveApps.h b/clientgui/DlgExclusiveApps.h
index c7f4ec466dc..63d0503df3d 100644
--- a/clientgui/DlgExclusiveApps.h
+++ b/clientgui/DlgExclusiveApps.h
@@ -54,7 +54,7 @@ class CDlgExclusiveApps : public wxDialog {
CC_CONFIG config;
bool m_bExclusiveAppsDataChanged;
bool m_bInInit;
-
+
wxListBox* m_exclusiveApsListBox;
wxListBox* m_exclusiveGPUApsListBox;
wxButton* m_addExclusiveAppButton;
diff --git a/clientgui/DlgExitMessage.cpp b/clientgui/DlgExitMessage.cpp
index ea1d7706403..56cd36edf74 100644
--- a/clientgui/DlgExitMessage.cpp
+++ b/clientgui/DlgExitMessage.cpp
@@ -107,14 +107,14 @@ bool CDlgExitMessage::Create( wxWindow* parent, wxWindowID id, const wxString& c
*/
void CDlgExitMessage::CreateControls()
-{
+{
CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced();
wxString strExitMessage = wxEmptyString;
wxString strAlwaysExitMessage = wxEmptyString;
wxASSERT(pSkinAdvanced);
wxASSERT(wxDynamicCast(pSkinAdvanced, CSkinAdvanced));
-
+
////@begin CDlgExitMessage content construction
CDlgExitMessage* itemDialog1 = this;
diff --git a/clientgui/DlgExitMessage.h b/clientgui/DlgExitMessage.h
index e334b2de7e2..4fb288e2ba3 100644
--- a/clientgui/DlgExitMessage.h
+++ b/clientgui/DlgExitMessage.h
@@ -72,7 +72,7 @@
*/
class CDlgExitMessage: public wxDialog
-{
+{
DECLARE_DYNAMIC_CLASS( CDlgExitMessage )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/DlgGenericMessage.cpp b/clientgui/DlgGenericMessage.cpp
index 372feb2cb1a..a9d29bb96af 100644
--- a/clientgui/DlgGenericMessage.cpp
+++ b/clientgui/DlgGenericMessage.cpp
@@ -89,7 +89,7 @@ bool CDlgGenericMessage::Create( wxWindow* parent, wxWindowID id, const wxString
*/
void CDlgGenericMessage::CreateControls()
-{
+{
////@begin CDlgGenericMessage content construction
CDlgGenericMessage* itemDialog1 = this;
diff --git a/clientgui/DlgGenericMessage.h b/clientgui/DlgGenericMessage.h
index a3786df47fd..49347abae60 100644
--- a/clientgui/DlgGenericMessage.h
+++ b/clientgui/DlgGenericMessage.h
@@ -71,7 +71,7 @@
*/
class CDlgGenericMessage: public wxDialog
-{
+{
DECLARE_DYNAMIC_CLASS( CDlgGenericMessage )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/DlgHiddenColumns.h b/clientgui/DlgHiddenColumns.h
index bdf706a5d43..fffa31ffa25 100644
--- a/clientgui/DlgHiddenColumns.h
+++ b/clientgui/DlgHiddenColumns.h
@@ -37,14 +37,14 @@ class CDlgHiddenColumns : public wxDialog {
void OnOK(wxCommandEvent& event);
void OnSetDefaults(wxCommandEvent& event);
void OnCheckboxClick(wxCommandEvent& event);
-
+
private:
//generic layout methods
bool SaveState();
bool RestoreState();
-
+
void CreateCheckboxes();
-
+
wxButton* m_btnOK;
wxGridSizer* m_headingSizer;
std::vector *> m_checkbox_list;
diff --git a/clientgui/DlgItemProperties.cpp b/clientgui/DlgItemProperties.cpp
index fa59730daf7..ec2e9e9790c 100644
--- a/clientgui/DlgItemProperties.cpp
+++ b/clientgui/DlgItemProperties.cpp
@@ -49,8 +49,8 @@ struct ITEM {
};
/* Constructor */
-CDlgItemProperties::CDlgItemProperties(wxWindow* parent) :
- wxDialog( parent, ID_ANYDIALOG, wxEmptyString, wxDefaultPosition,
+CDlgItemProperties::CDlgItemProperties(wxWindow* parent) :
+ wxDialog( parent, ID_ANYDIALOG, wxEmptyString, wxDefaultPosition,
wxSize( 503,480 ), wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ) {
CBOINCBaseFrame* pFrame = wxGetApp().GetFrame();
wxASSERT(pFrame);
@@ -58,16 +58,16 @@ CDlgItemProperties::CDlgItemProperties(wxWindow* parent) :
SetSizeHints( wxDefaultSize, wxDefaultSize );
SetExtraStyle( GetExtraStyle() | wxWS_EX_VALIDATE_RECURSIVELY );
-
+
m_bSizer1 = new wxBoxSizer( wxVERTICAL );
-
+
const long style = wxBORDER_NONE;
m_txtInformation = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style, wxEmptyString );
m_txtInformation->Bind(wxEVT_LEFT_DOWN, &CDlgItemProperties::OnMouseButtonEvent, this);
m_txtInformation->Bind(wxEVT_LEFT_UP, &CDlgItemProperties::OnMouseButtonEvent, this);
-
+
m_bSizer1->Add( m_txtInformation, 1, wxEXPAND | wxALL, 5 );
-
+
wxBoxSizer *bSizer2 = new wxBoxSizer(wxHORIZONTAL);
m_bSizer1->Add(bSizer2, 0, wxALIGN_RIGHT | wxALL, 12);
@@ -79,12 +79,12 @@ CDlgItemProperties::CDlgItemProperties(wxWindow* parent) :
m_pCopySelectedButton->Enable(false);
m_btnClose = new wxButton( this, wxID_OK, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
- m_btnClose->SetDefault();
+ m_btnClose->SetDefault();
bSizer2->Add( m_btnClose, 0, wxALIGN_BOTTOM|wxALL, 5 );
-
+
SetSizer( m_bSizer1 );
Layout();
-
+
int currentTabView = pFrame->GetCurrentViewPage();
switch(currentTabView) {
case VW_PROJ:
@@ -120,7 +120,7 @@ bool CDlgItemProperties::SaveState() {
pConfig->Write(wxT("YPos"), GetPosition().y);
pConfig->Flush();
-
+
return true;
}
@@ -171,7 +171,7 @@ bool CDlgItemProperties::RestoreState() {
if ( oTempSize.GetWidth() > rDisplay.width ) oTempSize.SetWidth(rDisplay.width);
if ( oTempSize.GetHeight() > rDisplay.height ) oTempSize.SetHeight(rDisplay.height);
- // Check if part of the display was going to be off the screen, if so, center the
+ // Check if part of the display was going to be off the screen, if so, center the
// display on that axis
if ( oTempPoint.x < rDisplay.x ) {
oTempPoint.x = rDisplay.x;
@@ -188,7 +188,7 @@ bool CDlgItemProperties::RestoreState() {
delete display;
#endif
#ifdef __WXMAC__
- // If the user has changed the arrangement of multiple
+ // If the user has changed the arrangement of multiple
// displays, make sure the window title bar is still on-screen.
if (!IsWindowOnScreen(oTempPoint.x, oTempPoint.y, oTempSize.GetWidth(), oTempSize.GetHeight())) {
oTempPoint.y = oTempPoint.x = 30;
@@ -237,17 +237,17 @@ void CDlgItemProperties::renderInfos(PROJECT* project_in) {
//disk usage needs additional lookups
CMainDocument* pDoc = wxGetApp().GetDocument();
pDoc->CachedDiskUsageUpdate();
-
- // CachedDiskUsageUpdate() may have invalidated our project
+
+ // CachedDiskUsageUpdate() may have invalidated our project
// pointer, so get an updated pointer to this project
PROJECT* project = pDoc->project(project_in->master_url);
if (!project) return; // TODO: display some sort of error alert?
std::vector dp = pDoc->disk_usage.projects;
- double diskusage=0.0;
+ double diskusage=0.0;
for (unsigned int i=0; i< dp.size(); i++) {
- PROJECT* tp = dp[i];
- std::string tname;
+ PROJECT* tp = dp[i];
+ std::string tname;
tp->get_name(tname);
wxString t1(wxString(tname.c_str(), wxConvUTF8));
if(t1.IsSameAs(wxString(projectname.c_str(), wxConvUTF8)) || t1.IsSameAs(wxString(project->master_url, wxConvUTF8))) {
@@ -322,7 +322,7 @@ void CDlgItemProperties::renderInfos(PROJECT* project_in) {
format_number(project->host_expavg_credit, 2).c_str()
)
);
-
+
if (!project->non_cpu_intensive) {
addSection(_("Scheduling"));
addProperty(_("Scheduling priority"), format_number(project->sched_priority, 2));
@@ -379,7 +379,7 @@ void CDlgItemProperties::renderInfos(RESULT* result) {
avp = r->avp;
wup = r->wup;
}
-
+
addProperty(_("Application"), FormatApplicationName(result));
addProperty(_("Name"), wxString(result->wu_name, wxConvUTF8));
addProperty(_("State"), result_description(result, false));
@@ -451,7 +451,7 @@ void CDlgItemProperties::renderInfos(RESULT* result) {
}
//
-wxString CDlgItemProperties::FormatDiskSpace(double bytes) {
+wxString CDlgItemProperties::FormatDiskSpace(double bytes) {
wxString strBuffer= wxEmptyString;
if (bytes >= TERA) {
@@ -553,7 +553,7 @@ void CDlgItemProperties::renderInfos() {
content += m_items[i].value;
content += "";
content += "";
- }
+ }
}
content += "";
content += "";
@@ -563,12 +563,12 @@ void CDlgItemProperties::renderInfos() {
}
-// adds a title section label to the dialog
+// adds a title section label to the dialog
void CDlgItemProperties::addSection(const wxString& title) {
m_items.push_back(ITEM(ItemTypeSection, title));
}
-// adds a property row to the dialog
+// adds a property row to the dialog
void CDlgItemProperties::addProperty(const wxString& name, const wxString& value) {
m_items.push_back(ITEM(ItemTypeProperty, name, value));
}
diff --git a/clientgui/DlgOptions.cpp b/clientgui/DlgOptions.cpp
index 92d7bc2bf8b..3e9c48e6e6e 100644
--- a/clientgui/DlgOptions.cpp
+++ b/clientgui/DlgOptions.cpp
@@ -82,10 +82,10 @@ CDlgOptions::~CDlgOptions() {
wxASSERT(pFrame);
wxASSERT(wxDynamicCast(pFrame, CBOINCBaseFrame));
-
+
wxGetApp().SaveState();
pFrame->SaveState();
-
+
wxConfigBase::Get(FALSE)->Flush();
}
@@ -159,10 +159,10 @@ bool CDlgOptions::Create(wxWindow* parent, wxWindowID id, const wxString& captio
* Control creation for CDlgToolsOptions
*/
-// NOTE: On MS Windows with wxWidgets 3.0, controls inside a wxStaticBox
+// NOTE: On MS Windows with wxWidgets 3.0, controls inside a wxStaticBox
// don't refresh properly unless they are children of the wxStaticBox!
//
-void CDlgOptions::CreateControls() {
+void CDlgOptions::CreateControls() {
////@begin CDlgOptions content construction
CDlgOptions* itemDialog1 = this;
@@ -242,7 +242,7 @@ void CDlgOptions::CreateControls() {
if (ShowToolTips())
m_EnableBOINCClientShutdownMessageCtrl->SetToolTip(_("Display confirmation dialog when shutting down the connected client."));
itemFlexGridSizer6->Add(m_EnableBOINCClientShutdownMessageCtrl, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
-
+
#ifdef __WXMAC__
wxStaticText* itemStaticText14 = new wxStaticText;
itemStaticText14->Create( itemPanel4, wxID_STATIC, _("Show status in menu bar?"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -596,7 +596,7 @@ wxIcon CDlgOptions::GetIconResource( const wxString& WXUNUSED(name) ) {
#ifdef __WXMSW__
wxString CDlgOptions::GetDefaultDialupConnection() const {
- return m_DialupDefaultConnectionCtrl->GetLabel();
+ return m_DialupDefaultConnectionCtrl->GetLabel();
}
void CDlgOptions::SetDefaultDialupConnection(wxString value) {
diff --git a/clientgui/DlgOptions.h b/clientgui/DlgOptions.h
index 7f16c4186b0..34c94cf5406 100644
--- a/clientgui/DlgOptions.h
+++ b/clientgui/DlgOptions.h
@@ -100,7 +100,7 @@
*/
class CDlgOptions: public wxDialog
-{
+{
DECLARE_DYNAMIC_CLASS( CDlgOptions )
DECLARE_EVENT_TABLE()
@@ -111,7 +111,7 @@ class CDlgOptions: public wxDialog
/// Destructor
~CDlgOptions( );
-
+
/// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CDLGOPTIONS_IDNAME, const wxString& caption = SYMBOL_CDLGOPTIONS_TITLE, const wxPoint& pos = SYMBOL_CDLGOPTIONS_POSITION, const wxSize& size = SYMBOL_CDLGOPTIONS_SIZE, long style = SYMBOL_CDLGOPTIONS_STYLE );
diff --git a/clientgui/DlgSelectComputer.cpp b/clientgui/DlgSelectComputer.cpp
index 42a4049d40f..1371930ed17 100644
--- a/clientgui/DlgSelectComputer.cpp
+++ b/clientgui/DlgSelectComputer.cpp
@@ -108,7 +108,7 @@ bool CDlgSelectComputer::Create( wxWindow* parent, bool required, wxWindowID id,
*/
void CDlgSelectComputer::CreateControls(bool required)
-{
+{
////@begin CDlgSelectComputer content construction
CDlgSelectComputer* itemDialog1 = this;
@@ -122,14 +122,14 @@ void CDlgSelectComputer::CreateControls(bool required)
wxString strInfo = wxEmptyString;
strInfo.Printf(
- _("Another instance of %s is already running \non this computer. Please select a client to monitor."),
+ _("Another instance of %s is already running \non this computer. Please select a client to monitor."),
pSkinAdvanced->GetApplicationName().c_str()
);
wxStaticText* itemStaticText1 = new wxStaticText;
itemStaticText1->Create( itemDialog1, wxID_STATIC, strInfo, wxDefaultPosition, wxDefaultSize, 0);
itemBoxSizer2->Add(itemStaticText1, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
}
-
+
wxFlexGridSizer* itemFlexGridSizer3 = new wxFlexGridSizer(1, 2, 0, 0);
itemBoxSizer2->Add(itemFlexGridSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
diff --git a/clientgui/DlgSelectComputer.h b/clientgui/DlgSelectComputer.h
index b7a4a509a3f..0bfd453d24e 100644
--- a/clientgui/DlgSelectComputer.h
+++ b/clientgui/DlgSelectComputer.h
@@ -68,7 +68,7 @@
*/
class CDlgSelectComputer: public wxDialog
-{
+{
DECLARE_DYNAMIC_CLASS( CDlgSelectComputer )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/Localization.cpp b/clientgui/Localization.cpp
index 328caac7865..bdacc0a7deb 100644
--- a/clientgui/Localization.cpp
+++ b/clientgui/Localization.cpp
@@ -35,7 +35,7 @@ CLocalization::CLocalization() {
_("Help");
m_strSAHHelpDescription =
_("Ask questions and report problems");
- m_strSAHYourAccountName =
+ m_strSAHYourAccountName =
_("Your account");
m_strSAHYourAccountDescription =
_("View your account information and credit totals");
diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp
index 54fbe6c6ea4..1597ce36c79 100644
--- a/clientgui/MainDocument.cpp
+++ b/clientgui/MainDocument.cpp
@@ -1632,7 +1632,7 @@ RUNNING_GFX_APP* CMainDocument::GetRunningGraphicsApp(RESULT* rp) {
// our forked process and its child graphics app, or the other will remain. A
// race condition can occur because of the time it takes for our forked process
// to launch the graphics app, so we periodically poll for the child's PID until
- // it is available. If we don't have it yet, we defer killing our forked process.
+ // it is available. If we don't have it yet, we defer killing our forked process.
if (g_use_sandbox) {
if (!GetGFXPIDFromForkedPID(&(*gfx_app_iter))) {
return 0; // Ignore "Stop graphics" button until we have graphics app's pid
@@ -1691,14 +1691,14 @@ void CMainDocument::KillInactiveGraphicsApps() {
// our forked process and its child graphics app, or the other will remain. A
// race condition can occur because of the time it takes for our forked process
// to launch the graphics app, so we periodically poll for the child's PID until
- // it is available. If we don't have it yet, we defer killing our forked process.
+ // it is available. If we don't have it yet, we defer killing our forked process.
if (g_use_sandbox) {
if (!GetGFXPIDFromForkedPID(&(*gfx_app_iter))) {
return; // Ignore "Stop graphics" button until we have graphics app's pid
}
KillGraphicsApp((*gfx_app_iter).gfx_pid);
KillGraphicsApp((*gfx_app_iter).pid);
-
+
// Graphics app wrote files in slot directory as logged in user, not boinc_master
fix_slot_file_owners((*gfx_app_iter).slot);
}
@@ -1728,7 +1728,7 @@ void CMainDocument::KillAllRunningGraphicsApps()
// our forked process and its child graphics app, or the other will remain. A
// race condition can occur because of the time it takes for our forked process
// to launch the graphics app, so we periodically poll for the child's PID until
- // it is available. If we don't have it yet, we defer killing our forked process.
+ // it is available. If we don't have it yet, we defer killing our forked process.
if (g_use_sandbox) {
for (int j=0; j<100; ++j) { // Wait 1 second max for gfx app's pid
if (GetGFXPIDFromForkedPID(&(*gfx_app_iter))) {
@@ -1773,18 +1773,18 @@ void CMainDocument::KillGraphicsApp(int pid) {
// our forked process and its child graphics app, or the other will remain. A
// race condition can occur because of the time it takes for our forked process
// to launch the graphics app, so we periodically call this method to poll for
-// the child's PID until it is available..
+// the child's PID until it is available..
//
int CMainDocument::GetGFXPIDFromForkedPID(RUNNING_GFX_APP* gfx_app) {
char buf[256];
if (gfx_app->gfx_pid) return gfx_app->gfx_pid; // We already found it
-
+
// The graphics app is the child of our forked process. Get its PID
FILE *fp = (FILE*)popen("ps -xoppid,pid","r");
fgets(buf, sizeof(buf), fp); // Skip the header line
int parent, child;
-
+
// Find the process whose parent is our forked process
while (fscanf(fp, "%d %d\n", &parent, &child) == 2) {
if (parent == gfx_app->pid) {
@@ -1800,7 +1800,7 @@ int CMainDocument::GetGFXPIDFromForkedPID(RUNNING_GFX_APP* gfx_app) {
int CMainDocument::fix_slot_file_owners(int slot) {
if (g_use_sandbox) {
// Graphics apps run by Manager write files in slot directory
- // as logged in user, not boinc_master. This ugly hack tells
+ // as logged in user, not boinc_master. This ugly hack tells
// BOINC client to fix all ownerships in this slot directory
rpcClient.run_graphics_app("stop", slot, "");
}
@@ -1842,16 +1842,16 @@ int CMainDocument::WorkShowGraphics(RESULT* rp) {
// our forked process and its child graphics app, or the other will remain. A
// race condition can occur because of the time it takes for our forked process
// to launch the graphics app, so we periodically poll for the child's PID until
- // it is available. If we don't have it yet, then defer responding to the "Stop
+ // it is available. If we don't have it yet, then defer responding to the "Stop
// graphics" button.
if (!GetGFXPIDFromForkedPID(previous_gfx_app)) {
return 0; // Ignore "Stop graphics" button until we have graphics app's pid
}
KillGraphicsApp(previous_gfx_app->gfx_pid);
}
-#endif
+#endif
KillGraphicsApp(previous_gfx_app->pid); // User clicked on "Stop graphics" button
- GetRunningGraphicsApp(rp); // Let GetRunningGraphicsApp() do necessary clean up
+ GetRunningGraphicsApp(rp); // Let GetRunningGraphicsApp() do necessary clean up
return 0;
}
@@ -1866,7 +1866,7 @@ int CMainDocument::WorkShowGraphics(RESULT* rp) {
int pid = fork();
char path[MAXPATHLEN];
char cmd[2048];
-
+
// As of MacOS 13.0 Ventura IOSurface cannot be used to share graphics
// between apps unless they are running as the same user, so we no
// longer run the graphics apps as user boinc_master. To replace the
@@ -1877,8 +1877,8 @@ int CMainDocument::WorkShowGraphics(RESULT* rp) {
// But it is used widely in Apple's software, and the security profile
// elements we use are very unlikely to change.
if (pid == 0) {
- // For unknown reasons, the graphics application exits with
- // "RegisterProcess failed (error = -50)" unless we pass its
+ // For unknown reasons, the graphics application exits with
+ // "RegisterProcess failed (error = -50)" unless we pass its
// full path twice in the argument list to execv.
strlcpy(cmd, "sandbox-exec -f \"", sizeof(cmd));
getPathToThisApp(path, sizeof(path));
@@ -1888,7 +1888,7 @@ int CMainDocument::WorkShowGraphics(RESULT* rp) {
strlcat(cmd, "\"", sizeof(cmd)); // path to sandboxing profile
chdir(rp->slot_path);
iRetVal = callPosixSpawn(cmd);
-
+
exit(0);
}
id = pid;
@@ -2775,7 +2775,7 @@ wxString FormatTime(double secs) {
if (secs <= 0) {
return wxT("---");
}
-
+
wxTimeSpan ts = convert_to_timespan(secs);
return ts.Format((secs>=86400)?"%Dd %H:%M:%S":"%H:%M:%S");
}
diff --git a/clientgui/NoInternetConnectionPage.cpp b/clientgui/NoInternetConnectionPage.cpp
index bf42b63bf5e..67f8d41d4f6 100644
--- a/clientgui/NoInternetConnectionPage.cpp
+++ b/clientgui/NoInternetConnectionPage.cpp
@@ -94,7 +94,7 @@ bool CErrNoInternetConnectionPage::Create( CBOINCBaseWizard* parent )
*/
void CErrNoInternetConnectionPage::CreateControls()
-{
+{
////@begin CErrNoInternetConnectionPage content construction
CErrNoInternetConnectionPage* itemWizardPage96 = this;
@@ -184,11 +184,11 @@ void CErrNoInternetConnectionPage::OnPageChanged( wxWizardExEvent& event ) {
Fit();
}
-
+
/*!
* wxEVT_WIZARD_CANCEL event handler for ID_ERRNOINTERNETCONNECTIONPAGE
*/
-
+
void CErrNoInternetConnectionPage::OnCancel( wxWizardExEvent& event ) {
PROCESS_CANCELEVENT(event);
}
diff --git a/clientgui/NoInternetConnectionPage.h b/clientgui/NoInternetConnectionPage.h
index 967fd23f2b7..d7df4fafb26 100644
--- a/clientgui/NoInternetConnectionPage.h
+++ b/clientgui/NoInternetConnectionPage.h
@@ -27,7 +27,7 @@
*/
class CErrNoInternetConnectionPage: public wxWizardPageEx
-{
+{
DECLARE_DYNAMIC_CLASS( CErrNoInternetConnectionPage )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/NotDetectedPage.cpp b/clientgui/NotDetectedPage.cpp
index 85fa738f9f4..92cb73f95aa 100644
--- a/clientgui/NotDetectedPage.cpp
+++ b/clientgui/NotDetectedPage.cpp
@@ -39,47 +39,47 @@
/*!
* CErrNotDetectedPage type definition
*/
-
+
IMPLEMENT_DYNAMIC_CLASS( CErrNotDetectedPage, wxWizardPageEx )
-
+
/*!
* CErrNotDetectedPage event table definition
*/
-
+
BEGIN_EVENT_TABLE( CErrNotDetectedPage, wxWizardPageEx )
-
+
////@begin CErrNotDetectedPage event table entries
EVT_WIZARDEX_PAGE_CHANGED( -1, CErrNotDetectedPage::OnPageChanged )
EVT_WIZARDEX_CANCEL( -1, CErrNotDetectedPage::OnCancel )
////@end CErrNotDetectedPage event table entries
-
+
END_EVENT_TABLE()
-
+
/*!
* CErrNotDetectedPage constructors
*/
-
+
CErrNotDetectedPage::CErrNotDetectedPage( )
{
}
-
+
CErrNotDetectedPage::CErrNotDetectedPage( CBOINCBaseWizard* parent )
{
Create( parent );
}
-
+
/*!
* CErrProjectUnavailable creator
*/
-
+
bool CErrNotDetectedPage::Create( CBOINCBaseWizard* parent )
{
////@begin CErrNotDetectedPage member initialisation
m_pTitleStaticCtrl = NULL;
m_pDirectionsStaticCtrl = NULL;
////@end CErrNotDetectedPage member initialisation
-
+
////@begin CErrNotDetectedPage creation
wxWizardPageEx::Create( parent, ID_ERRNOTDETECTEDPAGE );
@@ -89,13 +89,13 @@ bool CErrNotDetectedPage::Create( CBOINCBaseWizard* parent )
return TRUE;
}
-
+
/*!
* Control creation for CErrProjectUnavailable
*/
-
+
void CErrNotDetectedPage::CreateControls()
-{
+{
////@begin CErrNotDetectedPage content construction
CErrNotDetectedPage* itemWizardPage96 = this;
@@ -114,38 +114,38 @@ void CErrNotDetectedPage::CreateControls()
itemBoxSizer97->Add(m_pDirectionsStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
////@end CErrNotDetectedPage content construction
}
-
+
/*!
* Gets the previous page.
*/
-
+
wxWizardPageEx* CErrNotDetectedPage::GetPrev() const
{
return PAGE_TRANSITION_BACK;
}
-
+
/*!
* Gets the next page.
*/
-
+
wxWizardPageEx* CErrNotDetectedPage::GetNext() const
{
return NULL;
}
-
+
/*!
* Should we show tooltips?
*/
-
+
bool CErrNotDetectedPage::ShowToolTips()
{
return TRUE;
}
-
+
/*!
* Get bitmap resources
*/
-
+
wxBitmap CErrNotDetectedPage::GetBitmapResource( const wxString& WXUNUSED(name) )
{
// Bitmap retrieval
@@ -153,11 +153,11 @@ wxBitmap CErrNotDetectedPage::GetBitmapResource( const wxString& WXUNUSED(name)
return wxNullBitmap;
////@end CErrNotDetectedPage bitmap retrieval
}
-
+
/*!
* Get icon resources
*/
-
+
wxIcon CErrNotDetectedPage::GetIconResource( const wxString& WXUNUSED(name) )
{
// Icon retrieval
@@ -165,11 +165,11 @@ wxIcon CErrNotDetectedPage::GetIconResource( const wxString& WXUNUSED(name) )
return wxNullIcon;
////@end CErrNotDetectedPage icon retrieval
}
-
+
/*!
* wxEVT_WIZARD_PAGE_CHANGED event handler for ID_ERRPROJECTNOTDETECTEDPAGE
*/
-
+
void CErrNotDetectedPage::OnPageChanged( wxWizardExEvent& event ) {
if (event.GetDirection() == false) return;
@@ -196,11 +196,11 @@ void CErrNotDetectedPage::OnPageChanged( wxWizardExEvent& event ) {
Fit();
}
-
+
/*!
* wxEVT_WIZARD_CANCEL event handler for ID_ERRPROJECTNOTDETECTEDPAGE
*/
-
+
void CErrNotDetectedPage::OnCancel( wxWizardExEvent& event ) {
PROCESS_CANCELEVENT(event);
}
diff --git a/clientgui/NotDetectedPage.h b/clientgui/NotDetectedPage.h
index 8fd1df80c6c..2e7e7515f5d 100644
--- a/clientgui/NotDetectedPage.h
+++ b/clientgui/NotDetectedPage.h
@@ -27,7 +27,7 @@
*/
class CErrNotDetectedPage: public wxWizardPageEx
-{
+{
DECLARE_DYNAMIC_CLASS( CErrNotDetectedPage )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/NotFoundPage.cpp b/clientgui/NotFoundPage.cpp
index 7b4d05b8100..632b191b482 100644
--- a/clientgui/NotFoundPage.cpp
+++ b/clientgui/NotFoundPage.cpp
@@ -39,13 +39,13 @@
/*!
* CErrNotFoundPage type definition
*/
-
+
IMPLEMENT_DYNAMIC_CLASS( CErrNotFoundPage, wxWizardPageEx )
-
+
/*!
* CErrNotFoundPage event table definition
*/
-
+
BEGIN_EVENT_TABLE( CErrNotFoundPage, wxWizardPageEx )
////@begin CErrNotFoundPage event table entries
@@ -53,33 +53,33 @@ BEGIN_EVENT_TABLE( CErrNotFoundPage, wxWizardPageEx )
EVT_WIZARDEX_CANCEL( -1, CErrNotFoundPage::OnCancel )
////@end CErrNotFoundPage event table entries
-
+
END_EVENT_TABLE()
-
+
/*!
* CErrNotFoundPage constructors
*/
-
+
CErrNotFoundPage::CErrNotFoundPage( )
{
}
-
+
CErrNotFoundPage::CErrNotFoundPage( CBOINCBaseWizard* parent )
{
Create( parent );
}
-
+
/*!
* CErrNoInternetConnection creator
*/
-
+
bool CErrNotFoundPage::Create( CBOINCBaseWizard* parent )
{
////@begin CErrNotFoundPage member initialisation
m_pTitleStaticCtrl = NULL;
m_pDirectionsStaticCtrl = NULL;
////@end CErrNotFoundPage member initialisation
-
+
////@begin CErrNotFoundPage creation
wxWizardPageEx::Create( parent, ID_ERRNOTFOUNDPAGE );
@@ -89,13 +89,13 @@ bool CErrNotFoundPage::Create( CBOINCBaseWizard* parent )
return TRUE;
}
-
+
/*!
* Control creation for CErrNoInternetConnection
*/
-
+
void CErrNotFoundPage::CreateControls()
-{
+{
////@begin CErrNotFoundPage content construction
CErrNotFoundPage* itemWizardPage96 = this;
@@ -114,16 +114,16 @@ void CErrNotFoundPage::CreateControls()
itemBoxSizer97->Add(m_pDirectionsStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
////@end CErrNotFoundPage content construction
}
-
+
/*!
* Gets the previous page.
*/
-
+
wxWizardPageEx* CErrNotFoundPage::GetPrev() const
{
return PAGE_TRANSITION_BACK;
}
-
+
/*!
* Gets the next page.
*/
@@ -132,20 +132,20 @@ wxWizardPageEx* CErrNotFoundPage::GetNext() const
{
return PAGE_TRANSITION_NEXT(ID_ACCOUNTINFOPAGE);
}
-
+
/*!
* Should we show tooltips?
*/
-
+
bool CErrNotFoundPage::ShowToolTips()
{
return TRUE;
}
-
+
/*!
* Get bitmap resources
*/
-
+
wxBitmap CErrNotFoundPage::GetBitmapResource( const wxString& WXUNUSED(name) )
{
// Bitmap retrieval
@@ -153,7 +153,7 @@ wxBitmap CErrNotFoundPage::GetBitmapResource( const wxString& WXUNUSED(name) )
return wxNullBitmap;
////@end CErrNotFoundPage bitmap retrieval
}
-
+
/*!
* Get icon resources
*/
@@ -165,7 +165,7 @@ wxIcon CErrNotFoundPage::GetIconResource( const wxString& WXUNUSED(name) )
return wxNullIcon;
////@end CErrNotFoundPage icon retrieval
}
-
+
/*!
* wxEVT_WIZARD_PAGE_CHANGED event handler for ID_ERRNACCOUNTDOESNOTEXISTPAGE
*/
diff --git a/clientgui/NotFoundPage.h b/clientgui/NotFoundPage.h
index 7c3fe2f7f64..34ad2a65718 100644
--- a/clientgui/NotFoundPage.h
+++ b/clientgui/NotFoundPage.h
@@ -27,7 +27,7 @@
*/
class CErrNotFoundPage: public wxWizardPageEx
-{
+{
DECLARE_DYNAMIC_CLASS( CErrNotFoundPage )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/ProjectInfoPage.h b/clientgui/ProjectInfoPage.h
index 9c39f2b8dd6..4fc77cbc966 100644
--- a/clientgui/ProjectInfoPage.h
+++ b/clientgui/ProjectInfoPage.h
@@ -31,7 +31,7 @@ class CProjectInfo;
*/
class CProjectInfoPage: public wxWizardPageEx
-{
+{
DECLARE_DYNAMIC_CLASS( CProjectInfoPage )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/ProjectProcessingPage.h b/clientgui/ProjectProcessingPage.h
index 265e028e483..52fc85756bd 100644
--- a/clientgui/ProjectProcessingPage.h
+++ b/clientgui/ProjectProcessingPage.h
@@ -63,7 +63,7 @@ END_DECLARE_EVENT_TYPES()
*/
class CProjectProcessingPage: public wxWizardPageEx
-{
+{
DECLARE_DYNAMIC_CLASS( CProjectProcessingPage )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/ProjectPropertiesPage.h b/clientgui/ProjectPropertiesPage.h
index d7b5e790983..1e2f037e6f2 100644
--- a/clientgui/ProjectPropertiesPage.h
+++ b/clientgui/ProjectPropertiesPage.h
@@ -65,7 +65,7 @@ END_DECLARE_EVENT_TYPES()
*/
class CProjectPropertiesPage: public wxWizardPageEx
-{
+{
DECLARE_DYNAMIC_CLASS( CProjectPropertiesPage )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/ProjectWelcomePage.cpp b/clientgui/ProjectWelcomePage.cpp
index 92e167a5118..8ad80b421ab 100644
--- a/clientgui/ProjectWelcomePage.cpp
+++ b/clientgui/ProjectWelcomePage.cpp
@@ -48,39 +48,39 @@
/*!
* CProjectWelcomePage type definition
*/
-
+
IMPLEMENT_DYNAMIC_CLASS( CProjectWelcomePage, wxWizardPageEx )
-
+
/*!
* CProjectWelcomePage event table definition
*/
-
+
BEGIN_EVENT_TABLE( CProjectWelcomePage, wxWizardPageEx )
-
+
////@begin CProjectWelcomePage event table entries
EVT_WIZARDEX_PAGE_CHANGED( -1, CProjectWelcomePage::OnPageChanged )
EVT_WIZARDEX_CANCEL( -1, CProjectWelcomePage::OnCancel )
////@end CProjectWelcomePage event table entries
-
+
END_EVENT_TABLE()
/*!
* CProjectWelcomePage constructors
*/
-
+
CProjectWelcomePage::CProjectWelcomePage( )
{
}
-
+
CProjectWelcomePage::CProjectWelcomePage( CBOINCBaseWizard* parent )
{
Create( parent );
}
-
+
/*!
* WizardPage creator
*/
-
+
bool CProjectWelcomePage::Create( CBOINCBaseWizard* parent )
{
////@begin CProjectWelcomePage member initialisation
@@ -88,7 +88,7 @@ bool CProjectWelcomePage::Create( CBOINCBaseWizard* parent )
////@end CProjectWelcomePage member initialisation
((CWizardAttach*)parent)->IsFirstPass = false;
-
+
////@begin CProjectWelcomePage creation
wxWizardPageEx::Create( parent, ID_PROJECTWELCOMEPAGE );
@@ -98,13 +98,13 @@ bool CProjectWelcomePage::Create( CBOINCBaseWizard* parent )
return TRUE;
}
-
+
/*!
* Control creation for WizardPage
*/
-
+
void CProjectWelcomePage::CreateControls()
-{
+{
////@begin CWelcomePage content construction
CProjectWelcomePage* itemWizardPage2 = this;
@@ -155,16 +155,16 @@ void CProjectWelcomePage::CreateControls()
/*
* Gets the previous page.
*/
-
+
wxWizardPageEx* CProjectWelcomePage::GetPrev() const
{
return NULL;
}
-
+
/*!
* Gets the next page.
*/
-
+
wxWizardPageEx* CProjectWelcomePage::GetNext() const
{
CWizardAttach* pWA = ((CWizardAttach*)GetParent());
@@ -180,20 +180,20 @@ wxWizardPageEx* CProjectWelcomePage::GetNext() const
return PAGE_TRANSITION_NEXT(ID_PROJECTPROPERTIESPAGE);
}
}
-
+
/*!
* Should we show tooltips?
*/
-
+
bool CProjectWelcomePage::ShowToolTips()
{
return TRUE;
}
-
+
/*!
* Get bitmap resources
*/
-
+
wxBitmap CProjectWelcomePage::GetBitmapResource( const wxString& WXUNUSED(name) )
{
// Bitmap retrieval
@@ -201,11 +201,11 @@ wxBitmap CProjectWelcomePage::GetBitmapResource( const wxString& WXUNUSED(name)
return wxNullBitmap;
////@end CWelcomePage bitmap retrieval
}
-
+
/*!
* Get icon resources
*/
-
+
wxIcon CProjectWelcomePage::GetIconResource( const wxString& WXUNUSED(name) )
{
// Icon retrieval
@@ -217,7 +217,7 @@ wxIcon CProjectWelcomePage::GetIconResource( const wxString& WXUNUSED(name) )
/*!
* wxEVT_WIZARD_PAGE_CHANGED event handler for ID_PROJECTWELCOMEPAGE
*/
-
+
void CProjectWelcomePage::OnPageChanged( wxWizardExEvent& event ) {
if (event.GetDirection() == false) return;
wxLogTrace(wxT("Function Start/End"), wxT("CProjectWelcomePage::OnPageChanged - Function Begin"));
@@ -246,7 +246,7 @@ void CProjectWelcomePage::OnPageChanged( wxWizardExEvent& event ) {
/*!
* wxEVT_WIZARD_CANCEL event handler for ID_PROJECTWELCOMEPAGE
*/
-
+
void CProjectWelcomePage::OnCancel( wxWizardExEvent& event ) {
PROCESS_CANCELEVENT(event);
}
diff --git a/clientgui/ProjectWelcomePage.h b/clientgui/ProjectWelcomePage.h
index df3f7078cf7..ffc8fd529b8 100644
--- a/clientgui/ProjectWelcomePage.h
+++ b/clientgui/ProjectWelcomePage.h
@@ -28,7 +28,7 @@
*/
class CProjectWelcomePage: public wxWizardPageEx
-{
+{
DECLARE_DYNAMIC_CLASS( CProjectWelcomePage )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/ProxyInfoPage.cpp b/clientgui/ProxyInfoPage.cpp
index fe804fe7311..54e4f19db1c 100644
--- a/clientgui/ProxyInfoPage.cpp
+++ b/clientgui/ProxyInfoPage.cpp
@@ -39,40 +39,40 @@
/*!
* CErrProxyInfoPage type definition
*/
-
+
IMPLEMENT_DYNAMIC_CLASS( CErrProxyInfoPage, wxWizardPageEx )
-
+
/*!
* CErrProxyInfoPage event table definition
*/
-
+
BEGIN_EVENT_TABLE( CErrProxyInfoPage, wxWizardPageEx )
-
+
////@begin CErrProxyInfoPage event table entries
EVT_WIZARDEX_PAGE_CHANGED( -1, CErrProxyInfoPage::OnPageChanged )
EVT_WIZARDEX_CANCEL( -1, CErrProxyInfoPage::OnCancel )
////@end CErrProxyInfoPage event table entries
-
+
END_EVENT_TABLE()
-
+
/*!
* CErrProxyInfoPage constructors
*/
-
+
CErrProxyInfoPage::CErrProxyInfoPage( )
{
}
-
+
CErrProxyInfoPage::CErrProxyInfoPage( CBOINCBaseWizard* parent )
{
Create( parent );
}
-
+
/*!
* CErrProxyInfoPage creator
*/
-
+
bool CErrProxyInfoPage::Create( CBOINCBaseWizard* parent )
{
////@begin CErrProxyInfoPage member initialisation
@@ -80,23 +80,23 @@ bool CErrProxyInfoPage::Create( CBOINCBaseWizard* parent )
m_pDescriptionStaticCtrl = NULL;
m_pDirectionsStaticCtrl = NULL;
////@end CErrProxyInfoPage member initialisation
-
+
////@begin CErrProxyInfoPage creation
wxWizardPageEx::Create( parent, ID_ERRPROXYINFOPAGE );
CreateControls();
GetSizer()->Fit(this);
////@end CErrProxyInfoPage creation
-
+
return TRUE;
}
-
+
/*!
* Control creation for CErrProxyInfoPage
*/
-
+
void CErrProxyInfoPage::CreateControls()
-{
+{
////@begin CErrProxyInfoPage content construction
CErrProxyInfoPage* itemWizardPage126 = this;
@@ -121,7 +121,7 @@ void CErrProxyInfoPage::CreateControls()
itemBoxSizer127->Add(m_pDirectionsStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
////@end CErrProxyInfoPage content construction
}
-
+
/*!
* Gets the previous page.
*/
@@ -130,11 +130,11 @@ wxWizardPageEx* CErrProxyInfoPage::GetPrev() const
{
return PAGE_TRANSITION_BACK;
}
-
+
/*!
* Gets the next page.
*/
-
+
wxWizardPageEx* CErrProxyInfoPage::GetNext() const
{
if (CHECK_CLOSINGINPROGRESS()) {
@@ -144,20 +144,20 @@ wxWizardPageEx* CErrProxyInfoPage::GetNext() const
return PAGE_TRANSITION_NEXT(ID_ERRPROXYPAGE);
}
}
-
+
/*!
* Should we show tooltips?
*/
-
+
bool CErrProxyInfoPage::ShowToolTips()
{
return TRUE;
}
-
+
/*!
* Get bitmap resources
*/
-
+
wxBitmap CErrProxyInfoPage::GetBitmapResource( const wxString& WXUNUSED(name) )
{
// Bitmap retrieval
@@ -165,20 +165,20 @@ wxBitmap CErrProxyInfoPage::GetBitmapResource( const wxString& WXUNUSED(name) )
return wxNullBitmap;
////@end CErrProxyInfoPage bitmap retrieval
}
-
+
/*!
* Get icon resources
*/
-
+
wxIcon CErrProxyInfoPage::GetIconResource( const wxString& WXUNUSED(name) )
{
// Icon retrieval
-
+
////@begin CErrProxyInfoPage icon retrieval
return wxNullIcon;
////@end CErrProxyInfoPage icon retrieval
}
-
+
/*!
* wxEVT_WIZARD_PAGE_CHANGED event handler for ID_ERRPROXYINFOPAGE
*/
@@ -205,11 +205,11 @@ void CErrProxyInfoPage::OnPageChanged( wxWizardExEvent& event ) {
Fit();
}
-
+
/*!
* wxEVT_WIZARD_CANCEL event handler for ID_ERRPROXYINFOPAGE
*/
-
+
void CErrProxyInfoPage::OnCancel( wxWizardExEvent& event ) {
PROCESS_CANCELEVENT(event);
}
diff --git a/clientgui/ProxyInfoPage.h b/clientgui/ProxyInfoPage.h
index 1ad38a472c5..35a3e7f1c2f 100644
--- a/clientgui/ProxyInfoPage.h
+++ b/clientgui/ProxyInfoPage.h
@@ -28,7 +28,7 @@
*/
class CErrProxyInfoPage: public wxWizardPageEx
-{
+{
DECLARE_DYNAMIC_CLASS( CErrProxyInfoPage )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/ProxyPage.cpp b/clientgui/ProxyPage.cpp
index f95c65eeea3..b3e421d3928 100644
--- a/clientgui/ProxyPage.cpp
+++ b/clientgui/ProxyPage.cpp
@@ -39,46 +39,46 @@
/*!
* CErrProxyPage type definition
*/
-
+
IMPLEMENT_DYNAMIC_CLASS( CErrProxyPage, wxWizardPageEx )
-
+
/*!
* CErrProxyPage event table definition
*/
-
+
BEGIN_EVENT_TABLE( CErrProxyPage, wxWizardPageEx )
-
+
////@begin CErrProxyPage event table entries
EVT_WIZARDEX_PAGE_CHANGED( -1, CErrProxyPage::OnPageChanged )
EVT_WIZARDEX_PAGE_CHANGING( -1, CErrProxyPage::OnPageChanging )
EVT_WIZARDEX_CANCEL( -1, CErrProxyPage::OnCancel )
////@end CErrProxyPage event table entries
-
+
END_EVENT_TABLE()
-
+
/*!
* CErrProxyPage constructors
*/
-
+
CErrProxyPage::CErrProxyPage( )
{
}
-
+
CErrProxyPage::CErrProxyPage( CBOINCBaseWizard* parent )
{
Create( parent );
}
-
+
/*!
* CErrProxyComplationPage creator
*/
-
+
bool CErrProxyPage::Create( CBOINCBaseWizard* parent )
{
////@begin CErrProxyPage member initialisation
m_pTitleStaticCtrl = NULL;
- m_pProxyHTTPDescriptionCtrl = NULL;
+ m_pProxyHTTPDescriptionCtrl = NULL;
m_pProxyHTTPServerStaticCtrl = NULL;
m_pProxyHTTPServerCtrl = NULL;
m_pProxyHTTPPortStaticCtrl = NULL;
@@ -90,7 +90,7 @@ bool CErrProxyPage::Create( CBOINCBaseWizard* parent )
#if 0
m_pProxyHTTPAutodetectCtrl = NULL;
#endif
- m_pProxySOCKSDescriptionCtrl = NULL;
+ m_pProxySOCKSDescriptionCtrl = NULL;
m_pProxySOCKSServerStaticCtrl = NULL;
m_pProxySOCKSServerCtrl = NULL;
m_pProxySOCKSPortStaticCtrl = NULL;
@@ -100,23 +100,23 @@ bool CErrProxyPage::Create( CBOINCBaseWizard* parent )
m_pProxySOCKSPasswordStaticCtrl = NULL;
m_pProxySOCKSPasswordCtrl = NULL;
////@end CErrProxyPage member initialisation
-
+
////@begin CErrProxyPage creation
wxWizardPageEx::Create( parent, ID_ERRPROXYPAGE );
CreateControls();
GetSizer()->Fit(this);
////@end CErrProxyPage creation
-
+
return TRUE;
}
-
+
/*!
* Control creation for CErrProxyComplationPage
*/
-
+
void CErrProxyPage::CreateControls()
-{
+{
////@begin CErrProxyPage content construction
CErrProxyPage* itemWizardPage121 = this;
@@ -235,20 +235,20 @@ void CErrProxyPage::CreateControls()
m_pProxySOCKSPasswordCtrl->SetValidator( wxTextValidator(wxFILTER_NONE, & m_strProxySOCKSPassword) );
////@end CErrProxyPage content construction
}
-
+
/*!
* Gets the previous page.
*/
-
+
wxWizardPageEx* CErrProxyPage::GetPrev() const
{
return PAGE_TRANSITION_BACK;
}
-
+
/*!
* Gets the next page.
*/
-
+
wxWizardPageEx* CErrProxyPage::GetNext() const
{
if (CHECK_CLOSINGINPROGRESS()) {
@@ -261,20 +261,20 @@ wxWizardPageEx* CErrProxyPage::GetNext() const
}
return NULL;
}
-
+
/*!
* Should we show tooltips?
*/
-
+
bool CErrProxyPage::ShowToolTips()
{
return TRUE;
}
-
+
/*!
* Get bitmap resources
*/
-
+
wxBitmap CErrProxyPage::GetBitmapResource( const wxString& WXUNUSED(name) )
{
// Bitmap retrieval
@@ -282,11 +282,11 @@ wxBitmap CErrProxyPage::GetBitmapResource( const wxString& WXUNUSED(name) )
return wxNullBitmap;
////@end CErrProxyPage bitmap retrieval
}
-
+
/*!
* Get icon resources
*/
-
+
wxIcon CErrProxyPage::GetIconResource( const wxString& WXUNUSED(name) )
{
// Icon retrieval
@@ -294,11 +294,11 @@ wxIcon CErrProxyPage::GetIconResource( const wxString& WXUNUSED(name) )
return wxNullIcon;
////@end CErrProxyPage icon retrieval
}
-
+
/*!
* wxEVT_WIZARD_PAGE_CHANGED event handler for ID_ERRPROXYCOMPLETIONPAGE
*/
-
+
void CErrProxyPage::OnPageChanged( wxWizardExEvent& WXUNUSED(event) ) {
CMainDocument* pDoc = wxGetApp().GetDocument();
wxString strBuffer = wxEmptyString;
@@ -384,7 +384,7 @@ void CErrProxyPage::OnPageChanged( wxWizardExEvent& WXUNUSED(event) ) {
Fit();
m_pProxyHTTPServerCtrl->SetFocus();
}
-
+
/*!
* wxEVT_WIZARD_PAGE_CHANGING event handler for ID_ERRPROXYPAGE
*/
@@ -424,7 +424,7 @@ void CErrProxyPage::OnPageChanging( wxWizardExEvent& event ) {
/*!
* wxEVT_WIZARD_CANCEL event handler for ID_ERRPROXYCOMPLETIONPAGE
*/
-
+
void CErrProxyPage::OnCancel( wxWizardExEvent& event ) {
PROCESS_CANCELEVENT(event);
}
diff --git a/clientgui/ProxyPage.h b/clientgui/ProxyPage.h
index 6a2396e3204..17c7cae9926 100644
--- a/clientgui/ProxyPage.h
+++ b/clientgui/ProxyPage.h
@@ -28,7 +28,7 @@
*/
class CErrProxyPage: public wxWizardPageEx
-{
+{
DECLARE_DYNAMIC_CLASS( CErrProxyPage )
DECLARE_EVENT_TABLE()
@@ -101,7 +101,7 @@ class CErrProxyPage: public wxWizardPageEx
////@begin CErrProxyPage member variables
wxStaticText* m_pTitleStaticCtrl;
- wxStaticBox* m_pProxyHTTPDescriptionCtrl;
+ wxStaticBox* m_pProxyHTTPDescriptionCtrl;
wxStaticText* m_pProxyHTTPServerStaticCtrl;
wxTextCtrl* m_pProxyHTTPServerCtrl;
wxStaticText* m_pProxyHTTPPortStaticCtrl;
@@ -113,7 +113,7 @@ class CErrProxyPage: public wxWizardPageEx
#if 0
wxButton* m_pProxyHTTPAutodetectCtrl;
#endif
- wxStaticBox* m_pProxySOCKSDescriptionCtrl;
+ wxStaticBox* m_pProxySOCKSDescriptionCtrl;
wxStaticText* m_pProxySOCKSServerStaticCtrl;
wxTextCtrl* m_pProxySOCKSServerCtrl;
wxStaticText* m_pProxySOCKSPortStaticCtrl;
diff --git a/clientgui/SkinManager.h b/clientgui/SkinManager.h
index 362803d313e..5a877185d4c 100644
--- a/clientgui/SkinManager.h
+++ b/clientgui/SkinManager.h
@@ -65,7 +65,7 @@ class CSkinImage : public CSkinItem
int GetVerticalAnchor() { return m_iAnchorVertical; }
bool SetDefaults(
- wxString strComponentName,
+ wxString strComponentName,
const char** ppDefaultImage
);
@@ -132,7 +132,7 @@ class CSkinIcon : public CSkinItem
};
-// Default opacity for Simple View white panels
+// Default opacity for Simple View white panels
// is 60% (153 on a scale of 0 - 255).
#define MAX_OPACITY 255
#define DEFAULT_OPACITY 153
diff --git a/clientgui/TermsOfUsePage.h b/clientgui/TermsOfUsePage.h
index 614d2c175cf..eb4b59f4c54 100644
--- a/clientgui/TermsOfUsePage.h
+++ b/clientgui/TermsOfUsePage.h
@@ -27,7 +27,7 @@
*/
class CTermsOfUsePage: public wxWizardPageEx
-{
+{
DECLARE_DYNAMIC_CLASS( CTermsOfUsePage )
DECLARE_EVENT_TABLE()
@@ -42,7 +42,7 @@ class CTermsOfUsePage: public wxWizardPageEx
/// Creates the controls and sizers
void CreateControls();
-
+
/// Handles clicks on links
void OnLinkClicked( wxHtmlLinkEvent & event );
diff --git a/clientgui/UnavailablePage.cpp b/clientgui/UnavailablePage.cpp
index 7332332ddeb..4ecc12030db 100644
--- a/clientgui/UnavailablePage.cpp
+++ b/clientgui/UnavailablePage.cpp
@@ -39,63 +39,63 @@
/*!
* CErrUnavailablePage type definition
*/
-
+
IMPLEMENT_DYNAMIC_CLASS( CErrUnavailablePage, wxWizardPageEx )
-
+
/*!
* CErrUnavailablePage event table definition
*/
-
+
BEGIN_EVENT_TABLE( CErrUnavailablePage, wxWizardPageEx )
-
+
////@begin CErrUnavailablePage event table entries
EVT_WIZARDEX_PAGE_CHANGED( -1, CErrUnavailablePage::OnPageChanged )
EVT_WIZARDEX_CANCEL( -1, CErrUnavailablePage::OnCancel )
////@end CErrUnavailablePage event table entries
-
+
END_EVENT_TABLE()
-
+
/*!
* CErrUnavailablePage constructors
*/
-
+
CErrUnavailablePage::CErrUnavailablePage( )
{
}
-
+
CErrUnavailablePage::CErrUnavailablePage( CBOINCBaseWizard* parent )
{
Create( parent );
}
-
+
/*!
* CErrUnavailablePage creator
*/
-
+
bool CErrUnavailablePage::Create( CBOINCBaseWizard* parent )
{
////@begin CErrUnavailablePage member initialisation
m_pTitleStaticCtrl = NULL;
m_pDirectionsStaticCtrl = NULL;
////@end CErrUnavailablePage member initialisation
-
+
////@begin CErrUnavailablePage creation
wxWizardPageEx::Create( parent, ID_ERRUNAVAILABLEPAGE );
CreateControls();
GetSizer()->Fit(this);
////@end CErrUnavailablePage creation
-
+
return TRUE;
}
-
+
/*!
* Control creation for CErrUnavailablePage
*/
-
+
void CErrUnavailablePage::CreateControls()
-{
+{
////@begin CErrUnavailablePage content construction
CErrUnavailablePage* itemWizardPage96 = this;
@@ -114,25 +114,25 @@ void CErrUnavailablePage::CreateControls()
itemBoxSizer97->Add(m_pDirectionsStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
////@end CErrUnavailablePage content construction
}
-
+
/*!
* Gets the previous page.
*/
-
+
wxWizardPageEx* CErrUnavailablePage::GetPrev() const
{
return PAGE_TRANSITION_BACK;
}
-
+
/*!
* Gets the next page.
*/
-
+
wxWizardPageEx* CErrUnavailablePage::GetNext() const
{
return NULL;
}
-
+
/*!
* Should we show tooltips?
*/
@@ -141,20 +141,20 @@ bool CErrUnavailablePage::ShowToolTips()
{
return TRUE;
}
-
+
/*!
* Get bitmap resources
*/
-
+
wxBitmap CErrUnavailablePage::GetBitmapResource( const wxString& WXUNUSED(name) )
{
// Bitmap retrieval
-
+
////@begin CErrUnavailablePage bitmap retrieval
return wxNullBitmap;
////@end CErrUnavailablePage bitmap retrieval
}
-
+
/*!
* Get icon resources
*/
@@ -167,7 +167,7 @@ wxIcon CErrUnavailablePage::GetIconResource( const wxString& WXUNUSED(name) )
return wxNullIcon;
////@end CErrUnavailablePage icon retrieval
}
-
+
/*!
* wxEVT_WIZARD_PAGE_CHANGED event handler for ID_ERRPROJECTUNAVAILABLEPAGE
*/
@@ -198,7 +198,7 @@ void CErrUnavailablePage::OnPageChanged( wxWizardExEvent& event ) {
Fit();
}
-
+
/*!
* wxEVT_WIZARD_CANCEL event handler for ID_ERRPROJECTUNAVAILABLEPAGE
*/
diff --git a/clientgui/UnavailablePage.h b/clientgui/UnavailablePage.h
index 768f215c521..c7deb18416c 100644
--- a/clientgui/UnavailablePage.h
+++ b/clientgui/UnavailablePage.h
@@ -27,7 +27,7 @@
*/
class CErrUnavailablePage: public wxWizardPageEx
-{
+{
DECLARE_DYNAMIC_CLASS( CErrUnavailablePage )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/ValidateAccountKey.cpp b/clientgui/ValidateAccountKey.cpp
index aa8f5f92679..cf1c1563e5c 100644
--- a/clientgui/ValidateAccountKey.cpp
+++ b/clientgui/ValidateAccountKey.cpp
@@ -91,7 +91,7 @@ bool CValidateAccountKey::Validate(wxWindow *parent) {
bool CValidateAccountKey::TransferToWindow(void) {
if(!CheckValidator())
return FALSE;
-
+
if (!m_stringValue)
return TRUE;
diff --git a/clientgui/ValidateEmailAddress.cpp b/clientgui/ValidateEmailAddress.cpp
index 70504716e68..ec6902673ae 100644
--- a/clientgui/ValidateEmailAddress.cpp
+++ b/clientgui/ValidateEmailAddress.cpp
@@ -95,7 +95,7 @@ bool CValidateEmailAddress::Validate(wxWindow *parent) {
bool CValidateEmailAddress::TransferToWindow(void) {
if(!CheckValidator())
return FALSE;
-
+
if (!m_stringValue)
return TRUE;
diff --git a/clientgui/ValidateURL.cpp b/clientgui/ValidateURL.cpp
index 05a758e3b73..2ee1e747314 100644
--- a/clientgui/ValidateURL.cpp
+++ b/clientgui/ValidateURL.cpp
@@ -138,7 +138,7 @@ bool CValidateURL::Validate(wxWindow *parent) {
bool CValidateURL::TransferToWindow() {
if(!CheckValidator())
return FALSE;
-
+
if (!m_stringValue)
return TRUE;
diff --git a/clientgui/ViewMessages.cpp b/clientgui/ViewMessages.cpp
index c8034b68e92..6dddffbc2a8 100644
--- a/clientgui/ViewMessages.cpp
+++ b/clientgui/ViewMessages.cpp
@@ -87,7 +87,7 @@ CViewMessages::CViewMessages(wxNotebook* pNotebook) :
pItem = new CTaskItem(
_("Copy all messages"),
_("Copy all the messages to the clipboard."),
- ID_TASK_MESSAGES_COPYALL
+ ID_TASK_MESSAGES_COPYALL
);
pGroup->m_Tasks.push_back( pItem );
@@ -98,14 +98,14 @@ CViewMessages::CViewMessages(wxNotebook* pNotebook) :
#else
_("Copy the selected messages to the clipboard. You can select multiple messages by holding down the shift or control key while clicking on messages."),
#endif
- ID_TASK_MESSAGES_COPYSELECTED
+ ID_TASK_MESSAGES_COPYSELECTED
);
pGroup->m_Tasks.push_back( pItem );
pItem = new CTaskItem(
_("Show only this project"),
_("Show only the messages for the selected project."),
- ID_TASK_MESSAGES_FILTERBYPROJECT
+ ID_TASK_MESSAGES_FILTERBYPROJECT
);
pGroup->m_Tasks.push_back( pItem );
@@ -191,7 +191,7 @@ void CViewMessages::OnMessagesCopyAll( wxCommandEvent& WXUNUSED(event) ) {
OpenClipboard( iRowCount * 1024 );
for (iIndex = 0; iIndex < iRowCount; iIndex++) {
- CopyToClipboard(iIndex);
+ CopyToClipboard(iIndex);
}
CloseClipboard();
@@ -230,7 +230,7 @@ void CViewMessages::OnMessagesCopySelected( wxCommandEvent& WXUNUSED(event) ) {
);
if (iIndex == -1) break;
- iRowCount++;
+ iRowCount++;
}
OpenClipboard( iRowCount * 1024 );
@@ -246,7 +246,7 @@ void CViewMessages::OnMessagesCopySelected( wxCommandEvent& WXUNUSED(event) ) {
);
if (iIndex == -1) break;
- CopyToClipboard(iIndex);
+ CopyToClipboard(iIndex);
}
CloseClipboard();
@@ -267,7 +267,7 @@ void CViewMessages::OnMessagesFilter( wxCommandEvent& WXUNUSED(event) ) {
wxInt32 iIndex = -1;
CAdvancedFrame* pFrame = wxDynamicCast(GetParent()->GetParent()->GetParent(), CAdvancedFrame);
MESSAGE* message;
-
+
wxASSERT(pFrame);
wxASSERT(wxDynamicCast(pFrame, CAdvancedFrame));
wxASSERT(m_pListPane);
@@ -297,7 +297,7 @@ void CViewMessages::OnMessagesFilter( wxCommandEvent& WXUNUSED(event) ) {
}
}
}
-
+
// Force a complete update
m_iPreviousRowCount = 0;
m_pListPane->DeleteAllItems();
@@ -319,7 +319,7 @@ wxInt32 CViewMessages::GetFilteredMessageIndex( wxInt32 iRow) const {
// Get the (possibly filtered) item count (i.e., the Row count)
wxInt32 CViewMessages::GetDocCount() {
int i;
-
+
m_iTotalDocCount = wxGetApp().GetDocument()->GetMessageCount();
if (m_iTotalDocCount < m_iPreviousTotalDocCount) {
// Usually due to a disconnect from client
@@ -328,7 +328,7 @@ wxInt32 CViewMessages::GetDocCount() {
m_iFilteredIndexes.Clear();
UpdateSelection();
}
-
+
if (m_bIsFiltered) {
for (i = m_iPreviousTotalDocCount; i < m_iTotalDocCount; i++) {
MESSAGE* message = wxGetApp().GetDocument()->message(i);
@@ -355,7 +355,7 @@ void CViewMessages::OnListRender (wxTimerEvent& event) {
CMainDocument* pDoc = wxGetApp().GetDocument();
wxASSERT(pDoc);
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
-
+
if (!m_bProcessingListRenderEvent) {
m_bProcessingListRenderEvent = true;
@@ -421,7 +421,7 @@ void CViewMessages::OnListRender (wxTimerEvent& event) {
wxString CViewMessages::OnListGetItemText(long item, long column) const {
wxString strBuffer = wxEmptyString;
wxInt32 index = GetFilteredMessageIndex(item);
-
+
switch(column) {
case COLUMN_PROJECT:
FormatProjectName(index, strBuffer);
@@ -463,11 +463,11 @@ bool CViewMessages::EnsureLastItemVisible() {
// Auto-scroll only if already at bottom of list
if ((m_iPreviousRowCount > numVisible)
- && ((m_pListPane->GetTopItem() + numVisible) < (m_iPreviousRowCount-1))
+ && ((m_pListPane->GetTopItem() + numVisible) < (m_iPreviousRowCount-1))
) {
return false;
}
-
+
return true;
}
@@ -487,18 +487,18 @@ void CViewMessages::UpdateSelection() {
} else {
m_pTaskPane->DisableTask(pGroup->m_Tasks[BTN_COPYSELECTED]);
}
-
+
if (m_bIsFiltered) {
m_pTaskPane->UpdateTask(
- pGroup->m_Tasks[BTN_FILTERMSGS],
- _("Show all messages"),
+ pGroup->m_Tasks[BTN_FILTERMSGS],
+ _("Show all messages"),
_("Show messages for all projects.")
);
m_pTaskPane->EnableTask(pGroup->m_Tasks[BTN_FILTERMSGS]);
-
+
} else {
m_pTaskPane->UpdateTask(
- pGroup->m_Tasks[BTN_FILTERMSGS],
+ pGroup->m_Tasks[BTN_FILTERMSGS],
_("Show only this project"),
_("Show only the messages for the selected project.")
);
@@ -511,7 +511,7 @@ void CViewMessages::UpdateSelection() {
}
}
}
-
+
CBOINCBaseView::PostUpdateSelection();
}
diff --git a/clientgui/ViewNotices.cpp b/clientgui/ViewNotices.cpp
index 349cf69cd8d..fc5b185bd1f 100644
--- a/clientgui/ViewNotices.cpp
+++ b/clientgui/ViewNotices.cpp
@@ -54,15 +54,15 @@ CViewNotices::CViewNotices(wxNotebook* pNotebook) :
itemFlexGridSizer->AddGrowableCol(0);
m_FetchingNoticesText = new wxStaticText(
- this, wxID_ANY,
- _("Fetching notices; please wait..."),
+ this, wxID_ANY,
+ _("Fetching notices; please wait..."),
wxPoint(20, 20), wxDefaultSize, 0
);
itemFlexGridSizer->Add(m_FetchingNoticesText, 0, wxALL, 1);
m_NoNoticesText = new wxStaticText(
- this, wxID_ANY,
- _("There are no notices at this time."),
+ this, wxID_ANY,
+ _("There are no notices at this time."),
wxPoint(20, 20), wxDefaultSize, 0
);
itemFlexGridSizer->Add(m_NoNoticesText, 0, wxALL, 1);
@@ -73,7 +73,7 @@ CViewNotices::CViewNotices(wxNotebook* pNotebook) :
itemFlexGridSizer->Add(m_pHtmlListPane, 1, wxGROW|wxALL, 1);
SetSizer(itemFlexGridSizer);
-
+
m_FetchingNoticesText->Hide();
m_bFetchingNoticesTextWasDisplayed = false;
@@ -133,11 +133,11 @@ void CViewNotices::OnListRender(wxTimerEvent& WXUNUSED(event)) {
wxString strNewMachineName = wxEmptyString;
CC_STATUS status;
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
wxASSERT(pDoc);
wxASSERT(m_pHtmlListPane);
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
-
+
if (s_bInProgress) return;
s_bInProgress = true;
@@ -160,7 +160,7 @@ void CViewNotices::OnListRender(wxTimerEvent& WXUNUSED(event)) {
// Don't call Freeze() / Thaw() here because it causes an unnecessary redraw
m_pHtmlListPane->UpdateUI();
-
+
if (m_bFetchingNoticesTextWasDisplayed != m_pHtmlListPane->m_bDisplayFetchingNotices) {
m_bFetchingNoticesTextWasDisplayed = m_pHtmlListPane->m_bDisplayFetchingNotices;
m_FetchingNoticesText->Show(m_bFetchingNoticesTextWasDisplayed);
diff --git a/clientgui/ViewProjects.cpp b/clientgui/ViewProjects.cpp
index d80d2377a53..5f8adfc4b39 100644
--- a/clientgui/ViewProjects.cpp
+++ b/clientgui/ViewProjects.cpp
@@ -105,7 +105,7 @@ BEGIN_EVENT_TABLE (CViewProjects, CBOINCBaseView)
EVT_BUTTON(ID_TASK_PROJECT_DETACH, CViewProjects::OnProjectDetach)
EVT_BUTTON(ID_TASK_PROJECT_SHOW_PROPERTIES, CViewProjects::OnShowItemProperties)
EVT_CUSTOM_RANGE(wxEVT_COMMAND_BUTTON_CLICKED, ID_TASK_PROJECT_WEB_PROJDEF_MIN, ID_TASK_PROJECT_WEB_PROJDEF_MAX, CViewProjects::OnProjectWebsiteClicked)
-// We currently handle EVT_LIST_CACHE_HINT on Windows or
+// We currently handle EVT_LIST_CACHE_HINT on Windows or
// EVT_CHECK_SELECTION_CHANGED on Mac & Linux instead of EVT_LIST_ITEM_SELECTED
// or EVT_LIST_ITEM_DESELECTED. See CBOINCBaseView::OnCacheHint() for info.
#if USE_LIST_CACHE_HINT
@@ -124,7 +124,7 @@ static bool CompareViewProjectsItems(int iRowIndex1, int iRowIndex2) {
CProject* project1;
CProject* project2;
int result = 0;
-
+
try {
project1 = myCViewProjects->m_ProjectCache.at(iRowIndex1);
} catch ( std::out_of_range ) {
@@ -201,42 +201,42 @@ CViewProjects::CViewProjects(wxNotebook* pNotebook) :
pItem = new CTaskItem(
_("Update"),
_("Report all completed tasks, get latest credit, get latest preferences, and possibly get more tasks."),
- ID_TASK_PROJECT_UPDATE
+ ID_TASK_PROJECT_UPDATE
);
pGroup->m_Tasks.push_back( pItem );
pItem = new CTaskItem(
_("Suspend"),
_("Suspend tasks for this project."),
- ID_TASK_PROJECT_SUSPEND
+ ID_TASK_PROJECT_SUSPEND
);
pGroup->m_Tasks.push_back( pItem );
pItem = new CTaskItem(
_("No new tasks"),
_("Don't get new tasks for this project."),
- ID_TASK_PROJECT_NONEWWORK
+ ID_TASK_PROJECT_NONEWWORK
);
pGroup->m_Tasks.push_back( pItem );
pItem = new CTaskItem(
_("Reset project"),
_("Delete all files and tasks associated with this project, and get new tasks. You can update the project first to report any completed tasks."),
- ID_TASK_PROJECT_RESET
+ ID_TASK_PROJECT_RESET
);
pGroup->m_Tasks.push_back( pItem );
pItem = new CTaskItem(
_("Remove"),
_("Remove this project. Tasks in progress will be lost (use 'Update' first to report any completed tasks)."),
- ID_TASK_PROJECT_DETACH
+ ID_TASK_PROJECT_DETACH
);
pGroup->m_Tasks.push_back( pItem );
pItem = new CTaskItem(
_("Properties"),
_("Show project details."),
- ID_TASK_PROJECT_SHOW_PROPERTIES
+ ID_TASK_PROJECT_SHOW_PROPERTIES
);
pGroup->m_Tasks.push_back( pItem );
@@ -276,11 +276,11 @@ CViewProjects::CViewProjects(wxNotebook* pNotebook) :
m_iDefaultShownColumns = DefaultShownColumns;
m_iNumDefaultShownColumns = sizeof(DefaultShownColumns) / sizeof(int);
m_iProgressColumn = COLUMN_RESOURCESHARE;
-
+
// Needed by static sort routine;
myCViewProjects = this;
m_funcSortCompare = CompareViewProjectsItems;
-
+
UpdateSelection();
}
@@ -350,7 +350,7 @@ int CViewProjects::GetViewCurrentViewPage() {
wxString CViewProjects::GetKeyValue1(int iRowIndex) {
CProject* project;
-
+
if (GetProjectCacheAtIndex(project, m_iSortedIndexes[iRowIndex])) {
return wxEmptyString;
}
@@ -395,7 +395,7 @@ void CViewProjects::OnProjectUpdate( wxCommandEvent& WXUNUSED(event) ) {
// Step through all selected items
row = m_pListPane->GetNextItem(row, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (row < 0) break;
-
+
pDoc->ProjectUpdate(m_iSortedIndexes[row]);
}
@@ -426,7 +426,7 @@ void CViewProjects::OnProjectSuspend( wxCommandEvent& WXUNUSED(event) ) {
// Step through all selected items
row = m_pListPane->GetNextItem(row, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (row < 0) break;
-
+
PROJECT* project = pDoc->project(m_iSortedIndexes[row]);
if (project) {
if (project->suspended_via_gui) {
@@ -436,7 +436,7 @@ void CViewProjects::OnProjectSuspend( wxCommandEvent& WXUNUSED(event) ) {
}
}
}
-
+
m_bForceUpdateSelection = true;
UpdateSelection();
pFrame->FireRefreshView();
@@ -463,7 +463,7 @@ void CViewProjects::OnProjectNoNewWork( wxCommandEvent& WXUNUSED(event) ) {
// Step through all selected items
row = m_pListPane->GetNextItem(row, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (row < 0) break;
-
+
PROJECT* project = pDoc->project(m_iSortedIndexes[row]);
if (project) {
if (project->dont_request_more_work) {
@@ -473,7 +473,7 @@ void CViewProjects::OnProjectNoNewWork( wxCommandEvent& WXUNUSED(event) ) {
}
}
}
-
+
m_bForceUpdateSelection = true;
UpdateSelection();
pFrame->FireRefreshView();
@@ -487,7 +487,7 @@ void CViewProjects::OnProjectNoNewWork( wxCommandEvent& WXUNUSED(event) ) {
void CViewProjects::OnProjectReset( wxCommandEvent& WXUNUSED(event) ) {
wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnProjectReset - Function Begin"));
- wxInt32 iAnswer = 0;
+ wxInt32 iAnswer = 0;
wxString strMessage = wxEmptyString;
CMainDocument* pDoc = wxGetApp().GetDocument();
CAdvancedFrame* pFrame = wxDynamicCast(GetParent()->GetParent()->GetParent(), CAdvancedFrame);
@@ -508,13 +508,13 @@ void CViewProjects::OnProjectReset( wxCommandEvent& WXUNUSED(event) ) {
// Step through all selected items
row = m_pListPane->GetNextItem(row, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (row < 0) break;
-
+
if (GetProjectCacheAtIndex(pProject, m_iSortedIndexes[row])) {
return;
}
strMessage.Printf(
- _("Are you sure you want to reset project '%s'?"),
+ _("Are you sure you want to reset project '%s'?"),
pProject->m_strProjectName.c_str()
);
@@ -529,7 +529,7 @@ void CViewProjects::OnProjectReset( wxCommandEvent& WXUNUSED(event) ) {
pDoc->ProjectReset(m_iSortedIndexes[row]);
}
}
-
+
m_bForceUpdateSelection = true;
UpdateSelection();
pFrame->FireRefreshView();
@@ -541,7 +541,7 @@ void CViewProjects::OnProjectReset( wxCommandEvent& WXUNUSED(event) ) {
void CViewProjects::OnProjectDetach( wxCommandEvent& WXUNUSED(event) ) {
wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnProjectDetach - Function Begin"));
- wxInt32 iAnswer = 0;
+ wxInt32 iAnswer = 0;
wxString strMessage = wxEmptyString;
CMainDocument* pDoc = wxGetApp().GetDocument();
CAdvancedFrame* pFrame = wxDynamicCast(GetParent()->GetParent()->GetParent(), CAdvancedFrame);
@@ -562,13 +562,13 @@ void CViewProjects::OnProjectDetach( wxCommandEvent& WXUNUSED(event) ) {
// Step through all selected items
row = m_pListPane->GetNextItem(row, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (row < 0) break;
-
+
if (GetProjectCacheAtIndex(pProject, m_iSortedIndexes[row])) {
return;
}
strMessage.Printf(
- _("Are you sure you want to remove project '%s'?"),
+ _("Are you sure you want to remove project '%s'?"),
pProject->m_strProjectName.c_str()
);
@@ -674,8 +674,8 @@ wxString CViewProjects::OnListGetItemText(long item, long column) const {
strBuffer = project->m_strAVGCredit;
break;
case COLUMN_RESOURCESHARE:
- // CBOINCListCtrl::DrawProgressBars() will draw this using
- // data provided by GetProgressText() and GetProgressValue(),
+ // CBOINCListCtrl::DrawProgressBars() will draw this using
+ // data provided by GetProgressText() and GetProgressValue(),
// but we need it here for accessibility programs.
strBuffer = project->m_strResourceShare;
break;
@@ -765,13 +765,13 @@ void CViewProjects::UpdateSelection() {
enableReset = true;
enableDetach = true;
}
-
+
row = -1;
for (i=0; iGetNextItem(row, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (row < 0) break; // Should never happen
-
+
project = pDoc->project(m_iSortedIndexes[row]);
if (!project) {
m_pTaskPane->DisableTaskGroupTasks(pGroup);
@@ -813,20 +813,20 @@ void CViewProjects::UpdateSelection() {
}
} else {
if (wasNoNewWork != project->dont_request_more_work) {
- // Disable Allow New Work / No New Work button if the multiple
+ // Disable Allow New Work / No New Work button if the multiple
// selection has a mix of Allow New Work and No New Work projects
enableNoNewTasks = false;
}
}
-
+
if (project->attached_via_acct_mgr) {
enableDetach = false;
}
}
-
+
if (n == 1) {
enableProperties = true;
-
+
UpdateWebsiteSelection(GRP_WEBSITES, project);
if(m_TaskGroups.size()>1) {
m_pTaskPane->EnableTaskGroupTasks(m_TaskGroups[1]);
@@ -857,7 +857,7 @@ bool CViewProjects::SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnIndex
double fDocumentPercent = 0.0;
CProject* project;
bool dirty = false;
-
+
if (GetProjectCacheAtIndex(project, m_iSortedIndexes[iRowIndex])) {
return false;
}
@@ -939,7 +939,7 @@ void CViewProjects::GetDocProjectName(wxInt32 item, wxString& strBuffer) const {
PROJECT* project = NULL;
CMainDocument* pDoc = wxGetApp().GetDocument();
std::string project_name;
-
+
if (pDoc) {
project = pDoc->project(item);
}
@@ -955,7 +955,7 @@ void CViewProjects::GetDocProjectName(wxInt32 item, wxString& strBuffer) const {
wxInt32 CViewProjects::FormatProjectName(wxInt32 item, wxString& strBuffer) const {
CProject* project;
-
+
try {
project = m_ProjectCache.at(m_iSortedIndexes[item]);
} catch ( std::out_of_range ) {
@@ -975,7 +975,7 @@ wxInt32 CViewProjects::FormatProjectName(wxInt32 item, wxString& strBuffer) cons
void CViewProjects::GetDocAccountName(wxInt32 item, wxString& strBuffer) const {
PROJECT* project = NULL;
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
if (pDoc) {
project = pDoc->project(item);
}
@@ -990,7 +990,7 @@ void CViewProjects::GetDocAccountName(wxInt32 item, wxString& strBuffer) const {
wxInt32 CViewProjects::FormatAccountName(wxInt32 item, wxString& strBuffer) const {
CProject* project;
-
+
try {
project = m_ProjectCache.at(m_iSortedIndexes[item]);
} catch ( std::out_of_range ) {
@@ -1009,7 +1009,7 @@ wxInt32 CViewProjects::FormatAccountName(wxInt32 item, wxString& strBuffer) cons
void CViewProjects::GetDocTeamName(wxInt32 item, wxString& strBuffer) const {
PROJECT* project = NULL;
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
if (pDoc) {
project = pDoc->project(item);
}
@@ -1024,7 +1024,7 @@ void CViewProjects::GetDocTeamName(wxInt32 item, wxString& strBuffer) const {
wxInt32 CViewProjects::FormatTeamName(wxInt32 item, wxString& strBuffer) const {
CProject* project;
-
+
try {
project = m_ProjectCache.at(m_iSortedIndexes[item]);
} catch ( std::out_of_range ) {
@@ -1044,7 +1044,7 @@ wxInt32 CViewProjects::FormatTeamName(wxInt32 item, wxString& strBuffer) const {
void CViewProjects::GetDocTotalCredit(wxInt32 item, double& fBuffer) const {
PROJECT* project = NULL;
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
if (pDoc) {
project = pDoc->project(item);
}
@@ -1060,7 +1060,7 @@ void CViewProjects::GetDocTotalCredit(wxInt32 item, double& fBuffer) const {
void CViewProjects::GetDocAVGCredit(wxInt32 item, double& fBuffer) const {
PROJECT* project = NULL;
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
if (pDoc) {
project = pDoc->project(item);
}
@@ -1075,7 +1075,7 @@ void CViewProjects::GetDocAVGCredit(wxInt32 item, double& fBuffer) const {
void CViewProjects::GetDocResourceShare(wxInt32 item, double& fBuffer) const {
PROJECT* project = NULL;
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
if (pDoc) {
project = pDoc->project(item);
}
@@ -1091,11 +1091,11 @@ void CViewProjects::GetDocResourceShare(wxInt32 item, double& fBuffer) const {
void CViewProjects::GetDocResourcePercent(wxInt32 item, double& fBuffer) const {
PROJECT* project = NULL;
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
if (pDoc) {
project = pDoc->project(item);
}
-
+
if (project && pDoc) {
fBuffer = (project->resource_share / pDoc->m_fProjectTotalResourceShare) * 100;
} else {
@@ -1106,7 +1106,7 @@ void CViewProjects::GetDocResourcePercent(wxInt32 item, double& fBuffer) const {
wxInt32 CViewProjects::FormatResourceShare(double share, double share_pct, wxString& strBuffer) const {
strBuffer.Printf(wxT("%s (%s%%)"), format_number(share, 0), format_number(share_pct, 2));
-
+
return 0;
}
@@ -1126,7 +1126,7 @@ wxString rpc_reason_string_translated(int reason) {
void CViewProjects::GetDocStatus(wxInt32 item, wxString& strBuffer) const {
PROJECT* project = NULL;
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
if (pDoc) {
project = pDoc->project(item);
}
@@ -1168,7 +1168,7 @@ void CViewProjects::GetDocStatus(wxInt32 item, wxString& strBuffer) const {
wxInt32 CViewProjects::FormatStatus(wxInt32 item, wxString& strBuffer) const {
CProject* project;
-
+
try {
project = m_ProjectCache.at(m_iSortedIndexes[item]);
} catch ( std::out_of_range ) {
@@ -1188,7 +1188,7 @@ wxInt32 CViewProjects::FormatStatus(wxInt32 item, wxString& strBuffer) const {
void CViewProjects::GetDocProjectURL(wxInt32 item, wxString& strBuffer) const {
PROJECT* project = NULL;
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
if (pDoc) {
project = pDoc->project(item);
}
@@ -1279,7 +1279,7 @@ int CViewProjects::GetProjectCacheAtIndex(CProject*& projectPtr, int index) {
projectPtr = NULL;
return -1;
}
-
+
return 0;
}
diff --git a/clientgui/ViewResources.cpp b/clientgui/ViewResources.cpp
index f1def5ddc30..aae67599795 100644
--- a/clientgui/ViewResources.cpp
+++ b/clientgui/ViewResources.cpp
@@ -70,7 +70,7 @@ CViewResources::CViewResources(wxNotebook* pNotebook) :
m_pieCtrlTotal->m_Series.Add(CtrlTotalPart);
m_pieCtrlTotal->Refresh();
-
+
// create pie chart ctrl for BOINC disk usage
m_pieCtrlBOINC = new wxPieCtrl(this, ID_PIECTRL_RESOURCEUTILIZATIONVIEW, wxDefaultPosition, wxDefaultSize);
wxASSERT(m_pieCtrlBOINC);
diff --git a/clientgui/ViewStatistics.cpp b/clientgui/ViewStatistics.cpp
index 3640f80e7bb..895c121d04d 100644
--- a/clientgui/ViewStatistics.cpp
+++ b/clientgui/ViewStatistics.cpp
@@ -166,21 +166,21 @@ CPaintStatistics::CPaintStatistics(wxWindow* parent, wxWindowID id, const wxPoin
m_pen_AxisXColour = wxColour(64, 128, 192);
m_pen_AxisYColour = wxColour(64, 128, 192);
m_pen_AxisXTextColour = wxColour(0, 0, 0);
- m_pen_AxisYTextColour = wxColour(0, 0, 0);
-
+ m_pen_AxisYTextColour = wxColour(0, 0, 0);
+
m_brush_LegendColour = wxColour(235, 255, 255);//wxColour(220, 240, 255);
m_brush_LegendSelectColour = wxColour(192, 224, 255);
m_pen_LegendSelectColour = wxColour(64, 128, 192);
m_pen_LegendSelectTextColour = wxColour(0, 0, 0);
m_pen_LegendColour = wxColour(64, 128, 192);
m_pen_LegendTextColour = wxColour(0, 0, 0);
-
+
m_brush_MainColour = wxColour(255, 255, 255);
m_pen_MainColour = wxColour(64, 128, 192);
-
+
m_pen_HeadTextColour = wxColour(0, 0, 0);
m_pen_ProjectHeadTextColour = wxColour(0, 0, 0);
-
+
m_pen_GraphTotalColour = wxColour(255, 0, 0);
m_pen_GraphRACColour = wxColour(0, 160, 0);
m_pen_GraphTotalHostColour = wxColour(0, 0, 255);
@@ -189,7 +189,7 @@ CPaintStatistics::CPaintStatistics(wxWindow* parent, wxWindowID id, const wxPoin
m_dc_bmp.Create(1, 1);
m_full_repaint = true;
m_bmp_OK = false;
-
+
#ifdef __WXMAC__
m_fauxStatisticsView = NULL;
SetupMacAccessibilitySupport();
@@ -208,8 +208,8 @@ CPaintStatistics::~CPaintStatistics() {
static void getTypePoint(int &typePoint, int number) {typePoint = number / 10;}
-static bool CrossTwoLine(const double X1_1, const double Y1_1, const double X1_2, const double Y1_2,
- const double X2_1, const double Y2_1, const double X2_2, const double Y2_2,
+static bool CrossTwoLine(const double X1_1, const double Y1_1, const double X1_2, const double Y1_2,
+ const double X2_1, const double Y2_1, const double X2_2, const double Y2_2,
double &Xcross, double &Ycross) {
double A1 = Y1_1 - Y1_2;
double B1 = X1_2 - X1_1;
@@ -248,7 +248,7 @@ static void myDrawPoint(wxDC &dc,int X, int Y, wxColour graphColour,int numberTy
delete[] points;
break;}
case 3: dc.DrawRectangle(wxCoord(X - (PointWidth / 2)),wxCoord(Y - (PointWidth / 2)),wxCoord(PointWidth + 1),wxCoord(PointWidth + 1));
- break;
+ break;
case 4: {wxPoint* points = new wxPoint[4];
points[0] = wxPoint(X, Y - 1 - (PointWidth / 2));
points[1] = wxPoint(X + 1 + (PointWidth / 2), Y);
@@ -265,7 +265,7 @@ static void MinMaxDayCredit(std::vector::const_iterator &i, double &mi
for (std::vector::const_iterator j = (*i)->statistics.begin(); j != (*i)->statistics.end(); ++j) {
if (first){
max_day = j->day;
- switch (m_SelectedStatistic){
+ switch (m_SelectedStatistic){
case show_user_total: max_credit = j->user_total_credit; break;
case show_user_average: max_credit = j->user_expavg_credit; break;
case show_host_total: max_credit = j->host_total_credit; break;
@@ -279,7 +279,7 @@ static void MinMaxDayCredit(std::vector::const_iterator &i, double &mi
if (j->day < min_day) min_day = j->day;
if (j->day > max_day) max_day = j->day;
- switch (m_SelectedStatistic){
+ switch (m_SelectedStatistic){
case show_user_total:
if (j->user_total_credit > max_credit) max_credit = j->user_total_credit;
if (j->user_total_credit < min_credit) min_credit = j->user_total_credit;
@@ -483,7 +483,7 @@ void CPaintStatistics::DrawLegend(wxDC &dc, PROJECTS* proj, CMainDocument* pDoc,
wxCoord h0 = 0;
wxCoord w0 = 0;
wxCoord totalTextAreaHeight = 0;
-
+
dc.SetFont(m_font_bold);
dc.GetTextExtent(head_name, &w_temp, &h_temp, &des_temp, &lead_temp);
m_Legend_dY = (double)(h_temp) + 4.0;
@@ -511,7 +511,7 @@ void CPaintStatistics::DrawLegend(wxDC &dc, PROJECTS* proj, CMainDocument* pDoc,
if (w0 < 0) w0 = 0;
h0 = wxCoord(m_WorkSpace_Y_end - m_WorkSpace_Y_start) - buffer_y1 - buffer_y1;
if (h0 < 0) h0 = 0;
-
+
m_Space_for_scrollbar = 0;
if (h0 < (totalTextAreaHeight + (2 * radius1))) m_Space_for_scrollbar = m_Scrollbar_width;
int numVisible = (h0 - (2 * radius1)) / m_Legend_dY;
@@ -523,12 +523,12 @@ void CPaintStatistics::DrawLegend(wxDC &dc, PROJECTS* proj, CMainDocument* pDoc,
m_scrollBar->SetScrollbar(m_scrollBar->GetThumbPosition(), 1, numSteps, 1);
m_scrollBar->Show();
}
-
+
x0 = wxCoord(m_WorkSpace_X_end) - project_name_max_width + buffer_x1 - m_Space_for_scrollbar;
if (x0 > wxCoord(m_WorkSpace_X_end)) x0 = wxCoord(m_WorkSpace_X_end);
if (x0 < wxCoord(m_WorkSpace_X_start)) x0 = wxCoord(m_WorkSpace_X_start);
if (x0 < 0) x0 = 0;
-
+
dc.DrawRoundedRectangle(x0, y0, w0, h0, radius1);
m_Legend_X_start = double(x0);
@@ -551,7 +551,7 @@ void CPaintStatistics::DrawLegend(wxDC &dc, PROJECTS* proj, CMainDocument* pDoc,
// Legend Shift (start)
int Legend_count_temp = 0;
if (m_Legend_dY > 0) Legend_count_temp = int(floor((m_Legend_select_Y_end - m_Legend_select_Y_start) / m_Legend_dY));
-
+
if (numSteps > 1) {
m_Legend_Shift = m_scrollBar->GetThumbPosition();
} else {
@@ -622,7 +622,7 @@ void CPaintStatistics::DrawLegend(wxDC &dc, PROJECTS* proj, CMainDocument* pDoc,
if (y0 < 0) y0 = 0;
if ((SelProj >= 0) || (!(m_HideProjectStatistic.count( wxString( (*i)->master_url, wxConvUTF8 ) )))){
myDrawPoint(dc, int(x0), int(y0), graphColour, typePoint ,m_GraphPointWidth);
- dc.SetFont(m_font_bold);
+ dc.SetFont(m_font_bold);
}else {
dc.SetFont(m_font_standart_italic);
graphColour = wxColour(0, 0, 0);
@@ -642,7 +642,7 @@ void CPaintStatistics::DrawLegend(wxDC &dc, PROJECTS* proj, CMainDocument* pDoc,
dc.SetFont(m_font_standart);
}
//----Draw background, axis(lines), text(01-Jan-1980)----
-void CPaintStatistics::DrawAxis(wxDC &dc, const double max_val_y, const double min_val_y, const double max_val_x, const double min_val_x,
+void CPaintStatistics::DrawAxis(wxDC &dc, const double max_val_y, const double min_val_y, const double max_val_x, const double min_val_x,
wxColour pen_AxisColour, const double max_val_y_all, const double min_val_y_all) {
wxCoord x0 = wxCoord(m_WorkSpace_X_start);
wxCoord y0 = wxCoord(m_WorkSpace_Y_start);
@@ -661,7 +661,7 @@ void CPaintStatistics::DrawAxis(wxDC &dc, const double max_val_y, const double m
wxCoord w_temp, h_temp, des_temp, lead_temp;
wxCoord w_temp2;
-
+
dc.GetTextExtent(wxString::Format(wxT(" %s"), format_number(max_val_y_all, 2)), &w_temp, &h_temp, &des_temp, &lead_temp);
dc.GetTextExtent(wxString::Format(wxT(" %s"), format_number(min_val_y_all, 2)), &w_temp2, &h_temp, &des_temp, &lead_temp);
@@ -669,20 +669,20 @@ void CPaintStatistics::DrawAxis(wxDC &dc, const double max_val_y, const double m
m_WorkSpace_X_start += double(w_temp) + 3.0;
m_WorkSpace_Y_end -= double(h_temp) + 3.0;
-
+
dc.GetTextExtent(wxT("0"), &w_temp, &h_temp, &des_temp, &lead_temp);
m_WorkSpace_X_end -= 3.0;//w_temp;
const double radius1 = 5.0;//(double)(h_temp/2.0);
double d_y = (double)(h_temp) / 2.0;
if (d_y < 5.0) d_y = 5.0;
-
+
wxDateTime dtTemp1;
wxString strBuffer1;
dtTemp1.Set((time_t)max_val_x);
strBuffer1 = dtTemp1.Format(wxT("%d.%b.%y"), wxDateTime::GMT0);
dc.GetTextExtent(strBuffer1, &w_temp, &h_temp, &des_temp, &lead_temp);
-
+
double d_x = (double)(w_temp) / 2.0;
// Draw background graph
@@ -714,7 +714,7 @@ void CPaintStatistics::DrawAxis(wxDC &dc, const double max_val_y, const double m
m_Graph_draw_Y_start = m_WorkSpace_Y_start;
m_Graph_draw_Y_end = m_WorkSpace_Y_end;
// A B
- AB(m_WorkSpace_X_start, m_WorkSpace_Y_end, m_WorkSpace_X_end, m_WorkSpace_Y_start,
+ AB(m_WorkSpace_X_start, m_WorkSpace_Y_end, m_WorkSpace_X_end, m_WorkSpace_Y_start,
min_val_x, min_val_y, max_val_x, max_val_y);
//Draw val and lines
dc.SetPen(wxPen(m_pen_AxisYColour , 1 , wxDOT));
@@ -728,7 +728,7 @@ void CPaintStatistics::DrawAxis(wxDC &dc, const double max_val_y, const double m
if (d2 >= d_oy_val){
d_oy_val = 1.0 * d2;
- } else if (2.0 * d2 >= d_oy_val){
+ } else if (2.0 * d2 >= d_oy_val){
d_oy_val = 2.0 * d2;
} else if (5.0 * d2 >= d_oy_val){
d_oy_val = 5.0 * d2;
@@ -771,7 +771,7 @@ void CPaintStatistics::DrawAxis(wxDC &dc, const double max_val_y, const double m
int d_ox_count = 1;
if (w_temp > 0) d_ox_count = (int)((m_WorkSpace_X_end - m_WorkSpace_X_start) / (1.2 * double(w_temp)));
if (d_ox_count <= 0) d_ox_count = 1;
-
+
double d_ox_val = ceil(((double)(max_val_x - min_val_x) / double(d_ox_count)) / 86400.0) * 86400.0;
if (0 == d_ox_val) d_ox_val = 1;
@@ -866,7 +866,7 @@ void CPaintStatistics::DrawGraph2(wxDC &dc, std::vector stats, cons
}
if (first_point) {
- if ((d_xpos < m_Graph_X_start) || (d_xpos > m_Graph_X_end) ||
+ if ((d_xpos < m_Graph_X_start) || (d_xpos > m_Graph_X_end) ||
(d_ypos < m_Graph_Y_start) || (d_ypos > m_Graph_Y_end)){
point_in = false;
b_point2 = false;
@@ -884,13 +884,13 @@ void CPaintStatistics::DrawGraph2(wxDC &dc, std::vector stats, cons
}else {
dc.SetPen(wxPen(graphColour , m_GraphLineWidth , wxSOLID));
// ïðîâåðêà ïîïàäàíèÿ ïåðâîé òî÷êè ëèíèè â îáëàñòü ðèñîâàíèÿ
- if (last_point_in){
+ if (last_point_in){
d_x1 = d_last_x;
d_y1 = d_last_y;
b_point1 = true;
}else b_point1 = false;
// ïðîâåðêà ïîïàäàíèÿ âòîðîé òî÷êè ëèíèè â îáëàñòü ðèñîâàíèÿ
- if ((d_xpos < m_Graph_X_start) || (d_xpos > m_Graph_X_end) ||
+ if ((d_xpos < m_Graph_X_start) || (d_xpos > m_Graph_X_end) ||
(d_ypos < m_Graph_Y_start) || (d_ypos > m_Graph_Y_end)){
point_in = false;
b_point2 = false;
@@ -902,7 +902,7 @@ void CPaintStatistics::DrawGraph2(wxDC &dc, std::vector stats, cons
}
// Èùåì òî÷êó âõîäà ëèíèè â îáëàñòü ðèñîâàíèÿ (1) x=const
if (!b_point1 || !b_point2){
- if (CrossTwoLine(d_last_x, d_last_y, d_xpos, d_ypos,
+ if (CrossTwoLine(d_last_x, d_last_y, d_xpos, d_ypos,
m_Graph_X_start, m_Graph_Y_end, m_Graph_X_start, m_Graph_Y_start,
d_cross_x1, d_cross_y1)){
if (d_last_x > d_xpos){
@@ -919,7 +919,7 @@ void CPaintStatistics::DrawGraph2(wxDC &dc, std::vector stats, cons
d_max2 = m_Graph_Y_end;
d_min2 = m_Graph_Y_start;
}
- if ((d_cross_x1 <= d_max1) && (d_cross_x1 >= d_min1) &&
+ if ((d_cross_x1 <= d_max1) && (d_cross_x1 >= d_min1) &&
(d_cross_y1 <= d_max2) && (d_cross_y1 >= d_min2)){
if (!b_point1){
d_x1 = d_cross_x1;
@@ -935,7 +935,7 @@ void CPaintStatistics::DrawGraph2(wxDC &dc, std::vector stats, cons
}
// Èùåì òî÷êó âõîäà ëèíèè â îáëàñòü ðèñîâàíèÿ (2) x=const
if (!b_point1 || !b_point2){
- if (CrossTwoLine(d_last_x, d_last_y, d_xpos, d_ypos,
+ if (CrossTwoLine(d_last_x, d_last_y, d_xpos, d_ypos,
m_Graph_X_end, m_Graph_Y_end, m_Graph_X_end, m_Graph_Y_start,
d_cross_x1, d_cross_y1)){
if (d_last_x > d_xpos){
@@ -952,7 +952,7 @@ void CPaintStatistics::DrawGraph2(wxDC &dc, std::vector stats, cons
d_max2 = m_Graph_Y_end;
d_min2 = m_Graph_Y_start;
}
- if ((d_cross_x1 <= d_max1) && (d_cross_x1 >= d_min1) &&
+ if ((d_cross_x1 <= d_max1) && (d_cross_x1 >= d_min1) &&
(d_cross_y1 <= d_max2) && (d_cross_y1 >= d_min2)){
if (!b_point1){
d_x1 = d_cross_x1;
@@ -968,7 +968,7 @@ void CPaintStatistics::DrawGraph2(wxDC &dc, std::vector stats, cons
}
// Èùåì òî÷êó âõîäà ëèíèè â îáëàñòü ðèñîâàíèÿ (3) y=const
if (!b_point1 || !b_point2){
- if (CrossTwoLine(d_last_x, d_last_y, d_xpos, d_ypos,
+ if (CrossTwoLine(d_last_x, d_last_y, d_xpos, d_ypos,
m_Graph_X_start, m_Graph_Y_start, m_Graph_X_end, m_Graph_Y_start,
d_cross_x1, d_cross_y1)){
if (d_last_y > d_ypos){
@@ -985,7 +985,7 @@ void CPaintStatistics::DrawGraph2(wxDC &dc, std::vector stats, cons
d_max2 = m_Graph_X_end;
d_min2 = m_Graph_X_start;
}
- if ((d_cross_y1 <= d_max1) && (d_cross_y1 >= d_min1) &&
+ if ((d_cross_y1 <= d_max1) && (d_cross_y1 >= d_min1) &&
(d_cross_x1 <= d_max2) && (d_cross_x1 >= d_min2)){
if (!b_point1){
d_x1 = d_cross_x1;
@@ -1001,7 +1001,7 @@ void CPaintStatistics::DrawGraph2(wxDC &dc, std::vector stats, cons
}
// Èùåì òî÷êó âõîäà ëèíèè â îáëàñòü ðèñîâàíèÿ (4) y=const
if (!b_point1 || !b_point2){
- if (CrossTwoLine(d_last_x, d_last_y, d_xpos, d_ypos,
+ if (CrossTwoLine(d_last_x, d_last_y, d_xpos, d_ypos,
m_Graph_X_start, m_Graph_Y_end, m_Graph_X_end, m_Graph_Y_end,
d_cross_x1, d_cross_y1)){
if (d_last_y > d_ypos){
@@ -1018,7 +1018,7 @@ void CPaintStatistics::DrawGraph2(wxDC &dc, std::vector stats, cons
d_max2 = m_Graph_X_end;
d_min2 = m_Graph_X_start;
}
- if ((d_cross_y1 <= d_max1) && (d_cross_y1 >= d_min1) &&
+ if ((d_cross_y1 <= d_max1) && (d_cross_y1 >= d_min1) &&
(d_cross_x1 <= d_max2) && (d_cross_x1 >= d_min2)){
if (!b_point1){
d_x1 = d_cross_x1;
@@ -1146,7 +1146,7 @@ void CPaintStatistics::DrawAll(wxDC &dc) {
// m_font_standart = dc.GetFont();
// m_font_bold = dc.GetFont();
// m_font_standart_italic = dc.GetFont();
-
+
m_font_standart.SetWeight(wxNORMAL);
m_font_bold.SetWeight(wxBOLD);
// m_font_standart_italic.SetFaceName(_T("Verdana"));
@@ -1192,7 +1192,7 @@ void CPaintStatistics::DrawAll(wxDC &dc) {
m_scrollBar->Hide();
m_Space_for_scrollbar = 0;
}
-
+
switch (m_ModeViewStatistic){
case mode_all_separate:
{
@@ -1238,7 +1238,7 @@ void CPaintStatistics::DrawAll(wxDC &dc) {
}
int col = 1, row = 1; //Used to identify the actual row/col
-
+
double rectangle_x_start = m_WorkSpace_X_start;
double rectangle_x_end = m_WorkSpace_X_end;
double rectangle_y_start = m_WorkSpace_Y_start;
@@ -1248,10 +1248,10 @@ void CPaintStatistics::DrawAll(wxDC &dc) {
if (0 == nb_proj_row) nb_proj_row = 1;
const double x_fac = (rectangle_x_end - rectangle_x_start) / double(nb_proj_col);
const double y_fac = (rectangle_y_end - rectangle_y_start) / double(nb_proj_row);
-
+
double min_val_y_all = 10e32, max_val_y_all = 0;
double min_val_x_all = 10e32, max_val_x_all = 0;
-
+
for (std::vector::const_iterator i = proj->projects.begin(); i != proj->projects.end(); ++i) {
if (!(m_HideProjectStatistic.count( wxString((*i)->master_url, wxConvUTF8) ))){
MinMaxDayCredit(i, min_val_y_all, max_val_y_all, min_val_x_all, max_val_x_all, m_SelectedStatistic, false);
@@ -1278,7 +1278,7 @@ void CPaintStatistics::DrawAll(wxDC &dc) {
if (m_main_X_start > m_main_X_end) m_main_X_end = m_main_X_start;
if (m_main_Y_start < 0) m_main_Y_start = 0;
if (m_main_Y_start > m_main_Y_end) m_main_Y_end = m_main_Y_start;
-
+
m_WorkSpace_X_start = m_main_X_start;
m_WorkSpace_X_end = m_main_X_end;
m_WorkSpace_Y_start = m_main_Y_start;
@@ -1332,7 +1332,7 @@ void CPaintStatistics::DrawAll(wxDC &dc) {
double t_d1 = floor((t_n1 - max_val_x) / 86400.0);
wxString head_name=wxString::Format(_("Last update: %.0f days ago"), t_d1);
-
+
wxColour pen_AxisColour1 = m_pen_AxisColourAutoZoom;
if (m_Zoom_Auto){
@@ -1398,7 +1398,7 @@ void CPaintStatistics::DrawAll(wxDC &dc) {
//Find minimum/maximum value
double min_val_y = 10e32, max_val_y = 0;
double min_val_x = 10e32, max_val_x = 0;
-
+
wxColour pen_AxisColour1 = m_pen_AxisColourAutoZoom;
if (m_Zoom_Auto){
@@ -1470,7 +1470,7 @@ void CPaintStatistics::DrawAll(wxDC &dc) {
double min_val_x = 10e32, max_val_x = 0;
double min_total_y = 0;
double max_total_y = 0;
-
+
wxColour pen_AxisColour1 = m_pen_AxisColourAutoZoom;
if (m_Zoom_Auto){
@@ -1539,19 +1539,19 @@ void CPaintStatistics::DrawAll(wxDC &dc) {
} else {
saved_sum_stat = *sum_iter;
}
-
+
if ((*proj_iter).day > (*sum_iter).day) {
AddToStats(prev_proj_stat, *sum_iter);
} else {
AddToStats(*proj_iter, *sum_iter);
}
-
+
++sum_iter;
if (sum_iter == sumstats.end()) {
break;
}
}
-
+
if ((*proj_iter).day <= (*sum_iter).day) {
prev_proj_stat = *proj_iter;
++proj_iter;
@@ -1565,7 +1565,7 @@ void CPaintStatistics::DrawAll(wxDC &dc) {
}
}
}
-
+
//Draw graph
wxColour graphColour = wxColour(0,0,0);
int typePoint = 0;
@@ -1671,7 +1671,7 @@ void CPaintStatistics::OnPaint(wxPaintEvent& WXUNUSED(event)) {
}
#if USE_MEMORYDC
if (m_bmp_OK && (width == m_dc_bmp.GetWidth()) &&(height == m_dc_bmp.GetHeight())){
- pdc.Blit(0, 0, width - m_Space_for_scrollbar, height,& mdc, 0, 0);
+ pdc.Blit(0, 0, width - m_Space_for_scrollbar, height,& mdc, 0, 0);
}
mdc.SelectObject(wxNullBitmap);
#endif
@@ -1685,15 +1685,15 @@ void CPaintStatistics::OnLeftMouseDown(wxMouseEvent& event) {
if((double(pt.y) > m_Legend_select_Y_start) && (double(pt.y) < m_Legend_select_Y_end) && (double(pt.x) > m_Legend_select_X_start) && (double(pt.x) < m_Legend_select_X_end)){
int i1 = (int)floor((double(pt.y) - m_Legend_select_Y_start) / m_Legend_dY);
switch (m_ModeViewStatistic){
- case mode_one_project:
- m_NextProjectStatistic = i1 + m_Legend_Shift_Mode1;
+ case mode_one_project:
+ m_NextProjectStatistic = i1 + m_Legend_Shift_Mode1;
m_Zoom_Auto = true;
m_GraphMarker1 = false;
break;
case mode_all_separate:
case mode_all_together:
case mode_sum:
- m_ViewHideProjectStatistic = i1 + m_Legend_Shift_Mode2;
+ m_ViewHideProjectStatistic = i1 + m_Legend_Shift_Mode2;
break;
}
m_full_repaint = true;
@@ -1769,7 +1769,7 @@ void CPaintStatistics::OnMouseMotion(wxMouseEvent& event) {
if ( (X1 != 0) || (Y1 != 0)){
m_GraphMove_X1 = m_GraphMove_X2;
m_GraphMove_Y1 = m_GraphMove_Y2;
-
+
m_Zoom_min_val_X = m_Zoom_min_val_X + X1;
m_Zoom_max_val_X = m_Zoom_max_val_X + X1;
m_Zoom_min_val_Y = m_Zoom_min_val_Y + Y1;
@@ -1925,7 +1925,7 @@ CViewStatistics::CViewStatistics()
{}
CViewStatistics::CViewStatistics(wxNotebook* pNotebook) :
- CBOINCBaseView(pNotebook)
+ CBOINCBaseView(pNotebook)
{
CTaskItemGroup* pGroup = NULL;
CTaskItem* pItem = NULL;
@@ -1938,7 +1938,7 @@ CViewStatistics::CViewStatistics(wxNotebook* pNotebook) :
itemFlexGridSizer->AddGrowableRow(0);
itemFlexGridSizer->AddGrowableCol(1);
-
+
m_pTaskPane = new CBOINCTaskCtrl(this, ID_TASK_STATISTICSVIEW, DEFAULT_TASK_FLAGS);
wxASSERT(m_pTaskPane);
@@ -1960,28 +1960,28 @@ CViewStatistics::CViewStatistics(wxNotebook* pNotebook) :
pItem = new CTaskItem(
_("Show user total"),
_("Show total credit for user"),
- ID_TASK_STATISTICS_USERTOTAL
+ ID_TASK_STATISTICS_USERTOTAL
);
pGroup->m_Tasks.push_back( pItem );
pItem = new CTaskItem(
_("Show user average"),
_("Show average credit for user"),
- ID_TASK_STATISTICS_USERAVERAGE
+ ID_TASK_STATISTICS_USERAVERAGE
);
pGroup->m_Tasks.push_back( pItem );
pItem = new CTaskItem(
_("Show host total"),
_("Show total credit for host"),
- ID_TASK_STATISTICS_HOSTTOTAL
+ ID_TASK_STATISTICS_HOSTTOTAL
);
pGroup->m_Tasks.push_back( pItem );
pItem = new CTaskItem(
_("Show host average"),
_("Show average credit for host"),
- ID_TASK_STATISTICS_HOSTAVERAGE
+ ID_TASK_STATISTICS_HOSTAVERAGE
);
pGroup->m_Tasks.push_back( pItem );
@@ -1991,20 +1991,20 @@ CViewStatistics::CViewStatistics(wxNotebook* pNotebook) :
pItem = new CTaskItem(
_("< &Previous project"),
_("Show chart for previous project"),
- ID_TASK_STATISTICS_PREVPROJECT
+ ID_TASK_STATISTICS_PREVPROJECT
);
pGroup->m_Tasks.push_back( pItem );
pItem = new CTaskItem(
_("&Next project >"),
_("Show chart for next project"),
- ID_TASK_STATISTICS_NEXTPROJECT
+ ID_TASK_STATISTICS_NEXTPROJECT
);
pGroup->m_Tasks.push_back( pItem );
pItem = new CTaskItem(
_("Hide project list"),
_("Use entire area for graphs"),
- ID_TASK_STATISTICS_HIDEPROJLIST
+ ID_TASK_STATISTICS_HIDEPROJLIST
);
pGroup->m_Tasks.push_back( pItem );
@@ -2014,28 +2014,28 @@ CViewStatistics::CViewStatistics(wxNotebook* pNotebook) :
pItem = new CTaskItem(
_("One project"),
_("Show one chart with selected project"),
- ID_TASK_STATISTICS_MODEVIEWONEPROJECT
+ ID_TASK_STATISTICS_MODEVIEWONEPROJECT
);
pGroup->m_Tasks.push_back( pItem );
-
+
pItem = new CTaskItem(
_("All projects (separate)"),
_("Show all projects, one chart per project"),
- ID_TASK_STATISTICS_MODEVIEWALLSEPARATE
+ ID_TASK_STATISTICS_MODEVIEWALLSEPARATE
);
pGroup->m_Tasks.push_back( pItem );
pItem = new CTaskItem(
_("All projects (together)"),
_("Show one chart with all projects"),
- ID_TASK_STATISTICS_MODEVIEWALLTOGETHER
+ ID_TASK_STATISTICS_MODEVIEWALLTOGETHER
);
pGroup->m_Tasks.push_back( pItem );
-
+
pItem = new CTaskItem(
_("All projects (sum)"),
_("Show one chart with sum of projects"),
- ID_TASK_STATISTICS_MODEVIEWSUM
+ ID_TASK_STATISTICS_MODEVIEWSUM
);
pGroup->m_Tasks.push_back( pItem );
@@ -2275,7 +2275,7 @@ void CViewStatistics::OnShowHideProjectList( wxCommandEvent& WXUNUSED(event) ) {
m_PaintStatistics->m_full_repaint = true;
m_PaintStatistics->Refresh(false);
UpdateSelection();
-
+
wxLogTrace(wxT("Function Start/End"), wxT("CViewStatistics::OnShowHideProjectList - Function End"));
}
@@ -2338,13 +2338,13 @@ bool CViewStatistics::OnRestoreState(wxConfigBase* pConfig) {
if (!(m_PaintStatistics->m_HideProjectStatistic.empty())) m_PaintStatistics->m_HideProjectStatistic.clear();
for (int count = 0; count < 1000; ++count) {
pConfig->Read(wxString::Format(wxT("%d"), count), &tmpstr1, wxT(""));
- if (tmpstr1 == wxEmptyString){
+ if (tmpstr1 == wxEmptyString){
break;
}else{
m_PaintStatistics->m_HideProjectStatistic.insert(tmpstr1);
}
}
-
+
UpdateSelection();
return true;
}
@@ -2379,7 +2379,7 @@ void CViewStatistics::UpdateSelection() {
pGroup->m_Tasks[show_hide_project_list], _("Show project list"), _("Uses smaller area for graphs")
);
}
-
+
pGroup = m_TaskGroups[2];
pGroup->m_Tasks[mode_one_project]->m_pButton->Enable(m_PaintStatistics->m_ModeViewStatistic != mode_one_project);
pGroup->m_Tasks[mode_all_separate]->m_pButton->Enable(m_PaintStatistics->m_ModeViewStatistic != mode_all_separate);
diff --git a/clientgui/ViewStatistics.h b/clientgui/ViewStatistics.h
index a82f024229d..2606425b735 100644
--- a/clientgui/ViewStatistics.h
+++ b/clientgui/ViewStatistics.h
@@ -30,31 +30,31 @@ class CPaintStatistics : public wxWindow
public:
CPaintStatistics();
CPaintStatistics(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("panel"));
-
+
~CPaintStatistics();
-
+
void DrawMainHead(wxDC &dc, const wxString head_name);
-
+
void DrawProjectHead(wxDC &dc, PROJECT* project1, const wxString head_name_last);
void DrawLegend(wxDC &dc, PROJECTS* proj, CMainDocument* pDoc, int SelProj, bool bColour, int &m_Legend_Shift);
-
+
void DrawAxis(wxDC &dc, const double max_val_y, const double min_val_y, const double max_val_x, const double min_val_x, wxColour pen_AxisColour, const double max_val_y_all, const double min_val_y_all);
-
+
void DrawGraph(wxDC &dc, std::vector::const_iterator &i, const wxColour graphColour, const int typePoint, const int m_SelectedStatistic);
void DrawGraph2(wxDC &dc, std::vector stats, const wxColour graphColour, const int typePoint, const int m_SelectedStatistic);
-
+
void DrawMarker(wxDC &dc);
void ClearXY();
void ClearLegendXY();
-
+
void AB(const double x_coord1, const double y_coord1, const double x_coord2, const double y_coord2, const double x_val1, const double y_val1, const double x_val2, const double y_val2);
void AddToStats(const DAILY_STATS &src, DAILY_STATS &dst);
-
+
//--------------------------
void DrawAll(wxDC &dc);
//--------------------------
@@ -199,7 +199,7 @@ class CPaintStatistics : public wxWindow
void SetupMacAccessibilitySupport();
void ResizeMacAccessibilitySupport();
void RemoveMacAccessibilitySupport();
-
+
void* m_fauxStatisticsView;
#endif
diff --git a/clientgui/ViewTransfers.cpp b/clientgui/ViewTransfers.cpp
index f13551b5824..e22fa80b422 100644
--- a/clientgui/ViewTransfers.cpp
+++ b/clientgui/ViewTransfers.cpp
@@ -57,7 +57,7 @@
// all columns.
//
// For now, show all columns by default
-static int DefaultShownColumns[] = { COLUMN_PROJECT, COLUMN_FILE, COLUMN_PROGRESS,
+static int DefaultShownColumns[] = { COLUMN_PROJECT, COLUMN_FILE, COLUMN_PROGRESS,
COLUMN_SIZE, COLUMN_TIME, COLUMN_TOCOMPLETION, COLUMN_SPEED,
COLUMN_STATUS};
@@ -94,7 +94,7 @@ IMPLEMENT_DYNAMIC_CLASS(CViewTransfers, CBOINCBaseView)
BEGIN_EVENT_TABLE (CViewTransfers, CBOINCBaseView)
EVT_BUTTON(ID_TASK_TRANSFERS_RETRYNOW, CViewTransfers::OnTransfersRetryNow)
EVT_BUTTON(ID_TASK_TRANSFERS_ABORT, CViewTransfers::OnTransfersAbort)
-// We currently handle EVT_LIST_CACHE_HINT on Windows or
+// We currently handle EVT_LIST_CACHE_HINT on Windows or
// EVT_CHECK_SELECTION_CHANGED on Mac & Linux instead of EVT_LIST_ITEM_SELECTED
// or EVT_LIST_ITEM_DESELECTED. See CBOINCBaseView::OnCacheHint() for info.
#if USE_LIST_CACHE_HINT
@@ -202,14 +202,14 @@ CViewTransfers::CViewTransfers(wxNotebook* pNotebook) :
pItem = new CTaskItem(
_("Retry Now"),
_("Retry the file transfer now"),
- ID_TASK_TRANSFERS_RETRYNOW
+ ID_TASK_TRANSFERS_RETRYNOW
);
pGroup->m_Tasks.push_back( pItem );
pItem = new CTaskItem(
_("Abort Transfer"),
_("Abort this file transfer. You won't get credit for the task."),
- ID_TASK_TRANSFERS_ABORT
+ ID_TASK_TRANSFERS_ABORT
);
pGroup->m_Tasks.push_back( pItem );
@@ -331,7 +331,7 @@ int CViewTransfers::GetViewCurrentViewPage() {
wxString CViewTransfers::GetKeyValue1(int iRowIndex) {
CTransfer* transfer;
-
+
if (GetTransferCacheAtIndex(transfer, m_iSortedIndexes[iRowIndex])) {
return wxEmptyString;
}
@@ -347,11 +347,11 @@ wxString CViewTransfers::GetKeyValue1(int iRowIndex) {
wxString CViewTransfers::GetKeyValue2(int iRowIndex) {
CTransfer* transfer;
-
+
if (GetTransferCacheAtIndex(transfer, m_iSortedIndexes[iRowIndex])) {
return wxEmptyString;
}
-
+
if (m_iColumnIDToColumnIndex[COLUMN_PROJECT] < 0) {
// Column is hidden, so SynchronizeCacheItem() did not set its value
GetDocProjectURL(m_iSortedIndexes[iRowIndex], transfer->m_strProjectURL);
@@ -408,7 +408,7 @@ void CViewTransfers::OnTransfersRetryNow( wxCommandEvent& WXUNUSED(event) ) {
// Step through all selected items
row = m_pListPane->GetNextItem(row, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (row < 0) break;
-
+
pDoc->TransferRetryNow(m_iSortedIndexes[row]);
}
@@ -423,7 +423,7 @@ void CViewTransfers::OnTransfersRetryNow( wxCommandEvent& WXUNUSED(event) ) {
void CViewTransfers::OnTransfersAbort( wxCommandEvent& WXUNUSED(event) ) {
wxLogTrace(wxT("Function Start/End"), wxT("CViewTransfers::OnTransfersAbort - Function Begin"));
- wxInt32 iAnswer = 0;
+ wxInt32 iAnswer = 0;
wxString strMessage = wxEmptyString;
CMainDocument* pDoc = wxGetApp().GetDocument();
CAdvancedFrame* pFrame = wxDynamicCast(GetParent()->GetParent()->GetParent(), CAdvancedFrame);
@@ -444,13 +444,13 @@ void CViewTransfers::OnTransfersAbort( wxCommandEvent& WXUNUSED(event) ) {
// Step through all selected items
row = m_pListPane->GetNextItem(row, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (row < 0) break;
-
+
if (GetTransferCacheAtIndex(pTransfer, m_iSortedIndexes[row])) {
return;
}
strMessage.Printf(
- _("Are you sure you want to abort this file transfer '%s'?\nNOTE: Aborting a transfer will invalidate a task and you\nwill not receive credit for it."),
+ _("Are you sure you want to abort this file transfer '%s'?\nNOTE: Aborting a transfer will invalidate a task and you\nwill not receive credit for it."),
pTransfer->m_strFileName.c_str()
);
@@ -465,7 +465,7 @@ void CViewTransfers::OnTransfersAbort( wxCommandEvent& WXUNUSED(event) ) {
pDoc->TransferAbort(m_iSortedIndexes[row]);
}
}
-
+
UpdateSelection();
pFrame->FireRefreshView();
@@ -509,8 +509,8 @@ wxString CViewTransfers::OnListGetItemText(long item, long column) const {
strBuffer = transfer->m_strFileName;
break;
case COLUMN_PROGRESS:
- // CBOINCListCtrl::DrawProgressBars() will draw this using
- // data provided by GetProgressText() and GetProgressValue(),
+ // CBOINCListCtrl::DrawProgressBars() will draw this using
+ // data provided by GetProgressText() and GetProgressValue(),
// but we need it here for accessibility programs.
strBuffer = transfer->m_strProgress;
break;
@@ -640,7 +640,7 @@ bool CViewTransfers::SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnInde
case COLUMN_SIZE:
GetDocBytesXferred(m_iSortedIndexes[iRowIndex], fDocumentDouble);
GetDocTotalBytes(m_iSortedIndexes[iRowIndex], fDocumentDouble2);
- if (( fDocumentDouble != transfer->m_fBytesXferred) ||
+ if (( fDocumentDouble != transfer->m_fBytesXferred) ||
(fDocumentDouble2 != transfer->m_fTotalBytes)
) {
transfer->m_fBytesXferred = fDocumentDouble;
@@ -689,7 +689,7 @@ bool CViewTransfers::SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnInde
void CViewTransfers::GetDocProjectName(wxInt32 item, wxString& strBuffer) const {
FILE_TRANSFER* transfer = NULL;
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
if (pDoc) {
transfer = pDoc->file_transfer(item);
}
@@ -705,7 +705,7 @@ void CViewTransfers::GetDocProjectName(wxInt32 item, wxString& strBuffer) const
void CViewTransfers::GetDocFileName(wxInt32 item, wxString& strBuffer) const {
FILE_TRANSFER* transfer = NULL;
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
if (pDoc) {
transfer = pDoc->file_transfer(item);
}
@@ -723,7 +723,7 @@ void CViewTransfers::GetDocProgress(wxInt32 item, double& fBuffer) const {
double fFileSize = 0;
FILE_TRANSFER* transfer = NULL;
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
if (pDoc) {
transfer = pDoc->file_transfer(item);
}
@@ -756,7 +756,7 @@ wxInt32 CViewTransfers::FormatProgress(double fBuffer, wxString& strBuffer) cons
void CViewTransfers::GetDocBytesXferred(wxInt32 item, double& fBuffer) const {
FILE_TRANSFER* transfer = NULL;
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
if (pDoc) {
transfer = pDoc->file_transfer(item);
}
@@ -772,7 +772,7 @@ void CViewTransfers::GetDocBytesXferred(wxInt32 item, double& fBuffer) const {
void CViewTransfers::GetDocTotalBytes(wxInt32 item, double& fBuffer) const {
FILE_TRANSFER* transfer = NULL;
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
if (pDoc) {
transfer = pDoc->file_transfer(item);
}
@@ -824,7 +824,7 @@ wxInt32 CViewTransfers::FormatSize(double fBytesSent, double fFileSize, wxString
void CViewTransfers::GetDocTime(wxInt32 item, double& fBuffer) const {
FILE_TRANSFER* transfer = NULL;
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
if (pDoc) {
transfer = pDoc->file_transfer(item);
}
@@ -855,7 +855,7 @@ void CViewTransfers::GetDocTimeToCompletion(wxInt32 item, double& fBuffer) const
void CViewTransfers::GetDocSpeed(wxInt32 item, double& fBuffer) const {
FILE_TRANSFER* transfer = NULL;
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
if (pDoc) {
transfer = pDoc->file_transfer(item);
}
@@ -881,7 +881,7 @@ void CViewTransfers::GetDocStatus(wxInt32 item, wxString& strBuffer) const {
CMainDocument* pDoc = wxGetApp().GetDocument();
int retval;
strBuffer = wxString("", wxConvUTF8);
-
+
transfer = pDoc->file_transfer(item);
if (!transfer) return;
CC_STATUS status;
@@ -925,7 +925,7 @@ void CViewTransfers::GetDocStatus(wxInt32 item, wxString& strBuffer) const {
void CViewTransfers::GetDocProjectURL(wxInt32 item, wxString& strBuffer) const {
FILE_TRANSFER* transfer = NULL;
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
if (pDoc) {
transfer = pDoc->file_transfer(item);
}
@@ -943,7 +943,7 @@ double CViewTransfers::GetProgressValue(long item) {
double fFileSize = 0;
FILE_TRANSFER* transfer = NULL;
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
if (pDoc) {
transfer = pDoc->file_transfer(m_iSortedIndexes[item]);
}
@@ -961,7 +961,7 @@ double CViewTransfers::GetProgressValue(long item) {
}
if ( 0.0 == fFileSize ) return 0.0;
-
+
return (fBytesSent / fFileSize);
}
@@ -985,7 +985,7 @@ int CViewTransfers::GetTransferCacheAtIndex(CTransfer*& transferPtr, int index)
transferPtr = NULL;
return -1;
}
-
+
return 0;
}
diff --git a/clientgui/ViewTransfers.h b/clientgui/ViewTransfers.h
index 914048288a2..4019fcb4539 100644
--- a/clientgui/ViewTransfers.h
+++ b/clientgui/ViewTransfers.h
@@ -105,7 +105,7 @@ class CViewTransfers : public CBOINCBaseView {
virtual double GetProgressValue(long item);
virtual wxString GetProgressText( long item);
-
+
int GetTransferCacheAtIndex(CTransfer*& transferPtr, int index);
DECLARE_EVENT_TABLE()
diff --git a/clientgui/ViewWork.cpp b/clientgui/ViewWork.cpp
index 4467097508a..18cad738b5b 100644
--- a/clientgui/ViewWork.cpp
+++ b/clientgui/ViewWork.cpp
@@ -63,9 +63,9 @@
// Columns ESTIMATEDCOMPLETION and DEADLINEDIFF are hidden by default.
// Not all users may want to see those columns.
//
-static int DefaultShownColumns[] = { COLUMN_PROJECT, COLUMN_PROGRESS, COLUMN_STATUS,
+static int DefaultShownColumns[] = { COLUMN_PROJECT, COLUMN_PROGRESS, COLUMN_STATUS,
COLUMN_CPUTIME, COLUMN_TOCOMPLETION,
- COLUMN_REPORTDEADLINE, COLUMN_APPLICATION,
+ COLUMN_REPORTDEADLINE, COLUMN_APPLICATION,
COLUMN_NAME };
// groups that contain buttons
@@ -116,7 +116,7 @@ BEGIN_EVENT_TABLE (CViewWork, CBOINCBaseView)
EVT_BUTTON(ID_TASK_SHOW_PROPERTIES, CViewWork::OnShowItemProperties)
EVT_BUTTON(ID_TASK_ACTIVE_ONLY, CViewWork::OnActiveTasksOnly)
EVT_CUSTOM_RANGE(wxEVT_COMMAND_BUTTON_CLICKED, ID_TASK_PROJECT_WEB_PROJDEF_MIN, ID_TASK_PROJECT_WEB_PROJDEF_MAX, CViewWork::OnProjectWebsiteClicked)
-// We currently handle EVT_LIST_CACHE_HINT on Windows or
+// We currently handle EVT_LIST_CACHE_HINT on Windows or
// EVT_CHECK_SELECTION_CHANGED on Mac & Linux instead of EVT_LIST_ITEM_SELECTED
// or EVT_LIST_ITEM_DESELECTED. See CBOINCBaseView::OnCacheHint() for info.
#if USE_LIST_CACHE_HINT
@@ -232,42 +232,42 @@ CViewWork::CViewWork(wxNotebook* pNotebook) :
pItem = new CTaskItem(
_("Show active tasks"),
_("Show only active tasks."),
- ID_TASK_ACTIVE_ONLY
+ ID_TASK_ACTIVE_ONLY
);
pGroup->m_Tasks.push_back( pItem );
pItem = new CTaskItem(
_("Show graphics"),
_("Show application graphics in a window."),
- ID_TASK_WORK_SHOWGRAPHICS
+ ID_TASK_WORK_SHOWGRAPHICS
);
pGroup->m_Tasks.push_back( pItem );
pItem = new CTaskItem(
_("Show VM Console"),
_("Show VM Console in a window."),
- ID_TASK_WORK_VMCONSOLE
+ ID_TASK_WORK_VMCONSOLE
);
pGroup->m_Tasks.push_back( pItem );
pItem = new CTaskItem(
_("Suspend"),
_("Suspend work for this result."),
- ID_TASK_WORK_SUSPEND
+ ID_TASK_WORK_SUSPEND
);
pGroup->m_Tasks.push_back( pItem );
pItem = new CTaskItem(
_("Abort"),
_("Abandon work on the result. You will get no credit for it."),
- ID_TASK_WORK_ABORT
+ ID_TASK_WORK_ABORT
);
pGroup->m_Tasks.push_back( pItem );
pItem = new CTaskItem(
_("Properties"),
_("Show task details."),
- ID_TASK_SHOW_PROPERTIES
+ ID_TASK_SHOW_PROPERTIES
);
pGroup->m_Tasks.push_back( pItem );
@@ -424,7 +424,7 @@ wxString CViewWork::GetKeyValue2(int iRowIndex) {
// Column is hidden, so SynchronizeCacheItem() did not set its value
GetDocProjectURL(m_iSortedIndexes[iRowIndex], work->m_strProjectURL);
}
-
+
return work->m_strProjectURL;
}
@@ -639,7 +639,7 @@ void CViewWork::OnWorkAbort( wxCommandEvent& WXUNUSED(event) ) {
return;
}
strMessage.Printf(
- _("Are you sure you want to abort this task '%s'?\n(Progress: %s, Status: %s)"),
+ _("Are you sure you want to abort this task '%s'?\n(Progress: %s, Status: %s)"),
(work->m_strName).c_str(),
(work->m_strProgress).c_str(),
(work->m_strStatus).c_str()
@@ -666,7 +666,7 @@ void CViewWork::OnWorkAbort( wxCommandEvent& WXUNUSED(event) ) {
// Step through all selected items
row = m_pListPane->GetNextItem(row, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (row < 0) break;
-
+
RESULT* result = pDoc->result(m_iSortedIndexes[row]);
if (result) {
results_to_abort.push_back(result);
@@ -826,8 +826,8 @@ wxString CViewWork::OnListGetItemText(long item, long column) const {
strBuffer = work->m_strCPUTime;
break;
case COLUMN_PROGRESS:
- // CBOINCListCtrl::DrawProgressBars() will draw this using
- // data provided by GetProgressText() and GetProgressValue(),
+ // CBOINCListCtrl::DrawProgressBars() will draw this using
+ // data provided by GetProgressText() and GetProgressValue(),
// but we need it here for accessibility programs.
strBuffer = work->m_strProgress;
break;
@@ -1028,7 +1028,7 @@ void CViewWork::UpdateSelection() {
}
if (result->suspended_via_gui ||
- result->project_suspended_via_gui ||
+ result->project_suspended_via_gui ||
(result->scheduler_state != CPU_SCHED_SCHEDULED)
) {
if (!isGFXRunning) {
@@ -1040,7 +1040,7 @@ void CViewWork::UpdateSelection() {
if (
result->active_task_state == PROCESS_ABORT_PENDING ||
result->active_task_state == PROCESS_ABORTED ||
- result->state == RESULT_ABORTED
+ result->state == RESULT_ABORTED
) {
enableAbort = false;
}
@@ -1459,7 +1459,7 @@ double CViewWork::GetProgressValue(long item) {
wxString CViewWork::GetProgressText( long item) {
CWork* work = NULL;
wxString strBuffer = wxEmptyString;
-
+
if (GetWorkCacheAtIndex(work, m_iSortedIndexes[item])) {
strBuffer = wxEmptyString;
} else {
diff --git a/clientgui/WizardAttach.cpp b/clientgui/WizardAttach.cpp
index 8866a920552..a3184ce89c0 100644
--- a/clientgui/WizardAttach.cpp
+++ b/clientgui/WizardAttach.cpp
@@ -57,36 +57,36 @@
/*!
* CWizardAttach type definition
*/
-
+
IMPLEMENT_DYNAMIC_CLASS( CWizardAttach, CBOINCBaseWizard )
-
+
/*!
* CWizardAttach event table definition
*/
-
+
BEGIN_EVENT_TABLE( CWizardAttach, CBOINCBaseWizard )
////@begin CWizardAttach event table entries
EVT_WIZARDEX_FINISHED( ID_ATTACHWIZARD, CWizardAttach::OnFinished )
////@end CWizardAttach event table entries
END_EVENT_TABLE()
-
+
/*!
* CWizardAttach constructors
*/
-
+
CWizardAttach::CWizardAttach()
{
}
-
-CWizardAttach::CWizardAttach( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, long style )
+
+CWizardAttach::CWizardAttach( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, long style )
{
Create(parent, id, title, pos, style);
}
-
+
/*!
* CWizardAttach creator
*/
-
+
bool CWizardAttach::Create( wxWindow* parent, wxWindowID id, const wxString& /* title */, const wxPoint& pos, long style )
{
@@ -111,10 +111,10 @@ bool CWizardAttach::Create( wxWindow* parent, wxWindowID id, const wxString& /*
m_ErrProxyPage = NULL;
m_ErrUserDisagreesPage = NULL;
////@end CWizardAttach member initialisation
-
+
// Cancel Checking
m_bCancelInProgress = false;
-
+
// Wizard Detection
IsAttachToProjectWizard = true;
@@ -169,9 +169,9 @@ bool CWizardAttach::Create( wxWindow* parent, wxWindowID id, const wxString& /*
*/
void CWizardAttach::CreateControls()
-{
+{
wxLogTrace(wxT("Function Start/End"), wxT("CWizardAttach::CreateControls - Function Begin"));
-
+
////@begin CWizardAttach content construction
CWizardAttach* itemWizard1 = this;
@@ -251,14 +251,14 @@ void CWizardAttach::CreateControls()
wxLogTrace(wxT("Function Start/End"), wxT("CWizardAttach::CreateControls - Function End"));
}
-
+
/*!
* Runs the wizard.
*/
bool CWizardAttach::Run(
wxString strProjectName,
wxString strProjectURL,
- wxString strProjectAuthenticator,
+ wxString strProjectAuthenticator,
wxString strProjectInstitution,
wxString strProjectDescription,
wxString strProjectKnown,
@@ -318,10 +318,10 @@ bool CWizardAttach::SyncToAccountManager() {
} else {
SetTitle(pSkinAdvanced->GetApplicationName());
}
-
+
IsAttachToProjectWizard = false;
IsAccountManagerWizard = true;
-
+
pDoc->rpc.acct_mgr_info(ami);
@@ -351,16 +351,16 @@ bool CWizardAttach::SyncToAccountManager() {
/*!
* Should we show tooltips?
*/
-
+
bool CWizardAttach::ShowToolTips()
{
return TRUE;
}
-
+
/*!
* Get bitmap resources
*/
-
+
wxBitmap CWizardAttach::GetBitmapResource( const wxString& WXUNUSED(name) )
{
// Bitmap retrieval
@@ -368,11 +368,11 @@ wxBitmap CWizardAttach::GetBitmapResource( const wxString& WXUNUSED(name) )
return wxNullBitmap;
////@end CWizardAttach bitmap retrieval
}
-
+
/*!
* Get icon resources
*/
-
+
wxIcon CWizardAttach::GetIconResource( const wxString& WXUNUSED(name) )
{
// Icon retrieval
@@ -380,7 +380,7 @@ wxIcon CWizardAttach::GetIconResource( const wxString& WXUNUSED(name) )
return wxNullIcon;
////@end CWizardAttach icon retrieval
}
-
+
/*!
* Determine if the wizard page has a next page
*/
@@ -395,16 +395,16 @@ bool CWizardAttach::HasNextPage( wxWizardPageEx* page )
bNoNextPageDetected |= (page == m_ErrUnavailablePage);
bNoNextPageDetected |= (page == m_ErrNoInternetConnectionPage);
bNoNextPageDetected |= (page == m_ErrAlreadyExistsPage);
-
+
if (bNoNextPageDetected)
return false;
return true;
}
-
+
/*!
* Determine if the wizard page has a previous page
*/
-
+
bool CWizardAttach::HasPrevPage( wxWizardPageEx* page )
{
bool bNoPrevPageDetected = false;
@@ -429,55 +429,55 @@ wxWizardPageEx* CWizardAttach::TranslatePage(unsigned long ulPageID) {
if (ID_PROJECTINFOPAGE == ulPageID)
pPage = m_ProjectInfoPage;
-
+
if (ID_PROJECTPROPERTIESPAGE == ulPageID)
pPage = m_ProjectPropertiesPage;
-
+
if (ID_PROJECTPROCESSINGPAGE == ulPageID)
pPage = m_ProjectProcessingPage;
-
+
if (ID_PROJECTWELCOMEPAGE == ulPageID)
pPage = m_ProjectWelcomePage;
-
+
if (ID_ACCOUNTMANAGERINFOPAGE == ulPageID)
pPage = m_AccountManagerInfoPage;
-
+
if (ID_ACCOUNTMANAGERPROPERTIESPAGE == ulPageID)
pPage = m_AccountManagerPropertiesPage;
-
+
if (ID_ACCOUNTMANAGERPROCESSINGPAGE == ulPageID)
pPage = m_AccountManagerProcessingPage;
-
+
if (ID_TERMSOFUSEPAGE == ulPageID)
pPage = m_TermsOfUsePage;
-
+
if (ID_ACCOUNTINFOPAGE == ulPageID)
pPage = m_AccountInfoPage;
-
+
if (ID_COMPLETIONPAGE == ulPageID)
pPage = m_CompletionPage;
-
+
if (ID_COMPLETIONERRORPAGE == ulPageID)
pPage = m_CompletionErrorPage;
-
+
if (ID_ERRNOTDETECTEDPAGE == ulPageID)
pPage = m_ErrNotDetectedPage;
-
+
if (ID_ERRUNAVAILABLEPAGE == ulPageID)
pPage = m_ErrUnavailablePage;
-
+
if (ID_ERRNOINTERNETCONNECTIONPAGE == ulPageID)
pPage = m_ErrNoInternetConnectionPage;
-
+
if (ID_ERRNOTFOUNDPAGE == ulPageID)
pPage = m_ErrNotFoundPage;
-
+
if (ID_ERRALREADYEXISTSPAGE == ulPageID)
pPage = m_ErrAlreadyExistsPage;
-
+
if (ID_ERRPROXYINFOPAGE == ulPageID)
pPage = m_ErrProxyInfoPage;
-
+
if (ID_ERRPROXYPAGE == ulPageID)
pPage = m_ErrProxyPage;
@@ -569,7 +569,7 @@ void CWizardAttach::_ProcessCancelEvent( wxWizardExEvent& event ) {
m_bCancelInProgress = true;
int iRetVal = wxGetApp().SafeMessageBox(
- _("Do you really want to cancel?"),
+ _("Do you really want to cancel?"),
_("Question"),
wxICON_QUESTION | wxYES_NO,
this
diff --git a/clientgui/WizardAttach.h b/clientgui/WizardAttach.h
index 3c69ceef217..ca63ad3e9a2 100644
--- a/clientgui/WizardAttach.h
+++ b/clientgui/WizardAttach.h
@@ -176,10 +176,10 @@ struct PROJECT_INIT_STATUS;
//
#define PAGE_TRANSITION_NEXT(id) \
((CWizardAttach*)GetParent())->PushPageTransition((wxWizardPageEx*)this, id)
-
+
#define PAGE_TRANSITION_BACK \
((CWizardAttach*)GetParent())->PopPageTransition()
-
+
#define PROCESS_CANCELEVENT(event) \
((CWizardAttach*)GetParent())->ProcessCancelEvent(event)
@@ -192,7 +192,7 @@ struct PROJECT_INIT_STATUS;
*/
class CWizardAttach: public CBOINCBaseWizard
-{
+{
DECLARE_DYNAMIC_CLASS( CWizardAttach )
DECLARE_EVENT_TABLE()
@@ -225,14 +225,14 @@ class CWizardAttach: public CBOINCBaseWizard
bool Run(
wxString strProjectName,
wxString strProjectURL,
- wxString strProjectAuthenticator,
+ wxString strProjectAuthenticator,
wxString strProjectInstitution,
wxString strProjectDescription,
wxString strProjectKnown,
bool bAccountKeyDetected,
bool bEmbedded
);
-
+
/// Synchronize to Account Manager
bool SyncToAccountManager();
diff --git a/clientgui/_wx_intellisense.h b/clientgui/_wx_intellisense.h
index 1913071f192..1eb1682e710 100644
--- a/clientgui/_wx_intellisense.h
+++ b/clientgui/_wx_intellisense.h
@@ -4,7 +4,7 @@
*
* It needs to be opened once to create the *.ncb file.
* You can close this file now.
- *
+ *
* NOTE: To enable intellisense for your other projects, copy this file to the project
* and include it in your workspace. Then open the file and close it again to give
* Visual Studio the opportunity to parse the file and add its contents to intellisense.
diff --git a/clientgui/common/wxPieCtrl.cpp b/clientgui/common/wxPieCtrl.cpp
index 46d9bad8213..70379257ce7 100644
--- a/clientgui/common/wxPieCtrl.cpp
+++ b/clientgui/common/wxPieCtrl.cpp
@@ -122,14 +122,14 @@ wxColour wxPieCtrl::GetBackColour() {
}
/* event handlers */
-/* handles mouse motion events to show tooltips
+/* handles mouse motion events to show tooltips
for some (unkown) reason under X no tooltips are displayed
*/
void wxPieCtrl::OnMouseMove(wxMouseEvent& ev) {
//get the pie part, over which the mouse pointer is
int piepart = GetCoveredPiePart(ev.GetX(),ev.GetY());
//part identified
- if(piepart >=0) {
+ if(piepart >=0) {
//prevent tooltip flicker
if(piepart != m_lastCoveredPart) {
wxString tooltip = this->m_Series[piepart].GetLabel();
@@ -140,8 +140,8 @@ void wxPieCtrl::OnMouseMove(wxMouseEvent& ev) {
else {
this->SetToolTip(wxEmptyString);
m_lastCoveredPart=-1;
- }
- ev.Skip();
+ }
+ ev.Skip();
}
void wxPieCtrl::OnSize(wxSizeEvent & /*event*/)
@@ -213,7 +213,7 @@ void wxPieCtrl::GetPartAngles(wxArrayDouble & angles)
{
current += m_Series[i].GetValue();
angles.Add(360 * (double)current / (double)total);
- }
+ }
}
#define MINANGLE 2
@@ -227,9 +227,9 @@ void wxPieCtrl::DrawParts(wxRect& pieRect)
if(m_ShowEdges) {
m_CanvasDC.SetPen(*wxBLACK_PEN);
}
-
+
intAngles.clear();
-
+
if(m_Series.Count() == 1)
{
m_CanvasDC.SetBrush(wxBrush(m_Series[0].GetColour()));
@@ -241,7 +241,7 @@ void wxPieCtrl::DrawParts(wxRect& pieRect)
}
else {
GetPartAngles(angles);
-
+
if (angles.Count() > 1) {
// Try to adjust angles so each segment is visible
for(i = 0; i < angles.Count(); i++) {
@@ -254,7 +254,7 @@ void wxPieCtrl::DrawParts(wxRect& pieRect)
}
}
}
-
+
// If we expanded last segment past 360, go back and fix it
if (intAngles[angles.Count()-1] > 360) {
intAngles[angles.Count()-1] = 360;
@@ -268,7 +268,7 @@ void wxPieCtrl::DrawParts(wxRect& pieRect)
}
}
}
-
+
for(i = 0; i < angles.Count(); i++)
{
if(i > 0)
@@ -288,7 +288,7 @@ void wxPieCtrl::DrawParts(wxRect& pieRect)
#else
t1 = intAngles[i-1];
t2 = intAngles[i];
-#endif
+#endif
if(t1 != t2) {
m_CanvasDC.DrawEllipticArc(pieRect.GetLeft(),
pieRect.GetTop(),
@@ -308,7 +308,7 @@ void wxPieCtrl::DrawLegend(int left, int top)
int dy(m_LegendVerBorder),tw,th=0,titlew,titleh;
int totalNumLabels = (int)m_Series.Count();
int vertSpaceForLabels,maxVisibleLabels,lastLabelToDraw,numSteps;
-
+
// First determine the size of the legend box
m_CanvasDC.SetFont(m_TitleFont);
m_CanvasDC.GetTextExtent(m_szTitle,&titlew,&titleh);
@@ -352,11 +352,11 @@ void wxPieCtrl::DrawLegend(int left, int top)
lastLabelToDraw = totalNumLabels - 1;
m_firstlabelToDraw = totalNumLabels - maxVisibleLabels;
}
-
+
m_scrollBar->SetScrollbar(m_firstlabelToDraw, 1, numSteps, 1);
m_scrollBar->Show((maxVisibleLabels > 0));
}
-
+
// Now draw the legend title
dy = m_LegendVerBorder+titleh+5;
m_CanvasDC.SetFont(m_TitleFont);
@@ -365,7 +365,7 @@ void wxPieCtrl::DrawLegend(int left, int top)
dy += 5;
// Draw the legend items
m_CanvasDC.SetFont(m_LabelFont);
-
+
m_CanvasDC.SetTextForeground(m_LabelColour);
for(i = m_firstlabelToDraw; i <= lastLabelToDraw; i++)
{
diff --git a/clientgui/common/wxPieCtrl.h b/clientgui/common/wxPieCtrl.h
index 78fcb3071be..c42a61e25da 100644
--- a/clientgui/common/wxPieCtrl.h
+++ b/clientgui/common/wxPieCtrl.h
@@ -87,9 +87,9 @@ using wxWindow::SetTransparent;
wxScrollBar* m_scrollBar;
int m_Scrollbar_width;
int m_firstlabelToDraw;
-
+
//internal methods
- void GetPartAngles(wxArrayDouble & angles);
+ void GetPartAngles(wxArrayDouble & angles);
void RecreateCanvas();
int GetCoveredPiePart(int x,int y);
void DrawParts(wxRect& pieRect);
@@ -103,7 +103,7 @@ using wxWindow::SetTransparent;
wxSize sz = wxDefaultSize, long style = 0, wxString name = wxT("wxPieCtrl"));
~wxPieCtrl();
-
+
wxColour GetBackColour();
void SetBackColour(wxColour colour);
@@ -140,7 +140,7 @@ using wxWindow::SetTransparent;
void SetLegendBackColour(wxColour colour);
void SetLabel(const wxString& label);
-
+
DECLARE_EVENT_TABLE()
void OnPaint(wxPaintEvent & event);
@@ -148,13 +148,13 @@ using wxWindow::SetTransparent;
void OnMouseMove(wxMouseEvent& ev);
void OnEraseBackground(wxEraseEvent & /*event*/);
void OnLegendScroll(wxScrollEvent& event);
-
+
#ifdef __WXMAC__
private:
void SetupMacAccessibilitySupport();
void ResizeMacAccessibilitySupport();
void RemoveMacAccessibilitySupport();
-
+
void* m_fauxResourcesView;
#endif
diff --git a/clientgui/gtk/taskbarex.h b/clientgui/gtk/taskbarex.h
index dc8189db70f..0dbf6a35947 100644
--- a/clientgui/gtk/taskbarex.h
+++ b/clientgui/gtk/taskbarex.h
@@ -17,7 +17,7 @@
#define _TASKBAREX_H_
// ----------------------------------------------------------------------------
-// wxTaskBarIconEx Balloon Types
+// wxTaskBarIconEx Balloon Types
// ----------------------------------------------------------------------------
#define BALLOONTYPE_INFO 0x00000001
@@ -25,7 +25,7 @@
#define BALLOONTYPE_ERROR 0x00000003
// ----------------------------------------------------------------------------
-// wxTaskBarIconEx
+// wxTaskBarIconEx
// ----------------------------------------------------------------------------
class wxTaskBarIconExEvent;
@@ -58,14 +58,14 @@ class wxTaskBarIconEx: public wxEvtHandler
);
virtual bool SetBalloon(
- const wxIcon& icon,
+ const wxIcon& icon,
const wxString title = wxEmptyString,
const wxString message = wxEmptyString,
unsigned int iconballoon = BALLOONTYPE_INFO
);
virtual bool QueueBalloon(
- const wxIcon& icon,
+ const wxIcon& icon,
const wxString title = wxEmptyString,
const wxString message = wxEmptyString,
unsigned int iconballoon = BALLOONTYPE_INFO
diff --git a/clientgui/mac/BOINCGUIApp.mm b/clientgui/mac/BOINCGUIApp.mm
index 9656811679c..160f59772f6 100644
--- a/clientgui/mac/BOINCGUIApp.mm
+++ b/clientgui/mac/BOINCGUIApp.mm
@@ -32,17 +32,17 @@
// Cocoa routines which are part of CBOINCGUIApp
// Override standard wxCocoa wxApp::CallOnInit() to allow Manager
-// to run properly when launched hidden on login via Login Item.
+// to run properly when launched hidden on login via Login Item.
bool CBOINCGUIApp::CallOnInit() {
NSAutoreleasePool *mypool = [[NSAutoreleasePool alloc] init];
NSEvent *event = [NSEvent otherEventWithType:NSEventTypeApplicationDefined
- location:NSMakePoint(0.0, 0.0)
- modifierFlags:0
- timestamp:0
- windowNumber:0
+ location:NSMakePoint(0.0, 0.0)
+ modifierFlags:0
+ timestamp:0
+ windowNumber:0
context:nil
- subtype:0 data1:0 data2:0];
+ subtype:0 data1:0 data2:0];
[NSApp postEvent:event atStart:FALSE];
bool retVal = wxApp::CallOnInit();
@@ -53,14 +53,14 @@
#endif
-// Our application can get into a strange state
+// Our application can get into a strange state
// if our login item launched it hidden and the
// first time the user "opens" it he either
// double-clicks on our Finder icon or uses
// command-tab. It becomes the frontmost
// application (with its menu in the menubar)
// but the windows remain hidden, and it does
-// not receive an activate event, so we must
+// not receive an activate event, so we must
// handle this case by polling.
//
// We can stop the polling after the windows
@@ -72,13 +72,13 @@
//
void CBOINCGUIApp::CheckPartialActivation() {
// This code is not needed and has bad effects on OS 10.5.
- // Initializing wasHidden this way avoids the problem
+ // Initializing wasHidden this way avoids the problem
// because we are briefly shown at login on OS 10.5.
static bool wasHidden = [ NSApp isHidden ];
-
+
if (wasHidden) {
if (m_bAboutDialogIsOpen) return;
-
+
if (! [ NSApp isHidden ]) {
wasHidden = false;
ShowInterface();
@@ -99,7 +99,7 @@
NSTimeInterval ageOfFile = -[fileLastModifiedDate timeIntervalSinceNow];
return (ageOfFile > upTime);
}
-
+
return false;
}
@@ -116,7 +116,7 @@
///
/// @return
/// true if the current process is visible, otherwise false.
-///
+///
bool CBOINCGUIApp::IsApplicationVisible() {
return (! [ NSApp isHidden ]);
}
@@ -156,7 +156,7 @@
#define NSWindowStyleMaskTitled NSTitledWindowMask
#endif
-// Returns true if at least a 5 X 5 pixel area of the
+// Returns true if at least a 5 X 5 pixel area of the
// window's title bar is entirely on the displays
// Note: Arguments are wxWidgets / Quickdraw-style coordinates
// (y=0 at top) but NSScreen coordinates have y=0 at bottom
@@ -202,7 +202,7 @@ OSErr QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEvent* reply, UInt
pid_t senderPid;
OSStatus anErr;
- // Refuse to quit if a modal dialog is open.
+ // Refuse to quit if a modal dialog is open.
// Unfortunately, I know of no way to disable the Quit item in our Dock menu
if (wxGetApp().IsModalDialogDisplayed()) {
NSBeep();
@@ -223,7 +223,7 @@ OSErr QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEvent* reply, UInt
}
}
}
-
+
wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, wxID_EXIT);
wxGetApp().GetFrame()->GetEventHandler()->AddPendingEvent(evt);
return noErr;
diff --git a/clientgui/mac/MacAccessiblity.h b/clientgui/mac/MacAccessiblity.h
index d835d49f7d7..7594941e605 100644
--- a/clientgui/mac/MacAccessiblity.h
+++ b/clientgui/mac/MacAccessiblity.h
@@ -17,8 +17,8 @@
// macAccessiblity.h
-#ifndef _MACACCESSIBILITY_H_
-#define _MACACCESSIBILITY_H_
+#ifndef _MACACCESSIBILITY_H_
+#define _MACACCESSIBILITY_H_
#include "BOINCBaseView.h"
#include "DlgEventLog.h"
@@ -35,4 +35,4 @@ typedef struct {
void AccessibilityIgnoreAllChildren(HIViewRef parent, int recursionLevel);
-#endif
\ No newline at end of file
+#endif
diff --git a/clientgui/mac/MacAccessiblity.mm b/clientgui/mac/MacAccessiblity.mm
index b83cc3ea630..e18252ce55a 100644
--- a/clientgui/mac/MacAccessiblity.mm
+++ b/clientgui/mac/MacAccessiblity.mm
@@ -229,10 +229,10 @@ - (id)accessibilityAttributeValue:(NSString *)attribute {
} else if ([attribute isEqualToString:NSAccessibilityWindowAttribute]) {
return [listControlView window];
-
+
} else if ([attribute isEqualToString:NSAccessibilityTopLevelUIElementAttribute]) {
return [listControlView window];
-
+
} else if ([attribute isEqualToString:NSAccessibilityDescriptionAttribute]) {
NSString *desc;
wxString s;
@@ -283,7 +283,7 @@ - (id)accessibilityAttributeValue:(NSString *)attribute {
sz.height = r.height;
}
return [NSValue valueWithSize:sz];
-
+
} else if ([attribute isEqualToString:NSAccessibilityPositionAttribute]) {
int i, xoff, yoff;
NSPoint pt;
@@ -306,9 +306,9 @@ - (id)accessibilityAttributeValue:(NSString *)attribute {
//Convert the point to global (screen) coordinates
NSPoint windowPoint = [listControlView convertPoint:pt toView: nil];
pt = [[listControlView window] convertBaseToScreen:windowPoint];
-
+
return [NSValue valueWithPoint:pt];
-
+
} else if ([attribute isEqualToString:NSAccessibilityTitleAttribute]) {
wxString str;
if (isHeader) {
@@ -340,7 +340,7 @@ - (id)accessibilityAttributeValue:(NSString *)attribute {
} else if ([attribute isEqualToString:NSAccessibilitySubroleAttribute]) {
return NSAccessibilitySortButtonSubrole;
-
+
} else if ([attribute isEqualToString:NSAccessibilitySortDirectionAttribute]) {
if (col == BOINCView->m_iColumnIDToColumnIndex[BOINCView->m_iSortColumnID]) {
return BOINCView->m_bReverseSort ?
@@ -481,7 +481,7 @@ - (id)accessibilityHitTest:(NSPoint)point {
int col, numCols, x = 0, yoff;
pList->CalcScrolledPosition(0, 0, &x, &yoff);
-
+
numCols = pList->GetColumnCount();
for (col=0; colCalcUnscrolledPosition(0, 0, &xoff, &yoff);
int leftVisiblePos = xoff; // Horizontal scrolled offset in pixels
int rightVisiblePos = leftVisiblePos + w;
-
+
NSInteger i, cellLeftEdge = 0, cellRightEdge;
NSMutableArray *visibleChildren = [NSMutableArray array];
@@ -673,7 +673,7 @@ - (id)accessibilityAttributeValue:(NSString *)attribute {
} else if ((leftVisiblePos > cellLeftEdge) && (rightVisiblePos < cellRightEdge)) {
isVisible = YES; // Visible area of row is totally within cell
}
-
+
if (isVisible) {
#if RETAIN_KIDS_OF_ROWS
[visibleChildren addObject:[kids objectAtIndex:i] ];
@@ -683,10 +683,10 @@ - (id)accessibilityAttributeValue:(NSString *)attribute {
[visibleChildren addObject:cell];
#endif
}
-
+
cellLeftEdge = cellRightEdge;
}
-
+
return visibleChildren;
} else if ([attribute isEqualToString:NSAccessibilityWindowAttribute]) {
@@ -694,7 +694,7 @@ - (id)accessibilityAttributeValue:(NSString *)attribute {
} else if ([attribute isEqualToString:NSAccessibilityIndexAttribute]) {
return [NSNumber numberWithInt:row];
-
+
} else if ([attribute isEqualToString:NSAccessibilitySelectedAttribute]) {
BOOL isSelected = pList->GetItemState(row, wxLIST_STATE_SELECTED) & wxLIST_STATE_SELECTED;
return [NSNumber numberWithBool:isSelected];
@@ -779,7 +779,7 @@ - (id)accessibilityHitTest:(NSPoint)point {
id item;
[self adjustKidsIfNeeded];
-
+
NSPoint windowPoint;
#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1070
//convertRectFromScreen is not available before OS 10.7
@@ -825,19 +825,19 @@ - (id)accessibilityHitTest:(NSPoint)point {
if (numkids <= (firstVisibleRow + numVisibleRows)) {
numVisibleRows = numkids - firstVisibleRow;
}
- // This allows for an additional partially visible row
+ // This allows for an additional partially visible row
NSInteger lastVisibleRow = firstVisibleRow + numVisibleRows;
if (lastVisibleRow > (numkids - 1)) {
lastVisibleRow = (numkids - 1);
}
-
+
for (rowNumber = firstVisibleRow; rowNumber <= lastVisibleRow; ++rowNumber) {
NSRect r;
r = [parent bounds];
r.origin.x = 0;
r.size.width = wxcr.width;
r.size.height = wxcr.height;
-
+
wxRect wxr;
pList->GetItemRect(rowNumber, wxr);
r.origin.y = wxr.y;
@@ -861,7 +861,7 @@ - (id)accessibilityHitTest:(NSPoint)point {
- (void)adjustKidsIfNeeded {
NSInteger i, newNumKids;
newNumKids = pList->GetItemCount(); // Number of rows
-
+
if (kids == nil) {
kids = [[NSMutableArray arrayWithCapacity:newNumKids] retain];
}
@@ -927,19 +927,19 @@ - (id)accessibilityAttributeValue:(NSString *)attribute {
} else if ([attribute isEqualToString:NSAccessibilityFocusedAttribute]) {
return [NSNumber numberWithBool:NO];
-
+
} else if ([attribute isEqualToString:NSAccessibilityParentAttribute]) {
return NSAccessibilityUnignoredAncestor(parent);
} else if ([attribute isEqualToString:NSAccessibilityWindowAttribute]) {
// We're in the same window as our parent.
return [parent window];
-
+
} else if ([attribute isEqualToString:NSAccessibilityTopLevelUIElementAttribute]) {
return [parent window];
-
+
} else if ([attribute isEqualToString:NSAccessibilityDescriptionAttribute]) {
- // To allow localization, we can't just append string
+ // To allow localization, we can't just append string
// " is empty" because that assumes English word order.
wxString s;
if (isEventLog) {
@@ -961,16 +961,16 @@ - (id)accessibilityAttributeValue:(NSString *)attribute {
} else if ([attribute isEqualToString:NSAccessibilitySizeAttribute]) {
return [NSValue valueWithSize:[parent frame].size];
-
+
} else if ([attribute isEqualToString:NSAccessibilityPositionAttribute]) {
NSPoint pt = [parent bounds].origin;
pt.y += [parent bounds].size.height; // We need the bottom left corner
//Convert the point to global (screen) coordinates
NSPoint windowPoint = [parent convertPoint:pt toView: nil];
pt = [[parent window] convertBaseToScreen:windowPoint];
-
+
return [NSValue valueWithPoint:pt];
-
+
} else if ([attribute isEqualToString:NSAccessibilityChildrenAttribute]) {
[self adjustKidsIfNeeded];
return kids;
@@ -991,7 +991,7 @@ - (id)accessibilityAttributeValue:(NSString *)attribute {
for (i = 0; i < numVisibleKids; ++i) {
[visibleChildren addObject:[kids objectAtIndex:i+firstVisibleKid] ];
}
-
+
return visibleChildren;
} else if ([attribute isEqualToString:NSAccessibilitySelectedChildrenAttribute] ||
@@ -1005,10 +1005,10 @@ - (id)accessibilityAttributeValue:(NSString *)attribute {
[selectedChildren addObject:[kids objectAtIndex:i] ];
}
return selectedChildren;
-
+
} else if ([attribute isEqualToString:NSAccessibilityOrientationAttribute]) {
return NSAccessibilityVerticalOrientationValue;
-
+
} else {
return [super accessibilityAttributeValue:attribute];
}
@@ -1095,23 +1095,23 @@ - (BOOL)isFlipped {
static BOOL AccessibilityEnabled = false;
- (NSView *)hitTest:(NSPoint)aPoint {
- // [NSThread callStackSymbols] is not available in OS 10.5, so
+ // [NSThread callStackSymbols] is not available in OS 10.5, so
// BOINC does not fully implement accessibility under OS 10.5.
//
- // Weak linking of objective-C classes and methods is not
+ // Weak linking of objective-C classes and methods is not
// supported before OS 10.6.8 so to be compatible with
// OS 10.5 we must test availability at run time.
//
static BOOL firstTime = true;
static BOOL haveMethod = false;
-
+
if (AccessibilityEnabled) {
if (firstTime) {
IMP callStackSyms = class_getMethodImplementation(objc_getClass("NSThread"), @selector(callStackSymbols));
haveMethod = (callStackSyms != nil);
firstTime = false;
}
-
+
if (!haveMethod) {
return [super hitTest:aPoint];
}
@@ -1124,7 +1124,7 @@ - (NSView *)hitTest:(NSPoint)aPoint {
// NSArray *theStack = [NSThread callStackSymbols];
NSArray *theStack = [ NSThread performSelector:@selector(callStackSymbols) ];
-
+
int limit = [ theStack count ];
int i = 0;
do {
@@ -1144,7 +1144,7 @@ - (NSView *)hitTest:(NSPoint)aPoint {
++i;
} while (i < 15);
}
-
+
return [super hitTest:aPoint]; // Not an accessibility call
}
@@ -1172,7 +1172,7 @@ - (id)accessibilityHitTest:(NSPoint)point {
}
NSPoint localPoint = [parent convertPoint:windowPoint fromView:nil];
-
+
// The scroll bars are among the list control's subviews.
// If we are outside the list control's client area, determine
// which scroll bar we are over and return the info for it.
@@ -1195,7 +1195,7 @@ - (id)accessibilityHitTest:(NSPoint)point {
if (kids) {
int col, numCols, x = 0, yoff;
pList->CalcScrolledPosition(0, 0, &x, &yoff);
-
+
numCols = pList->GetColumnCount();
for (col=0; colGetColumnCount();
@@ -1298,7 +1298,7 @@ - (id)accessibilityAttributeValue:(NSString *)attribute {
[kids addObject:cell];
}
}
-
+
return kids;
// return NSAccessibilityUnignoredChildren(kids); // No children are ignored
@@ -1345,7 +1345,7 @@ - (void)dealloc {
rb.size.height -= ((wxWindow *)m_headerWin)->GetSize().y;
[fauxBodyView initWithFrame:rb listCtrl:this listFlags:(isEventLogFlag) parent:listControlView BOINCView:nil];
[listControlView addSubview:fauxBodyView ];
-
+
m_fauxHeaderView = fauxHeaderView;
m_fauxBodyView = fauxBodyView;
}
@@ -1362,7 +1362,7 @@ - (void)dealloc {
rh.size.height = ((wxWindow *)m_headerWin)->GetSize().y;
[fauxHeaderView setFrame:rh];
}
-
+
if (fauxBodyView) {
NSRect rb = r;
rb.origin.y += ((wxWindow *)m_headerWin)->GetSize().y;
@@ -1370,7 +1370,7 @@ - (void)dealloc {
wxString s = wxEmptyString;
[fauxBodyView setFrame:rb];
}
-
+
event.Skip();
}
@@ -1410,7 +1410,7 @@ - (void)dealloc {
rb.size.height -= ((wxWindow *)m_headerWin)->GetSize().y;
[fauxBodyView initWithFrame:rb listCtrl:this listFlags:0 parent:listControlView BOINCView:m_pParentView];
[listControlView addSubview:fauxBodyView ];
-
+
m_fauxHeaderView = fauxHeaderView;
m_fauxBodyView = fauxBodyView;
}
@@ -1427,7 +1427,7 @@ - (void)dealloc {
rh.size.height = ((wxWindow *)m_headerWin)->GetSize().y;
[fauxHeaderView setFrame:rh];
}
-
+
if (fauxBodyView) {
NSRect rb = r;
rb.origin.y += ((wxWindow *)m_headerWin)->GetSize().y;
@@ -1435,7 +1435,7 @@ - (void)dealloc {
wxString s = wxEmptyString;
[fauxBodyView setFrame:rb];
}
-
+
event.Skip();
}
@@ -1486,7 +1486,7 @@ - (BOOL)accessibilityIsIgnored {
- (NSString*) getValue {
wxString s;
-
+
switch (viewPage) {
case statisticsPage:
s = _("This panel contains graphs showing user totals for projects");
@@ -1496,7 +1496,7 @@ - (NSString*) getValue {
wxPieCtrl* pPieCtrl = (wxPieCtrl*)theClass;
s = pPieCtrl->GetLabel();
unsigned int i;
-
+
for(i=0; im_Series.Count(); i++) {
s += wxT("; ");
s += pPieCtrl->m_Series[i].GetLabel();
@@ -1557,12 +1557,12 @@ - (id)accessibilityAttributeValue:(NSString *)attribute {
// NSPoint windowPoint = [self convertPoint:pt toView: nil];
NSPoint windowPoint = [parent convertPoint:pt toView: nil];
pt = [[parent window] convertBaseToScreen:windowPoint];
-
+
return [NSValue valueWithPoint:pt];
} else if ([attribute isEqualToString:NSAccessibilityRoleAttribute]) {
return NSAccessibilityStaticTextRole;
-
+
} else if ([attribute isEqualToString:NSAccessibilityRoleDescriptionAttribute]) {
return NSAccessibilityRoleDescription(NSAccessibilityStaticTextRole, nil);
@@ -1584,14 +1584,14 @@ - (id)accessibilityAttributeValue:(NSString *)attribute {
} else if ([attribute isEqualToString:NSAccessibilitySizeAttribute]) {
return [NSValue valueWithSize:[self frame].size];
-
+
} else if ([attribute isEqualToString:NSAccessibilityTopLevelUIElementAttribute]) {
return [parent window];
-
+
} else if ([attribute isEqualToString:NSAccessibilityWindowAttribute]) {
// We're in the same window as our parent.
return [parent window];
-
+
} else {
return [super accessibilityAttributeValue:attribute];
}
diff --git a/clientgui/mac/MacBitmapComboBox.cpp b/clientgui/mac/MacBitmapComboBox.cpp
index bbf5bd44659..defd6383d15 100644
--- a/clientgui/mac/MacBitmapComboBox.cpp
+++ b/clientgui/mac/MacBitmapComboBox.cpp
@@ -18,7 +18,7 @@
// On Macintosh we use only native controls in Simple View so the macOS
// automatically provides accessibility support. Though wxBitmapComboBox
-// does not use MacOS native controls, wxChoice uses NSPopUpButton, so
+// does not use MacOS native controls, wxChoice uses NSPopUpButton, so
// we create our own BitmapComboBox on Macintosh based on wxChoice, which
// we have hacked to allow adding bitmaps.
//
@@ -41,7 +41,7 @@ END_EVENT_TABLE()
CBOINCBitmapChoice::CBOINCBitmapChoice() {}
CBOINCBitmapChoice::CBOINCBitmapChoice(wxWindow *parent, wxWindowID id,
- const wxString& value,
+ const wxString& value,
const wxPoint& pos,
const wxSize& size,
int n, const wxString choices[],
@@ -84,7 +84,7 @@ END_EVENT_TABLE()
CBOINCBitmapComboBox::CBOINCBitmapComboBox() {}
CBOINCBitmapComboBox::CBOINCBitmapComboBox(wxWindow *parent, wxWindowID id,
- const wxString& value,
+ const wxString& value,
const wxPoint& pos,
const wxSize& size,
int n, const wxString choices[],
@@ -138,7 +138,7 @@ void CBOINCBitmapComboBox::SetItemBitmap(unsigned int n, const wxBitmap& bitmap)
m_BitmapCache.at(n) = *bm;
delete bm;
}
-
+
m_ChoiceControl->SetItemBitmap(n, bitmap);
if (n == (unsigned int)m_ChoiceControl->GetSelection()) {
Refresh();
@@ -162,7 +162,7 @@ int CBOINCBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap) {
if (m_bHaveLargeBitmaps) {
m_BitmapCache.push_back(bitmap);
}
-
+
int n = m_ChoiceControl->Append(item);
SetItemBitmap(n, bitmap);
return n;
@@ -200,7 +200,7 @@ int CBOINCBitmapComboBox::Insert(const wxString& item, const wxBitmap& bitmap, u
m_BitmapCache.insert(insertionPoint + pos, *bm);
delete bm;
}
-
+
int n = m_ChoiceControl->Insert(item, pos, clientData);
SetItemBitmap(n, bitmap);
return n;
@@ -213,7 +213,7 @@ void CBOINCBitmapComboBox::Delete(unsigned int n) {
std::vector::iterator deletionPoint = m_BitmapCache.begin();
m_BitmapCache.erase(deletionPoint + n);
}
-
+
m_ChoiceControl->Delete(n);
Refresh();
}
@@ -248,7 +248,7 @@ void CBOINCBitmapComboBox::DrawLargeBitmap(CDrawLargeBitmapEvent&) {
wxPen oldPen = myDC.GetPen();
wxBrush oldBrush = myDC.GetBrush();
int oldMode = myDC.GetBackgroundMode();
-
+
myDC.SetPen(*wxTRANSPARENT_PEN);
myDC.SetBrush(*wxWHITE_BRUSH);
myDC.SetBackgroundMode(wxSOLID);
@@ -284,8 +284,8 @@ void CBOINCBitmapComboBox::OnPaint(wxPaintEvent& event) {
GetSize(&x, &y);
myDC.DrawRectangle(7, 0, y+1, y);
-
- // Restore Mode, Pen and Brush
+
+ // Restore Mode, Pen and Brush
myDC.SetBackgroundMode(oldMode);
myDC.SetPen(oldPen);
myDC.SetBrush(oldBrush);
@@ -300,7 +300,7 @@ void CBOINCBitmapComboBox::OnPaint(wxPaintEvent& event) {
void CBOINCBitmapComboBox::EmptyBitmapCache() {
#if 0
unsigned int i, cacheSize;
-
+
cacheSize = m_BitmapCache.size();
for (i=0; i
#import
-// Weak linking of objective-C classes is not supported before
+// Weak linking of objective-C classes is not supported before
// OS 10.6.8 so to be compatible with OS 10.5 we must use the
// objective-C equivalent of dlopen() and dlsym().
static Class NSUserNotificationClass = nil;
@@ -70,16 +70,16 @@ - (void) userNotificationCenter:(NSUserNotificationCenter *)center didActivateNo
bool CTaskBarIcon::IsBalloonsSupported() {
if ((NSUserNotificationClass != nil) && (NSUserNotificationCenterClass != nil)) return true;
-
+
NSBundle *bundle = [NSBundle bundleWithPath:@"/System/Library/Frameworks/Foundation.framework"];
NSError *err = nil;
bool loaded = [bundle loadAndReturnError:&err];
if (!loaded) return false;
-
+
NSUserNotificationClass = NSClassFromString(@"NSUserNotification");
if (NSUserNotificationClass == nil) return false;
-
+
NSUserNotificationCenterClass = NSClassFromString(@"NSUserNotificationCenter");
return (NSUserNotificationCenterClass != nil);
}
@@ -94,11 +94,11 @@ - (void) userNotificationCenter:(NSUserNotificationCenter *)center didActivateNo
) {
if (!IsBalloonsSupported())return false;
-
+
if (MacNotificationClass == nil) {
MacNotificationClass = [MacNotification alloc];
}
-
+
if (MacNotificationClass) {
char *utf8Title = (char *)(title.utf8_str().data());
NSString *theTitle = [[NSString alloc] initWithUTF8String:utf8Title];
@@ -108,13 +108,13 @@ - (void) userNotificationCenter:(NSUserNotificationCenter *)center didActivateNo
[MacNotificationClass showNewNoticesNotification:theTitle withMessage:theMessage];
}
-
+
return false;
}
-// wxTopLevel::RequestUserAttention() doesn't have an API to cancel
+// wxTopLevel::RequestUserAttention() doesn't have an API to cancel
// after a timeout, so we must call Notification Manager directly on Mac
void CTaskBarIcon::MacRequestUserAttention() {
m_pNotificationRequest = [NSApp requestUserAttention:NSInformationalRequest];
@@ -131,7 +131,7 @@ - (void) userNotificationCenter:(NSUserNotificationCenter *)center didActivateNo
int CTaskBarIcon::SetDockBadge(wxBitmap* bmp) {
// Reset to standard Dock tile (no badge)
[NSApp setApplicationIconImage:nil];
-
+
if (bmp == NULL) {
return 0;
}
diff --git a/clientgui/mac/Mac_GUI.cpp b/clientgui/mac/Mac_GUI.cpp
index f8e671bc4e6..dfaa7480f5c 100644
--- a/clientgui/mac/Mac_GUI.cpp
+++ b/clientgui/mac/Mac_GUI.cpp
@@ -41,12 +41,12 @@ void ThisDummyRoutineIsNeverCalled() {
/* End items to include "BOINC Manager" Mac menu items in localization templates */
-// Determine if the currently logged-in user is authorized to
-// perform operations which have potential security risks.
+// Determine if the currently logged-in user is authorized to
+// perform operations which have potential security risks.
// An example is "Attach to Project", where a dishonest user might
-// attach to a rogue project which could then read private files
-// belonging to the user who owns the BOINC application. This
-// would be possible because the BOINC Manager runs with the
+// attach to a rogue project which could then read private files
+// belonging to the user who owns the BOINC application. This
+// would be possible because the BOINC Manager runs with the
// effective user ID of its owner on the Mac.
Boolean Mac_Authorize()
@@ -57,10 +57,10 @@ Boolean Mac_Authorize()
AuthorizationFlags ourAuthFlags;
AuthorizationItem ourAuthItem[1];
OSStatus err = noErr;
-
+
if (sIsAuthorized)
return true;
-
+
// User is not the owner, so require admin authentication
ourAuthItem[0].name = kAuthorizationRightExecute;
ourAuthItem[0].value = NULL;
@@ -69,17 +69,17 @@ Boolean Mac_Authorize()
ourAuthRights.count = 1;
ourAuthRights.items = ourAuthItem;
-
+
ourAuthFlags = kAuthorizationFlagInteractionAllowed | kAuthorizationFlagExtendRights;
err = AuthorizationCreate (&ourAuthRights, kAuthorizationEmptyEnvironment, ourAuthFlags, &ourAuthRef);
if (err == noErr) {
sIsAuthorized = true;
- // We have authenticated user's credentials; we won't actually use the
+ // We have authenticated user's credentials; we won't actually use the
// privileges / rights so destroy / discard them.
err = AuthorizationFree(ourAuthRef, kAuthorizationFlagDestroyRights);
}
-
+
return sIsAuthorized;
}
diff --git a/clientgui/mac/SecurityUtility.cpp b/clientgui/mac/SecurityUtility.cpp
index 3d74a496b02..d9e38065f40 100644
--- a/clientgui/mac/SecurityUtility.cpp
+++ b/clientgui/mac/SecurityUtility.cpp
@@ -39,7 +39,7 @@ int main(int argc, char *argv[]) {
printf("Branding array has too few entries: %s\n", boincPath);
return -1;
}
-
+
err = CreateBOINCUsersAndGroups();
if (err != noErr)
return err;
@@ -47,7 +47,7 @@ int main(int argc, char *argv[]) {
err = AddAdminUserToGroups(getenv("USER"));
if (err != noErr)
return err;
-
+
boincPath[0] = 0;
getwd(boincPath);
//ShowSecurityError("Current Working Directory is %s", wd);
diff --git a/clientgui/mac/SetupSecurity.cpp b/clientgui/mac/SetupSecurity.cpp
index b3095029029..bb81329dd5a 100644
--- a/clientgui/mac/SetupSecurity.cpp
+++ b/clientgui/mac/SetupSecurity.cpp
@@ -62,7 +62,7 @@ extern void print_to_log_file(const char *format, ...);
// it ignores the S_ISUID and S_ISGID permission bits when launching an application.
// To work around this, the _DEBUG version uses the current user and group.
//
-// NOTE: The Manager and Client call these routines only "#ifdef _DEBUG" (i.e.,
+// NOTE: The Manager and Client call these routines only "#ifdef _DEBUG" (i.e.,
// only from the DEVELOPMENT BUILD), never from the Deployment build.
//
// As of January, 2017: In the past, the client and BOINC Manager used to call
@@ -98,7 +98,7 @@ int CreateBOINCUsersAndGroups() {
if (geteuid() != 0) {
ShowSecurityError("CreateBOINCUsersAndGroups must be called as root");
}
-
+
err = CreateUserAndGroup(REAL_BOINC_MASTER_NAME, REAL_BOINC_MASTER_NAME);
if (err != noErr)
return err;
@@ -106,11 +106,11 @@ int CreateBOINCUsersAndGroups() {
err = CreateUserAndGroup(REAL_BOINC_PROJECT_NAME, REAL_BOINC_PROJECT_NAME);
if (err != noErr)
return err;
-
+
err = ResynchDSSystem();
if (err != noErr)
return err;
-
+
return noErr;
}
@@ -124,7 +124,7 @@ int SetBOINCAppOwnersGroupsAndPermissions(char *path) {
struct stat sbuf;
Boolean isDirectory;
OSStatus err = noErr;
-
+
if (geteuid() != 0) {
ShowSecurityError("SetBOINCAppOwnersGroupsAndPermissions must be called as root");
}
@@ -145,7 +145,7 @@ int SetBOINCAppOwnersGroupsAndPermissions(char *path) {
ShowSecurityError("Couldn't get path to self.");
return -1;
}
-
+
// To allow for branding, assume name of executable inside bundle is same as name of bundle
p = strrchr(dir_path, '/'); // Assume name of executable inside bundle is same as name of bundle
if (p == NULL)
@@ -153,7 +153,7 @@ int SetBOINCAppOwnersGroupsAndPermissions(char *path) {
strlcpy(fullpath, p+1, sizeof(fullpath));
p = strrchr(fullpath, '.'); // Strip off bundle extension (".app")
if (p)
- *p = '\0';
+ *p = '\0';
strlcat(dir_path, "/Contents/MacOS/", sizeof(dir_path));
strlcat(dir_path, fullpath, sizeof(dir_path));
@@ -165,7 +165,7 @@ int SetBOINCAppOwnersGroupsAndPermissions(char *path) {
strlcpy(dir_path, path, MAXPATHLEN); // Path to BOINC Manager's bundle was passed as argument
}
-
+
strlcpy(fullpath, dir_path, sizeof(fullpath));
#ifdef _DEBUG
@@ -191,7 +191,7 @@ int SetBOINCAppOwnersGroupsAndPermissions(char *path) {
strlcat(fullpath, p+1, sizeof(fullpath));
p = strrchr(fullpath, '.'); // Strip off bundle extension (".app")
if (p)
- *p = '\0';
+ *p = '\0';
sprintf(buf1, "%s:%s", boinc_master_user_name, boinc_master_group_name);
// chown boinc_master:boinc_master path/BOINCManager.app/Contents/MacOS/BOINCManager
@@ -220,7 +220,7 @@ int SetBOINCAppOwnersGroupsAndPermissions(char *path) {
ShowSecurityError("SetBOINCAppOwnersGroupsAndPermissions: path to client is too long");
return -1;
}
-
+
sprintf(buf1, "%s:%s", boinc_master_user_name, boinc_master_group_name);
// chown boinc_master:boinc_master path/BOINCManager.app/Contents/Resources/boinc
err = DoSudoPosixSpawn(chownPath, buf1, fullpath, NULL, NULL, NULL, NULL);
@@ -243,7 +243,7 @@ int SetBOINCAppOwnersGroupsAndPermissions(char *path) {
for (int i=0; id_name[0] == '.')
continue; // Ignore names beginning with '.'
-
+
len = strlen(dp->d_name);
if (len < 5)
continue;
-
+
if (strcmp(dp->d_name+len-4, ".xml"))
continue;
@@ -672,7 +672,7 @@ static OSStatus MakeXMLFilesPrivate(char * basepath) {
if (retval)
break;
} // End while (true)
-
+
closedir(dirp);
return retval;
@@ -690,12 +690,12 @@ static OSStatus UpdateNestedDirectories(char * basepath) {
dirp = opendir(basepath);
if (dirp == NULL) // Should never happen
return -1;
-
+
while (true) {
dp = readdir(dirp);
if (dp == NULL)
break; // End of list
-
+
if (dp->d_name[0] == '.')
continue; // Ignore names beginning with '.'
@@ -728,15 +728,15 @@ static OSStatus UpdateNestedDirectories(char * basepath) {
if (retval)
break;
} else {
- // Since we are changing ownership from boinc_project to boinc_master,
- // make sure executable-by-group bit is set if executable-by-owner is set
+ // Since we are changing ownership from boinc_project to boinc_master,
+ // make sure executable-by-group bit is set if executable-by-owner is set
if ((sbuf.st_mode & 0110) == 0100) { // If executable by owner but not by group
retval = DoSudoPosixSpawn(chmodPath, "g+x", fullpath, NULL, NULL, NULL, NULL);
}
}
-
+
} // End while (true)
-
+
closedir(dirp);
return retval;
@@ -758,7 +758,7 @@ static OSStatus CreateUserAndGroup(char * user_name, char * group_name) {
char buf2[80];
char buf3[80];
char buf4[80];
-
+
// OS 10.4 has problems with Accounts pane if we create uid or gid > 501
pw = getpwnam(user_name);
if (pw) {
@@ -771,7 +771,7 @@ static OSStatus CreateUserAndGroup(char * user_name, char * group_name) {
groupid = grp->gr_gid;
groupExists = true;
}
-
+
sprintf(buf1, "/groups/%s", group_name);
sprintf(buf2, "/users/%s", user_name);
@@ -798,8 +798,8 @@ static OSStatus CreateUserAndGroup(char * user_name, char * group_name) {
userid = groupid;
}
}
-
- // We need to find an available user ID, group ID, or both. Find a value that is currently
+
+ // We need to find an available user ID, group ID, or both. Find a value that is currently
// neither a user ID or a group ID.
// If we need both a new user ID and a new group ID, finds a value that can be used for both.
if ( (userid == 0) || (groupid == 0) ) {
@@ -809,24 +809,24 @@ static OSStatus CreateUserAndGroup(char * user_name, char * group_name) {
if (pw)
continue; // Already exists as a user ID of a different user
}
-
+
if ((gid_t)i != groupid) {
grp = getgrgid((gid_t)i);
if (grp)
continue; // Already exists as a group ID of a different group
}
-
+
if (! userExists)
userid = (uid_t)i;
if (! groupExists)
groupid = (gid_t)i;
start_id = i + 1; // Start with next higher value next time
-
+
break; // Success!
}
}
-
+
sprintf(buf3, "%d", groupid);
sprintf(buf4, "%d", userid);
@@ -835,13 +835,13 @@ static OSStatus CreateUserAndGroup(char * user_name, char * group_name) {
err = DoSudoPosixSpawn(dsclPath, ".", "-create", buf1, NULL, NULL, NULL);
if (err)
return err;
-
+
// Something like "dscl . -create /groups/boinc_master gid 33"
err = DoSudoPosixSpawn(dsclPath, ".", "-create", buf1, "gid", buf3, NULL);
if (err)
return err;
} // if (! groupExists)
-
+
if (! userExists) { // If we need to create user
// Something like "dscl . -create /users/boinc_master"
err = DoSudoPosixSpawn(dsclPath, ".", "-create", buf2, NULL, NULL, NULL);
@@ -873,7 +873,7 @@ static OSStatus CreateUserAndGroup(char * user_name, char * group_name) {
setRealName:
// Always set the RealName field to an empty string
- // Note: create RealName with empty string fails under OS 10.7, but
+ // Note: create RealName with empty string fails under OS 10.7, but
// creating it with non-empty string and changing to empty string does work.
//
// Something like "dscl . -create /users/boinc_master RealName tempName"
@@ -896,7 +896,7 @@ static OSStatus CreateUserAndGroup(char * user_name, char * group_name) {
}
-int AddAdminUserToGroups(char *user_name, bool add_to_boinc_project) {
+int AddAdminUserToGroups(char *user_name, bool add_to_boinc_project) {
#ifndef _DEBUG
char buf1[80];
OSStatus err = noErr;
@@ -916,19 +916,19 @@ int AddAdminUserToGroups(char *user_name, bool add_to_boinc_project) {
if (err)
return err;
}
-
+
err = ResynchDSSystem();
if (err != noErr)
return err;
-#endif // ! _DEBUG
+#endif // ! _DEBUG
return noErr;
}
OSStatus ResynchDSSystem() {
OSStatus err __attribute__((unused)) = noErr;
-
+
err = DoSudoPosixSpawn("/usr/bin/dscacheutil", "-flushcache", NULL, NULL, NULL, NULL, NULL);
err = DoSudoPosixSpawn("/usr/bin/dsmemberutil", "flushcache", NULL, NULL, NULL, NULL, NULL);
return noErr;
@@ -936,7 +936,7 @@ OSStatus ResynchDSSystem() {
#ifdef _DEBUG
-// GDB can't attach to applications which are running as a different user or group so
+// GDB can't attach to applications which are running as a different user or group so
// it ignores the S_ISUID and S_ISGID permission bits when launching an application.
// To work around this, the _DEBUG version uses the current user and group.
static OSStatus SetFakeMasterNames() {
@@ -956,7 +956,7 @@ static OSStatus SetFakeMasterNames() {
if (grp == NULL)
return -1;
strlcpy(boinc_master_group_name, grp->gr_name, sizeof(boinc_master_group_name));
-
+
#ifndef DEBUG_WITH_FAKE_PROJECT_USER_AND_GROUP
// For better debugging of SANDBOX permissions logic
strlcpy(boinc_project_user_name, REAL_BOINC_PROJECT_NAME, sizeof(boinc_project_user_name));
@@ -966,7 +966,7 @@ static OSStatus SetFakeMasterNames() {
strlcpy(boinc_project_user_name, pw->pw_name, sizeof(boinc_project_user_name));
strlcpy(boinc_project_group_name, grp->gr_name, sizeof(boinc_project_group_name));
#endif
-
+
return noErr;
}
#endif
@@ -1001,7 +1001,7 @@ static OSStatus DoSudoPosixSpawn(const char *pathToTool, char *arg1, char *arg2,
}
print_to_log_file("***********\n");
#endif
-
+
errno = 0;
result = posix_spawnp(&thePid, "/usr/bin/sudo", NULL, NULL, args, environ);
@@ -1035,7 +1035,7 @@ static OSStatus DoSudoPosixSpawn(const char *pathToTool, char *arg1, char *arg2,
#endif
} // end if (WIFEXITED(status)) else
} // end if waitpid returned 0 sstaus else
-
+
#if 0
if (strcmp(arg2, "-R") == 0)
SleepSeconds(DELAY_SECONDS_R);
@@ -1046,8 +1046,8 @@ static OSStatus DoSudoPosixSpawn(const char *pathToTool, char *arg1, char *arg2,
break;
}
if (result != 0)
- ShowSecurityError("\"%s %s %s %s %s %s\" returned error %d", pathToTool,
- arg1 ? arg1 : "", arg2 ? arg2 : "", arg3 ? arg3 : "",
+ ShowSecurityError("\"%s %s %s %s %s %s\" returned error %d", pathToTool,
+ arg1 ? arg1 : "", arg2 ? arg2 : "", arg3 ? arg3 : "",
arg4 ? arg4 : "", arg5 ? arg5 : "", result);
return result;
diff --git a/clientgui/msw/taskbarex.h b/clientgui/msw/taskbarex.h
index f8b127f03c2..0b9a294bb79 100644
--- a/clientgui/msw/taskbarex.h
+++ b/clientgui/msw/taskbarex.h
@@ -18,7 +18,7 @@
#define _TASKBAREX_H_
// ----------------------------------------------------------------------------
-// wxTaskBarIconEx Balloon Types
+// wxTaskBarIconEx Balloon Types
// ----------------------------------------------------------------------------
#define BALLOONTYPE_INFO NIIF_INFO
@@ -26,7 +26,7 @@
#define BALLOONTYPE_ERROR NIIF_ERROR
// ----------------------------------------------------------------------------
-// wxTaskBarIconEx
+// wxTaskBarIconEx
// ----------------------------------------------------------------------------
class wxTaskBarIconExEvent;
@@ -59,14 +59,14 @@ class wxTaskBarIconEx: public wxEvtHandler
);
virtual bool SetBalloon(
- const wxIcon& icon,
+ const wxIcon& icon,
const wxString title = wxEmptyString,
const wxString message = wxEmptyString,
unsigned int iconballoon = BALLOONTYPE_INFO
);
virtual bool QueueBalloon(
- const wxIcon& icon,
+ const wxIcon& icon,
const wxString title = wxEmptyString,
const wxString message = wxEmptyString,
unsigned int iconballoon = BALLOONTYPE_INFO
diff --git a/clientgui/resource.h b/clientgui/resource.h
index ecc55ad0ded..998bf7de3f7 100644
--- a/clientgui/resource.h
+++ b/clientgui/resource.h
@@ -5,7 +5,7 @@
#define ICON_BOINCGUIAPP 0
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
diff --git a/clientgui/sg_BoincSimpleFrame.h b/clientgui/sg_BoincSimpleFrame.h
index ef151e68a29..034898d0e84 100644
--- a/clientgui/sg_BoincSimpleFrame.h
+++ b/clientgui/sg_BoincSimpleFrame.h
@@ -123,7 +123,7 @@ class CSimpleFrame : public CBOINCBaseFrame
void OnRefreshView( CFrameEvent& event );
void OnNotification( CFrameEvent& event );
void OnEventLog(wxCommandEvent& event);
-
+
void SetMsgsDlgOpen(CDlgMessages* newDlgPtr) { dlgMsgsPtr = newDlgPtr; }
bool isMessagesDlgOpen() { return (dlgMsgsPtr != NULL); }
diff --git a/clientgui/sg_CustomControls.cpp b/clientgui/sg_CustomControls.cpp
index 6d583438c3b..f0cdda956f7 100644
--- a/clientgui/sg_CustomControls.cpp
+++ b/clientgui/sg_CustomControls.cpp
@@ -20,7 +20,7 @@
#endif
#include "stdwx.h"
-#include "sg_CustomControls.h"
+#include "sg_CustomControls.h"
IMPLEMENT_DYNAMIC_CLASS (CTransparentStaticLine, wxPanel)
@@ -37,7 +37,7 @@ CTransparentStaticLine::CTransparentStaticLine(wxWindow* parent, wxWindowID id,
}
-bool CTransparentStaticLine::Create(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) {
+bool CTransparentStaticLine::Create(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) {
bool bRetVal = wxPanel::Create(parent, id, pos, size, style|wxTRANSPARENT_WINDOW, name);
SetBackgroundColour(parent->GetBackgroundColour());
@@ -52,7 +52,7 @@ void CTransparentStaticLine::OnPaint(wxPaintEvent& /*event*/) {
wxPaintDC dc(this);
wxPen pen = wxPen(GetLineColor(), 1);
dc.SetPen(pen);
- dc.DrawLine(0, 0, GetSize().GetWidth(), 0);
+ dc.DrawLine(0, 0, GetSize().GetWidth(), 0);
}
@@ -74,7 +74,7 @@ CTransparentStaticText::CTransparentStaticText(wxWindow* parent, wxWindowID id,
}
-bool CTransparentStaticText::Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) {
+bool CTransparentStaticText::Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) {
bool bRetVal = wxStaticText::Create(parent, id, label, pos, size, style|wxTRANSPARENT_WINDOW, name);
SetBackgroundColour(parent->GetBackgroundColour());
@@ -198,7 +198,7 @@ void CTransparentHyperlinkCtrl::OnEraseBackground(wxEraseEvent& event)
} else {
event.Skip();
}
-}
+}
#endif
@@ -218,7 +218,7 @@ CTransparentStaticTextAssociate::CTransparentStaticTextAssociate(wxWindow* paren
}
-bool CTransparentStaticTextAssociate::Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) {
+bool CTransparentStaticTextAssociate::Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) {
bool bRetVal = wxPanel::Create(parent, id, pos, size, style|wxTRANSPARENT_WINDOW, name);
m_pWnd = NULL;
@@ -317,7 +317,7 @@ bool CTransparentStaticBitmap::Create(wxWindow* parent, wxWindowID id, const wxB
SetBackgroundColour(parent->GetBackgroundColour());
SetForegroundColour(parent->GetForegroundColour());
-
+
m_bitMap = wxBitmap(bitmap);
return bRetVal;
@@ -409,7 +409,7 @@ CLinkButton::CLinkButton(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap
}
-bool CLinkButton::Create(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name ) {
+bool CLinkButton::Create(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name ) {
bool bRetVal = wxBitmapButton::Create(parent, id, bitmap, pos, size, style, validator, name);
m_HandCursor = wxCursor(wxCURSOR_HAND);
diff --git a/clientgui/sg_CustomControls.h b/clientgui/sg_CustomControls.h
index e2c7a3c8147..9821fa7c772 100644
--- a/clientgui/sg_CustomControls.h
+++ b/clientgui/sg_CustomControls.h
@@ -23,27 +23,27 @@
#endif
-class CTransparentStaticLine : public wxPanel
-{
+class CTransparentStaticLine : public wxPanel
+{
DECLARE_DYNAMIC_CLASS (CTransparentStaticLine)
-public:
+public:
CTransparentStaticLine();
CTransparentStaticLine(
- wxWindow* parent,
- wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
+ wxWindow* parent,
+ wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = 0,
+ long style = 0,
const wxString& name= wxStaticTextNameStr
);
bool Create(
- wxWindow* parent,
- wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
+ wxWindow* parent,
+ wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = 0,
+ long style = 0,
const wxString& name= wxStaticTextNameStr
);
@@ -58,32 +58,32 @@ class CTransparentStaticLine : public wxPanel
private:
wxColour m_LineColor;
-};
+};
class CTransparentStaticText : public wxStaticText
-{
+{
DECLARE_DYNAMIC_CLASS (CTransparentStaticText)
public:
CTransparentStaticText();
CTransparentStaticText(
- wxWindow* parent,
- wxWindowID id,
- const wxString& label,
- const wxPoint& pos = wxDefaultPosition,
+ wxWindow* parent,
+ wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = 0,
+ long style = 0,
const wxString& name= wxStaticTextNameStr
);
bool Create(
- wxWindow* parent,
- wxWindowID id,
- const wxString& label,
- const wxPoint& pos = wxDefaultPosition,
+ wxWindow* parent,
+ wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = 0,
+ long style = 0,
const wxString& name= wxStaticTextNameStr
);
@@ -95,7 +95,7 @@ class CTransparentStaticText : public wxStaticText
#endif
DECLARE_EVENT_TABLE()
-};
+};
class CTransparentButton : public wxButton
@@ -174,28 +174,28 @@ class CTransparentHyperlinkCtrl : public wxHyperlinkCtrl
class CTransparentStaticTextAssociate : public wxPanel
-{
+{
DECLARE_DYNAMIC_CLASS (CTransparentStaticTextAssociate)
public:
CTransparentStaticTextAssociate();
CTransparentStaticTextAssociate(
- wxWindow* parent,
- wxWindowID id,
- const wxString& label,
- const wxPoint& pos = wxDefaultPosition,
+ wxWindow* parent,
+ wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = 0,
+ long style = 0,
const wxString& name= wxStaticTextNameStr
);
bool Create(
- wxWindow* parent,
- wxWindowID id,
- const wxString& label,
- const wxPoint& pos = wxDefaultPosition,
+ wxWindow* parent,
+ wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = 0,
+ long style = 0,
const wxString& name= wxStaticTextNameStr
);
@@ -211,35 +211,35 @@ class CTransparentStaticTextAssociate : public wxPanel
DECLARE_EVENT_TABLE()
private:
wxWindow* m_pWnd;
-};
+};
#ifndef __WXMSW__
#define CTransparentStaticBitmap wxStaticBitmap
#else
class CTransparentStaticBitmap : public wxPanel
-{
+{
DECLARE_DYNAMIC_CLASS (CTransparentStaticBitmap)
public:
CTransparentStaticBitmap();
CTransparentStaticBitmap(
- wxWindow* parent,
- wxWindowID id,
+ wxWindow* parent,
+ wxWindowID id,
const wxBitmap& bitmap,
- const wxPoint& pos = wxDefaultPosition,
+ const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = 0,
+ long style = 0,
const wxString& name= wxStaticBitmapNameStr
);
bool Create(
- wxWindow* parent,
- wxWindowID id,
+ wxWindow* parent,
+ wxWindowID id,
const wxBitmap& bitmap,
- const wxPoint& pos = wxDefaultPosition,
+ const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = 0,
+ long style = 0,
const wxString& name= wxStaticBitmapNameStr
);
@@ -256,7 +256,7 @@ class CTransparentStaticBitmap : public wxPanel
class CTransparentCheckBox : public wxCheckBox
-{
+{
DECLARE_DYNAMIC_CLASS (CTransparentCheckBox)
public:
@@ -290,29 +290,29 @@ class CTransparentCheckBox : public wxCheckBox
class CLinkButton : public wxBitmapButton
-{
+{
DECLARE_DYNAMIC_CLASS (CLinkButton)
public:
CLinkButton();
CLinkButton(
- wxWindow* parent,
- wxWindowID id,
+ wxWindow* parent,
+ wxWindowID id,
const wxBitmap& bitmap,
- const wxPoint& pos = wxDefaultPosition,
+ const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = 0,
+ long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name= wxButtonNameStr
);
bool Create(
- wxWindow* parent,
- wxWindowID id,
+ wxWindow* parent,
+ wxWindowID id,
const wxBitmap& bitmap,
- const wxPoint& pos = wxDefaultPosition,
+ const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = 0,
+ long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name= wxButtonNameStr
);
@@ -322,6 +322,6 @@ class CLinkButton : public wxBitmapButton
DECLARE_EVENT_TABLE()
private:
wxCursor m_HandCursor;
-};
+};
-#endif
+#endif
diff --git a/clientgui/sg_DlgMessages.h b/clientgui/sg_DlgMessages.h
index 6c914c49ccc..db0e19d0790 100644
--- a/clientgui/sg_DlgMessages.h
+++ b/clientgui/sg_DlgMessages.h
@@ -133,7 +133,7 @@ class CDlgMessages : public wxDialog
CDlgMessages( wxWindow* parent, wxWindowID id = SYMBOL_CDLGMESSAGES_IDNAME, const wxString& caption = SYMBOL_CDLGMESSAGES_TITLE, const wxPoint& pos = SYMBOL_CDLGMESSAGES_POSITION, const wxSize& size = SYMBOL_CDLGMESSAGES_SIZE, long style = SYMBOL_CDLGMESSAGES_STYLE );
~CDlgMessages();
-
+
/// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CDLGMESSAGES_IDNAME, const wxString& caption = SYMBOL_CDLGMESSAGES_TITLE, const wxPoint& pos = SYMBOL_CDLGMESSAGES_POSITION, const wxSize& size = SYMBOL_CDLGMESSAGES_SIZE, long style = SYMBOL_CDLGMESSAGES_STYLE );
@@ -148,9 +148,9 @@ class CDlgMessages : public wxDialog
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
void OnOK( wxCommandEvent& event );
-
+
void OnRefresh() { m_pBackgroundPanel->OnRefresh(); }
-
+
private:
bool SaveState();
diff --git a/clientgui/sg_DlgPreferences.h b/clientgui/sg_DlgPreferences.h
index c893235269e..10806e10855 100644
--- a/clientgui/sg_DlgPreferences.h
+++ b/clientgui/sg_DlgPreferences.h
@@ -88,7 +88,7 @@ enum {
*/
class CPanelPreferences: public wxPanel
-{
+{
DECLARE_DYNAMIC_CLASS( CPanelPreferences )
DECLARE_EVENT_TABLE()
@@ -116,10 +116,10 @@ class CPanelPreferences: public wxPanel
/// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_CONNECTBETWEENBEGIN
void OnConnectBetweenBeginSelected( wxCommandEvent& event );
-
+
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SIMPLE_HELP
void OnButtonHelp( wxCommandEvent& event );
-
+
////@end CPanelPreferences event handler declarations
void OnButtonClear();
@@ -144,7 +144,7 @@ class CPanelPreferences: public wxPanel
bool IsValidTimeChar(const wxChar& ch);
bool IsValidTimeValue(const wxString& value);
void OnHandleCheckboxEvent(wxCommandEvent& ev);
-
+
void addNewRowToSizer(wxSizer* toSizer, wxString& toolTipText,
wxWindow* first, wxWindow* second, wxWindow* third,
wxWindow* fourth=NULL, wxWindow* fifth=NULL);
@@ -172,14 +172,14 @@ class CPanelPreferences: public wxPanel
wxTextValidator* m_vTimeValidator;
wxButton* m_btnClear;
wxString *web_prefs_url;
-
+
wxBitmap* m_backgroundBitmap;
-
+
bool m_bOKToShow;
wxColour stdTextBkgdColor;
wxTextCtrl* lastErrorCtrl;
-
+
////@end CPanelPreferences member variables
GLOBAL_PREFS global_preferences_working;
GLOBAL_PREFS_MASK global_preferences_mask;
@@ -194,7 +194,7 @@ class CPanelPreferences: public wxPanel
*/
class CDlgPreferences: public wxDialog
-{
+{
DECLARE_DYNAMIC_CLASS( CDlgPreferences )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/sg_ProjectCommandPopup.cpp b/clientgui/sg_ProjectCommandPopup.cpp
index 82225ff830e..0ead489b1df 100644
--- a/clientgui/sg_ProjectCommandPopup.cpp
+++ b/clientgui/sg_ProjectCommandPopup.cpp
@@ -38,9 +38,9 @@ END_EVENT_TABLE()
CSimpleProjectCommandPopupButton::CSimpleProjectCommandPopupButton() {
}
-
-CSimpleProjectCommandPopupButton::CSimpleProjectCommandPopupButton(wxWindow* parent, wxWindowID id,
- const wxString& label, const wxPoint& pos, const wxSize& size,
+
+CSimpleProjectCommandPopupButton::CSimpleProjectCommandPopupButton(wxWindow* parent, wxWindowID id,
+ const wxString& label, const wxPoint& pos, const wxSize& size,
long style, const wxValidator& validator, const wxString& name) :
CTransparentButton(parent, id, label, pos, size, style, validator, name)
{
@@ -48,12 +48,12 @@ CSimpleProjectCommandPopupButton::CSimpleProjectCommandPopupButton(wxWindow* par
m_ProjectCommandsPopUpMenu = new wxMenu();
AddMenuItems();
Connect(
- id,
+ id,
wxEVT_BUTTON,
(wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) &CSimpleProjectCommandPopupButton::OnProjectCommandsKeyboardNav
);
}
-
+
CSimpleProjectCommandPopupButton::~CSimpleProjectCommandPopupButton() {
delete m_ProjectCommandsPopUpMenu;
@@ -62,13 +62,13 @@ CSimpleProjectCommandPopupButton::~CSimpleProjectCommandPopupButton() {
void CSimpleProjectCommandPopupButton::AddMenuItems() {
m_UpdateProjectMenuItem = m_ProjectCommandsPopUpMenu->Append(
- ID_TASK_PROJECT_UPDATE,
+ ID_TASK_PROJECT_UPDATE,
_("Update"),
_("Report all completed tasks, get latest credit, get latest preferences, and possibly get more tasks.")
);
m_SuspendResumeMenuItem = m_ProjectCommandsPopUpMenu->Append(
- ID_TASK_PROJECT_SUSPEND,
+ ID_TASK_PROJECT_SUSPEND,
_("Suspend"),
_("Suspend tasks for this project.")
);
@@ -111,10 +111,10 @@ void CSimpleProjectCommandPopupButton::OnProjectCommandsKeyboardNav(wxCommandEve
void CSimpleProjectCommandPopupButton::ShowProjectCommandsMenu(wxPoint pos) {
CMainDocument* pDoc = wxGetApp().GetDocument();
-
+
wxASSERT(pDoc);
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
-
+
ProjectSelectionData* selData = ((CSimpleProjectPanel*)GetParent())->GetProjectSelectionData();
if (selData == NULL) return;
char* ctrl_url = selData->project_url;
@@ -136,7 +136,7 @@ void CSimpleProjectCommandPopupButton::ShowProjectCommandsMenu(wxPoint pos) {
m_NoNewTasksMenuItem->SetItemLabel(_("No new tasks"));
m_NoNewTasksMenuItem->SetHelp(_("Don't fetch new tasks for this project."));
}
-
+
m_RemoveProjectMenuItem->Enable(!project->attached_via_acct_mgr);
#ifdef __WXMAC__
@@ -208,7 +208,7 @@ void CSimpleProjectCommandPopupButton::OnProjectNoNewWork(wxCommandEvent& WXUNUS
void CSimpleProjectCommandPopupButton::OnResetProject(wxCommandEvent& WXUNUSED(event)) {
int projectIndex;
- wxInt32 iAnswer = 0;
+ wxInt32 iAnswer = 0;
wxString strMessage = wxEmptyString;
CMainDocument* pDoc = wxGetApp().GetDocument();
@@ -226,7 +226,7 @@ void CSimpleProjectCommandPopupButton::OnResetProject(wxCommandEvent& WXUNUSED(e
wxString projname(project->project_name.c_str(), wxConvUTF8);
strMessage.Printf(
- _("Are you sure you want to reset project '%s'?"),
+ _("Are you sure you want to reset project '%s'?"),
projname.c_str()
);
@@ -245,7 +245,7 @@ void CSimpleProjectCommandPopupButton::OnResetProject(wxCommandEvent& WXUNUSED(e
void CSimpleProjectCommandPopupButton::OnProjectDetach(wxCommandEvent& WXUNUSED(event)) {
int projectIndex;
- wxInt32 iAnswer = 0;
+ wxInt32 iAnswer = 0;
wxString strMessage = wxEmptyString;
CMainDocument* pDoc = wxGetApp().GetDocument();
@@ -263,7 +263,7 @@ void CSimpleProjectCommandPopupButton::OnProjectDetach(wxCommandEvent& WXUNUSED(
wxString projname(project->project_name.c_str(), wxConvUTF8);
strMessage.Printf(
- _("Are you sure you want to remove project '%s'?"),
+ _("Are you sure you want to remove project '%s'?"),
projname.c_str()
);
@@ -291,7 +291,7 @@ void CSimpleProjectCommandPopupButton::OnProjectShowProperties(wxCommandEvent& W
char* ctrl_url = selData->project_url;
PROJECT* project = pDoc->state.lookup_project(ctrl_url);
if (!project) return;
-
+
CDlgItemProperties dlg(this);
dlg.renderInfos(project);
dlg.ShowModal();
diff --git a/clientgui/sg_ProjectCommandPopup.h b/clientgui/sg_ProjectCommandPopup.h
index 79147a725d2..ee42ffadff6 100644
--- a/clientgui/sg_ProjectCommandPopup.h
+++ b/clientgui/sg_ProjectCommandPopup.h
@@ -20,22 +20,22 @@
#include "sg_CustomControls.h"
-class CSimpleProjectCommandPopupButton : public CTransparentButton
+class CSimpleProjectCommandPopupButton : public CTransparentButton
{
DECLARE_DYNAMIC_CLASS( CSimpleProjectCommandPopupButton )
DECLARE_EVENT_TABLE()
public:
CSimpleProjectCommandPopupButton();
-
- CSimpleProjectCommandPopupButton(wxWindow* parent, wxWindowID id,
- const wxString& label = wxEmptyString,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
+
+ CSimpleProjectCommandPopupButton(wxWindow* parent, wxWindowID id,
+ const wxString& label = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxT("ProjectCommandsPopupMenu"));
-
+
~CSimpleProjectCommandPopupButton();
private:
diff --git a/clientgui/sg_ProjectPanel.h b/clientgui/sg_ProjectPanel.h
index 8a40144a3cc..b07ec7b561d 100644
--- a/clientgui/sg_ProjectPanel.h
+++ b/clientgui/sg_ProjectPanel.h
@@ -34,7 +34,7 @@ typedef struct {
class CBOINCBitmapComboBox;
-class CSimpleProjectPanel : public CSimplePanelBase
+class CSimpleProjectPanel : public CSimplePanelBase
{
DECLARE_DYNAMIC_CLASS( CSimpleProjectPanel )
DECLARE_EVENT_TABLE()
@@ -43,11 +43,11 @@ class CSimpleProjectPanel : public CSimplePanelBase
CSimpleProjectPanel();
CSimpleProjectPanel( wxWindow* parent);
~CSimpleProjectPanel();
-
+
ProjectSelectionData* GetProjectSelectionData();
void UpdateInterface();
void ReskinInterface();
-
+
private:
void OnProjectSelection(wxCommandEvent &event);
void OnProjectCommandButton(wxCommandEvent& /*event*/);
diff --git a/clientgui/sg_ProjectWebSitesPopup.cpp b/clientgui/sg_ProjectWebSitesPopup.cpp
index a6943af4d71..5c815ee38f5 100644
--- a/clientgui/sg_ProjectWebSitesPopup.cpp
+++ b/clientgui/sg_ProjectWebSitesPopup.cpp
@@ -33,29 +33,29 @@ END_EVENT_TABLE()
CSimpleProjectWebSitesPopupButton::CSimpleProjectWebSitesPopupButton() {
}
-
-CSimpleProjectWebSitesPopupButton::CSimpleProjectWebSitesPopupButton(wxWindow* parent, wxWindowID id,
- const wxString& label, const wxPoint& pos, const wxSize& size,
+
+CSimpleProjectWebSitesPopupButton::CSimpleProjectWebSitesPopupButton(wxWindow* parent, wxWindowID id,
+ const wxString& label, const wxPoint& pos, const wxSize& size,
long style, const wxValidator& validator, const wxString& name) :
CTransparentButton(parent, id, label, pos, size, style, validator, name)
{
m_ProjectWebSitesPopUpMenu = new wxMenu();
Connect(
- id,
+ id,
wxEVT_BUTTON,
(wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) &CSimpleProjectWebSitesPopupButton::OnProjectWebSitesKeyboardNav
);
}
-
+
CSimpleProjectWebSitesPopupButton::~CSimpleProjectWebSitesPopupButton() {
delete m_ProjectWebSitesPopUpMenu;
}
-void CSimpleProjectWebSitesPopupButton::AddMenuItems()
-{
+void CSimpleProjectWebSitesPopupButton::AddMenuItems()
+{
CMainDocument* pDoc = wxGetApp().GetDocument();
wxASSERT(pDoc);
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
@@ -78,7 +78,7 @@ void CSimpleProjectWebSitesPopupButton::AddMenuItems()
for(unsigned int i = 0; i < urlCount; i++){
urlItem = new wxMenuItem(m_ProjectWebSitesPopUpMenu, WEBSITE_URL_MENU_ID + i, wxGetTranslation(wxString(project->gui_urls[i].name.c_str(), wxConvUTF8)));
Connect( WEBSITE_URL_MENU_ID + i, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(CSimpleProjectWebSitesPopupButton::OnMenuLinkClicked) );
-
+
m_ProjectWebSitesPopUpMenu->Append(urlItem);
}
}
@@ -127,7 +127,7 @@ void CSimpleProjectWebSitesPopupButton::OnMenuLinkClicked(wxCommandEvent& event)
} else{
int menuId = menuIDevt - WEBSITE_URL_MENU_ID;
PROJECT* project = pDoc->state.lookup_project(ctrl_url);
-
+
wxLaunchDefaultBrowser(wxString(project->gui_urls[menuId].url.c_str(),wxConvUTF8));
}
}
diff --git a/clientgui/sg_ProjectWebSitesPopup.h b/clientgui/sg_ProjectWebSitesPopup.h
index 992295c2393..c261cafd0e3 100644
--- a/clientgui/sg_ProjectWebSitesPopup.h
+++ b/clientgui/sg_ProjectWebSitesPopup.h
@@ -20,24 +20,24 @@
#include "sg_CustomControls.h"
-class CSimpleProjectWebSitesPopupButton : public CTransparentButton
+class CSimpleProjectWebSitesPopupButton : public CTransparentButton
{
DECLARE_DYNAMIC_CLASS( CSimpleProjectWebSitesPopupButton )
DECLARE_EVENT_TABLE()
public:
CSimpleProjectWebSitesPopupButton();
-
- CSimpleProjectWebSitesPopupButton(wxWindow* parent, wxWindowID id,
- const wxString& label = wxEmptyString,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
+
+ CSimpleProjectWebSitesPopupButton(wxWindow* parent, wxWindowID id,
+ const wxString& label = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxT("ProjectWebsitesPopupMenu"));
-
+
~CSimpleProjectWebSitesPopupButton();
-
+
void RebuildMenu();
private:
diff --git a/clientgui/sg_TaskCommandPopup.cpp b/clientgui/sg_TaskCommandPopup.cpp
index 3493303b32b..2fc9a9b6717 100644
--- a/clientgui/sg_TaskCommandPopup.cpp
+++ b/clientgui/sg_TaskCommandPopup.cpp
@@ -36,9 +36,9 @@ END_EVENT_TABLE()
CSimpleTaskPopupButton::CSimpleTaskPopupButton() {
}
-
-CSimpleTaskPopupButton::CSimpleTaskPopupButton(wxWindow* parent, wxWindowID id,
- const wxString& label, const wxPoint& pos, const wxSize& size,
+
+CSimpleTaskPopupButton::CSimpleTaskPopupButton(wxWindow* parent, wxWindowID id,
+ const wxString& label, const wxPoint& pos, const wxSize& size,
long style, const wxValidator& validator, const wxString& name) :
CTransparentButton(parent, id, label, pos, size, style, validator, name)
{
@@ -47,13 +47,13 @@ CSimpleTaskPopupButton::CSimpleTaskPopupButton(wxWindow* parent, wxWindowID id,
m_TaskCommandPopUpMenu = new wxMenu();
AddMenuItems();
Connect(
- id,
+ id,
wxEVT_BUTTON,
(wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) &CSimpleTaskPopupButton::OnTaskCommandsKeyboardNav
);
}
-
+
CSimpleTaskPopupButton::~CSimpleTaskPopupButton() {
delete m_TaskCommandPopUpMenu;
@@ -62,13 +62,13 @@ CSimpleTaskPopupButton::~CSimpleTaskPopupButton() {
void CSimpleTaskPopupButton::AddMenuItems() {
m_ShowGraphicsMenuItem = m_TaskCommandPopUpMenu->Append(
- ID_TASK_WORK_SHOWGRAPHICS,
+ ID_TASK_WORK_SHOWGRAPHICS,
_("Show graphics"),
_("Show application graphics in a window.")
);
m_SuspendResumeMenuItem = m_TaskCommandPopUpMenu->Append(
- ID_TASK_WORK_SUSPEND,
+ ID_TASK_WORK_SUSPEND,
_("Suspend"),
_("Suspend this task.")
);
@@ -103,16 +103,16 @@ void CSimpleTaskPopupButton::ShowTaskCommandsMenu(wxPoint pos) {
bool enableAbort = true;
CC_STATUS status;
wxString strMachineName;
-
+
wxASSERT(pDoc);
-
+
TaskSelectionData* selData = ((CSimpleTaskPanel*)GetParent())->GetTaskSelectionData();
if (selData == NULL) return;
RESULT* result = lookup_result(selData->project_url, selData->result_name);
if (!result) return;
-
+
if (result->suspended_via_gui) {
m_TaskSuspendedViaGUI = true;
m_SuspendResumeMenuItem->SetItemLabel(_("Resume"));
@@ -139,30 +139,30 @@ void CSimpleTaskPopupButton::ShowTaskCommandsMenu(wxPoint pos) {
}
if (result->suspended_via_gui ||
- result->project_suspended_via_gui ||
+ result->project_suspended_via_gui ||
(result->scheduler_state != CPU_SCHED_SCHEDULED)
) {
enableShowGraphics = false;
}
-
+
if (pDoc->GetRunningGraphicsApp(result) != NULL) {
m_ShowGraphicsMenuItem->SetItemLabel(_("Stop graphics"));
m_ShowGraphicsMenuItem->SetHelp(_("Close application graphics window."));
// Graphics might still be running even if task is suspended
enableShowGraphics = true;
-
+
} else {
m_ShowGraphicsMenuItem->SetItemLabel(_("Show graphics"));
m_ShowGraphicsMenuItem->SetHelp(_("Show application graphics in a window."));
}
m_ShowGraphicsMenuItem->Enable(enableShowGraphics);
-
+
// Disable Abort button if any selected task already aborted
if (
result->active_task_state == PROCESS_ABORT_PENDING ||
result->active_task_state == PROCESS_ABORTED ||
- result->state == RESULT_ABORTED
+ result->state == RESULT_ABORTED
) {
enableAbort = false;
}
@@ -181,14 +181,14 @@ void CSimpleTaskPopupButton::ShowTaskCommandsMenu(wxPoint pos) {
/*** CAF *** FOR TESTING ONLY ***/
static int i;
wxString s;
-
+
if (i > 9) i = 0;
if ( i < 5) {
s = (wxT("This is a very very very and extremely long label."));
} else {
s = (wxT("short."));
}
-
+
switch (i++) {
case 0:
case 5:
@@ -212,7 +212,7 @@ void CSimpleTaskPopupButton::ShowTaskCommandsMenu(wxPoint pos) {
break;
}
- m_ProgressBar->SetValue( i * 10 );
+ m_ProgressBar->SetValue( i * 10 );
int sel = i % 3;
// m_TaskSelectionCtrl->SetStringSelection(tempArray[sel]);
m_TaskSelectionCtrl->SetSelection(sel);
@@ -228,7 +228,7 @@ void CSimpleTaskPopupButton::OnTaskShowGraphics(wxCommandEvent& WXUNUSED(event))
TaskSelectionData* selData = ((CSimpleTaskPanel*)GetParent())->GetTaskSelectionData();
if (selData == NULL) return;
-
+
RESULT* result = lookup_result(selData->project_url, selData->result_name);
if (result) {
pDoc->WorkShowGraphics(result);
@@ -275,7 +275,7 @@ void CSimpleTaskPopupButton::OnTaskAbort(wxCommandEvent& WXUNUSED(event)) {
wxString name = ((CSimpleTaskPanel*)GetParent())->GetSelectedTaskString();
#endif
strMessage.Printf(
- _("Are you sure you want to abort this task '%s'?\n(Progress: %.1lf%%, Status: %s)"),
+ _("Are you sure you want to abort this task '%s'?\n(Progress: %.1lf%%, Status: %s)"),
name.c_str(), result->fraction_done * 100.0, result_description(result, false).c_str());
iAnswer = wxGetApp().SafeMessageBox(
@@ -288,7 +288,7 @@ void CSimpleTaskPopupButton::OnTaskAbort(wxCommandEvent& WXUNUSED(event)) {
if (wxYES != iAnswer) {
return;
}
-
+
pDoc->WorkAbort(result->project_url, result->name);
}
}
@@ -297,7 +297,7 @@ void CSimpleTaskPopupButton::OnTaskAbort(wxCommandEvent& WXUNUSED(event)) {
void CSimpleTaskPopupButton::OnTaskShowProperties(wxCommandEvent& WXUNUSED(event)) {
TaskSelectionData* selData = ((CSimpleTaskPanel*)GetParent())->GetTaskSelectionData();
if (selData == NULL) return;
-
+
RESULT* result = lookup_result(selData->project_url, selData->result_name);
if (result) {
CDlgItemProperties dlg(this);
@@ -307,7 +307,7 @@ void CSimpleTaskPopupButton::OnTaskShowProperties(wxCommandEvent& WXUNUSED(event
}
-// CMainDocument::state.lookup_result() does not yield current scheduler_state;
+// CMainDocument::state.lookup_result() does not yield current scheduler_state;
// we must use CMainDocument::result() for that.
RESULT* CSimpleTaskPopupButton::lookup_result(char* url, char* name) {
CMainDocument* pDoc = wxGetApp().GetDocument();
diff --git a/clientgui/sg_TaskCommandPopup.h b/clientgui/sg_TaskCommandPopup.h
index 0d8396f28e3..5eee3435467 100644
--- a/clientgui/sg_TaskCommandPopup.h
+++ b/clientgui/sg_TaskCommandPopup.h
@@ -21,22 +21,22 @@
#include "sg_CustomControls.h"
-class CSimpleTaskPopupButton : public CTransparentButton
+class CSimpleTaskPopupButton : public CTransparentButton
{
DECLARE_DYNAMIC_CLASS( CSimpleTaskPopupButton )
DECLARE_EVENT_TABLE()
public:
CSimpleTaskPopupButton();
-
- CSimpleTaskPopupButton(wxWindow* parent, wxWindowID id,
- const wxString& label = wxEmptyString,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
+
+ CSimpleTaskPopupButton(wxWindow* parent, wxWindowID id,
+ const wxString& label = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxT("TaskCommandsPopupMenu"));
-
+
~CSimpleTaskPopupButton();
private:
@@ -49,7 +49,7 @@ class CSimpleTaskPopupButton : public CTransparentButton
void OnTaskAbort(wxCommandEvent& event);
void OnTaskShowProperties(wxCommandEvent& event);
RESULT* lookup_result(char* url, char* name);
-
+
protected:
wxMenu* m_TaskCommandPopUpMenu;
wxMenuItem* m_ShowGraphicsMenuItem;
diff --git a/clientgui/sg_TaskPanel.h b/clientgui/sg_TaskPanel.h
index cb6e122f593..43e90fbc2ff 100644
--- a/clientgui/sg_TaskPanel.h
+++ b/clientgui/sg_TaskPanel.h
@@ -40,7 +40,7 @@ typedef struct {
///////////////////////////////////////////////////////////////////////////
/// Class CScrolledTextBox
///////////////////////////////////////////////////////////////////////////////
-class CScrolledTextBox : public wxScrolledWindow
+class CScrolledTextBox : public wxScrolledWindow
{
DECLARE_DYNAMIC_CLASS( CScrolledTextBox )
DECLARE_EVENT_TABLE()
@@ -48,10 +48,10 @@ class CScrolledTextBox : public wxScrolledWindow
CScrolledTextBox();
CScrolledTextBox( wxWindow* parent);
~CScrolledTextBox();
-
+
void SetValue(const wxString& s);
virtual void OnEraseBackground(wxEraseEvent& event);
-
+
private:
int Wrap(const wxString& text, int widthMax, int *lineHeight);
bool IsStartOfNewLine();
@@ -69,7 +69,7 @@ class CScrolledTextBox : public wxScrolledWindow
/// Class CSlideShowPanel
///////////////////////////////////////////////////////////////////////////////
-class CSlideShowPanel : public wxPanel
+class CSlideShowPanel : public wxPanel
{
DECLARE_DYNAMIC_CLASS( CSlideShowPanel )
DECLARE_EVENT_TABLE()
@@ -84,7 +84,7 @@ class CSlideShowPanel : public wxPanel
void AdvanceSlideShow(bool changeSlide, bool reload);
void OnPaint(wxPaintEvent& WXUNUSED(event));
void OnEraseBackground(wxEraseEvent& event);
-
+
private:
CScrolledTextBox* m_description;
wxTimer* m_ChangeSlideTimer;
@@ -106,7 +106,7 @@ class CSlideShowPanel : public wxPanel
#define CBOINCBitmapComboBox wxBitmapComboBox
#endif
-class CSimpleTaskPanel : public CSimplePanelBase
+class CSimpleTaskPanel : public CSimplePanelBase
{
DECLARE_DYNAMIC_CLASS( CSimpleTaskPanel )
DECLARE_EVENT_TABLE()
diff --git a/clientgui/skins/Charity Engine/skin.xml b/clientgui/skins/Charity Engine/skin.xml
index f4b9bd28e0e..f7ecf59f9e1 100644
--- a/clientgui/skins/Charity Engine/skin.xml
+++ b/clientgui/skins/Charity Engine/skin.xml
@@ -33,13 +33,13 @@
workunit_suspended_image.png
-
+
dialog_background_image.png
-
+
project_image.png
@@ -79,16 +79,16 @@
255:0:255
-
+
1
Charity Engine
https://www.charityengine.com
- https://www.charityengine.com/manager_menu.php
+ https://www.charityengine.com/manager_menu.php
-
-
+
+
Charity Engine Desktop - Attach to Project
@@ -97,9 +97,9 @@
-
+
-
+
diff --git a/clientgui/skins/GridRepublic/skin.xml b/clientgui/skins/GridRepublic/skin.xml
index 2c6b9f046a1..278f2257f14 100644
--- a/clientgui/skins/GridRepublic/skin.xml
+++ b/clientgui/skins/GridRepublic/skin.xml
@@ -33,13 +33,13 @@
workunit_suspended_image.png
-
+
dialog_background_image.png
-
+
project_image.png
@@ -79,16 +79,16 @@
255:0:255
-
+
1
GridRepublic
https://www.gridrepublic.org
- https://www.gridrepublic.org/manager_menu.php
+ https://www.gridrepublic.org/manager_menu.php
-
-
+
+
GridRepublic Desktop - Attach to Project
@@ -100,6 +100,6 @@
-
+
diff --git a/clientgui/skins/People for a Smarter Planet/skin.xml b/clientgui/skins/People for a Smarter Planet/skin.xml
index 41cbda40d8f..91b781ec232 100644
--- a/clientgui/skins/People for a Smarter Planet/skin.xml
+++ b/clientgui/skins/People for a Smarter Planet/skin.xml
@@ -87,11 +87,11 @@
graphic/project_image.png
-
-
-
-
-
+
+
+
+
+
graphic/attach_project_button.png
@@ -161,7 +161,7 @@
graphic/messages_link_image.png
- graphic/preferences_link_image.png
+ graphic/preferences_link_image.png
255:255:255
255:255:255
@@ -169,7 +169,7 @@
graphic/messages_alert_link_image.png
- graphic/preferences_link_image.png
+ graphic/preferences_link_image.png
255:255:255
255:255:255
@@ -187,7 +187,7 @@
graphic/preferences_link_image.png
- graphic/preferences_link_image.png
+ graphic/preferences_link_image.png
255:255:255
255:255:255
0:0:0
@@ -207,46 +207,46 @@
-
+
- World Community Grid - BOINC Manager
+ World Community Grid - BOINC Manager
- graphic/wcg_play.png
+ graphic/wcg_play.png
255:0:255
- graphic/wcg_about.ico
+ graphic/wcg_about.ico
255:0:255
- graphic/wcg_stop.png
+ graphic/wcg_stop.png
255:0:255
- graphic/wcg_pause.png
+ graphic/wcg_pause.png
255:0:255
-
- World Community Grid
- https://www.worldcommunitygrid.org
- https://www.worldcommunitygrid.org/boinc.do
+
+ World Community Grid
+ https://www.worldcommunitygrid.org
+ https://www.worldcommunitygrid.org/boinc.do
World Community Grid
- 0
+ 0
-
\ No newline at end of file
+
diff --git a/clientgui/skins/ProgressThruProcessors/skin.xml b/clientgui/skins/ProgressThruProcessors/skin.xml
index e319bb5ab44..7fcc8b9f86a 100644
--- a/clientgui/skins/ProgressThruProcessors/skin.xml
+++ b/clientgui/skins/ProgressThruProcessors/skin.xml
@@ -33,13 +33,13 @@
workunit_suspended_image.png
-
+
dialog_background_image.png
-
+
project_image.png
@@ -79,16 +79,16 @@
255:0:255
-
+
1
Progress Thru Processors
https://apps.facebook.com/processors
- https://apps.facebook.com/processors/manager_menu.php
+ https://apps.facebook.com/processors/manager_menu.php
-
-
+
+
Progress Thru Processors Desktop - Attach to Project
@@ -97,9 +97,9 @@
-
+
-
+
diff --git a/clientgui/skins/World Community Grid/skin.xml b/clientgui/skins/World Community Grid/skin.xml
index 592936b84e2..0e474a3f8fd 100644
--- a/clientgui/skins/World Community Grid/skin.xml
+++ b/clientgui/skins/World Community Grid/skin.xml
@@ -32,7 +32,7 @@
BOINC
World Community Grid
https://www.worldcommunitygrid.org
- https://www.worldcommunitygrid.org/boinc.do
+ https://www.worldcommunitygrid.org/boinc.do
wcg_about.ico
@@ -51,7 +51,7 @@
wcg_stop.png
-
+
wcg_pause.png
diff --git a/clientgui/wizardex.h b/clientgui/wizardex.h
index 22ccdeba573..acf8ff51a79 100644
--- a/clientgui/wizardex.h
+++ b/clientgui/wizardex.h
@@ -66,17 +66,17 @@ class WXDLLIMPEXP_ADV wxWizardPageEx : public wxPanel
/// Override the base functions to allow a validator to be assigned to this page.
bool TransferDataToWindow()
{
- return GetValidator() ? GetValidator()->TransferToWindow()
+ return GetValidator() ? GetValidator()->TransferToWindow()
: wxPanel::TransferDataToWindow();
}
bool TransferDataFromWindow()
{
- return GetValidator() ? GetValidator()->TransferFromWindow()
+ return GetValidator() ? GetValidator()->TransferFromWindow()
: wxPanel::TransferDataFromWindow();
}
bool Validate()
{
- return GetValidator() ? GetValidator()->Validate(this)
+ return GetValidator() ? GetValidator()->Validate(this)
: wxPanel::Validate();
}
#endif // wxUSE_VALIDATORS
diff --git a/clientscr/Mac_Saver_Module.h b/clientscr/Mac_Saver_Module.h
index 74ab94c1ae8..777b68db024 100644
--- a/clientscr/Mac_Saver_Module.h
+++ b/clientscr/Mac_Saver_Module.h
@@ -90,7 +90,7 @@ class CScreensaver
int Run();
//
- // Infrastructure layer
+ // Infrastructure layer
//
protected:
OSStatus initBOINCApp(void);
@@ -104,7 +104,7 @@ class CScreensaver
void SetDiscreteGPU(bool setDiscrete);
void CheckDualGPUPowerSource();
bool Host_is_running_on_batteries();
-
+
bool m_bErrorMode; // Whether to draw moving logo and possibly display an error
unsigned int m_hrError; // Error code to display
@@ -146,7 +146,7 @@ class CScreensaver
// was passed in.
RESULT* get_random_graphics_app(RESULTS& results, RESULT* exclude = NULL);
-
+
bool m_bResetCoreState;
bool m_bQuitDataManagementProc;
bool m_bDataManagementProcStopped;
diff --git a/clientscr/Mac_Saver_ModuleView.h b/clientscr/Mac_Saver_ModuleView.h
index c90920e2b00..452bb24c013 100644
--- a/clientscr/Mac_Saver_ModuleView.h
+++ b/clientscr/Mac_Saver_ModuleView.h
@@ -23,15 +23,15 @@
#import
-@interface BOINC_Saver_ModuleView : ScreenSaverView
+@interface BOINC_Saver_ModuleView : ScreenSaverView
{
IBOutlet id mConfigureSheet; // our configuration sheet
IBOutlet NSButton *mGoToBlankCheckbox;
IBOutlet NSTextField *mBlankingTimeTextField;
IBOutlet NSTextField *mDefaultPeriodTextField;
IBOutlet NSTextField *mSciencePeriodTextField;
- IBOutlet NSTextField *mChangePeriodTextField;
-
+ IBOutlet NSTextField *mChangePeriodTextField;
+
int mVersion; // the version of our prefs
NSString *mBlankingTimeString;
NSString *mDefaultPeriodString;
diff --git a/clientscr/Mac_Saver_ModuleView.m b/clientscr/Mac_Saver_ModuleView.m
index 8fb99ec2c15..7a462b2c909 100644
--- a/clientscr/Mac_Saver_ModuleView.m
+++ b/clientscr/Mac_Saver_ModuleView.m
@@ -22,7 +22,7 @@
// To debug BOINCSaver.saver under Xcode:
//
-// [1] Copy ScreenSaverEngine.app to a location outside the /System directory
+// [1] Copy ScreenSaverEngine.app to a location outside the /System directory
// to allow bypassing limitations caused by System Integrity Protection
//
// [2] Prior to High Sierra ScreenSaverEngine.app is at:
@@ -30,41 +30,41 @@
// As of High Sierra ScreenSaverEngine.app is at:
// /System/Library/CoreServices/ScreenSaverEngine.app
//
-// [3] In Xcode, select the ScreenSaver target as the active scheme.
+// [3] In Xcode, select the ScreenSaver target as the active scheme.
// Click on the scheme popup and select "Edit scheme ..."
//
// [4] In the Edit Scheme dialog, select "Run"
//
// [5] In the Edit Scheme dialog Info tab, in the "Build Configuration" popup select "Development"
//
-// [6] In the Edit Scheme dialog Info tab, in the "Executable" popup select "Other..."
+// [6] In the Edit Scheme dialog Info tab, in the "Executable" popup select "Other..."
// then browse to and select the copy of ScreenSaverEngine.app you made in step [1]
//
-// [7] In the Edit Scheme dialog Arguments tab, add "-debug" and "-window" to
+// [7] In the Edit Scheme dialog Arguments tab, add "-debug" and "-window" to
// "Arguments passed on launch"
//
// [8] In the Finder, open the directory "/Library/Screen Savers" and remove "BOINCSaver.saver"
//
-// [9] In Xcode's Project navigator, under "Products", control-click on "BOINCSaver.saver" and
+// [9] In Xcode's Project navigator, under "Products", control-click on "BOINCSaver.saver" and
// select " Show in Finder"; make sure your are looking at the Development subdirectory.
//
// [10] In the Terminal application, enter "sudo ln -s " then drag the BOINCSaver.saver file
-// from the Development subdirectory onto the Terminal Window, then type
+// from the Development subdirectory onto the Terminal Window, then type
// "/Library/Screen\ Savers/BOINCSaver.saver" (without the quotes) and press the return key.
// Enter your password when requested.
//
-// [12] In Mac_Saver_ModuleView.m, set the "#define DEBUG_UNDER_XCODE" to 1. (Be sure to set it
+// [12] In Mac_Saver_ModuleView.m, set the "#define DEBUG_UNDER_XCODE" to 1. (Be sure to set it
// back to 0 to build the non-debugging version.)
//
// [13] In some cases, it may be useful to set the permissions and owner of gfx_switcher, which is
// embedded in the development BOINCSaver.saver bundle, by running the Mac_SA_Secure.sh script.
//
-// [14] The screensaver display will appear in a window, with graphics apps appearing full screen
-// behind it. Under High Sierra, new-style graphics apps (those using Mach-O communication
+// [14] The screensaver display will appear in a window, with graphics apps appearing full screen
+// behind it. Under High Sierra, new-style graphics apps (those using Mach-O communication
// and IOSurfaceBuffer) will appear all white, but the bottom left portion of their animation
// will appear in the screensaver window.
//
-// It is best if the Xcode window is on a second display; otherwise the graphics apps will cover it.
+// It is best if the Xcode window is on a second display; otherwise the graphics apps will cover it.
// If you have only one display, you can dismiss the graphics app by clicking on it, but BOINCSaver
// will soon relaunch it.
//
@@ -170,7 +170,7 @@
#define MINDELTA 8
#define MAXDELTA 16
-// On OS 10.13+, assume graphics app is not compatible if no MachO
+// On OS 10.13+, assume graphics app is not compatible if no MachO
// connection after MAXWAITFORCONNECTION seconds
#define MAXWAITFORCONNECTION 8.0
#define MAXWAITFORCONNECTIONCATALINA 12.0
@@ -201,20 +201,20 @@ void launchedGfxApp(char * appPath, pid_t thePID, int slot) {
@implementation BOINC_Saver_ModuleView
-// If there are multiple displays, this may get called
-// multiple times (once for each display), so we need to guard
+// If there are multiple displays, this may get called
+// multiple times (once for each display), so we need to guard
// against any problems that may cause.
- (id)initWithFrame:(NSRect)frame isPreview:(BOOL)isPreview {
NSBundle * myBundle;
int period;
self = [ super initWithFrame:frame isPreview:isPreview ];
-
+
gIsHighSierra = (compareOSVersionTo(10, 13) >= 0);
gIsMojave = (compareOSVersionTo(10, 14) >= 0);
gIsCatalina = (compareOSVersionTo(10, 15) >= 0);
gIsBigSur = (compareOSVersionTo(11, 0) >= 0);
-
+
if (gIsCatalina) {
// Under OS 10.15, isPreview is often true even when it shouldn't be
// so we use this hack instead
@@ -222,28 +222,28 @@ - (id)initWithFrame:(NSRect)frame isPreview:(BOOL)isPreview {
} else {
myIsPreview = isPreview;
}
-
- // OpenGL / GLUT apps which call glutFullScreen() and are built using
- // Xcode 11 apparently use window dimensions based on the number of
- // backing store pixels. That is, they double the window dimensions
- // for Retina displays (which have 2X2 pixels per point.) But OpenGL
+
+ // OpenGL / GLUT apps which call glutFullScreen() and are built using
+ // Xcode 11 apparently use window dimensions based on the number of
+ // backing store pixels. That is, they double the window dimensions
+ // for Retina displays (which have 2X2 pixels per point.) But OpenGL
// apps built under earlier versions of Xcode don't.
//
- // OS 10.15 Catalina assumes OpenGL / GLUT apps work as built under
- // Xcode 11, so it displays older builds at half width and height,
- // unless we compensate in our code.
+ // OS 10.15 Catalina assumes OpenGL / GLUT apps work as built under
+ // Xcode 11, so it displays older builds at half width and height,
+ // unless we compensate in our code.
//
- // To ensure that BOINC graphics apps built on all versions of Xcode work
- // properly on different versions of OS X, we set the IOSurface dimensions
- // in this module to double the screen dimensions when running under
- // OS 10.15 or later.
+ // To ensure that BOINC graphics apps built on all versions of Xcode work
+ // properly on different versions of OS X, we set the IOSurface dimensions
+ // in this module to double the screen dimensions when running under
+ // OS 10.15 or later.
//
// See also MacGLUTFix(bool isScreenSaver) in api/macglutfix.m for more info.
//
// NOTE: Graphics apps must now be linked with the IOSurface framework.
//
#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101500 // If built on Xcode 10.x or earlier
- if (!gIsBigSur) // If built with Xcode 10.x or earlier don't do this on Big Sur
+ if (!gIsBigSur) // If built with Xcode 10.x or earlier don't do this on Big Sur
#endif
{
if (gIsCatalina) {
@@ -266,22 +266,22 @@ - (id)initWithFrame:(NSRect)frame isPreview:(BOOL)isPreview {
}
ScreenSaverDefaults *defaults = [ ScreenSaverDefaults defaultsForModuleWithName:mBundleID ];
-
+
// try to load the version key, used to see if we have any saved settings
mVersion = [defaults floatForKey:@"version"];
if (!mVersion) {
// no previous settings so define our defaults
gGoToBlank = NO;
gBlankingTime = 1;
-
+
// write out the defaults
[ defaults setInteger:gGoToBlank forKey:@"GoToBlank" ];
[ defaults setInteger:gBlankingTime forKey:@"BlankingTime" ];
}
-
+
if (mVersion < 2) {
mVersion = 2;
-
+
[ defaults setInteger:mVersion forKey:@"version" ];
period = getGFXDefaultPeriod() / 60;
[ defaults setInteger:period forKey:@"DefaultPeriod" ];
@@ -289,7 +289,7 @@ - (id)initWithFrame:(NSRect)frame isPreview:(BOOL)isPreview {
[ defaults setInteger:period forKey:@"SciencePeriod" ];
period = getGGFXChangePeriod() / 60;
[ defaults setInteger:period forKey:@"ChangePeriod" ];
-
+
// synchronize
[defaults synchronize];
}
@@ -307,40 +307,40 @@ - (id)initWithFrame:(NSRect)frame isPreview:(BOOL)isPreview {
[ self setAutoresizesSubviews:YES ]; // make sure the subview resizes.
}
}
-
+
// Path to our copy of switcher utility application in this screensaver bundle
if (gPathToBundleResources == NULL) {
gPathToBundleResources = [ myBundle resourcePath ];
}
-
+
return self;
}
-// If there are multiple displays, this may get called
-// multiple times (once for each display), so we need to guard
+// If there are multiple displays, this may get called
+// multiple times (once for each display), so we need to guard
// against any problems that may cause.
- (void)startAnimation {
int newFrequency;
gEventHandle = NXOpenEventStatus();
-
+
mainThreadID = pthread_self();
// Under OS 10.14 Mojave, [super drawRect:] is slow but not needed if we do this:
[[self window] setBackgroundColor:[NSColor blackColor]];
- if (gBOINC_Logo == NULL) {
+ if (gBOINC_Logo == NULL) {
NSString *fileName = [[ NSBundle bundleForClass:[ self class ]] pathForImageResource:@"boinc_ss_logo" ];
if (! fileName) {
// What should we do in this case?
return;
}
-
+
gBOINC_Logo = [[ NSImage alloc ] initWithContentsOfFile:fileName ];
gMovingRect.origin.x = 0.0;
gMovingRect.origin.y = 0.0;
gMovingRect.size = [gBOINC_Logo size];
-
+
if (gMovingRect.size.width < TEXTBOXMINWIDTH) {
gImageXIndent = (TEXTBOXMINWIDTH - gMovingRect.size.width) / 2;
gMovingRect.size.width = TEXTBOXMINWIDTH;
@@ -353,9 +353,9 @@ - (void)startAnimation {
gCurrentPosition.y = SAFETYBORDER + 1 + gTextBoxHeight;
gCurrentDelta.x = 1.0;
gCurrentDelta.y = 1.0;
-
+
gActualTextBoxHeight = MINTEXTBOXHEIGHT;
-
+
[ self setAnimationTimeInterval:1/8.0 ];
}
@@ -365,10 +365,10 @@ - (void)startAnimation {
[ self setAnimationTimeInterval:1.0/8.0 ];
return;
}
-
+
NSWindow *myWindow = [ self window ];
#if DEBUG_UNDER_XCODE
- [ myWindow setLevel:2030 ];
+ [ myWindow setLevel:2030 ];
#else // NOT DEBUG_UNDER_XCODE
NSRect windowFrame = [ myWindow frame ];
if ( (windowFrame.origin.x == 0) && (windowFrame.origin.y == 0) ) // Main screen
@@ -376,13 +376,13 @@ - (void)startAnimation {
{
// If a dual-GPU MacBook Pro was using integrated GPU, switching to discrete GPU will
// cause ScreenSaverEngine to call stopAnimation, initWithFrame and startAnimation.
- // This will destroy the old ScreenSaverView and create a new one, so we need to
+ // This will destroy the old ScreenSaverView and create a new one, so we need to
// pass our new ScreenSaverView to our SharedGraphicsController.
if (mySharedGraphicsController) {
[mySharedGraphicsController init:self];
}
- newFrequency = startBOINCSaver();
+ newFrequency = startBOINCSaver();
if (newFrequency) {
[ self setAnimationTimeInterval:1.0/newFrequency ];
}
@@ -390,8 +390,8 @@ - (void)startAnimation {
gSS_StartTime = getDTime();
}
-// If there are multiple displays, this may get called
-// multiple times (once for each display), so we need to guard
+// If there are multiple displays, this may get called
+// multiple times (once for each display), so we need to guard
// against any problems that may cause.
- (void)stopAnimation {
[ super stopAnimation ];
@@ -413,20 +413,20 @@ - (void)stopAnimation {
if (!myIsPreview) {
closeBOINCSaver();
}
-
+
gTopWindowListIndex = -1;
-
+
// if (gBOINC_Logo) {
// [ gBOINC_Logo release ];
// }
gBOINC_Logo = NULL;
-
+
// gPathToBundleResources has been released by autorelease
gPathToBundleResources = NULL;
}
-// If there are multiple displays, this may get called
-// multiple times (once for each display), so we need to guard
+// If there are multiple displays, this may get called
+// multiple times (once for each display), so we need to guard
// against any problems that may cause.
- (void)drawRect:(NSRect)rect {
// optionally draw here
@@ -437,8 +437,8 @@ - (void)drawRect:(NSRect)rect {
}
}
-// If there are multiple displays, this may get called
-// multiple times (once for each display), so we need to guard
+// If there are multiple displays, this may get called
+// multiple times (once for each display), so we need to guard
// against any problems that may cause.
- (void)doPeriodicTasks {
int newFrequency = 0;
@@ -468,7 +468,7 @@ - (void)doPeriodicTasks {
[ self setAnimationTimeInterval:1/1.0 ];
#else // Code for possible future use if we want to draw more in preview
myContext = [[NSGraphicsContext currentContext] graphicsPort];
- drawPreview(myContext);
+ drawPreview(myContext);
[ self setAnimationTimeInterval:1/30.0 ];
#endif
return;
@@ -551,8 +551,8 @@ - (void)doPeriodicTasks {
// terminate_v6_screensaver may have removed imageView via launchedGfxApp("", 0, -1)
//
- // CGWindowListCopyWindowInfo and CGWindowListCreateImage can copy
- // windows between user boinc_project and the user running the
+ // CGWindowListCopyWindowInfo and CGWindowListCreateImage can copy
+ // windows between user boinc_project and the user running the
// screensaver only if OS < 10.15 (before Catalina)
//
if (imageView) {
@@ -574,10 +574,10 @@ - (void)doPeriodicTasks {
pthread_mutex_unlock(&saver_mutex);
}
}
-
+
isErased = false;
if (IsDualGPUMacbook) {
- // Check once per second for change in status of running on battery
+ // Check once per second for change in status of running on battery
double timeNow = getDTime();
if ((timeNow - lastGetSSMsgTime) >= 1.0) {
getSSMessage(&msg, &coveredFreq);
@@ -586,7 +586,7 @@ - (void)doPeriodicTasks {
windowIsCovered();
[ self setAnimationTimeInterval:1.0 ];
}
-
+
return;
}
@@ -603,8 +603,8 @@ - (void)doPeriodicTasks {
if (UseSharedOffscreenBuffer()) {
// If runningSharedGraphics is still false after MAXWAITFORCONNECTION,
// assume the graphics app has not been built with MachO comunication
- // and IOSurfaceBuffer support, so try to use CGWindowListCreateImage
- // method. If that fails MAX_CGWINDOWLIST_TRIES times then assume
+ // and IOSurfaceBuffer support, so try to use CGWindowListCreateImage
+ // method. If that fails MAX_CGWINDOWLIST_TRIES times then assume
// the graphics app is not compatible with OS 10.13+ and kill it.
//
// taskSlot<0 if no worker app is running, so launching default graphics
@@ -612,14 +612,14 @@ - (void)doPeriodicTasks {
maxWaitTime = gIsCatalina ? MAXWAITFORCONNECTIONCATALINA : MAXWAITFORCONNECTION;
if ((getDTime() - gfxAppStartTime) > maxWaitTime) {
if (gIsCatalina) {
- // CGWindowListCopyWindowInfo and CGWindowListCreateImage can copy
- // windows between user boinc_project and the user running the
+ // CGWindowListCopyWindowInfo and CGWindowListCreateImage can copy
+ // windows between user boinc_project and the user running the
// screensaver only if OS < 10.15 (before Catalina)
incompatibleGfxApp(gfxAppPath, childPid, taskSlot);
} else {
if (++CGWindowListTries > MAX_CGWINDOWLIST_TRIES) {
// After displaying message for 5 seconds, incompatibleGfxApp
- // will call launchedGfxApp("", 0, -1) which will clear
+ // will call launchedGfxApp("", 0, -1) which will clear
// gfxAppStartTime and CGWindowListTries
incompatibleGfxApp(gfxAppPath, childPid, taskSlot);
} else {
@@ -678,9 +678,9 @@ - (void)doPeriodicTasks {
}
}
}
-
+
// Draw our moving BOINC logo and screensaver status text
-
+
// Clear the previous drawing area
currentDrawingRect = gMovingRect;
currentDrawingRect.origin.x = (float) ((int)gCurrentPosition.x);
@@ -693,7 +693,7 @@ - (void)doPeriodicTasks {
gCurrentDelta.x = (float)SSRandomIntBetween(MINDELTA, MAXDELTA) / 16.;
gCurrentDelta.y = (float)(SSRandomIntBetween(MINDELTA, MAXDELTA) * signof(gCurrentDelta.y)) / 16.;
}
- if ( (currentDrawingRect.origin.x + currentDrawingRect.size.width) >=
+ if ( (currentDrawingRect.origin.x + currentDrawingRect.size.width) >=
(viewBounds.origin.x + viewBounds.size.width - SAFETYBORDER) ) {
gCurrentDelta.x = -(float)SSRandomIntBetween(MINDELTA, MAXDELTA) / 16.;
gCurrentDelta.y = (float)(SSRandomIntBetween(MINDELTA, MAXDELTA) * signof(gCurrentDelta.y)) / 16.;
@@ -702,7 +702,7 @@ - (void)doPeriodicTasks {
gCurrentDelta.y = (float)SSRandomIntBetween(MINDELTA, MAXDELTA) / 16.;
gCurrentDelta.x = (float)(SSRandomIntBetween(MINDELTA, MAXDELTA) * signof(gCurrentDelta.x)) / 16.;
}
- if ( (currentDrawingRect.origin.y + currentDrawingRect.size.height) >=
+ if ( (currentDrawingRect.origin.y + currentDrawingRect.size.height) >=
(viewBounds.origin.y + viewBounds.size.height - SAFETYBORDER) ) {
gCurrentDelta.y = -(float)SSRandomIntBetween(MINDELTA, MAXDELTA) / 16.;
gCurrentDelta.x = (float)(SSRandomIntBetween(MINDELTA, MAXDELTA) * signof(gCurrentDelta.x)) / 16.;
@@ -715,13 +715,13 @@ - (void)doPeriodicTasks {
if (!isErased) {
[[NSColor blackColor] set];
-
+
// Erasing only 2 small rectangles reduces screensaver's CPU usage by about 25%
imagePosition.x = (float) ((int)gCurrentPosition.x + gImageXIndent);
imagePosition.y = (float) (int)gCurrentPosition.y;
eraseRect.origin.y = imagePosition.y;
eraseRect.size.height = currentDrawingRect.size.height - gTextBoxHeight;
-
+
if (gCurrentDelta.x > 0) {
eraseRect.origin.x = imagePosition.x - 1;
eraseRect.size.width = gCurrentDelta.x + 1;
@@ -729,10 +729,10 @@ - (void)doPeriodicTasks {
eraseRect.origin.x = currentDrawingRect.origin.x + currentDrawingRect.size.width - gImageXIndent + gCurrentDelta.x - 1;
eraseRect.size.width = -gCurrentDelta.x + 1;
}
-
+
eraseRect = NSInsetRect(eraseRect, -1, -1);
NSRectFill(eraseRect);
-
+
eraseRect.origin.x = imagePosition.x;
eraseRect.size.width = currentDrawingRect.size.width - gImageXIndent - gImageXIndent;
@@ -745,7 +745,7 @@ - (void)doPeriodicTasks {
}
eraseRect = NSInsetRect(eraseRect, -1, -1);
NSRectFill(eraseRect);
-
+
eraseRect = currentDrawingRect;
eraseRect.size.height = gTextBoxHeight;
eraseRect = NSInsetRect(eraseRect, -1, -1);
@@ -757,7 +757,7 @@ - (void)doPeriodicTasks {
// Get the new drawing area
gCurrentPosition.x += gCurrentDelta.x;
gCurrentPosition.y += gCurrentDelta.y;
-
+
imagePosition.x = (float) ((int)gCurrentPosition.x + gImageXIndent);
imagePosition.y = (float) (int)gCurrentPosition.y;
@@ -766,7 +766,7 @@ - (void)doPeriodicTasks {
if ( (msg != NULL) && (msg[0] != '\0') ) {
cf_msg = CFStringCreateWithCString(NULL, msg, kCFStringEncodingMacRoman);
- CGRect bounds = CGRectMake((float) ((int)gCurrentPosition.x),
+ CGRect bounds = CGRectMake((float) ((int)gCurrentPosition.x),
viewBounds.size.height - imagePosition.y + TEXTBOXTOPBORDER,
gMovingRect.size.width,
MAXTEXTBOXHEIGHT
@@ -778,8 +778,8 @@ - (void)doPeriodicTasks {
CTFontRef myFont = CTFontCreateWithName(CFSTR("Helvetica"), 20, NULL);
- HIThemeTextInfo theTextInfo = {kHIThemeTextInfoVersionOne, kThemeStateActive, kThemeSpecifiedFont,
- kHIThemeTextHorizontalFlushLeft, kHIThemeTextVerticalFlushTop,
+ HIThemeTextInfo theTextInfo = {kHIThemeTextInfoVersionOne, kThemeStateActive, kThemeSpecifiedFont,
+ kHIThemeTextHorizontalFlushLeft, kHIThemeTextVerticalFlushTop,
kHIThemeTextBoxOptionNone, kHIThemeTextTruncationNone, 0, false,
0, myFont
};
@@ -787,7 +787,7 @@ - (void)doPeriodicTasks {
HIThemeGetTextDimensions(cf_msg, (float)gMovingRect.size.width, &textInfo, NULL, &gActualTextBoxHeight, NULL);
gActualTextBoxHeight += TEXTBOXTOPBORDER;
-
+
CGFloat myWhiteComponents[] = {1.0, 1.0, 1.0, 1.0};
CGColorSpaceRef myColorSpace = CGColorSpaceCreateDeviceRGB ();
CGColorRef myTextColor = CGColorCreate(myColorSpace, myWhiteComponents);
@@ -801,12 +801,12 @@ - (void)doPeriodicTasks {
CGContextRestoreGState (myContext);
CFRelease(cf_msg);
}
-
+
gTextBoxHeight = MAXTEXTBOXHEIGHT + TEXTBOXTOPBORDER;
gMovingRect.size.height = [gBOINC_Logo size].height + gTextBoxHeight;
-
+
isErased = false;
-
+
} else { // Empty or NULL message
if (!isErased) {
eraseRect = NSInsetRect(currentDrawingRect, -1, -1);
@@ -817,17 +817,17 @@ - (void)doPeriodicTasks {
gMovingRect.size.height = [gBOINC_Logo size].height + gTextBoxHeight;
}
}
-
+
if (newFrequency) {
[ self setAnimationTimeInterval:(1.0/newFrequency) ];
- // setAnimationTimeInterval does not seem to be working, so we
+ // setAnimationTimeInterval does not seem to be working, so we
// throttle the screensaver directly here.
timeToBlock = (1.0/newFrequency) - (getDTime() - frameStartTime);
if (timeToBlock > 0.0) {
doBoinc_Sleep(timeToBlock);
}
}
-
+
// Check for a new graphics app sending us data
if (UseSharedOffscreenBuffer() && gfxAppStartTime) {
if (mySharedGraphicsController) {
@@ -839,7 +839,7 @@ - (void)doPeriodicTasks {
- (void)animateOneFrame {
#if ! DEBUG_UNDER_XCODE
- if (!myIsPreview) {
+ if (!myIsPreview) {
NSRect windowFrame = [ [ self window ] frame ];
if ( (windowFrame.origin.x != 0) || (windowFrame.origin.y != 0) ) {
return; // We draw only to main screen
@@ -867,7 +867,7 @@ - (NSWindow*)configureSheet
// if we haven't loaded our configure sheet, load the nib named MyScreenSaver.nib
if (!mConfigureSheet) {
if ([[ NSBundle bundleForClass:[ self class ]] respondsToSelector: @selector(loadNibNamed: owner: topLevelObjects:)]) {
-
+
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-method-access"
// [NSBundle loadNibNamed: owner: topLevelObjects:] is not available before OS 10.8
@@ -889,19 +889,19 @@ - (NSWindow*)configureSheet
mBlankingTimeString = [[ NSString alloc ] initWithFormat:@"%d", gBlankingTime ];
[ mBlankingTimeTextField setStringValue:mBlankingTimeString ];
-
+
period = getGFXDefaultPeriod() / 60;
mDefaultPeriodString = [[ NSString alloc ] initWithFormat:@"%d", period ];
[ mDefaultPeriodTextField setStringValue:mDefaultPeriodString ];
-
+
period = getGFXSciencePeriod() / 60;
mSciencePeriodString = [[ NSString alloc ] initWithFormat:@"%d", period ];
[ mSciencePeriodTextField setStringValue:mSciencePeriodString ];
-
+
period = getGGFXChangePeriod() / 60;
mChangePeriodString = [[ NSString alloc ] initWithFormat:@"%d", period ];
[ mChangePeriodTextField setStringValue:mChangePeriodString ];
-
+
return mConfigureSheet;
}
@@ -909,9 +909,9 @@ - (NSWindow*)configureSheet
- (IBAction) closeSheetSave:(id) sender
{
int period = 0;
-
+
NSScanner *scanner, *scanner2;
-
+
// get the defaults
ScreenSaverDefaults *defaults = [ ScreenSaverDefaults defaultsForModuleWithName:mBundleID ];
@@ -945,7 +945,7 @@ - (IBAction) closeSheetSave:(id) sender
if (![ scanner2 isAtEnd ]) goto Bad;
if ((period < 0) || (period > 999)) goto Bad;
setGGFXChangePeriod((double)(period * 60));
-
+
// write the defaults
[ defaults setInteger:gGoToBlank forKey:@"GoToBlank" ];
[ defaults setInteger:gBlankingTime forKey:@"BlankingTime" ];
@@ -955,7 +955,7 @@ - (IBAction) closeSheetSave:(id) sender
[ defaults setInteger:period forKey:@"SciencePeriod" ];
period = getGGFXChangePeriod() / 60;
[ defaults setInteger:period forKey:@"ChangePeriod" ];
-
+
// synchronize
[ defaults synchronize ];
@@ -968,7 +968,7 @@ - (IBAction) closeSheetSave:(id) sender
[alert addButtonWithTitle:@"OK"];
[alert setMessageText:@"Please enter a number between 0 and 999."];
[alert setAlertStyle:NSCriticalAlertStyle];
-
+
if ([alert respondsToSelector: @selector(beginSheetModalForWindow: completionHandler:)]){
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-method-access"
@@ -996,8 +996,8 @@ - (IBAction) closeSheetCancel:(id) sender
// Find the gtaphics app's window number (window ID)
//
-// CGWindowListCopyWindowInfo and CGWindowListCreateImage can copy
-// windows between user boinc_project and the user running the
+// CGWindowListCopyWindowInfo and CGWindowListCreateImage can copy
+// windows between user boinc_project and the user running the
// screensaver only if OS < 10.15 (before Catalina)
//
- (bool) setUpToUseCGWindowList
@@ -1041,16 +1041,16 @@ @interface SharedGraphicsController()
{
NSMachPort *serverPort;
NSMachPort *localPort;
-
+
uint32_t serverPortName;
uint32_t localPortName;
-
+
int32_t clientIndex;
uint32_t nextFrameIndex;
-
+
NSView *screenSaverView;
saverOpenGLView *openGLView;
-
+
IOSurfaceRef _ioSurfaceBuffers[NUM_IOSURFACE_BUFFERS];
mach_port_t _ioSurfaceMachPorts[NUM_IOSURFACE_BUFFERS];
GLuint _textureNames[NUM_IOSURFACE_BUFFERS];
@@ -1063,15 +1063,15 @@ @implementation SharedGraphicsController
- (void)init:(NSView*)saverView {
screenSaverView = saverView;
-
- [[NSNotificationCenter defaultCenter] removeObserver:self
+
+ [[NSNotificationCenter defaultCenter] removeObserver:self
name:NSPortDidBecomeInvalidNotification object:nil];
-
- [[NSNotificationCenter defaultCenter] addObserver:self
+
+ [[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(portDied:) name:NSPortDidBecomeInvalidNotification object:nil];
-
+
openGLView = nil;
-
+
[self testConnection];
}
@@ -1081,7 +1081,7 @@ - (void) testConnection
mach_port_t servicePortNum = MACH_PORT_NULL;
kern_return_t machErr;
char *portName = "edu.berkeley.boincsaver";
-
+
// Try to check in with master.
// NSMachBootstrapServer is deprecated in OS 10.13, so use bootstrap_look_up
// serverPort = [(NSMachPort *)([[NSMachBootstrapServer sharedInstance] portForName:@"edu.berkeley.boincsaver"]) retain];
@@ -1096,15 +1096,15 @@ - (void) testConnection
{
// Create our own local port.
localPort = [[NSMachPort alloc] init];
-
+
// Retrieve raw mach port names.
serverPortName = [serverPort machPort];
localPortName = [localPort machPort];
-
+
// Register our local port with the current runloop.
[localPort setDelegate:self];
[localPort scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];
-
+
// Check in with server.
int kr;
kr = _MGCCheckinClient(serverPortName, localPortName, &clientIndex);
@@ -1152,7 +1152,7 @@ - (void)portDied:(NSNotification *)notification
// glDeleteTextures(1, _textureNames[i]);
// }
_textureNames[i] = 0;
-
+
if (_ioSurfaceMachPorts[i] != MACH_PORT_NULL) {
mach_port_deallocate(mach_task_self(), _ioSurfaceMachPorts[i]);
_ioSurfaceMachPorts[i] = MACH_PORT_NULL;
@@ -1169,13 +1169,13 @@ - (void)portDied:(NSNotification *)notification
- (void)handleMachMessage:(void *)msg
{
union __ReplyUnion___MGCMGSServer_subsystem reply;
-
+
mach_msg_header_t *reply_header = (void *)&reply;
kern_return_t kr;
-
+
if(MGSServer_server(msg, reply_header) && reply_header->msgh_remote_port != MACH_PORT_NULL)
{
- kr = mach_msg(reply_header, MACH_SEND_MSG, reply_header->msgh_size, 0, MACH_PORT_NULL,
+ kr = mach_msg(reply_header, MACH_SEND_MSG, reply_header->msgh_size, 0, MACH_PORT_NULL,
0, MACH_PORT_NULL);
if(kr != 0)
[NSApp terminate:nil];
@@ -1200,7 +1200,7 @@ - (kern_return_t)displayFrame:(int32_t)frameIndex surfacemachport:(mach_port_t)i
theframe.origin.x = theframe.origin.y = 0.0;
theframe.size.width = IOSurfaceWidth;
theframe.size.height = IOSurfaceHeight;
-
+
openGLView = [[saverOpenGLView alloc] initWithFrame:theframe];
[screenSaverView addSubview:openGLView];
}
@@ -1288,7 +1288,7 @@ - (GLuint)setupIOSurfaceTexture:(IOSurfaceRef)ioSurfaceBuffer
CGLContextObj cgl_ctx = (CGLContextObj)[[self openGLContext] CGLContextObj];
glGenTextures(1, &name);
-
+
glBindTexture(GL_TEXTURE_RECTANGLE, name);
// At the moment, CGLTexImageIOSurface2D requires the GL_TEXTURE_RECTANGLE target
CGLTexImageIOSurface2D(cgl_ctx, GL_TEXTURE_RECTANGLE, GL_RGBA, (GLsizei)self.bounds.size.width, (GLsizei)self.bounds.size.height, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
@@ -1297,7 +1297,7 @@ - (GLuint)setupIOSurfaceTexture:(IOSurfaceRef)ioSurfaceBuffer
glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
return name;
}
@@ -1325,10 +1325,10 @@ - (void)renderTextureFromIOSurfaceWithWidth:(GLsizei)logoWidth height:(GLsizei)l
glPushMatrix();
glLoadMatrixf(quad);
glMatrixMode(saveMatrixMode);
-
+
glBindTexture(GL_TEXTURE_RECTANGLE, [mySharedGraphicsController currentTextureName]);
glEnable(GL_TEXTURE_RECTANGLE);
-
+
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
//Draw textured quad
@@ -1342,9 +1342,9 @@ - (void)renderTextureFromIOSurfaceWithWidth:(GLsizei)logoWidth height:(GLsizei)l
glTexCoord2f(0.0, 1.0);
glVertex3f(-1.0, 1.0, 0.0);
glEnd();
-
+
glDisable(GL_TEXTURE_RECTANGLE);
-
+
glGetIntegerv(GL_MATRIX_MODE, &saveMatrixMode);
glMatrixMode(GL_TEXTURE);
glPopMatrix();
@@ -1352,20 +1352,20 @@ - (void)renderTextureFromIOSurfaceWithWidth:(GLsizei)logoWidth height:(GLsizei)l
}
-// OpenGL / GLUT apps which call glutFullScreen() and are built using
-// Xcode 11 apparently use window dimensions based on the number of
-// backing store pixels. That is, they double the window dimensions
-// for Retina displays (which have 2X2 pixels per point.) But OpenGL
+// OpenGL / GLUT apps which call glutFullScreen() and are built using
+// Xcode 11 apparently use window dimensions based on the number of
+// backing store pixels. That is, they double the window dimensions
+// for Retina displays (which have 2X2 pixels per point.) But OpenGL
// apps built under earlier versions of Xcode don't.
//
-// OS 10.15 Catalina assumes OpenGL / GLUT apps work as built under
-// Xcode 11, so it displays older builds at half width and height,
-// unless we compensate in our code.
+// OS 10.15 Catalina assumes OpenGL / GLUT apps work as built under
+// Xcode 11, so it displays older builds at half width and height,
+// unless we compensate in our code.
//
-// To ensure that BOINC graphics apps built on all versions of Xcode work
-// properly on different versions of OS X, we set the IOSurface dimensions
-// in this module to double the screen dimensions when running under
-// OS 10.15 or later.
+// To ensure that BOINC graphics apps built on all versions of Xcode work
+// properly on different versions of OS X, we set the IOSurface dimensions
+// in this module to double the screen dimensions when running under
+// OS 10.15 or later.
//
// See also MacGLUTFix(bool isScreenSaver) in api/macglutfix.m for more info.
//
diff --git a/clientscr/Makefile.am b/clientscr/Makefile.am
index 51ed3cda1cb..1492e238131 100644
--- a/clientscr/Makefile.am
+++ b/clientscr/Makefile.am
@@ -20,7 +20,7 @@ endif ## ENABLE_CLIENT_RELEASE
bin_PROGRAMS = boincscr
boincscr_SOURCES = screensaver_x11.cpp
-boincscr_DEPENDENCIES = $(LIBBOINC)
+boincscr_DEPENDENCIES = $(LIBBOINC)
boincscr_CPPFLAGS = $(AM_CPPFLAGS) $(XCB_CFLAGS) $(XCBATOM_CFLAGS)
boincscr_LDFLAGS = $(AM_LDFLAGS) -L../lib $(XCB_LIBS) $(XCBATOM_LIBS)
-boincscr_LDADD = $(LIBBOINC) $(BOINC_EXTRA_LIBS) $(PTHREAD_LIBS)
+boincscr_LDADD = $(LIBBOINC) $(BOINC_EXTRA_LIBS) $(PTHREAD_LIBS)
diff --git a/clientscr/boinc_ss.h b/clientscr/boinc_ss.h
index 7b560d4b75a..67731b8d2e5 100644
--- a/clientscr/boinc_ss.h
+++ b/clientscr/boinc_ss.h
@@ -26,7 +26,7 @@
#define IDC_STATIC -1
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
diff --git a/clientscr/boinc_ss.rc b/clientscr/boinc_ss.rc
index b9fc97a6116..53a7569792d 100644
--- a/clientscr/boinc_ss.rc
+++ b/clientscr/boinc_ss.rc
@@ -61,19 +61,19 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// TEXTINCLUDE
//
-1 TEXTINCLUDE
+1 TEXTINCLUDE
BEGIN
"boinc_ss.h\0"
END
-2 TEXTINCLUDE
+2 TEXTINCLUDE
BEGIN
"#include ""winresrc.h""\r\n"
"#include ""version.h""\r\n"
"\0"
END
-3 TEXTINCLUDE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
@@ -522,11 +522,11 @@ IDB_BOINC BITMAP "res\\boinc.bmp"
#if defined(_GRIDREPUBLIC)
-STRINGTABLE
+STRINGTABLE
BEGIN
IDS_DESCRIPTION "GridRepublic"
IDS_ERR_GENERIC "There was an unspecified problem\nwith the GridRepublic screensaver."
- IDS_ERR_BOINCNOTDETECTED
+ IDS_ERR_BOINCNOTDETECTED
"GridRepublic is not running.\n\nPlease launch GridRepublic to display graphics."
IDS_ERR_BOINCSUSPENDED "GridRepublic is currently suspended."
IDS_ERR_BOINCNOAPPSEXECUTING
@@ -545,11 +545,11 @@ END
#elif defined(_PROGRESSTHRUPROCESSORS)
-STRINGTABLE
+STRINGTABLE
BEGIN
IDS_DESCRIPTION "Progress Thru Processors"
IDS_ERR_GENERIC "There was an unspecified problem\nwith the Progress Thru Processors screensaver."
- IDS_ERR_BOINCNOTDETECTED
+ IDS_ERR_BOINCNOTDETECTED
"Progress Thru Processors is not running.\n\nPlease launch Progress Thru Processors\nto display graphics."
IDS_ERR_BOINCSUSPENDED "Progress Thru Processors is currently suspended."
IDS_ERR_BOINCNOAPPSEXECUTING
@@ -566,11 +566,11 @@ END
#elif defined(_CHARITYENGINE)
-STRINGTABLE
+STRINGTABLE
BEGIN
IDS_DESCRIPTION "Charity Engine"
IDS_ERR_GENERIC "There was an unspecified problem\nwith the Charity Engine screensaver."
- IDS_ERR_BOINCNOTDETECTED
+ IDS_ERR_BOINCNOTDETECTED
"Charity Engine is not running.\n\nPlease launch Charity Engine\nto display graphics."
IDS_ERR_BOINCSUSPENDED "Charity Engine is currently suspended."
IDS_ERR_BOINCNOAPPSEXECUTING
@@ -587,11 +587,11 @@ END
#elif defined(_WCG)
-STRINGTABLE
+STRINGTABLE
BEGIN
IDS_DESCRIPTION "World Community Grid"
IDS_ERR_GENERIC "There was an unspecified problem\nwith the World Community Grid screensaver."
- IDS_ERR_BOINCNOTDETECTED
+ IDS_ERR_BOINCNOTDETECTED
"World Community Grid is not running.\n\nPlease launch World Community Grid\nto display graphics."
IDS_ERR_BOINCSUSPENDED "World Community Grid is currently suspended."
IDS_ERR_BOINCNOAPPSEXECUTING
@@ -610,11 +610,11 @@ END
#else
-STRINGTABLE
+STRINGTABLE
BEGIN
IDS_DESCRIPTION "BOINC"
IDS_ERR_GENERIC "There was an unspecified problem\nwith the BOINC screensaver."
- IDS_ERR_BOINCNOTDETECTED
+ IDS_ERR_BOINCNOTDETECTED
"BOINC is not running.\n\nPlease launch BOINC to display graphics."
IDS_ERR_BOINCSUSPENDED "BOINC is currently suspended."
IDS_ERR_BOINCNOAPPSEXECUTING
@@ -633,7 +633,7 @@ END
#endif
-STRINGTABLE
+STRINGTABLE
BEGIN
IDS_ERR_BOINCAPPFOUNDGRAPHICSLOADING
"Application found, graphics loading...\n\nPlease wait..."
diff --git a/clientscr/boinc_ss_helper.sh b/clientscr/boinc_ss_helper.sh
index ce3cc803348..40cb83bb317 100644
--- a/clientscr/boinc_ss_helper.sh
+++ b/clientscr/boinc_ss_helper.sh
@@ -20,18 +20,18 @@
# Used under OS 10.15 Catalina and later to launch screensaver graphics apps
#
# BOINC screensaver plugin BOINCSaver.saver (BOINC Screensaver Coordinator)
-# sends a run_graphics_app RPC to the BOINC client. The BOINC client then
+# sends a run_graphics_app RPC to the BOINC client. The BOINC client then
# launches switcher, which submits this script to launchd as a LaunchAgent
# for the user that invoked the screensaver (the currently logged in user.)
-# This script then launches gfx_switcher, which uses fork and execv to
-# launch the project graphics app. gfx_switcher writes the graphics app's
-# process ID to shared memory, to be read by the Screensaver Coordinator.
-# gfx_switcher waits for the graphics app to exit and notifies then notifies
+# This script then launches gfx_switcher, which uses fork and execv to
+# launch the project graphics app. gfx_switcher writes the graphics app's
+# process ID to shared memory, to be read by the Screensaver Coordinator.
+# gfx_switcher waits for the graphics app to exit and notifies then notifies
# the Screensaver Coordinator by writing 0 to the shared memory.
#
-# We must go through launchd to establish a connection to the windowserver
+# We must go through launchd to establish a connection to the windowserver
# in the currently logged in user's space for use by the project graphics
-# app. This script then launches gfx_switcher, which uses execv to launch
+# app. This script then launches gfx_switcher, which uses execv to launch
# the project graphics app.
# This Rube Goldberg process is necessary due to limitations on screensavers
# introduced in OS 10.15 Catalina.
@@ -67,6 +67,6 @@ else
"/Library/Screen Savers/$2.saver/Contents/Resources/gfx_switcher" $3 $4
fi
-# A new submit of edu.berkeley.boinc-ss_helper will be ignored if for some reason
+# A new submit of edu.berkeley.boinc-ss_helper will be ignored if for some reason
# edu.berkeley.boinc-ss_helper is still loaded, so ensure it is removed.
launchctl remove edu.berkeley.boinc-ss_helper
diff --git a/clientscr/boinc_ss_opengl.h b/clientscr/boinc_ss_opengl.h
index 50ec622857b..f09b742dcda 100644
--- a/clientscr/boinc_ss_opengl.h
+++ b/clientscr/boinc_ss_opengl.h
@@ -5,7 +5,7 @@
#define IDI_MAIN_ICON 1
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
diff --git a/clientscr/boinc_ss_opengl.rc b/clientscr/boinc_ss_opengl.rc
index c302512bab3..ea770f76de1 100644
--- a/clientscr/boinc_ss_opengl.rc
+++ b/clientscr/boinc_ss_opengl.rc
@@ -59,19 +59,19 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// TEXTINCLUDE
//
-1 TEXTINCLUDE
+1 TEXTINCLUDE
BEGIN
"boinc_ss_opengl.h\0"
END
-2 TEXTINCLUDE
+2 TEXTINCLUDE
BEGIN
"#include ""winresrc.h""\r\n"
"#include ""version.h""\r\n"
"\0"
END
-3 TEXTINCLUDE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
diff --git a/clientscr/gfx_cleanup.mm b/clientscr/gfx_cleanup.mm
index f334bea04c7..d4d0fc170ac 100644
--- a/clientscr/gfx_cleanup.mm
+++ b/clientscr/gfx_cleanup.mm
@@ -20,7 +20,7 @@
// Used by screensaver to work around a bug in OS 10.15 Catalina
// - Detects when ScreensaverEngine exits without calling [ScreenSaverView stopAnimation]
// - If that happens, it sends RPC to BOINC client to kill current graphics app.
-// Note: this can rarely happen in earlier versions, but is of main concern under
+// Note: this can rarely happen in earlier versions, but is of main concern under
// OS 10.13 and later, where it can cause an ugly white full-screen display
//
// Called by CScreensaver via popen(path, "w")
@@ -74,11 +74,11 @@ void killGfxApp(pid_t thePID) {
RPC_CLIENT *rpc;
int retval;
std::string msg;
-
+
chdir("/Library/Application Support/BOINC Data");
safe_strcpy(buf, "");
read_gui_rpc_password(buf, msg);
-
+
rpc = new RPC_CLIENT;
if (rpc->init(NULL)) { // Initialize communications with Core Client
fprintf(stderr, "in gfx_cleanup: killGfxApp(): rpc->init(NULL) failed");
@@ -97,7 +97,7 @@ void killGfxApp(pid_t thePID) {
CFStringGetCString(cf_gUserName, userName, sizeof(userName), kCFStringEncodingUTF8);
retval = rpc->run_graphics_app("stop", thePID, userName);
- print_to_log_file("in gfx_cleanup: killGfxApp(): rpc->run_graphics_app(stop) returned retval=%d", retval);
+ print_to_log_file("in gfx_cleanup: killGfxApp(): rpc->run_graphics_app(stop) returned retval=%d", retval);
// Wait until graphics app has exited before closing our own black fullscreen
// window to prevent an ugly white flash [see comment in main() below].
@@ -110,11 +110,11 @@ void killGfxApp(pid_t thePID) {
retval = rpc->run_graphics_app("test", p, userName);
if (retval || (p==0)) break;
}
- print_to_log_file("in gfx_cleanup: killGfxApp(%d): rpc->run_graphics_app(test) returned pid %d, retval %d when i = %d", thePID, p, retval, i);
+ print_to_log_file("in gfx_cleanup: killGfxApp(%d): rpc->run_graphics_app(test) returned pid %d, retval %d when i = %d", thePID, p, retval, i);
- // Graphics apps called by screensaver or Manager (via Show
+ // Graphics apps called by screensaver or Manager (via Show
// Graphics button) now write files in their slot directory as
- // the logged in user, not boinc_master. This ugly hack tells
+ // the logged in user, not boinc_master. This ugly hack tells
// BOINC client to fix all ownerships in this slot directory
char shmem_name[MAXPATHLEN];
snprintf(shmem_name, sizeof(shmem_name), "/tmp/boinc_ss_%s", userName);
@@ -123,7 +123,7 @@ void killGfxApp(pid_t thePID) {
rpc->run_graphics_app("stop", ss_shmem->gfx_slot, "");
ss_shmem->gfx_slot = -1;
}
-
+
rpc->close();
#endif
return;
@@ -191,12 +191,12 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
if (GFX_PidFromScreensaver) {
killGfxApp(GFX_PidFromScreensaver);
}
-
+
quit_MonitorParentThread = true;
-
+
// [NSApp stop:self];
exit(0);
-
+
}
@end
@@ -212,11 +212,11 @@ int main(int argc, char* argv[]) {
// Create shared app instance
[NSApplication sharedApplication];
- // Because prpject graphics applications under OS 10.13+ draw to an IOSurface,
- // the application's own window is white, but is normally covered by the
+ // Because prpject graphics applications under OS 10.13+ draw to an IOSurface,
+ // the application's own window is white, but is normally covered by the
// ScreensaverEngine's window. If the ScreensaverEngine exits without first
- // calling [ScreenSaverView stopAnimation], the white fullscreen window will
- // briefly be visible until we kill the graphics app, causing an ugly and
+ // calling [ScreenSaverView stopAnimation], the white fullscreen window will
+ // briefly be visible until we kill the graphics app, causing an ugly and
// annoying white flash. So we hide that with our own black fullscreen window
// to prevent the white flash.
if (cover_gfx_window) {
@@ -232,9 +232,9 @@ int main(int argc, char* argv[]) {
[myWindow orderFrontRegardless];
}
- AppDelegate *myDelegate = [[AppDelegate alloc] init];
+ AppDelegate *myDelegate = [[AppDelegate alloc] init];
[ NSApp setDelegate:myDelegate];
-
+
[NSApp run];
print_to_log_file("exiting gfx_cleanup after handling %d",GFX_PidFromScreensaver);
@@ -291,7 +291,7 @@ void print_to_log_file(const char *format, ...) {
va_start(args, format);
vfprintf(f, format, args);
va_end(args);
-
+
fputs("\n", f);
fclose(f);
diff --git a/clientscr/gfx_switcher.cpp b/clientscr/gfx_switcher.cpp
index aad6313472d..5e61389abd9 100644
--- a/clientscr/gfx_switcher.cpp
+++ b/clientscr/gfx_switcher.cpp
@@ -26,16 +26,16 @@
// Special logic used only under OS 10.15 Catalina and later:
//
// BOINC screensaver plugin BOINCSaver.saver (BOINC Screensaver Coordinator)
-// sends a run_graphics_app RPC to the BOINC client. The BOINC client then
+// sends a run_graphics_app RPC to the BOINC client. The BOINC client then
// launches switcher, which submits a script to launchd as a LaunchAgent
// for the user that invoked the screensaver (the currently logged in user.)
//
-// We must go through launchd to establish a connection to the windowserver
+// We must go through launchd to establish a connection to the windowserver
// in the currently logged in user's space for use by the project graphics
-// app. This script then launches gfx_switcher, which uses fork and execv to
-// launch the project graphics app. gfx_switcher writes the graphics app's
-// process ID to shared memory, to be read by the Screensaver Coordinator.
-// gfx_switcher waits for the graphics app to exit and notifies then notifies
+// app. This script then launches gfx_switcher, which uses fork and execv to
+// launch the project graphics app. gfx_switcher writes the graphics app's
+// process ID to shared memory, to be read by the Screensaver Coordinator.
+// gfx_switcher waits for the graphics app to exit and notifies then notifies
// the Screensaver Coordinator by writing 0 to the shared memory.
//
// This Rube Goldberg process is necessary due to limitations on screensavers
@@ -110,7 +110,7 @@ int main(int argc, char** argv) {
strlcpy(group_name, "boinc_project", sizeof(group_name));
// Under fast user switching, the BOINC client may be running under a
- // different login than the screensaver
+ // different login than the screensaver
//
// If we need to join a different process group, it must be the last argument.
i = 0;
@@ -127,7 +127,7 @@ int main(int argc, char** argv) {
}
++i;
}
-
+
if (! screensaverLoginUser) {
screensaverLoginUser = user_name;
}
@@ -138,7 +138,7 @@ int main(int argc, char** argv) {
if (grp) strlcpy(group_name, grp->gr_name, sizeof(group_name));
#endif
- // We are running setuid root, so setgid() sets real group ID,
+ // We are running setuid root, so setgid() sets real group ID,
// effective group ID and saved set_group-ID for this process
grp = getgrnam(group_name);
if (grp) setgid(grp->gr_gid);
@@ -156,7 +156,7 @@ int main(int argc, char** argv) {
getcwd( current_dir, sizeof(current_dir));
print_to_log_file("current directory = %s", current_dir);
print_to_log_file("user_name is %s, euid=%d, uid=%d, egid=%d, gid=%d", user_name, geteuid(), getuid(), getegid(), getgid());
-
+
for (int i=0; iHasProcessExited(pid, exitStatus)) {
return;
}
-
+
retval = gspScreensaver->rpc->get_state(gspScreensaver->state);
if (!retval) {
strlcpy(buf, IncompatibleMsg, sizeof(buf));
@@ -227,7 +227,7 @@ void incompatibleGfxApp(char * appPath, pid_t pid, int slot){
}
}
} // if (!retval)
-
+
if (!gotAppName) {
p = strrchr(appPath, '/');
if (!p) p = appPath;
@@ -308,7 +308,7 @@ CScreensaver::CScreensaver() {
struct ss_periods periods;
char saved_dir[MAXPATHLEN];
std::string msg;
-
+
m_dwBlankScreen = 0;
m_dwBlankTime = 0;
m_bErrorMode = false;
@@ -322,7 +322,7 @@ CScreensaver::CScreensaver() {
m_CurrentBannerMessage = 0;
m_bQuitDataManagementProc = false;
m_bDataManagementProcStopped = false;
-
+
m_hDataManagementThread = NULL;
m_hGraphicsApplication = NULL;
m_bResetCoreState = true;
@@ -330,15 +330,15 @@ CScreensaver::CScreensaver() {
m_bConnected = false;
m_gfx_Cleanup_IPC = NULL;
safe_strcpy(passwd_buf, "");
-
+
getcwd(saved_dir, sizeof(saved_dir));
chdir("/Library/Application Support/BOINC Data");
read_gui_rpc_password(passwd_buf, msg);
chdir(saved_dir);
-
+
CFStringRef cf_gUserName = SCDynamicStoreCopyConsoleUser(NULL, NULL, NULL);
CFStringGetCString(cf_gUserName, gUserName, sizeof(gUserName), kCFStringEncodingUTF8);
-
+
// Get project-defined default values for GFXDefaultPeriod, GFXSciencePeriod, GFXChangePeriod
GetDefaultDisplayPeriods(periods);
m_bShow_default_ss_first = periods.Show_default_ss_first;
@@ -360,17 +360,17 @@ CScreensaver::CScreensaver() {
int CScreensaver::Create() {
// Ugly workaround for a problem with the System Preferences app
- // For an unknown reason, when this screensaver is run using the
- // Test button in the System Prefs Screensaver control panel, the
- // control panel calls our stopAnimation function as soon as the
- // science application opens a GLUT window. This problem does not
- // occur when the screensaver is run normally (from the screensaver
- // engine.) So we just display a message and don't access the core
+ // For an unknown reason, when this screensaver is run using the
+ // Test button in the System Prefs Screensaver control panel, the
+ // control panel calls our stopAnimation function as soon as the
+ // science application opens a GLUT window. This problem does not
+ // occur when the screensaver is run normally (from the screensaver
+ // engine.) So we just display a message and don't access the core
// client.
- // With V6 graphics when using gfx_switcher, the graphics application
- // fails to run and stderr shows the message:
- // "The process has forked and you cannot use this CoreFoundation
- // functionality safely. You MUST exec()"
+ // With V6 graphics when using gfx_switcher, the graphics application
+ // fails to run and stderr shows the message:
+ // "The process has forked and you cannot use this CoreFoundation
+ // functionality safely. You MUST exec()"
pid_t SystemPrefsPID = getPidIfRunning("com.apple.systempreferences");
if (SystemPrefsPID == getpid()) {
saverState = SaverState_ControlPanelTestMode;
@@ -385,15 +385,15 @@ int CScreensaver::Create() {
if (!ScreenSaverStartTime) {
ScreenSaverStartTime = time(0);
}
-
+
m_dwBlankScreen = gGoToBlank;
if (gGoToBlank && (gBlankingTime > 0))
m_dwBlankTime = ScreenSaverStartTime + (gBlankingTime * 60);
else
m_dwBlankTime = 0;
-
- // If there are multiple displays, initBOINCSaver may get called
- // multiple times (once for each display), so we need to guard
+
+ // If there are multiple displays, initBOINCSaver may get called
+ // multiple times (once for each display), so we need to guard
// against launching multiple instances of the core client
if (saverState == SaverState_Idle) {
CFStringGetCString(gPathToBundleResources, m_gfx_Switcher_Path, sizeof(m_gfx_Switcher_Path), kCFStringEncodingMacRoman);
@@ -403,15 +403,15 @@ int CScreensaver::Create() {
strlcat(m_gfx_Cleanup_Path, "/gfx_cleanup\"", sizeof(m_gfx_Switcher_Path));
// Launch helper app to work around a bug in OS 10.15 Catalina to
- // kill current graphics app if ScreensaverEngine exits without
+ // kill current graphics app if ScreensaverEngine exits without
// first calling [ScreenSaverView stopAnimation]
//TODO: Should we use this on OS 10.13+ ?
m_gfx_Cleanup_IPC = popen(m_gfx_Cleanup_Path, "w");
-
+
initBOINCApp();
CGDisplayHideCursor(kCGNullDirectDisplay);
-
+
if (saverState == SaverState_LaunchingCoreClient)
{
SetError(FALSE, 0);
@@ -422,7 +422,7 @@ int CScreensaver::Create() {
}
}
}
-
+
if (!IsDualGPUMacbook) {
SetDiscreteGPU(false);
if (IsDualGPUMacbook && (GPUSelectConnect != IO_OBJECT_NULL)) {
@@ -430,14 +430,14 @@ int CScreensaver::Create() {
GPUSelectConnect = IO_OBJECT_NULL;
}
}
-
+
return TEXTLOGOFREQUENCY;
}
OSStatus CScreensaver::initBOINCApp() {
saverState = SaverState_CantLaunchCoreClient;
-
+
m_CoreClientPID = getClientPID();
if (m_CoreClientPID) {
m_wasAlreadyRunning = true;
@@ -445,9 +445,9 @@ OSStatus CScreensaver::initBOINCApp() {
retryCount = 0;
return noErr;
}
-
+
m_wasAlreadyRunning = false;
-
+
return noErr; // Screensavers can't launch setuid /setgid processes as of Catalina
}
@@ -459,33 +459,33 @@ int CScreensaver::getSSMessage(char **theMessage, int* coveredFreq) {
*coveredFreq = 0;
pid_t myPid;
CC_STATE ccstate;
-
+
if (ScreenIsBlanked) {
setSSMessageText(0); // No text message
*theMessage = m_MessageText;
return NOTEXTLOGOFREQUENCY;
}
-
+
CheckDualGPUPowerSource();
-
+
switch (saverState) {
case SaverState_RelaunchCoreClient:
initBOINCApp();
break;
-
+
case SaverState_LaunchingCoreClient:
if (m_wasAlreadyRunning) {
setSSMessageText(ConnectingCCMsg);
} else {
setSSMessageText(LaunchingCCMsg);
}
-
+
myPid = getClientPID();
if (myPid) {
saverState = SaverState_CoreClientRunning;
if (!rpc->init(NULL)) { // Initialize communications with Core Client
m_bConnected = true;
-
+
if (strlen(passwd_buf)) {
retval = rpc->authorize(passwd_buf);
if (retval) {
@@ -502,7 +502,7 @@ int CScreensaver::getSSMessage(char **theMessage, int* coveredFreq) {
} else {
OKToRunOnBatteries = false;
}
-
+
if (OKToRunOnBatteries) {
SetDiscreteGPU(true);
}
@@ -523,15 +523,15 @@ int CScreensaver::getSSMessage(char **theMessage, int* coveredFreq) {
setSSMessageText(RunningOnBatteryMsg);
break;
}
-
+
// RPC called in DataManagementProc()
setSSMessageText(ConnectingCCMsg);
-
+
if (! m_bResetCoreState) {
saverState = SaverState_ConnectedToCoreClient;
}
break;
-
+
case SaverState_ConnectedToCoreClient:
if (IsDualGPUMacbook && RunningOnBattery && !OKToRunOnBatteries) {
setSSMessageText(RunningOnBatteryMsg);
@@ -575,26 +575,26 @@ int CScreensaver::getSSMessage(char **theMessage, int* coveredFreq) {
default:
// m_bErrorMode is TRUE if we should display moving logo (no graphics app is running)
// m_bErrorMode is FALSE if a graphics app was launched and has not exit
- if (! m_bErrorMode) {
- // NOTE: My tests seem to confirm that the top window is always the first
- // window returned by NSWindowList under OS 10.5 and the second window
- // returned by NSWindowList under OS 10.3.9 and OS 10.4. However, Apple's
- // documentation is unclear whether we can depend on this. So I have
+ if (! m_bErrorMode) {
+ // NOTE: My tests seem to confirm that the top window is always the first
+ // window returned by NSWindowList under OS 10.5 and the second window
+ // returned by NSWindowList under OS 10.3.9 and OS 10.4. However, Apple's
+ // documentation is unclear whether we can depend on this. So I have
// added some safety by doing two things:
- // [1] Only use the NSWindowList test when we have started project or default
+ // [1] Only use the NSWindowList test when we have started project or default
// graphics.
- // [2] Assume that our window is covered 45 seconds after starting project
+ // [2] Assume that our window is covered 45 seconds after starting project
// graphics even if the NSWindowList test did not indicate that is so.
//
- // The -animateOneFrame method in Mac_SaverModuleView.m does the NSWindowList test
+ // The -animateOneFrame method in Mac_SaverModuleView.m does the NSWindowList test
// only if we return a non-zero value for coveredFreq.
//
- // Tell the calling routine to set the frame rate to NOTEXTLOGOFREQUENCY if
+ // Tell the calling routine to set the frame rate to NOTEXTLOGOFREQUENCY if
// NSWindowList indicates that science app graphics window has covered our window.
*coveredFreq = NOTEXTLOGOFREQUENCY;
-
+
if (m_iGraphicsStartingMsgCounter > 0) {
- // Show ScreenSaverAppStartingMsg for GFX_STARTING_MSG_DURATION seconds or until
+ // Show ScreenSaverAppStartingMsg for GFX_STARTING_MSG_DURATION seconds or until
// NSWindowList indicates that science app graphics window has covered our window
setSSMessageText(ScreenSaverAppStartingMsg);
m_iGraphicsStartingMsgCounter--;
@@ -604,7 +604,7 @@ int CScreensaver::getSSMessage(char **theMessage, int* coveredFreq) {
}
} // End if (! m_bErrorMode)
break; // End default case of switch (m_hrError)
-
+
} // end switch (m_hrError)
break; // End case SaverState_ConnectedToCoreClient of switch (saverState)
@@ -621,7 +621,7 @@ int CScreensaver::getSSMessage(char **theMessage, int* coveredFreq) {
setSSMessageText(RunningOnBatteryMsg);
break;
}
-
+
setSSMessageText(CCNotRunningMsg);
break;
@@ -635,13 +635,13 @@ int CScreensaver::getSSMessage(char **theMessage, int* coveredFreq) {
ScreenIsBlanked = true;
}
}
-
+
if (m_MessageText[0]) {
newFrequency = TEXTLOGOFREQUENCY;
} else {
newFrequency = NOTEXTLOGOFREQUENCY;
}
-
+
*theMessage = m_MessageText;
return newFrequency;
}
@@ -659,14 +659,14 @@ void CScreensaver::drawPreview(CGContextRef myContext) {
void CScreensaver::ShutdownSaver() {
DestroyDataManagementThread();
-
+
if (rpc) {
#if 0 // OS X calls closeBOINCSaver() when energy saver puts display
// to sleep, but we want to keep crunching. So don't kill it.
// Code in core client now quits on user activity if screen
// saver launched it (2/28/07).
- // Also, under sandbox security, screensaver doesn't have access
- // to rpc password in gui_rpc_auth.cfg file, so core client won't
+ // Also, under sandbox security, screensaver doesn't have access
+ // to rpc password in gui_rpc_auth.cfg file, so core client won't
// accept rpc->quit from screensaver.
if (m_CoreClientPID && (!m_wasAlreadyRunning)) {
rpc->quit(); // Kill core client if we launched it
@@ -702,22 +702,22 @@ void * CScreensaver::DataManagementProcStub(void* param) {
void CScreensaver::HandleRPCError() {
int retval;
-
+
// Attempt to restart BOINC Client if needed, reinitialize the RPC client and state
rpc->close();
m_bConnected = false;
-
+
if (saverState == SaverState_CantLaunchCoreClient) {
return; // Screensavers can't launch setuid /setgid processes as of Catalina
}
-
- // If Core Client is hung, it might cause RPCs to hang, preventing us from
- // shutting down the Data Management Thread, so don't reinitialize the RPC
+
+ // If Core Client is hung, it might cause RPCs to hang, preventing us from
+ // shutting down the Data Management Thread, so don't reinitialize the RPC
// client if we have told the Data Management Thread to exit.
if (m_bQuitDataManagementProc) {
return;
}
-
+
// Otherwise just reinitialize the RPC client and state and keep trying
if (!rpc->init(NULL)) {
m_bConnected = true;
@@ -733,16 +733,16 @@ void CScreensaver::HandleRPCError() {
bool CScreensaver::CreateDataManagementThread() {
int retval;
-
+
// On dual-GPU Macbook Pros, our OpenGL scrensaver
- // applications trigger a switch to the power-hungry
+ // applications trigger a switch to the power-hungry
// discrete GPU. To extend battery life, don't run
// them when on battery power.
if (IsDualGPUMacbook) {
if (RunningOnBattery && !OKToRunOnBatteries) return true;
if (GPUSelectConnect == IO_OBJECT_NULL) return true;
}
-
+
m_bQuitDataManagementProc = false;
m_bDataManagementProcStopped = false;
@@ -761,7 +761,7 @@ bool CScreensaver::CreateDataManagementThread() {
bool CScreensaver::DestroyDataManagementThread() {
if (!m_hDataManagementThread) return true;
m_bQuitDataManagementProc = true; // Tell DataManagementProc thread to exit
-
+
int maxWait = IsDualGPUMacbook ? 50 : 10;
for (int i=0; igraphics_exec_path)) {
// V6 Graphics
#ifdef __APPLE__
graphics_application = 0;
-
+
// As of OS 10.15 (Catalina) screensavers can no longer:
// - launch apps that run setuid or setgid
- // - launch apps downloaded from the Internet which have not been
+ // - launch apps downloaded from the Internet which have not been
// specifically approved by the user via Gatekeeper.
- // So instead of launching graphics apps via gfx_switcher, we send an
+ // So instead of launching graphics apps via gfx_switcher, we send an
// RPC to the client asking the client to launch them via gfx_switcher.
// See comments in gfx_switcher.cpp for a more detailed explanation.
// We have tested this on OS 10.13 High Sierra and it works there, too
@@ -295,10 +295,10 @@ int CScreensaver::launch_screensaver(RESULT* rp, PROCESS_REF& graphics_applicati
return -1;
}
// fprintf(stderr, "launch_screensaver got pid %d\n", graphics_application);
- // Inform our helper app what we launched
+ // Inform our helper app what we launched
fprintf(m_gfx_Cleanup_IPC, "%d\n", graphics_application);
fflush(m_gfx_Cleanup_IPC);
-
+
if (graphics_application) {
launchedGfxApp(rp->graphics_exec_path, graphics_application, rp->slot);
}
@@ -325,16 +325,16 @@ int CScreensaver::launch_screensaver(RESULT* rp, PROCESS_REF& graphics_applicati
int CScreensaver::terminate_v6_screensaver(PROCESS_REF graphics_application) {
#ifdef __APPLE__
pid_t thePID;
-
+
// As of OS 10.15 (Catalina) screensavers can no longer launch apps
- // that run setuid or setgid. So instead of killing graphics apps
- // via gfx_switcher, we send an RPC to the client asking the client
+ // that run setuid or setgid. So instead of killing graphics apps
+ // via gfx_switcher, we send an RPC to the client asking the client
// to kill them via switcher.
// We have tested this on OS 10.13 High Sierra and it works there, too
//
// As of MacOS 13.0 Ventura IOSurface cannot be used to share graphics
// between apps unless they are running as the same user, so we no
- // longer run the graphics apps as user boinc_master, so we might be
+ // longer run the graphics apps as user boinc_master, so we might be
// able to just call kill_program(graphics_application).
//
int ignore;
@@ -350,7 +350,7 @@ int CScreensaver::terminate_v6_screensaver(PROCESS_REF graphics_application) {
// fprintf(stderr, "stopping pid %d\n", thePID);
rpc->run_graphics_app("stop", thePID, gUserName);
- // Inform our helper app that we have stopped current graphics app
+ // Inform our helper app that we have stopped current graphics app
fprintf(m_gfx_Cleanup_IPC, "0\n");
fflush(m_gfx_Cleanup_IPC);
@@ -362,7 +362,7 @@ int CScreensaver::terminate_v6_screensaver(PROCESS_REF graphics_application) {
break;
}
}
- pthread_mutex_unlock(&saver_mutex);
+ pthread_mutex_unlock(&saver_mutex);
#endif
#ifdef _WIN32
@@ -403,13 +403,13 @@ int CScreensaver::terminate_screensaver(PROCESS_REF graphics_application) {
//
int CScreensaver::launch_default_screensaver(char *dir_path, PROCESS_REF& graphics_application) {
int retval = 0;
-
+
#ifdef __APPLE__
// As of OS 10.15 (Catalina) screensavers can no longer:
// - launch apps that run setuid or setgid
- // - launch apps downloaded from the Internet which have not been
+ // - launch apps downloaded from the Internet which have not been
// specifically approved by the user via Gatekeeper.
- // So instead of launching graphics apps via gfx_switcher, we send an
+ // So instead of launching graphics apps via gfx_switcher, we send an
// RPC to the client asking the client to launch them via gfx_switcher.
// See comments in gfx_switcher.cpp for a more detailed explanation.
// We have tested this on OS 10.13 High Sierra and it works there, too
@@ -431,16 +431,16 @@ int CScreensaver::launch_default_screensaver(char *dir_path, PROCESS_REF& graphi
return -1;
}
// fprintf(stderr, "launch_screensaver got pid %d\n", graphics_application);
- // Inform our helper app what we launched
+ // Inform our helper app what we launched
fprintf(m_gfx_Cleanup_IPC, "%d\n", graphics_application);
fflush(m_gfx_Cleanup_IPC);
-
+
if (graphics_application) {
launchedGfxApp("boincscr", graphics_application, -1);
}
BOINCTRACE(_T("launch_default_screensaver returned %d\n"), retval);
-
+
#else
char* argv[4];
char full_path[1024];
@@ -461,7 +461,7 @@ int CScreensaver::launch_default_screensaver(char *dir_path, PROCESS_REF& graphi
} else {
num_args = 2;
}
-
+
retval = run_program(
dir_path,
full_path,
@@ -469,7 +469,7 @@ int CScreensaver::launch_default_screensaver(char *dir_path, PROCESS_REF& graphi
argv,
graphics_application
);
-
+
BOINCTRACE(_T("launch_default_screensaver %s returned %d\n"), full_path, retval);
#endif
@@ -489,13 +489,13 @@ int CScreensaver::terminate_default_screensaver(PROCESS_REF graphics_application
// If we cannot connect to the core client:
-// - we retry connecting every 10 seconds
-// - we launch the default graphics application with the argument --retry_connect, so
+// - we retry connecting every 10 seconds
+// - we launch the default graphics application with the argument --retry_connect, so
// it will continue running and will also retry connecting every 10 seconds.
//
-// If we successfully connected to the core client, launch the default graphics application
-// without the argument --retry_connect. If it can't connect, it will return immediately
-// with the exit code ERR_CONNECT. In that case, we assume it was blocked by a firewall
+// If we successfully connected to the core client, launch the default graphics application
+// without the argument --retry_connect. If it can't connect, it will return immediately
+// with the exit code ERR_CONNECT. In that case, we assume it was blocked by a firewall
// and so we run only project (science) graphics.
DataMgmtProcType CScreensaver::DataManagementProc() {
@@ -510,7 +510,7 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
double default_phase_start_time = 0.0;
double science_phase_start_time = 0.0;
double last_change_time = 0.0;
- // If we run default screensaver during science phase because no science graphics
+ // If we run default screensaver during science phase because no science graphics
// are available, then shorten next default graphics phase by that much time.
double default_saver_start_time_in_science_phase = 0.0;
double default_saver_duration_in_science_phase = 0.0;
@@ -519,7 +519,7 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
bool switch_to_default_gfx = false;
bool killing_default_gfx = false;
int exit_status = 0;
-
+
char* default_ss_dir_path = NULL;
char full_path[1024];
@@ -552,7 +552,7 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
ss_shmem->gfx_pid = 0;
ss_shmem->gfx_slot = -1;
}
-
+
if (!IsUserMemberOfGroup(gUserName, "boinc_master")) canAccessProjectGFXApps = false;
if (!IsUserMemberOfGroup(gUserName, "boinc_project")) canAccessProjectGFXApps = false;
if (!canAccessProjectGFXApps) m_bShow_default_ss_first = true;
@@ -563,13 +563,13 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
strlcpy(full_path, default_ss_dir_path, sizeof(full_path));
strlcat(full_path, PATH_SEPARATOR, sizeof(full_path));
strlcat(full_path, THE_DEFAULT_SS_EXECUTABLE, sizeof(full_path));
-
+
if (boinc_file_exists(full_path)) {
m_bDefault_ss_exists = true;
} else {
SetError(TRUE, SCRAPPERR_CANTLAUNCHDEFAULTGFXAPP); // No GFX App is running: show moving BOINC logo
}
-
+
if (m_bDefault_ss_exists && m_bShow_default_ss_first) {
ss_phase = DEFAULT_SS_PHASE;
default_phase_start_time = dtime();
@@ -628,7 +628,7 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
if (!m_bConnected) {
HandleRPCError();
}
-
+
if (m_bConnected) {
// Do we need to get the core client state?
if (m_bResetCoreState) {
@@ -642,7 +642,7 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
m_bResetCoreState = false;
}
}
-
+
// Update our task list
retval = rpc->get_screensaver_tasks(suspend_reason, results);
if (retval) {
@@ -654,7 +654,7 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
} else {
results.clear();
}
-
+
// Time to switch to default graphics phase?
if (m_bDefault_ss_exists && (ss_phase == SCIENCE_SS_PHASE) && (m_fGFXDefaultPeriod > 0)) {
if (science_phase_start_time && ((dtime() - science_phase_start_time) > m_fGFXSciencePeriod)) {
@@ -666,16 +666,16 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
science_phase_start_time = 0;
if (m_bDefault_gfx_running && default_saver_start_time_in_science_phase) {
// Remember how long default graphics ran during science phase
- default_saver_duration_in_science_phase += (dtime() - default_saver_start_time_in_science_phase);
+ default_saver_duration_in_science_phase += (dtime() - default_saver_start_time_in_science_phase);
}
default_saver_start_time_in_science_phase = 0;
}
}
-
+
// Time to switch to science graphics phase?
if ((ss_phase == DEFAULT_SS_PHASE) && m_bConnected && (m_fGFXSciencePeriod > 0)) {
- if (default_phase_start_time &&
- ((dtime() - default_phase_start_time + default_saver_duration_in_science_phase)
+ if (default_phase_start_time &&
+ ((dtime() - default_phase_start_time + default_saver_duration_in_science_phase)
> m_fGFXDefaultPeriod)) {
// BOINCTRACE(_T("CScreensaver::Ending Default phase: now=%f, default_phase_start_time=%f, default_saver_duration_in_science_phase=%f\n"),
// dtime(), default_phase_start_time, default_saver_duration_in_science_phase);
@@ -701,7 +701,7 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
}
}
}
-
+
#ifdef __APPLE__
// If user is not a member of both group bonc_master and group boinc_project, then
// it can't access the project graphics apps (via slots and projects directories.)
@@ -715,7 +715,7 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
}
}
#endif
-
+
if (switch_to_default_gfx) {
if (m_bScience_gfx_running) {
if (m_hGraphicsApplication || previous_result_ptr) {
@@ -751,7 +751,7 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
}
if ((ss_phase == SCIENCE_SS_PHASE) && !switch_to_default_gfx) {
-
+
#if SIMULATE_NO_GRAPHICS /* FOR TESTING */
if (!m_bDefault_gfx_running) {
@@ -765,7 +765,7 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
if (m_bScience_gfx_running) {
// Is the current graphics app's associated task still running?
-
+
if ((m_hGraphicsApplication) || (graphics_app_result_ptr)) {
iResultCount = (int)results.results.size();
graphics_app_result_ptr = NULL;
@@ -785,7 +785,7 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
// V6 graphics only: if worker application has stopped running, terminate_screensaver
if ((graphics_app_result_ptr == NULL) && (m_hGraphicsApplication != 0)) {
if (previous_result_ptr) {
- BOINCTRACE(_T("CScreensaver::DataManagementProc - %s finished\n"),
+ BOINCTRACE(_T("CScreensaver::DataManagementProc - %s finished\n"),
previous_result.graphics_exec_path
);
}
@@ -803,7 +803,7 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
if (last_change_time && (m_fGFXChangePeriod > 0) && ((dtime() - last_change_time) > m_fGFXChangePeriod) ) {
if (count_active_graphic_apps(results, previous_result_ptr) > 0) {
if (previous_result_ptr) {
- BOINCTRACE(_T("CScreensaver::DataManagementProc - time to change: %s / %s\n"),
+ BOINCTRACE(_T("CScreensaver::DataManagementProc - time to change: %s / %s\n"),
previous_result.name, previous_result.graphics_exec_path
);
}
@@ -820,7 +820,7 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
}
}
} // End if (m_bScience_gfx_running)
-
+
// If no current graphics app, pick an active task at random
// and launch its graphics app
//
@@ -846,7 +846,7 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
killing_default_gfx = true;
// Remember how long default graphics ran during science phase
if (default_saver_start_time_in_science_phase) {
- default_saver_duration_in_science_phase += (dtime() - default_saver_start_time_in_science_phase);
+ default_saver_duration_in_science_phase += (dtime() - default_saver_start_time_in_science_phase);
//BOINCTRACE(_T("CScreensaver::During Science phase: now=%f, default_saver_start_time=%f, default_saver_duration=%f\n"),
// dtime(), default_saver_start_time_in_science_phase, default_saver_duration_in_science_phase);
}
@@ -866,12 +866,12 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
SetError(FALSE, SCRAPPERR_BOINCSCREENSAVERLOADING);
last_change_time = dtime();
m_bScience_gfx_running = true;
- // Make a local copy of current result, since original pointer
+ // Make a local copy of current result, since original pointer
// may have been freed by the time we perform later tests
previous_result = *graphics_app_result_ptr;
previous_result_ptr = &previous_result;
if (previous_result_ptr) {
- BOINCTRACE(_T("CScreensaver::DataManagementProc - launching %s\n"),
+ BOINCTRACE(_T("CScreensaver::DataManagementProc - launching %s\n"),
previous_result.graphics_exec_path
);
}
@@ -880,7 +880,7 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
} else {
if (!m_bDefault_gfx_running) {
// We can't run a science graphics app, so run the default graphics if available
- SetError(TRUE, m_hrError);
+ SetError(TRUE, m_hrError);
if (m_bDefault_ss_exists) {
switch_to_default_gfx = true;
}
@@ -911,9 +911,9 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
}
}
} // End if ((ss_phase == SCIENCE_SS_PHASE) && !switch_to_default_gfx)
-
-
-
+
+
+
// Is the graphics app still running?
if (m_hGraphicsApplication) {
if (HasProcessExited(m_hGraphicsApplication, exit_status)) {
@@ -922,7 +922,7 @@ DataMgmtProcType CScreensaver::DataManagementProc() {
BOINCTRACE(_T("CScreensaver::DataManagementProc - Graphics application isn't running, start a new one.\n"));
if (m_bDefault_gfx_running) {
// If we were able to connect to core client
- // but gfx app can't, don't use it.
+ // but gfx app can't, don't use it.
//
BOINCTRACE(_T("CScreensaver::DataManagementProc - Default graphics application exited with code %d.\n"), exit_status);
if (!killing_default_gfx) { // If this is an unexpected exit
@@ -968,17 +968,17 @@ BOOL CScreensaver::HasProcessExited(HANDLE pid_handle, int &exitCode) {
}
#else
bool CScreensaver::HasProcessExited(pid_t pid, int &exitCode) {
- // Only the process which launched an app can use waitpid() to test
- // whether that app is still running. If we sent an RPC to the client
- // asking the client to launch a graphics app via switcher, we must
+ // Only the process which launched an app can use waitpid() to test
+ // whether that app is still running. If we sent an RPC to the client
+ // asking the client to launch a graphics app via switcher, we must
// send another RPC to the client to call waitpid() for that app.
//
if (ss_shmem) {
if (ss_shmem->gfx_pid != 0) return false;
if (ss_shmem->gfx_slot > -1) { // -1 means Default GFX, which has no slot number
- // Graphics apps called by screensaver or Manager (via Show
+ // Graphics apps called by screensaver or Manager (via Show
// Graphics button) now write files in their slot directory as
- // the logged in user, not boinc_master. This ugly hack tells
+ // the logged in user, not boinc_master. This ugly hack tells
// BOINC client to fix all ownerships in this slot directory
rpc->run_graphics_app("stop", ss_shmem->gfx_slot, "");
ss_shmem->gfx_pid = 0;
@@ -1014,7 +1014,7 @@ void CScreensaver::GetDefaultDisplayPeriods(struct ss_periods &periods) {
f = boinc_fopen(buf, "r");
if (!f) return;
-
+
mf.init_file(f);
XML_PARSER xp(&mf);
@@ -1025,7 +1025,7 @@ void CScreensaver::GetDefaultDisplayPeriods(struct ss_periods &periods) {
if (xp.parse_double("science_gfx_change_interval", periods.GFXChangePeriod)) continue;
}
fclose(f);
-
+
BOINCTRACE(
_T("CScreensaver::GetDefaultDisplayPeriods: m_bShow_default_ss_first=%d, m_fGFXDefaultPeriod=%f, m_fGFXSciencePeriod=%f, m_fGFXChangePeriod=%f\n"),
(int)periods.Show_default_ss_first,
diff --git a/clientscr/screensaver.h b/clientscr/screensaver.h
index 5e8a8e44e8c..d705b984f08 100644
--- a/clientscr/screensaver.h
+++ b/clientscr/screensaver.h
@@ -14,7 +14,7 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see .
-//
+//
#ifndef __SCREENSAVER_H__
#define __SCREENSAVER_H__
@@ -41,7 +41,7 @@ enum SS_PHASE {
#define SCRAPPERR_BOINCNOTGRAPHICSCAPABLE 0x82000004
#define SCRAPPERR_BOINCNOAPPSEXECUTING 0x82000005
#define SCRAPPERR_BOINCNOPROJECTSDETECTED 0x82000006
-#define SCRAPPERR_BOINCNOGRAPHICSAPPSEXECUTING 0x82000007
+#define SCRAPPERR_BOINCNOGRAPHICSAPPSEXECUTING 0x82000007
#define SCRAPPERR_BOINCAPPFOUNDGRAPHICSLOADING 0x82000009
#define SCRAPPERR_BOINCSHUTDOWNEVENT 0x8200000a
#define SCRAPPERR_NOPREVIEW 0x8200000f
diff --git a/clientscr/screensaver_win.cpp b/clientscr/screensaver_win.cpp
index 0f2f62a38fa..0ad32a524e3 100644
--- a/clientscr/screensaver_win.cpp
+++ b/clientscr/screensaver_win.cpp
@@ -14,7 +14,7 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see .
-//
+//
// Contributor(s):
// DirectX 8.1 Screen Saver Framework from Microsoft.
// Microsoft Knowledge Base Article - 79212
@@ -87,7 +87,7 @@ INT WINAPI WinMain(
// Run Screensaver
retval = BOINCSS.Run();
-
+
// Cleanup any existing screensaver objects and handles
BOINCTRACE("WinMain - Cleanup Screensaver Resources\n");
BOINCSS.Cleanup();
@@ -106,7 +106,7 @@ CScreensaver::CScreensaver() {
m_dwSaverMouseMoveCount = 0;
m_hWnd = NULL;
m_hWndParent = NULL;
-
+
m_bAllScreensSame = FALSE;
m_bWindowed = FALSE;
m_bWaitForInputIdle = FALSE;
@@ -162,7 +162,7 @@ HRESULT CScreensaver::Create(HINSTANCE hInstance) {
BOINC_DIAG_HEAPCHECKENABLED |
BOINC_DIAG_MEMORYLEAKCHECKENABLED |
#endif
- BOINC_DIAG_DUMPCALLSTACKENABLED |
+ BOINC_DIAG_DUMPCALLSTACKENABLED |
BOINC_DIAG_PERUSERLOGFILES |
BOINC_DIAG_REDIRECTSTDERR |
BOINC_DIAG_REDIRECTSTDOUT |
@@ -189,7 +189,7 @@ HRESULT CScreensaver::Create(HINSTANCE hInstance) {
// Get project-defined default values for GFXDefaultPeriod, GFXSciencePeriod, GFXChangePeriod
GetDefaultDisplayPeriods(periods);
m_bShow_default_ss_first = periods.Show_default_ss_first;
-
+
// Get the last set of saved values, if not set
// use the configuration file, if not set, use defaults.
// Normalize on Seconds...
@@ -247,7 +247,7 @@ HRESULT CScreensaver::Create(HINSTANCE hInstance) {
if (m_dwBlankTime > 0) {
m_dwBlankTime = (DWORD)time(0) + m_dwBlankTime;
}
-
+
// Create the infrastructure mutexes so we can properly acquire them to report
// errors
if (!CreateInfrastructureMutexes()) {
@@ -257,7 +257,7 @@ HRESULT CScreensaver::Create(HINSTANCE hInstance) {
if (rpc == NULL) rpc = new RPC_CLIENT;
// Create the screen saver window(s)
- if (m_SaverMode == sm_preview ||
+ if (m_SaverMode == sm_preview ||
m_SaverMode == sm_full
) {
if (FAILED(hr = CreateSaverWindow())) {
@@ -266,7 +266,7 @@ HRESULT CScreensaver::Create(HINSTANCE hInstance) {
}
if (m_SaverMode == sm_preview) {
- // In preview mode, "pause" (enter a limited message loop) briefly
+ // In preview mode, "pause" (enter a limited message loop) briefly
// before proceeding, so the display control panel knows to update itself.
m_bWaitForInputIdle = TRUE;
@@ -392,7 +392,7 @@ SaverMode CScreensaver::ParseCommandLine(TCHAR* pstrCommandLine) {
BOINCTRACE("ParseCommandLine: '%s'\n", pstrCommandLine);
- // Skip the first part of the command line, which is the full path
+ // Skip the first part of the command line, which is the full path
// to the exe. If it contains spaces, it will be contained in quotes.
if (*pstrCommandLine == _T('\"')) {
pstrCommandLine++;
@@ -485,10 +485,10 @@ SaverMode CScreensaver::ParseCommandLine(TCHAR* pstrCommandLine) {
-// Determine HMONITOR, desktop rect, and other info for each monitor.
-// Note that EnumDisplayDevices enumerates monitors in the order
-// indicated on the Settings page of the Display control panel, which
-// is the order we want to list monitors in, as opposed to the order
+// Determine HMONITOR, desktop rect, and other info for each monitor.
+// Note that EnumDisplayDevices enumerates monitors in the order
+// indicated on the Settings page of the Display control panel, which
+// is the order we want to list monitors in, as opposed to the order
// used by D3D's GetAdapterInfo.
//
VOID CScreensaver::EnumMonitors(VOID) {
@@ -521,7 +521,7 @@ VOID CScreensaver::EnumMonitors(VOID) {
dispdev2.DeviceString,
sizeof(pMonitorInfoNew->strMonitorName) * sizeof(TCHAR)
);
-
+
if (dispdev.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) {
EnumDisplaySettings(dispdev.DeviceName, ENUM_CURRENT_SETTINGS, &devmode);
if (dispdev.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) {
@@ -558,7 +558,7 @@ BOOL CScreensaver::UtilGetRegKey(LPCTSTR name, DWORD& keyval) {
error = RegOpenKeyEx(
HKEY_CURRENT_USER,
- _T("SOFTWARE\\Space Sciences Laboratory, U.C. Berkeley\\BOINC Screensaver"),
+ _T("SOFTWARE\\Space Sciences Laboratory, U.C. Berkeley\\BOINC Screensaver"),
0,
KEY_ALL_ACCESS,
&boinc_key
@@ -585,7 +585,7 @@ BOOL CScreensaver::UtilSetRegKey(LPCTSTR name, DWORD value) {
error = RegCreateKeyEx(
HKEY_CURRENT_USER,
- _T("SOFTWARE\\Space Sciences Laboratory, U.C. Berkeley\\BOINC Screensaver"),
+ _T("SOFTWARE\\Space Sciences Laboratory, U.C. Berkeley\\BOINC Screensaver"),
0,
NULL,
REG_OPTION_NON_VOLATILE,
@@ -614,9 +614,9 @@ BOOL CScreensaver::UtilGetRegDirectoryStr(LPCTSTR szTargetName, std::string& str
// change the current directory to the boinc data directory if it exists
lReturnValue = RegOpenKeyEx(
- HKEY_LOCAL_MACHINE,
+ HKEY_LOCAL_MACHINE,
_T("SOFTWARE\\Space Sciences Laboratory, U.C. Berkeley\\BOINC Setup"),
- 0,
+ 0,
KEY_READ,
&hkSetupHive
);
@@ -636,7 +636,7 @@ BOOL CScreensaver::UtilGetRegDirectoryStr(LPCTSTR szTargetName, std::string& str
(*lpszRegistryValue) = NULL;
// Now get the data
- lReturnValue = RegQueryValueEx(
+ lReturnValue = RegQueryValueEx(
hkSetupHive,
szTargetName,
NULL,
@@ -690,7 +690,7 @@ BOOL CScreensaver::GetError(
dwWaitResult = WaitForSingleObject(
m_hErrorManagementMutex, // handle to mutex
5000L); // five-second time-out interval
-
+
switch (dwWaitResult) {
// WAIT_OBJECT_0 - The thread got mutex ownership.
case WAIT_OBJECT_0:
@@ -702,17 +702,17 @@ BOOL CScreensaver::GetError(
}
bRetVal = TRUE;
- break;
+ break;
// WAIT_TIMEOUT - Cannot get mutex ownership due to time-out.
// WAIT_ABANDONED - Got ownership of the abandoned mutex object.
- case WAIT_TIMEOUT:
- case WAIT_ABANDONED:
- break;
+ case WAIT_TIMEOUT:
+ case WAIT_ABANDONED:
+ break;
}
ReleaseMutex(m_hErrorManagementMutex);
- return bRetVal;
+ return bRetVal;
}
@@ -731,7 +731,7 @@ BOOL CScreensaver::SetError(BOOL bErrorMode, HRESULT hrError) {
m_hErrorManagementMutex, // handle to mutex
5000L // five-second time-out interval
);
-
+
switch (dwWaitResult) {
// WAIT_OBJECT_0 - The thread got mutex ownership.
case WAIT_OBJECT_0:
@@ -743,16 +743,16 @@ BOOL CScreensaver::SetError(BOOL bErrorMode, HRESULT hrError) {
UpdateErrorBoxText();
bRetVal = TRUE;
- break;
+ break;
// WAIT_TIMEOUT - Cannot get mutex ownership due to time-out.
// WAIT_ABANDONED - Got ownership of the abandoned mutex object.
- case WAIT_TIMEOUT:
- case WAIT_ABANDONED:
- break;
+ case WAIT_TIMEOUT:
+ case WAIT_ABANDONED:
+ break;
}
ReleaseMutex(m_hErrorManagementMutex);
- return bRetVal;
+ return bRetVal;
}
@@ -769,7 +769,7 @@ VOID CScreensaver::UpdateErrorBoxText() {
// Translate an HRESULT error code into a string that can be displayed
-// to explain the error. A class derived from CD3DScreensaver can
+// to explain the error. A class derived from CD3DScreensaver can
// provide its own version of this function that provides app-specific
// error translation instead of or in addition to calling this function.
// This function returns TRUE if a specific error was translated, or
@@ -824,18 +824,18 @@ BOOL CScreensaver::CreateInputActivityThread() {
BOINCTRACE(_T("CScreensaver::CreateInputActivityThread Start\n"));
m_hInputActivityThread = CreateThread(
- NULL, // default security attributes
- 0, // use default stack size
- InputActivityProcStub, // thread function
- NULL, // argument to thread function
- 0, // use default creation flags
- &dwThreadID ); // returns the thread identifier
-
+ NULL, // default security attributes
+ 0, // use default stack size
+ InputActivityProcStub, // thread function
+ NULL, // argument to thread function
+ 0, // use default creation flags
+ &dwThreadID ); // returns the thread identifier
+
if (m_hInputActivityThread == NULL) {
BOINCTRACE(_T("CScreensaver::CreateInputActivityThread: Failed to create input activity thread '%d'\n"), GetLastError());
return FALSE;
}
-
+
m_tThreadCreateTime = time(0);
return TRUE;
}
@@ -927,13 +927,13 @@ BOOL CScreensaver::CreateGraphicsWindowPromotionThread() {
DWORD dwThreadID = 0;
BOINCTRACE(_T("CScreensaver::CreateGraphicsWindowPromotionThread Start\n"));
m_hGraphicsWindowPromotionThread = CreateThread(
- NULL, // default security attributes
- 0, // use default stack size
- GraphicsWindowPromotionProcStub, // thread function
- NULL, // argument to thread function
- 0, // use default creation flags
- &dwThreadID ); // returns the thread identifier
-
+ NULL, // default security attributes
+ 0, // use default stack size
+ GraphicsWindowPromotionProcStub, // thread function
+ NULL, // argument to thread function
+ 0, // use default creation flags
+ &dwThreadID ); // returns the thread identifier
+
if (m_hGraphicsWindowPromotionThread == NULL) {
BOINCTRACE(_T("CScreensaver::CreateGraphicsWindowPromotionThread: Failed to create graphics window promotion thread '%d'\n"), GetLastError());
return FALSE;
@@ -1004,7 +1004,7 @@ DWORD WINAPI CScreensaver::GraphicsWindowPromotionProc() {
//
DWORD dwComponents = BSM_APPLICATIONS;
BroadcastSystemMessage(
- BSF_ALLOWSFW,
+ BSF_ALLOWSFW,
&dwComponents,
WM_BOINCSFW,
NULL,
@@ -1049,13 +1049,13 @@ BOOL CScreensaver::CreateDataManagementThread() {
BOINCTRACE(_T("CScreensaver::CreateDataManagementThread Start\n"));
m_hDataManagementThread = CreateThread(
- NULL, // default security attributes
- 0, // use default stack size
- DataManagementProcStub, // thread function
- NULL, // argument to thread function
- 0, // use default creation flags
- &dwThreadID ); // returns the thread identifier
-
+ NULL, // default security attributes
+ 0, // use default stack size
+ DataManagementProcStub, // thread function
+ NULL, // argument to thread function
+ 0, // use default creation flags
+ &dwThreadID ); // returns the thread identifier
+
if (m_hDataManagementThread == NULL) {
BOINCTRACE(_T("CScreensaver::CreateDataManagementThread: Failed to create data management thread '%d'\n"), GetLastError());
return FALSE;
@@ -1072,7 +1072,7 @@ BOOL CScreensaver::CreateDataManagementThread() {
BOOL CScreensaver::DestroyDataManagementThread() {
BOINCTRACE(_T("CScreensaver::DestoryDataManagementThread: Shutting down... \n"));
- m_bQuitDataManagementProc = true;
+ m_bQuitDataManagementProc = true;
for (int i = 0; i < 50; i++) {
if (m_bDataManagementProcStopped) {
BOINCTRACE(_T("CScreensaver::DestoryDataManagementThread: Thread gracefully shutdown \n"));
@@ -1129,29 +1129,29 @@ HRESULT CScreensaver::CreateSaverWindow() {
// Register an appropriate window class for the primary display
WNDCLASS cls;
cls.hCursor = LoadCursor(NULL, IDC_ARROW);
- cls.hIcon = LoadIcon(m_hInstance, MAKEINTRESOURCE(IDI_MAIN_ICON));
+ cls.hIcon = LoadIcon(m_hInstance, MAKEINTRESOURCE(IDI_MAIN_ICON));
cls.lpszMenuName = NULL;
cls.lpszClassName = _T("BOINCPrimarySaverWndClass");
cls.hbrBackground = (HBRUSH) GetStockObject(BLACK_BRUSH);
- cls.hInstance = m_hInstance;
+ cls.hInstance = m_hInstance;
cls.style = CS_VREDRAW|CS_HREDRAW;
cls.lpfnWndProc = SaverProcStub;
- cls.cbWndExtra = 0;
- cls.cbClsExtra = 0;
+ cls.cbWndExtra = 0;
+ cls.cbClsExtra = 0;
RegisterClass(&cls);
// Register an appropriate window class for the secondary display(s)
WNDCLASS cls2;
cls2.hCursor = LoadCursor(NULL, IDC_ARROW);
- cls2.hIcon = LoadIcon(m_hInstance, MAKEINTRESOURCE(IDI_MAIN_ICON));
+ cls2.hIcon = LoadIcon(m_hInstance, MAKEINTRESOURCE(IDI_MAIN_ICON));
cls2.lpszMenuName = NULL;
cls2.lpszClassName = _T("BOINCGenericSaverWndClass");
cls2.hbrBackground = (HBRUSH) GetStockObject(BLACK_BRUSH);
- cls2.hInstance = m_hInstance;
+ cls2.hInstance = m_hInstance;
cls2.style = CS_VREDRAW|CS_HREDRAW;
cls2.lpfnWndProc = GenericSaverProcStub;
- cls2.cbWndExtra = 0;
- cls2.cbClsExtra = 0;
+ cls2.cbWndExtra = 0;
+ cls2.cbClsExtra = 0;
RegisterClass(&cls2);
// Create the window
@@ -1198,18 +1198,18 @@ HRESULT CScreensaver::CreateSaverWindow() {
continue;
rc = pMonitorInfo->rcScreen;
if (0 == iMonitor) {
- pMonitorInfo->hWnd = CreateWindowEx(NULL, _T("BOINCPrimarySaverWndClass"),
- m_strWindowTitle, dwStyle, rc.left, rc.top, rc.right - rc.left,
+ pMonitorInfo->hWnd = CreateWindowEx(NULL, _T("BOINCPrimarySaverWndClass"),
+ m_strWindowTitle, dwStyle, rc.left, rc.top, rc.right - rc.left,
rc.bottom - rc.top, NULL, NULL, m_hInstance, this);
} else {
- pMonitorInfo->hWnd = CreateWindowEx(NULL, _T("BOINCGenericSaverWndClass"),
- m_strWindowTitle, dwStyle, rc.left, rc.top, rc.right - rc.left,
+ pMonitorInfo->hWnd = CreateWindowEx(NULL, _T("BOINCGenericSaverWndClass"),
+ m_strWindowTitle, dwStyle, rc.left, rc.top, rc.right - rc.left,
rc.bottom - rc.top, NULL, NULL, m_hInstance, this);
}
if (pMonitorInfo->hWnd == NULL) {
return E_FAIL;
}
-
+
if (m_hWnd == NULL) {
m_hWnd = pMonitorInfo->hWnd;
}
@@ -1282,8 +1282,8 @@ LRESULT CScreensaver::SaverProc(
switch (uMsg) {
case WM_TIMER:
BOINCTRACE(_T("CScreensaver::SaverProc Received WM_TIMER\n"));
- switch (wParam) {
- case 1:
+ switch (wParam) {
+ case 1:
// Initial idle time is done, proceed with initialization.
m_bWaitForInputIdle = FALSE;
KillTimer(hWnd, 1);
@@ -1308,8 +1308,8 @@ LRESULT CScreensaver::SaverProc(
PAINTSTRUCT ps;
BeginPaint(hWnd, &ps);
- // In preview mode, just fill
- // the preview window with black, and the BOINC icon.
+ // In preview mode, just fill
+ // the preview window with black, and the BOINC icon.
if (!bErrorMode && m_SaverMode == sm_preview) {
RECT rc;
GetClientRect(hWnd,&rc);
@@ -1371,7 +1371,7 @@ LRESULT CScreensaver::SaverProc(
return 0;
break;
- case WM_SYSCOMMAND:
+ case WM_SYSCOMMAND:
BOINCTRACE(_T("CScreensaver::SaverProc Received WM_SYSCOMMAND\n"));
if (m_SaverMode == sm_full) {
switch (wParam) {
@@ -1442,8 +1442,8 @@ LRESULT CScreensaver::GenericSaverProc(
switch (uMsg) {
case WM_TIMER:
BOINCTRACE(_T("CScreensaver::GenericSaverProc Received WM_TIMER\n"));
- switch (wParam) {
- case 1:
+ switch (wParam) {
+ case 1:
// Initial idle time is done, proceed with initialization.
m_bWaitForInputIdle = FALSE;
KillTimer(hWnd, 1);
@@ -1468,8 +1468,8 @@ LRESULT CScreensaver::GenericSaverProc(
PAINTSTRUCT ps;
BeginPaint(hWnd, &ps);
- // In preview mode, just fill
- // the preview window with black, and the BOINC icon.
+ // In preview mode, just fill
+ // the preview window with black, and the BOINC icon.
if (!bErrorMode && m_SaverMode == sm_preview) {
RECT rc;
GetClientRect(hWnd,&rc);
@@ -1516,7 +1516,7 @@ LRESULT CScreensaver::GenericSaverProc(
return 0;
break;
- case WM_SYSCOMMAND:
+ case WM_SYSCOMMAND:
BOINCTRACE(_T("CScreensaver::GenericSaverProc Received WM_SYSCOMMAND\n"));
if (m_SaverMode == sm_full) {
switch (wParam) {
@@ -1834,16 +1834,16 @@ VOID CScreensaver::UpdateErrorBox() {
(INT)(pMonitorInfo->yError + pMonitorInfo->heightError));
// Update rect velocity
- if ((pMonitorInfo->xError + pMonitorInfo->xVelError * fTimeDelta +
+ if ((pMonitorInfo->xError + pMonitorInfo->xVelError * fTimeDelta +
pMonitorInfo->widthError > rcBounds.right && pMonitorInfo->xVelError > 0.0f) ||
- (pMonitorInfo->xError + pMonitorInfo->xVelError * fTimeDelta <
+ (pMonitorInfo->xError + pMonitorInfo->xVelError * fTimeDelta <
rcBounds.left && pMonitorInfo->xVelError < 0.0f)
) {
pMonitorInfo->xVelError = -pMonitorInfo->xVelError;
}
- if ((pMonitorInfo->yError + pMonitorInfo->yVelError * fTimeDelta +
+ if ((pMonitorInfo->yError + pMonitorInfo->yVelError * fTimeDelta +
pMonitorInfo->heightError > rcBounds.bottom && pMonitorInfo->yVelError > 0.0f) ||
- (pMonitorInfo->yError + pMonitorInfo->yVelError * fTimeDelta <
+ (pMonitorInfo->yError + pMonitorInfo->yVelError * fTimeDelta <
rcBounds.top && pMonitorInfo->yVelError < 0.0f)
) {
pMonitorInfo->yVelError = -pMonitorInfo->yVelError;
@@ -1851,7 +1851,7 @@ VOID CScreensaver::UpdateErrorBox() {
// Update rect position
pMonitorInfo->xError += pMonitorInfo->xVelError * fTimeDelta;
pMonitorInfo->yError += pMonitorInfo->yVelError * fTimeDelta;
-
+
SetRect(&rcNew, (INT)pMonitorInfo->xError, (INT)pMonitorInfo->yError,
(INT)(pMonitorInfo->xError + pMonitorInfo->widthError),
(INT)(pMonitorInfo->yError + pMonitorInfo->heightError));
@@ -1886,7 +1886,7 @@ VOID CScreensaver::DoPaint(HWND hwnd, HDC hdc, LPPAINTSTRUCT lpps) {
return;
}
- // Retrieve the latest piece of error information
+ // Retrieve the latest piece of error information
BOOL bErrorMode;
HRESULT hrError;
TCHAR szError[400];
@@ -1914,7 +1914,7 @@ VOID CScreensaver::DoPaint(HWND hwnd, HDC hdc, LPPAINTSTRUCT lpps) {
return;
}
-
+
SetRect(&rc, (INT)pMonitorInfo->xError, (INT)pMonitorInfo->yError,
(INT)(pMonitorInfo->xError + pMonitorInfo->widthError),
(INT)(pMonitorInfo->yError + pMonitorInfo->heightError)
@@ -1926,7 +1926,7 @@ VOID CScreensaver::DoPaint(HWND hwnd, HDC hdc, LPPAINTSTRUCT lpps) {
rcOrginal = rc;
- // Draw the bitmap rectangle and copy the bitmap into
+ // Draw the bitmap rectangle and copy the bitmap into
// it. the bitmap is centered in the rectangle by adding 2
// to the left and top coordinates of the bitmap rectangle,
// and subtracting 4 from the right and bottom coordinates.
@@ -1952,7 +1952,7 @@ VOID CScreensaver::DoPaint(HWND hwnd, HDC hdc, LPPAINTSTRUCT lpps) {
// Draw text in the center of the frame
SetBkColor(hdc, RGB(0,0,0)); // Black
SetTextColor(hdc, RGB(255,255,255)); // White
-
+
// Set font
HFONT hFont;
hFont = CreateFont(
@@ -1971,7 +1971,7 @@ VOID CScreensaver::DoPaint(HWND hwnd, HDC hdc, LPPAINTSTRUCT lpps) {
DEFAULT_PITCH | FF_SWISS,
"Arial Narrow"
);
-
+
if(hFont) SelectObject(hdc, hFont);
// Try using the "Arial Narrow" font, if that fails use whatever
diff --git a/clientscr/screensaver_win.h b/clientscr/screensaver_win.h
index cf1e5468089..85530ccd380 100644
--- a/clientscr/screensaver_win.h
+++ b/clientscr/screensaver_win.h
@@ -1,4 +1,4 @@
-//
+//
// Contributor(s):
// DirectX 8.1 Screen Saver Framework from Microsoft.
// Microsoft Knowledge Base Article - 79212
@@ -98,7 +98,7 @@ class CScreensaver
//
- // Infrastructure layer
+ // Infrastructure layer
//
protected:
SaverMode ParseCommandLine( TCHAR* pstrCommandLine );
@@ -175,7 +175,7 @@ class CScreensaver
void HandleRPCError(void);
void GetDefaultDisplayPeriods(struct ss_periods &periods);
BOOL HasProcessExited(HANDLE pid_handle, int &exitCode);
-
+
// Determine if two RESULT pointers refer to the same task
bool is_same_task(RESULT* taska, RESULT* taskb);
diff --git a/clientscr/screensaver_x11.cpp b/clientscr/screensaver_x11.cpp
index 8b26c585d5c..ea648c81098 100644
--- a/clientscr/screensaver_x11.cpp
+++ b/clientscr/screensaver_x11.cpp
@@ -68,9 +68,9 @@ class scr_window {
// X screen
xcb_screen_t *scr;
-
+
// window id
- xcb_window_t win;
+ xcb_window_t win;
// text graphics context id
xcb_gcontext_t txt_gc;
@@ -172,7 +172,7 @@ class scr_window {
std::cerr << "Could not configure window." << std::endl;
exit(1);
}
- }
+ }
// open a font. "fixed" should hopefully be available everywhere
font = xcb_generate_id(con);
@@ -226,7 +226,7 @@ class scr_window {
xcb_char2b_t *str = char2b(text);
// get the dimensions of the text
- xcb_query_text_extents_cookie_t cookie =
+ xcb_query_text_extents_cookie_t cookie =
xcb_query_text_extents(con, font, text.size(), str)
;
delete[] str;
@@ -255,7 +255,7 @@ class scr_window {
void resize(uint16_t w, uint16_t h) {
width = w;
height = h;
-
+
// resize client window, if any.
if (client_win) {
// moving the client back to (0, 0) is required when maximizing
@@ -304,7 +304,7 @@ class scr_window {
std::cerr << "Could not reparent client." << std::endl;
exit(1);
}
-
+
// move and resize client window
values[0] = 0;
values[1] = 0;
@@ -349,7 +349,7 @@ void *event_loop(void*) {
xcb_expose_event_t *expose_event
= reinterpret_cast(event)
;
-
+
// ignore the expose event, if there are more waiting.
if (!expose_event->count
&& window
@@ -364,7 +364,7 @@ void *event_loop(void*) {
xcb_configure_notify_event_t *configure_notify_event
= reinterpret_cast(event)
;
-
+
if (window && window->get_window_id() == configure_notify_event->window) {
window->resize(configure_notify_event->width,
configure_notify_event->height
@@ -474,7 +474,7 @@ int main(int argc, char *argv[]) {
// select a random result
int n = random() % results.results.size();
RESULT *result = results.results[n];
-
+
// change to slot dir
std::stringstream stream;
stream << boinc_wd << "/slots/" << result->slot << "/";
@@ -539,9 +539,9 @@ int main(int argc, char *argv[]) {
0, std::numeric_limits::max()
);
reply2 = xcb_get_property_reply(con, cookie, &error);
- if (!error) { // ignore errors
+ if (!error) { // ignore errors
char *command = static_cast(xcb_get_property_value(reply2));
-
+
if (command && graphics_cmd == command) {
client = clients[c];
break;
@@ -556,7 +556,7 @@ int main(int argc, char *argv[]) {
0, std::numeric_limits::max()
);
reply2 = xcb_get_property_reply(con, cookie, &error);
- if (!error) { // ignore errors
+ if (!error) { // ignore errors
char *clas = static_cast(xcb_get_property_value(reply2));
size_t pos = graphics_cmd.find_last_of('/');
@@ -571,7 +571,7 @@ int main(int argc, char *argv[]) {
client = clients[c];
break;
}
-
+
free(reply2);
}
diff --git a/clientscr/ss_app.cpp b/clientscr/ss_app.cpp
index 72d34e02548..3cb97684c50 100644
--- a/clientscr/ss_app.cpp
+++ b/clientscr/ss_app.cpp
@@ -276,7 +276,7 @@ void show_jobs(unsigned int index, double alpha) {
unsigned int i;
cc_status.task_suspend_reason &= ~SUSPEND_REASON_CPU_THROTTLE;
char buf[256];
-
+
if (!cc_status.task_suspend_reason) {
for (i=0; iwww.worldcommunitygrid.org www.ibm.com 120 ");
if ( _tcsstr(pContents, cc602) ) match = true;
- return match;
+ return match;
}
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CACCConfigMd5sum::CACCConfigMd5sum(MSIHANDLE hMSIHandle) :
@@ -65,10 +65,10 @@ CACCConfigMd5sum::CACCConfigMd5sum(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CACCConfigMd5sum::~CACCConfigMd5sum()
@@ -78,10 +78,10 @@ CACCConfigMd5sum::~CACCConfigMd5sum()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CACCConfigMd5sum::OnExecution()
diff --git a/clientsetup/win/CACleanupOldBinaries.cpp b/clientsetup/win/CACleanupOldBinaries.cpp
index 21138e6527f..97a7b09ef4d 100644
--- a/clientsetup/win/CACleanupOldBinaries.cpp
+++ b/clientsetup/win/CACleanupOldBinaries.cpp
@@ -27,10 +27,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CACleanupOldBinaries::CACleanupOldBinaries(MSIHANDLE hMSIHandle) :
@@ -39,10 +39,10 @@ CACleanupOldBinaries::CACleanupOldBinaries(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CACleanupOldBinaries::~CACleanupOldBinaries()
@@ -52,10 +52,10 @@ CACleanupOldBinaries::~CACleanupOldBinaries()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CACleanupOldBinaries::OnExecution()
@@ -85,10 +85,10 @@ UINT CACleanupOldBinaries::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: CleanupOldBinaries
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall CleanupOldBinaries(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CACreateAcctMgrLoginFile.cpp b/clientsetup/win/CACreateAcctMgrLoginFile.cpp
index d506ea718dd..4e1ef412654 100644
--- a/clientsetup/win/CACreateAcctMgrLoginFile.cpp
+++ b/clientsetup/win/CACreateAcctMgrLoginFile.cpp
@@ -28,10 +28,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CACreateAcctMgrLoginFile::CACreateAcctMgrLoginFile(MSIHANDLE hMSIHandle) :
@@ -40,10 +40,10 @@ CACreateAcctMgrLoginFile::CACreateAcctMgrLoginFile(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CACreateAcctMgrLoginFile::~CACreateAcctMgrLoginFile()
@@ -53,10 +53,10 @@ CACreateAcctMgrLoginFile::~CACreateAcctMgrLoginFile()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CACreateAcctMgrLoginFile::OnExecution()
@@ -85,7 +85,7 @@ UINT CACreateAcctMgrLoginFile::OnExecution()
strAcctMgrLoginFile = strDataDirectory + _T("\\acct_mgr_login.xml");
FILE* fAcctMgrLoginFile = _tfopen(strAcctMgrLoginFile.c_str(), _T("w"));
-
+
_ftprintf(
fAcctMgrLoginFile,
_T("\n")
@@ -104,10 +104,10 @@ UINT CACreateAcctMgrLoginFile::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: CreateAcctMgrLoginFile
//
-// Description: This custom action stores the account manager login data
+// Description: This custom action stores the account manager login data
// specified on the commandline in a file in the data
// directory.
//
diff --git a/clientsetup/win/CACreateBOINCAccounts.cpp b/clientsetup/win/CACreateBOINCAccounts.cpp
index 6eb10fbe902..065c8154623 100644
--- a/clientsetup/win/CACreateBOINCAccounts.cpp
+++ b/clientsetup/win/CACreateBOINCAccounts.cpp
@@ -30,10 +30,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CACreateBOINCAccounts::CACreateBOINCAccounts(MSIHANDLE hMSIHandle) :
@@ -42,10 +42,10 @@ CACreateBOINCAccounts::CACreateBOINCAccounts(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CACreateBOINCAccounts::~CACreateBOINCAccounts()
@@ -55,10 +55,10 @@ CACreateBOINCAccounts::~CACreateBOINCAccounts()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CACreateBOINCAccounts::OnExecution()
@@ -114,7 +114,7 @@ UINT CACreateBOINCAccounts::OnExecution()
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -127,7 +127,7 @@ UINT CACreateBOINCAccounts::OnExecution()
if (strBOINCMasterAccountUsername.empty()) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -146,7 +146,7 @@ UINT CACreateBOINCAccounts::OnExecution()
if (strBOINCMasterAccountPassword.empty()) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -163,7 +163,7 @@ UINT CACreateBOINCAccounts::OnExecution()
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -188,7 +188,7 @@ UINT CACreateBOINCAccounts::OnExecution()
if (NERR_Success != nasReturnValue) {
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -200,7 +200,7 @@ UINT CACreateBOINCAccounts::OnExecution()
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -231,7 +231,7 @@ UINT CACreateBOINCAccounts::OnExecution()
if (NERR_Success != nasReturnValue) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -239,7 +239,7 @@ UINT CACreateBOINCAccounts::OnExecution()
);
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
dwParameterError,
@@ -247,7 +247,7 @@ UINT CACreateBOINCAccounts::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -276,7 +276,7 @@ UINT CACreateBOINCAccounts::OnExecution()
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -289,7 +289,7 @@ UINT CACreateBOINCAccounts::OnExecution()
if (strBOINCProjectAccountUsername.empty()) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -308,7 +308,7 @@ UINT CACreateBOINCAccounts::OnExecution()
if (strBOINCProjectAccountPassword.empty()) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -325,7 +325,7 @@ UINT CACreateBOINCAccounts::OnExecution()
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -350,7 +350,7 @@ UINT CACreateBOINCAccounts::OnExecution()
if (NERR_Success != nasReturnValue) {
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -362,7 +362,7 @@ UINT CACreateBOINCAccounts::OnExecution()
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -393,7 +393,7 @@ UINT CACreateBOINCAccounts::OnExecution()
if (NERR_Success != nasReturnValue) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -401,7 +401,7 @@ UINT CACreateBOINCAccounts::OnExecution()
);
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
dwParameterError,
@@ -409,7 +409,7 @@ UINT CACreateBOINCAccounts::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -454,7 +454,7 @@ UINT CACreateBOINCAccounts::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: CreateBOINCAccounts
//
// Description: This custom action creates the two user accounts that'll
diff --git a/clientsetup/win/CACreateBOINCGroups.cpp b/clientsetup/win/CACreateBOINCGroups.cpp
index e533f0ed79f..5f176cbfb8f 100644
--- a/clientsetup/win/CACreateBOINCGroups.cpp
+++ b/clientsetup/win/CACreateBOINCGroups.cpp
@@ -29,10 +29,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CACreateBOINCGroups::CACreateBOINCGroups(MSIHANDLE hMSIHandle) :
@@ -41,10 +41,10 @@ CACreateBOINCGroups::CACreateBOINCGroups(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CACreateBOINCGroups::~CACreateBOINCGroups()
@@ -54,10 +54,10 @@ CACreateBOINCGroups::~CACreateBOINCGroups()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CACreateBOINCGroups::OnExecution()
@@ -102,11 +102,11 @@ UINT CACreateBOINCGroups::OnExecution()
SECURITY_BUILTIN_DOMAIN_RID,
DOMAIN_ALIAS_RID_ADMINS,
0, 0, 0, 0, 0, 0,
- &pAdminSID))
+ &pAdminSID))
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -116,11 +116,11 @@ UINT CACreateBOINCGroups::OnExecution()
}
// Create a SID for the current logged in user.
- if(!ConvertStringSidToSid(strUserSID.c_str(), &pInstallingUserSID))
+ if(!ConvertStringSidToSid(strUserSID.c_str(), &pInstallingUserSID))
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -136,7 +136,7 @@ UINT CACreateBOINCGroups::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -154,7 +154,7 @@ UINT CACreateBOINCGroups::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -183,7 +183,7 @@ UINT CACreateBOINCGroups::OnExecution()
if ((NERR_Success != nasReturnValue) && (ERROR_ALIAS_EXISTS != nasReturnValue)) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -191,7 +191,7 @@ UINT CACreateBOINCGroups::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -220,7 +220,7 @@ UINT CACreateBOINCGroups::OnExecution()
if ((NERR_Success != nasReturnValue) && (ERROR_MEMBER_IN_ALIAS != nasReturnValue)) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -228,7 +228,7 @@ UINT CACreateBOINCGroups::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -250,7 +250,7 @@ UINT CACreateBOINCGroups::OnExecution()
if ((NERR_Success != nasReturnValue) && (ERROR_MEMBER_IN_ALIAS != nasReturnValue)) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -258,7 +258,7 @@ UINT CACreateBOINCGroups::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -282,7 +282,7 @@ UINT CACreateBOINCGroups::OnExecution()
if ((NERR_Success != nasReturnValue) && (ERROR_MEMBER_IN_ALIAS != nasReturnValue)) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -290,7 +290,7 @@ UINT CACreateBOINCGroups::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -319,7 +319,7 @@ UINT CACreateBOINCGroups::OnExecution()
if ((NERR_Success != nasReturnValue) && (ERROR_ALIAS_EXISTS != nasReturnValue)) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -327,7 +327,7 @@ UINT CACreateBOINCGroups::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -358,7 +358,7 @@ UINT CACreateBOINCGroups::OnExecution()
if ((NERR_Success != nasReturnValue) && (ERROR_ALIAS_EXISTS != nasReturnValue)) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -366,7 +366,7 @@ UINT CACreateBOINCGroups::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -399,7 +399,7 @@ UINT CACreateBOINCGroups::OnExecution()
if ((NERR_Success != nasReturnValue) && (ERROR_MEMBER_IN_ALIAS != nasReturnValue)) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -407,7 +407,7 @@ UINT CACreateBOINCGroups::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -427,7 +427,7 @@ UINT CACreateBOINCGroups::OnExecution()
if ((NERR_Success != nasReturnValue) && (ERROR_MEMBER_IN_ALIAS != nasReturnValue)) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -435,7 +435,7 @@ UINT CACreateBOINCGroups::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -457,7 +457,7 @@ UINT CACreateBOINCGroups::OnExecution()
if ((NERR_Success != nasReturnValue) && (ERROR_MEMBER_IN_ALIAS != nasReturnValue)) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -465,7 +465,7 @@ UINT CACreateBOINCGroups::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -493,7 +493,7 @@ UINT CACreateBOINCGroups::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: CreateBOINCGroups
//
// Description: This custom action creates the three user groups that'll
diff --git a/clientsetup/win/CACreateClientAuthFile.cpp b/clientsetup/win/CACreateClientAuthFile.cpp
index e3059a6e2d7..f014630f4ee 100644
--- a/clientsetup/win/CACreateClientAuthFile.cpp
+++ b/clientsetup/win/CACreateClientAuthFile.cpp
@@ -28,10 +28,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CACreateClientAuthFile::CACreateClientAuthFile(MSIHANDLE hMSIHandle) :
@@ -40,10 +40,10 @@ CACreateClientAuthFile::CACreateClientAuthFile(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CACreateClientAuthFile::~CACreateClientAuthFile()
@@ -53,10 +53,10 @@ CACreateClientAuthFile::~CACreateClientAuthFile()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CACreateClientAuthFile::OnExecution()
@@ -108,7 +108,7 @@ UINT CACreateClientAuthFile::OnExecution()
{
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -119,7 +119,7 @@ UINT CACreateClientAuthFile::OnExecution()
{
LogMessage(
INSTALLMESSAGE_FATALEXIT,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -141,7 +141,7 @@ UINT CACreateClientAuthFile::OnExecution()
{
LogMessage(
INSTALLMESSAGE_FATALEXIT,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -166,7 +166,7 @@ UINT CACreateClientAuthFile::OnExecution()
{
LogMessage(
INSTALLMESSAGE_FATALEXIT,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -177,14 +177,14 @@ UINT CACreateClientAuthFile::OnExecution()
CA2W pszUnicodeEncodedPassword( szBuffer );
_sntprintf(
- szMessage,
+ szMessage,
sizeof(szMessage),
_T("(Unicode) Base64 Encoded String: '%s'"),
pszUnicodeEncodedPassword.m_psz
);
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -193,7 +193,7 @@ UINT CACreateClientAuthFile::OnExecution()
FILE* fClientAuthFile = NULL;
fClientAuthFile = _tfopen(strClientAuthFile.c_str(), _T("w"));
-
+
_ftprintf(
fClientAuthFile,
_T("\n")
@@ -215,7 +215,7 @@ UINT CACreateClientAuthFile::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: CreateClientAuthFile
//
// Description: This custom action stores the 'boinc_project' account
diff --git a/clientsetup/win/CACreateProjectInitFile.cpp b/clientsetup/win/CACreateProjectInitFile.cpp
index 8e61f451b2a..3b756f30c59 100644
--- a/clientsetup/win/CACreateProjectInitFile.cpp
+++ b/clientsetup/win/CACreateProjectInitFile.cpp
@@ -30,10 +30,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CACreateProjectInitFile::CACreateProjectInitFile(MSIHANDLE hMSIHandle) :
@@ -42,10 +42,10 @@ CACreateProjectInitFile::CACreateProjectInitFile(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CACreateProjectInitFile::~CACreateProjectInitFile()
@@ -55,10 +55,10 @@ CACreateProjectInitFile::~CACreateProjectInitFile()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CACreateProjectInitFile::OnExecution()
@@ -88,7 +88,7 @@ UINT CACreateProjectInitFile::OnExecution()
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -138,10 +138,10 @@ UINT CACreateProjectInitFile::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: CreateProjectInitFile
//
-// Description: This custom action stores the project init data
+// Description: This custom action stores the project init data
// specified on the commandline in a file in the data
// directory.
//
diff --git a/clientsetup/win/CADeleteBOINCAccounts.cpp b/clientsetup/win/CADeleteBOINCAccounts.cpp
index 60c625f0e09..66031d630eb 100644
--- a/clientsetup/win/CADeleteBOINCAccounts.cpp
+++ b/clientsetup/win/CADeleteBOINCAccounts.cpp
@@ -30,10 +30,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CADeleteBOINCAccounts::CADeleteBOINCAccounts(MSIHANDLE hMSIHandle) :
@@ -42,10 +42,10 @@ CADeleteBOINCAccounts::CADeleteBOINCAccounts(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CADeleteBOINCAccounts::~CADeleteBOINCAccounts()
@@ -55,10 +55,10 @@ CADeleteBOINCAccounts::~CADeleteBOINCAccounts()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CADeleteBOINCAccounts::OnExecution()
@@ -79,7 +79,7 @@ UINT CADeleteBOINCAccounts::OnExecution()
{
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -99,7 +99,7 @@ UINT CADeleteBOINCAccounts::OnExecution()
if (NERR_Success != nasReturnValue) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -107,7 +107,7 @@ UINT CADeleteBOINCAccounts::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -127,7 +127,7 @@ UINT CADeleteBOINCAccounts::OnExecution()
if (NERR_Success != nasReturnValue) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -135,7 +135,7 @@ UINT CADeleteBOINCAccounts::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -149,7 +149,7 @@ UINT CADeleteBOINCAccounts::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: DeleteBOINCAccounts
//
// Description: This custom action delete the two user accounts that
diff --git a/clientsetup/win/CADeleteBOINCGroups.cpp b/clientsetup/win/CADeleteBOINCGroups.cpp
index df5c3d6cf5a..bb3ff294a8b 100644
--- a/clientsetup/win/CADeleteBOINCGroups.cpp
+++ b/clientsetup/win/CADeleteBOINCGroups.cpp
@@ -29,10 +29,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CADeleteBOINCGroups::CADeleteBOINCGroups(MSIHANDLE hMSIHandle) :
@@ -41,10 +41,10 @@ CADeleteBOINCGroups::CADeleteBOINCGroups(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CADeleteBOINCGroups::~CADeleteBOINCGroups()
@@ -54,10 +54,10 @@ CADeleteBOINCGroups::~CADeleteBOINCGroups()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CADeleteBOINCGroups::OnExecution()
@@ -69,7 +69,7 @@ UINT CADeleteBOINCGroups::OnExecution()
{
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -89,7 +89,7 @@ UINT CADeleteBOINCGroups::OnExecution()
if ((NERR_Success != nasReturnValue) && (ERROR_ALIAS_EXISTS != nasReturnValue)) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -97,7 +97,7 @@ UINT CADeleteBOINCGroups::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -106,7 +106,7 @@ UINT CADeleteBOINCGroups::OnExecution()
return ERROR_INSTALL_FAILURE;
}
- // Delete the 'boinc_users'
+ // Delete the 'boinc_users'
//
nasReturnValue = NetLocalGroupDel(
NULL,
@@ -116,7 +116,7 @@ UINT CADeleteBOINCGroups::OnExecution()
if ((NERR_Success != nasReturnValue) && (ERROR_ALIAS_EXISTS != nasReturnValue)) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -124,7 +124,7 @@ UINT CADeleteBOINCGroups::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -143,7 +143,7 @@ UINT CADeleteBOINCGroups::OnExecution()
if ((NERR_Success != nasReturnValue) && (ERROR_ALIAS_EXISTS != nasReturnValue)) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -151,7 +151,7 @@ UINT CADeleteBOINCGroups::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
nasReturnValue,
@@ -165,7 +165,7 @@ UINT CADeleteBOINCGroups::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: DeleteBOINCGroups
//
// Description: This custom action deletes the three user groups that
diff --git a/clientsetup/win/CAGetAdministratorsGroupName.cpp b/clientsetup/win/CAGetAdministratorsGroupName.cpp
index a38b9db148f..95781a837f9 100644
--- a/clientsetup/win/CAGetAdministratorsGroupName.cpp
+++ b/clientsetup/win/CAGetAdministratorsGroupName.cpp
@@ -28,10 +28,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAGetAdministratorsGroupName::CAGetAdministratorsGroupName(MSIHANDLE hMSIHandle) :
@@ -40,10 +40,10 @@ CAGetAdministratorsGroupName::CAGetAdministratorsGroupName(MSIHANDLE hMSIHandle)
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAGetAdministratorsGroupName::~CAGetAdministratorsGroupName()
@@ -53,10 +53,10 @@ CAGetAdministratorsGroupName::~CAGetAdministratorsGroupName()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CAGetAdministratorsGroupName::OnExecution()
@@ -78,7 +78,7 @@ UINT CAGetAdministratorsGroupName::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -97,7 +97,7 @@ UINT CAGetAdministratorsGroupName::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: GetAdministratorsGroupName
//
// Description: This custom action looks up the administrators group
diff --git a/clientsetup/win/CAGetUsersGroupName.cpp b/clientsetup/win/CAGetUsersGroupName.cpp
index 4debe2b8c28..c34d2b5223c 100644
--- a/clientsetup/win/CAGetUsersGroupName.cpp
+++ b/clientsetup/win/CAGetUsersGroupName.cpp
@@ -29,10 +29,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAGetUsersGroupName::CAGetUsersGroupName(MSIHANDLE hMSIHandle) :
@@ -41,10 +41,10 @@ CAGetUsersGroupName::CAGetUsersGroupName(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAGetUsersGroupName::~CAGetUsersGroupName()
@@ -54,10 +54,10 @@ CAGetUsersGroupName::~CAGetUsersGroupName()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CAGetUsersGroupName::OnExecution()
@@ -79,7 +79,7 @@ UINT CAGetUsersGroupName::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -98,7 +98,7 @@ UINT CAGetUsersGroupName::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: GetUsersGroupName
//
// Description: This custom action looks up the users group
diff --git a/clientsetup/win/CAGrantBOINCAdminsRights.cpp b/clientsetup/win/CAGrantBOINCAdminsRights.cpp
index fc98e75e55b..1962bc3874e 100644
--- a/clientsetup/win/CAGrantBOINCAdminsRights.cpp
+++ b/clientsetup/win/CAGrantBOINCAdminsRights.cpp
@@ -29,10 +29,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAGrantBOINCAdminsRights::CAGrantBOINCAdminsRights(MSIHANDLE hMSIHandle) :
@@ -41,10 +41,10 @@ CAGrantBOINCAdminsRights::CAGrantBOINCAdminsRights(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAGrantBOINCAdminsRights::~CAGrantBOINCAdminsRights()
@@ -54,10 +54,10 @@ CAGrantBOINCAdminsRights::~CAGrantBOINCAdminsRights()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CAGrantBOINCAdminsRights::OnExecution()
@@ -84,7 +84,7 @@ UINT CAGrantBOINCAdminsRights::OnExecution()
L"boinc_admins", // account to obtain SID
&pSid // buffer to allocate to contain resultant SID
)
- )
+ )
{
//
@@ -112,7 +112,7 @@ UINT CAGrantBOINCAdminsRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -124,7 +124,7 @@ UINT CAGrantBOINCAdminsRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -138,7 +138,7 @@ UINT CAGrantBOINCAdminsRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -163,7 +163,7 @@ UINT CAGrantBOINCAdminsRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -179,7 +179,7 @@ UINT CAGrantBOINCAdminsRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -199,7 +199,7 @@ UINT CAGrantBOINCAdminsRights::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: GrantBOINCAdminsRights
//
// Description: This custom action grants the 'boinc_admins' group the
diff --git a/clientsetup/win/CAGrantBOINCAdminsVirtualBoxRights.cpp b/clientsetup/win/CAGrantBOINCAdminsVirtualBoxRights.cpp
index b53724d0378..14ab71a04f3 100644
--- a/clientsetup/win/CAGrantBOINCAdminsVirtualBoxRights.cpp
+++ b/clientsetup/win/CAGrantBOINCAdminsVirtualBoxRights.cpp
@@ -29,10 +29,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAGrantBOINCAdminsVirtualBoxRights::CAGrantBOINCAdminsVirtualBoxRights(MSIHANDLE hMSIHandle) :
@@ -41,10 +41,10 @@ CAGrantBOINCAdminsVirtualBoxRights::CAGrantBOINCAdminsVirtualBoxRights(MSIHANDLE
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAGrantBOINCAdminsVirtualBoxRights::~CAGrantBOINCAdminsVirtualBoxRights()
@@ -54,10 +54,10 @@ CAGrantBOINCAdminsVirtualBoxRights::~CAGrantBOINCAdminsVirtualBoxRights()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CAGrantBOINCAdminsVirtualBoxRights::OnExecution()
@@ -81,7 +81,7 @@ UINT CAGrantBOINCAdminsVirtualBoxRights::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: GrantBOINCAdminsVirtualBoxRights
//
// Description: This custom action grants the 'boinc_admins' group the
diff --git a/clientsetup/win/CAGrantBOINCMasterRights.cpp b/clientsetup/win/CAGrantBOINCMasterRights.cpp
index cae86697574..bce5c185a7d 100644
--- a/clientsetup/win/CAGrantBOINCMasterRights.cpp
+++ b/clientsetup/win/CAGrantBOINCMasterRights.cpp
@@ -29,10 +29,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAGrantBOINCMasterRights::CAGrantBOINCMasterRights(MSIHANDLE hMSIHandle) :
@@ -41,10 +41,10 @@ CAGrantBOINCMasterRights::CAGrantBOINCMasterRights(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAGrantBOINCMasterRights::~CAGrantBOINCMasterRights()
@@ -54,10 +54,10 @@ CAGrantBOINCMasterRights::~CAGrantBOINCMasterRights()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CAGrantBOINCMasterRights::OnExecution()
@@ -88,7 +88,7 @@ UINT CAGrantBOINCMasterRights::OnExecution()
strBOINCMasterAccountUsername.c_str(), // account to obtain SID
&pSid // buffer to allocate to contain resultant SID
)
- )
+ )
{
//
@@ -107,7 +107,7 @@ UINT CAGrantBOINCMasterRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -121,7 +121,7 @@ UINT CAGrantBOINCMasterRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -139,7 +139,7 @@ UINT CAGrantBOINCMasterRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -183,7 +183,7 @@ UINT CAGrantBOINCMasterRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -203,7 +203,7 @@ UINT CAGrantBOINCMasterRights::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: GrantBOINCMasterRights
//
// Description: This custom action reads the BOINC_MASTER_USERNAME
diff --git a/clientsetup/win/CAGrantBOINCProjectRights.cpp b/clientsetup/win/CAGrantBOINCProjectRights.cpp
index 90eb761b1c6..d1a6294372a 100644
--- a/clientsetup/win/CAGrantBOINCProjectRights.cpp
+++ b/clientsetup/win/CAGrantBOINCProjectRights.cpp
@@ -29,10 +29,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAGrantBOINCProjectRights::CAGrantBOINCProjectRights(MSIHANDLE hMSIHandle) :
@@ -41,10 +41,10 @@ CAGrantBOINCProjectRights::CAGrantBOINCProjectRights(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAGrantBOINCProjectRights::~CAGrantBOINCProjectRights()
@@ -54,10 +54,10 @@ CAGrantBOINCProjectRights::~CAGrantBOINCProjectRights()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CAGrantBOINCProjectRights::OnExecution()
@@ -88,7 +88,7 @@ UINT CAGrantBOINCProjectRights::OnExecution()
strBOINCProjectAccountUsername.c_str(), // account to obtain SID
&pSid // buffer to allocate to contain resultant SID
)
- )
+ )
{
//
@@ -107,7 +107,7 @@ UINT CAGrantBOINCProjectRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -119,7 +119,7 @@ UINT CAGrantBOINCProjectRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -131,7 +131,7 @@ UINT CAGrantBOINCProjectRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -149,7 +149,7 @@ UINT CAGrantBOINCProjectRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -192,7 +192,7 @@ UINT CAGrantBOINCProjectRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -212,7 +212,7 @@ UINT CAGrantBOINCProjectRights::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: GrantBOINCProjectRights
//
// Description: This custom action reads the BOINC_PROJECT_USERNAME
diff --git a/clientsetup/win/CAGrantBOINCProjectsRights.cpp b/clientsetup/win/CAGrantBOINCProjectsRights.cpp
index a103838a27a..64c27e968bb 100644
--- a/clientsetup/win/CAGrantBOINCProjectsRights.cpp
+++ b/clientsetup/win/CAGrantBOINCProjectsRights.cpp
@@ -29,10 +29,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAGrantBOINCProjectsRights::CAGrantBOINCProjectsRights(MSIHANDLE hMSIHandle) :
@@ -41,10 +41,10 @@ CAGrantBOINCProjectsRights::CAGrantBOINCProjectsRights(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAGrantBOINCProjectsRights::~CAGrantBOINCProjectsRights()
@@ -54,10 +54,10 @@ CAGrantBOINCProjectsRights::~CAGrantBOINCProjectsRights()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CAGrantBOINCProjectsRights::OnExecution()
@@ -84,7 +84,7 @@ UINT CAGrantBOINCProjectsRights::OnExecution()
tstring(L"boinc_projects").c_str(), // account to obtain SID
&pSid // buffer to allocate to contain resultant SID
)
- )
+ )
{
//
@@ -121,7 +121,7 @@ UINT CAGrantBOINCProjectsRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -158,7 +158,7 @@ UINT CAGrantBOINCProjectsRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -178,7 +178,7 @@ UINT CAGrantBOINCProjectsRights::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: GrantBOINCProjectsRights
//
// Description: This custom action grants the 'boinc_projects' group the
diff --git a/clientsetup/win/CAGrantBOINCProjectsVirtualBoxRights.cpp b/clientsetup/win/CAGrantBOINCProjectsVirtualBoxRights.cpp
index 70787395f6b..5bff1f56a56 100644
--- a/clientsetup/win/CAGrantBOINCProjectsVirtualBoxRights.cpp
+++ b/clientsetup/win/CAGrantBOINCProjectsVirtualBoxRights.cpp
@@ -29,10 +29,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAGrantBOINCProjectsVirtualBoxRights::CAGrantBOINCProjectsVirtualBoxRights(MSIHANDLE hMSIHandle) :
@@ -41,10 +41,10 @@ CAGrantBOINCProjectsVirtualBoxRights::CAGrantBOINCProjectsVirtualBoxRights(MSIHA
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAGrantBOINCProjectsVirtualBoxRights::~CAGrantBOINCProjectsVirtualBoxRights()
@@ -54,10 +54,10 @@ CAGrantBOINCProjectsVirtualBoxRights::~CAGrantBOINCProjectsVirtualBoxRights()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CAGrantBOINCProjectsVirtualBoxRights::OnExecution()
@@ -81,7 +81,7 @@ UINT CAGrantBOINCProjectsVirtualBoxRights::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: GrantBOINCProjectsVirtualBoxRights
//
// Description: This custom action grants the 'boinc_projects' group the
diff --git a/clientsetup/win/CAGrantBOINCUsersRights.cpp b/clientsetup/win/CAGrantBOINCUsersRights.cpp
index 018ff621d86..df34c08ea38 100644
--- a/clientsetup/win/CAGrantBOINCUsersRights.cpp
+++ b/clientsetup/win/CAGrantBOINCUsersRights.cpp
@@ -29,10 +29,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAGrantBOINCUsersRights::CAGrantBOINCUsersRights(MSIHANDLE hMSIHandle) :
@@ -41,10 +41,10 @@ CAGrantBOINCUsersRights::CAGrantBOINCUsersRights(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAGrantBOINCUsersRights::~CAGrantBOINCUsersRights()
@@ -54,10 +54,10 @@ CAGrantBOINCUsersRights::~CAGrantBOINCUsersRights()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CAGrantBOINCUsersRights::OnExecution()
@@ -84,7 +84,7 @@ UINT CAGrantBOINCUsersRights::OnExecution()
L"boinc_users", // account to obtain SID
&pSid // buffer to allocate to contain resultant SID
)
- )
+ )
{
//
@@ -119,7 +119,7 @@ UINT CAGrantBOINCUsersRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -133,7 +133,7 @@ UINT CAGrantBOINCUsersRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -149,7 +149,7 @@ UINT CAGrantBOINCUsersRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -176,7 +176,7 @@ UINT CAGrantBOINCUsersRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -194,7 +194,7 @@ UINT CAGrantBOINCUsersRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -214,7 +214,7 @@ UINT CAGrantBOINCUsersRights::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: GrantBOINCUsersRights
//
// Description: This custom action grants the 'boinc_users' group the
diff --git a/clientsetup/win/CALaunchBOINCManager.cpp b/clientsetup/win/CALaunchBOINCManager.cpp
index 2e0c47c36fb..007e8e48f8e 100644
--- a/clientsetup/win/CALaunchBOINCManager.cpp
+++ b/clientsetup/win/CALaunchBOINCManager.cpp
@@ -27,10 +27,10 @@
#define CUSTOMACTION_PROGRESSTITLE _T("Launching BOINC Manager")
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CALaunchBOINCManager::CALaunchBOINCManager(MSIHANDLE hMSIHandle) :
@@ -39,10 +39,10 @@ CALaunchBOINCManager::CALaunchBOINCManager(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CALaunchBOINCManager::~CALaunchBOINCManager()
@@ -52,10 +52,10 @@ CALaunchBOINCManager::~CALaunchBOINCManager()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
@@ -87,10 +87,10 @@ UINT CALaunchBOINCManager::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: LaunchBOINCManager
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall LaunchBOINCManager(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CALaunchBOINCTray.cpp b/clientsetup/win/CALaunchBOINCTray.cpp
index 6aa5b8f0132..63a5fc45b11 100644
--- a/clientsetup/win/CALaunchBOINCTray.cpp
+++ b/clientsetup/win/CALaunchBOINCTray.cpp
@@ -27,10 +27,10 @@
#define CUSTOMACTION_PROGRESSTITLE _T("Launching BOINC Tray")
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CALaunchBOINCTray::CALaunchBOINCTray(MSIHANDLE hMSIHandle) :
@@ -39,10 +39,10 @@ CALaunchBOINCTray::CALaunchBOINCTray(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CALaunchBOINCTray::~CALaunchBOINCTray()
@@ -52,10 +52,10 @@ CALaunchBOINCTray::~CALaunchBOINCTray()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
@@ -78,10 +78,10 @@ UINT CALaunchBOINCTray::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: LaunchBOINCTray
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall LaunchBOINCTray(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CARestoreExecutionState.cpp b/clientsetup/win/CARestoreExecutionState.cpp
index 63308fa080c..f3493b6ef42 100644
--- a/clientsetup/win/CARestoreExecutionState.cpp
+++ b/clientsetup/win/CARestoreExecutionState.cpp
@@ -27,10 +27,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CARestoreExecutionState::CARestoreExecutionState(MSIHANDLE hMSIHandle) :
@@ -39,10 +39,10 @@ CARestoreExecutionState::CARestoreExecutionState(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CARestoreExecutionState::~CARestoreExecutionState()
@@ -52,10 +52,10 @@ CARestoreExecutionState::~CARestoreExecutionState()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CARestoreExecutionState::OnExecution()
@@ -86,10 +86,10 @@ UINT CARestoreExecutionState::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: RestoreExecutionState
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall RestoreExecutionState(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CARestorePermissionBOINCData.cpp b/clientsetup/win/CARestorePermissionBOINCData.cpp
index 89fc07f1314..e562350d8f8 100644
--- a/clientsetup/win/CARestorePermissionBOINCData.cpp
+++ b/clientsetup/win/CARestorePermissionBOINCData.cpp
@@ -28,10 +28,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CARestorePermissionBOINCData::CARestorePermissionBOINCData(MSIHANDLE hMSIHandle) :
@@ -40,10 +40,10 @@ CARestorePermissionBOINCData::CARestorePermissionBOINCData(MSIHANDLE hMSIHandle)
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CARestorePermissionBOINCData::~CARestorePermissionBOINCData()
@@ -53,10 +53,10 @@ CARestorePermissionBOINCData::~CARestorePermissionBOINCData()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CARestorePermissionBOINCData::OnExecution()
@@ -84,7 +84,7 @@ UINT CARestorePermissionBOINCData::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -99,7 +99,7 @@ UINT CARestorePermissionBOINCData::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -128,11 +128,11 @@ UINT CARestorePermissionBOINCData::OnExecution()
// Create a new ACL that contains the new ACEs.
dwRes = SetEntriesInAcl(ulEntries, &ea[0], NULL, &pACL);
- if (ERROR_SUCCESS != dwRes)
+ if (ERROR_SUCCESS != dwRes)
{
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -140,7 +140,7 @@ UINT CARestorePermissionBOINCData::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -150,7 +150,7 @@ UINT CARestorePermissionBOINCData::OnExecution()
}
// Set the ACL on the Data Directory itself.
- dwRes = SetNamedSecurityInfo(
+ dwRes = SetNamedSecurityInfo(
(LPWSTR)strBOINCDataDirectory.c_str(),
SE_FILE_OBJECT,
DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION,
@@ -159,11 +159,11 @@ UINT CARestorePermissionBOINCData::OnExecution()
pACL,
NULL
);
- if (ERROR_SUCCESS != dwRes)
+ if (ERROR_SUCCESS != dwRes)
{
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -171,7 +171,7 @@ UINT CARestorePermissionBOINCData::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -184,7 +184,7 @@ UINT CARestorePermissionBOINCData::OnExecution()
RecursiveSetPermissions(strBOINCDataDirectory, pACL);
- if (pACL)
+ if (pACL)
LocalFree(pACL);
return ERROR_SUCCESS;
@@ -192,10 +192,10 @@ UINT CARestorePermissionBOINCData::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: RestorePermissionBOINCData
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall RestorePermissionBOINCData(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CARestoreSetupState.cpp b/clientsetup/win/CARestoreSetupState.cpp
index f3ed232f25c..5290ae61b50 100644
--- a/clientsetup/win/CARestoreSetupState.cpp
+++ b/clientsetup/win/CARestoreSetupState.cpp
@@ -27,10 +27,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CARestoreSetupState::CARestoreSetupState(MSIHANDLE hMSIHandle) :
@@ -39,10 +39,10 @@ CARestoreSetupState::CARestoreSetupState(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CARestoreSetupState::~CARestoreSetupState()
@@ -52,10 +52,10 @@ CARestoreSetupState::~CARestoreSetupState()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CARestoreSetupState::OnExecution()
@@ -199,10 +199,10 @@ UINT CARestoreSetupState::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: RestoreSetupState
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall RestoreSetupState(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CARevokeBOINCAdminsRights.cpp b/clientsetup/win/CARevokeBOINCAdminsRights.cpp
index 9f36130c96f..88e97caba66 100644
--- a/clientsetup/win/CARevokeBOINCAdminsRights.cpp
+++ b/clientsetup/win/CARevokeBOINCAdminsRights.cpp
@@ -29,10 +29,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CARevokeBOINCAdminsRights::CARevokeBOINCAdminsRights(MSIHANDLE hMSIHandle) :
@@ -41,10 +41,10 @@ CARevokeBOINCAdminsRights::CARevokeBOINCAdminsRights(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CARevokeBOINCAdminsRights::~CARevokeBOINCAdminsRights()
@@ -54,10 +54,10 @@ CARevokeBOINCAdminsRights::~CARevokeBOINCAdminsRights()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CARevokeBOINCAdminsRights::OnExecution()
@@ -77,7 +77,7 @@ UINT CARevokeBOINCAdminsRights::OnExecution()
L"boinc_admins", // account to obtain SID
&pSid // buffer to allocate to contain resultant SID
)
- )
+ )
{
//
@@ -132,7 +132,7 @@ UINT CARevokeBOINCAdminsRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -152,7 +152,7 @@ UINT CARevokeBOINCAdminsRights::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: RevokeBOINCAdminsRights
//
// Description: This custom action revokes the 'boinc_admins' group the
diff --git a/clientsetup/win/CARevokeBOINCMasterRights.cpp b/clientsetup/win/CARevokeBOINCMasterRights.cpp
index c9510e62a20..2eb7ab468f4 100644
--- a/clientsetup/win/CARevokeBOINCMasterRights.cpp
+++ b/clientsetup/win/CARevokeBOINCMasterRights.cpp
@@ -29,10 +29,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CARevokeBOINCMasterRights::CARevokeBOINCMasterRights(MSIHANDLE hMSIHandle) :
@@ -41,10 +41,10 @@ CARevokeBOINCMasterRights::CARevokeBOINCMasterRights(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CARevokeBOINCMasterRights::~CARevokeBOINCMasterRights()
@@ -54,10 +54,10 @@ CARevokeBOINCMasterRights::~CARevokeBOINCMasterRights()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CARevokeBOINCMasterRights::OnExecution()
@@ -84,7 +84,7 @@ UINT CARevokeBOINCMasterRights::OnExecution()
strBOINCMasterAccountUsername.c_str(), // account to obtain SID
&pSid // buffer to allocate to contain resultant SID
)
- )
+ )
{
//
@@ -139,7 +139,7 @@ UINT CARevokeBOINCMasterRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -159,7 +159,7 @@ UINT CARevokeBOINCMasterRights::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: RevokeBOINCMasterRights
//
// Description: This custom action reads the BOINC_MASTER_USERNAME
diff --git a/clientsetup/win/CARevokeBOINCProjectRights.cpp b/clientsetup/win/CARevokeBOINCProjectRights.cpp
index e44ae12e864..66b293188b9 100644
--- a/clientsetup/win/CARevokeBOINCProjectRights.cpp
+++ b/clientsetup/win/CARevokeBOINCProjectRights.cpp
@@ -29,10 +29,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CARevokeBOINCProjectRights::CARevokeBOINCProjectRights(MSIHANDLE hMSIHandle) :
@@ -41,10 +41,10 @@ CARevokeBOINCProjectRights::CARevokeBOINCProjectRights(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CARevokeBOINCProjectRights::~CARevokeBOINCProjectRights()
@@ -54,10 +54,10 @@ CARevokeBOINCProjectRights::~CARevokeBOINCProjectRights()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CARevokeBOINCProjectRights::OnExecution()
@@ -85,7 +85,7 @@ UINT CARevokeBOINCProjectRights::OnExecution()
strBOINCProjectAccountUsername.c_str(), // account to obtain SID
&pSid // buffer to allocate to contain resultant SID
)
- )
+ )
{
//
@@ -140,7 +140,7 @@ UINT CARevokeBOINCProjectRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -160,7 +160,7 @@ UINT CARevokeBOINCProjectRights::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: RevokeBOINCProjectRights
//
// Description: This custom action reads the BOINC_PROJECT_USERNAME
diff --git a/clientsetup/win/CARevokeBOINCProjectsRights.cpp b/clientsetup/win/CARevokeBOINCProjectsRights.cpp
index b5596d9fa46..4e306d3e897 100644
--- a/clientsetup/win/CARevokeBOINCProjectsRights.cpp
+++ b/clientsetup/win/CARevokeBOINCProjectsRights.cpp
@@ -29,10 +29,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CARevokeBOINCProjectsRights::CARevokeBOINCProjectsRights(MSIHANDLE hMSIHandle) :
@@ -41,10 +41,10 @@ CARevokeBOINCProjectsRights::CARevokeBOINCProjectsRights(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CARevokeBOINCProjectsRights::~CARevokeBOINCProjectsRights()
@@ -54,10 +54,10 @@ CARevokeBOINCProjectsRights::~CARevokeBOINCProjectsRights()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CARevokeBOINCProjectsRights::OnExecution()
@@ -77,7 +77,7 @@ UINT CARevokeBOINCProjectsRights::OnExecution()
L"boinc_projects", // account to obtain SID
&pSid // buffer to allocate to contain resultant SID
)
- )
+ )
{
//
@@ -132,7 +132,7 @@ UINT CARevokeBOINCProjectsRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -152,7 +152,7 @@ UINT CARevokeBOINCProjectsRights::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: RevokeBOINCProjectsRights
//
// Description: This custom action grants the 'boinc_projects' group the
diff --git a/clientsetup/win/CARevokeBOINCUsersRights.cpp b/clientsetup/win/CARevokeBOINCUsersRights.cpp
index 13c970a042f..99d9b26c631 100644
--- a/clientsetup/win/CARevokeBOINCUsersRights.cpp
+++ b/clientsetup/win/CARevokeBOINCUsersRights.cpp
@@ -29,10 +29,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CARevokeBOINCUsersRights::CARevokeBOINCUsersRights(MSIHANDLE hMSIHandle) :
@@ -41,10 +41,10 @@ CARevokeBOINCUsersRights::CARevokeBOINCUsersRights(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CARevokeBOINCUsersRights::~CARevokeBOINCUsersRights()
@@ -54,10 +54,10 @@ CARevokeBOINCUsersRights::~CARevokeBOINCUsersRights()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CARevokeBOINCUsersRights::OnExecution()
@@ -77,7 +77,7 @@ UINT CARevokeBOINCUsersRights::OnExecution()
L"boinc_users", // account to obtain SID
&pSid // buffer to allocate to contain resultant SID
)
- )
+ )
{
//
@@ -132,7 +132,7 @@ UINT CARevokeBOINCUsersRights::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -152,7 +152,7 @@ UINT CARevokeBOINCUsersRights::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: RevokeBOINCUsersRights
//
// Description: This custom action revokes the 'boinc_users' group the
diff --git a/clientsetup/win/CASaveExecutionState.cpp b/clientsetup/win/CASaveExecutionState.cpp
index 5fe974e80b5..69a884299a4 100644
--- a/clientsetup/win/CASaveExecutionState.cpp
+++ b/clientsetup/win/CASaveExecutionState.cpp
@@ -27,10 +27,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CASaveExecutionState::CASaveExecutionState(MSIHANDLE hMSIHandle) :
@@ -39,10 +39,10 @@ CASaveExecutionState::CASaveExecutionState(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CASaveExecutionState::~CASaveExecutionState()
@@ -52,10 +52,10 @@ CASaveExecutionState::~CASaveExecutionState()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CASaveExecutionState::OnExecution()
@@ -93,10 +93,10 @@ UINT CASaveExecutionState::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: SaveExecutionState
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall SaveExecutionState(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CASaveSetupState.cpp b/clientsetup/win/CASaveSetupState.cpp
index 08ce48831af..28d63cbe586 100644
--- a/clientsetup/win/CASaveSetupState.cpp
+++ b/clientsetup/win/CASaveSetupState.cpp
@@ -27,10 +27,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CASaveSetupState::CASaveSetupState(MSIHANDLE hMSIHandle) :
@@ -39,10 +39,10 @@ CASaveSetupState::CASaveSetupState(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CASaveSetupState::~CASaveSetupState()
@@ -52,10 +52,10 @@ CASaveSetupState::~CASaveSetupState()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CASaveSetupState::OnExecution()
@@ -126,10 +126,10 @@ UINT CASaveSetupState::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: SaveSetupState
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall SaveSetupState(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CASetPermissionBOINC.cpp b/clientsetup/win/CASetPermissionBOINC.cpp
index 23d0c791151..748b84fbdad 100644
--- a/clientsetup/win/CASetPermissionBOINC.cpp
+++ b/clientsetup/win/CASetPermissionBOINC.cpp
@@ -28,10 +28,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CASetPermissionBOINC::CASetPermissionBOINC(MSIHANDLE hMSIHandle) :
@@ -40,10 +40,10 @@ CASetPermissionBOINC::CASetPermissionBOINC(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CASetPermissionBOINC::~CASetPermissionBOINC()
@@ -53,10 +53,10 @@ CASetPermissionBOINC::~CASetPermissionBOINC()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CASetPermissionBOINC::OnExecution()
@@ -107,7 +107,7 @@ UINT CASetPermissionBOINC::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -158,11 +158,11 @@ UINT CASetPermissionBOINC::OnExecution()
NULL,
&pSD
);
- if (ERROR_SUCCESS != dwRes)
+ if (ERROR_SUCCESS != dwRes)
{
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -170,7 +170,7 @@ UINT CASetPermissionBOINC::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -181,11 +181,11 @@ UINT CASetPermissionBOINC::OnExecution()
// Create a new ACL that contains the new ACEs and merges the old.
dwRes = SetEntriesInAcl(ulEntries, &ea[0], pOldACL, &pACL);
- if (ERROR_SUCCESS != dwRes)
+ if (ERROR_SUCCESS != dwRes)
{
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -193,7 +193,7 @@ UINT CASetPermissionBOINC::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -203,7 +203,7 @@ UINT CASetPermissionBOINC::OnExecution()
}
// Set the ACL on the Data Directory itself.
- dwRes = SetNamedSecurityInfo(
+ dwRes = SetNamedSecurityInfo(
(LPWSTR)strBOINCInstallDirectory.c_str(),
SE_FILE_OBJECT,
DACL_SECURITY_INFORMATION,
@@ -212,11 +212,11 @@ UINT CASetPermissionBOINC::OnExecution()
pACL,
NULL
);
- if (ERROR_SUCCESS != dwRes)
+ if (ERROR_SUCCESS != dwRes)
{
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -224,7 +224,7 @@ UINT CASetPermissionBOINC::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -237,7 +237,7 @@ UINT CASetPermissionBOINC::OnExecution()
RecursiveSetPermissions(strBOINCInstallDirectory, pACL);
- if (pACL)
+ if (pACL)
LocalFree(pACL);
if (pSD)
LocalFree(pSD);
@@ -247,10 +247,10 @@ UINT CASetPermissionBOINC::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: SetPermissionBOINC
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall SetPermissionBOINC(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CASetPermissionBOINCData.cpp b/clientsetup/win/CASetPermissionBOINCData.cpp
index 029fbe81574..ac4d15fbf9c 100644
--- a/clientsetup/win/CASetPermissionBOINCData.cpp
+++ b/clientsetup/win/CASetPermissionBOINCData.cpp
@@ -28,10 +28,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CASetPermissionBOINCData::CASetPermissionBOINCData(MSIHANDLE hMSIHandle) :
@@ -40,10 +40,10 @@ CASetPermissionBOINCData::CASetPermissionBOINCData(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CASetPermissionBOINCData::~CASetPermissionBOINCData()
@@ -53,10 +53,10 @@ CASetPermissionBOINCData::~CASetPermissionBOINCData()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CASetPermissionBOINCData::OnExecution()
@@ -110,7 +110,7 @@ UINT CASetPermissionBOINCData::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -125,7 +125,7 @@ UINT CASetPermissionBOINCData::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -140,7 +140,7 @@ UINT CASetPermissionBOINCData::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -150,11 +150,11 @@ UINT CASetPermissionBOINCData::OnExecution()
}
// Create a SID for the current logged in user.
- if(!ConvertStringSidToSid(strUserSID.c_str(), &pInstallingUserSID))
+ if(!ConvertStringSidToSid(strUserSID.c_str(), &pInstallingUserSID))
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -265,11 +265,11 @@ UINT CASetPermissionBOINCData::OnExecution()
// Create a new ACL that contains the new ACEs.
dwRes = SetEntriesInAcl(ulEntries, &ea[0], NULL, &pACL);
- if (ERROR_SUCCESS != dwRes)
+ if (ERROR_SUCCESS != dwRes)
{
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -277,7 +277,7 @@ UINT CASetPermissionBOINCData::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -287,7 +287,7 @@ UINT CASetPermissionBOINCData::OnExecution()
}
// Set the ACL on the Data Directory itself.
- dwRes = SetNamedSecurityInfo(
+ dwRes = SetNamedSecurityInfo(
(LPWSTR)strBOINCDataDirectory.c_str(),
SE_FILE_OBJECT,
DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION,
@@ -296,11 +296,11 @@ UINT CASetPermissionBOINCData::OnExecution()
pACL,
NULL
);
- if (ERROR_SUCCESS != dwRes)
+ if (ERROR_SUCCESS != dwRes)
{
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -308,7 +308,7 @@ UINT CASetPermissionBOINCData::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -321,9 +321,9 @@ UINT CASetPermissionBOINCData::OnExecution()
RecursiveSetPermissions(strBOINCDataDirectory, pACL);
- if (pACL)
+ if (pACL)
LocalFree(pACL);
- if (pInstallingUserSID != NULL)
+ if (pInstallingUserSID != NULL)
FreeSid(pInstallingUserSID);
return ERROR_SUCCESS;
@@ -331,10 +331,10 @@ UINT CASetPermissionBOINCData::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: SetPermissionBOINCData
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall SetPermissionBOINCData(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CASetPermissionBOINCDataProjects.cpp b/clientsetup/win/CASetPermissionBOINCDataProjects.cpp
index b424e5c997f..f2f930ce1bd 100644
--- a/clientsetup/win/CASetPermissionBOINCDataProjects.cpp
+++ b/clientsetup/win/CASetPermissionBOINCDataProjects.cpp
@@ -28,10 +28,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CASetPermissionBOINCDataProjects::CASetPermissionBOINCDataProjects(MSIHANDLE hMSIHandle) :
@@ -40,10 +40,10 @@ CASetPermissionBOINCDataProjects::CASetPermissionBOINCDataProjects(MSIHANDLE hMS
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CASetPermissionBOINCDataProjects::~CASetPermissionBOINCDataProjects()
@@ -53,10 +53,10 @@ CASetPermissionBOINCDataProjects::~CASetPermissionBOINCDataProjects()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CASetPermissionBOINCDataProjects::OnExecution()
@@ -116,7 +116,7 @@ UINT CASetPermissionBOINCDataProjects::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -131,7 +131,7 @@ UINT CASetPermissionBOINCDataProjects::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -146,7 +146,7 @@ UINT CASetPermissionBOINCDataProjects::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -211,11 +211,11 @@ UINT CASetPermissionBOINCDataProjects::OnExecution()
// Create a new ACL that contains the new ACEs.
dwRes = SetEntriesInAcl(ulEntries, &ea[0], NULL, &pACL);
- if (ERROR_SUCCESS != dwRes)
+ if (ERROR_SUCCESS != dwRes)
{
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -223,7 +223,7 @@ UINT CASetPermissionBOINCDataProjects::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -233,7 +233,7 @@ UINT CASetPermissionBOINCDataProjects::OnExecution()
}
// Set the ACL on the Data Directory itself.
- dwRes = SetNamedSecurityInfo(
+ dwRes = SetNamedSecurityInfo(
(LPWSTR)strBOINCDataProjectsDirectory.c_str(),
SE_FILE_OBJECT,
DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION,
@@ -242,11 +242,11 @@ UINT CASetPermissionBOINCDataProjects::OnExecution()
pACL,
NULL
);
- if (ERROR_SUCCESS != dwRes)
+ if (ERROR_SUCCESS != dwRes)
{
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -254,7 +254,7 @@ UINT CASetPermissionBOINCDataProjects::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -267,7 +267,7 @@ UINT CASetPermissionBOINCDataProjects::OnExecution()
RecursiveSetPermissions(strBOINCDataProjectsDirectory, pACL);
- if (pACL)
+ if (pACL)
LocalFree(pACL);
return ERROR_SUCCESS;
@@ -275,10 +275,10 @@ UINT CASetPermissionBOINCDataProjects::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: SetPermissionBOINCDataProjects
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall SetPermissionBOINCDataProjects(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CASetPermissionBOINCDataSlots.cpp b/clientsetup/win/CASetPermissionBOINCDataSlots.cpp
index d3f7507f882..44a8e53d749 100644
--- a/clientsetup/win/CASetPermissionBOINCDataSlots.cpp
+++ b/clientsetup/win/CASetPermissionBOINCDataSlots.cpp
@@ -28,10 +28,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CASetPermissionBOINCDataSlots::CASetPermissionBOINCDataSlots(MSIHANDLE hMSIHandle) :
@@ -40,10 +40,10 @@ CASetPermissionBOINCDataSlots::CASetPermissionBOINCDataSlots(MSIHANDLE hMSIHandl
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CASetPermissionBOINCDataSlots::~CASetPermissionBOINCDataSlots()
@@ -53,10 +53,10 @@ CASetPermissionBOINCDataSlots::~CASetPermissionBOINCDataSlots()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CASetPermissionBOINCDataSlots::OnExecution()
@@ -116,7 +116,7 @@ UINT CASetPermissionBOINCDataSlots::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -131,7 +131,7 @@ UINT CASetPermissionBOINCDataSlots::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -146,7 +146,7 @@ UINT CASetPermissionBOINCDataSlots::OnExecution()
{
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -212,11 +212,11 @@ UINT CASetPermissionBOINCDataSlots::OnExecution()
// Create a new ACL that contains the new ACEs.
dwRes = SetEntriesInAcl(ulEntries, &ea[0], NULL, &pACL);
- if (ERROR_SUCCESS != dwRes)
+ if (ERROR_SUCCESS != dwRes)
{
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -224,7 +224,7 @@ UINT CASetPermissionBOINCDataSlots::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -234,7 +234,7 @@ UINT CASetPermissionBOINCDataSlots::OnExecution()
}
// Set the ACL on the Data Directory itself.
- dwRes = SetNamedSecurityInfo(
+ dwRes = SetNamedSecurityInfo(
(LPWSTR)strBOINCDataSlotsDirectory.c_str(),
SE_FILE_OBJECT,
DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION,
@@ -243,11 +243,11 @@ UINT CASetPermissionBOINCDataSlots::OnExecution()
pACL,
NULL
);
- if (ERROR_SUCCESS != dwRes)
+ if (ERROR_SUCCESS != dwRes)
{
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -255,7 +255,7 @@ UINT CASetPermissionBOINCDataSlots::OnExecution()
);
LogMessage(
INSTALLMESSAGE_ERROR,
- NULL,
+ NULL,
NULL,
NULL,
GetLastError(),
@@ -268,7 +268,7 @@ UINT CASetPermissionBOINCDataSlots::OnExecution()
RecursiveSetPermissions(strBOINCDataSlotsDirectory, pACL);
- if (pACL)
+ if (pACL)
LocalFree(pACL);
return ERROR_SUCCESS;
@@ -276,10 +276,10 @@ UINT CASetPermissionBOINCDataSlots::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: SetPermissionBOINCDataSlots
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall SetPermissionBOINCDataSlots(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CAShutdownBOINC.cpp b/clientsetup/win/CAShutdownBOINC.cpp
index 5ac3870061d..2d398663802 100644
--- a/clientsetup/win/CAShutdownBOINC.cpp
+++ b/clientsetup/win/CAShutdownBOINC.cpp
@@ -28,10 +28,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAShutdownBOINC::CAShutdownBOINC(MSIHANDLE hMSIHandle) :
@@ -40,10 +40,10 @@ CAShutdownBOINC::CAShutdownBOINC(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAShutdownBOINC::~CAShutdownBOINC()
@@ -53,10 +53,10 @@ CAShutdownBOINC::~CAShutdownBOINC()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
@@ -93,23 +93,23 @@ UINT CAShutdownBOINC::OnExecution()
SC_HANDLE schService = NULL;
SERVICE_STATUS ssStatus;
- schSCManager = OpenSCManager(
- NULL, // local machine
- NULL, // ServicesActive database
- GENERIC_READ); // full access rights
+ schSCManager = OpenSCManager(
+ NULL, // local machine
+ NULL, // ServicesActive database
+ GENERIC_READ); // full access rights
if (schSCManager)
{
- schService = OpenService(
- schSCManager, // SCM database
+ schService = OpenService(
+ schSCManager, // SCM database
_T("BOINC"), // service name
- GENERIC_READ | GENERIC_EXECUTE);
-
- if (schService)
+ GENERIC_READ | GENERIC_EXECUTE);
+
+ if (schService)
{
if (QueryServiceStatus(schService, &ssStatus))
{
- if (!((SERVICE_STOPPED == ssStatus.dwCurrentState) &&
+ if (!((SERVICE_STOPPED == ssStatus.dwCurrentState) &&
(SERVICE_STOP_PENDING == ssStatus.dwCurrentState)))
{
ControlService(schService, SERVICE_CONTROL_STOP, &ssStatus);
@@ -131,10 +131,10 @@ UINT CAShutdownBOINC::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: ShutdownBOINCManager
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall ShutdownBOINC(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CAShutdownBOINCManager.cpp b/clientsetup/win/CAShutdownBOINCManager.cpp
index 2580996a126..92eae32b687 100644
--- a/clientsetup/win/CAShutdownBOINCManager.cpp
+++ b/clientsetup/win/CAShutdownBOINCManager.cpp
@@ -30,10 +30,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAShutdownBOINCManager::CAShutdownBOINCManager(MSIHANDLE hMSIHandle) :
@@ -42,10 +42,10 @@ CAShutdownBOINCManager::CAShutdownBOINCManager(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAShutdownBOINCManager::~CAShutdownBOINCManager()
@@ -55,10 +55,10 @@ CAShutdownBOINCManager::~CAShutdownBOINCManager()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CAShutdownBOINCManager::OnExecution()
@@ -90,7 +90,7 @@ UINT CAShutdownBOINCManager::OnExecution()
{
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
(int)lrReturnValue,
@@ -108,7 +108,7 @@ UINT CAShutdownBOINCManager::OnExecution()
{
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
uiLoopCounter,
@@ -122,10 +122,10 @@ UINT CAShutdownBOINCManager::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: ShutdownBOINCManager
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall ShutdownBOINCManager(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CAShutdownBOINCScreensaver.cpp b/clientsetup/win/CAShutdownBOINCScreensaver.cpp
index de0047a22fd..9496f049f73 100644
--- a/clientsetup/win/CAShutdownBOINCScreensaver.cpp
+++ b/clientsetup/win/CAShutdownBOINCScreensaver.cpp
@@ -28,10 +28,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAShutdownBOINCScreensaver::CAShutdownBOINCScreensaver(MSIHANDLE hMSIHandle) :
@@ -40,10 +40,10 @@ CAShutdownBOINCScreensaver::CAShutdownBOINCScreensaver(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAShutdownBOINCScreensaver::~CAShutdownBOINCScreensaver()
@@ -53,10 +53,10 @@ CAShutdownBOINCScreensaver::~CAShutdownBOINCScreensaver()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CAShutdownBOINCScreensaver::OnExecution()
@@ -67,10 +67,10 @@ UINT CAShutdownBOINCScreensaver::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: ShutdownBOINCScreensaver
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall ShutdownBOINCScreensaver(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CAShutdownUD.cpp b/clientsetup/win/CAShutdownUD.cpp
index c88ba7cc531..226aa0bf7ab 100644
--- a/clientsetup/win/CAShutdownUD.cpp
+++ b/clientsetup/win/CAShutdownUD.cpp
@@ -28,10 +28,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAShutdownUD::CAShutdownUD(MSIHANDLE hMSIHandle) :
@@ -40,10 +40,10 @@ CAShutdownUD::CAShutdownUD(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAShutdownUD::~CAShutdownUD()
@@ -53,10 +53,10 @@ CAShutdownUD::~CAShutdownUD()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
@@ -68,10 +68,10 @@ UINT CAShutdownUD::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: ShutdownUD
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall ShutdownUD(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CAValidateInstall.cpp b/clientsetup/win/CAValidateInstall.cpp
index 7ad6b4293ea..9909ba5a97d 100644
--- a/clientsetup/win/CAValidateInstall.cpp
+++ b/clientsetup/win/CAValidateInstall.cpp
@@ -27,10 +27,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAValidateInstall::CAValidateInstall(MSIHANDLE hMSIHandle) :
@@ -39,10 +39,10 @@ CAValidateInstall::CAValidateInstall(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAValidateInstall::~CAValidateInstall()
@@ -52,10 +52,10 @@ CAValidateInstall::~CAValidateInstall()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CAValidateInstall::OnExecution()
@@ -92,7 +92,7 @@ UINT CAValidateInstall::OnExecution()
{
SetProperty(_T("RETURN_VALIDATEINSTALL"), _T("0"));
}
-
+
uiReturnValue = GetComponentKeyFilename( _T("_BOINCCMD"), strFilename );
if ( uiReturnValue ) return uiReturnValue;
@@ -101,7 +101,7 @@ UINT CAValidateInstall::OnExecution()
{
SetProperty(_T("RETURN_VALIDATEINSTALL"), _T("0"));
}
-
+
uiReturnValue = GetComponentKeyFilename( _T("_BOINCTray"), strFilename );
if ( uiReturnValue ) return uiReturnValue;
@@ -117,10 +117,10 @@ UINT CAValidateInstall::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
BOOL CAValidateInstall::ValidateExecutable( tstring strExecutable, tstring strDesiredVersion )
@@ -143,7 +143,7 @@ BOOL CAValidateInstall::ValidateExecutable( tstring strExecutable, tstring strDe
_sntprintf(
- szMessage,
+ szMessage,
sizeof(szMessage),
_T("Validating Executable: '%s' Version: '%s'"),
strExecutable.c_str(),
@@ -151,7 +151,7 @@ BOOL CAValidateInstall::ValidateExecutable( tstring strExecutable, tstring strDe
);
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -167,7 +167,7 @@ BOOL CAValidateInstall::ValidateExecutable( tstring strExecutable, tstring strDe
if(GetFileVersionInfo(strExecutable.c_str(), dwHandle, dwSize, lpData)) {
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -180,7 +180,7 @@ BOOL CAValidateInstall::ValidateExecutable( tstring strExecutable, tstring strDe
// Version specified as part of the root record.
if (VerQueryValue(lpData, _T("\\"), (LPVOID*)&pFileInfo, &uiVarSize)) {
- _sntprintf(szVersionInfo, sizeof(szVersionInfo), _T("%d.%d.%d.%d"),
+ _sntprintf(szVersionInfo, sizeof(szVersionInfo), _T("%d.%d.%d.%d"),
HIWORD(pFileInfo->dwFileVersionMS),
LOWORD(pFileInfo->dwFileVersionMS),
HIWORD(pFileInfo->dwFileVersionLS),
@@ -201,14 +201,14 @@ BOOL CAValidateInstall::ValidateExecutable( tstring strExecutable, tstring strDe
}
_sntprintf(
- szMessage,
+ szMessage,
sizeof(szMessage),
_T("Product Version: '%s'"),
szProductVersion
);
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -226,10 +226,10 @@ BOOL CAValidateInstall::ValidateExecutable( tstring strExecutable, tstring strDe
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: ValidateInstall
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall ValidateInstall(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CAValidateRebootRequest.cpp b/clientsetup/win/CAValidateRebootRequest.cpp
index a375b41f102..ed48c511b15 100644
--- a/clientsetup/win/CAValidateRebootRequest.cpp
+++ b/clientsetup/win/CAValidateRebootRequest.cpp
@@ -27,10 +27,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAValidateRebootRequest::CAValidateRebootRequest(MSIHANDLE hMSIHandle) :
@@ -39,10 +39,10 @@ CAValidateRebootRequest::CAValidateRebootRequest(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAValidateRebootRequest::~CAValidateRebootRequest()
@@ -52,10 +52,10 @@ CAValidateRebootRequest::~CAValidateRebootRequest()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CAValidateRebootRequest::OnExecution()
@@ -89,10 +89,10 @@ UINT CAValidateRebootRequest::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: ValidateRebootRequest
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall ValidateRebootRequest(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CAValidateSetupType.cpp b/clientsetup/win/CAValidateSetupType.cpp
index 9512d513dd1..34ad955665f 100644
--- a/clientsetup/win/CAValidateSetupType.cpp
+++ b/clientsetup/win/CAValidateSetupType.cpp
@@ -27,10 +27,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAValidateSetupType::CAValidateSetupType(MSIHANDLE hMSIHandle) :
@@ -39,10 +39,10 @@ CAValidateSetupType::CAValidateSetupType(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAValidateSetupType::~CAValidateSetupType()
@@ -52,10 +52,10 @@ CAValidateSetupType::~CAValidateSetupType()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CAValidateSetupType::OnExecution()
@@ -86,7 +86,7 @@ UINT CAValidateSetupType::OnExecution()
{
LogMessage(
INSTALLMESSAGE_FATALEXIT,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -101,7 +101,7 @@ UINT CAValidateSetupType::OnExecution()
{
LogMessage(
INSTALLMESSAGE_FATALEXIT,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -158,10 +158,10 @@ UINT CAValidateSetupType::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: ValidateSetupType
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall ValidateSetupType(MSIHANDLE hInstall)
diff --git a/clientsetup/win/CAVerifyInstallDirectories.cpp b/clientsetup/win/CAVerifyInstallDirectories.cpp
index 4ec3387c4f0..e54dc37dc91 100644
--- a/clientsetup/win/CAVerifyInstallDirectories.cpp
+++ b/clientsetup/win/CAVerifyInstallDirectories.cpp
@@ -27,10 +27,10 @@
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAVerifyInstallDirectories::CAVerifyInstallDirectories(MSIHANDLE hMSIHandle) :
@@ -39,10 +39,10 @@ CAVerifyInstallDirectories::CAVerifyInstallDirectories(MSIHANDLE hMSIHandle) :
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
CAVerifyInstallDirectories::~CAVerifyInstallDirectories()
@@ -52,10 +52,10 @@ CAVerifyInstallDirectories::~CAVerifyInstallDirectories()
/////////////////////////////////////////////////////////////////////
-//
-// Function:
//
-// Description:
+// Function:
+//
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT CAVerifyInstallDirectories::OnExecution()
@@ -105,29 +105,29 @@ UINT CAVerifyInstallDirectories::OnExecution()
// Perform some basic sanity tests to see if we need to migrate
// anything.
- BOOL bInstallDataSameDirectory =
+ BOOL bInstallDataSameDirectory =
(BOOL)(strInstallDirectory == strDataDirectory);
- BOOL bInstallDirWindowsDirSame =
+ BOOL bInstallDirWindowsDirSame =
(BOOL)(strInstallDirectory == strWindowsDirectory);
- BOOL bDataDirWindowsDirSame =
+ BOOL bDataDirWindowsDirSame =
(BOOL)(strDataDirectory == strWindowsDirectory);
- BOOL bInstallDirSystemDriveSame =
+ BOOL bInstallDirSystemDriveSame =
(BOOL)(strInstallDirectory == strSystemDrive);
- BOOL bDataDirSystemDriveSame =
+ BOOL bDataDirSystemDriveSame =
(BOOL)(strDataDirectory == strSystemDrive);
- BOOL bInstallDirWindowsSystemDirSame =
+ BOOL bInstallDirWindowsSystemDirSame =
(BOOL)(strInstallDirectory == strWindowsSystemDirectory);
- BOOL bDataDirWindowsSystemDirSame =
+ BOOL bDataDirWindowsSystemDirSame =
(BOOL)(strDataDirectory == strWindowsSystemDirectory);
- BOOL bInstallDirProgramFilesDirSame =
+ BOOL bInstallDirProgramFilesDirSame =
(BOOL)(strInstallDirectory == strProgramFilesDirectory);
- BOOL bDataDirProgramFilesDirSame =
+ BOOL bDataDirProgramFilesDirSame =
(BOOL)(strDataDirectory == strProgramFilesDirectory);
if ( bInstallDataSameDirectory ) {
DisplayMessage(
- MB_OK,
+ MB_OK,
MB_ICONERROR,
_T("The program directory and data directory must be different. Please select a different data directory.")
);
@@ -136,7 +136,7 @@ UINT CAVerifyInstallDirectories::OnExecution()
uiReturnValue = ERROR_INSTALL_USEREXIT;
} else if ( bInstallDirWindowsDirSame ) {
DisplayMessage(
- MB_OK,
+ MB_OK,
MB_ICONERROR,
_T("The program directory may not be the Windows directory. Please select a different program directory.")
);
@@ -145,7 +145,7 @@ UINT CAVerifyInstallDirectories::OnExecution()
uiReturnValue = ERROR_INSTALL_USEREXIT;
} else if ( bDataDirWindowsDirSame ) {
DisplayMessage(
- MB_OK,
+ MB_OK,
MB_ICONERROR,
_T("The data directory may not be the Windows directory. Please select a different data directory.")
);
@@ -154,7 +154,7 @@ UINT CAVerifyInstallDirectories::OnExecution()
uiReturnValue = ERROR_INSTALL_USEREXIT;
} else if ( bInstallDirSystemDriveSame ) {
DisplayMessage(
- MB_OK,
+ MB_OK,
MB_ICONERROR,
_T("The program directory may not be the system drive. Please select a different program directory.")
);
@@ -163,7 +163,7 @@ UINT CAVerifyInstallDirectories::OnExecution()
uiReturnValue = ERROR_INSTALL_USEREXIT;
} else if ( bDataDirSystemDriveSame ) {
DisplayMessage(
- MB_OK,
+ MB_OK,
MB_ICONERROR,
_T("The data directory may not be the system drive. Please select a different data directory.")
);
@@ -172,7 +172,7 @@ UINT CAVerifyInstallDirectories::OnExecution()
uiReturnValue = ERROR_INSTALL_USEREXIT;
} else if ( bInstallDirWindowsSystemDirSame ) {
DisplayMessage(
- MB_OK,
+ MB_OK,
MB_ICONERROR,
_T("The program directory may not be the Windows system directory. Please select a different program directory.")
);
@@ -181,7 +181,7 @@ UINT CAVerifyInstallDirectories::OnExecution()
uiReturnValue = ERROR_INSTALL_USEREXIT;
} else if ( bDataDirWindowsSystemDirSame ) {
DisplayMessage(
- MB_OK,
+ MB_OK,
MB_ICONERROR,
_T("The data directory may not be the Windows system directory. Please select a different data directory.")
);
@@ -190,7 +190,7 @@ UINT CAVerifyInstallDirectories::OnExecution()
uiReturnValue = ERROR_INSTALL_USEREXIT;
} else if ( bInstallDirProgramFilesDirSame ) {
DisplayMessage(
- MB_OK,
+ MB_OK,
MB_ICONERROR,
_T("The program directory may not be the program files directory. Please select a different program directory.")
);
@@ -199,7 +199,7 @@ UINT CAVerifyInstallDirectories::OnExecution()
uiReturnValue = ERROR_INSTALL_USEREXIT;
} else if ( bDataDirProgramFilesDirSame ) {
DisplayMessage(
- MB_OK,
+ MB_OK,
MB_ICONERROR,
_T("The data directory may not be the program files directory. Please select a different data directory.")
);
@@ -215,10 +215,10 @@ UINT CAVerifyInstallDirectories::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: VerifyInstallDirectories
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT __stdcall VerifyInstallDirectories(MSIHANDLE hInstall)
diff --git a/clientsetup/win/boinccas.cpp b/clientsetup/win/boinccas.cpp
index 4669145abc7..efda5e0a943 100644
--- a/clientsetup/win/boinccas.cpp
+++ b/clientsetup/win/boinccas.cpp
@@ -23,7 +23,7 @@
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: BOINCCABase::BOINCCABase
//
// Description: Initialize the Custom Action infrastructure.
@@ -31,8 +31,8 @@
/////////////////////////////////////////////////////////////////////
BOINCCABase::BOINCCABase(
- MSIHANDLE hMSIHandle,
- const tstring strActionName,
+ MSIHANDLE hMSIHandle,
+ const tstring strActionName,
const tstring strProgressTitle
)
{
@@ -51,7 +51,7 @@ BOINCCABase::BOINCCABase(
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: BOINCCABase::~BOINCCABase
//
// Description: Cleanup up allocation resources.
@@ -91,10 +91,10 @@ BOINCCABase::~BOINCCABase()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: Execute
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT BOINCCABase::Execute()
@@ -143,10 +143,10 @@ static BOOL IsVersionNewer(const tstring v1, const tstring v2) {
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: SetUpgradeParameters
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT BOINCCABase::SetUpgradeParameters()
@@ -164,10 +164,10 @@ UINT BOINCCABase::SetUpgradeParameters()
}
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: IsUpgrading
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
BOOL BOINCCABase::IsUpgrading()
@@ -187,10 +187,10 @@ BOOL BOINCCABase::IsUpgrading()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: OnInitialize
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT BOINCCABase::OnInitialize()
@@ -234,23 +234,23 @@ UINT BOINCCABase::OnInitialize()
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
_T("Starting Custom Action")
);
-
+
return ERROR_SUCCESS;
}
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: OnCleanup
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT BOINCCABase::OnCleanup()
@@ -260,10 +260,10 @@ UINT BOINCCABase::OnCleanup()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: OnInstall
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT BOINCCABase::OnInstall()
@@ -273,10 +273,10 @@ UINT BOINCCABase::OnInstall()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: OnRollback
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT BOINCCABase::OnRollback()
@@ -286,10 +286,10 @@ UINT BOINCCABase::OnRollback()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: OnCommit
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT BOINCCABase::OnCommit()
@@ -299,10 +299,10 @@ UINT BOINCCABase::OnCommit()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: OnExecution
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT BOINCCABase::OnExecution()
@@ -312,14 +312,14 @@ UINT BOINCCABase::OnExecution()
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: GetRegistryValue
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
-UINT BOINCCABase::GetRegistryValue(
- const tstring strName,
+UINT BOINCCABase::GetRegistryValue(
+ const tstring strName,
tstring& strValue,
bool bDisplayValue
)
@@ -331,9 +331,9 @@ UINT BOINCCABase::GetRegistryValue(
tstring strMessage;
lReturnValue = RegOpenKeyEx(
- HKEY_LOCAL_MACHINE,
- _T("SOFTWARE\\Space Sciences Laboratory, U.C. Berkeley\\BOINC Setup"),
- 0,
+ HKEY_LOCAL_MACHINE,
+ _T("SOFTWARE\\Space Sciences Laboratory, U.C. Berkeley\\BOINC Setup"),
+ 0,
KEY_READ,
&hkSetupHive
);
@@ -354,7 +354,7 @@ UINT BOINCCABase::GetRegistryValue(
(*lpszRegistryValue) = NULL;
// Now get the data
- lReturnValue = RegQueryValueEx(
+ lReturnValue = RegQueryValueEx(
hkSetupHive,
strName.c_str(),
NULL,
@@ -384,7 +384,7 @@ UINT BOINCCABase::GetRegistryValue(
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -396,14 +396,14 @@ UINT BOINCCABase::GetRegistryValue(
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: SetRegistryValue
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
-UINT BOINCCABase::SetRegistryValue(
- const tstring strName,
+UINT BOINCCABase::SetRegistryValue(
+ const tstring strName,
const tstring strValue,
bool bDisplayValue
)
@@ -413,8 +413,8 @@ UINT BOINCCABase::SetRegistryValue(
tstring strMessage;
lReturnValue = RegCreateKeyEx(
- HKEY_LOCAL_MACHINE,
- _T("SOFTWARE\\Space Sciences Laboratory, U.C. Berkeley\\BOINC Setup"),
+ HKEY_LOCAL_MACHINE,
+ _T("SOFTWARE\\Space Sciences Laboratory, U.C. Berkeley\\BOINC Setup"),
0,
NULL,
REG_OPTION_NON_VOLATILE,
@@ -426,7 +426,7 @@ UINT BOINCCABase::SetRegistryValue(
if (lReturnValue != ERROR_SUCCESS) return ERROR_INSTALL_FAILURE;
lReturnValue = RegSetValueEx(
- hkSetupHive,
+ hkSetupHive,
strName.c_str(),
0,
REG_SZ,
@@ -447,7 +447,7 @@ UINT BOINCCABase::SetRegistryValue(
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -459,14 +459,14 @@ UINT BOINCCABase::SetRegistryValue(
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: GetProperty
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
-UINT BOINCCABase::GetProperty(
- const tstring strPropertyName,
+UINT BOINCCABase::GetProperty(
+ const tstring strPropertyName,
tstring& strPropertyValue,
bool bDisplayValue
)
@@ -486,7 +486,7 @@ UINT BOINCCABase::GetProperty(
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -508,7 +508,7 @@ UINT BOINCCABase::GetProperty(
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -532,7 +532,7 @@ UINT BOINCCABase::GetProperty(
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -544,14 +544,14 @@ UINT BOINCCABase::GetProperty(
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: SetProperty
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
-UINT BOINCCABase::SetProperty(
- const tstring strPropertyName,
+UINT BOINCCABase::SetProperty(
+ const tstring strPropertyName,
const tstring strPropertyValue,
bool bDisplayValue
)
@@ -579,7 +579,7 @@ UINT BOINCCABase::SetProperty(
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -599,7 +599,7 @@ UINT BOINCCABase::SetProperty(
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -611,14 +611,14 @@ UINT BOINCCABase::SetProperty(
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: GetComponentKeyFilename
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
-UINT BOINCCABase::GetComponentKeyFilename(
- const tstring strComponentName,
+UINT BOINCCABase::GetComponentKeyFilename(
+ const tstring strComponentName,
tstring& strComponentKeyFilename
)
{
@@ -649,7 +649,7 @@ UINT BOINCCABase::GetComponentKeyFilename(
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -663,7 +663,7 @@ UINT BOINCCABase::GetComponentKeyFilename(
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -685,7 +685,7 @@ UINT BOINCCABase::GetComponentKeyFilename(
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -700,7 +700,7 @@ UINT BOINCCABase::GetComponentKeyFilename(
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -719,10 +719,10 @@ UINT BOINCCABase::GetComponentKeyFilename(
case ERROR_FUNCTION_FAILED:
MsiViewClose(hView);
MsiCloseHandle(hDatabase);
-
+
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -737,7 +737,7 @@ UINT BOINCCABase::GetComponentKeyFilename(
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -756,10 +756,10 @@ UINT BOINCCABase::GetComponentKeyFilename(
case ERROR_FUNCTION_FAILED:
MsiViewClose(hView);
MsiCloseHandle(hDatabase);
-
+
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -774,7 +774,7 @@ UINT BOINCCABase::GetComponentKeyFilename(
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -789,7 +789,7 @@ UINT BOINCCABase::GetComponentKeyFilename(
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -811,7 +811,7 @@ UINT BOINCCABase::GetComponentKeyFilename(
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -827,7 +827,7 @@ UINT BOINCCABase::GetComponentKeyFilename(
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -849,7 +849,7 @@ UINT BOINCCABase::GetComponentKeyFilename(
LogMessage(
INSTALLMESSAGE_INFO,
- NULL,
+ NULL,
NULL,
NULL,
NULL,
@@ -861,10 +861,10 @@ UINT BOINCCABase::GetComponentKeyFilename(
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: DisplayMessage
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
UINT BOINCCABase::DisplayMessage(
@@ -876,8 +876,8 @@ UINT BOINCCABase::DisplayMessage(
UINT uiReturnValue = 0;
uiReturnValue = ::MessageBox(
- NULL,
- strMessage.c_str(),
+ NULL,
+ strMessage.c_str(),
_T("Installer Message"),
uiPushButtonStyle | uiIconStyle | MB_SETFOREGROUND | MB_SERVICE_NOTIFICATION
);
@@ -887,13 +887,13 @@ UINT BOINCCABase::DisplayMessage(
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: LogProgress
//
-// Description:
+// Description:
//
/////////////////////////////////////////////////////////////////////
-UINT BOINCCABase::LogProgress(
+UINT BOINCCABase::LogProgress(
const tstring strProgress
)
{
@@ -914,7 +914,7 @@ UINT BOINCCABase::LogProgress(
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: LogMessage
//
// Description: This function writes to the MSI log file and displays
@@ -943,7 +943,7 @@ UINT BOINCCABase::LogMessage(
// returns IDOK if successful
uiReturnValue = MsiProcessMessage(
- m_hMSIHandle,
+ m_hMSIHandle,
INSTALLMESSAGE(uiInstallMessageType),
m_phLogInfoRec
);
@@ -959,7 +959,7 @@ UINT BOINCCABase::LogMessage(
MsiRecordSetString (phLogErrorRec, 0, _T("[1]"));
MsiRecordSetString (phLogErrorRec, 1, strMessage.c_str());
- // Return value to indicate which button is
+ // Return value to indicate which button is
// pushed on message box
uiReturnValue = MsiProcessMessage(
m_hMSIHandle,
@@ -974,7 +974,7 @@ UINT BOINCCABase::LogMessage(
/////////////////////////////////////////////////////////////////////
-//
+//
// Function: RebootWhenFinished
//
// Description: Reboot computer when setup completes installation.
diff --git a/clientsetup/win/boinccas.def b/clientsetup/win/boinccas.def
index 541595489a5..ccf997d140b 100644
--- a/clientsetup/win/boinccas.def
+++ b/clientsetup/win/boinccas.def
@@ -33,7 +33,7 @@ EXPORTS
SaveSetupState
ShutdownBOINCManager
CleanupOldBinaries
- VerifyInstallDirectories
+ VerifyInstallDirectories
ValidateInstall
ValidateRebootRequest
SaveExecutionState
@@ -49,4 +49,4 @@ EXPORTS
RevokeBOINCUsersRights
DeleteBOINCGroups
DeleteBOINCAccounts
- AnnounceUpgrade
\ No newline at end of file
+ AnnounceUpgrade
diff --git a/clientsetup/win/boinccas.h b/clientsetup/win/boinccas.h
index af0cc95c0b2..6e6b1f35f1a 100644
--- a/clientsetup/win/boinccas.h
+++ b/clientsetup/win/boinccas.h
@@ -26,7 +26,7 @@ class BOINCCABase
public:
BOINCCABase(
- MSIHANDLE hMSIHandle,
+ MSIHANDLE hMSIHandle,
const tstring strActionName,
const tstring strProgressTitle
);
@@ -53,34 +53,34 @@ class BOINCCABase
BOOL IsUpgrading();
// Registry Property Management
- UINT GetRegistryValue(
- const tstring strName,
+ UINT GetRegistryValue(
+ const tstring strName,
tstring& strValue,
bool bDisplayValue = true
);
- UINT SetRegistryValue(
- const tstring strName,
+ UINT SetRegistryValue(
+ const tstring strName,
const tstring strValue,
bool bDisplayValue = true
);
// MSI Property Management
- UINT GetProperty(
- const tstring strPropertyName,
+ UINT GetProperty(
+ const tstring strPropertyName,
tstring& strPropertyValue,
bool bDisplayValue = true
);
- UINT SetProperty(
- const tstring strPropertyName,
+ UINT SetProperty(
+ const tstring strPropertyName,
const tstring strPropertyValue,
bool bDisplayValue = true
);
// MSI Database Management
UINT GetComponentKeyFilename(
- const tstring strComponentName,
+ const tstring strComponentName,
tstring& strComponentKeyFilename
);
diff --git a/clientsetup/win/boinccas.rc b/clientsetup/win/boinccas.rc
index 7e0858bc71d..c20e698f193 100644
--- a/clientsetup/win/boinccas.rc
+++ b/clientsetup/win/boinccas.rc
@@ -27,18 +27,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// TEXTINCLUDE
//
-1 TEXTINCLUDE
+1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
-2 TEXTINCLUDE
+2 TEXTINCLUDE
BEGIN
"#include ""winresrc.h""\r\n"
"\0"
END
-3 TEXTINCLUDE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
diff --git a/clientsetup/win/dirops.cpp b/clientsetup/win/dirops.cpp
index 5176e7f835a..aaeb85e13af 100644
--- a/clientsetup/win/dirops.cpp
+++ b/clientsetup/win/dirops.cpp
@@ -10,7 +10,7 @@
/////////////////////////////////////////////////////////////////////////////////////
// FUNCTION: RemoveReadOnly
-// DESCRIPTION: Removes the write protection of a specific file (including full path),
+// DESCRIPTION: Removes the write protection of a specific file (including full path),
// if case the file exists.
//
// RETURN: TRUE for success, FALSE for failure
@@ -19,7 +19,7 @@
BOOL RemoveReadOnly(tstring& csFileName)
{
DWORD dwFileAttributes = GetFileAttributes(csFileName.c_str());
-
+
// In case the file does not exist
if (dwFileAttributes == -1)
return FALSE;
@@ -43,16 +43,16 @@ BOOL RecursiveCopyFolder(tstring& csPath, tstring& csNewPath)
if( !CreateDirectory(csNewPath.c_str(), NULL))
bRet = FALSE;
-
+
tstring csPathMask;
tstring csFullPath;
tstring csNewFullPath;
-
+
csPath += _T("\\");
csNewPath += _T("\\");
-
+
csPathMask = csPath + _T("*.*");
-
+
WIN32_FIND_DATA ffData;
HANDLE hFind;
hFind = FindFirstFile(csPathMask.c_str(), &ffData);
@@ -60,28 +60,28 @@ BOOL RecursiveCopyFolder(tstring& csPath, tstring& csNewPath)
if (hFind == INVALID_HANDLE_VALUE){
return FALSE;
}
-
+
// Copying all the files
- while (hFind && FindNextFile(hFind, &ffData))
+ while (hFind && FindNextFile(hFind, &ffData))
{
csFullPath = csPath + ffData.cFileName;
csNewFullPath = csNewPath + ffData.cFileName;
RemoveReadOnly(csNewFullPath);
- if( !(ffData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) )
+ if( !(ffData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) )
{
- if( !CopyFile(csFullPath.c_str(), csNewFullPath.c_str(), FALSE) )
+ if( !CopyFile(csFullPath.c_str(), csNewFullPath.c_str(), FALSE) )
{
// Not stopping here, trying to copy the rest of the files
bRet = FALSE;
}
}
else // it is a directory -> Copying recursively
- {
+ {
if( (_tcscmp(ffData.cFileName, _T(".")) != 0) &&
- (_tcscmp(ffData.cFileName, _T("..")) != 0) )
+ (_tcscmp(ffData.cFileName, _T("..")) != 0) )
{
if( !RecursiveCopyFolder(csFullPath, csNewFullPath) )
{
@@ -109,10 +109,10 @@ BOOL RecursiveDeleteFolder(tstring& csPath)
tstring csPathMask;
tstring csFullPath;
-
+
csPath += _T("\\");
csPathMask = csPath + _T("*.*");
-
+
WIN32_FIND_DATA ffData;
HANDLE hFind;
hFind = FindFirstFile(csPathMask.c_str(), &ffData);
@@ -120,27 +120,27 @@ BOOL RecursiveDeleteFolder(tstring& csPath)
if (hFind == INVALID_HANDLE_VALUE){
return FALSE;
}
-
+
// Delete all the files
- while (hFind && FindNextFile(hFind, &ffData))
+ while (hFind && FindNextFile(hFind, &ffData))
{
csFullPath = csPath + ffData.cFileName;
RemoveReadOnly(csFullPath);
- if( !(ffData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) )
+ if( !(ffData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) )
{
- if( !DeleteFile(csFullPath.c_str()) )
+ if( !DeleteFile(csFullPath.c_str()) )
{
// Not stopping here, trying to copy the rest of the files
bRet = FALSE;
}
}
else // it is a directory -> Copying recursively
- {
+ {
if( (_tcscmp(ffData.cFileName, _T(".")) != 0) &&
- (_tcscmp(ffData.cFileName, _T("..")) != 0) )
+ (_tcscmp(ffData.cFileName, _T("..")) != 0) )
{
if( !RecursiveDeleteFolder(csFullPath) )
{
@@ -152,7 +152,7 @@ BOOL RecursiveDeleteFolder(tstring& csPath)
}
FindClose(hFind);
-
+
RemoveReadOnly(csPath);
if( !RemoveDirectory(csPath.c_str()))
bRet = FALSE;
@@ -170,7 +170,7 @@ BOOL RecursiveDeleteFolder(tstring& csPath)
BOOL MoveFolder(tstring& csPath, tstring& csNewPath)
{
BOOL bRet = TRUE;
-
+
if(!RecursiveCopyFolder(csPath, csNewPath))
bRet = FALSE;
@@ -194,10 +194,10 @@ BOOL RecursiveSetPermissions(tstring& csPath, PACL pACL)
tstring csPathMask;
tstring csFullPath;
-
+
csPath += _T("\\");
csPathMask = csPath + _T("*.*");
-
+
WIN32_FIND_DATA ffData;
HANDLE hFind;
hFind = FindFirstFile(csPathMask.c_str(), &ffData);
@@ -205,18 +205,18 @@ BOOL RecursiveSetPermissions(tstring& csPath, PACL pACL)
if (hFind == INVALID_HANDLE_VALUE){
return FALSE;
}
-
+
// Copying all the files
- while (hFind && FindNextFile(hFind, &ffData))
+ while (hFind && FindNextFile(hFind, &ffData))
{
if( (_tcscmp(ffData.cFileName, _T(".")) != 0) &&
- (_tcscmp(ffData.cFileName, _T("..")) != 0) )
+ (_tcscmp(ffData.cFileName, _T("..")) != 0) )
{
csFullPath = csPath + ffData.cFileName;
// Set the ACL on the file.
- SetNamedSecurityInfo(
+ SetNamedSecurityInfo(
#ifdef _UNICODE
(LPWSTR)csFullPath.c_str(),
#else
@@ -230,7 +230,7 @@ BOOL RecursiveSetPermissions(tstring& csPath, PACL pACL)
NULL
);
- if( ffData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
+ if( ffData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
{
RecursiveSetPermissions(csFullPath, pACL);
}
diff --git a/clientsetup/win/launcher.cpp b/clientsetup/win/launcher.cpp
index a9229d5452e..d1611dde9af 100644
--- a/clientsetup/win/launcher.cpp
+++ b/clientsetup/win/launcher.cpp
@@ -42,17 +42,17 @@ typedef enum _MANDATORY_LEVEL {
@todo Removing was checked. To check enabling and disabling.
*/
inline HRESULT SetPrivilege(
- HANDLE hToken,
- LPCTSTR lpszPrivilege,
- DWORD dwAttributes=SE_PRIVILEGE_ENABLED
- )
+ HANDLE hToken,
+ LPCTSTR lpszPrivilege,
+ DWORD dwAttributes=SE_PRIVILEGE_ENABLED
+ )
{
HRESULT hr=S_OK;
LUID luid;
- if ( LookupPrivilegeValue(
+ if ( LookupPrivilegeValue(
NULL, // lookup privilege on local system
- lpszPrivilege, // privilege to lookup
+ lpszPrivilege, // privilege to lookup
&luid ) ) // receives LUID of privilege
{
TOKEN_PRIVILEGES tp;
@@ -63,11 +63,11 @@ inline HRESULT SetPrivilege(
// Enable the privilege or disable all privileges.
if ( !AdjustTokenPrivileges(
- hToken,
- FALSE,
- &tp,
- sizeof(TOKEN_PRIVILEGES),
- (PTOKEN_PRIVILEGES) NULL,
+ hToken,
+ FALSE,
+ &tp,
+ sizeof(TOKEN_PRIVILEGES),
+ (PTOKEN_PRIVILEGES) NULL,
(PDWORD) NULL) )
hr=HRESULT_FROM_WIN32(GetLastError());
}//if(LookupPrivilegeValue(...))
@@ -81,7 +81,7 @@ inline HRESULT SetPrivilege(
Function removes the privileges which are not associated by default with explorer.exe at Medium Integration Level in Vista
@returns HRESULT of the operation on SE_CREATE_GLOBAL_NAME (="SeCreateGlobalPrivilege")
*/
-inline HRESULT ReducePrivilegesForMediumIL(HANDLE hToken)
+inline HRESULT ReducePrivilegesForMediumIL(HANDLE hToken)
{
HRESULT hr=S_OK;
hr=SetPrivilege(hToken, SE_CREATE_GLOBAL_NAME, SE_PRIVILEGE_REMOVED);
@@ -108,16 +108,16 @@ inline HRESULT ReducePrivilegesForMediumIL(HANDLE hToken)
}
/*!
-@brief Gets Integration level of the given process in Vista.
+@brief Gets Integration level of the given process in Vista.
In the older OS assumes the integration level is equal to SECURITY_MANDATORY_HIGH_RID
-The function opens the process for all access and opens its token for all access.
+The function opens the process for all access and opens its token for all access.
Then it extracts token information and closes the handles.
@param[in] dwProcessId ID of the process to operate
@param[out] pdwProcessIL pointer to write the value
@return HRESULT
@retval { description }
-@remarks Function check for OS version by querying the presence of Kernel32.GetProductInfo function.
+@remarks Function check for OS version by querying the presence of Kernel32.GetProductInfo function.
This way is used due to the function is called from InstallShield12 script, so GetVersionEx returns incorrect value.
@todo restrict access rights when quering for tokens
*/
@@ -148,7 +148,7 @@ inline HRESULT GetProcessIL(DWORD dwProcessId, LPDWORD pdwProcessIL)
{
PTOKEN_MANDATORY_LABEL pTIL=NULL;
DWORD dwSize=0;
- if (!GetTokenInformation(hToken, TokenIntegrityLevel, NULL, 0, &dwSize)
+ if (!GetTokenInformation(hToken, TokenIntegrityLevel, NULL, 0, &dwSize)
&& ERROR_INSUFFICIENT_BUFFER==GetLastError() && dwSize)
pTIL=(PTOKEN_MANDATORY_LABEL)HeapAlloc(GetProcessHeap(), 0, dwSize);
@@ -177,14 +177,14 @@ inline HRESULT GetProcessIL(DWORD dwProcessId, LPDWORD pdwProcessIL)
@brief Function launches process with the integration level of Explorer on Vista. On the previous OS, simply creates the process.
Function gets the integration level of the current process and Explorer, then launches the new process.
-If the integration levels are equal, CreateProcess is called.
-If Explorer has Medium IL, and the current process has High IL, new token is created, its rights are adjusted
-and CreateProcessWithTokenW is called.
+If the integration levels are equal, CreateProcess is called.
+If Explorer has Medium IL, and the current process has High IL, new token is created, its rights are adjusted
+and CreateProcessWithTokenW is called.
If Explorer has Medium IL, and the current process has High IL, error is returned.
-@param[in] szProcessName - the name of exe file (see CreateProcess())
+@param[in] szProcessName - the name of exe file (see CreateProcess())
@param[in] szCmdLine - the name of exe file (see CreateProcess())
@return HRESULT code
-@note The function cannot be used in services, due to if uses USER32.FindWindow() to get the proper instance of Explorer.
+@note The function cannot be used in services, due to if uses USER32.FindWindow() to get the proper instance of Explorer.
The parent of new process in taskmgr.exe, but not the current process.
@sa ReducePrivilegesForMediumIL()
*/
@@ -204,18 +204,18 @@ HRESULT CreateProcessWithExplorerIL(LPWSTR szProcessName, LPWSTR szCmdLine)
}
FreeLibrary(hmodKernel32);
}
-
+
if(bVista)
{
HANDLE hToken;
HANDLE hNewToken;
- DWORD dwCurIL = SECURITY_MANDATORY_HIGH_RID, dwExplorerIL = SECURITY_MANDATORY_HIGH_RID;
+ DWORD dwCurIL = SECURITY_MANDATORY_HIGH_RID, dwExplorerIL = SECURITY_MANDATORY_HIGH_RID;
DWORD dwExplorerID = 0;
DWORD dwEnableVirtualization = 0;
HWND hwndShell = ::FindWindow( _T("Progman"), NULL);
if(hwndShell) GetWindowThreadProcessId(hwndShell, &dwExplorerID);
-
+
GetProcessIL(dwExplorerID, &dwExplorerIL);
GetProcessIL(GetCurrentProcessId(), &dwCurIL);
@@ -280,7 +280,7 @@ HRESULT CreateProcessWithExplorerIL(LPWSTR szProcessName, LPWSTR szCmdLine)
if(!ProcInfo.dwProcessId) {
bRet = CreateProcess(
szProcessName,
- szCmdLine,
+ szCmdLine,
NULL,
NULL,
FALSE,
diff --git a/clientsetup/win/main.cpp b/clientsetup/win/main.cpp
index e04c6f43dc3..cd1c575380d 100644
--- a/clientsetup/win/main.cpp
+++ b/clientsetup/win/main.cpp
@@ -23,8 +23,8 @@
HINSTANCE g_hInstance = NULL;
-BOOL APIENTRY DllMain( HINSTANCE hInstance,
- DWORD dwReason,
+BOOL APIENTRY DllMain( HINSTANCE hInstance,
+ DWORD dwReason,
LPVOID lpReserved
)
{
diff --git a/clientsetup/win/password.cpp b/clientsetup/win/password.cpp
index 40bdacde5a7..bbe9aebf3ab 100644
--- a/clientsetup/win/password.cpp
+++ b/clientsetup/win/password.cpp
@@ -16,19 +16,19 @@ BOOL GenPwd(TCHAR* ppwd, int nLen)
BOOL bResult = FALSE; //assume failure
HCRYPTPROV hProv = NULL;
HCRYPTHASH hHash = NULL;
-
+
//Storage for random string 4 times longer than the resulting password.
DWORD dwBufSize = nLen*4;
DWORD dwSize = Base64EncodeGetRequiredLength((int)dwBufSize);
LPSTR pEncodedString = NULL;
LPBYTE pRandomBuf = NULL;
TCHAR* pTRandomPwd = NULL;
-
+
try
{
pEncodedString = new char[dwSize];
pRandomBuf = new BYTE[dwBufSize];
-
+
// Try to acquire context to Crypto provider.
if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, CRYPT_SILENT))
{
@@ -57,23 +57,23 @@ BOOL GenPwd(TCHAR* ppwd, int nLen)
{
throw(GetLastError());
}
-
+
//Destroy the hash object.
CryptDestroyHash(hHash);
//Release Provider context
- CryptReleaseContext(hProv, 0);
-
+ CryptReleaseContext(hProv, 0);
+
//Encode the hash value to base64.
if (!Base64Encode(pRandomBuf, dwBufSize, pEncodedString, (int*) &dwSize, 0))
{
throw(GetLastError());
}
-
+
//Determine how many tchars you need to convert string to base64.
int nTchars = (int) strlen(pEncodedString);
-
+
pTRandomPwd = new TCHAR[nTchars];
-
+
#ifdef UNICODE
if (MultiByteToWideChar(CP_UTF8, 0, pEncodedString, nTchars, pTRandomPwd, nTchars) == 0)
{
@@ -98,7 +98,7 @@ BOOL GenPwd(TCHAR* ppwd, int nLen)
}
catch (...)
{
- //Unknown error, throw.
+ //Unknown error, throw.
throw;
}
diff --git a/clientsetup/win/resource.h b/clientsetup/win/resource.h
index de5d39a71cf..44156a2013b 100644
--- a/clientsetup/win/resource.h
+++ b/clientsetup/win/resource.h
@@ -3,7 +3,7 @@
// Used by boinccas.rc
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
diff --git a/clientsetup/win/sdmgmt.cpp b/clientsetup/win/sdmgmt.cpp
index 2f7a8e4885f..6543efad040 100644
--- a/clientsetup/win/sdmgmt.cpp
+++ b/clientsetup/win/sdmgmt.cpp
@@ -482,7 +482,7 @@ RemovePrincipalFromNamedValueSD (
//
if (!newSD)
- MakeSDAbsolute ((PSECURITY_DESCRIPTOR) sd, (PSECURITY_DESCRIPTOR *) &sdAbsolute);
+ MakeSDAbsolute ((PSECURITY_DESCRIPTOR) sd, (PSECURITY_DESCRIPTOR *) &sdAbsolute);
else
sdAbsolute = sd;
diff --git a/clientsetup/win/stdafx.h b/clientsetup/win/stdafx.h
index 937972fb1d7..c6d0ba0b17a 100644
--- a/clientsetup/win/stdafx.h
+++ b/clientsetup/win/stdafx.h
@@ -78,7 +78,7 @@
// the following fixes mysterious/sporadic errors in Win include files; see
// https://stackoverflow.com/questions/73025050/how-do-i-solve-c2371-errors-that-arise-from-including-both-ntsecapi-h-and-win
//#include
-//#define _NTDEF_
+//#define _NTDEF_
#include
#include
#include
diff --git a/clientsetup/win/utils.cpp b/clientsetup/win/utils.cpp
index e7225a183ee..f155bb210c7 100644
--- a/clientsetup/win/utils.cpp
+++ b/clientsetup/win/utils.cpp
@@ -21,7 +21,7 @@ Module Name:
--*/
// the following fixes mysterious/sporadic errors in Win include files
-//#define _NTDEF_
+//#define _NTDEF_
#include "stdafx.h"
#include
#include
diff --git a/clienttray/boinc_tray.h b/clienttray/boinc_tray.h
index 8e81c1772b6..7140d354f38 100644
--- a/clienttray/boinc_tray.h
+++ b/clienttray/boinc_tray.h
@@ -4,7 +4,7 @@
//
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
diff --git a/clienttray/boinc_tray.rc b/clienttray/boinc_tray.rc
index c43c940084b..5bd68394f78 100644
--- a/clienttray/boinc_tray.rc
+++ b/clienttray/boinc_tray.rc
@@ -215,19 +215,19 @@ END
// TEXTINCLUDE
//
-1 TEXTINCLUDE
+1 TEXTINCLUDE
BEGIN
"boinc_tray.h\0"
END
-2 TEXTINCLUDE
+2 TEXTINCLUDE
BEGIN
"#include ""winresrc.h""\r\n"
"#include ""version.h""\r\n"
"\0"
END
-3 TEXTINCLUDE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
diff --git a/clienttray/tray_win.cpp b/clienttray/tray_win.cpp
index 5d26a03d940..444f3f1ca77 100644
--- a/clienttray/tray_win.cpp
+++ b/clienttray/tray_win.cpp
@@ -14,7 +14,7 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see .
-//
+//
#include "boinc_win.h"
@@ -67,15 +67,15 @@ INT CBOINCTray::Run( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR /* lpCm
// Register an appropriate window class for the primary window
WNDCLASS cls;
cls.hCursor = NULL;
- cls.hIcon = NULL;
+ cls.hIcon = NULL;
cls.lpszMenuName = NULL;
cls.lpszClassName = _T("BOINCTrayWndClass");
cls.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
- cls.hInstance = hInstance;
+ cls.hInstance = hInstance;
cls.style = CS_OWNDC|CS_VREDRAW|CS_HREDRAW;
cls.lpfnWndProc = TrayProcStub;
- cls.cbWndExtra = 0;
- cls.cbClsExtra = 0;
+ cls.cbWndExtra = 0;
+ cls.cbClsExtra = 0;
RegisterClass(&cls);
}
@@ -112,13 +112,13 @@ INT CBOINCTray::Run( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR /* lpCm
BOOL CBOINCTray::CreateDataManagementThread() {
DWORD dwThreadID = 0;
m_hDataManagementThread = CreateThread(
- NULL, // default security attributes
- 0, // use default stack size
- DataManagementProcStub, // thread function
- NULL, // argument to thread function
- 0, // use default creation flags
- &dwThreadID ); // returns the thread identifier
-
+ NULL, // default security attributes
+ 0, // use default stack size
+ DataManagementProcStub, // thread function
+ NULL, // argument to thread function
+ 0, // use default creation flags
+ &dwThreadID ); // returns the thread identifier
+
if (m_hDataManagementThread == NULL) {
return FALSE;
}
diff --git a/clienttray/tray_win.h b/clienttray/tray_win.h
index 2f06edfacd9..93ffc60221e 100644
--- a/clienttray/tray_win.h
+++ b/clienttray/tray_win.h
@@ -14,7 +14,7 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see .
-//
+//
#ifndef _BOINCTRAY_WIN_H
#define _BOINCTRAY_WIN_H
diff --git a/coverity-model.cpp b/coverity-model.cpp
index 8ef4f4b1d91..f8a960513bc 100644
--- a/coverity-model.cpp
+++ b/coverity-model.cpp
@@ -17,16 +17,16 @@
/*
* Coverity Scan Modeling file for BOINC
- *
+ *
* This defines behaviour of functions that Coverity Scan is not aware of.
- *
- * For how to create a model see:
+ *
+ * For how to create a model see:
* https://scan.coverity.com/tune and https://scan.coverity.com/models#overriding
- *
- * If you add anything here it has no immediate effect. A user with the
- * Maintainer/Owner role on scan.coverity.com has to upload the file to
+ *
+ * If you add anything here it has no immediate effect. A user with the
+ * Maintainer/Owner role on scan.coverity.com has to upload the file to
* https://scan.coverity.com/projects/boinc-boinc?tab=analysis_settings
- *
+ *
**/
// the dir string is kind of sanitized here
@@ -39,4 +39,4 @@ bool is_project_dir(const char *dir) {
return true;
}
return false;
-}
\ No newline at end of file
+}
diff --git a/db/boinc_db.h b/db/boinc_db.h
index 897f1c1c1c8..567ad22ace3 100644
--- a/db/boinc_db.h
+++ b/db/boinc_db.h
@@ -95,16 +95,16 @@ struct DB_USER_SUBMIT : public DB_BASE, public USER_SUBMIT {
};
struct STATE_COUNTS {
- DB_ID_TYPE appid;
- int last_update_time;
- int result_server_state_2;
- int result_server_state_4;
- int result_file_delete_state_1;
- int result_file_delete_state_2;
- int result_server_state_5_and_file_delete_state_0;
- int workunit_need_validate_1;
- int workunit_assimilate_state_1;
- int workunit_file_delete_state_1;
+ DB_ID_TYPE appid;
+ int last_update_time;
+ int result_server_state_2;
+ int result_server_state_4;
+ int result_file_delete_state_1;
+ int result_file_delete_state_2;
+ int result_server_state_5_and_file_delete_state_0;
+ int workunit_need_validate_1;
+ int workunit_assimilate_state_1;
+ int workunit_file_delete_state_1;
int workunit_file_delete_state_2;
void clear();
@@ -120,7 +120,7 @@ struct DB_STATE_COUNTS : public DB_BASE, public STATE_COUNTS {
struct VALIDATOR_ITEM {
WORKUNIT wu;
RESULT res;
-
+
void clear();
void parse(MYSQL_ROW&);
};
@@ -512,7 +512,7 @@ class DB_FILESET_SCHED_TRIGGER_ITEM : public DB_BASE_SPECIAL, public FILESET_SCH
class DB_FILESET_SCHED_TRIGGER_ITEM_SET : public DB_BASE_SPECIAL {
public:
DB_FILESET_SCHED_TRIGGER_ITEM_SET(DB_CONN* p=0);
-
+
// select available triggers based on name and/or state
// -> name filter optional (set string, default NULL)
// -> pattern search optional (set use_regexp to true, default false))
diff --git a/db/constraints.sql b/db/constraints.sql
index 2b5d4f51755..f65f3c77b8b 100644
--- a/db/constraints.sql
+++ b/db/constraints.sql
@@ -106,13 +106,13 @@ alter table forum
alter table thread
add fulltext index thread_title(title);
-
+
alter table post
add index post_user (user),
add index post_thread (thread),
add fulltext index post_content(content);
-alter table credited_job
+alter table credited_job
add index credited_job_user (userid),
add index credited_job_wu (workunitid),
add unique credited_job_user_wu (userid, workunitid);
@@ -153,26 +153,26 @@ alter table credit_user
alter table credit_team
add index ct_total(appid, total),
add index ct_avg(appid, expavg);
-
+
alter table token
add index token_userid(userid);
alter table user_deleted
add index user_deleted_create(create_time);
-- for delete account
-
+
alter table host_deleted
add index host_deleted_create(create_time);
-- for delete account
-
+
alter table donation_paypal
-- for delete account
add index donation_paypal_userid(userid);
-
+
alter table banishment_vote
- add index banishment_vote_userid(userid);
+ add index banishment_vote_userid(userid);
-- for delete account
-
+
alter table post_ratings
add index post_ratings_user(user);
-- for delete account
diff --git a/db/schema.sql b/db/schema.sql
index 570f780894f..6c6adc9b8ca 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -156,7 +156,7 @@ create table team (
joinable tinyint not null default 1,
mod_time timestamp default current_timestamp on update current_timestamp,
primary key (id)
-) engine=InnoDB;
+) engine=InnoDB;
create table host (
id integer not null auto_increment,
@@ -588,7 +588,7 @@ create table forum_preferences (
-- 2 = digest email
highlight_special tinyint not null default 1,
primary key (userid)
-) engine=InnoDB;
+) engine=InnoDB;
-- keep track of last time a user read a thread
create table forum_logging (
diff --git a/db/schema_vda.sql b/db/schema_vda.sql
index 3e2a54eaaad..6523fae8b3e 100644
--- a/db/schema_vda.sql
+++ b/db/schema_vda.sql
@@ -23,7 +23,7 @@ create table vda_chunk_host (
transfer_in_progress tinyint not null default 0,
transfer_wait tinyint not null default 0,
transfer_request_time double not null default 0,
- transfer_send_time double not null default 0
+ transfer_send_time double not null default 0
) engine = InnoDB;
alter table vda_chunk_host
diff --git a/drupal/sites/all/features/boinc_standard/boinc_standard.features.inc b/drupal/sites/all/features/boinc_standard/boinc_standard.features.inc
index 6d7813ee4ad..d8025e97bf3 100644
--- a/drupal/sites/all/features/boinc_standard/boinc_standard.features.inc
+++ b/drupal/sites/all/features/boinc_standard/boinc_standard.features.inc
@@ -703,7 +703,7 @@ function boinc_standard_rules_defaults() {
'#settings' => array(
'from' => '',
'subject' => '[subject_tag:string] Circular host merging error',
- 'message' => 'User tried to merge a host (old_host) into a target host where the target host\'s rpc_seqno is equal to the old_host\'s id.
+ 'message' => 'User tried to merge a host (old_host) into a target host where the target host\'s rpc_seqno is equal to the old_host\'s id.
Information about this host merge attempt:
uid . "\\n";
'#settings' => array(
'from' => '',
'subject' => '[subject_tag:string] Zombie host merging error',
- 'message' => 'User tried to merge a host (old_host) into a target host where the target host\'s userid is equal to 0, a zombie host.
+ 'message' => 'User tried to merge a host (old_host) into a target host where the target host\'s userid is equal to 0, a zombie host.
I.e., $target_host->userid == 0
Information about this host merge attempt:
@@ -1141,7 +1141,7 @@ asdf jkl;',
'#settings' => array(
'from' => '',
'subject' => 'Report of hostile language in [node:type] comment at [:global:site-name]',
- 'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as
+ 'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as
containing hostile language for the [:global:site-name] site:
\', array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>/goto/comment/[comment:comment-cid]
@@ -1201,7 +1201,7 @@ Total reports of this comment: [comment:flag-abuse-comment-meta-count]',
'#settings' => array(
'from' => '',
'subject' => 'Report of inappropriate link in [node:type] comment at [:global:site-name]',
- 'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as
+ 'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as
containing an offensive or inappropriate link for the [:global:site-name] site:
\', array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>/goto/comment/[comment:comment-cid]
@@ -1261,7 +1261,7 @@ Total reports of this comment: [comment:flag-abuse-comment-meta-count]',
'#settings' => array(
'from' => '',
'subject' => 'Report of non Kid-friendly language in [node:type] comment at [:global:site-name]',
- 'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as
+ 'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as
containing non Kid-friendly language for the [:global:site-name] site:
\', array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>/goto/comment/[comment:comment-cid]
@@ -1321,7 +1321,7 @@ Total reports of this comment: [comment:flag-abuse-comment-meta-count]',
'#settings' => array(
'from' => '',
'subject' => 'Report of offensive [node:type] comment at [:global:site-name]',
- 'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as
+ 'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as
being offensive or inappropriate for the [:global:site-name] site, with reason \'Other\':
\', array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>/goto/comment/[comment:comment-cid]
@@ -1381,7 +1381,7 @@ Total reports of this comment: [comment:flag-abuse-comment-meta-count]',
'#settings' => array(
'from' => '',
'subject' => 'Report of SPAM [node:type] comment at [:global:site-name]',
- 'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content
+ 'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content
as being SPAM for the [:global:site-name] site:
\', array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>/goto/comment/[comment:comment-cid]
@@ -1441,7 +1441,7 @@ Total reports of this comment: [comment:flag-abuse-comment-meta-count]',
'#settings' => array(
'from' => '',
'subject' => 'Report of hostile language in [node:type] content at [:global:site-name]',
- 'message' => '[flagging_user:display-name] has reported the following [node:type] content
+ 'message' => '[flagging_user:display-name] has reported the following [node:type] content
as hostile language for the [:global:site-name] site:
nid, array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>
@@ -1502,7 +1502,7 @@ Total reports of this content: [node:flag-abuse-node-meta-count]',
'#settings' => array(
'from' => '',
'subject' => 'Report of inappropriate link in [node:type] content at [:global:site-name]',
- 'message' => '[flagging_user:display-name] has reported the following [node:type] content
+ 'message' => '[flagging_user:display-name] has reported the following [node:type] content
as containing an offensive or inappropriate link for the [:global:site-name] site:
nid, array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>
@@ -1563,7 +1563,7 @@ Total reports of this content: [node:flag-abuse-node-meta-count]',
'#settings' => array(
'from' => '',
'subject' => 'Report of non Kid-friendly language in [node:type] content at [:global:site-name]',
- 'message' => '[flagging_user:display-name] has reported the following [node:type] content
+ 'message' => '[flagging_user:display-name] has reported the following [node:type] content
as containing non Kid-friendly language for the [:global:site-name] site:
nid, array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>
@@ -1624,7 +1624,7 @@ Total reports of this content: [node:flag-abuse-node-meta-count]',
'#settings' => array(
'from' => '',
'subject' => 'Report of offensive [node:type] content at [:global:site-name]',
- 'message' => '[flagging_user:display-name] has reported the following [node:type] content
+ 'message' => '[flagging_user:display-name] has reported the following [node:type] content
as being offensive or inappropriate for the [:global:site-name] site:
nid, array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>
@@ -1685,7 +1685,7 @@ Total reports of this content: [node:flag-abuse-node-meta-count]',
'#settings' => array(
'from' => '',
'subject' => 'Report of SPAM [node:type] content at [:global:site-name]',
- 'message' => '[flagging_user:display-name] has reported the following [node:type] content
+ 'message' => '[flagging_user:display-name] has reported the following [node:type] content
as being SPAM for the [:global:site-name] site:
nid, array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>
@@ -1746,7 +1746,7 @@ Total reports of this content: [node:flag-abuse-node-meta-count]',
'#settings' => array(
'from' => '',
'subject' => 'Report of inappropriate link in user profile at [:global:site-name]',
- 'message' => '[flagging_user:display-name] has reported [account:display-name] for
+ 'message' => '[flagging_user:display-name] has reported [account:display-name] for
inappropriate link in a user profile:
\\\', array(\\\'absolute\\\' => TRUE, \\\'language\\\' => \\\'en\\\')); ?>/account/[account:uid]
@@ -1804,7 +1804,7 @@ Total current reports of this user: [account:flag-abuse-user-meta-count]',
'#settings' => array(
'from' => '',
'subject' => 'Report of hostile language in user profile at [:global:site-name]',
- 'message' => '[flagging_user:display-name] has reported [account:display-name] for
+ 'message' => '[flagging_user:display-name] has reported [account:display-name] for
hostile language in a user profile:
\\\', array(\\\'absolute\\\' => TRUE, \\\'language\\\' => \\\'en\\\')); ?>/account/[account:uid]
@@ -1862,7 +1862,7 @@ Total current reports of this user: [account:flag-abuse-user-meta-count]',
'#settings' => array(
'from' => '',
'subject' => 'Report of offensive user at [:global:site-name]',
- 'message' => '[flagging_user:display-name] has reported [account:display-name] for
+ 'message' => '[flagging_user:display-name] has reported [account:display-name] for
inappropriate behavior:
\\\', array(\\\'absolute\\\' => TRUE, \\\'language\\\' => \\\'en\\\')); ?>/account/[account:uid]
@@ -1920,7 +1920,7 @@ Total current reports of this user: [account:flag-abuse-user-meta-count]',
'#settings' => array(
'from' => '',
'subject' => 'Report of SPAM user at [:global:site-name]',
- 'message' => '[flagging_user:display-name] has reported [account:display-name] for
+ 'message' => '[flagging_user:display-name] has reported [account:display-name] for
a SPAM user profile:
\\\', array(\\\'absolute\\\' => TRUE, \\\'language\\\' => \\\'en\\\')); ?>/account/[account:uid]
diff --git a/drupal/sites/all/features/boinc_standard/boinc_standard.pages_default.inc b/drupal/sites/all/features/boinc_standard/boinc_standard.pages_default.inc
index 32f5884decd..23674178481 100644
--- a/drupal/sites/all/features/boinc_standard/boinc_standard.pages_default.inc
+++ b/drupal/sites/all/features/boinc_standard/boinc_standard.pages_default.inc
@@ -224,7 +224,7 @@ function boinc_standard_default_page_manager_pages() {
$pane->configuration = array(
'admin_title' => 'Team summary',
'title' => '',
- 'body' => ' 'status);
$pane->configuration = array(
'admin_title' => 'Team summary',
'title' => '',
- 'body' => ' ' $nid));
- $type = $node->type;
+ $type = $node->type;
$match |= in_array($type, $types);
// Don\'t show if comments aren\'t enabled...
if ($node->comment != 2) {
@@ -70,7 +70,7 @@ function discussion_forums_default_fe_block_settings() {
if (arg(0) == \'node\' && is_numeric(arg(1))) {
$nid = arg(1);
$node = node_load(array(\'nid\' => $nid));
- $type = $node->type;
+ $type = $node->type;
$match |= in_array($type, $types);
// Don\'t show if comments aren\'t enabled...
if ($node->comment != 2) {
@@ -110,7 +110,7 @@ function discussion_forums_default_fe_block_settings() {
if (arg(0) == \'node\' && is_numeric(arg(1))) {
$nid = arg(1);
$node = node_load(array(\'nid\' => $nid));
- $type = $node->type;
+ $type = $node->type;
$match |= in_array($type, $types);
// Don\'t show if comments aren\'t enabled...
if ($node->comment != 2) {
diff --git a/drupal/sites/all/features/discussion_forums/discussion_forums.module b/drupal/sites/all/features/discussion_forums/discussion_forums.module
index 9324b99b4d9..7539eef3b6a 100644
--- a/drupal/sites/all/features/discussion_forums/discussion_forums.module
+++ b/drupal/sites/all/features/discussion_forums/discussion_forums.module
@@ -1,6 +1,6 @@
$nid));
- $type = $node->type;
+ $type = $node->type;
$match |= in_array($type, $types);
}
@@ -66,7 +66,7 @@ function news_default_fe_block_settings() {
if (arg(0) == \'node\' && is_numeric(arg(1))) {
$nid = arg(1);
$node = node_load(array(\'nid\' => $nid));
- $type = $node->type;
+ $type = $node->type;
$match |= in_array($type, $types);
}
@@ -102,7 +102,7 @@ function news_default_fe_block_settings() {
if (arg(0) == \'node\' && is_numeric(arg(1))) {
$nid = arg(1);
$node = node_load(array(\'nid\' => $nid));
- $type = $node->type;
+ $type = $node->type;
$match |= in_array($type, $types);
}
diff --git a/drupal/sites/all/features/private_messages/private_messages.panels_default.inc b/drupal/sites/all/features/private_messages/private_messages.panels_default.inc
index d6890160fe1..bce367022a1 100644
--- a/drupal/sites/all/features/private_messages/private_messages.panels_default.inc
+++ b/drupal/sites/all/features/private_messages/private_messages.panels_default.inc
@@ -41,7 +41,7 @@ function private_messages_default_panels_mini() {
$pane->configuration = array(
'admin_title' => 'Mail summary',
'title' => 'Messages',
- 'body' => ' '
diff --git a/drupal/sites/all/features/spam_controls/spam_controls.module b/drupal/sites/all/features/spam_controls/spam_controls.module
index 5a26cd8cd82..a80f1e99f16 100644
--- a/drupal/sites/all/features/spam_controls/spam_controls.module
+++ b/drupal/sites/all/features/spam_controls/spam_controls.module
@@ -14,6 +14,6 @@ function spam_controls_menu() {
'file' => 'user.pages.inc',
'file path' => drupal_get_path('module', 'user'),
);
-
+
return $items;
}
diff --git a/drupal/sites/all/features/work_and_host_stats/work_and_host_stats.views_default.inc b/drupal/sites/all/features/work_and_host_stats/work_and_host_stats.views_default.inc
index 8cfed673fc7..fc32f06b095 100644
--- a/drupal/sites/all/features/work_and_host_stats/work_and_host_stats.views_default.inc
+++ b/drupal/sites/all/features/work_and_host_stats/work_and_host_stats.views_default.inc
@@ -6036,7 +6036,7 @@ Cross-project stats:
'hide_empty' => 0,
'empty_zero' => 0,
'hide_alter_empty' => 1,
- 'value' => ' 'user_host_id);
if ($data->user_host_show_hosts) {
echo l($data->user_host_name, "account/{$uid}");
@@ -6860,7 +6860,7 @@ Cross-project stats:
'hide_empty' => 0,
'empty_zero' => 0,
'hide_alter_empty' => 1,
- 'value' => ' 'user_host_id);
if ($data->user_host_show_hosts) {
echo l($data->user_host_name, "account/{$uid}");
diff --git a/drupal/sites/default/boinc/modules/boinc_solr_search/boinc_solr_comments/boinc_solr_comments.admin.inc b/drupal/sites/default/boinc/modules/boinc_solr_search/boinc_solr_comments/boinc_solr_comments.admin.inc
index bf99dee0c9c..c304b3b238b 100644
--- a/drupal/sites/default/boinc/modules/boinc_solr_search/boinc_solr_comments/boinc_solr_comments.admin.inc
+++ b/drupal/sites/default/boinc/modules/boinc_solr_search/boinc_solr_comments/boinc_solr_comments.admin.inc
@@ -27,7 +27,7 @@ function boinc_solr_comments_form(&$form_state) {
$options[$key] = $info['name'];
}
asort($options);
-
+
// Form defaults
$default = array(
'boinc_solr_comments_nodetypes' => variable_get('boinc_solr_comments_nodetypes', ''),
@@ -35,13 +35,13 @@ function boinc_solr_comments_form(&$form_state) {
if (empty($default['boinc_solr_comments_nodetypes'])) {
$default['boinc_solr_comments_nodetypes'] = array('forum','team_forum','news','page','story');
}
-
+
// Define the form
$form['config']['nodes'] = array(
'#type' => 'markup',
'#value' => bts('Select the content types where the comments are indexed by Apace Solr. Your content must be re-indexed after changing this configuration.', array(), NULL, 'boinc:admin-solr-search-comments-option'),
);
-
+
$form['config']['boinc_solr_comments_nodetypes'] = array(
'#type' => 'checkboxes',
'#title' => 'node',
diff --git a/drupal/sites/default/boinc/modules/boinc_solr_search/boinc_solr_comments/boinc_solr_comments.module b/drupal/sites/default/boinc/modules/boinc_solr_search/boinc_solr_comments/boinc_solr_comments.module
index 1533adcc0b7..ff3f75ccbf8 100644
--- a/drupal/sites/default/boinc/modules/boinc_solr_search/boinc_solr_comments/boinc_solr_comments.module
+++ b/drupal/sites/default/boinc/modules/boinc_solr_search/boinc_solr_comments/boinc_solr_comments.module
@@ -36,18 +36,18 @@ function boinc_solr_comments_menu() {
/**
* Implementation of hook_apachesolr_index_documents_alter()
- *
+ *
* This function separates the comments from a parent node and indexes
- * the individual comments as separate ApacheSolrDocuments.
- *
+ * the individual comments as separate ApacheSolrDocuments.
+ *
* The function loads each node’s Solr document, and removes the
* ts_comments field. Then it loops over all the node's comments found
* with a db_query and creates separate ApacheSolrDocument objects for
- * each one.
+ * each one.
*
* At the end, the new documents representing the comments are merged
* with the input $documents array.
- *
+ *
* @param array $documents
* Array of ApacheSolrDocument which are to be indexed
* @param string $entity
@@ -73,14 +73,14 @@ function boinc_solr_comments_apachesolr_index_documents_alter(array &$documents,
'team_forum' => 'team_forum',
);
}
-
+
// Loop over all documents and alter:
foreach ($documents as $document) {
//dd($document, "index documents alter - document");
$to_process = ( array_key_exists($document->bundle, $node_types) AND $node_types[$document->bundle] );
if ( $document->entity_type=='node' AND $to_process) {
-
+
// Remove ts_comments if present.
if (isset($document->ts_comments)) {
unset($document->ts_comments);
@@ -88,7 +88,7 @@ function boinc_solr_comments_apachesolr_index_documents_alter(array &$documents,
// Node information.
$nid = $document->entity_id;
$node = node_load($nid);
-
+
// Query database for comments of node. Only return comments
// with status 0 (0 is published for comments).
$sql = 'SELECT cid from {comments} WHERE nid = %d AND status = 0 ORDER by timestamp DESC';
@@ -121,7 +121,7 @@ function boinc_solr_comments_apachesolr_index_documents_alter(array &$documents,
$comment_document->path_alias = $output;
}
}
-
+
// Code derived from apachesolr_index_node_solr_document
$comment_document->label = truncate_utf8(apachesolr_clean_text($comment->comment), 32, TRUE);
$comment_document->content = apachesolr_clean_text($comment->comment);
@@ -161,7 +161,7 @@ function boinc_solr_comments_apachesolr_index_documents_alter(array &$documents,
}
if (isset($comment_document->bs_promote)) {
unset($comment_document->bs_promote);
- }
+ }
if (isset($comment_document->is_tnid)) {
unset($comment_document->is_tnid);
}
@@ -189,7 +189,7 @@ function boinc_solr_comments_apachesolr_index_documents_alter(array &$documents,
$comment_document->addField($fieldName, $subvalue);
}
}// if preg_match
-
+
// Set the access keys so this module will work with
// apachesolr_access.
if (module_exists('apachesolr_access')) {
@@ -199,9 +199,9 @@ function boinc_solr_comments_apachesolr_index_documents_alter(array &$documents,
}
}// if preg_match
}// if module_exist
-
+
}// foreach document
-
+
$comdocs[] = $comment_document;
}// while
}// if entity_type=node
@@ -214,7 +214,7 @@ function boinc_solr_comments_apachesolr_index_documents_alter(array &$documents,
/**
* Implementation of hook_apachesolr_process_results()
- *
+ *
* After a query, the search results for comments are filled by this
* function. The search results are used by the serach results
* template.
@@ -246,7 +246,7 @@ function boinc_solr_comments_apachesolr_process_results(&$results, DrupalSolrQue
* An additional field is added to the query results,
* tos_content_extra. This is used for comment search results, as the
* field contains the parent node id.
- *
+ *
* @params query
* The Solr query used for the search.
*/
@@ -262,7 +262,7 @@ function boinc_solr_comments_apachesolr_query_alter($query) {
/**
* Implementation of hook_nodeapi()
- *
+ *
*/
function boinc_solr_comments_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
// Array of node types that will have comments indexed.
@@ -309,7 +309,7 @@ function boinc_solr_comments_delete($node) {
if (apachesolr_environment_variable_get($env_id, 'apachesolr_read_only', APACHESOLR_READ_WRITE) == APACHESOLR_READ_ONLY) {
return FALSE;
}
-
+
// Code derived from apachesolr_index_delete_entity_from_index
try {
$solr = apachesolr_get_solr($env_id);
@@ -345,7 +345,7 @@ function boinc_solr_comments_comment(&$a1, $op) {
}// switch
}
-/**
+/**
* Helper function for hook_comment()
*
* When a comment is deleted, the corresponding apache Solr document
@@ -365,7 +365,7 @@ function boinc_solr_comments_deletecomment($comment) {
return FALSE;
}
//dd($comment->cid, "delete - nid begin");
-
+
// Code derived from apachesolr_index_delete_entity_from_index.
try {
$solr = apachesolr_get_solr($env_id);
@@ -402,7 +402,7 @@ function boinc_solr_comments_enable() {
drupal_set_message( bts('Warning: Your content must be re-indexed before Apache Solr will search comments.', array('@url' => url('admin/settings/apachesolr/index')), NULL, 'boinc:admin-solr-index-comments-message'), 'warning');
}
-/**
+/**
* Helper function which is called when a comment is published.
* Interfaces with boinccore module.
*
@@ -418,12 +418,12 @@ function boinc_solr_comments_publish($comment) {
}
}
-/**
+/**
* Helper function which is called when a comment is unpublished.
* Interfaces with boinccore module.
*
* @param comment $comment
- * The comment to be unpublished (hidden).
+ * The comment to be unpublished (hidden).
*/
function boinc_solr_comments_unpublish($comment) {
if ( ($comment->cid) ) {
diff --git a/drupal/sites/default/boinc/modules/boinc_solr_search/boinc_solr_search.module b/drupal/sites/default/boinc/modules/boinc_solr_search/boinc_solr_search.module
index 53dca7f564a..0324477d179 100644
--- a/drupal/sites/default/boinc/modules/boinc_solr_search/boinc_solr_search.module
+++ b/drupal/sites/default/boinc/modules/boinc_solr_search/boinc_solr_search.module
@@ -32,7 +32,7 @@ function boinc_solr_search_block($op = 'list', $delta = 0, $edit = array()) {
/**
* Implementation of hook_block_info()
- *
+ *
* This is a Drupal 7 hook, which will allow this module to be
* (somewhat) forward compatible.
*/
diff --git a/drupal/sites/default/boinc/modules/boinccore/boinccore.admin.inc b/drupal/sites/default/boinc/modules/boinccore/boinccore.admin.inc
index 70f1ca44599..95bec5a14d8 100644
--- a/drupal/sites/default/boinc/modules/boinccore/boinccore.admin.inc
+++ b/drupal/sites/default/boinc/modules/boinccore/boinccore.admin.inc
@@ -18,7 +18,7 @@ function boinccore_admin_community(&$form_state) {
'moderator_mailing_list' => variable_get('boinc_moderator_mailing_list', ''),
'moderator_force_individual_notifications' => variable_get('boinc_moderator_force_individual_notifications', 0),
);
-
+
// Define the form
$form['boinc_comment_min_credit'] = array(
'#type' => 'textfield',
@@ -49,7 +49,7 @@ function boinccore_admin_community(&$form_state) {
'#description' => t('Continue to send individual moderator notification
emails even when a mailing list is provided.'),
);
-
+
$form['tools'] = array(
'#title' => t('Tools'),
'#type' => 'fieldset',
@@ -63,7 +63,7 @@ function boinccore_admin_community(&$form_state) {
'#value' => t('Force new UOTD'),
'#submit' => array('boinccore_reset_user_of_the_day'),
);
-
+
return system_settings_form($form);
}
@@ -99,7 +99,7 @@ function boinccore_reset_user_of_the_day() {
*/
function boinccore_admin_default_content(&$form_state) {
$form = array();
-
+
// Define the form
$form['page'] = array(
'#type' => 'select',
@@ -117,7 +117,7 @@ function boinccore_admin_default_content(&$form_state) {
'#type' => 'submit',
'#value' => 'Generate content',
);
-
+
return $form;
}
@@ -143,7 +143,7 @@ function boinccore_admin_default_content_submit($form, &$form_state) {
}
drupal_set_message(t('Default content has been generated for the @listed
@pages.', array(
- '@listed' => $page_list,
+ '@listed' => $page_list,
'@pages' => format_plural($pages_generated, 'page', 'pages'),
)
));
@@ -163,7 +163,7 @@ function boinccore_admin_default_content_submit($form, &$form_state) {
}
/**
- *
+ *
*/
function boinccore_admin_default_content_generate($pages = array()) {
if (!$pages) {
@@ -218,7 +218,7 @@ function boinccore_admin_default_content_generate($pages = array()) {
);
$node = (object) $node; // node_save requires an object
node_save($node);
-
+
$item = array(
'link_path' => drupal_get_normal_path('help'),
'link_title' => t('Help'),
diff --git a/drupal/sites/default/boinc/modules/boinccore/boinccore.module b/drupal/sites/default/boinc/modules/boinccore/boinccore.module
index d1537907a7e..03208c5b0d4 100644
--- a/drupal/sites/default/boinc/modules/boinccore/boinccore.module
+++ b/drupal/sites/default/boinc/modules/boinccore/boinccore.module
@@ -23,7 +23,7 @@ require_once('boinccore.admin.inc');
/* * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Hooks into core modules
* * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
+
/**
* Implementation of hook_menu(); determine the actions that correspond
* with defined URL paths
@@ -63,7 +63,7 @@ function boinccore_menu() {
'type' => MENU_NORMAL_ITEM,
'file' => 'boinccore.admin.inc'
);
-
+
// BOINC RPC wrappers
$items['lookup_account.php'] = array(
'title' => 'Look up account RPC',
@@ -149,7 +149,7 @@ function boinccore_menu() {
'access callback' => TRUE,
'type' => MENU_CALLBACK
);
-
+
return $items;
}
@@ -234,7 +234,7 @@ function boinccore_enable() {
* Implementation of hook_boot()
* Caching for anonymous users in Drupal 6 is not language specific, so using
* the browser language without path prefix can result in mixed languages being
- * present in the cache for pages with the default (no language given) path.
+ * present in the cache for pages with the default (no language given) path.
* As a workaround, redirect anonymous users to a language prefix if they are
* on the default site path and the browser reports a non-default language.
* See: https://www.drupal.org/node/339958#comment-3012662
@@ -246,7 +246,7 @@ function boinccore_boot() {
// If we have an anonymous user, page cache is enabled, the URL has no prefix
// and browser language negotiation is set, we perform a redirect to the
- // prefixed URL.
+ // prefixed URL.
if (empty($user->uid) && $cache != CACHE_DISABLED && $language_negotiation == LANGUAGE_NEGOTIATION_PATH) {
$args = isset($_GET['q']) ? explode('/', $_GET['q']) : array();
$prefix = array_shift($args);
@@ -254,7 +254,7 @@ function boinccore_boot() {
// Initialize language as we need the proper language negotiation to be
// performed.
drupal_bootstrap(DRUPAL_BOOTSTRAP_LANGUAGE);
-
+
// But Drupal 6 language negotiation does not always work that well...
// so call this backported Drupal 7 language negotation function, which
// does both case insensitive and longest prefix matching
@@ -293,10 +293,10 @@ if (!function_exists('locale_language_from_browser')) {
if (empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
return FALSE;
}
-
+
$languages = language_list('enabled');
$languages = $languages[1];
-
+
// The Accept-Language header contains information about the language
// preferences configured in the user's browser / operating system.
// RFC 2616 (section 14.4) defines the Accept-Language header as follows:
@@ -352,7 +352,7 @@ if (!function_exists('locale_language_from_browser')) {
$qvalue = $browser_langcodes[$prefix];
break;
}
- }
+ }
while ($prefix = substr($prefix, 0, strrpos($prefix, '-')));
// Find the best match.
@@ -460,7 +460,7 @@ function boinccore_form_alter(&$form, $form_state, $form_id) {
$form['comment_form_suffix'] = array(
'#value' => '',
);
-
+
module_load_include('inc', 'bbcode', 'bbcode-help');
$form['bbcode_help'] = array(
'#title' => bts('BBcode help', array(), NULL, 'boinc:help-with-user-input-with-BBCode'),
@@ -474,7 +474,7 @@ function boinccore_form_alter(&$form, $form_state, $form_id) {
'#value' => _bbcode_filter_tip(),
),
);
-
+
// If a specific comment is being referenced, go back to it on cancel
if ($comment_ref = $form['pid']['#value']) {
$cancel_url = "goto/comment/{$comment_ref}";
@@ -482,7 +482,7 @@ function boinccore_form_alter(&$form, $form_state, $form_id) {
else {
$cancel_url = "node/{$form['nid']['#value']}";
}
-
+
// Wrap action buttons for styling consistency
$form['buttons']['form control tabs prefix'] = array(
'#value' => '',
'#weight' => 1010,
);
-
+
// Remove redundant name field
unset($form['_author']);
@@ -542,9 +542,9 @@ function boinccore_form_alter(&$form, $form_state, $form_id) {
);
}
}
-
+
break;
-
+
// Forum node form
case 'forum_node_form':
case 'team_forum_node_form':
@@ -553,7 +553,7 @@ function boinccore_form_alter(&$form, $form_state, $form_id) {
'#value' => '
',
'#weight' => 999,
);
-
+
// Wrap action buttons for styling consistency
$form['buttons']['form control tabs prefix'] = array(
'#value' => '
';
$form['boinc_data']['note'] = array('#value' => $output);
-
+
// BOINC table prefix
$form['boinc_data']['boincimport_table_prefix'] = array(
'#type' => 'textfield',
@@ -117,7 +117,7 @@ function boincimport_admin_settings() {
'#description' => t('What prefix is used for your BOINC tables?'),
'#disabled' => ($result['result']) ? TRUE : FALSE
);
-
+
$output = $result['html'];
if ($result['result'] != 1) {
$ready_for_migration = 0;
@@ -129,7 +129,7 @@ function boincimport_admin_settings() {
}
$form['boinc_data']['result'] = array('#value' => $output);
-
+
// USERS settings
$form['users'] = array(
'#type' => 'fieldset',
@@ -171,20 +171,20 @@ function boincimport_admin_settings() {
);
$output = ''. t('Select which !input_format should be used for the imported
messages. It is highly-recommended that this value be left as it is, as the
- Full HTML and PHP code formats can be very dangerous!',
+ Full HTML and PHP code formats can be very dangerous!',
array('!input_format' => l(t('input format'), 'admin/settings/filters'))) .'
';
$form['input']['intro'] = array('#value' => $output);
-
+
$formats = db_query('SELECT format, name FROM {filter_formats}');
while ($format = db_fetch_array($formats)) {
$input_formats[$format['format']]= $format['name'];
}
-
+
// By default, use the format named "Rich text"; fall back to Filtered HTML
$default_input_format = db_result(db_query("
SELECT format FROM {filter_formats} WHERE name = '%s'", 'Rich text'));
if (!$default_input_format) $default_input_format = 1;
-
+
$input_format = variable_get('boincimport_input_format', $default_input_format);
$form['input']['boincimport_input_format'] = array(
'#type' => 'radios',
@@ -199,7 +199,7 @@ function boincimport_admin_settings() {
$output = ''. t('This setting will be applied to all posts and private
messages.') .'
';
$form['input']['result'] = array('#value' => $output);
-
+
// BBcode settings
$form['bbcode'] = array(
'#type' => 'fieldset',
@@ -207,7 +207,7 @@ function boincimport_admin_settings() {
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
-
+
$output = '' . t('BOINC posts are often formatted in BBcode. During the
import process, BBcode can be handled in two diffent ways') . ':
';
$output .= '' . t('Leave the BBcode as is and use the !bbcode_module
@@ -225,7 +225,7 @@ function boincimport_admin_settings() {
"Filtered HTML" input format unless they are first added to the list of
allowed tags in that format. See the !input_formats page.',
array('!input_formats' => l(t('input formats'), 'admin/settings/filters'))) . '';
-
+
$form['bbcode']['intro'] = array('#value' => $output);
$form['bbcode']['boincimport_bbcode'] = array(
'#type' => 'radios',
@@ -234,11 +234,11 @@ function boincimport_admin_settings() {
'#options' => array(t('Leave BBcode as is.'), t('Transform BBcode into HTML.')),
'#description' => '',
);
-
+
$module_status = _boincimport_check_module('bbcode');
$bbcode_disabled = ($module_status['result'] == 0) ? true : false;
$output = $module_status['html'];
-
+
if (variable_get('boincimport_bbcode', 0)) {
if ($bbcode_disabled) {
$ready_for_migration = 0;
@@ -259,7 +259,7 @@ function boincimport_admin_settings() {
'!enable_bbcode_input' => l(t('enable BBcode in the selected input format'), "admin/settings/filters/{$input_format}"),
'!configure_bbcode_options' => l(t('configure BBcode options'), "admin/settings/filters/{$input_format}/configure"))) .'';
}
- $output .= ''. t('For best results, !disable_all_options',
+ $output .= '
'. t('For best results, !disable_all_options',
array('!disable_all_options' => l(t('all four BBcode configure options should be disabled'), "admin/settings/filters/{$input_format}/configure"))) . '.
';
} else {
if ($bbcode_disabled) {
@@ -276,9 +276,9 @@ function boincimport_admin_settings() {
}
$output .= ''. t('This setting will be applied to all posts, private
messages and the users\' signature.') .'
';
-
+
$form['bbcode']['result'] = array('#value' => $output);
-
+
// URL transform settings
$form['url_transforms'] = array(
'#type' => 'fieldset',
@@ -310,7 +310,7 @@ function boincimport_admin_settings() {
left blank, the base_url configured in this Drupal environment will be
used (currently: %url)', array('%url' =>$base_url)),
);
-
+
// Are we ready for migration?
$form['migration'] = array(
'#type' => 'fieldset',
@@ -326,9 +326,9 @@ function boincimport_admin_settings() {
$output = ''. t('You are not ready for the migration yet.
Please check the settings above.') .'
';
}
-
+
$form['migration']['info'] = array('#value' => $output);
- return system_settings_form($form);
+ return system_settings_form($form);
}
/**
@@ -345,11 +345,11 @@ function boincimport_post_configuration() {
available.') .' ';
$output .= ' ';
//User Set up
- $output .= ''. t('User settings') .' ';
+ $output .= ''. t('User settings') .' ';
$output .= ''. t('Make sure your !user_settings are correct. Specifically,
you can enable or disable signatures there. ', array(
'!user_settings' => l(t('user settings'), 'admin/user/settings')
- )) .'
';
+ )) .'';
$output .= '' . t('Note that avatar/picture support is not tied to user
settings Picture support at this time.') . '
';
/*$output .= '' . t('In order to activate avatar/picture support, you need to
@@ -364,7 +364,7 @@ function boincimport_post_configuration() {
'@files' => file_directory_path(). '/pictures'
)) .'';
$output .= ''; */
-
+
// Forum Set up
$output .= '
'. t('Forum settings') .' ';
$output .= ''. t('Check any additional changes to make on the
diff --git a/drupal/sites/default/boinc/modules/boincimport/includes/import_subscriptions.php b/drupal/sites/default/boinc/modules/boincimport/includes/import_subscriptions.php
index cc0d4137ad9..bff66acb223 100644
--- a/drupal/sites/default/boinc/modules/boincimport/includes/import_subscriptions.php
+++ b/drupal/sites/default/boinc/modules/boincimport/includes/import_subscriptions.php
@@ -15,16 +15,16 @@
require_once('./includes/bootstrap.inc');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
require_boinc('db');
-
+
// Parse arguments
$record_offset = isset($argv[1]) ? $argv[1] : 0;
$chunk_size = isset($argv[2]) ? $argv[2] : 100;
-
+
// Construct sql conditions
$limit = sprintf('LIMIT %d,%d', $record_offset, $chunk_size);
-
+
$total_count = 0;
-
+
// Get the users with subscriptions to import
db_set_active('boinc_rw');
$subscribed_boinc_users = db_query("
@@ -32,7 +32,7 @@
ORDER BY userid ASC %s", $limit
);
db_set_active('default');
-
+
// Import subscriptions
while ($boinc_subscription = db_fetch_object($subscribed_boinc_users)) {
$uid = get_drupal_id($boinc_subscription->userid);
diff --git a/drupal/sites/default/boinc/modules/boincimport/includes/import_team.php b/drupal/sites/default/boinc/modules/boincimport/includes/import_team.php
index 329a1998e46..f5e30687d13 100644
--- a/drupal/sites/default/boinc/modules/boincimport/includes/import_team.php
+++ b/drupal/sites/default/boinc/modules/boincimport/includes/import_team.php
@@ -14,28 +14,28 @@
require_once('./includes/bootstrap.inc');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
require_boinc('db');
-
+
// Parse arguments
$team_id = isset($argv[1]) ? $argv[1] : null;
$team_type_tid = isset($argv[2]) ? $argv[2] : null;
$input_format = isset($argv[3]) ? $argv[3] : null;
-
+
$count = 0;
-
+
// Get teams from BOINC
db_set_active('boinc_rw');
$boincteam = db_fetch_object(db_query('SELECT * FROM team WHERE id=%d', array($team_id)));
$boincteam_members = db_query('SELECT id FROM user WHERE teamid=%d', array($team_id));
$boincteam_admin = (int) db_result(db_query('SELECT userid FROM team_admin WHERE teamid=%d', array($team_id)));
db_set_active('default');
-
+
$team_exists = db_query('SELECT team_id FROM {boincteam} WHERE team_id = %d', $boincteam->id);
// FIXME: $team_exists==FALSE should be handled as an error and return an error code!
if ($team_exists != FALSE && db_fetch_object($team_exists) == FALSE) {
$boincteam->description = _boincimport_text_sanitize($boincteam->description);
$teaser = node_teaser($boincteam->description);
-
+
// Construct the team as an organic group node
$node = array(
'type' => 'team',
@@ -52,7 +52,7 @@
'sticky' => 0,
'format' => $input_format
);
-
+
// Use pathauto function, if available, to clean up the path
if (module_exists('pathauto')) {
module_load_include('inc', 'pathauto', 'pathauto');
@@ -62,18 +62,18 @@
echo 'Pathauto module is required!';
exit;
}
-
+
$node = (object) $node; // node_save requires an object form
-
+
$node->taxonomy[] = taxonomy_get_term($team_type_tid);
-
+
// Save the team node
node_save($node);
-
+
// Save the team IDs to a BOINC <--> Drupal reference table.
db_query('INSERT INTO {boincteam} (team_id, nid) VALUES (%d, %d)', $boincteam->id, $node->nid);
}
-
+
// Determine team membership
db_set_active('boinc_rw');
$boincteam_member_ids = array();
@@ -82,12 +82,12 @@
if ($boincteam_member_ids) {
$team_members = db_query('SELECT uid FROM {boincuser} WHERE boinc_id IN(%s)', implode(',', $boincteam_member_ids));
$team_admin = (int) db_result(db_query('SELECT uid FROM {boincuser} WHERE boinc_id=%d', $boincteam_admin));
-
+
while ($drupal_user = db_fetch_object($team_members)) {
// Add action to take on member accounts?
$count++;
}
}
-
+
echo $count;
-
+
diff --git a/drupal/sites/default/boinc/modules/boincimport/includes/import_users.php b/drupal/sites/default/boinc/modules/boincimport/includes/import_users.php
index f41236793cf..ec88c0f0021 100644
--- a/drupal/sites/default/boinc/modules/boincimport/includes/import_users.php
+++ b/drupal/sites/default/boinc/modules/boincimport/includes/import_users.php
@@ -15,17 +15,17 @@
require_once('./includes/bootstrap.inc');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
require_boinc('db');
-
+
// Parse arguments
$import_lurkers = isset($argv[1]) ? $argv[1] : false;
$record_offset = isset($argv[2]) ? $argv[2] : 0;
$chunk_size = isset($argv[3]) ? $argv[3] : 100;
-
+
// Construct sql conditions
$limit = sprintf('LIMIT %d,%d', $record_offset, $chunk_size);
-
+
$count = 0;
-
+
db_set_active('boinc_rw');
if ($import_lurkers) {
$boinc_accounts = db_query('SELECT id FROM user ORDER BY id %s', $limit);
@@ -60,12 +60,12 @@
);
}
db_set_active('default');
-
+
while ($boinc_account = db_fetch_object($boinc_accounts)) {
// Grab the BOINC user object and create a Drupal user from it
if (boincuser_register_make_drupal_user($boinc_account->id)) {
$count++;
}
}
-
+
echo $count;
diff --git a/drupal/sites/default/boinc/modules/boincstats/boincstats.admin.inc b/drupal/sites/default/boinc/modules/boincstats/boincstats.admin.inc
index 4b2d141abf1..42e45f76e19 100644
--- a/drupal/sites/default/boinc/modules/boincstats/boincstats.admin.inc
+++ b/drupal/sites/default/boinc/modules/boincstats/boincstats.admin.inc
@@ -40,7 +40,7 @@ function boincstats_admin_stats_system(&$form_state) {
'#type' => 'textfield',
'#title' => t('Stats ID for @project', array(
'@project' => variable_get('site_name', 'Drupal-BOINC'))),
- '#default_value' => $default['boinc_stats_remote_project_id'],
+ '#default_value' => $default['boinc_stats_remote_project_id'],
'#description' => t('This project must be registered with a stats system in
order for some statistics to be available. Currently only one system is
supported. !find_project_id there.', array(
diff --git a/drupal/sites/default/boinc/modules/boincstats/boincstats.module b/drupal/sites/default/boinc/modules/boincstats/boincstats.module
index 4c20a62eef0..a1fe9d69119 100644
--- a/drupal/sites/default/boinc/modules/boincstats/boincstats.module
+++ b/drupal/sites/default/boinc/modules/boincstats/boincstats.module
@@ -23,7 +23,7 @@
function boincstats_menu() {
$items['admin/boinc/stats'] = array(
'title' => 'Environment: Statistics setup',
- 'description' => 'Configure the stats system for generating charts and
+ 'description' => 'Configure the stats system for generating charts and
providing cross project data.',
'page callback' => 'drupal_get_form',
'page arguments' => array('boincstats_admin_stats_system'),
@@ -48,31 +48,31 @@ function boincstats_menu() {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Page callbacks from hook_menu()
* * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
+
/**
* User stats chart menu callback
* Called to generate the daily credit status chart for a user (dashboard)
*/
function boincstats_get_user_stats_chart($cpid = null, $chart_size = 'medium') {
-
+
// pChart library inclusions
module_load_include('php', 'boincstats', 'includes/pchart/class/pData.class');
module_load_include('php', 'boincstats', 'includes/pchart/class/pDraw.class');
module_load_include('php', 'boincstats', 'includes/pchart/class/pImage.class');
module_load_include('php', 'boincstats', 'includes/pchart/class/pCache.class');
-
+
init_theme();
global $theme_key;
$cache_name = "{$theme_key}_";
-
+
$dataset_size = 0;
$chart_height = 0;
$chart_width = 0;
$draw_x_lines = FALSE;
$label_x_axis = FALSE;
-
+
$stats_xml = NULL;
-
+
switch($chart_size) {
case 'small':
$cache_name .= "{$cpid}_small";
@@ -92,16 +92,16 @@ function boincstats_get_user_stats_chart($cpid = null, $chart_size = 'medium') {
$draw_x_lines = TRUE;
$label_x_axis = TRUE;
}
-
+
// Sanity check for cache directory
if (!boincstats_check_cache_dir()) {
return;
}
-
+
// Initialize the cache object and flush stale images
$myCache = new pCache(array('CacheFolder' => realpath('.') . '/' . conf_path() . '/files/cache'));
$myCache->removeOlderThan(60*60*24);
-
+
if ($myCache->isInCache($cache_name)) {
$myCache->strokeFromCache($cache_name);
}
@@ -118,21 +118,21 @@ function boincstats_get_user_stats_chart($cpid = null, $chart_size = 'medium') {
else {
for ($i = 0; $i <= $dataset_size; $i++) $dataset[] = 0;
}
-
+
// Get color configuration
$color_keys = array('R', 'G', 'B');
$palette_color_hex = theme_get_setting('boinc_stats_chart_color');
$palette_color = array_combine($color_keys, sscanf($palette_color_hex, "#%02x%02x%02x"));
$backdrop_color_hex = theme_get_setting('boinc_stats_chart_bcolor');
$backdrop_color = array_combine($color_keys, sscanf($backdrop_color_hex, "#%02x%02x%02x"));
-
+
// Create and populate the pData object
$MyData = new pData();
-
+
$MyData->addPoints($dataset, 'series1');
$MyData->setPalette('series1', $palette_color);
$MyData->setAxisPosition(0,AXIS_POSITION_RIGHT);
-
+
// Create the pChart object
$myPicture = new pImage($chart_width, $chart_height, $MyData);
@@ -147,7 +147,7 @@ function boincstats_get_user_stats_chart($cpid = null, $chart_size = 'medium') {
if ($backdrop_color) {
$myPicture->drawFilledRectangle(0, 0, $chart_width, $chart_height, $backdrop_color);
}
-
+
// Draw the scale
$scaleSettings = array(
'Mode' => SCALE_MODE_START0,
@@ -172,7 +172,7 @@ function boincstats_get_user_stats_chart($cpid = null, $chart_size = 'medium') {
);
$myPicture->setFontProperties(array('FontSize' => 10));
$myPicture->drawScale($scaleSettings);
-
+
if ($label_x_axis) {
for ($i = 5; $i >= 0; $i--) {
$label = ($i) ? -10*$i : 'Today';
@@ -182,10 +182,10 @@ function boincstats_get_user_stats_chart($cpid = null, $chart_size = 'medium') {
// Draw the area chart
$myPicture->drawAreaChart(array('ForceTransparency' => 100));
-
+
// Write the chart to the cache
$myCache->writeToCache($cache_name, $myPicture);
-
+
// Render the picture (choose the best way)
//$myPicture->autoOutput('pictures/example.drawAreaChart.simple.png');
$myPicture->stroke();
@@ -202,28 +202,28 @@ function boincstats_get_project_stats_chart() {
module_load_include('php', 'boincstats', 'includes/pchart/class/pDraw.class');
module_load_include('php', 'boincstats', 'includes/pchart/class/pImage.class');
module_load_include('php', 'boincstats', 'includes/pchart/class/pCache.class');
-
+
init_theme();
global $theme_key;
$cache_name = "{$theme_key}_project_chart";
-
+
$color_keys = array('R', 'G', 'B');
-
+
// Get color configuration
$palette_color_hex = theme_get_setting('boinc_stats_chart_color');
$palette_color = array_combine($color_keys, sscanf($palette_color_hex, "#%02x%02x%02x"));
$backdrop_color_hex = theme_get_setting('boinc_stats_chart_bcolor');
$backdrop_color = array_combine($color_keys, sscanf($backdrop_color_hex, "#%02x%02x%02x"));
-
+
// Sanity check for cache directory
if (!boincstats_check_cache_dir()) {
return;
}
-
+
// Initialize the cache object and flush stale images
$myCache = new pCache(array('CacheFolder' => realpath('.') . '/' . conf_path() . '/files/cache'));
$myCache->removeOlderThan(60*60*24);
-
+
if ($myCache->isInCache($cache_name)) {
$myCache->strokeFromCache($cache_name);
}
@@ -240,10 +240,10 @@ function boincstats_get_project_stats_chart() {
else {
for ($i = 0; $i <= 30; $i++) $dataset[] = 0;
}
-
+
// Create and populate the pData object
$MyData = new pData();
-
+
$MyData->addPoints($dataset, 'series1');
$MyData->setPalette('series1', $palette_color);
$MyData->setAxisPosition(0,AXIS_POSITION_RIGHT);
@@ -285,7 +285,7 @@ function boincstats_get_project_stats_chart() {
);
$myPicture->setFontProperties(array('FontSize' => 10));
$myPicture->drawScale($scaleSettings);
-
+
/*for ($i = 5; $i >= 0; $i--) {
$label = ($i) ? -10*$i : 'Today';
$myPicture->drawText(598-596*($i/6)-5, 2, $label, array('Align' => TEXT_ALIGN_TOPRIGHT));
@@ -293,7 +293,7 @@ function boincstats_get_project_stats_chart() {
// Draw the area chart */
$myPicture->drawAreaChart(array('ForceTransparency' => 100));
-
+
// Write the chart to the cache
$myCache->writeToCache($cache_name, $myPicture);
@@ -341,13 +341,13 @@ function boincstats_check_cache_dir($cache_path = 'files/cache') {
*
*/
function boincstats_get_project_stats($type = 'total', $cpid = NULL) {
-
+
// Determine the stats environment
boincstats_check_configuration();
$stats_server = variable_get('boinc_stats_server', '');
$stats_rpc = variable_get('boinc_stats_project_credit_history_rpc', '');
$project_id = variable_get('boinc_stats_remote_project_id', '');
-
+
$get = array(
'id' => $project_id
);
@@ -358,13 +358,13 @@ function boincstats_get_project_stats($type = 'total', $cpid = NULL) {
case 'total':
default:
}
-
+
if ($cpid) {
// If a user CPID has been provided, limit scope to that user
$stats_rpc = variable_get('boinc_stats_user_credit_history_rpc', '');
$get['cpid'] = $cpid;
}
-
+
// Construct query string
$args = array();
foreach ($get as $arg => $value) {
@@ -376,7 +376,7 @@ function boincstats_get_project_stats($type = 'total', $cpid = NULL) {
}
}
$query = '?' . implode('&', $args);
-
+
// Load XML from RPC
$stats_xml = NULL;
$target_url = "http://{$stats_server}/{$stats_rpc}{$query}";
diff --git a/drupal/sites/default/boinc/modules/boincteam/boincteam.module b/drupal/sites/default/boinc/modules/boincteam/boincteam.module
index 053b411a5fa..f6ba8089a04 100644
--- a/drupal/sites/default/boinc/modules/boincteam/boincteam.module
+++ b/drupal/sites/default/boinc/modules/boincteam/boincteam.module
@@ -119,7 +119,7 @@ function boincteam_menu() {
'type' => MENU_NORMAL_ITEM,
'file' => 'boincteam.admin.inc',
);
-
+
return $items;
}
@@ -178,7 +178,7 @@ function boincteam_cron() {
* Callback ...
*/
function boincteam_top_teams() {
-
+
}
/**
@@ -237,7 +237,7 @@ function boincteam_assume_foundership($team_id) {
$boincteam_id = boincteam_lookup_id($team_id);
$boincteam = boincteam_load($boincteam_id);
$boincuser_id = $account->boincuser_id;
-
+
if (boincteam_foundership_transfer_ok($boincteam)) {
if ($boincuser_id == $boincteam->ping_user) {
db_set_active('boinc_rw');
@@ -306,13 +306,13 @@ function boincteam_deny_foundership_request($team_id) {
$boincteam_id
);
db_set_active('default');
-
+
drupal_set_message(t('The transfer request has been denied. No additional
requests will be allowed until 90 days have passed since this request was
made.'));
drupal_goto("community/teams/{$team_id}/edit/founder");
}
-
+
/**
* Get the join date of a user
@@ -351,7 +351,7 @@ function boincteam_get_type($team_id) {
/**
* Access a vocabulary of terms by name
- */
+ */
function boincteam_get_vocabulary_by_name($name) {
$vocabs = taxonomy_get_vocabularies('team');
foreach ($vocabs as $vocab) {
@@ -371,10 +371,10 @@ function boincteam_history_xml($team_id) {
'action' => array(),
),
);
-
+
db_set_active('boinc_rw');
$result = db_query("
- SELECT
+ SELECT
td.userid AS id,
u.name,
IF (td.joining, 'joined', 'left') AS action,
@@ -387,11 +387,11 @@ function boincteam_history_xml($team_id) {
$boincteam_id
);
db_set_active('default');
-
+
while ($record = db_fetch_array($result)) {
$team_history['actions']['action'][] = $record;
}
-
+
header('Content-type: text/xml');
echo xml_to_text(array_to_xml($team_history));
}
@@ -508,7 +508,7 @@ function boincteam_show_messages() {
function boincteam_join($team_id) {
global $user;
$account = user_load($user->uid);
-
+
$boincteam_id = boincteam_lookup_id($team_id);
$boincteam = boincteam_load($boincteam_id);
if ($boincteam->joinable AND $account->team != $team_id) {
@@ -537,7 +537,7 @@ function boincteam_join($team_id) {
function boincteam_leave($team_id) {
global $user;
$account = user_load($user->uid);
-
+
$boincteam_id = boincteam_lookup_id($team_id);
$boincteam = boincteam_load($boincteam_id);
if ($account->team == $team_id) {
@@ -565,7 +565,7 @@ function boincteam_remove_admin($team_id, $user_id) {
$team = node_load($team_id);
$boincteam_id = boincteam_lookup_id($team_id);
$boincuser_id = $account->boincuser_id;
-
+
if (boincteam_is_admin($team_id, $account->uid)) {
// Update the team in the BOINC db
db_set_active('boinc_rw');
@@ -586,7 +586,7 @@ function boincteam_remove_admin($team_id, $user_id) {
@uid from team @nid',
array(
'@current_user' => $user->uid,
- '@uid' => $account->uid,
+ '@uid' => $account->uid,
'@nid' => $team_id
), WATCHDOG_NOTICE);
}
@@ -599,7 +599,7 @@ function boincteam_remove_admin($team_id, $user_id) {
function boincteam_remove_member($team_id, $user_id) {
global $user;
$account = user_load($user_id);
-
+
$boincteam_id = boincteam_lookup_id($team_id);
$boincteam = boincteam_load($boincteam_id);
if ($account->team == $team_id) {
@@ -615,7 +615,7 @@ function boincteam_remove_member($team_id, $user_id) {
watchdog('boincteam', 'User @current_user removed user @uid from team @nid',
array(
'@current_user' => $user->uid,
- '@uid' => $account->uid,
+ '@uid' => $account->uid,
'@nid' => $team_id
), WATCHDOG_NOTICE);
}
@@ -640,7 +640,7 @@ function boincteam_request_foundership($team_id) {
$boincteam_id = boincteam_lookup_id($team_id);
$boincteam = boincteam_load($boincteam_id);
$boincuser_id = $account->boincuser_id;
-
+
if (boincteam_is_founder($team_id, $account->uid)) {
// Shouldn't even be here...
drupal_set_message(t('@user is already the team founder.',
@@ -689,7 +689,7 @@ function boincteam_set_founder($team_id, $user_id) {
$team = node_load($team_id);
$boincteam_id = boincteam_lookup_id($team_id);
$boincuser_id = $account->boincuser_id;
-
+
if (boincteam_is_member($team_id, $account->uid)) {
// Update the team in the BOINC db
db_set_active('boinc_rw');
@@ -710,7 +710,7 @@ function boincteam_set_founder($team_id, $user_id) {
@nid to user @uid',
array(
'@current_user' => $user->uid,
- '@uid' => $account->uid,
+ '@uid' => $account->uid,
'@nid' => $team_id
), WATCHDOG_NOTICE);
}
@@ -736,7 +736,7 @@ function boincteam_new_foundership_transfer_request_ok($team_id) {
return FALSE;
}
-/**
+/**
* The time at which foundership can be transferred if the founder has not
* responded to the request
*/
@@ -762,7 +762,7 @@ function boincteam_user_requested_foundership($team_id, $user_id = NULL) {
$account = user_load($user_id);
$boincteam_id = boincteam_lookup_id($team_id);
$boincteam = boincteam_load($boincteam_id);
-
+
if ($boincteam->ping_user == $account->boincuser_id) {
// Be sure the request is still active
return !boincteam_new_foundership_transfer_request_ok($team_id);
@@ -776,7 +776,7 @@ function boincteam_user_requested_foundership($team_id, $user_id = NULL) {
/**
* General info about team admins
- */
+ */
function boincteam_about_admins_panel() {
$output = '';
$output .= '
' . bts('About team admins', array(), NULL, 'boinc:team-admins-panel') . ' ';
@@ -806,7 +806,7 @@ function boincteam_about_admins_panel() {
/**
* General info about changing the team founder
- */
+ */
function boincteam_about_founder_panel() {
$output = '';
$output .= '' . bts('Changing the team founder', array(), NULL, 'boinc:team-founder-panel')
@@ -882,7 +882,7 @@ function boincteam_create_team_panel() {
$output = '';
$output .= '' . bts('Create a team', array(), NULL, 'boinc:create-team-panel') . ' ';
$output .= drupal_get_form('boincteam_create_form');
-
+
return $output;
}
@@ -935,7 +935,7 @@ function boincteam_edit_team_panel($team_id) {
$output = '';
$output .= '' . $team->title . ' ';
$output .= drupal_get_form('boincteam_edit_form', $team_id);
-
+
return $output;
}
@@ -949,7 +949,7 @@ function boincteam_join_team_panel($team_id) {
$output .= ' ' . bts('Click here to become a member of @this_team',
array('@this_team' =>$team->title), NULL, 'boinc:join-team-panel') . '
';
$output .= '';
- $output .= ' ' .
+ $output .= ' ' .
l(bts('Join this team', array(), NULL, 'boinc:join-team-panel'), "community/teams/{$team_id}/join") . ' ';
$output .= ' ';
return $output;
@@ -965,7 +965,7 @@ function boincteam_leave_team_panel($team_id) {
$output .= '' . bts('Click here to revoke your membership with'
. ' @this_team', array('@this_team' =>$team->title), NULL, 'boinc:leave-team-panel') . '
';
$output .= '';
- $output .= ' ' .
+ $output .= ' ' .
l(bts('Leave this team', array(), NULL, 'boinc:leave-team-panel'), "community/teams/{$team_id}/leave") . ' ';
$output .= ' ';
return $output;
@@ -973,14 +973,14 @@ function boincteam_leave_team_panel($team_id) {
/**
* General info about team admins
- */
+ */
function boincteam_manage_admins_panel_header($team_id) {
$output = '';
$output .= '' . bts('Add team admin', array(), NULL, 'boinc:team-manage-admins') . ' ';
$output .= drupal_get_form('boincteam_add_admin_form', $team_id);
$output .= '
';
$output .= '' . bts('Current team admins', array(), NULL, 'boinc:team-manage-admins') . ' ';
-
+
return $output;
}
@@ -993,7 +993,7 @@ function boincteam_management_panel($team_id) {
$output = '';
$output .= '' . bts('Manage team', array(), NULL, 'boinc:team-manage') . ' ';
-
+
// PM all members
if (module_exists('privatemsg')) {
$output .= '';
-
+
$output .= '';
-
+
return $output;
}
@@ -1091,10 +1091,10 @@ function boincteam_member_link_panel() {
$team = node_load($account->team);
$output = '';
$output .= '' . bts('My team', array(), NULL, 'boinc:account-team-panel') . ' ';
- $output .= '' . bts('You are a member of @team.',
+ $output .= '
' . bts('You are a member of @team.',
array('@team' => $team->title), NULL, 'boinc:account-team-panel') . '
';
$output .= '';
- $output .= ' ' .
+ $output .= ' ' .
l(bts('View my team', array(), NULL, 'boinc:account-team-panel'), "community/teams/{$account->team}") . ' ';
$output .= ' ';
return $output;
@@ -1112,7 +1112,7 @@ function boincteam_request_foundership_panel($team_id) {
$boincuser_id = $account->boincuser_id;
$output = '';
$output .= '' . bts('Request foundership', array(), NULL, 'boinc:team-request-foundership') . ' ';
-
+
if (boincteam_user_requested_foundership($team_id)) {
$deadline = boincteam_foundership_transfer_ok_time($boincteam);
$days_to_deadline = ceil(($deadline - time()) / (24*60*60));
@@ -1143,7 +1143,7 @@ function boincteam_request_foundership_panel($team_id) {
}
$output .= '';
$output .= '';
- $output .= ' ' .
+ $output .= ' ' .
l(bts('Assume foundership', array(), NULL, 'boinc:team-request-foundership'), "community/teams/{$team_id}/assume-foundership") . ' ';
$output .= ' ';
}
@@ -1165,7 +1165,7 @@ function boincteam_request_foundership_panel($team_id) {
elseif (!boincteam_new_foundership_transfer_request_ok($team_id)) {
// If this user does not have a transfer request pending, but new requests
// are not allowed, set the deadline to 90 days instead of 60 (as the user
- // who made the request has 30 additional days to assume foundership if
+ // who made the request has 30 additional days to assume foundership if
// there is no response to the request)
$deadline = boincteam_foundership_transfer_ok_time($boincteam);
$days_to_deadline = ceil(($deadline - time()) / (24*60*60)) + 30;
@@ -1189,7 +1189,7 @@ function boincteam_request_foundership_panel($team_id) {
. ' @this_team.',
array('@this_team' =>$team->title), NULL, 'boinc:team-request-foundership') . '';
$output .= '';
- $output .= ' ' .
+ $output .= ' ' .
l(bts('Initiate request', array(), NULL, 'boinc:team-request-foundership'), "community/teams/{$team_id}/request-foundership") . ' ';
$output .= ' ';
}
@@ -1207,7 +1207,7 @@ function boincteam_request_foundership_response_panel($team_id) {
$boincteam = boincteam_load($boincteam_id);
$boincuser_id = $account->boincuser_id;
$output = '';
-
+
if ($boincteam->ping_user) {
if ($boincteam->ping_user < 0) {
$member = user_load(boincuser_lookup_uid(-$boincteam->ping_user));
@@ -1250,7 +1250,7 @@ function boincteam_request_foundership_response_panel($team_id) {
),
NULL, 'boinc:team-request-foundership-response') . '';
$output .= '';
- $output .= ' ' .
+ $output .= ' ' .
l(bts('Deny request', array(), NULL, 'boinc:team-request-foundership-response'), "community/teams/{$team_id}/deny-foundership-request") . ' ';
$output .= ' ';
}
@@ -1277,7 +1277,7 @@ function boincteam_search_view($type = 'team') {
/**
* General info about the concept of teams
- */
+ */
function boincteam_topic_overview_panel() {
$site_name = variable_get('site_name', 'Drupal-BOINC');
$output = '';
diff --git a/drupal/sites/default/boinc/modules/boincteam/boincteam.views.inc b/drupal/sites/default/boinc/modules/boincteam/boincteam.views.inc
index e52431de542..29a3a707693 100644
--- a/drupal/sites/default/boinc/modules/boincteam/boincteam.views.inc
+++ b/drupal/sites/default/boinc/modules/boincteam/boincteam.views.inc
@@ -12,28 +12,28 @@
* relationships exist; is data text, integer, float; what sort options exist).
*/
function boincteam_views_data() {
-
+
// -----------------------------------------------------------------------------------------------
// Definition for team table
// -----------------------------------------------------------------------------------------------
-
+
$data['team']['table']['group'] = t('BOINC');
-
+
$data['team']['table']['base'] = array(
'field' => 'id',
'title' => t('BOINC team'),
'help' => t('BOINC data for a team'),
'database' => 'boinc_rw'
);
-
+
// This table references the {user} table.
// This join creates an 'implicit' relationship to the user table, so that when
// "User" is the base table, the fields are automatically available.
-
+
// Index this array by the table name to which this table refers.
// 'left_field' is the primary key in the referenced table.
// 'field' is the foreign key in this table.
-
+
$data['team']['table']['join'] = array(
'user' => array(
'left_field' => 'id',
@@ -45,9 +45,9 @@ function boincteam_views_data() {
// each field, you may define what field, sort, argument, and/or filter
// handlers it supports. This will determine where in the Views interface you
// may use the field.
-
+
// Primary keys allowed as arguments
-
+
$data['team']['id'] = array(
'title' => bts('Team ID', array(), NULL, 'boinc:team-id'),
'help' => t('The BOINC ID of the team.'),
@@ -75,14 +75,14 @@ function boincteam_views_data() {
'handler' => 'views_handler_sort_numeric'
)
);
-
+
// Foreign key fields
-
+
$data['team']['userid'] = array(
'title' => bts('Founder', array(), NULL, 'boinc:view-team-info'),
'help' => t('The founder of this team.'),
// This is a foreign key to the {user} table. When the view is configured
- // with this relationship, all the fields for the related user node will be
+ // with this relationship, all the fields for the related user node will be
// available.
'argument' => array(
'handler' => 'views_handler_argument_boincuser_id',
@@ -107,7 +107,7 @@ function boincteam_views_data() {
'handler' => 'views_handler_sort_numeric'
)
);
-
+
// Descriptions of general fields (alphabetized)
/*
$data['team']['create_time'] = array(
@@ -139,7 +139,7 @@ function boincteam_views_data() {
)
);
*/
-
+
$data['team']['country'] = array(
'title' => bts('Country', array(), NULL, 'boinc:country-of-origin'),
'help' => t('The country of a team.'),
@@ -212,28 +212,28 @@ function boincteam_views_data() {
'handler' => 'views_handler_sort_numeric'
)
);
-
+
// -----------------------------------------------------------------------------------------------
// Definition for team_admin table
// -----------------------------------------------------------------------------------------------
-
+
$data['team_admin']['table']['group'] = t('BOINC');
-
+
$data['team_admin']['table']['base'] = array(
'field' => 'id',
'title' => t('BOINC team admins'),
'help' => t('BOINC admins for a team'),
'database' => 'boinc_rw'
);
-
+
// This table references the {team} table.
// This join creates an 'implicit' relationship to the team table, so that when
// "Team" is the base table, the fields are automatically available.
-
+
// Index this array by the table name to which this table refers.
// 'left_field' is the primary key in the referenced table.
// 'field' is the foreign key in this table.
-
+
$data['team_admin']['table']['join'] = array(
'team' => array(
'left_field' => 'id',
@@ -245,9 +245,9 @@ function boincteam_views_data() {
// each field, you may define what field, sort, argument, and/or filter
// handlers it supports. This will determine where in the Views interface you
// may use the field.
-
+
// Primary keys allowed as arguments
-
+
$data['team_admin']['teamid'] = array(
'title' => bts('Team ID', array(), NULL, 'boinc:team-id'),
'help' => t('The BOINC ID of the team on which this user is an admin.'),
@@ -274,14 +274,14 @@ function boincteam_views_data() {
'handler' => 'views_handler_sort_numeric'
)
);
-
+
// Foreign key fields
-
+
$data['team_admin']['userid'] = array(
'title' => bts('User ID', array(), NULL, 'boinc:user-details'),
'help' => t('The user that is a team admin.'),
// This is a foreign key to the {user} table. When the view is configured
- // with this relationship, all the fields for the related user node will be
+ // with this relationship, all the fields for the related user node will be
// available.
'argument' => array(
'handler' => 'views_handler_argument_boincteam_id',
@@ -306,9 +306,9 @@ function boincteam_views_data() {
'handler' => 'views_handler_sort_numeric'
)
);
-
+
// Descriptions of general fields (alphabetized)
-
+
$data['team_admin']['create_time'] = array(
'title' => bts('Admin since', array(), NULL, 'boinc:team-when-user-became-an-admin'),
'help' => t('When the BOINC user became a team admin.'),
@@ -323,25 +323,25 @@ function boincteam_views_data() {
'handler' => 'views_handler_sort_date'
)
);
-
+
// -----------------------------------------------------------------------------------------------
// Definition for team_delta table
// -----------------------------------------------------------------------------------------------
-
+
$data['team_delta']['table']['group'] = t('BOINC');
// Describe each of the individual fields in this table to Views. For
// each field, you may define what field, sort, argument, and/or filter
// handlers it supports. This will determine where in the Views interface you
// may use the field.
-
+
// Primary keys allowed as arguments
-
+
$data['team_delta']['teamid'] = array(
'title' => bts('Team ID', array(), NULL, 'boinc:team-id'),
'help' => t('The team ID for this team history event.'),
// This is a foreign key to the {team} table. When the view is configured
- // with this relationship, all the fields for the related user node will be
+ // with this relationship, all the fields for the related user node will be
// available.
'argument' => array(
'handler' => 'views_handler_argument_boincteam_id',
@@ -360,9 +360,9 @@ function boincteam_views_data() {
'handler' => 'views_handler_sort_numeric'
)
);
-
+
// Foreign key fields
-
+
$data['team_delta']['userid'] = array(
'title' => bts('User ID', array(), NULL, 'boinc:user-details'),
'help' => t('The user for this team history event.'),
@@ -383,9 +383,9 @@ function boincteam_views_data() {
'handler' => 'views_handler_sort_numeric'
)
);
-
+
// Descriptions of general fields (alphabetized)
-
+
$data['team_delta']['joining'] = array(
'title' => bts('User joined', array(), NULL, 'boinc:user-joined-or-leaving-team'),
'help' => t('Whether the event is the user joining the team or leaving.'),
@@ -429,8 +429,8 @@ function boincteam_views_data() {
'sort' => array(
'handler' => 'views_handler_sort_numeric'
)
- );
-
+ );
+
return $data;
}
diff --git a/drupal/sites/default/boinc/modules/boincteam/boincteam_forum.install b/drupal/sites/default/boinc/modules/boincteam/boincteam_forum.install
index 71c6dd23ba2..e759978e339 100644
--- a/drupal/sites/default/boinc/modules/boincteam/boincteam_forum.install
+++ b/drupal/sites/default/boinc/modules/boincteam/boincteam_forum.install
@@ -79,7 +79,7 @@ function boincteam_forum_schema() {
),
'primary key' => array('tfid')
);
-
+
$schema['boincteam_forum_node'] = array(
'description' => t('Maps topic nodes to team forums.'),
'fields' => array(
@@ -101,7 +101,7 @@ function boincteam_forum_schema() {
),
'primary key' => array('nid')
);
-
+
return $schema;
}
@@ -115,4 +115,4 @@ function boincteam_forum_uninstall() {
// Drop tables.
drupal_uninstall_schema('boincteam_forum');
drupal_uninstall_schema('boincteam_forum_topic');
-}
\ No newline at end of file
+}
diff --git a/drupal/sites/default/boinc/modules/boincteam/boincteam_forum.module b/drupal/sites/default/boinc/modules/boincteam/boincteam_forum.module
index 6009bf783eb..7a0b63140ac 100644
--- a/drupal/sites/default/boinc/modules/boincteam/boincteam_forum.module
+++ b/drupal/sites/default/boinc/modules/boincteam/boincteam_forum.module
@@ -37,7 +37,7 @@ function boincteam_forum_form_alter(&$form, $form_state, $form_id) {
switch ($form_id) {
// Team forum node edit form
case 'team_forum_node_form':
-
+
// Internal fields to indicate where these changes are taking place
array_unshift($form, array(
'tfid' => array(
@@ -46,7 +46,7 @@ function boincteam_forum_form_alter(&$form, $form_state, $form_id) {
),
));
break;
-
+
default:
}
}
@@ -114,9 +114,9 @@ function boincteam_forum_node_load($node) {
WHERE nid = %d", $node->nid
));
break;
-
+
default:
-
+
}
}
@@ -127,11 +127,11 @@ function boincteam_forum_node_load($node) {
function boincteam_forum_node_update($node) {
switch($node->type) {
case 'team_forum':
-
+
break;
-
+
default:
-
+
}
}
@@ -254,7 +254,7 @@ function boincteam_forum_list($team_id = NULL) {
);
$row = 0;
while ($team_forum = db_fetch_object($result)) {
-
+
$team_forum->link = url("community/teams/{$team_id}/forum/{$team_forum->tfid}");
$team_forum->zebra = $row % 2 ? 'even' : 'odd';
$team_forum->new_topics = 0; // TODO: Track user views of team topics
@@ -327,7 +327,7 @@ function boincteam_forum_create_form_panel() {
$output .= '' . bts('Create team message board', array(), NULL, 'boinc:team-forum')
. ' ';
$output .= drupal_get_form('boincteam_forum_create_form');
-
+
return $output;
}
@@ -337,10 +337,10 @@ function boincteam_forum_create_form_panel() {
function boincteam_forum_edit_form_panel($tfid) {
$team_forum = boincteam_forum_load($tfid);
$output = '';
- $output .= '' . bts('Edit message board', array(), NULL, 'boinc:team-forum') . ': ' .
+ $output .= '' . bts('Edit message board', array(), NULL, 'boinc:team-forum') . ': ' .
$team_forum->title . ' ';
$output .= drupal_get_form('boincteam_forum_edit_form', $tfid);
-
+
return $output;
}
@@ -361,7 +361,7 @@ function boincteam_forum_link_panel($team_id) {
$output .= '';
foreach ($forums as $forum) {
if (!$show_public_only OR $forum->public) {
- $output .= ' ' .
+ $output .= ' ' .
l(
//$forum->title,
bts('Enter forum', array(), NULL, 'boinc:team-forum'),
@@ -378,7 +378,7 @@ function boincteam_forum_link_panel($team_id) {
/**
* General info about team forums
- */
+ */
function boincteam_forum_topic_overview_panel($nid = NULL) {
$output = '';
$output .= '' . bts('About message boards', array(), NULL, 'boinc:team-forum') . ' ';
diff --git a/drupal/sites/default/boinc/modules/boincteam/boincteam_forum.views.inc b/drupal/sites/default/boinc/modules/boincteam/boincteam_forum.views.inc
index d88c99e23c0..bb9ffde49fb 100644
--- a/drupal/sites/default/boinc/modules/boincteam/boincteam_forum.views.inc
+++ b/drupal/sites/default/boinc/modules/boincteam/boincteam_forum.views.inc
@@ -12,13 +12,13 @@
* relationships exist; is data text, integer, float; what sort options exist).
*/
function boincteam_forum_views_data() {
-
+
// -----------------------------------------------------------------------------------------------
// Definition for team table
// -----------------------------------------------------------------------------------------------
-
+
$data['boincteam_forum_node']['table']['group'] = t('BOINC');
-
+
$data['boincteam_forum_node']['table']['base'] = array(
'field' => 'nid',
'title' => t('BOINC team forum topic'),
@@ -29,9 +29,9 @@ function boincteam_forum_views_data() {
// each field, you may define what field, sort, argument, and/or filter
// handlers it supports. This will determine where in the Views interface you
// may use the field.
-
+
// Primary keys allowed as arguments
-
+
$data['boincteam_forum_node']['tfid'] = array(
'title' => t('Team forum ID'),
'help' => t('The ID of the team forum containing this topic.'),
@@ -58,14 +58,14 @@ function boincteam_forum_views_data() {
'handler' => 'views_handler_sort_numeric'
)
);
-
+
// Foreign key fields
-
+
$data['boincteam_forum_node']['nid'] = array(
'title' => t('Team forum node'),
'help' => t('The node containing the content of this team forum topic.'),
// This is a foreign key to the {node} table. When the view is configured
- // with this relationship, all the fields for the related user node will be
+ // with this relationship, all the fields for the related user node will be
// available.
'relationship' => array(
'base' => 'node',
@@ -84,9 +84,9 @@ function boincteam_forum_views_data() {
'handler' => 'views_handler_sort_numeric'
)
);
-
+
// Descriptions of general fields (alphabetized)
// ...
-
+
return $data;
}
diff --git a/drupal/sites/default/boinc/modules/boincteam/includes/boincteam.forms.inc b/drupal/sites/default/boinc/modules/boincteam/includes/boincteam.forms.inc
index 94cc4731898..94d7fa781f9 100644
--- a/drupal/sites/default/boinc/modules/boincteam/includes/boincteam.forms.inc
+++ b/drupal/sites/default/boinc/modules/boincteam/includes/boincteam.forms.inc
@@ -15,7 +15,7 @@
*/
function boincteam_create_form(&$form_state) {
$form = array();
-
+
$default = array(
'name' => '',
'name_html' => '',
@@ -25,13 +25,13 @@ function boincteam_create_form(&$form_state) {
'joinable' => TRUE,
'description' => '',
);
-
+
// Standard option sets
$form['boolean_options'] = array(
'#type' => 'value',
'#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes')),
);
-
+
// Vocabulary based option sets
$form['type_options'] = array(
'#type' => 'value',
@@ -56,7 +56,7 @@ function boincteam_create_form(&$form_state) {
'#type' => 'value',
'#value' => boinccore_get_country_list(),
);
-
+
// Form elements
$form['name'] = array(
'#title' => bts('Team name', array(), NULL, 'boinc:team-create/edit'),
@@ -107,7 +107,7 @@ function boincteam_create_form(&$form_state) {
'#description' => NULL,
);
$form['format'] = filter_form();
-
+
// Form control
$form['form control tabs prefix'] = array(
'#value' => '' . print_r($values,true) . ' ');
-
+
$input_format = !empty($values['format']) ? $values['format'] : 4;
$values['description'] = check_markup($values['description'], $input_format);
-
+
// Create the team in the BOINC db
-
+
require_boinc(array('user','team'));
$boinc_team = make_team(
$account->boincuser_id,
@@ -185,13 +185,13 @@ function boincteam_create_form_submit($form, &$form_state) {
reason.', 'error');
return FALSE;
}
-
+
// Create the team node in Drupal
-
+
$teaser = node_teaser($values['description']);
$created_time = time();
$input_format = variable_get('filter_default_format', 1);
-
+
$node = array(
'type' => 'team',
'title' => $values['name'],
@@ -207,7 +207,7 @@ function boincteam_create_form_submit($form, &$form_state) {
'sticky' => 0,
'format' => $input_format
);
-
+
// Use pathauto function, if available, to clean up the path
if (module_exists('pathauto')) {
module_load_include('inc', 'pathauto', 'pathauto');
@@ -219,7 +219,7 @@ function boincteam_create_form_submit($form, &$form_state) {
watchdog('BOINC team', 'BOINC teams require the Pathauto module. Teams
cannot be created.', 'error');
}
-
+
/*
// Add special organic group properties
$node['og_description'] = strip_tags($boincteam->description);
@@ -228,26 +228,26 @@ function boincteam_create_form_submit($form, &$form_state) {
$node['og_directory'] = OG_DIRECTORY_CHOOSE_FALSE;
$node['og_private'] = 0;
*/
-
+
$node = (object) $node; // node_save requires an object form
-
+
/*
$node->field_description[]['value'] = $boincteam->description;
$node->field_url[]['value'] = $boincteam->url;
$node->field_country[]['value'] = $boincteam->country;
*/
-
+
$node->taxonomy[] = taxonomy_get_term($values['type']);
-
+
// Save the team node
node_save($node);
-
+
// Save the team IDs to a BOINC <--> Drupal reference table.
db_query('INSERT INTO {boincteam} (team_id, nid) VALUES (%d, %d)', $boinc_team->id, $node->nid);
-
- drupal_set_message(t('Team "@name" has been created.',
+
+ drupal_set_message(t('Team "@name" has been created.',
array('@name' => $values['name'])));
-
+
$form_state['redirect'] = "community/teams/{$node->nid}";
}
@@ -260,15 +260,15 @@ function boincteam_create_form_submit($form, &$form_state) {
*/
function boincteam_edit_form(&$form_state, $team_id) {
$form = array();
-
+
$team = node_load($team_id);
$boincteam = boincteam_load(boincteam_lookup_id($team_id));
-
+
$is_boinc_wide = ($boincteam->seti_id > 0) ? TRUE : FALSE;
-
+
$form_state['storage']['team_id'] = $team_id;
$form_state['storage']['is_boinc_wide'] = $is_boinc_wide;
-
+
$default = array(
'name' => $boincteam->name,
'name_html' => $boincteam->name_html,
@@ -278,13 +278,13 @@ function boincteam_edit_form(&$form_state, $team_id) {
'joinable' => $boincteam->joinable,
'description' => $boincteam->description,
);
-
+
// Standard option sets
$form['boolean_options'] = array(
'#type' => 'value',
'#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes')),
);
-
+
// Vocabulary based option sets
$form['type_options'] = array(
'#type' => 'value',
@@ -309,7 +309,7 @@ function boincteam_edit_form(&$form_state, $team_id) {
'#type' => 'value',
'#value' => boinccore_get_country_list(),
);
-
+
// Form elements
$form['name'] = array(
'#title' => bts('Team name', array(), NULL, 'boinc:team-create/edit'),
@@ -367,7 +367,7 @@ function boincteam_edit_form(&$form_state, $team_id) {
'#description' => NULL,
);
$form['format'] = filter_form();
-
+
// Form control
$form['form control tabs prefix'] = array(
'#value' => '' . print_r($form_state, true) . ' ');
-
+
// Hidden elements
$form['prefs']['modified'] = array(
'#type' => 'hidden',
@@ -171,11 +171,11 @@ function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null,
'#type' => 'hidden',
'#value' => $venue
);
-
+
$form['prefs']['separator_top'] = array(
'#value' => '
'
);
-
+
// Simplified selectors
$form['prefs']['preset'] = array(
'#title' => bts('Presets', array(), NULL, 'boinc:account-preferences-preset:-1:for a user to choose a computing or project preference preset.'),
@@ -204,7 +204,7 @@ function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null,
// The 'no-js' class only displays this button if javascript is disabled
'#attributes' => array('class' => 'no-js'),
);
-
+
// Advanced preferences
$form['prefs']['advanced'] = array(
'#title' => bts('Advanced settings', array(), NULL, 'boinc:account-preferences-option'),
@@ -214,17 +214,17 @@ function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null,
'#collapsed' => !$advanced,
'#attributes' => array('class' => 'advanced-settings'),
);
-
+
// Processing preferences
-
+
$form['prefs']['advanced']['anchor'] = array(
'#value' => ' '
);
-
+
$form['prefs']['advanced']['separator_top'] = array(
'#value' => '
'
);
-
+
$form['prefs']['advanced']['processor'] = array(
'#title' => bts('Processor usage', array(), NULL, 'boinc:account-preferences-computing'),
'#type' => 'fieldset',
@@ -331,7 +331,7 @@ function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null,
'#size' => 1,
'#description' => bts('Suspend/resume computing every few seconds to reduce CPU temperature and energy usage. Example: 75% means compute for 3 seconds, wait for 1 second, and repeat.', array(), NULL, 'boinc:account-preferences-computing')
);
-
+
// Disk and memory preferences
$form['prefs']['advanced']['storage'] = array(
'#title' => bts('Disk and memory usage', array(), NULL, 'boinc:account-preferences-computing'),
@@ -347,7 +347,7 @@ function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null,
'#default_value' => $default['disk_max_used_gb'],
'#size' => 1,
'#description' => bts('Limit the total amount of disk space used by BOINC.', array(), NULL, 'boinc:account-preferences-computing'),
- );
+ );
$form['prefs']['advanced']['storage']['disk_min_free_gb'] = array(
'#title' => bts('Disk: leave at least', array(), NULL, 'boinc:account-preferences-computing'),
'#type' => 'textfield',
@@ -363,7 +363,7 @@ function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null,
'#default_value' => $default['disk_max_used_pct'],
'#size' => 1,
'#description' => bts('Limit the percentage of disk space used by BOINC on the volume where it stores data.', array(), NULL, 'boinc:account-preferences-computing')
- );
+ );
$form['prefs']['advanced']['storage']['disk_interval'] = array(
'#title' => bts('Request tasks to checkpoint at most every', array(), NULL, 'boinc:account-preferences-computing'),
'#type' => 'textfield',
@@ -396,7 +396,7 @@ function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null,
'#size' => 1,
'#description' => bts("Limit the memory used by BOINC when you're not using the computer.", array(), NULL, 'boinc:account-preferences-computing')
);
-
+
// Network preferences
$form['prefs']['advanced']['network'] = array(
'#title' => bts('Network usage', array(), NULL, 'boinc:account-preferences-computing'),
@@ -412,7 +412,7 @@ function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null,
'#default_value' => $default['work_buf_min_days'],
'#size' => 1,
'#description' => bts('Store at least enough tasks to keep the computer busy for this long.', array(), NULL, 'boinc:account-preferences-computing')
- );
+ );
$form['prefs']['advanced']['network']['work_buf_additional_days'] = array(
'#title' => bts('Store up to an additional', array(), NULL, 'boinc:account-preferences-computing'),
'#type' => 'textfield',
@@ -420,7 +420,7 @@ function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null,
'#default_value' => $default['work_buf_additional_days'],
'#size' => 1,
'#description' => bts('Store additional tasks above the minimum level. Determines how much work is requested when contacting a project.', array(), NULL, 'boinc:account-preferences-computing')
- );
+ );
$form['prefs']['advanced']['network']['confirm_before_connecting'] = array(
'#title' => bts('Confirm before connecting to Internet?', array(), NULL, 'boinc:account-preferences-computing'),
'#type' => 'radios',
@@ -428,7 +428,7 @@ function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null,
'#attributes' => array('class' => 'fancy'),
'#default_value' => $default['confirm_before_connecting'],
'#description' => bts('Useful only if you have a modem, ISDN or VPN connection.', array(), NULL, 'boinc:account-preferences-computing')
- );
+ );
$form['prefs']['advanced']['network']['hangup_if_dialed'] = array(
'#title' => bts('Disconnect when done?', array(), NULL, 'boinc:account-preferences-computing'),
'#type' => 'radios',
@@ -444,7 +444,7 @@ function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null,
'#default_value' => $default['max_bytes_sec_down']/1000,
'#size' => 1,
'#description' => bts('Limit the download rate of file transfers.', array(), NULL, 'boinc:account-preferences-computing')
- );
+ );
$form['prefs']['advanced']['network']['max_bytes_sec_up'] = array(
'#title' => bts('Limit upload rate to', array(), NULL, 'boinc:account-preferences-computing'),
'#type' => 'textfield',
@@ -471,14 +471,14 @@ function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null,
);
$form['prefs']['advanced']['network']['hour_description'] = array(
'#value' => ''
- );
+ );
$form['prefs']['advanced']['network']['daily_xfer_limit_mb'] = array(
'#title' => bts('Limit usage to', array(), NULL, 'boinc:account-preferences-computing'),
'#type' => 'textfield',
'#field_suffix' => 'Mbytes',
'#default_value' => $default['daily_xfer_limit_mb'],
'#size' => 1
- );
+ );
$form['prefs']['advanced']['network']['daily_xfer_period_days'] = array(
'#field_prefix' => 'every',
'#type' => 'textfield',
@@ -486,7 +486,7 @@ function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null,
'#default_value' => $default['daily_xfer_period_days'],
'#size' => 1,
'#description' => bts('Example: BOINC should transfer at most 2000 MB of data every 30 days.', array(), NULL, 'boinc:account-preferences-computing'),
- );
+ );
$form['prefs']['advanced']['network']['dont_verify_images'] = array(
'#title' => bts('Skip data verification for image files?', array(), NULL, 'boinc:account-preferences-computing'),
'#type' => 'radios',
@@ -495,7 +495,7 @@ function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null,
'#default_value' => $default['dont_verify_images'],
'#description' => bts('Only select "Yes" if your Internet provider modifies image files. Skipping verification reduces the security of BOINC.', array(), NULL, 'boinc:account-preferences-computing')
);
-
+
// The "fancy radios" are made via javascript on document load. In order for
// these to work with AHAH, we need this crazy setTimeout() call.
$form['prefs']['fancy-radios'] = array(
@@ -514,11 +514,11 @@ function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null,
'#type' => 'hidden',
'#value' => 1
);
-
+
$form['prefs']['separator_bottom'] = array(
'#value' => '
'
);
-
+
// Form control
$form['prefs']['form control tabs prefix'] = array(
'#value' => ''
);
$form['#submit'][] = 'boincwork_generalprefs_form_submit';
-
+
return $form;
}
@@ -562,10 +562,10 @@ function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null,
function boincwork_generalprefs_form_validate($form, &$form_state) {
require_boinc('util');
$values = $form_state['values']['prefs']['advanced'];
-
+
//drupal_set_message('' . print_r($form_state['values'], true) . ' ');
// Verify all non-boolean user input values and notify form API of failures
-
+
// Processing preferences
if (!verify_numeric($values['processor']['idle_time_to_run'], 1, 9999)) form_set_error('idle_time_to_run', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['idle_time_to_run']['#title']} [x] {$form['prefs']['advanced']['processor']['idle_time_to_run']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
if (!verify_numeric($values['processor']['suspend_if_no_recent_input'], 0, 9999)) form_set_error('suspend_if_no_recent_input', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['suspend_if_no_recent_input']['#title']} [x] {$form['prefs']['advanced']['processor']['suspend_if_no_recent_input']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
@@ -602,14 +602,14 @@ function boincwork_generalprefs_form_validate($form, &$form_state) {
function boincwork_generalprefs_form_submit($form, &$form_state) {
global $user;
$account = user_load($user->uid);
-
+
$values = $form_state['values']['prefs']['advanced'];
$venue = $form_state['values']['prefs']['venue'];
$preset = $form_state['values']['prefs']['preset'];
-
+
// Load preferences from BOINC account
$prefs = boincwork_load_prefs('general', $venue);
-
+
// Processing preferences
$prefs['run_on_batteries'] = ($values['processor']['run_on_batteries']) ? 0 : 1;
$prefs['run_if_user_active'] = ($values['processor']['run_if_user_active']) ? 0 : 1;
@@ -623,7 +623,7 @@ function boincwork_generalprefs_form_submit($form, &$form_state) {
$prefs['cpu_scheduling_period_minutes'] = $values['processor']['cpu_scheduling_period_minutes'];
$prefs['max_ncpus_pct'] = $values['processor']['max_ncpus_pct'];
$prefs['cpu_usage_limit'] = $values['processor']['cpu_usage_limit'];
-
+
// Storage preferences
$prefs['disk_max_used_gb'] = $values['storage']['disk_max_used_gb'];
$prefs['disk_min_free_gb'] = $values['storage']['disk_min_free_gb'];
@@ -632,7 +632,7 @@ function boincwork_generalprefs_form_submit($form, &$form_state) {
$prefs['vm_max_used_pct'] = $values['storage']['vm_max_used_pct'];
$prefs['ram_max_used_busy_pct'] = $values['storage']['ram_max_used_busy_pct'];
$prefs['ram_max_used_idle_pct'] = $values['storage']['ram_max_used_idle_pct'];
-
+
// Network preferences
$prefs['work_buf_min_days'] = $values['network']['work_buf_min_days'];
$prefs['work_buf_additional_days'] = $values['network']['work_buf_additional_days'];
@@ -659,15 +659,15 @@ function boincwork_generalprefs_form_submit($form, &$form_state) {
else {
$prefs['preset'] = $preset;
}
-
+
// If this is a new preference set, be sure to unset the "cleared" attribute
if (isset($prefs['@attributes']['cleared'])) {
unset($prefs['@attributes']['cleared']);
}
-
+
// Update database
$result = boincwork_save_prefs($prefs, 'general', $venue);
-
+
if (!$result) {
watchdog('boincwork', 'Error updating global prefs for user @id: @message', array('@id' => $account->id, '@message' => mysqli_error()), WATCHDOG_ERROR);
drupal_set_message(t('Your changes could not be saved. Please contact support!'), 'error');
@@ -676,7 +676,7 @@ function boincwork_generalprefs_form_submit($form, &$form_state) {
// Show this message if the set wasn't created automatically (in which case
// there is a message tailored to that) {
drupal_set_message(t('Your preferences have been updated.
- Client-related preferences will take effect when your computer
+ Client-related preferences will take effect when your computer
communicates with @project or you issue the "Update"
command from the BOINC client.', array('@project' => PROJECT)));
}
@@ -685,7 +685,7 @@ function boincwork_generalprefs_form_submit($form, &$form_state) {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Merge host form handlers and functions
- * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* Find compatible hosts for merging
@@ -761,12 +761,12 @@ function boincwork_host_merge($old_host, $new_host, &$message = NULL) {
$now = time();
update_average($now, 0, 0, $old_host->expavg_credit, $old_host->expavg_time);
update_average($now, 0, 0, $new_host->expavg_credit, $new_host->expavg_time);
-
+
// Update the database:
// - add credit from old host to new host
// - change results to refer to the new host
// - put old host in "zombie" state (userid=0, rpc_seqno=[new_host_id])
-
+
$total_credit = $old_host->total_credit + $new_host->total_credit;
$recent_credit = $old_host->expavg_credit + $new_host->expavg_credit;
@@ -797,7 +797,7 @@ function boincwork_host_merge($old_host, $new_host, &$message = NULL) {
$message = 'Could not merge because the target host has userid=0. The site administrators have been contacted about this issue, and will investigate further.';
return FALSE;
}
-
+
// Move credit from the old host to the new host
db_set_active('boinc_rw');
$credit_updated = db_query("
@@ -816,7 +816,7 @@ function boincwork_host_merge($old_host, $new_host, &$message = NULL) {
}
return FALSE;
}
-
+
// Move results from the old host to the new host
db_set_active('boinc_rw');
$results_updated = db_query("
@@ -832,7 +832,7 @@ function boincwork_host_merge($old_host, $new_host, &$message = NULL) {
}
return FALSE;
}
-
+
// Retire the old host
db_set_active('boinc_rw');
$old_host_retired = db_query("
@@ -852,7 +852,7 @@ function boincwork_host_merge($old_host, $new_host, &$message = NULL) {
}
return FALSE;
}
-
+
return TRUE;
}
@@ -864,21 +864,21 @@ function boincwork_host_merge_form(&$form_state, $host_id) {
if (!boincwork_host_user_is_owner($host_id)) {
drupal_goto("host/{$host_id}");
}
-
+
$form = array();
$form_state['storage']['current_host_id'] = $host_id;
$current_host = boincwork_host_get_info($host_id);
-
+
// Get hosts that could be merged with this one
$hosts = boincwork_host_get_compatible_hosts($host_id);
-
+
if (!$hosts) {
drupal_set_message(t('There are no computers eligible for merging with this
one'), 'warning'
);
drupal_goto("host/{$host_id}");
}
-
+
$form['overview'] = array(
'#value' => '' . bts('Sometimes BOINC assigns separate identities to'
. ' the same computer by mistake. You can correct this by merging old'
@@ -894,7 +894,7 @@ function boincwork_host_merge_form(&$form_state, $host_id) {
),
NULL, 'boinc:account-host-merge') . '
',
);
-
+
$options = array();
foreach ($hosts as $host) {
$options[$host->id] = array(
@@ -903,18 +903,18 @@ function boincwork_host_merge_form(&$form_state, $host_id) {
$host->id,
);
}
-
+
$form['merge'] = array(
'#title' => '',
'#type' => 'tableselect',
'#header' => array(bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'), bts('Created', array(), NULL, 'boinc:host-details'), bts('Computer ID', array(), NULL, 'boinc:host-list')),
'#options' => $options,
);
-
+
$form['prefs']['separator_bottom'] = array(
// '#value' => '
'
);
-
+
// Form control
$form['prefs']['form control tabs prefix'] = array(
'#value' => '' . print_r($main_prefs, true) . ' ');
$new_venue = true;
@@ -1022,16 +1022,16 @@ function boincwork_load_privacyconsenttypes() {
/**
* Set the default preference set for the user
- */
+ */
function boincwork_set_default_venue($venue = '') {
-
+
global $user;
$account = user_load($user->uid);
-
+
if ($venue == 'generic') {
$venue = '';
}
-
+
db_set_active('boinc_rw');
db_query("
UPDATE user
@@ -1044,7 +1044,7 @@ function boincwork_set_default_venue($venue = '') {
/**
* Recursively validate submitted form values against a set of rules
- */
+ */
function boincwork_validate_form($validation_rules, $values, $path = array()) {
foreach ($validation_rules as $field => $rules) {
$parents = $path;
@@ -1090,7 +1090,7 @@ function boincwork_validate_datatype($data, $datatype = NULL) {
return FALSE;
}
break;
-
+
case 'integer':
if (!is_numeric($data)) {
return FALSE;
@@ -1100,17 +1100,17 @@ function boincwork_validate_datatype($data, $datatype = NULL) {
return FALSE;
}
break;
-
+
case 'text':
default:
-
+
}
return TRUE;
}
/**
* Format a number to be displayed using a maximum number of digits
- */
+ */
function boincwork_format_stats($number, $max_digits = 4) {
$suffix = array(
0 => '',
@@ -1124,7 +1124,7 @@ function boincwork_format_stats($number, $max_digits = 4) {
8 => 'Y'
);
if (!is_numeric($number)) $number = 0;
-
+
$digits = floor(log($number, 10)) + 1;
$magnitude = 0;
$precision = 0;
@@ -1134,36 +1134,36 @@ function boincwork_format_stats($number, $max_digits = 4) {
$number = round($number / pow(1000, $magnitude), $precision);
}
$number = number_format($number, $precision) . (($magnitude) ? "{$suffix[$magnitude]}" : '');
-
+
return $number;
}
//------------------------------------------------------------------------------------------------
// load_configuration(): Convert structured text/xml to array
//------------------------------------------------------------------------------------------------
-
+
function load_configuration($text)
{
if (preg_match('/^\<\?xml .*\?\>$/i', $text)) return null;
if ($xml = text_to_xml($text)) return xml_to_array($xml);
return false;
}
-
+
//------------------------------------------------------------------------------------------------
// save_configuration(): Convert array to structured text/xml
//------------------------------------------------------------------------------------------------
-
+
function save_configuration($array)
{
if ($xml = array_to_xml($array)) return xml_to_text($xml, false, true);
return false;
}
-
+
//------------------------------------------------------------------------------------------------
// array_to_xml(): Take a multidimensional array and convert it to a structured
// DOM XML object
//------------------------------------------------------------------------------------------------
-
+
function array_to_xml($array, $dom = false, $parent_node = false) {
$is_root = false;
if (!$dom) $dom = new DomDocument('1.0');
@@ -1211,10 +1211,10 @@ function boincwork_format_stats($number, $max_digits = 4) {
);
}
}
-
+
// Now append items without explicit positions at the end
$primed_array = array_merge($ordered_array, $unordered_array);
-
+
// Convert to XML...
foreach ($primed_array as $item) {
list($name, $value) = each($item);
@@ -1286,11 +1286,11 @@ function boincwork_format_stats($number, $max_digits = 4) {
}*/
return $parent_node;
}
-
+
//------------------------------------------------------------------------------------------------
// xml_to_text(): Convert an XML DOM object to string format
//------------------------------------------------------------------------------------------------
-
+
function xml_to_text($xml, $include_xml_declaration = true, $add_carriage_returns = false)
{
$xml->formatOutput = true;
@@ -1303,22 +1303,22 @@ function boincwork_format_stats($number, $max_digits = 4) {
}
return trim($text);
}
-
+
//------------------------------------------------------------------------------------------------
// text_to_xml(): Convert an XML DOM object to string format
//------------------------------------------------------------------------------------------------
-
+
function text_to_xml($text) {
$xml = new DomDocument();
if ( !($xml->loadXML($text)) ) return false;
return $xml;
}
-
-
+
+
//------------------------------------------------------------------------------------------------
// xml_to_array(): Convert an XML DOM object to array format
//------------------------------------------------------------------------------------------------
-
+
function xml_to_array($xml) {
$node = $xml->firstChild; //$xml->first_child();
$result = '';
@@ -1333,14 +1333,14 @@ function boincwork_format_stats($number, $max_digits = 4) {
$node_name = $node->nodeName;
$parent = $node->parentNode;
$sibling = $node->nextSibling;
-
+
// Determine if this node forms a set with siblings (share a node name)
while (($sibling) AND (($sibling->nodeType != XML_ELEMENT_NODE) OR ($sibling->nodeName != $node->nodeName))) $sibling = $sibling->nextSibling;
if (!$sibling) {
$sibling = $node->previousSibling;
while (($sibling) AND (($sibling->nodeType != XML_ELEMENT_NODE) OR ($sibling->nodeName != $node->nodeName))) $sibling = $sibling->previousSibling;
}
-
+
if ($sibling) {
$result[$node_name][$index] = '';
if ($node->childNodes) {
@@ -1393,7 +1393,7 @@ function boincwork_format_stats($number, $max_digits = 4) {
}
return $result;
}
-
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Functions for use in displaying special case text in views
@@ -1403,14 +1403,14 @@ function boincwork_format_stats($number, $max_digits = 4) {
* Determine output for host list views when no hosts are found.
*/
function boincwork_views_host_list_empty_text($context = NULL) {
-
- // Pull the BOINC user ID from the view arguments to get show_hosts
+
+ // Pull the BOINC user ID from the view arguments to get show_hosts
// preference for that user
require_boinc('boinc_db');
$view = views_get_current_view();
$account = user_load($view->args[0]);
$boincuser = BoincUser::lookup_id($account->boincuser_id);
-
+
// Determine if hosts are associated at all or just hidden
$output = '';
if ($boincuser->show_hosts) {
@@ -1420,13 +1420,13 @@ function boincwork_views_host_list_empty_text($context = NULL) {
$output .= '' . bts('This user has no computers that have been'
. ' active in the last 30 days.', array(), NULL, 'boinc:host-list') . '
';
break;
-
+
case 'preferences':
$output .= '' . bts('No computers', array(), NULL, 'boinc:host-list') . ' ';
$output .= '' . bts('There are no computers assigned to this'
. ' preference set.', array(), NULL, 'boinc:host-list') . '
';
break;
-
+
default:
$output .= '' . bts('Computers pending', array(), NULL, 'boinc:host-list') . ' ';
$output .= '' . bts('This user does not yet have any associated'
@@ -1446,8 +1446,8 @@ function boincwork_views_host_list_empty_text($context = NULL) {
* Determine output for task list views when no tasks are found.
*/
function boincwork_views_task_list_empty_text($context = NULL) {
-
- //
+
+ //
$output = '';
switch($context) {
default:
@@ -1555,7 +1555,7 @@ function boincwork_host_last_contact($timestamp, $host_id = NULL, $context = NUL
}
/**
- *
+ *
*/
function boincwork_host_venue_selector($host_id) {
$output = '';
@@ -1737,7 +1737,7 @@ function boincwork_tasktable($category = 0, $queryid = 1, $tselect = NULL, $app_
}
else {
}
-
+
// Entry for all applications.
$allcount = $application_select_count ? array_sum($application_select_count) : 0;
$applications[-1] = bts('Application', array(), NULL, 'boinc:task-table');
diff --git a/drupal/sites/default/boinc/modules/comment_form_block/comment_form_block.module b/drupal/sites/default/boinc/modules/comment_form_block/comment_form_block.module
index 8325ed3d076..d5f18ebf391 100644
--- a/drupal/sites/default/boinc/modules/comment_form_block/comment_form_block.module
+++ b/drupal/sites/default/boinc/modules/comment_form_block/comment_form_block.module
@@ -20,7 +20,7 @@ function comment_form_block_block($op = 'list', $delta = 0, $edit = array()) {
if ($node->comment !== 0 AND user_access('post comments', $user)) {
$block['subject'] = NULL; // This should be NULL otherwise there will be duplicate h2 elements.
$block['content'] = '
' . bts('Post new comment', array(), NULL, 'boinc:forum-post-new-comment') . ' ';
- $block['content'] .= drupal_get_form('comment_form', array('nid' => $nid));
+ $block['content'] .= drupal_get_form('comment_form', array('nid' => $nid));
}
}
}
diff --git a/drupal/sites/default/boinc/modules/flag_abuse_reason/includes/flag_abuse_reason.js b/drupal/sites/default/boinc/modules/flag_abuse_reason/includes/flag_abuse_reason.js
index b8c9611ebb4..efb98828366 100644
--- a/drupal/sites/default/boinc/modules/flag_abuse_reason/includes/flag_abuse_reason.js
+++ b/drupal/sites/default/boinc/modules/flag_abuse_reason/includes/flag_abuse_reason.js
@@ -1,4 +1,4 @@
-/**
+/**
* @file
*
* Javascript for flag_abuse_reason. Shows the dropdown box defined in
@@ -28,19 +28,19 @@ $(document).bind('flagGlobalBeforeLinkUpdate', function(event, data) {
*/
// User clicks on the Report link
if ( window.getComputedStyle(ddelement).display === "none" &&
- data.flagName == "abuse_node_meta" &&
+ data.flagName == "abuse_node_meta" &&
data.flagStatus == "flagged" ) {
ddelement.style.display = "block";
}
-
+
if ( window.getComputedStyle(ddelement).display === "block" ) {
// User clicks on any of the flags in the drop down
- if ( data.flagName != "abuse_node_meta" &&
+ if ( data.flagName != "abuse_node_meta" &&
data.flagStatus == "flagged" ) {
ddelement.style.display = "none";
}
// User clicks on Cancel Report
- else if ( data.flagName == "abuse_node_meta" &&
+ else if ( data.flagName == "abuse_node_meta" &&
data.flagStatus == "unflagged" ) {
ddelement.style.display = "none";
}
@@ -61,19 +61,19 @@ $(document).bind('flagGlobalBeforeLinkUpdate', function(event, data) {
*/
// User clicks on the Report link
if ( window.getComputedStyle(ddelement).display === "none" &&
- data.flagName == "abuse_comment_meta" &&
+ data.flagName == "abuse_comment_meta" &&
data.flagStatus == "flagged" ) {
ddelement.style.display = "block";
}
-
+
if ( window.getComputedStyle(ddelement).display === "block" ) {
// User clicks on any of the flags in the drop down
- if ( data.flagName != "abuse_comment_meta" &&
+ if ( data.flagName != "abuse_comment_meta" &&
data.flagStatus == "flagged" ) {
ddelement.style.display = "none";
}
// User clicks on Cancel Report
- else if ( data.flagName == "abuse_comment_meta" &&
+ else if ( data.flagName == "abuse_comment_meta" &&
data.flagStatus == "unflagged" ) {
ddelement.style.display = "none";
}
@@ -94,19 +94,19 @@ $(document).bind('flagGlobalBeforeLinkUpdate', function(event, data) {
*/
// User clicks on the Report link
if ( window.getComputedStyle(ddelement).display === "none" &&
- data.flagName == "abuse_user_meta" &&
+ data.flagName == "abuse_user_meta" &&
data.flagStatus == "flagged" ) {
ddelement.style.display = "block";
}
-
+
if ( window.getComputedStyle(ddelement).display === "block" ) {
// User clicks on any of the flags in the drop down
- if ( data.flagName != "abuse_user_meta" &&
+ if ( data.flagName != "abuse_user_meta" &&
data.flagStatus == "flagged" ) {
ddelement.style.display = "none";
}
// User clicks on Cancel Report
- else if ( data.flagName == "abuse_user_meta" &&
+ else if ( data.flagName == "abuse_user_meta" &&
data.flagStatus == "unflagged" ) {
ddelement.style.display = "none";
}
diff --git a/drupal/sites/default/boinc/modules/flag_comment_notify/flag_comment_notify.module b/drupal/sites/default/boinc/modules/flag_comment_notify/flag_comment_notify.module
index 8fb2f88cf46..a1249466421 100644
--- a/drupal/sites/default/boinc/modules/flag_comment_notify/flag_comment_notify.module
+++ b/drupal/sites/default/boinc/modules/flag_comment_notify/flag_comment_notify.module
@@ -21,9 +21,9 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Hooks into core modules
* * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
+
/**
- * Implementation of hook_comment();
+ * Implementation of hook_comment();
*/
function flag_comment_notify_comment(&$a1, $op) {
switch ($op) {
diff --git a/drupal/sites/default/boinc/modules/node_comment_block/node_comment_block.module b/drupal/sites/default/boinc/modules/node_comment_block/node_comment_block.module
index 36921c904b9..cbffdcdf221 100644
--- a/drupal/sites/default/boinc/modules/node_comment_block/node_comment_block.module
+++ b/drupal/sites/default/boinc/modules/node_comment_block/node_comment_block.module
@@ -98,7 +98,7 @@ function node_comment_block_preprocess_node(&$variables) {
if ($variables['type'] == 'news') {
$variables['node']->comment = 0;
}
-
+
/* Drupal 7...
if ($node->comment !== 0 && $variables['view_mode'] == 'full') {
if (isset($variables['content']['comments'])) {
diff --git a/drupal/sites/default/boinc/themes/boinc/css/comments.css b/drupal/sites/default/boinc/themes/boinc/css/comments.css
index 78bac8fb13e..f0250235cf8 100644
--- a/drupal/sites/default/boinc/themes/boinc/css/comments.css
+++ b/drupal/sites/default/boinc/themes/boinc/css/comments.css
@@ -396,7 +396,7 @@ div.preview + .comment {
.comment .vud-widget-updown .updown-score {
border: none;
float: none;
-}
+}
.comment .vud-widget-updown .updown-score .updown-current-score {
display: inline;
font-size: 10px;
diff --git a/drupal/sites/default/boinc/themes/boinc/css/forms.css b/drupal/sites/default/boinc/themes/boinc/css/forms.css
index e426059df98..fc2de1e8139 100644
--- a/drupal/sites/default/boinc/themes/boinc/css/forms.css
+++ b/drupal/sites/default/boinc/themes/boinc/css/forms.css
@@ -129,7 +129,7 @@ table.ignore_user {
}
.form-radios .form-item {
float: left;
-}
+}
.simple-form-controls .form-item .description,
.simple-form-controls .form-item label {
width: auto;
@@ -280,7 +280,7 @@ span.password-confirm {
* Search form and results
*/
.section-find .box{
-
+
margin-top: 2.0em;
padding-top: 1.0em;
border-top: 2px dotted #aaa;
@@ -328,7 +328,7 @@ span.password-confirm {
}
.section-find .result.user .user-stats {
font-size: 0.85em;
-
+
}
@@ -533,7 +533,7 @@ html.js fieldset.collapsible legend a,
}
#edit-prefs-advanced-processor-start-hour-wrapper,
-#edit-prefs-advanced-processor-end-hour-wrapper,
+#edit-prefs-advanced-processor-end-hour-wrapper,
#edit-prefs-advanced-network-net-start-hour-wrapper,
#edit-prefs-advanced-network-net-end-hour-wrapper,
#edit-prefs-advanced-network-daily-xfer-limit-mb-wrapper,
diff --git a/drupal/sites/default/boinc/themes/boinc/css/html-reset.css b/drupal/sites/default/boinc/themes/boinc/css/html-reset.css
index 9acc8cb65b6..fc4dbce8b24 100644
--- a/drupal/sites/default/boinc/themes/boinc/css/html-reset.css
+++ b/drupal/sites/default/boinc/themes/boinc/css/html-reset.css
@@ -40,7 +40,7 @@ body {
font-size: 0.75em; /* 16px x .75 = 12px */
/*line-height: 1.333em; /* 12px x 1.333 = 16px */
line-height: 16px;
-
+
/* Use a 14px base font size with a 18px line height */
/*font-size: 0.875em; /* 16px x .875 = 14px */
/*line-height: 1.286em; /* 14px x 1.286 = 18px */
diff --git a/drupal/sites/default/boinc/themes/boinc/css/layout-fixed.css b/drupal/sites/default/boinc/themes/boinc/css/layout-fixed.css
index cefe3bba21c..dbd02fddfcc 100644
--- a/drupal/sites/default/boinc/themes/boinc/css/layout-fixed.css
+++ b/drupal/sites/default/boinc/themes/boinc/css/layout-fixed.css
@@ -174,7 +174,7 @@ body {
#navigation li.active-trail a {
color: #000;
}
-#navigation li a,
+#navigation li a,
#navigation li a.visited,
#action-links a {
color: #222;
diff --git a/drupal/sites/default/boinc/themes/boinc/css/pages.css b/drupal/sites/default/boinc/themes/boinc/css/pages.css
index a6edeee041e..f2f914c67cd 100644
--- a/drupal/sites/default/boinc/themes/boinc/css/pages.css
+++ b/drupal/sites/default/boinc/themes/boinc/css/pages.css
@@ -716,7 +716,7 @@ table.user-projects {
font-size: 10px;
font-weight: bold;
text-transform: uppercase;
- letter-spacing: 1px;
+ letter-spacing: 1px;
}
.node-type-forum .item-list .pager {
border-top: 1px dotted #aaa;
@@ -900,7 +900,7 @@ table.user-projects {
font-weight: bold;
text-transform: uppercase;
color: #808080;
- letter-spacing: 1px;
+ letter-spacing: 1px;
}
.forum-links {
diff --git a/drupal/sites/default/boinc/themes/boinc/css/responsive-jswidth.css b/drupal/sites/default/boinc/themes/boinc/css/responsive-jswidth.css
index fa173645268..c0a67e8b693 100644
--- a/drupal/sites/default/boinc/themes/boinc/css/responsive-jswidth.css
+++ b/drupal/sites/default/boinc/themes/boinc/css/responsive-jswidth.css
@@ -5,7 +5,7 @@
* Responsive Javascript Styling
*
* Contains CSS styles to handle different screen sizes. This CSS file is used
- * for the responsive Javascript width theme.
+ * for the responsive Javascript width theme.
*/
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -85,7 +85,7 @@
.has-js #navigation.usehamburger li.expanded ul.menu {
padding: 0 20px;
}
-
+
/* Set base mobile menu font color and size. */
.has-js #navigation.usehamburger .block .menu li a {
color: #faa341;
diff --git a/drupal/sites/default/boinc/themes/boinc/css/responsive-media.css b/drupal/sites/default/boinc/themes/boinc/css/responsive-media.css
index 4e077dec2ce..58cf42c4467 100644
--- a/drupal/sites/default/boinc/themes/boinc/css/responsive-media.css
+++ b/drupal/sites/default/boinc/themes/boinc/css/responsive-media.css
@@ -4,8 +4,8 @@
* @file
* Responsive Media Styling
*
- * Contains CSS styles to handle different screen sizes. This CSS file is
- * used mainly for browsers with Javascript DISABLED.
+ * Contains CSS styles to handle different screen sizes. This CSS file is
+ * used mainly for browsers with Javascript DISABLED.
*/
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -67,7 +67,7 @@
}
}
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* CSS Style designed for mobile screens
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@media only screen and (max-width: 750px) {
@@ -118,7 +118,7 @@
#navigation li.expanded ul.menu {
padding: 0 20px;
}
-
+
/* Set base mobile menu font color and size. */
#navigation .block .menu li a {
color: #faa341;
@@ -131,7 +131,7 @@
#navigation .block .menu li a:hover {
color: black;
}
-
+
/* Add caret left/down icons to the mobile menu for items that
expand. */
#navigation li.expanded.dhtml-menu.collapsed>a:after {
diff --git a/drupal/sites/default/boinc/themes/boinc/css/tabs.css b/drupal/sites/default/boinc/themes/boinc/css/tabs.css
index 67cdafa2e40..6f282cabf63 100644
--- a/drupal/sites/default/boinc/themes/boinc/css/tabs.css
+++ b/drupal/sites/default/boinc/themes/boinc/css/tabs.css
@@ -170,7 +170,7 @@ ul.content-footer-menu {
position: absolute;
bottom: -40px;
right: 0;
-
+
}
ul.content-footer-menu li {
font-size: 9px;
@@ -181,4 +181,4 @@ span.task-app-name {
max-width: 160px;
word-wrap: break-word;
white-space: normal;
-}
\ No newline at end of file
+}
diff --git a/drupal/sites/default/boinc/themes/boinc/css/views-styles.css b/drupal/sites/default/boinc/themes/boinc/css/views-styles.css
index d5f9f456a02..43512cc947e 100644
--- a/drupal/sites/default/boinc/themes/boinc/css/views-styles.css
+++ b/drupal/sites/default/boinc/themes/boinc/css/views-styles.css
@@ -32,7 +32,7 @@
background: url(../images/arrow-desc.png) no-repeat right -3px;
}
.view-content span.field-content {
-
+
}
/**
@@ -236,4 +236,4 @@
.view-boinc-host .jump-quickly #edit-jump-goto-wrapper {
margin: 0;
padding: 0;
-}
\ No newline at end of file
+}
diff --git a/drupal/sites/default/boinc/themes/boinc/js/fancy-radios.js b/drupal/sites/default/boinc/themes/boinc/js/fancy-radios.js
index edf9373e692..9678233845f 100644
--- a/drupal/sites/default/boinc/themes/boinc/js/fancy-radios.js
+++ b/drupal/sites/default/boinc/themes/boinc/js/fancy-radios.js
@@ -1,19 +1,19 @@
function setupLabel() {
if ($('.label_check input').length) {
- $('.label_check').each(function(){
+ $('.label_check').each(function(){
$(this).removeClass('selected');
});
- $('.label_check input:checked').each(function(){
+ $('.label_check input:checked').each(function(){
$(this).parent('label').addClass('selected');
- });
+ });
};
if ($('.form-radios.fancy .form-item label input').length) {
$('.form-radios.fancy .form-item:first-child label').addClass('first');
$('.form-radios.fancy .form-item label').each(function(){
$(this).removeClass('selected');
});
- $('.form-radios.fancy .form-item label input:checked').each(function(){
+ $('.form-radios.fancy .form-item label input:checked').each(function(){
$(this).parent('.form-radios.fancy .form-item label').addClass('selected');
});
};
@@ -22,7 +22,7 @@
$('.label_check, .form-radios.fancy .form-item label').click(function(){
setupLabel();
});
- setupLabel();
+ setupLabel();
};
$(document).ready(function(){
$('body').addClass('has-js');
diff --git a/drupal/sites/default/boinc/themes/boinc/js/jquery.detectwidths.js b/drupal/sites/default/boinc/themes/boinc/js/jquery.detectwidths.js
index 55aed2c6aee..98347230b93 100644
--- a/drupal/sites/default/boinc/themes/boinc/js/jquery.detectwidths.js
+++ b/drupal/sites/default/boinc/themes/boinc/js/jquery.detectwidths.js
@@ -1,6 +1,6 @@
/**
* JQuery functions used to determine whether the theme layout should
- * use a fixed-width navigation bar or a mobile hamburger style menu.
+ * use a fixed-width navigation bar or a mobile hamburger style menu.
*
* The functions determine the width of the navigation bar text. This
* text is translated into many languages, and is not static. If the
@@ -16,13 +16,13 @@
* wide for the layout.
*/
-/*
+/*
* The mobile and desktop minimum breakpoints set here must match the
* breakpoints set in the CSS @media query. See file
* css/responsive-media.css.
*
* N.B. These breakpoints may be different if you are using a sub-theme.
- */
+ */
var padding = 30;
var mobile_bp = 750;
var desktop_min = 980;
diff --git a/drupal/sites/default/boinc/themes/boinc/js/jquery.equalheights.js b/drupal/sites/default/boinc/themes/boinc/js/jquery.equalheights.js
index c574a37e9cc..9cc3dfa2703 100644
--- a/drupal/sites/default/boinc/themes/boinc/js/jquery.equalheights.js
+++ b/drupal/sites/default/boinc/themes/boinc/js/jquery.equalheights.js
@@ -2,24 +2,24 @@
* Equal Heights Plugin
* Equalize the heights of elements. Great for columns or any elements
* that need to be the same size (floats, etc).
- *
+ *
* Version 1.0
* Updated 12/10/2008
*
- * Copyright (c) 2008 Rob Glazebrook (cssnewbie.com)
+ * Copyright (c) 2008 Rob Glazebrook (cssnewbie.com)
*
* Usage: $(object).equalHeights([minHeight], [maxHeight]);
- *
+ *
* Example 1: $(".cols").equalHeights(); Sets all columns to the same height.
* Example 2: $(".cols").equalHeights(400); Sets all cols to at least 400px tall.
* Example 3: $(".cols").equalHeights(100,300); Cols are at least 100 but no more
* than 300 pixels tall. Elements with too much content will gain a scrollbar.
- *
+ *
*/
(function($) {
$.fn.equalHeights = function(minHeight, maxHeight) {
-
+
tallest = (minHeight) ? minHeight : 0;
primaryExclude = 0;
primaryPadding = 0;
@@ -27,7 +27,7 @@
secondaryHeight = 0;
secondaryExclude = 0;
secondaryCount = 0;
-
+
// Look at each element to find the tallest of them
this.each(function() {
if ($(this).hasClass('panel-secondary')) {
@@ -95,4 +95,4 @@
}
});
}
-})(jQuery);
\ No newline at end of file
+})(jQuery);
diff --git a/drupal/sites/default/boinc/themes/boinc/js/prefs.js b/drupal/sites/default/boinc/themes/boinc/js/prefs.js
index bef0b57cadc..ab2d762a327 100644
--- a/drupal/sites/default/boinc/themes/boinc/js/prefs.js
+++ b/drupal/sites/default/boinc/themes/boinc/js/prefs.js
@@ -4,7 +4,7 @@
$('#edit-prefs-preset-custom').attr('checked', true);
});
};
-
+
$(document).ready(function(){
customPrefsListener();
});
diff --git a/drupal/sites/default/boinc/themes/boinc/template.php b/drupal/sites/default/boinc/themes/boinc/template.php
index 9dfa014e40e..4e58466c13f 100644
--- a/drupal/sites/default/boinc/themes/boinc/template.php
+++ b/drupal/sites/default/boinc/themes/boinc/template.php
@@ -216,7 +216,7 @@ function boinc_preprocess_page(&$vars, $hook) {
// "head_title" which is placed in the HTML section. Most of
// these pages are defined in the Page Manager module.
// See: https://dev.gridrepublic.org/browse/DBOINC-65
- if (arg(0) == 'search') {
+ if (arg(0) == 'search') {
unset($vars['title']);
}
else if ( (arg(0)=='account') AND (is_numeric(arg(1))) AND (empty(arg(2))) ) {
@@ -326,19 +326,19 @@ function boinc_preprocess_node_forum(&$vars, $hook) {
// Get the author of the node
$account = user_load($vars['uid']);
$comments_per_page = ($user->comments_per_page) ? $user->comments_per_page : variable_get("comment_default_per_page_{$vars['node']->type}", 50);
-
+
// Add signature
$vars['signature'] = check_markup($account->signature, $vars['node']->format);
-
+
// Show signatures based on user preference
$vars['show_signatures'] = ($user->hide_signatures) ? FALSE : TRUE;
-
+
// Expose comment sort order so that the template can put the topic node
// content (i.e. initial post) at the very end if "Newest post first" is the
// preference used by this user
$vars['oldest_post_first'] = ($user->sort != 1) ? TRUE : FALSE;
$vars['node']->comment = 0;
-
+
$vars['first_page'] = (!isset($_GET['page']) OR ($_GET['page'] < 1));
$page_count = max(ceil($vars['comment_count'] / $comments_per_page), 1);
$vars['last_page'] = ($page_count == 1 OR ($page_count > 1 AND $_GET['page'] == $page_count - 1));
@@ -361,7 +361,7 @@ function boinc_preprocess_node_team_forum(&$vars, $hook) {
// Process this node in the same way as node_forum
boinc_preprocess_node_forum($vars, $hook);
}
-
+
/**
* Override or insert variables into the comment templates.
*
@@ -426,7 +426,7 @@ function boinc_preprocess_forum_topic_list(&$variables) {
///* -- Delete this line if you want to use this function
function boinc_preprocess_views_view(&$vars, $hook) {
switch ($vars['name']) {
- case 'boinc_account_computers':
+ case 'boinc_account_computers':
switch ($vars['display_id']) {
case 'page_1':
case 'panel_pane_1':
@@ -446,7 +446,7 @@ function boinc_preprocess_views_view(&$vars, $hook) {
break;
case 'boinc_friends':
if ($vars['display_id'] == 'block_1') {
- $vars['header'] = boincuser_views_friends_block_header();
+ $vars['header'] = boincuser_views_friends_block_header();
}
break;
case 'boinc_host':
@@ -538,7 +538,7 @@ function boinc_preprocess_privatemsg_view(&$vars, $hook) {
function boinc_preprocess_block(&$vars, $hook) {
$vars['sample_variable'] = t('Lorem ipsum.');
}
-// */
+// */
function boinc_preprocess_search_result(&$variables) {
global $language;
@@ -607,12 +607,12 @@ function boinc_apachesolr_search_noresults() {
* rather than the unique Drupal auth name
*/
function phptemplate_username($object) {
-
+
if ($object->uid && $object->name) {
-
+
// Show the profile name in general, not the username
$name = user_load($object->uid)->boincuser_name;
-
+
// Shorten the name when it is too long or it will break many tables.
if (drupal_strlen($name) > 20) {
$name = drupal_substr($name, 0, 15) . '...';
@@ -673,7 +673,7 @@ function boinc_flag_friend_message_email($status, $flag, $recipient, $sender) {
$email['type'] = 'flag-friend';
// Reload the sender to get a full user object
$sender = user_load($sender->uid);
-
+
switch ($status) {
case FLAG_FRIEND_FLAGGED:
// Sender accepted recipient's friend request
@@ -768,7 +768,7 @@ function reorder_links($links, $first_keys = array(), $last_keys = array()) {
}
}
$links = array_merge($links, $last_links);
-
+
return $links;
}
@@ -791,8 +791,8 @@ function boinc_tablesort_indicator($style) {
/*
* Private function to process the $links string, separate it into two
* strings for $links and $moderator_links.
- *
- * Parameters:
+ *
+ * Parameters:
* @params $links
* links is a string of links to manipulate. The function will
* return a altered string of links.
@@ -932,4 +932,4 @@ function _boinc_ignore_user_link($type, $object = NULL, $teaser = FALSE) {
}
return $links;
-}
\ No newline at end of file
+}
diff --git a/drupal/sites/default/boinc/themes/boinc/templates/comment.tpl.php b/drupal/sites/default/boinc/themes/boinc/templates/comment.tpl.php
index 8ef08a68adc..c9433a3c22f 100644
--- a/drupal/sites/default/boinc/themes/boinc/templates/comment.tpl.php
+++ b/drupal/sites/default/boinc/themes/boinc/templates/comment.tpl.php
@@ -80,9 +80,9 @@
),
NULL, 'boinc:coment-from-ignored-user');
print '';
- }
+ }
?>
-
+
cid;
?>
@@ -157,7 +157,7 @@
name, 'community/forum') . ' › '; ?> name; ?>
- +- +-
@@ -368,29 +368,29 @@
name; ?>
- +name, 'community/forum') . ' › '; ?> @@ -92,14 +92,14 @@
"; current_tally($voteid); return send_banish_vote_email($user, 86400*14, $reason, $now+21600); -} +} function vote_yes($config,$logged_in_user,$user) { $now=time(); diff --git a/html/inc/forum_email.inc b/html/inc/forum_email.inc index 435c22698ed..67fc7795fe8 100644 --- a/html/inc/forum_email.inc +++ b/html/inc/forum_email.inc @@ -156,7 +156,7 @@ A post in the ".PROJECT." forums was reported as offensive. Post: $post->id by $owner->id ($owner->name) Reporting User: $user->id ($user->name) Link: ".secure_url_base()."forum_thread.php?id=$thread->id#$post->id - + Comments from reporting user: $message diff --git a/html/inc/forum_rss.inc b/html/inc/forum_rss.inc index 2da4f53e8c2..a23c9b800e7 100644 --- a/html/inc/forum_rss.inc +++ b/html/inc/forum_rss.inc @@ -88,10 +88,10 @@ function forum_rss($forumid, $userid, $threads_only, $ndays) { if (sizeof($threads)) { $t = $threads[0]; $last_mod_time = $threads_only?$t->create_time:$t->timestamp; - $create_date = gmdate('D, d M Y H:i:s', $last_mod_time) . ' GMT'; + $create_date = gmdate('D, d M Y H:i:s', $last_mod_time) . ' GMT'; header ("Last-Modified: " . $create_date); } else { - $create_date = gmdate('D, d M Y H:i:s') . ' GMT'; + $create_date = gmdate('D, d M Y H:i:s') . ' GMT'; } header ("Content-Type: application/xml"); diff --git a/html/inc/host.inc b/html/inc/host.inc index 2fa96f74ce0..4914d6466bd 100644 --- a/html/inc/host.inc +++ b/html/inc/host.inc @@ -91,7 +91,7 @@ function show_host($host, $user, $ipprivate) { if ($host->last_ip_addr != $host->external_ip_addr) { row2(tra("External IP address"), $host->external_ip_addr); } - } else { + } else { row2(tra("IP address"), "id&ipprivate=1>".tra("Show IP address").""); } row2(tra("Domain name"), $host->domain_name); @@ -775,7 +775,7 @@ function show_user_hosts($userid, $private, $show_all, $sort, $rev) { default: // default value -- sort by RPC time $sort = "rpc_time"; - $sort_clause = "rpc_time"; + $sort_clause = "rpc_time"; $desc = true; } diff --git a/html/inc/news.inc b/html/inc/news.inc index 336d4262c67..03b79b0cd3d 100644 --- a/html/inc/news.inc +++ b/html/inc/news.inc @@ -73,13 +73,13 @@ function show_news($start, $count) { "; return; } - + if (is_array($start)) { echo "You have not changed show_news() to use 0 instead of deprecated \$project_news as the first param."; return; } - + $lim = ""; if ($start) { if ($count) { diff --git a/html/inc/pm.inc b/html/inc/pm.inc index b01e6324bf7..284b0491717 100644 --- a/html/inc/pm.inc +++ b/html/inc/pm.inc @@ -72,7 +72,7 @@ function pm_team_form($user, $teamid, $error=null) { if ($error) { echo "
".$error."
\n"; } - + echo "1) the sum of the benchmarked FLops/s of all hosts in the database"; echo "
2) the sum of the benchmarked FLops/s of all hosts that have contacted the Einstein@Home scheduler within the past week"; echo "
3) the sum of the FLops of all valid results from last week divided by the number of seconds in a week"; - + page_tail(); diff --git a/html/ops/failure_result_summary_by_host.php b/html/ops/failure_result_summary_by_host.php index 4ca2f8ac3e2..6fa6ad945e7 100644 --- a/html/ops/failure_result_summary_by_host.php +++ b/html/ops/failure_result_summary_by_host.php @@ -39,7 +39,7 @@ else 'Unknown' end AS OS_Name, case - when INSTR(host.os_name, 'Linux') then + when INSTR(host.os_name, 'Linux') then case when RIGHT(host.os_version, 1) = ']' then REVERSE(SUBSTR(REVERSE(host.os_version), 2, INSTR(REVERSE(host.os_version), '[') - 2)) when INSTR(LEFT(host.os_version, 10), '-') then LEFT(host.os_version, (INSTR(LEFT(host.os_version, 10), '-') - 1)) @@ -47,14 +47,14 @@ end else host.os_version end AS OS_Version, - host.nresults_today AS Results_Today, + host.nresults_today AS Results_Today, COUNT(*) AS error_count FROM result - left join host on result.hostid = host.id + left join host on result.hostid = host.id WHERE appid = '$query_appid' and server_state = '5' and - outcome = '3' and + outcome = '3' and received_time > '$query_received_time' GROUP BY app_version_id, diff --git a/html/ops/generate_account_ownership_keys.php b/html/ops/generate_account_ownership_keys.php index 1886c1fe20b..45fc09dbaf9 100755 --- a/html/ops/generate_account_ownership_keys.php +++ b/html/ops/generate_account_ownership_keys.php @@ -20,10 +20,10 @@ // usage: generate_account_ownership_keys.php [overwrite] // -// This script generates the public and private keys for the proof of -// account ownership feature of the website that is described +// This script generates the public and private keys for the proof of +// account ownership feature of the website that is described // here: https://boinc.berkeley.edu/trac/wiki/ProofOfOwnership -// +// // If the overwrite option is set, then the existing keys will be deleted and // new keys generated. This will invalidate all existing account ownership // proofs so use with caution. @@ -53,7 +53,7 @@ } } } - + if ((!file_exists($account_ownership_private_key_file_path)) && (!file_exists($account_ownership_public_key_file_path))) { try { $generated_pkey = openssl_pkey_new(array( @@ -61,12 +61,12 @@ 'private_key_bits' => 4096, 'private_key_type' => OPENSSL_KEYTYPE_RSA )); - + $pubkey = openssl_pkey_get_details($generated_pkey); // Get the public key from the generated pkey pair file_put_contents($account_ownership_public_key, $pubkey['key']); // Save the public key to disk openssl_pkey_export_to_file($generated_pkey, $account_ownership_private_key); // Save the private key to disk openssl_pkey_free($generated_pkey); // Free key data securely from memory - + if ((file_exists($account_ownership_private_key_file_path)) && (file_exists($account_ownership_public_key_file_path))) { echo "Successfully generated a new account ownership keypair. \n"; } else { diff --git a/html/ops/grant_credit.php b/html/ops/grant_credit.php index 79116017cf4..ec21a5d5fc0 100644 --- a/html/ops/grant_credit.php +++ b/html/ops/grant_credit.php @@ -52,7 +52,7 @@ function grant_credits_for_wu($wuid) { $max_credit=300; $ndone = 0; $query_r = _mysql_query("select * from result where granted_credit=0 and claimed_credit>0 and workunitid=$wuid"); - + while ($result = _mysql_fetch_object($query_r)) { echo "STARTING RESULT $result->id [Credit $result->claimed_credit] ..."; $ndone++; diff --git a/html/ops/list_new_users.php b/html/ops/list_new_users.php index 1d70d4b7d92..e29a128695d 100644 --- a/html/ops/list_new_users.php +++ b/html/ops/list_new_users.php @@ -58,20 +58,20 @@ start_table(); table_header("ID", "Name", "Email", "Team", "Country", "Joined"); -while ($row = _mysql_fetch_object($result)) { +while ($row = _mysql_fetch_object($result)) { $id = $row->id; $name = $row->name; $email = $row->email_addr; - $country = $row->country; + $country = $row->country; $joined = time_str($row->create_time); $email_validated = $row->email_validated; - + $team_name=""; if($row->teamid > 0){ $team = BoincTeam::lookup_id($row->teamid); $team_name = $team->name; } - + // Special Users: $roles = ""; $user = $row; @@ -91,7 +91,7 @@ if (!empty($roles)) { $roles = "[$roles]"; } - + // Banished? if (!empty($user->banished_until)) { $dt = $user->banished_until - time(); @@ -103,7 +103,7 @@ } $roles .= $x; } - + if ($email_validated) { $email = "".$email."\n"; } else { diff --git a/html/ops/make_emails_lowercase.php b/html/ops/make_emails_lowercase.php index c901bb27b92..fc7596ad355 100644 --- a/html/ops/make_emails_lowercase.php +++ b/html/ops/make_emails_lowercase.php @@ -68,17 +68,17 @@ $cpid=$user->cross_project_id; $new_email=strtolower(trim($email_addr)); - + if (strcmp($email_addr, $new_email)) echo "Problematic email address [$id] $email_addr becomes $new_email
"; - + if (!(strcmp($cpid,"0"))) { $newcpid=random_string(); echo "Problematic CPID=0 for [$id] $email_addr gets CPID=$newcpid
"; } else $newcpid=$cpid; - + if (strcmp($email_addr, $new_email) || strcmp($newcpid,$cpid)) { $update="update user set email_addr='$new_email', cross_project_id='$newcpid' where id='$id'"; if ($confirm != "yes") { diff --git a/html/ops/manage_app_versions.php b/html/ops/manage_app_versions.php index e4b0240fe62..a8f1bf56294 100644 --- a/html/ops/manage_app_versions.php +++ b/html/ops/manage_app_versions.php @@ -78,7 +78,7 @@ function show_form($all) { ); $i = 0; foreach ($avs as $av) { - // grey out deprecated versions + // grey out deprecated versions // $f1=$f2=''; if ($av->deprecated == 1) { @@ -127,7 +127,7 @@ function show_form($all) { echo "
Unsuccessful users: total_credit = 0, create time > 1 week ago, no jobs in DB +
Unsuccessful users: total_credit = 0, create time > 1 week ago, no jobs in DB
Successful users: total_credit > 0
Currently contributing users: total_credit > 0 and at least one job in DB
Lapsed users: total_credit > 0 but no jobs in DB diff --git a/html/ops/mass_email/sample_current_html b/html/ops/mass_email/sample_current_html index a94bad27684..65b5a9e9253 100644 --- a/html/ops/mass_email/sample_current_html +++ b/html/ops/mass_email/sample_current_html @@ -30,7 +30,7 @@ Thanks again for your ongoing help.
-To not receive future emails from Test Project, +To not receive future emails from Test Project, >click here. diff --git a/html/ops/mass_email/sample_failed_html b/html/ops/mass_email/sample_failed_html index 3c89f52af22..ab8d42488ab 100644 --- a/html/ops/mass_email/sample_failed_html +++ b/html/ops/mass_email/sample_failed_html @@ -37,7 +37,7 @@ The Test Project staff
-To not receive future emails from Test Project, +To not receive future emails from Test Project, >click here. diff --git a/html/ops/mass_email/sample_lapsed_html b/html/ops/mass_email/sample_lapsed_html index e1d0c02638f..babacc165f9 100644 --- a/html/ops/mass_email/sample_lapsed_html +++ b/html/ops/mass_email/sample_lapsed_html @@ -34,7 +34,7 @@ The Test Project staff
-To not receive future emails from Test Project, +To not receive future emails from Test Project, >click here. diff --git a/html/ops/opsw.php b/html/ops/opsw.php index c81254cbe18..815c515e222 100644 --- a/html/ops/opsw.php +++ b/html/ops/opsw.php @@ -31,7 +31,7 @@ function getSingleQuery($query) { require_once("../inc/db.inc"); //require_once("../inc/trickle.inc"); require_once("../inc/wap.inc"); - + // show the home page of app user from envvar $valid = $_GET['id']; diff --git a/html/ops/pass_percentage_by_appversion.php b/html/ops/pass_percentage_by_appversion.php index 748935ea9e9..0f96f0e96a6 100644 --- a/html/ops/pass_percentage_by_appversion.php +++ b/html/ops/pass_percentage_by_appversion.php @@ -88,7 +88,7 @@ FROM app_version INNER JOIN platform ON platform.id = platformid ) as platform_name - ON app_version_id = platform_name.id + ON app_version_id = platform_name.id WHERE appid = '$query_appid' AND server_state = '5' AND outcome NOT IN (4,5) diff --git a/html/ops/pass_percentage_by_platform.php b/html/ops/pass_percentage_by_platform.php index 418b202e4d2..fc229fb9a0d 100644 --- a/html/ops/pass_percentage_by_platform.php +++ b/html/ops/pass_percentage_by_platform.php @@ -64,7 +64,7 @@ $valid_app_versions .= ", $av->id"; } } - $limit_app_versions = "app_version_id IN ( $valid_app_versions ) AND"; + $limit_app_versions = "app_version_id IN ( $valid_app_versions ) AND"; $query_order = "app_version_id DESC"; } else { $limit_app_versions = ""; diff --git a/html/ops/problem_host.php b/html/ops/problem_host.php index 70b812de51c..f9411f5fea1 100644 --- a/html/ops/problem_host.php +++ b/html/ops/problem_host.php @@ -29,7 +29,7 @@ function send_problem_email($user, $host) { global $master_url; $body = ""; - + $host_content = "ID: ".$host->id." Created: ".time_str($host->create_time)." Venue: ".$host->venue." @@ -79,7 +79,7 @@ function send_problem_email($user, $host) { % of time host connected: " . 100*$host->connected_frac." % % of time user active: " . 100*$host->active_frac." % # of results today: " . $host->nresults_today; - + $subject = PROJECT." notice for $user->name"; $body = PROJECT." notification: @@ -96,7 +96,7 @@ function send_problem_email($user, $host) { " . $host_content." For further information and assistance with ".PROJECT." go to $master_url"; - echo nl2br($body) . "
"; + echo nl2br($body) . "
"; return send_email($user, $subject, $body); } @@ -108,7 +108,7 @@ function send_problem_email($user, $host) { admin_page_head("Misconfigured Host"); echo "This script sends an email to the owner of the supplied host which says that something gone wrong with his configuration.
"; echo "
".tra("Thank you for verifying ownership of your account.")."
" ."".tra("You can now delete your account by entering in your password below and clicking the \"Delete Account\" button.")."
" ."".tra("As a reminder, your account cannot be recovered once you delete it.")."
" .""; - + form_start(secure_url_base()."delete_account_confirm.php", "post"); form_input_hidden("token", $token); form_input_hidden("id", $userid); form_input_text(tra("Password"), "passwd", "", "password", 'id="passwd"', passwd_visible_checkbox("passwd")); form_submit(tra("Delete Account")); form_end(); - + page_tail(); } @@ -68,23 +68,23 @@ function delete_account_confirm_action() { tra("The token you used has expired or is otherwise not valid. Please request a new one here") ); } - + // Verify password // $user = BoincUser::lookup_id($userid); $passwd = post_str("passwd"); check_passwd_ui($user, $passwd); - + if (delete_account($user)) { error_page( tra("Failed to delete your account. Please contact the project administrator.") - ); + ); } - + page_head(tra("Account Deleted")); - + echo "
".tra("Your account has been deleted. If you want to contribute to %1 in the future you will need to create a new account.",PROJECT)."
"; - + page_tail(); } diff --git a/html/user/delete_account_request.php b/html/user/delete_account_request.php index 605756d986c..bb703a15d99 100644 --- a/html/user/delete_account_request.php +++ b/html/user/delete_account_request.php @@ -37,7 +37,7 @@ function delete_account_request_form($user) { page_head(tra("Delete Account")); - + echo "".tra("You have the ability to delete your account. Please note that this cannot be undone once it is completed.")."
" ."".tra("The process works as follows:")."
" ."" @@ -46,12 +46,12 @@ function delete_account_request_form($user) { ."- ".tra("On the page displayed, you will need to re-enter your password and then click \"Delete Account\"")."
"
."- ".tra("Your account will then be immediately deleted")
."
"; - + form_start(secure_url_base()."delete_account_request.php", "post"); form_input_text(tra("Password"), "passwd", "", "password", 'id="passwd"', passwd_visible_checkbox("passwd")); form_submit(tra("Send Confirmation Email")); form_end(); - + page_tail(); } @@ -59,7 +59,7 @@ function delete_account_request_action($user) { $passwd = post_str("passwd"); check_passwd_ui($user, $passwd); send_confirm_delete_email($user); - + page_head(tra("Confirmation Email Sent")); echo "
".tra("The email to confirm your request to delete your account has been sent.")."
"; page_tail(); @@ -71,4 +71,4 @@ function delete_account_request_action($user) { delete_account_request_form($user); } -?> \ No newline at end of file +?> diff --git a/html/user/donations.php b/html/user/donations.php index aa65cdc9d5d..33ce0f28ab3 100644 --- a/html/user/donations.php +++ b/html/user/donations.php @@ -64,11 +64,11 @@ $first_row = true; while ($row = _mysql_fetch_object($query)) { $col1 = $row->title."".$row->description.""; - + $query_amount = _mysql_query("SELECT SUM(payment_amount-payment_fee) AS amount FROM donation_paypal WHERE processed = 1 AND item_number = '".$row->id."'"); $acquired = _mysql_fetch_object($query_amount)->amount; $required = $row->required; - + if ($acquired > $required) { $acquired = $acquired - $required; $progress = 100; @@ -76,14 +76,14 @@ $progress = round($acquired / ($required) * 100); $progress2 = round($acquired / ($required) * 100,1); } - + $col2 = "id."\""; if ($first_row) { $first_row = false; $col2 .= " checked=\"checked\""; } $col2 .= ">"; - + if ($progress == 0) { $col2 .= "
".tra("User not found!")."
"; @@ -40,7 +40,7 @@ function show_user_wap($userid) { if ($user->teamid) { $team = BoincTeam::lookup_id($user->teamid); } - + $wapstr = PROJECT."
".tra("Account Data
for %1
Time:", $user->name)." ".wap_timestamp(); $wapstr .= show_credit_wap($user); if ($user->teamid && $team) { @@ -50,13 +50,13 @@ function show_user_wap($userid) { } else { $wapstr .= "
".tra("Team: None")."
"; } - + // don't want to send more than 1KB (WAP limit) // if (strlen($wapstr) > 1024) { $wapstr = substr($wapstr, 0, 1024); } - + echo $wapstr; wap_end(); } diff --git a/html/user/view_profile.php b/html/user/view_profile.php index ec22b4da597..b1510fb2122 100644 --- a/html/user/view_profile.php +++ b/html/user/view_profile.php @@ -38,7 +38,7 @@ error_page(tra("This user has no profile")); } } - + $logged_in_user = get_logged_in_user(false); check_whether_to_show_profile($user, $logged_in_user); diff --git a/lib/app_ipc.cpp b/lib/app_ipc.cpp index a4365f92fa2..d93b09372ed 100644 --- a/lib/app_ipc.cpp +++ b/lib/app_ipc.cpp @@ -71,10 +71,10 @@ void APP_INIT_DATA::copy(const APP_INIT_DATA& a) { safe_strcpy(authenticator, a.authenticator); memcpy(&shmem_seg_name, &a.shmem_seg_name, sizeof(SHMEM_SEG_NAME)); safe_strcpy(gpu_type, a.gpu_type); - + // use assignment for the rest, especially the classes // (so that the overloaded operators are called!) - major_version = a.major_version; + major_version = a.major_version; minor_version = a.minor_version; release = a.release; app_version = a.app_version; diff --git a/lib/boinc_win.h b/lib/boinc_win.h index e9a3f3ddc31..ef418b24689 100644 --- a/lib/boinc_win.h +++ b/lib/boinc_win.h @@ -57,28 +57,28 @@ #ifndef HAVE_STD_MAX #define HAVE_STD_MAX 1 -#endif +#endif #ifndef HAVE_STD_MIN #define HAVE_STD_MIN 1 -#endif +#endif #ifndef HAVE_STD_TRANSFORM #define HAVE_STD_TRANSFORM 1 -#endif +#endif #ifndef HAVE_ALLOCA #define HAVE_ALLOCA 1 -#endif +#endif #ifdef __MINGW32__ #define HAVE_STRCASECMP 1 #endif -/* +/* * WINSOCK vs WINSOCK2 could be an issue in compiles because we include multiple - * packages that have the same choice. The wx currently packed with BOINC - * uses WINSOCK, so we have to not include WINSOCK2 by undefining + * packages that have the same choice. The wx currently packed with BOINC + * uses WINSOCK, so we have to not include WINSOCK2 by undefining * HAVE_WINSOCK2_H. That limits what CURL in its header file as well. We might * need something more complicated if CURL and wxWidgets decide to go in * opposite directions. @@ -164,7 +164,7 @@ typedef size_t socklen_t; #endif -#else +#else /* Under cygwin, curl was probably compiled to use
"; print << "EOF";
- Last + Last
Log y axis? - Baseline average, or + Baseline average, or Baseline at: Y min: @@ -456,7 +456,7 @@ print << "EOF"; Reset Form