Menu

#2622 RFE:987590 hierarchical directory comparison result view

Trunk
closed-accepted
GUI (476)
5
2008-10-16
2008-07-15
No

This patch implements the RFE:"987590 hierarchical directory comparison result view"
(http://sourceforge.net/tracker/index.php?func=detail&aid=987590&group_id=13216&atid=363216)

When you try to use the feature, you need to check the "Tree Mode" on View menu.

This patch is still buggy and needs to add more comments to source code.

Discussion

1 2 > >> (Page 1 of 2)
  • Takashi Sawanaka

     
  • Takashi Sawanaka

    Logged In: YES
    user_id=954028
    Originator: YES

    File Added: treeview.png

     
  • Takashi Sawanaka

     
  • Kimmo Varis

    Kimmo Varis - 2008-07-16

    Logged In: YES
    user_id=631874
    Originator: NO

    This looks great (as a feature)!

    But, I dislike the way this patch expands DIFFITEM. This is a working solution, but I feel it is quite fragile considering that we also need to somehow manage this structure. Simple thing like copying folder (and all contained files) to another side gets interesting when we have to figure out what files to copy in all subfolders?

    bool collapsed just can't be a part of DIFFITEM. DIFFITEM presents files and folders in the filesystem, it does not have and cannot have any relation to the GUI.

    That we have all DIFFITEMs in a flat list is a real problem, and it currently prevents me working in several features (including items in unique subfolders, better filtering etc etc). I've tried to think possible solutions but really don't have good ideas yet.

    I'll start a new topic to developers forum about this and some ideas I have.

     
  • Kimmo Varis

    Kimmo Varis - 2008-07-16

    Logged In: YES
    user_id=631874
    Originator: NO

    Started new thread to developers-forum:
    Diffitems structuring in folder compare
    https://sourceforge.net/forum/forum.php?thread_id=2123248&forum_id=41639

     
  • Takashi Sawanaka

    Logged In: YES
    user_id=954028
    Originator: YES

    > bool collapsed just can't be a part of DIFFITEM. DIFFITEM presents files
    >and folders in the filesystem, it does not have and cannot have any
    >relation to the GUI.

    How about using DIFFITEM::customFlags1 for storing collapsed state?.
    DIFFITEM::custeomFlags1 is already used for indicating whether the item is hidden or not.

     
  • Takashi Sawanaka

    Logged In: YES
    user_id=954028
    Originator: YES

    I am posting the second patch.

    - DIFFITEM structure is hierarchical now.
    - Use customFlags1 for storing collapsed state.
    - Add "Expand All Subfolders" and "Collapse All Subfolders" menu item.
    - Fixed a bug of previous patch. (freeze sometimes occurs and didn't show items correctly)
    File Added: patch-treemodeV2.7z

     
  • Takashi Sawanaka

     
  • Kimmo Varis

    Kimmo Varis - 2008-07-20

    Logged In: YES
    user_id=631874
    Originator: NO

    A *LOT* better now.

    > - Use customFlags1 for storing collapsed state.
    Yep, we can use it, as my hidden item thing uses it too. It is transparent to DIFFITEM itself, it doesn't add any dependency. Its kind of similar idea how e.g. many Windows controls have that userdata dword (and where we put list item POSITIONs for folder compare list view).

    Thanks for doing all this work! Can I ask one favor, can you split this work to two patches. I'd like to get this structured DIFFITEM code in SVN as separate patch. If not in separate tracker item, at least in two separate patches in this item. DIFFITEM part changes how we think folder compare for now on and is logically a different thing from GUI part.

    I quickly looked through the patch, but I need few days to think this through. As I already mentioned, this is very important change and I want to understand it well first. My initial though is this is a good and important first step to correct direction. We need a lot more flexible structure for other features and my one concern is that we can incrementally build on this patch rather than rewriting.

     
  • Takashi Sawanaka

    Logged In: YES
    user_id=954028
    Originator: YES

    I submitted a separated patch for structured DIFFITEM.
    And I am also submitting updated patch against above patch.

    File Added: patch-treemodeV3.7z

     
  • Takashi Sawanaka

     
  • Kimmo Varis

    Kimmo Varis - 2008-07-22

    Logged In: YES
    user_id=631874
    Originator: NO

    Looks good. This can go into trunk.

     
  • Takashi Sawanaka

    Logged In: YES
    user_id=954028
    Originator: YES

    Committed to SVN trunk. Completed: At revision: 5655

     
  • Kimmo Varis

    Kimmo Varis - 2008-07-24

    Logged In: YES
    user_id=631874
    Originator: NO

    I noticed a bit harmful behavior: you can browse into folder like in non-recursive compare. But then there is no way to go back to original compare.

    Other nice thing would be to collapsed subfolders somehow show if there are file items inside. Just clicking open deep folder structure to find out there are no any files is a bit annoying.

     
  • Takashi Sawanaka

    Logged In: YES
    user_id=954028
    Originator: YES

    >I noticed a bit harmful behavior: you can browse into folder like in
    >non-recursive compare. But then there is no way to go back to original
    >compare.

    Double-clicking or pressing enter-key on folder item open selected item now. But I unconsciously double-clicked an folder item in order to expand or collapse the folder. Because it is a standard operation for expanding or collapsing on TreeView of Windows.

    So I think that when the tree mode is enabled and an folder item is double-clicked, the folder item should be expanded or collapsed.

    If it is ok, I will submit the patch.

    >Other nice thing would be to collapsed subfolders somehow show if there
    >are file items inside. Just clicking open deep folder structure to find >out
    >there are no any files is a bit annoying.

    I will think about it.

     
  • Kimmo Varis

    Kimmo Varis - 2008-07-24

    Logged In: YES
    user_id=631874
    Originator: NO

    > So I think that when the tree mode is enabled and
    > an folder item is double-clicked, the folder item
    > should be expanded or collapsed.

    Agreed. It is a bit different how Windows Explorer works, but I think most tree controls expand/collapse by double-click (or enter key press). I think we also should disable Compare-menu item when folder is selected.

    > If it is ok, I will submit the patch.
    Yes, it is ok.

     
  • Takashi Sawanaka

     
  • Takashi Sawanaka

    Logged In: YES
    user_id=954028
    Originator: YES

    I'm posting this patch v4.

    - Expand/Collapse folder item by double-clicking or enter key pressing.
    - Disable Compare-menu item when tree-mode is on and folder is selected
    - When expanding folder item, inserted items are sorted now.
    - When Tree-mode is on and non-recursive compare is selected, the space of list item state icon is removed.

    File Added: patch-treemodeV4.7z

     
  • Takashi Sawanaka

    Logged In: YES
    user_id=954028
    Originator: YES

    Patch v5
    - Display whether folders are different or same.
    - Add icons (equalfolder.ico, notequlfolder.ico). These are temporary icons. I'm glad if someone could make better icons.
    File Added: patch-treemodeV5.7z

     
  • Takashi Sawanaka

     
  • Kimmo Varis

    Kimmo Varis - 2008-07-28
    • assigned_to: nobody --> sdottaka
     
  • Kimmo Varis

    Kimmo Varis - 2008-07-28

    Logged In: YES
    user_id=631874
    Originator: NO

    Great! I just tested the v5 patch and I like it!

    One thing I noticed: the View - Tree View menu item is enabled when doing non-recursive compare. But it doesn't do anything, so it can be disabled?

    > - Add icons (equalfolder.ico, notequlfolder.ico).
    I'm sure Tim and Alex are happy to provide nice icons for us. :)

    > - Disable Compare-menu item when tree-mode is on and folder is selected
    This does not work in v5 patch?

    Also, we have the Backspace key that goes up one level in non-recursive folder compare (compares parent folders). I'm wondering if we should disable it too for recursive compare.

    Other thing I was thinking is if we should have all folders collapsed after the compare. As we now have the state icons, it is easy to open different folders one wants to look at.

     
  • Takashi Sawanaka

    Logged In: YES
    user_id=954028
    Originator: YES

    Thank you for testing.

    >This does not work in v5 patch?
    Sorry, v5 patch didn't include DirDoc.cpp.

    I'm posting v6 patch.

    - Disables Tree Mode menu item when doing non-recursive compare.
    - Disables Backspace key when doing reursive compare or using Tree Mode.
    - Changes the initial folder state to 'expanded' state.

    File Added: patch-treemodeV6.7z

     
  • Takashi Sawanaka

     
  • Takashi Sawanaka

    • assigned_to: sdottaka --> nobody
     
1 2 > >> (Page 1 of 2)

Log in to post a comment.