Could somebody on Windows please try this one?

[It should work]

Also anu observations on startup speed are welcome.

Andre'
Index: GuiToolbar.cpp
===================================================================
--- GuiToolbar.cpp      (revision 20995)
+++ GuiToolbar.cpp      (working copy)
@@ -43,6 +43,8 @@
 #include <QAction>
 #include <QPixmap>
 
+extern void qInitResources();
+
 namespace lyx {
 
 using std::string;
@@ -162,6 +164,11 @@
 /// return a icon for the given action
 static QIcon getIcon(FuncRequest const & f, bool unknown)
 {
+       static bool initialized = false;
+       if (!initialized) {
+               ::qInitResources();
+               initialized = true;
+       }
        string fullname;
 
        switch (f.action) {
@@ -180,12 +187,13 @@
                if (!f.argument().empty())
                        png_name = subst(name + ' ' + to_utf8(f.argument()), ' 
', '_');
 
-               fullname = libFileSearch("images", png_name, 
"png").absFilename();
+               QPixmap pm;
+               if (pm.load(":/images/" + toqstr(png_name) + ".png"))
+                       return pm;
 
-               if (fullname.empty()) {
-                       // try without the argument
-                       fullname = libFileSearch("images", name, 
"png").absFilename();
-               }
+               // try without the argument
+               if (pm.load(":/images/" + toqstr(name) + ".png"))
+                       return pm;
        }
 
        if (!fullname.empty()) {

Reply via email to