Fix duplicate file panel display on Haiku

* lisp/term/haiku-win.el (x-file-dialog): Fix up prompt to look
better.

* src/haiku_support.cc (be_popup_file_dialog): Remove duplicate
call to `Show'.
This commit is contained in:
Po Lu 2022-01-04 01:30:27 +00:00
parent 5c63786cb9
commit 7eb86a1788
2 changed files with 4 additions and 2 deletions

View file

@ -114,7 +114,10 @@ If TYPE is nil, return \"text/plain\"."
(defun x-file-dialog (prompt dir default_filename mustmatch only_dir_p)
"SKIP: real doc in xfns.c."
(if (eq (framep-on-display (selected-frame)) 'haiku)
(haiku-read-file-name prompt (selected-frame)
(haiku-read-file-name (if (not (string-suffix-p ": " prompt))
prompt
(substring prompt 0 (- (length prompt) 2)))
(selected-frame)
(or dir (and default_filename
(file-name-directory default_filename)))
mustmatch only_dir_p

View file

@ -2682,7 +2682,6 @@ be_popup_file_dialog (int open_p, const char *default_dir, int must_match_p, int
be_popup_file_dialog_safe_set_target (panel, w);
panel->Show ();
panel->Window ()->Show ();
unblock_input_function ();
void *buf = alloca (200);