Georg Baum a écrit :
Am Freitag, 7. April 2006 23:56 schrieb Georg Baum:
Here is the patch (again only the relevant files). It goes in tomorrow
if
nobody objects.

Done. Abdel, please fix the qt4 icons: Either by creating a resource file, or by loading them at runtime and move the icons into the correct install target in lib/Makefile.am.

OK, here's the patch. Please verify that I did not any mistake in Makefile.am. This patch removes the hack for now by using LibFileSearch as you suggested. I like very much the qrc approach suggested by Andre but I think this should be a more general thing. So the next step would be to integrate a qrc file that contains all the math symbols (including these ones) and use that instead. It's in my Todo list unless someone (Andre?) wants to take care of that.

Abdel.



Georg



Index: lib/Makefile.am
===================================================================
--- lib/Makefile.am     (revision 13601)
+++ lib/Makefile.am     (working copy)
@@ -32,21 +32,11 @@
        images/math/delim0.xpm \
        images/math/delim1.xpm \
        images/math/delim.xbm \
-       images/math/delim.xpm \
        images/math/dots.xbm \
-       images/math/equation.xpm \
        images/math/font.xbm \
-       images/math/font.xpm \
        images/math/frac-square.xpm \
        images/math/greek.xbm \
-       images/math/matrix.xpm \
        images/math/misc.xbm \
-       images/math/space.xpm \
-       images/math/sqrt-square.xpm \
-       images/math/style.xbm \
-       images/math/style.xpm \
-       images/math/sub.xpm \
-       images/math/super.xpm \
        images/math/varsz.xbm
 
 binddir = $(pkgdatadir)/bind
@@ -255,6 +245,16 @@
 
 imagesmathdir = $(imagesdir)/math
 dist_imagesmath_DATA = \
+       images/math/style.xbm \
+       images/math/font.xpm \
+       images/math/delim.xpm \
+       images/math/equation.xpm \
+       images/math/matrix.xpm \
+       images/math/space.xpm \
+       images/math/sqrt-square.xpm \
+       images/math/style.xpm \
+       images/math/sub.xpm \
+       images/math/super.xpm \
        images/math/Bbbk.xpm \
        images/math/Finv.xpm \
        images/math/Game.xpm \
Index: src/frontends/qt4/QMathDialog.C
===================================================================
--- src/frontends/qt4/QMathDialog.C     (revision 13592)
+++ src/frontends/qt4/QMathDialog.C     (working copy)
@@ -26,9 +26,12 @@
 #include "qt_helpers.h"
 #include "controllers/ControlMath.h"
 #include "frontends/lyx_gui.h"
+#include "support/filetools.h"
 
 using std::string;
 
+using lyx::support::LibFileSearch;
+
 namespace lyx {
 namespace frontend {
 
@@ -68,6 +71,27 @@
        connect( equationPB, SIGNAL( clicked() ), this, SLOT( equationClicked() 
) );
        connect( symbolsCO, SIGNAL(activated(int)), this, 
SLOT(showingPanel(int)));
 
+       string icon_path = LibFileSearch("images/math", "sqrt-square", "xpm");
+       sqrtPB->setIcon(QIcon(toqstr(icon_path)));
+       icon_path = LibFileSearch("images/math", "space", "xpm");
+       spacePB->setIcon(QIcon(toqstr(icon_path)));
+       icon_path = LibFileSearch("images/math", "style", "xpm");
+       stylePB->setIcon(QIcon(toqstr(icon_path)));
+       icon_path = LibFileSearch("images/math", "font", "xpm");
+       fontPB->setIcon(QIcon(toqstr(icon_path)));
+       icon_path = LibFileSearch("images/math", "equation", "xpm");
+       equationPB->setIcon(QIcon(toqstr(icon_path)));
+       icon_path = LibFileSearch("images/math", "frac-square", "xpm");
+       fracPB->setIcon(QIcon(toqstr(icon_path)));
+       icon_path = LibFileSearch("images/math", "sub", "xpm");
+       subscriptPB->setIcon(QIcon(toqstr(icon_path)));
+       icon_path = LibFileSearch("images/math", "super", "xpm");
+       superscriptPB->setIcon(QIcon(toqstr(icon_path)));
+       icon_path = LibFileSearch("images/math", "matrix", "xpm");
+       matrixPB->setIcon(QIcon(toqstr(icon_path)));
+       icon_path = LibFileSearch("images/math", "delim", "xpm");
+       delimitersPB->setIcon(QIcon(toqstr(icon_path)));
+
        // function list
        for (int i = 0; *function_names[i]; ++i) {
                functionsLW->addItem(function_names[i]);
Index: src/frontends/qt4/ui/QMathUi.ui
===================================================================
--- src/frontends/qt4/ui/QMathUi.ui     (revision 13592)
+++ src/frontends/qt4/ui/QMathUi.ui     (working copy)
@@ -18,7 +18,7 @@
   <property name="sizeGripEnabled" >
    <bool>true</bool>
   </property>
-  <widget class="QWidget" name="" >
+  <widget class="QWidget" name="layoutWidget" >
    <property name="geometry" >
     <rect>
      <x>10</x>
@@ -251,7 +251,7 @@
          <string/>
         </property>
         <property name="icon" >
-         <iconset>../lib/images/delim.xpm</iconset>
+         <iconset>../../../../lib/images/math/delim.xpm</iconset>
         </property>
        </widget>
       </item>
@@ -270,7 +270,7 @@
          <string/>
         </property>
         <property name="icon" >
-         <iconset>../lib/images/sub.xpm</iconset>
+         <iconset>../../../../lib/images/math/sub.xpm</iconset>
         </property>
        </widget>
       </item>
@@ -295,7 +295,7 @@
          <string/>
         </property>
         <property name="icon" >
-         <iconset>../lib/images/font.xpm</iconset>
+         <iconset>../../../../lib/images/math/font.xpm</iconset>
         </property>
        </widget>
       </item>
@@ -322,7 +322,7 @@
          <string/>
         </property>
         <property name="icon" >
-         <iconset>../lib/images/equation.xpm</iconset>
+         <iconset>../../../../lib/images/math/equation.xpm</iconset>
         </property>
        </widget>
       </item>
@@ -347,7 +347,7 @@
          <string/>
         </property>
         <property name="icon" >
-         <iconset>../lib/images/space.xpm</iconset>
+         <iconset>../../../../lib/images/math/space.xpm</iconset>
         </property>
        </widget>
       </item>
@@ -366,7 +366,7 @@
          <string/>
         </property>
         <property name="icon" >
-         <iconset>../lib/images/super.xpm</iconset>
+         <iconset>../../../../lib/images/math/super.xpm</iconset>
         </property>
        </widget>
       </item>
@@ -391,7 +391,7 @@
          <string/>
         </property>
         <property name="icon" >
-         <iconset>../lib/images/style.xpm</iconset>
+         <iconset>../../../../lib/images/math/style.xpm</iconset>
         </property>
        </widget>
       </item>
@@ -418,7 +418,7 @@
          <string/>
         </property>
         <property name="icon" >
-         <iconset>../lib/images/frac.xpm</iconset>
+         <iconset>../../../../lib/images/math/frac-square.xpm</iconset>
         </property>
        </widget>
       </item>
@@ -443,7 +443,7 @@
          <string/>
         </property>
         <property name="icon" >
-         <iconset>../lib/images/sqrt.xpm</iconset>
+         <iconset>../../../../lib/images/math/sqrt-square.xpm</iconset>
         </property>
        </widget>
       </item>
@@ -462,7 +462,7 @@
          <string/>
         </property>
         <property name="icon" >
-         <iconset>../lib/images/matrix.xpm</iconset>
+         <iconset>../../../../lib/images/math/matrix.xpm</iconset>
         </property>
        </widget>
       </item>

Reply via email to