^Font and ^FontSize
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3134 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
f915329242
commit
836f699592
2 changed files with 28 additions and 1 deletions
|
@ -113,6 +113,8 @@ struct {
|
||||||
{"^Kilo", "K", BOTH_STATIC},
|
{"^Kilo", "K", BOTH_STATIC},
|
||||||
{"^Mega", "M", BOTH_STATIC},
|
{"^Mega", "M", BOTH_STATIC},
|
||||||
{"^Giga", "G", BOTH_STATIC},
|
{"^Giga", "G", BOTH_STATIC},
|
||||||
|
{"^Font", "MS Shell Dlg", NONE_STATIC},
|
||||||
|
{"^FontSize", "8", NONE_STATIC},
|
||||||
{"^RTL", "0", NONE_STATIC}
|
{"^RTL", "0", NONE_STATIC}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -613,6 +615,28 @@ void CEXEBuild::FillLanguageTable(LanguageTable *table) {
|
||||||
table->lang_strings->set(sn, temp);
|
table->lang_strings->set(sn, temp);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else if (i == NLF_FONT)
|
||||||
|
{
|
||||||
|
int font_size = *build_font ? build_font_size : table->nlf.m_iFontSize;
|
||||||
|
if (font_size)
|
||||||
|
{
|
||||||
|
char temp[64];
|
||||||
|
sprintf(temp, "%d", font_size);
|
||||||
|
table->lang_strings->set(sn, temp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
table->lang_strings->set(sn, dstr);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else if (i == NLF_FONTSIZE)
|
||||||
|
{
|
||||||
|
char *font = *build_font ? build_font : table->nlf.m_szFont;
|
||||||
|
if (font)
|
||||||
|
table->lang_strings->set(sn, font);
|
||||||
|
else
|
||||||
|
table->lang_strings->set(sn, dstr);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
table->lang_strings->set(sn, dstr);
|
table->lang_strings->set(sn, dstr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -751,7 +775,7 @@ LanguageTable * CEXEBuild::LoadLangFile(char *filename) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read strings
|
// Read strings
|
||||||
for (int i = 0; i < NLF_STRINGS - 1; i++) {
|
for (int i = 0; i < NLF_STRINGS - 3 /* ^Font, ^FontSize and ^RTL */; i++) {
|
||||||
|
|
||||||
// skip virtual strings
|
// skip virtual strings
|
||||||
if (!NLFStrings[i].szDefault)
|
if (!NLFStrings[i].szDefault)
|
||||||
|
|
|
@ -275,6 +275,9 @@ enum {
|
||||||
NLF_KILO,
|
NLF_KILO,
|
||||||
NLF_MEGA,
|
NLF_MEGA,
|
||||||
NLF_GIGA,
|
NLF_GIGA,
|
||||||
|
|
||||||
|
NLF_FONT,
|
||||||
|
NLF_FONTSIZE,
|
||||||
NLF_RTL,
|
NLF_RTL,
|
||||||
|
|
||||||
NLF_STRINGS
|
NLF_STRINGS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue