mail[Wesnoth-commits] r20375 - in /trunk: data/core/help.cfg src/help.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by alinktomine on September 14, 2007 - 19:31:
Author: alink
Date: Fri Sep 14 19:31:21 2007
New Revision: 20375

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20375&view=rev
Log:
Hide the "Unknown Unit" page from the left-panel view.
(also pull its id from to code and move it in a separate const)

Modified:
    trunk/data/core/help.cfg
    trunk/src/help.cpp

Modified: trunk/data/core/help.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/core/help.cfg?rev=20375&r1=20374&r2=20375&view=diff
==============================================================================
--- trunk/data/core/help.cfg (original)
+++ trunk/data/core/help.cfg Fri Sep 14 19:31:21 2007
@@ -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>" + 
_"
 

Modified: trunk/src/help.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/help.cpp?rev=20375&r1=20374&r2=20375&view=diff
==============================================================================
--- trunk/src/help.cpp (original)
+++ trunk/src/help.cpp Fri Sep 14 19:31:21 2007
@@ -574,7 +574,7 @@
        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 @@
                                        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 @@
                                        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>";




Related Messages


Powered by MHonArc, Updated Fri Sep 14 21:20:29 2007