mail[Wesnoth-commits] r20374 - /trunk/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:07:
Author: alink
Date: Fri Sep 14 19:06:33 2007
New Revision: 20374

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20374&view=rev
Log:
In help, allow to hide a page from the left-panel view.
Plan tu use it for hiding the "Unknown Unit" page or other error/info pages
Simply use the linux convention: topic id starting with a "." are hidden.
Note that open a hidden topic in a section, will also open the section.
Can be useful, but if not wanted, simply place the hidden topic at toplevel

Modified:
    trunk/src/help.cpp

Modified: trunk/src/help.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/help.cpp?rev=20374&r1=20373&r2=20374&view=diff
==============================================================================
--- trunk/src/help.cpp (original)
+++ trunk/src/help.cpp Fri Sep 14 19:06:33 2007
@@ -1741,8 +1741,10 @@
        }
        topic_list::const_iterator topic_it;
        for (topic_it = sec.topics.begin(); topic_it != sec.topics.end(); 
topic_it++) {
-               const std::string vis_string = get_string_to_show(*topic_it, 
level);
-               visible_items_.push_back(visible_item(&(*topic_it), 
vis_string));
+               if (topic_it->id.empty() || (topic_it->id)[0] != '.') {
+                       const std::string vis_string = 
get_string_to_show(*topic_it, level);
+                       visible_items_.push_back(visible_item(&(*topic_it), 
vis_string));
+               }
        }
 }
 




Related Messages


Powered by MHonArc, Updated Fri Sep 14 19:40:29 2007