Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#11053 closed enhancement (fixed)

ActivityMonitor: MiB value of network speed (easy)

Reported by: dsjonny Owned by: axeld
Priority: normal Milestone: R1
Component: Applications/ActivityMonitor Version: R1/Development
Keywords: gsoc2015 Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

If the network speed is greater than 1024 KiB than it displays in MiB.

Tested, works fine.

Patch has been added.

Attachments (2)

0001-Display-network-speed-in-MiB-if-the-speed-is-higher-.patch (979 bytes ) - added by dsjonny 5 years ago.
0001-Display-network-speed-in-MiB-gsoc15.patch (1.4 KB ) - added by kushalsingh007 5 years ago.
Style changes made as per Haiku Guidlines

Download all attachments as: .zip

Change History (14)

comment:1 by dsjonny, 5 years ago

Has a Patch: set

comment:2 by pulkomandy, 5 years ago

Plase use string_for_rate (defined in headers/private/shared/StringForRate.h) instead of writing custom code for this and requiring the i18n people to translate "KiB/s" and "MiB/s" over and over again in each and every app.

comment:3 by pulkomandy, 5 years ago

Has a Patch: unset

comment:4 by dsjonny, 5 years ago

I'm sorry, but I don't know how to use the string_for_rate (http://cgit.haiku-os.org/haiku/tree/headers/private/shared/StringForRate.h) function in this case.

comment:5 by pulkomandy, 5 years ago

const char rateString[16];
string_for_rate(rate, rateString, sizeof(rateString));
// now rateString contains "15.5 KiB/s" or similar, already localized and with the most suitable unit
Last edited 5 years ago by pulkomandy (previous) (diff)

comment:6 by axeld, 5 years ago

Just make sure you lose the '*' right before the rateString definition.

comment:7 by pulkomandy, 5 years ago

Summary: ActivityMonitor: MiB value of network speedActivityMonitor: MiB value of network speed (easy)

Fixed my code in the comment above. Marking ticket as easy since there is little left to do here.

comment:8 by kushalsingh007, 5 years ago

Based on the suggestions by pulkomandy I have created a patch. Kindly review it :)

comment:9 by kushalsingh007, 5 years ago

Has a Patch: set

comment:10 by kushalsingh007, 5 years ago

Has a Patch: unset

by kushalsingh007, 5 years ago

Style changes made as per Haiku Guidlines

comment:11 by pulkomandy, 5 years ago

Keywords: gsoc2015 added
Resolution: fixed
Status: newclosed

Applied in hrev48660.

comment:12 by kushalsingh007, 5 years ago

Has a Patch: set
Note: See TracTickets for help on using tickets.