X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=filebrowser%2Fpath.c;h=a44a16677c6d68ee023f46fa332a660dae82aedb;hb=20e3f2756231ecf4af48cfd63e04e1932b2aaacc;hp=5aac90c56ef33edbdc08fb1da9febe3ed664e407;hpb=b4c2ef53cf5a608a9488ed5cf53da908e9553d21;p=xboard.git diff --git a/filebrowser/path.c b/filebrowser/path.c index 5aac90c..a44a166 100644 --- a/filebrowser/path.c +++ b/filebrowser/path.c @@ -77,6 +77,8 @@ static SFLogin *SFlogins; static int SFtwiddle = 0; +void SFsetText(char *path); + int SFchdir(path) char *path; @@ -713,6 +715,10 @@ SFbuttonPressList(w, n, event) int n; XButtonPressedEvent *event; { + int dir = 0; + if(event->button == Button4) dir = -2; // kludge to indicate relative motion + if(event->button == Button5) dir = -1; + if(dir) SFvSliderMovedCallback(w, n, dir); else SFbuttonPressed = 1; } @@ -724,7 +730,9 @@ SFbuttonReleaseList(w, n, event) XButtonReleasedEvent *event; { SFDir *dir; + static int lastClick; + if(event->button == Button4 || event->button == Button5) return; // [HGM] mouse wheel does not select SFbuttonPressed = 0; if (SFcurrentInvert[n] != -1) { @@ -738,7 +746,9 @@ SFbuttonReleaseList(w, n, event) dir->entries[dir->vOrigin + SFcurrentInvert[n]].shown ); SFmotionList(w, n, (XMotionEvent *) event); + if(lastClick == 256*n + SFcurrentInvert[n]) SFstatus = SEL_FILE_OK; // [HGM] double click implies OK } + lastClick = 256*n + SFcurrentInvert[n]; } static int