[haiku-bugs] Re: [Haiku] #14917: Emptying the trash shows progress as a size instead of a count

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Thu, 21 Feb 2019 20:02:18 -0000

#14917: Emptying the trash shows progress as a size instead of a count
----------------------------------+----------------------------
   Reporter:  korli               |      Owner:  nobody
       Type:  bug                 |     Status:  new
   Priority:  normal              |  Milestone:  Unscheduled
  Component:  Kits/libtracker.so  |    Version:  R1/Development
 Resolution:                      |   Keywords:
 Blocked By:                      |   Blocking:
Has a Patch:  0                   |   Platform:  All
----------------------------------+----------------------------
Description changed by korli:

Old description:

BStatusView::_FullSpeedString() is used for item counts, this means it
shows 2KB for 2000 files to delete.

{{{
BString
BStatusView::_FullSpeedString()
{
        BString buffer;
        if (fBytesPerSecond != 0.0) {
                char sizeBuffer[128];
                buffer.SetTo(B_TRANSLATE(
                        "%SizeProcessed of %TotalSize,
%BytesPerSecond/s"));
                buffer.ReplaceFirst("%SizeProcessed",
                        string_for_size((double)fSizeProcessed,
sizeBuffer,
                        sizeof(sizeBuffer)));
                buffer.ReplaceFirst("%TotalSize",
                        string_for_size((double)fTotalSize, sizeBuffer,
                        sizeof(sizeBuffer)));
                buffer.ReplaceFirst("%BytesPerSecond",
                        string_for_size(fBytesPerSecond, sizeBuffer,
sizeof(sizeBuffer)));
        }

        return buffer;
}

}}}

New description:

 BStatusView::_FullSpeedString() is used for item counts, this means it
 shows 2KB for 2000 files to delete.

 {{{
 BString
 BStatusView::_FullSpeedString()
 {
         BString buffer;
         if (fBytesPerSecond != 0.0) {
                 char sizeBuffer[128];
                 buffer.SetTo(B_TRANSLATE(
                         "%SizeProcessed of %TotalSize,
 %BytesPerSecond/s"));
                 buffer.ReplaceFirst("%SizeProcessed",
                         string_for_size((double)fSizeProcessed,
 sizeBuffer,
                         sizeof(sizeBuffer)));
                 buffer.ReplaceFirst("%TotalSize",
                         string_for_size((double)fTotalSize, sizeBuffer,
                         sizeof(sizeBuffer)));
                 buffer.ReplaceFirst("%BytesPerSecond",
                         string_for_size(fBytesPerSecond, sizeBuffer,
 sizeof(sizeBuffer)));
         }

         return buffer;
 }

 }}}

 [[Image(screenshot51.png)]]

--

-- 
Ticket URL: <https://dev.haiku-os.org/ticket/14917#comment:1>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: