Network: use string_for_size for transfer rates.
Don't ask translators to translate these units over and over again.
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
#include <NetworkAddress.h>
|
#include <NetworkAddress.h>
|
||||||
#include <Screen.h>
|
#include <Screen.h>
|
||||||
#include <Size.h>
|
#include <Size.h>
|
||||||
|
#include <StringForSize.h>
|
||||||
#include <StringView.h>
|
#include <StringView.h>
|
||||||
#include <TextControl.h>
|
#include <TextControl.h>
|
||||||
|
|
||||||
@@ -210,12 +211,11 @@ InterfaceHardwareView::Update()
|
|||||||
ifreq_stats stats;
|
ifreq_stats stats;
|
||||||
char buffer[100];
|
char buffer[100];
|
||||||
fSettings->Stats(&stats);
|
fSettings->Stats(&stats);
|
||||||
snprintf(buffer, sizeof(buffer), B_TRANSLATE("%" B_PRIu64 " KBytes"),
|
|
||||||
stats.send.bytes / 1024);
|
string_for_size(stats.send.bytes, buffer, sizeof(buffer));
|
||||||
fLinkTxField->SetText(buffer);
|
fLinkTxField->SetText(buffer);
|
||||||
|
|
||||||
snprintf(buffer, sizeof(buffer), B_TRANSLATE("%" B_PRIu64 " KBytes"),
|
string_for_size(stats.receive.bytes, buffer, sizeof(buffer));
|
||||||
stats.receive.bytes / 1024);
|
|
||||||
fLinkRxField->SetText(buffer);
|
fLinkRxField->SetText(buffer);
|
||||||
|
|
||||||
// TODO move the wireless info to a separate tab. We should have a
|
// TODO move the wireless info to a separate tab. We should have a
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ Addon Interfaces :
|
|||||||
RadioView.cpp
|
RadioView.cpp
|
||||||
WirelessNetworkMenuItem.cpp
|
WirelessNetworkMenuItem.cpp
|
||||||
:
|
:
|
||||||
be
|
be shared
|
||||||
<nogrist>Network
|
<nogrist>Network
|
||||||
$(TARGET_NETWORK_LIBS)
|
$(TARGET_NETWORK_LIBS)
|
||||||
libbnetapi.so
|
libbnetapi.so
|
||||||
|
|||||||
Reference in New Issue
Block a user