+2003-03-29 John Levon <levon@movementarian.org>
+
+ * bufferview_funcs.C: remove pointless Alert
+
2003-03-29 John Levon <levon@movementarian.org>
* BufferView.C:
{
LyXFont font(LyXFont::ALL_IGNORE);
Language const * lang = languages.getLanguage(l);
- if (lang) {
- font.setLanguage(lang);
- toggleAndShow(bv, font);
- } else
- Alert::alert(_("Error! unknown language"),l);
+ if (!lang)
+ return;
+
+ font.setLanguage(lang);
+ toggleAndShow(bv, font);
}
+2003-03-29 John Levon <levon@movementarian.org>
+
+ * helper_funcs.C: Alert cleanup
+
2003-03-29 John Levon <levon@movementarian.org>
* ControlDocument.C: comment out seemingly silly question
if (result.second.find_first_of("#~$% ") == string::npos)
break;
- Alert::alert(_("Filename can't contain any "
- "of these characters:"),
- _("space, '#', '~', '$' or '%'."));
+ Alert::error(_("Invalid filename"),
+ _("Filename can't contain any "
+ "of these characters:\n"
+ "space, '#', '~', '$' or '%'."));
}
return result.second;
if (result.second.find_first_of("#~$% ") == string::npos)
break;
- Alert::alert(_("directory name can't contain any "
- "of these characters:"),
- _("space, '#', '~', '$' or '%'."));
+ Alert::error(_("Invalid filename"),
+ _("Filename can't contain any "
+ "of these characters:\n"
+ "space, '#', '~', '$' or '%'."));
}
return result.second;
+2003-03-29 John Levon <levon@movementarian.org>
+
+ * input_validators.C: remove dead code
+
2003-03-29 John Levon <levon@movementarian.org>
* Alert_pimpl.C: implement information(), warning(), error()
}
-#if 0
-/* I've just moved this code here and written a few comments.
- still to complete it. ARRae 20000518 */
-
-void fl_print_range_filter(FL_OBJECT * ob,
- char const * not_used,
- char const * unused,
- int c)
-{
- /* Started life as changes to PrintApplyCB by Stephan Witt
- (stephan.witt@beusen.de), 19-Jan-99
- User may give a page (range) list */
-
- if (strchr("0123456789", c)) {
- /* Numerals are always valid */
- return FL_VALID;
- } else if (strchr("-,", c)) {
- /* make sure that the character can go there */
- } else if (c == 0) {
- /* final test before handing contents to app
- make sure the last char isn't a "-,"
- That might be acceptable if there was a "to_page"
- entry however if you start making a page range in the "from"
- field you can do it all in the "from" field. That is, a
- range in the "from" field immmediately blanks the "to"
- field. */
- }
- return FL_INVALID|FL_RINGBELL;
-
- /* The code above should do the same sort of checking as the
- code below. */
-
- string pages = subst(fl_get_input(fd_form_print->input_pages), ';',',');
- pages = trim(subst(pages, '+', ','));
-
- while (!pages.empty()) { // a page range was given
- string piece ;
- pages = split (pages, piece, ',') ;
- piece = trim(piece);
- if (!stringOnlyContains (piece, "0123456789-")) {
- Alert::alert(_("ERROR! Unable to print!"),
- _("Check `range of pages'!"));
- return;
- }
- if (piece.find('-') == string::npos) { // not found
- pageflag += lyxrc.print_pagerange_flag + piece + '-' + piece + ' ' ;
- } else if (suffixIs(piece, "-")) { // missing last page
- pageflag += lyxrc.print_pagerange_flag + piece + "1000 ";
- } else if (prefixIs(piece, "-")) { // missing first page
- pageflag += lyxrc.print_pagerange_flag + '1' + piece + ' ' ;
- } else {
- pageflag += lyxrc.print_pagerange_flag + piece + ' ' ;
- }
- }
-}
-#endif
-
#if defined(__cplusplus)
}
#endif
+2003-03-29 John Levon <levon@movementarian.org>
+
+ * insetert.C: Alert cleanup
+
2003-03-29 John Levon <levon@movementarian.org>
* insettabular.C: Alert fix
void InsetERT::setFont(BufferView *, LyXFont const &, bool, bool selectall)
{
+#ifdef WITH_WARNINGS
+#warning FIXME. More UI stupidity...
+#endif
// if selectall is activated then the fontchange was an outside general
// fontchange and this messages is not needed
if (!selectall)
- Alert::alert(_("Impossible operation!"),
- _("Not permitted to change font-types inside ERT-insets!"),
- _("Sorry."));
+ Alert::error(_("Cannot change font"),
+ _("You cannot change font settings inside TeX code."));
}