]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix duplicate file panel display on Haiku
authorPo Lu <luangruo@yahoo.com>
Tue, 4 Jan 2022 01:30:27 +0000 (01:30 +0000)
committerPo Lu <luangruo@yahoo.com>
Tue, 4 Jan 2022 01:30:27 +0000 (01:30 +0000)
* 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'.

lisp/term/haiku-win.el
src/haiku_support.cc

index c219ab2944f8b8920ad0e15b728411cc363a57cc..f3c94db6a367a68a7396581c74cf68e719ccd1af 100644 (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
index 04470a3b96efa333630c69c44aa9863f24514cf9..74e9765903e1a7e39c35e0d5f5857bb5d7f1cf82 100644 (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);