]> git.lyx.org Git - lyx.git/blobdiff - src/FontLoader.C
fix "make dist" target
[lyx.git] / src / FontLoader.C
index fafb7110b96fd9801d0f8f95e2637301417bb5ae..9b480e6a3ff22e2cb1eb8b0d8dc39dcd73436133 100644 (file)
@@ -23,7 +23,6 @@
 #include "lyxrc.h"     // lyxrc.font_*
 #include "BufferView.h"
 #include "LyXView.h"
-#include "minibuffer.h"
 
 using std::endl;
 
@@ -40,12 +39,14 @@ FontLoader::FontLoader()
        reset();
 }
 
+
 // Destroy font loader
 FontLoader::~FontLoader()
 {
        unload();
 }
 
+
 // Update fonts after zoom, dpi, font names, or norm change
 // For now, we just ditch all fonts we have. Later, we should
 // reuse the ones that are already loaded.
@@ -54,6 +55,7 @@ void FontLoader::update()
        unload();
 }
 
+
 // Reset font loader
 void FontLoader::reset()
 {
@@ -68,6 +70,7 @@ void FontLoader::reset()
                        }
 }
 
+
 // Unload all fonts
 void FontLoader::unload() 
 {
@@ -88,6 +91,7 @@ void FontLoader::unload()
                        }
 }
 
+
 // Get font info
 /* Takes care of finding which font that can match the given request. Tries
 different alternatives. */
@@ -204,9 +208,13 @@ void FontLoader::getFontinfo(LyXFont::FONT_FAMILY family,
 }
 
 
-// A dummy fontstruct used when there is no gui. 
-static XFontStruct dummyXFontStruct;
-static bool dummyXFontStructisGood = false;
+// A dummy fontstruct used when there is no gui.
+namespace {
+
+XFontStruct dummyXFontStruct;
+bool dummyXFontStructisGood = false;
+
+} // namespace anon
 
 /// Do load font
 XFontStruct * FontLoader::doLoad(LyXFont::FONT_FAMILY family, 
@@ -242,8 +250,8 @@ XFontStruct * FontLoader::doLoad(LyXFont::FONT_FAMILY family,
 
        XFontStruct * fs = 0;
 
-       current_view->owner()->getMiniBuffer()->Store();
-       current_view->owner()->getMiniBuffer()->Set(_("Loading font into X-Server..."));
+       current_view->owner()->messagePush(_("Loading font into X-Server..."));
+
        fs = XLoadQueryFont(fl_get_display(), font.c_str());
        
        if (fs == 0) {
@@ -270,7 +278,7 @@ XFontStruct * FontLoader::doLoad(LyXFont::FONT_FAMILY family,
                       << "' matched by\n" << font << endl;
        }
 
-       current_view->owner()->getMiniBuffer()->Reset();
+       current_view->owner()->messagePop();
 
        fontstruct[family][series][shape][size] = fs;
        return fs;