Author: sapient
Date: Mon Jul 21 07:28:23 2008
New Revision: 28117
URL: http://svn.gna.org/viewcvs/wesnoth?rev=28117&view=rev
Log:
revert r28111 which was an incorrect fix for bug #11988.
(discuss this with Sapient if you have any questions.)
Modified:
trunk/src/game_events.cpp
trunk/src/game_events.hpp
Modified: trunk/src/game_events.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.cpp?rev=28117&r1=28116&r2=28117&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Mon Jul 21 07:28:23 2008
@@ -1911,7 +1911,7 @@
// Use an ugly hack, if the spacer has the wanted best_size we
use the
// bigger image otherwise the smaller one.
- gui2::tspacer* spacer =
+ gui2::tspacer* spacer =
dynamic_cast<gui2::tspacer*>(window.find_widget("image_place_holder", false));
unsigned image_size = 200;
unsigned window_height = 400;
@@ -1927,12 +1927,12 @@
const std::string image = portrait ? portrait->image : "";
const bool mirror = portrait ? portrait->mirror : false;
- /**
- * @todo FIXME these fixed sizes should depend on the map size
and maybe
+ /**
+ * @todo FIXME these fixed sizes should depend on the map size
and maybe
* let wml determine the height.
*/
- window.set_size(::create_rect(0,
- gui2::settings::screen_height - window_height,
+ window.set_size(::create_rect(0,
+ gui2::settings::screen_height - window_height,
gui2::settings::screen_width - 142, window_height));
window.canvas(1).set_variable("portrait_image", variant(image));
@@ -1954,7 +1954,7 @@
// Use an ugly hack, if the spacer has the wanted best_size we
use the
// bigger image otherwise the smaller one.
- gui2::tspacer* spacer =
+ gui2::tspacer* spacer =
dynamic_cast<gui2::tspacer*>(window.find_widget("image_place_holder", false));
unsigned image_size = 200;
unsigned window_height = 400;
@@ -1970,12 +1970,12 @@
const std::string image = portrait ? portrait->image : "";
const bool mirror = portrait ? portrait->mirror : false;
- /**
- * @todo FIXME these fixed sizes should depend on the map size
and maybe
+ /**
+ * @todo FIXME these fixed sizes should depend on the map size
and maybe
* let wml determine the height.
*/
- window.set_size(::create_rect(0,
- gui2::settings::screen_height - window_height,
+ window.set_size(::create_rect(0,
+ gui2::settings::screen_height - window_height,
gui2::settings::screen_width - 142, window_height));
window.canvas(1).set_variable("portrait_image", variant(image));
@@ -3457,14 +3457,9 @@
void write_events(config& cfg)
{
assert(manager_running);
- std::set<std::string> id_handlers;
- std::string id;
for(std::multimap<std::string,game_events::event_handler>::const_iterator i =
events_map.begin(); i != events_map.end(); ++i) {
- id = i->second.get_id();
- if(!i->second.disabled() &&
!i->second.is_menu_item() &&
- id_handlers.find(id)==id_handlers.end()) {
+ if(!i->second.disabled() &&
!i->second.is_menu_item()) {
i->second.write(cfg.add_child("event"));
- id_handlers.insert(i->second.get_id());
}
}
Modified: trunk/src/game_events.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.hpp?rev=28117&r1=28116&r2=28117&view=diff
==============================================================================
--- trunk/src/game_events.hpp (original)
+++ trunk/src/game_events.hpp Mon Jul 21 07:28:23 2008
@@ -96,11 +96,8 @@
first_time_only_(utils::string_bool(cfg["first_time_only"],true)),
disabled_(false),mutated_(true),
skip_messages_(false),rebuild_screen_(false),
- cfg_(cfg),
- id_(cfg.get_config().hash())
+ cfg_(cfg)
{}
-
- const std::string get_id() const {return id_;}
void write(config& cfg) const
{
@@ -117,7 +114,7 @@
void disable() { disabled_ = true; }
bool disabled() const { return disabled_; }
- bool is_menu_item() const;
+ bool is_menu_item() const;
const vconfig::child_list first_arg_filters()
{
return cfg_.get_children("filter");
@@ -166,7 +163,6 @@
bool skip_messages_;
bool rebuild_screen_;
vconfig cfg_;
- std::string id_;
};
typedef void (*wml_handler_function)(event_handler& eh,
@@ -219,7 +215,7 @@
void wml_func_ ## pname \
(game_events::event_handler& peh, \
const game_events::queued_event& pei,\
- const vconfig& pcfg)
+ const vconfig& pcfg)
/**
* Stores wml tag handler functions
@@ -243,7 +239,7 @@
static command_handlers* manager_;
- // It might be good optimization to use hash instead
+ // It might be good optimization to use hash instead
// of string as key for map
// static size_t make_hash_key(const std::string&);
public:
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits