]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathRef.C
make it compile again (hopefully)
[lyx.git] / src / mathed / InsetMathRef.C
index 606a1f5c799e9525d4d4371b17e5a163368f36bc..e36839981f73bc05bd0325ca87d894401d8fe84c 100644 (file)
 #include "outputparams.h"
 #include "sgml.h"
 
-#include "frontends/LyXView.h"
-#include "frontends/Dialogs.h"
+using lyx::docstring;
 
 using std::string;
 using std::auto_ptr;
 using std::endl;
 
 
-
 RefInset::RefInset()
        : CommandInset("ref")
 {}
@@ -73,8 +71,7 @@ void RefInset::doDispatch(LCursor & cur, FuncRequest & cmd)
 
        case LFUN_INSET_DIALOG_UPDATE: {
                string const data = createDialogStr("ref");
-               if (cur.bv().owner()->getDialogs().visible("ref"))
-                       cur.bv().owner()->getDialogs().update("ref", data);
+               cur.bv().updateDialog("ref", data);
                break;
        }
 
@@ -87,7 +84,7 @@ void RefInset::doDispatch(LCursor & cur, FuncRequest & cmd)
                if (cmd.button() == mouse_button::button1) {
                        // Eventually trigger dialog with button 3, not 1
                        string const data = createDialogStr("ref");
-                       cur.bv().owner()->getDialogs().show("ref", data, this);
+                       cur.bv().showInsetDialog("ref", data, this);
                        break;
                }
                cur.undispatched();
@@ -123,16 +120,16 @@ bool RefInset::getStatus(LCursor & cur, FuncRequest const & cmd,
 }
 
 
-string const RefInset::screenLabel() const
+docstring const RefInset::screenLabel() const
 {
-       string str;
+       docstring str;
        for (int i = 0; !types[i].latex_name.empty(); ++i)
                if (commandname() == types[i].latex_name) {
-                       // FIXME UNICODE
-                       str = lyx::to_utf8(_(types[i].short_gui_name));
+                       str = _(types[i].short_gui_name);
                        break;
                }
-       str += asString(cell(0));
+       // FIXME UNICODE
+       str += lyx::from_utf8(asString(cell(0)));
 
        //if (/* !isLatex && */ !cell(0).empty()) {
        //      str += "||";
@@ -151,9 +148,10 @@ void RefInset::validate(LaTeXFeatures & features) const
 }
 
 
-int RefInset::plaintext(std::ostream & os, OutputParams const &) const
+int RefInset::plaintext(lyx::odocstream & os, OutputParams const &) const
 {
-       os << '[' << asString(cell(0)) << ']';
+       // FIXME UNICODE
+       os << '[' << lyx::from_utf8(asString(cell(0))) << ']';
        return 0;
 }