]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettext.C
fix compilation pb ; update eu.po
[lyx.git] / src / insets / insettext.C
index 18c39ca006b727965c60d20c93beeadda1dbbd6b..b693257621590b0d2ef63a2081b8dceecb16fd59 100644 (file)
@@ -47,6 +47,7 @@
 #include "lyxscreen.h"
 #include "WorkArea.h"
 #include "gettext.h"
+#include "lyxfunc.h"
 
 using std::ostream;
 using std::ifstream;
@@ -1098,8 +1099,8 @@ InsetText::LocalDispatch(BufferView * bv,
                        // and current buffer's textclass (number). */    
                        LyXTextClassList::ClassList::size_type tclass =
                                bv->buffer()->params.textclass;
-                       std::pair<bool, LyXTextClass::size_type> layout = 
-                                       textclasslist.NumberOfLayout(tclass, arg);
+                       std::pair <bool, LyXTextClass::size_type> layout = 
+                               textclasslist.NumberOfLayout(tclass, arg);
 
                        // If the entry is obsolete, use the new one instead.
                        if (layout.first) {
@@ -1112,7 +1113,7 @@ InsetText::LocalDispatch(BufferView * bv,
                        // see if we found the layout number:
                        if (!layout.first) {
                                string const msg = string(N_("Layout ")) + arg + N_(" not known");
-                               bv->owner()->message(msg);
+                               bv->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE, msg);
                                break;
                        }
 
@@ -1545,8 +1546,10 @@ bool InsetText::checkAndActivateInset(BufferView * bv, bool behind)
 bool InsetText::checkAndActivateInset(BufferView * bv, int x, int y,
                                      int button)
 {
-       int dummyx = x = x - drawTextXOffset;
-       int dummyy = y + insetAscent;
+       int dummyx, dummyy;
+
+       dummyx = x = x - drawTextXOffset;
+       dummyy = y + insetAscent;
        Inset * inset = bv->checkInsetHit(TEXT(bv), dummyx, dummyy, button);
 
        if (inset) {
@@ -1861,7 +1864,6 @@ void InsetText::removeNewlines()
        }
 }
 
-               
 bool InsetText::nodraw() const
 {
        if (the_locking_inset)
@@ -1869,7 +1871,6 @@ bool InsetText::nodraw() const
        return UpdatableInset::nodraw();
 }
 
-
 int InsetText::scroll(bool recursive) const
 {
        int sx = UpdatableInset::scroll(false);
@@ -1880,7 +1881,6 @@ int InsetText::scroll(bool recursive) const
        return sx;
 }
 
-
 bool InsetText::doClearArea() const
 {
        return !locked || (need_update & (FULL|INIT));