mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-10 18:58:10 +00:00
more Alert fixes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6628 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
06242eb145
commit
31dabbd890
@ -1,3 +1,7 @@
|
||||
2003-03-29 John Levon <levon@movementarian.org>
|
||||
|
||||
* bufferview_funcs.C: remove pointless Alert
|
||||
|
||||
2003-03-29 John Levon <levon@movementarian.org>
|
||||
|
||||
* BufferView.C:
|
||||
|
@ -216,11 +216,11 @@ void lang(BufferView * bv, string const & l)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
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
|
||||
|
@ -57,9 +57,10 @@ string const browseFile(string const & filename,
|
||||
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;
|
||||
@ -111,9 +112,10 @@ string const browseDir(string const & pathname,
|
||||
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;
|
||||
|
@ -1,3 +1,7 @@
|
||||
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()
|
||||
|
@ -80,63 +80,6 @@ int fl_lowercase_filter(FL_OBJECT * /*ob*/,
|
||||
}
|
||||
|
||||
|
||||
#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
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-03-29 John Levon <levon@movementarian.org>
|
||||
|
||||
* insetert.C: Alert cleanup
|
||||
|
||||
2003-03-29 John Levon <levon@movementarian.org>
|
||||
|
||||
* insettabular.C: Alert fix
|
||||
|
@ -243,12 +243,14 @@ bool InsetERT::insertInset(BufferView *, Inset *)
|
||||
|
||||
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."));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user