Menu

#1875 Extension Column is Empty.

Branch_+_Trunk
closed-fixed
GUI (515)
5
2009-03-23
2009-03-07
Mark H
No

Version 2.13.4 Unicode

When doing a Folder compare the Extension column is empty for *all* files. This may relate to bug:2563314 where it was requested that Folder.extensions do not show up...

(Personally that may depend. I don't know if the .de is part of an Operating System localization tag (and therefore should be hidden) or if it is by choice. Perhaps we could follow the "Hide Extensions" flag that the operating system puts into the file browser or "finder".
But then, how would we Sort by Extension? Well...sort could be /functional/ and still not show the extensions???

Anyway, have a look at it will you?
Many Thanks,

Discussion

  • Kimmo Varis

    Kimmo Varis - 2009-03-08

    Yep. I'll look at this.

     
  • Kimmo Varis

    Kimmo Varis - 2009-03-08
    • assigned_to: nobody --> kimmov
     
  • Kimmo Varis

    Kimmo Varis - 2009-03-08

    The fix

     
  • Kimmo Varis

    Kimmo Varis - 2009-03-08

    Attaching a patch fixing the bug. Simply was using "wrong" path to get the filename.
    File Added: Fix_showing_filename_ext.patch

     
  • Kimmo Varis

    Kimmo Varis - 2009-03-09
    • status: open --> open-fixed
     
  • Kimmo Varis

    Kimmo Varis - 2009-03-09

    Fix committed to SVN trunk:
    Completed: At revision: 6553

    Will commit to 2.12 branch too.

     
  • Mark H

    Mark H - 2009-03-09

    Thanks!
    I'll check it when it becomes available. :-)

     
  • Kimmo Varis

    Kimmo Varis - 2009-03-10

    Committed to 2.12 branch (for 2.12.2 stable release):
    Completed: At revision: 6554

     
  • Kimmo Varis

    Kimmo Varis - 2009-03-10
    • milestone: --> Branch_+_Trunk
     
  • Takashi Sawanaka

    There is another problem related to extension column.
    The extension column is not sortable.

    Index: DirViewColItems.cpp

    --- DirViewColItems.cpp (revision 6555)
    +++ DirViewColItems.cpp (working copy)
    @@ -647,10 +647,13 @@
    */
    static int ColExtSort(const CDiffContext *pCtxt, const void *p, const void *q)
    {
    - const String &r = *static_cast<const String*>(p);
    - const String &s = *static_cast<const String*>(q);
    - return lstrcmpi(PathFindExtension(r.c_str()), PathFindExtension(s.c_str()));
    - //return ColExtGet(pCtxt, p).CompareNoCase(ColExtGet(pCtxt, q));
    + const DIFFITEM &ldi = *static_cast<const DIFFITEM *>(p);
    + const DIFFITEM &rdi = *static_cast<const DIFFITEM *>(q);
    + if (ldi.diffcode.isDirectory() && !rdi.diffcode.isDirectory())
    + return -1;
    + if (!ldi.diffcode.isDirectory() && rdi.diffcode.isDirectory())
    + return 1;
    + return lstrcmpi(ColExtGet(pCtxt, p).c_str(), ColExtGet(pCtxt, q).c_str());
    }

    /**

     
  • Kimmo Varis

    Kimmo Varis - 2009-03-10

    Argh. I thought the extension fix (original one) was simple enough. But it totally broke the column. :(

    + if (ldi.diffcode.isDirectory() && !rdi.diffcode.isDirectory())
    + return -1;
    + if (!ldi.diffcode.isDirectory() && rdi.diffcode.isDirectory())
    + return 1;

    Why you need this? I don't think it is possible to have directory and file in the same line? Our GUI sure doesn't handle that kind of situation so we'd be in problems before sorting... But good point, need to test that kind of situation sometimes.

     
  • Kimmo Varis

    Kimmo Varis - 2009-03-10

    Oops. Forget my last comment. When sorting we of course compare items from two *different* lines. Variable names ldi and rdi confused me for a moment. So your change is of course ok. Please commit to 2.12 branch too.

     
  • Takashi Sawanaka

    Committed to SVN trunk. Completed: At revision: 6560
    Committed to 2.12 branch. Completed: At revision: 6561

     
  • Kimmo Varis

    Kimmo Varis - 2009-03-20

    Should be now fixed in 2.13.5 experimental release.

     
  • Mark H

    Mark H - 2009-03-23
    • status: open-fixed --> closed-fixed
     
  • Mark H

    Mark H - 2009-03-23

    Closing. Fix Verified in 2.13.5 |:-D
    Thanks!

     

Log in to post a comment.