]> git.lyx.org Git - features.git/commitdiff
Make sure that the contents of the inset uses the buffer language (in order to
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 5 Nov 2008 16:40:18 +0000 (16:40 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 5 Nov 2008 16:40:18 +0000 (16:40 +0000)
avoid the ugly blue line).

Fixes part of http://bugzilla.lyx.org/show_bug.cgi?id=5348

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27267 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetInfo.cpp

index db47b2007492131452bdb98c2986d958ba10be34..34e1d3d7f71844a8e833b993b1630fb11048b4a6 100644 (file)
@@ -251,13 +251,14 @@ void InsetInfo::setInfo(string const & name)
 
 void InsetInfo::error(string const & err)
 {
-       setText(bformat(_(err), from_utf8(name_)), Font(inherit_font), false);
+       setText(bformat(_(err), from_utf8(name_)), 
+               Font(inherit_font, buffer().params().language), false);
 }
 
 
 void InsetInfo::setText(docstring const & str)
 {
-       setText(str, Font(inherit_font), false);
+       setText(str, Font(inherit_font, buffer().params().language), false);
 }
 
 
@@ -283,11 +284,9 @@ void InsetInfo::updateInfo()
                        break;
                }
                if (type_ == SHORTCUT_INFO)
-                       setText(bindings.begin()->print(KeySequence::Portable),
-                               Font(inherit_font), false);
+                       setText(bindings.begin()->print(KeySequence::Portable));
                else
-                       setText(theTopLevelKeymap().printBindings(func, KeySequence::Portable), 
-                               Font(inherit_font), false);
+                       setText(theTopLevelKeymap().printBindings(func, KeySequence::Portable));
                break;
        }
        case LYXRC_INFO: {
@@ -326,7 +325,7 @@ void InsetInfo::updateInfo()
                // if found, return its path.
                clear();
                Paragraph & par = paragraphs().front();
-               Font const f = Font(getLayout().font());
+               Font const f(inherit_font, buffer().params().language);
                //Font fu = f;
                //fu.fontInfo().setUnderbar(FONT_ON);
                docstring_list::const_iterator beg = names.begin();