Author: greg.ercolano
Date: 2010-12-22 12:20:28 -0800 (Wed, 22 Dec 2010)
New Revision: 8106
Log:
Fixes to ensure readonly() widget is not modified by destructive keyboard 
functions.


Modified:
   branches/branch-1.3/src/Fl_Input.cxx

Modified: branches/branch-1.3/src/Fl_Input.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Input.cxx        2010-12-22 17:06:09 UTC (rev 
8105)
+++ branches/branch-1.3/src/Fl_Input.cxx        2010-12-22 20:20:28 UTC (rev 
8106)
@@ -138,6 +138,7 @@
 
 // Toggle insert mode
 int Fl_Input::kf_insert_toggle() {
+  if (readonly()) { fl_beep(); return 1; }
   return 1;                            // \todo: needs insert mode
 }
 
@@ -159,6 +160,7 @@
 
 // Delete to start of line
 int Fl_Input::kf_delete_sol() {
+  if (readonly()) { fl_beep(); return 1; }
   if (mark() != position()) return cut();
   cut(line_start(position()), position());
   return 1;
@@ -275,6 +277,7 @@
 
 // Redo. (currently unimplemented.. toggles undo() instead)
 int Fl_Input::kf_redo() {
+  if (readonly()) { fl_beep(); return 1; }
   return kf_undo();                    // currently we don't support 
multilevel undo
 }
 

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to