OK, LangStrings can now really be defined after they are used
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1984 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
61bd36d346
commit
88cfbb4702
3 changed files with 25 additions and 7 deletions
|
@ -191,6 +191,25 @@ int CEXEBuild::SetString(char *string, int id, int process, StringTable *table)
|
|||
return PS_OK;
|
||||
}
|
||||
|
||||
int CEXEBuild::GetUserString(char *name) {
|
||||
StringList *user_strings_list = 0;
|
||||
bool uninst;
|
||||
|
||||
if (!(uninst = !strnicmp(name,"un.",3))) {
|
||||
user_strings_list=&build_userlangstrings;
|
||||
}
|
||||
else {
|
||||
user_strings_list=&ubuild_userlangstrings;
|
||||
}
|
||||
|
||||
SetUserString(name, 0, 0, 0);
|
||||
|
||||
int idx = -1;
|
||||
user_strings_list->find(name, 0, &idx);
|
||||
|
||||
return idx;
|
||||
}
|
||||
|
||||
int CEXEBuild::SetUserString(char *name, LANGID lang, char *string, int process/*=1*/) {
|
||||
StringTable *table = 0;
|
||||
if (string) {
|
||||
|
@ -214,7 +233,7 @@ int CEXEBuild::SetUserString(char *name, LANGID lang, char *string, int process/
|
|||
if (user_strings_list->find(name, 0, &idx) < 0) {
|
||||
// if lang string doesn't exist yet
|
||||
user_strings_list->add(name, 0);
|
||||
user_strings_list->find(name, 0, &idx);
|
||||
if (string) user_strings_list->find(name, 0, &idx);
|
||||
unsigned int new_size = user_strings_list->getnum() * sizeof(int);
|
||||
for (int i = 0; i < string_tables.size(); i++) {
|
||||
if (uninst) string_tables[i]->user_ustrings.resize(new_size, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue