GNU bug report logs - #8191
Patch to fix bug#8181: 23.2; Dired on Windows 7

Previous Next

Package: emacs;

Reported by: Ben Key <bkey76 <at> gmail.com>

Date: Mon, 7 Mar 2011 06:54:01 UTC

Severity: normal

Merged with 8181, 8741

Found in versions 23.2, 23.2.50

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ben Key <bkey76 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org, Juanma Barranquero <lekktu <at> gmail.com>
Subject: Patch to fix bug#8181: 23.2; Dired on Windows 7
Date: Sun, 6 Mar 2011 22:15:51 -0600
[Message part 1 (text/plain, inline)]
Hello,

The attached patch fixes bug #8181: 23.2; Dired on Windows 7.  The patch is
for the Emacs trunk.  I can provide a patch for the Emacs 23 branch if it is
decided that this bug is important enough to go into Emacs 23.

This patch has been tested on Windows 7 32-bit, Windows 7 64-bit, and
Windows XP 32-bit.

This patch fixes three problems.

   1. The code that was attempting to set the text of the file name text
   field when processing the CDN_INITDONE WM_NOTIFY message does not work.
   This is because the code that processes the lpstrFile member of the
   OPENFILENAME structure to set the initial value of the window is called
   after the CDN_INITDONE WM_NOTIFY message is processed.  The correct way
   to set the text of the file name text field to "Current Directory" is to
   set the initial value of the lpstrFile member of the OPENFILENAME
   structure to "Current Directory" in the only_dir_p case if it does not
   already have another value.
   2. The attempt to find the window handle of the file name text field
   failed, at least on Windows XP and Windows 7.  By using Microsoft Spy++ I
   was able to discover the correct way to obtain this Window handle.  I
   modified the code in file_dialog_callback that initializes the edit_control
   using this information.
   3. Disabling the file name text field during dialog box initialization
   has undesirable side effects because this is the window that has focus when
   the open file dialog box is first opened by default.  The end result of
   disabling a window that would otherwise have focus is that focus lands in no
   man's land and the user is not able to navigate through the dialog box using
   the tab key.  Instead the system plays the system default error sound every
   time the tab key was pressed.  Now that the window is actually being
   disabled as a result of change 2, it is necessary to take steps to prevent
   this from happening.  My solution was to set focus to the list box
if the file
   name text field is disabled during dialog box initialization.  This part
   could use a little more work.


If it matters, I have already signed the appropriate copyright assignment
papers for Emacs.
[Message part 2 (text/html, inline)]
[emacs-bug-8181.patch (application/octet-stream, attachment)]

This bug report was last modified 13 years and 360 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.