deactivated new languages for the moment...
[xboard.git] / filebrowser / draw.c
index 46ed663..048fa85 100644 (file)
@@ -25,8 +25,8 @@
  */
 
 #include <stdio.h>
-#include "selfile.h"
 #include "xstat.h"
+#include "selfile.h"
 #include <X11/StringDefs.h>
 #include <X11/Xaw/Scrollbar.h>
 #include <X11/Xaw/Cardinals.h>
 #endif
 #define ABS(x) (((x) < 0) ? (-(x)) : (x))
 
-/* added missing prototypes */
-extern char SFstatChar(struct stat*);
-extern int SFchdir(char *);
-void SFvSliderMovedCallback(Widget, int, int);
-
 typedef struct {
        char *fontname;
 } TextData, *textPtr;
@@ -655,7 +650,10 @@ SFvSliderMovedCallback(w, n, new)
 
        dir = &(SFdirs[SFdirPtr + n]);
 
+
        old = dir->vOrigin;
+       if(new == -1) new = old + 1; else if(new == -2) new = old - 1; // [HGM] indicates scroll direction on mousewheel event
+       if(new < 0 || new > dir->nEntries - SFlistSize) return;
        dir->vOrigin = new;
 
        if (old == new) {