summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Text_Display.cxx21
-rw-r--r--src/filename_list.cxx10
2 files changed, 25 insertions, 6 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx
index 5afe7f977..d7c9447dd 100644
--- a/src/Fl_Text_Display.cxx
+++ b/src/Fl_Text_Display.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Text_Display.cxx,v 1.12.2.57 2004/09/07 20:59:17 easysw Exp $"
+// "$Id: Fl_Text_Display.cxx,v 1.12.2.58 2004/11/20 03:44:17 easysw Exp $"
//
// Copyright 2001-2004 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
@@ -3124,6 +3124,23 @@ int Fl_Text_Display::handle(int event) {
if (buffer()->selected()) redraw();
return 1;
+
+ case FL_KEYBOARD:
+ // Copy?
+ if ((Fl::event_state()&(FL_CTRL|FL_COMMAND)) && Fl::event_key()=='c') {
+ if (!buffer()->selected()) return 1;
+ const char *copy = buffer()->selection_text();
+ if (*copy) Fl::copy(copy, strlen(copy), 1);
+ free((void*)copy);
+ return 1;
+ }
+
+ // Select all ?
+ if ((Fl::event_state()&(FL_CTRL|FL_COMMAND)) && Fl::event_key()=='a') {
+ buffer()->select(0,buffer()->length());
+ return 1;
+ }
+ break;
}
return 0;
@@ -3131,5 +3148,5 @@ int Fl_Text_Display::handle(int event) {
//
-// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.57 2004/09/07 20:59:17 easysw Exp $".
+// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.58 2004/11/20 03:44:17 easysw Exp $".
//
diff --git a/src/filename_list.cxx b/src/filename_list.cxx
index baced1b66..396663ec4 100644
--- a/src/filename_list.cxx
+++ b/src/filename_list.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: filename_list.cxx,v 1.10.2.11.2.7 2004/04/11 04:38:59 easysw Exp $"
+// "$Id: filename_list.cxx,v 1.10.2.11.2.8 2004/11/20 03:44:18 easysw Exp $"
//
// Filename list routines for the Fast Light Tool Kit (FLTK).
//
@@ -49,7 +49,9 @@ int fl_casealphasort(struct dirent **a, struct dirent **b) {
int fl_filename_list(const char *d, dirent ***list,
Fl_File_Sort_F *sort) {
-#if defined(__hpux) || defined(__CYGWIN__)
+#ifndef HAVE_SCANDIR
+ return scandir(d, list, 0, sort);
+#elif defined(__hpux) || defined(__CYGWIN__)
// HP-UX, Cygwin define the comparison function like this:
return scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort);
#elif defined(__osf__)
@@ -58,7 +60,7 @@ int fl_filename_list(const char *d, dirent ***list,
#elif defined(_AIX)
// AIX is almost standard...
return scandir(d, list, 0, (int(*)(void*, void*))sort);
-#elif HAVE_SCANDIR && !defined(__sgi)
+#elif !defined(__sgi)
// The vast majority of UNIX systems want the sort function to have this
// prototype, most likely so that it can be passed to qsort without any
// changes:
@@ -71,5 +73,5 @@ int fl_filename_list(const char *d, dirent ***list,
}
//
-// End of "$Id: filename_list.cxx,v 1.10.2.11.2.7 2004/04/11 04:38:59 easysw Exp $".
+// End of "$Id: filename_list.cxx,v 1.10.2.11.2.8 2004/11/20 03:44:18 easysw Exp $".
//