Opened 10 years ago

Closed 9 years ago

Last modified 9 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:
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 10 years ago.
0001-Display-network-speed-in-MiB-gsoc15.patch (1.4 KB ) - added by kushalsingh007 9 years ago.
Style changes made as per Haiku Guidlines

Download all attachments as: .zip

Change History (14)

comment:1 by dsjonny, 10 years ago

patch: 01

comment:2 by pulkomandy, 10 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, 10 years ago

patch: 10

comment:4 by dsjonny, 10 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, 10 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
Version 0, edited 10 years ago by pulkomandy (next)

comment:6 by axeld, 10 years ago

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

comment:7 by pulkomandy, 9 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, 9 years ago

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

comment:9 by kushalsingh007, 9 years ago

patch: 01

comment:10 by kushalsingh007, 9 years ago

patch: 10

by kushalsingh007, 9 years ago

Style changes made as per Haiku Guidlines

comment:11 by pulkomandy, 9 years ago

Keywords: gsoc2015 added
Resolution: fixed
Status: newclosed

Applied in hrev48660.

comment:12 by kushalsingh007, 9 years ago

patch: 01
Note: See TracTickets for help on using tickets.