Author: mordante
Date: Sun Jun 22 20:08:30 2008
New Revision: 27414
URL: http://svn.gna.org/viewcvs/wesnoth?rev=27414&view=rev
Log:
Forgot to document a new function, added documentation renamed it and did
some minor cleanups.
Modified:
trunk/src/gui/widgets/listbox.cpp
trunk/src/gui/widgets/toggle_panel.cpp
trunk/src/gui/widgets/toggle_panel.hpp
Modified: trunk/src/gui/widgets/listbox.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/listbox.cpp?rev=27414&r1=27413&r2=27414&view=diff
==============================================================================
--- trunk/src/gui/widgets/listbox.cpp (original)
+++ trunk/src/gui/widgets/listbox.cpp Sun Jun 22 20:08:30 2008
@@ -532,7 +532,7 @@
}
} else if(panel) {
panel->set_callback_mouse_left_click(callback_select_list_item);
- panel->set_data(data);
+ panel->set_members(data);
} else if(child_grid) {
init_in_grid(child_grid, data);
} else {
Modified: trunk/src/gui/widgets/toggle_panel.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/toggle_panel.cpp?rev=27414&r1=27413&r2=27414&view=diff
==============================================================================
--- trunk/src/gui/widgets/toggle_panel.cpp (original)
+++ trunk/src/gui/widgets/toggle_panel.cpp Sun Jun 22 20:08:30 2008
@@ -39,15 +39,15 @@
namespace gui2 {
-void ttoggle_panel::set_data(const std::map<std::string /* widget id */,
std::map<
+void ttoggle_panel::set_members(const std::map<std::string /* widget id */,
std::map<
std::string /* member id */, t_string /* member value */> >&
data)
{
// typedef boost problem work around.
typedef std::pair<std::string, std::map<std::string, t_string> > hack ;
foreach(const hack& item, data) {
- tcontrol* widget =
dynamic_cast<tcontrol*>(find_widget(item.first, false));
- if(widget) {
- widget->set_members(item.second);
+ tcontrol* control =
dynamic_cast<tcontrol*>(find_widget(item.first, false));
+ if(control) {
+ control->set_members(item.second);
}
}
}
Modified: trunk/src/gui/widgets/toggle_panel.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/toggle_panel.hpp?rev=27414&r1=27413&r2=27414&view=diff
==============================================================================
--- trunk/src/gui/widgets/toggle_panel.hpp (original)
+++ trunk/src/gui/widgets/toggle_panel.hpp Sun Jun 22 20:08:30 2008
@@ -36,7 +36,15 @@
{
}
- void set_data(const std::map<std::string /* widget id */, std::map<
+ /**
+ * Sets the members of the child controls.
+ *
+ * Sets the members for all controls which have the proper member id.
See
+ * tcontrol::set_members for more info.
+ *
+ * @param data Map with the key value pairs to set the
members.
+ */
+ void set_members(const std::map<std::string /* widget id */, std::map<
std::string /* member id */, t_string /* member value */> >&
data);
/***** ***** ***** ***** Inherited ***** ***** ***** *****/
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits