]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetIPA.cpp
Check in InsetLabel if LFUN_INSET_MODIFY is intended for us.
[lyx.git] / src / insets / InsetIPA.cpp
index edee27e4b4d6a101314e3124ae75698c4270f58f..6fe0a90fc7a841034b9d520e35fa214df5783f9c 100644 (file)
@@ -63,6 +63,22 @@ void InsetIPA::write(ostream & os) const
 }
 
 
+void InsetIPA::doDispatch(Cursor & cur, FuncRequest & cmd)
+{
+       switch (cmd.action()) {
+       case LFUN_QUOTE_INSERT: {
+               FuncRequest fr(LFUN_SELF_INSERT, "\"");
+               InsetText::doDispatch(cur, fr);
+               break;
+       }
+       default:
+               InsetText::doDispatch(cur, cmd);
+               break;
+       }
+
+}
+
+
 bool InsetIPA::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
@@ -74,6 +90,10 @@ bool InsetIPA::getStatus(Cursor & cur, FuncRequest const & cmd,
                }
                break;
        }
+       case LFUN_IN_IPA:
+               flag.setEnabled(true);
+               return true;
+               break;
        default:
                break;
        }
@@ -187,10 +207,10 @@ bool InsetIPA::notifyCursorLeaves(Cursor const & old, Cursor & cur)
 
 void InsetIPA::validate(LaTeXFeatures & features) const
 {
-       if (buffer_->params().useNonTeXFonts)
-               return;
        features.require("tipa");
        features.require("tipx");
+
+       InsetText::validate(features);
 }
 
 
@@ -218,6 +238,8 @@ bool InsetIPA::insetAllowed(InsetCode code) const
        switch (code) {
        // code that is allowed
        case ERT_CODE:
+       case IPACHAR_CODE:
+       case IPADECO_CODE:
        case SCRIPT_CODE:
                return true;
        default: