- Button::ID bid = (Button::ID) id;
- if ((prop = (*i)->property ("id")) != 0) {
- int val = strtol (prop->value().c_str(), 0, 0);
- std::map<Button::ID,GlobalButtonInfo>::iterator b = _global_buttons.find (bid);
- if (b != _global_buttons.end()) {
- b->second.id = val;
-
- if ((prop = (*i)->property ("label")) != 0) {
- b->second.label = prop->value();
- }
+ Button::ID bid = (Button::ID)id;
+ int32_t id;
+ if ((*i)->get_property ("id", id)) {
+ std::map<Button::ID, GlobalButtonInfo>::iterator b = _global_buttons.find (bid);
+ if (b != _global_buttons.end ()) {
+ b->second.id = id;
+ (*i)->get_property ("label", b->second.label);