- pair<bool, string> result = askForText(_("Enter label:"), getContents());
- if (result.first) {
- string new_contents = frontStrip(strip(result.second));
- if (!new_contents.empty() &&
- getContents() != new_contents) {
- bv->buffer()->markDirty();
- bool flag = bv->ChangeRefsIfUnique(getContents(),
- new_contents);
- setContents(new_contents);
- bv->text->redoParagraph(bv);
- if (flag) {
- bv->redraw();
- bv->fitCursor(getLyXText(bv));
- } else
- bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+
+docstring const InsetLabel::getScreenLabel(Buffer const &) const
+{
+ return getParam("name");
+}
+
+
+void InsetLabel::doDispatch(LCursor & cur, FuncRequest & cmd)
+{
+ switch (cmd.action) {
+
+ case LFUN_INSET_MODIFY: {
+ InsetCommandParams p("label");
+ // FIXME UNICODE
+ InsetCommandMailer::string2params("label", to_utf8(cmd.argument()), p);
+ if (p.getCmdName().empty()) {
+ cur.noUpdate();
+ break;