]> git.lyx.org Git - features.git/commitdiff
Rename sqrt icon and a few small fixes
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 1 Dec 1999 14:41:31 +0000 (14:41 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 1 Dec 1999 14:41:31 +0000 (14:41 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@348 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
images/sqrt.xpm
src/LyXAction.C
src/bmtable.C
src/insets/figinset.C
src/lyx_cb.C
src/lyxfunc.C
src/lyxrc.C
src/mathed/math_panel.C

index 036d0d2f0b22a4d8c972f8f1cdca1ecf08654d95..2c23cd21a896dcb8fe68c8493d32726436f0f0a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+1999-12-01  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * images/sqrt.xpm: change name of the sqrt icon to sqrt_xpm.
+       * src/mathed/math_panel.C (mathed_get_pixmap_from_icon): ditto
+       (create_math_panel): ditto
+
+       * src/lyxfunc.C (getStatus): re-activate the code which gets
+       current font and cursor; add test for export to html.
+
+       * src/lyxrc.C (read): remove unreachable break statements; add a
+       few "using".
+
+       * src/bmtable.C (fl_set_bmtable_data): add a const_cast.
+
 1999-12-01  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
        * src/mathed/formula.C (LocalDispatch): fix small whitspace bug
index a1dda93f723d50196b1e8afe57262f9ec8d16eac..05d455035720e4e82ee9511d8f6ddbbccb3fd547 100644 (file)
@@ -1,5 +1,5 @@
 /* XPM */
-static char const * sqrt[] = {
+static char const * sqrt_xpm[] = {
 /* width height num_colors chars_per_pixel */
 "    20    20        3            1",
 /* colors */
index 78822779fa31b63d6d2731101d3e7116a70e1cc8..accf12f94a82bc3c7679f58555749f1bc81612a4 100644 (file)
@@ -607,7 +607,9 @@ int LyXAction::LookupFunc(string const & func) const
 }
 
 
+#ifdef WITH_WARNINGS
 #warning Not working as it should.
+#endif
 int LyXAction::getApproxFunc(string const & func) const
        // This func should perhaps also be able to return a list of all
        // actions that has func as a prefix. That should actually be quite
index 6b218f21e15577e1b872ba58fc9c6f549ed974ef..21da9d6dba2b75d1c51bba080345708cbe7a2f03 100644 (file)
@@ -239,7 +239,7 @@ void fl_set_bmtable_data(FL_OBJECT * ob, int nx, int ny, int bw, int bh,
      sp->maxi = sp->nx * sp->ny;
      sp->bw = bw;
      sp->bh = bh;
-     sp->bdata = bdata;
+     sp->bdata = const_cast<unsigned char *>(bdata);
    }
 }
 
index 4d794cecac4b81663c7855d68436fc78602bb4a1..411f7c12dd62e143bfc23e7bf6d76776e6aef77e 100644 (file)
@@ -1702,7 +1702,9 @@ void InsetFig::Recompute()
 
 void InsetFig::GetPSSizes()
 {
+#ifdef WITH_WARNINGS
 #warning rewrite this method to use ifstream
+#endif
        /* get %%BoundingBox: from postscript file */
        char * p = 0;
        
index dea5453b867fd262f9707108dfdb54401686424a..17dc46664a409d315259ec797e9b0fc23c3d19de 100644 (file)
@@ -1113,7 +1113,9 @@ void InsertAsciiFile(string const & f, bool asParagraph)
        tmppar->readSimpleWholeFile(myfile);
        
        // set the end of the string
+#ifdef WITH_WARNINGS
 #warning why do we do this?
+#endif
        // I don't think this is needed. Actually it might be plain wrong.
        tmppar->InsertChar(tmppar->text.size() - 1, '\0');
 
index c923e5d3e6787ab257ae263c2012f67b895a1179..86d7345070093297a90497ded4b4dc17a61dda51 100644 (file)
@@ -374,6 +374,8 @@ LyXFunc::func_status LyXFunc::getStatus(int ac) const
           case LFUN_EXPORT:
                   if (argument == "dvi" || argument == "postscript")
                           disable = noLaTeX;
+                 if (argument == "html")
+                         disable = lyxrc->html_command == "none";
                   break;
          case LFUN_UNDO:
                  disable = buf->undostack.empty();
@@ -388,8 +390,7 @@ LyXFunc::func_status LyXFunc::getStatus(int ac) const
                  disable = lyxrc->chktex_command == "none";
                  break;
          case LFUN_LAYOUT_TABLE:
-#warning change this and font code once it is possible to get to cursor
-                 //              disable = ! buf->text->cursor.par->table;
+                 disable = ! buf->text->cursor.par->table;
                  break;
          default:
                   break;
@@ -398,8 +399,7 @@ LyXFunc::func_status LyXFunc::getStatus(int ac) const
                 flag |= LyXFunc::Disabled;
 
        func_status box = LyXFunc::ToggleOff;
-       //      LyXFont font = buf->text->real_current_font;
-       LyXFont font;
+       LyXFont font = buf->text->real_current_font;
        switch (action) {
        case LFUN_EMPH:
                if (font.emph() == LyXFont::ON)
index a60c9cd2bc8699c8c788f472c6d03303c8228abe..a4d72f1942afa47c0ff469e74becb876b41314f5 100644 (file)
@@ -16,6 +16,9 @@
 
 #include <fstream>
 #include <iomanip>
+using std::ofstream;
+using std::cout;
+using std::ios;
 
 #include "debug.h"
 
@@ -340,9 +343,9 @@ int LyXRC::read(string const & filename)
                switch(le) {
                case LyXLex::LEX_UNDEF:
                        lexrc.printError("Unknown tag `$$Token'");
-                       continue; break;
+                       continue; 
                case LyXLex::LEX_FEOF:
-                       continue; break;
+                       continue; 
                default: break;
                }
                switch (static_cast<LyXRCTags>(le)) {
index cedcde2c4b639b5bdefeec946578be06da26ed24..b74415f614f644a5bdb3c3a47618949bc68d8f3b 100644 (file)
@@ -272,7 +272,7 @@ char const ** mathed_get_pixmap_from_icon(int d)
 {
    switch (d) {
     case MM_FRAC: return frac;
-    case MM_SQRT: return sqrt;
+    case MM_SQRT: return sqrt_xpm;
     case MM_DELIM: return delim;
     case MM_MATRIX: return matrix;
     case MM_EQU: return equation; 
@@ -298,7 +298,7 @@ FD_panel * create_math_panel( )
                       delim_bits);
    fl_set_bmtable_maxitems(fd_delim->menu, 23);
    
-   fl_set_pixmap_data(fd_panel->sqrt, const_cast<char**>(sqrt));
+   fl_set_pixmap_data(fd_panel->sqrt, const_cast<char**>(sqrt_xpm));
    fl_set_pixmap_data(fd_panel->frac, const_cast<char**>(frac));
    fl_set_pixmap_data(fd_panel->delim, const_cast<char**>(delim));
    fl_set_pixmap_data(fd_panel->deco, const_cast<char**>(deco));