X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=filebrowser%2Fpath.c;h=66c9ab5a9d4ed9d97a209695e3ef231ae4c18fe3;hb=4eec2ced245a4f86a63ca03781250cc6c82cddf2;hp=edb43c8652a08d13317821a5f6ddc32ff2617167;hpb=e9a0808a5551217eb4fd29d949f3c7672545c168;p=xboard.git diff --git a/filebrowser/path.c b/filebrowser/path.c index edb43c8..66c9ab5 100644 --- a/filebrowser/path.c +++ b/filebrowser/path.c @@ -26,7 +26,7 @@ #include #include /* for qsort */ -#include "../config.h" +#include "config.h" #ifdef SEL_FILE_IGNORE_CASE #include @@ -34,8 +34,8 @@ #include #include -#include "selfile.h" #include "xstat.h" +#include "selfile.h" #include #ifndef MAXPATHLEN @@ -46,14 +46,6 @@ extern uid_t getuid(); #endif /* def HAS_DIRENT_H */ -/* added missing prototypes */ -extern void SFtextChanged(); -extern int SFgetDir(SFDir *); -extern void SFdrawLists(int); -extern void SFdrawList(int, int); -extern void SFclearList(int, int); -extern void SFmotionList(Widget, int, XMotionEvent*); - typedef struct { char *name; char *dir; @@ -190,23 +182,6 @@ SFstrncmp(p, q, n) } #endif /* def SEL_FILE_IGNORE_CASE */ -void -SFsetText(path) - char *path; -{ - XawTextBlock text; - - text.firstPos = 0; - text.length = strlen(path); - text.ptr = path; - text.format = FMT8BIT; - - XawTextReplace(selFileField, 0, strlen(SFtextBuffer), &text); - XawTextSetInsertionPoint(selFileField, strlen(SFtextBuffer)); - - return; -} - static void SFreplaceText(dir, str) SFDir *dir; @@ -730,6 +705,7 @@ 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; @@ -745,7 +721,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