]> git.lyx.org Git - features.git/commitdiff
more Alert fixes
authorJohn Levon <levon@movementarian.org>
Sat, 29 Mar 2003 10:55:48 +0000 (10:55 +0000)
committerJohn Levon <levon@movementarian.org>
Sat, 29 Mar 2003 10:55:48 +0000 (10:55 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6628 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/bufferview_funcs.C
src/frontends/controllers/ChangeLog
src/frontends/controllers/helper_funcs.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/input_validators.C
src/insets/ChangeLog
src/insets/insetert.C

index c38255fca4d58791e1619d12de7224e95a6aa10b..2e4d9c7a740f6d85c8ad901e4b50acd50da7c09c 100644 (file)
@@ -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:
index 373004ed0ed11db34ac8409ede1d3b5814ff69a6..cc23921110ae3754a43f6f060daf6ebfe8b707bd 100644 (file)
@@ -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);
 }
 
 
index 617b0fc361d3a8d4473323c0060767c9b50c700a..f6f78f5a4c81b03a8d47d9894cd0cc661ca1c914 100644 (file)
@@ -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
index 34ac0f1207a9a156061d489d7cd1f5c9a26cc61d..235ec3470600a7246f059f33fbb5a541497b4f7f 100644 (file)
@@ -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;
index 65103fcf7850d139e2488b3b47ed5cf8d10263c9..14eed10578d17c00b8b2f8cbd164fbf533ffda1c 100644 (file)
@@ -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()
index 121ad90968f67a1eb2bb7ba73be3e022ed2778af..634f84c72bcd20a352b1e8467beb6059b7b74939 100644 (file)
@@ -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
index 78e2a293f69b4033577e2c5390127a15b9a5dff2..0d62850b38da09da6c0c12f06f8a532d5d80c4f9 100644 (file)
@@ -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
index 453f4e9423a81c84743a48219c1d0c061c0bf8c7..0774d61ee0a0400d61eb5854908f9b6f502d66f8 100644 (file)
@@ -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."));
 }