Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#909 ESC to close File Compare - not Folder

open
Kimmo Varis
Usability (267)
7
2007-11-23
2007-10-26
alan
No

By clicking on a Folder Difference item a File Compare window is open. This File Compare is easily closed, and if closure was a user accident it just needs another click on the Folder Difference item to again File Compare.

Accidental closure of Folder Compare is an absolute disaster. After waiting half an hour whilst C:\ is compared with the backup partition image taken last week, I then trawl through several hundred items, hiding most, but many remain for scrutiny to decide if I want to preserve in this week's backup image, or whether to first delete. Scrutiny involves File Compare, and closing the File Comparison by clicking top right corner is an immediate wipe-out - it would be so nice if the "active" window had the top right corner, and did not have its close button buried inside the outer window frame and "greyed out" (present and usable, but not very noticeable). After a wipe-out I then have another half hour wait and then do it all over again.

I have now trained myself to use ESC to close the File Compare Window, BUT sometimes I have an accident and ESC closes the Folder Comparison and I have to start all over again.

It would be very nice if ESC, or Ctrl-W, or ANY hot key combination could be used to Close a File Compare window, but to have no effect on the Folder Compare Window.

Alan

Discussion

  • alan
    alan
    2007-10-27

    Logged In: YES
    user_id=1922649
    Originator: YES

    p.s. Edit > Options > General has an option "Close Windows with ESC". My needs would be met with an extra option "Close FILE Compare Window with ESC".

     
  • Kimmo Varis
    Kimmo Varis
    2007-11-23

    Logged In: YES
    user_id=631874
    Originator: NO

    This is a very good description of the problem. I've realized the problem, and there are some earlier discussions about it. Unfortunately we haven't yet figured out any really working solutions.

    As I've mentioned lots and lots of times, I don't really want any more options for ESC-key handling. It is getting ridiculous - it is one key in keyboard, it can't be different for everybody and in every situation.

    WinMerge should be able to determine when to ask about closing - without bothering user asking every time.

    I've no good ideas yet. One idea idea I've been playing with is to ask about closing when user has modified folder compare results - hide items, open items, copy/delete items etc. But that would match the criteria to two-file instant compares too.

    Another idea just came to my mind - maybe we could track the time it took for last compare. If it was more than say five seconds we could ask.

     
  • Kimmo Varis
    Kimmo Varis
    2007-11-23

    • priority: 5 --> 7
    • assigned_to: nobody --> kimmov
     
  • Dmitry Maslov
    Dmitry Maslov
    2008-01-07

    Logged In: YES
    user_id=1970736
    Originator: NO

    I have same problem.
    It can do to need press ESC twice when Folder Compare.

    Like:
    BOOL CDirView::PreTranslateMessage(MSG* pMsg)
    {
    // Handle special shortcuts here
    if (pMsg->message == WM_KEYDOWN)
    {
    if (FALSE == IsLabelEdit())
    {
    static int static_EscTimes = 0;

            // Check if we got 'ESC pressed' -message
            if \(pMsg->wParam == VK\_ESCAPE\)
            \{
                if \(m\_bEscCloses\)
                \{
                    if \(static\_EscTimes == 1\)
                    \{
                        AfxGetMainWnd\(\)->PostMessage\(WM\_COMMAND, ID\_FILE\_CLOSE\);
                        static\_EscTimes = 0;
                    \}
                    else
                    \{
                        static\_EscTimes++;
                    \}
    
                    return FALSE;
                \}
            \}
    
            static\_EscTimes = 0;
    
            // Check if we got 'DEL pressed' -message
            if \(pMsg->wParam == VK\_DELETE\)
            \{
                AfxGetMainWnd\(\)->PostMessage\(WM\_COMMAND, ID\_MERGE\_DELETE\);
                return FALSE;
            \}
            // Check if we got 'Backspace pressed' -message
            if \(pMsg->wParam == VK\_BACK\)
            \{
                OpenParentDirectory\(\);
                return FALSE;
            \}
        \}
        else
        \{
            // ESC doesn't close window when user is renaming an item.
            if \(pMsg->wParam == VK\_ESCAPE\)
            \{
                m\_bUserCancelEdit = TRUE;
    
                // The edit control send LVN\_ENDLABELEDIT when it loses focus,
                // so we use it to cancel the rename action.
                m\_pList->SetFocus\(\);
    
                // Stop the ESC before it reach the main frame which might
                // cause a program termination.
                return TRUE;
            \}
        \}
    \}
    return CListView::PreTranslateMessage\(pMsg\);
    

    }

     
  • Kimmo Varis
    Kimmo Varis
    2008-01-08

    Logged In: YES
    user_id=631874
    Originator: NO

    I don't believe that is proper solution. Just because of consistency - users don't want to double-press Esc-key for some windows and just single-press for some windows.

    As I've said many times in many Esc-key related items: I won't change Esc-key behavior unless I see it really improves the situation. Current, known situation is better than changing behavior of key lots of people seem to care so much. And lots of people are used to it already.

    Still, there is a problem and we need to find solution. But it is not easy, its already taken years without good solutions.