diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-07-29 22:55:33 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-07-29 22:55:33 +0000 |
| commit | a5110a375d35d7212bcf37102b4e63c3865b0940 (patch) | |
| tree | 99071b69c0ebd676112e27e6fe73934f616eb6c0 /src | |
| parent | 1cfc6385dd1def16ce809793ff6358eb69d6f770 (diff) | |
Don't allow paste inside readonly() input widgets.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2552 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Input_.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index 498996fc9..04e456258 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.15 2002/07/23 16:28:19 easysw Exp $" +// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.16 2002/07/29 22:55:33 easysw Exp $" // // Common input widget routines for the Fast Light Tool Kit (FLTK). // @@ -690,6 +690,11 @@ int Fl_Input_::handletext(int event, int X, int Y, int W, int H) { return 1; case FL_PASTE: { + if (readonly()) { + fl_beep(FL_BEEP_ERROR); + return 1; + } + // strip trailing control characters and spaces before pasting: const char* t = Fl::event_text(); const char* e = t+Fl::event_length(); @@ -835,5 +840,5 @@ Fl_Input_::~Fl_Input_() { } // -// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.15 2002/07/23 16:28:19 easysw Exp $". +// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.16 2002/07/29 22:55:33 easysw Exp $". // |
