Hide the "Unknown Unit" page from the left-panel view.

(also pull its id from to code and move it in a separate const)
This commit is contained in:
Ali El Gariani 2007-09-14 17:31:21 +00:00
parent ed981a8174
commit 132331e9a1
2 changed files with 5 additions and 5 deletions

View file

@ -32,7 +32,7 @@
sections_generator=races
sort_topics=yes
sort_sections=yes
topics=unknown_unit
topics=.unknown_unit
[/section]
[section]
@ -77,7 +77,7 @@
[/topic]
[topic]
id=unknown_unit
id=.unknown_unit
title= _ "Unknown Unit"
text="<img>src=units/random-enemy.png align=left float=yes</img>" + _"

View file

@ -574,7 +574,7 @@ namespace {
const std::string open_section_img = "help/open_section.png";
// The topic to open by default when opening the help dialog.
const std::string default_show_topic = "introduction_topic";
const std::string unknown_unit_topic = ".unknown_unit";
}
/// Return true if the id is valid for user defined topics and
@ -1285,7 +1285,7 @@ public:
if (description_type(type->second) == FULL_DESCRIPTION) {
ref_id = std::string("unit_") + type->second.id();
} else {
ref_id = "unknown_unit";
ref_id = unknown_unit_topic;
lang_unit += " (?)";
}
ss << "<ref>dst='" << escape(ref_id) << "' text='" << escape(lang_unit) << "'</ref>";
@ -1312,7 +1312,7 @@ public:
if (description_type(type->second) == FULL_DESCRIPTION) {
ref_id = std::string("unit_") + type->second.id();
} else {
ref_id = "unknown_unit";
ref_id = unknown_unit_topic;
lang_unit += " (?)";
}
ss << "<ref>dst='" << escape(ref_id) << "' text='" << escape(lang_unit) << "'</ref>";