From: Jean-Marc Lasgouttes Date: Wed, 1 Dec 1999 14:41:31 +0000 (+0000) Subject: Rename sqrt icon and a few small fixes X-Git-Tag: 1.6.10~22490 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ec7a8ffeba0ac2b92f5e6be52dfddfafced2a999;p=features.git Rename sqrt icon and a few small fixes git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@348 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/ChangeLog b/ChangeLog index 036d0d2f0b..2c23cd21a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +1999-12-01 Jean-Marc Lasgouttes + + * 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 * src/mathed/formula.C (LocalDispatch): fix small whitspace bug diff --git a/images/sqrt.xpm b/images/sqrt.xpm index a1dda93f72..05d4550357 100644 --- a/images/sqrt.xpm +++ b/images/sqrt.xpm @@ -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 */ diff --git a/src/LyXAction.C b/src/LyXAction.C index 78822779fa..accf12f94a 100644 --- a/src/LyXAction.C +++ b/src/LyXAction.C @@ -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 diff --git a/src/bmtable.C b/src/bmtable.C index 6b218f21e1..21da9d6dba 100644 --- a/src/bmtable.C +++ b/src/bmtable.C @@ -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(bdata); } } diff --git a/src/insets/figinset.C b/src/insets/figinset.C index 4d794cecac..411f7c12dd 100644 --- a/src/insets/figinset.C +++ b/src/insets/figinset.C @@ -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; diff --git a/src/lyx_cb.C b/src/lyx_cb.C index dea5453b86..17dc46664a 100644 --- a/src/lyx_cb.C +++ b/src/lyx_cb.C @@ -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'); diff --git a/src/lyxfunc.C b/src/lyxfunc.C index c923e5d3e6..86d7345070 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -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) diff --git a/src/lyxrc.C b/src/lyxrc.C index a60c9cd2bc..a4d72f1942 100644 --- a/src/lyxrc.C +++ b/src/lyxrc.C @@ -16,6 +16,9 @@ #include #include +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(le)) { diff --git a/src/mathed/math_panel.C b/src/mathed/math_panel.C index cedcde2c4b..b74415f614 100644 --- a/src/mathed/math_panel.C +++ b/src/mathed/math_panel.C @@ -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(sqrt)); + fl_set_pixmap_data(fd_panel->sqrt, const_cast(sqrt_xpm)); fl_set_pixmap_data(fd_panel->frac, const_cast(frac)); fl_set_pixmap_data(fd_panel->delim, const_cast(delim)); fl_set_pixmap_data(fd_panel->deco, const_cast(deco));