------------------------------------------------------------
revno: 2524
committer: poy <[email protected]>
branch nick: trunk
timestamp: Fri 2011-05-06 23:57:07 +0200
message:
add a text for when there's no cshelp
modified:
win32/WinUtil.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'win32/WinUtil.cpp'
--- win32/WinUtil.cpp 2011-05-04 19:32:00 +0000
+++ win32/WinUtil.cpp 2011-05-06 21:57:07 +0000
@@ -948,14 +948,18 @@
}
string WinUtil::getHelpText(unsigned id) {
- if(id < IDH_CSHELP_BEGIN)
- return Util::emptyString;
- id -= IDH_CSHELP_BEGIN;
-
- if(id >= helpTexts.size())
- return Util::emptyString;
-
- return helpTexts[id];
+ if(id >= IDH_CSHELP_BEGIN) {
+ id -= IDH_CSHELP_BEGIN;
+
+ if(id < helpTexts.size()) {
+ const auto& ret = helpTexts[id];
+ if(!ret.empty()) {
+ return ret;
+ }
+ }
+ }
+
+ return _("No help information available");
}
void WinUtil::toInts(const string& str, std::vector<int>& array) {
_______________________________________________
Mailing list: https://launchpad.net/~linuxdcpp-team
Post to : [email protected]
Unsubscribe : https://launchpad.net/~linuxdcpp-team
More help : https://help.launchpad.net/ListHelp