]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/input_validators.C
Yet more dialog tweaking from Rob.
[lyx.git] / src / frontends / xforms / input_validators.C
index f22740e67e859b685381454f0f939f129fdc5a67..3cb159ba213457fd7caefa6b2ba382b44d08187e 100644 (file)
@@ -5,6 +5,11 @@
  */
 
 #include <config.h>
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
 #include FORMS_H_LOCATION
 #include "support/lstrings.h"
 #include "input_validators.h"
@@ -102,7 +107,7 @@ void fl_print_range_filter(FL_OBJECT * ob,
                   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" 
+                  range in the "from" field immmediately blanks the "to"
                   field. */
        }
        return FL_INVALID|FL_RINGBELL;
@@ -111,15 +116,14 @@ void fl_print_range_filter(FL_OBJECT * ob,
           code below. */
 
        string pages = subst(fl_get_input(fd_form_print->input_pages), ';',',');
-       pages = subst(pages, '+',',');
-       pages = frontStrip(strip(pages)) ;
+       pages = trim(subst(pages, '+', ','));
+
        while (!pages.empty()) { // a page range was given
                string piece ;
                pages = split (pages, piece, ',') ;
-               piece = strip(piece) ;
-               piece = frontStrip(piece) ;
+               piece = trim(piece);
                if (!stringOnlyContains (piece, "0123456789-")) {
-                       WriteAlert(_("ERROR!  Unable to print!"),
+                       Alert::alert(_("ERROR!  Unable to print!"),
                                   _("Check 'range of pages'!"));
                        return;
                }
@@ -134,7 +138,7 @@ void fl_print_range_filter(FL_OBJECT * ob,
                }
        }
 }
-#endif 
+#endif
 
 #if defined(__cplusplus)
 }