i18n and mathed fixes

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1300 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2001-01-03 17:43:29 +00:00
parent 16a5be3ecc
commit 1e6f221aa5
7 changed files with 56 additions and 23 deletions

View File

@ -1,3 +1,21 @@
2001-01-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/mathed/math_panel.C (deco_cb): check the decoration index is
valid.
* src/frontends/xforms/FormPreferences.C (feedback): apply
formatting to the translated string, not to the original one.
(printWarning): ditto.
* src/gettext.C (_): translate empty string with empty string.
* src/frontends/xforms/FormCopyright.C (build): use _() instead of
N_().
* NEWS: small update
* UPGRADING: mention that tabular format has been changed.
2001-01-03 Juergen Vigna <jug@sad.it>
* src/insets/insettabular.C (InsetButtonPress): look for button==2

9
NEWS
View File

@ -2,9 +2,8 @@ What's new in LyX version 1.1.6?
--------------------------------
As with all of the 1.1.x versions of LyX, this release contains a lot
of new code: in particular, half of the changes described in the
ChangeLog (which dates back to the 1.1.0 release) describe changes in
LyX 1.1.6!
of new code: in particular, more than half of the changes described in
the ChangeLog (which dates back to the 1.1.0 release) concern LyX 1.1.6!
Besides the usual under-the-hood changes, LyX 1.1.6 has many
new user-visible features. The main visible feature is that the
@ -18,7 +17,7 @@ from the older development version:
have been overhauled.
- LyX now has a Preference popup where you can change most of your
lyxrc settings [Allan, details?]
lyxrc settings.
- the menus can now be defined in a text file, and they automatically
display the keyboard bindings associated with commands.
@ -80,7 +79,7 @@ And finally, there have been a lot of smaller changes, which are
mentioned here for your information
- the menu entry File->New does not prompt for a file name by default
(this can be changed in lyxrc).
(this can be changed in preferences).
- new -geometry command line option, which replaces the old -width,
-height, etc.

View File

@ -28,4 +28,7 @@ Rhandol. COLD can be found at:
or at one of LyX archive mirror sites listed in README.
Documents saved with LyX version 1.1.6 can be read correctly by
LyX v0.12.0 and v1.0.x, except for new and a couple of changed features.
LyX v0.12.0 and v1.0.x, except for new and a couple of changed
features. A notable exception is the tabular format, which has changed
in a major way in 1.1.6. No older versions of LyX are able to read
this new inset.

View File

@ -48,17 +48,17 @@ void FormCopyright::build()
minw_ = form()->w;
minh_ = form()->h;
string str = N_("LyX is Copyright (C) 1995 by Matthias Ettrich, 1995-2000 LyX Team");
string str = _("LyX is Copyright (C) 1995 by Matthias Ettrich, 1995-2000 LyX Team");
str = formatted(str, dialog_->text_copyright->w-10,
FL_NORMAL_SIZE, FL_NORMAL_STYLE);
fl_set_object_label(dialog_->text_copyright, str.c_str());
str = N_("This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.");
str = _("This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.");
str = formatted(str, dialog_->text_licence->w-10,
FL_NORMAL_SIZE, FL_NORMAL_STYLE);
fl_set_object_label(dialog_->text_licence, str.c_str());
str = N_("LyX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.");
str = _("LyX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.");
str = formatted(str, dialog_->text_disclaimer->w-10,
FL_NORMAL_SIZE, FL_NORMAL_STYLE);
fl_set_object_label(dialog_->text_disclaimer, str.c_str());

View File

@ -342,10 +342,10 @@ void FormPreferences::feedback(FL_OBJECT * ob)
str = spellchecker_.feedback(ob);
}
str = formatted(str, dialog_->text_warning->w-10,
str = formatted(_(str), dialog_->text_warning->w-10,
FL_SMALL_SIZE, FL_NORMAL_STYLE);
fl_set_object_label(dialog_->text_warning, _(str.c_str()));
fl_set_object_label(dialog_->text_warning, str.c_str());
fl_set_object_lsize(dialog_->text_warning, FL_SMALL_SIZE);
}
@ -3005,11 +3005,11 @@ void FormPreferences::printWarning(string const & warning)
{
warningPosted = true;
string str = N_("WARNING!") + string(" ") + warning;
string str = _("WARNING!") + string(" ") + warning;
str = formatted(str, dialog_->text_warning->w-10,
FL_SMALL_SIZE, FL_NORMAL_STYLE);
fl_set_object_label(dialog_->text_warning, _(str.c_str()));
fl_set_object_label(dialog_->text_warning, str.c_str());
fl_set_object_lsize(dialog_->text_warning, FL_SMALL_SIZE);
}

View File

@ -7,12 +7,16 @@
char const * _(char const * str)
{
if (str && str[0])
return gettext(str);
else
return "";
}
string const _(string const & str)
{
if (!str.empty()) {
int const s = str.length();
char * tmp = new char[s + 1];
str.copy(tmp, s);
@ -20,6 +24,9 @@ string const _(string const & str)
string ret(gettext(tmp));
delete [] tmp;
return ret;
}
else
return string();
}
#endif

View File

@ -242,9 +242,15 @@ void deco_cb(FL_OBJECT *, long data)
case MM_OK:
{
int i = fl_get_bmtable(fd_deco->menu);
// ideally the callback should not be called if the index is
// greater than the maxitem of the bmtable, but I do not know
// how to enforce that (JMarc)
if (i <= sizeof(deco_code)/sizeof(deco_code[0])) {
lyxfunc->Dispatch(LFUN_INSERT_MATH, deco_code[i]);
if (data == MM_APPLY) break;
}
else break;
}
case MM_CLOSE: fl_hide_form(fd_deco->deco); break;
}
}