From e059c633b01937f450ff9fa873cfc6b773aa74cc Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 9 May 2000 16:18:31 +0000 Subject: [PATCH] Hopefully fix the problem with stateText() in lyxfont.C git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@727 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 15 +++++++++++++++ src/Bullet.C | 2 +- src/Bullet.h | 2 +- src/lyxfont.C | 6 +----- src/text.C | 9 --------- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 58c30c65fa..214b871e26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2000-05-09 Jean-Marc Lasgouttes + + * src/lyx_main.C (LyX): adapted the code for default bindings. + + * src/lyxrc.C (defaultKeyBinfings): moved to kbmap.C + + * src/kbmap.C (defaultBindings): new method. Performs the default + bindings for basic functionality. + + * src/lyxfont.C (stateText): use a saner method to determine + whether the font is "default". Seems to fix the crash with DEC + cxx. + + * src/Bullet.[Ch] (Bullet): remove const on parameters. + 2000-05-08 Juergen Vigna * src/insets/insettabular.C (InsetButtonRelease): Now opens the diff --git a/src/Bullet.C b/src/Bullet.C index c466bd75d3..07665ea046 100644 --- a/src/Bullet.C +++ b/src/Bullet.C @@ -34,7 +34,7 @@ Bullet const ITEMIZE_DEFAULTS[4] = { Bullet( 0, 8 ),//"\\(\\bullet\\)" // and wasysym when that panel is created -Bullet::Bullet(const int f, const int c, const int s) +Bullet::Bullet(int f, int c, int s) : font(f), character(c), size(s), user_text(0) { if (f < MIN || f >= FONTMAX) { diff --git a/src/Bullet.h b/src/Bullet.h index 142de8bd9b..c4c8203f8b 100644 --- a/src/Bullet.h +++ b/src/Bullet.h @@ -27,7 +27,7 @@ class Bullet { public: /// - Bullet(const int f = -1, const int c = -1, const int s = -1); + Bullet(int f = -1, int c = -1, int s = -1); /// explicit Bullet(string const &); diff --git a/src/lyxfont.C b/src/lyxfont.C index 1fdc3a5185..82d4062bb8 100644 --- a/src/lyxfont.C +++ b/src/lyxfont.C @@ -408,11 +408,7 @@ string LyXFont::stateText() const ost << _("Noun ") << _(GUIMiscNames[noun()]) << ", "; if (latex() != INHERIT) ost << _("Latex ") << _(GUIMiscNames[latex()]) << ", "; - //if (buf.empty()) - // ost << _("Default"); - unsigned int opos = ost.tellp(); - //lyxerr << "Opos: " << opos << endl; - if (opos == 0 || opos == -1) + if (bits == inherit) ost << _("Default") << ", "; ost << _("Language: ") << _(language()->display.c_str()); #ifdef HAVE_SSTREAM diff --git a/src/text.C b/src/text.C index a6a61adead..aa747375da 100644 --- a/src/text.C +++ b/src/text.C @@ -463,15 +463,6 @@ void LyXText::draw(Row const * row, switch (c) { case LyXParagraph::META_MARGIN: fs = "margin"; -#ifdef WITH_WARNINGS -#warning I think we do not need that '!' (JMarc) -#endif -#if 0 - // Draw a sign at the left margin! - owner_->painter() - .text((LYX_PAPER_MARGIN - lyxfont::width('!', font))/2, - offset + row->baseline, "!", 1, font); -#endif break; case LyXParagraph::META_FIG: fs = "fig";