Author: fendrin
Date: Sun Nov 22 08:43:34 2009
New Revision: 39869
URL: http://svn.gna.org/viewcvs/wesnoth?rev=39869&view=rev
Log:
Code cleanups.
Modified:
branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.cpp
branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.hpp
branches/fendrin_gui_stuff/src/menu_events.cpp
Modified: branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.cpp?rev=39869&r1=39868&r2=39869&view=diff
==============================================================================
--- branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.cpp (original)
+++ branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.cpp Sun Nov 22
08:43:34 2009
@@ -381,6 +381,11 @@
true).get_selected_row()];
}
+void trecruit_message_::post_show(twindow& window) {
+ tunit_message_::post_show(window);
+ chosen_type_ = chosen_unit_->type_id();
+}
+
twindow* ticon_message_left::build_window(CVideo& video) {
return build(video, get_id(ICON_MESSAGE_LEFT));
}
Modified: branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.hpp?rev=39869&r1=39868&r2=39869&view=diff
==============================================================================
--- branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.hpp (original)
+++ branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.hpp Sun Nov 22
08:43:34 2009
@@ -286,9 +286,9 @@
/** Inherited from tdialog. */
void pre_show(CVideo& video, twindow& window);
-private:
/** Inherited from tdialog. */
void post_show(twindow& window);
+
};
class trecruit_message_ : public tunit_message_
@@ -311,7 +311,7 @@
//TODO clean up
/** Inherited from tdialog. */
- void post_show(twindow& window) { chosen_type_ =
chosen_unit_->type_id(); }
+ void post_show(twindow& window);// { chosen_type_ =
chosen_unit_->type_id(); }
private:
// std::vector<const unit_type*> type_list_;
Modified: branches/fendrin_gui_stuff/src/menu_events.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/fendrin_gui_stuff/src/menu_events.cpp?rev=39869&r1=39868&r2=39869&view=diff
==============================================================================
--- branches/fendrin_gui_stuff/src/menu_events.cpp (original)
+++ branches/fendrin_gui_stuff/src/menu_events.cpp Sun Nov 22 08:43:34 2009
@@ -693,7 +693,7 @@
recruit_res = gui2::show_recruit_message(left_side, gui_->video(),
false, sample_units, chosen_type_id);
- if(recruit_res == 1) {
+ if(recruit_res == gui2::twindow::OK) {
do_recruit(chosen_type_id, side_num, last_hex);
}
}
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits