]> git.lyx.org Git - features.git/commitdiff
Look for mathed xpms. Doesn't do anything yet due to lack of workable XPMs
authorJohn Levon <levon@movementarian.org>
Thu, 29 Aug 2002 06:00:29 +0000 (06:00 +0000)
committerJohn Levon <levon@movementarian.org>
Thu, 29 Aug 2002 06:00:29 +0000 (06:00 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5152 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/TODO
src/frontends/qt2/Toolbar_pimpl.C

index a97e3f2c4751b1b3e9d1bf7f38ec30d3453ebb4c..b697fff57958074f620045de01db1d378f96e5ba 100644 (file)
@@ -1,3 +1,8 @@
+2002-08-29  John Levon  <levon@movementarian.org>
+
+       * Toolbar_pimpl.C: math xpm handling in preparation
+       for some fixed XPMs
 2002-08-29  John Levon  <levon@movementarian.org>
 
        * QCommandBuffer.h:
index 10a84c3f83188f8409285aca05983d4ce119c543..ae46ec8fbd95a195d16feac69b82cf635ebe4ad5 100644 (file)
@@ -19,7 +19,7 @@ QAbout
 
 QCommandBuffer
 
-       - finish off, use listview etc.
+       - finish off
  
 QContentPane 
 
@@ -79,4 +79,4 @@ QtView
  
 Toolbar_pimpl
 
-       - mathed symbols (*) 
+       - get some decent mathed XPMs
index b7e824fb435eaac30b93894302633d16670c5ea5..062c24d7123f6bf0f2e63df0b7bca0273105dc5a 100644 (file)
@@ -44,13 +44,17 @@ QPixmap getIconPixmap(int action)
 {
        FuncRequest f = lyxaction.retrieveActionArg(action);
  
-       string const name = lyxaction.getActionName(f.action);
        string xpm_name;
 
-       if (!f.argument.empty())
-               xpm_name = subst(name + ' ' + f.argument, ' ','_');
-       else 
-               xpm_name = name;
+       if (f.action == LFUN_INSERT_MATH && !f.argument.empty()) {
+               xpm_name = "math/" + subst(f.argument, ' ', '_');
+       } else {
+               string const name = lyxaction.getActionName(f.action);
+               if (!f.argument.empty())
+                       xpm_name = subst(name + ' ' + f.argument, ' ','_');
+               else 
+                       xpm_name = name;
+       }
 
        string fullname = LibFileSearch("images", xpm_name, "xpm");
 
@@ -60,18 +64,6 @@ QPixmap getIconPixmap(int action)
                return QPixmap(fullname.c_str());
        }
 
-       if (f.action == LFUN_INSERT_MATH && !f.argument.empty()) {
-#if 0 // FIXME: GUII
-               char const ** pixmap =
-                       get_pixmap_from_symbol(arg.c_str(), 30, 30);
-               if (pixmap) {
-                       lyxerr[Debug::GUI] << "Using mathed-provided icon"
-                                          << endl;
-                       return QPixmap(pixmap);
-               }
-#endif
-       }
-       
        lyxerr << "Unable to find icon `" << xpm_name << "'" << endl;
        fullname = LibFileSearch("images", "unknown", "xpm");
        if (!fullname.empty()) {