- if (p->name_ == String ("Sustain"))
- {
- p->item_p_ = new Sustain_pedal;
- p->item_p_->set_elt_property ("text", s);
- }
- else
- {
- p->item_p_ = new Text_item;
- p->item_p_->set_elt_property ("text", s);
- // guh
- p->item_p_->set_elt_property ("style", ly_str02scm ("italic"));
- }
-
- Side_position_interface si (p->item_p_);
- si.set_axis (Y_AXIS);
-
- p->item_p_->set_elt_property ("no-spacing-rods" , SCM_BOOL_T);
- p->item_p_->set_elt_property ("self-alignment-X", gh_int2scm (0));
- p->item_p_->add_offset_callback (Side_position_interface::aligned_on_self, X_AXIS);
- p->item_p_->add_offset_callback (Side_position_interface::centered_on_parent, X_AXIS);
- announce_element (Score_element_info (p->item_p_,
- p->req_l_drul_[START]
- ? p->req_l_drul_[START]
- : p->req_l_drul_[STOP]));
+ String propname = String (p->name_) + "Pedal";
+ p->item_p_ = new Item (get_property (propname.ch_C()));
+ p->item_p_->set_grob_property ("text", s);
+
+ announce_grob (p->item_p_,
+ p->req_l_drul_[START]
+ ? p->req_l_drul_[START]
+ : p->req_l_drul_[STOP]);