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 Changed 5 years ago by dsjonny

Has a Patch: set

comment:2 Changed 5 years ago by pulkomandy

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 Changed 5 years ago by pulkomandy

Has a Patch: unset

comment:4 Changed 5 years ago by dsjonny

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 Changed 5 years ago by pulkomandy

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 Changed 5 years ago by axeld

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

comment:7 Changed 5 years ago by pulkomandy

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 Changed 5 years ago by kushalsingh007

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

comment:9 Changed 5 years ago by kushalsingh007

Has a Patch: set

comment:10 Changed 5 years ago by kushalsingh007

Has a Patch: unset

Changed 5 years ago by kushalsingh007

Style changes made as per Haiku Guidlines

comment:11 Changed 5 years ago by pulkomandy

Keywords: gsoc2015 added
Resolution: fixed
Status: newclosed

Applied in hrev48660.

comment:12 Changed 5 years ago by kushalsingh007

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