SVN revision: 24012
This commit is contained in:
sebastid 2006-07-17 23:38:28 +00:00 committed by sebastid
parent 7aa571f53a
commit dd247e63ab
1 changed files with 7 additions and 10 deletions

View File

@ -59,7 +59,6 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
Instance *inst; Instance *inst;
Config_Item *ci; Config_Item *ci;
Net *net; Net *net;
char buf[4096];
inst = E_NEW(Instance, 1); inst = E_NEW(Instance, 1);
@ -292,7 +291,7 @@ e_modapi_init(E_Module *m)
} }
net_config->module = m; net_config->module = m;
e_gadcon_provider_register(&_gc_class); e_gadcon_provider_register(&_gc_class);
return 1; return m;
} }
EAPI int EAPI int
@ -438,8 +437,6 @@ _net_cb_check(void *data)
unsigned long out = 0; unsigned long out = 0;
unsigned long dummy = 0; unsigned long dummy = 0;
int found; int found;
long max_in = 171008;
long max_out = 28672;
long bytes_in, bytes_out; long bytes_in, bytes_out;
char in_str[100]; char in_str[100];
char out_str[100]; char out_str[100];
@ -492,11 +489,11 @@ _net_cb_check(void *data)
else else
{ {
if (bytes_in > 1048576) if (bytes_in > 1048576)
snprintf(in_str, sizeof(in_str), "Rx: %d Mb", (bytes_in / 1048576)); snprintf(in_str, sizeof(in_str), "Rx: %ld Mb", (bytes_in / 1048576));
else if (bytes_in > 1024 && bytes_in < 1048576) else if (bytes_in > 1024 && bytes_in < 1048576)
snprintf(in_str, sizeof(in_str), "Rx: %d Kb", (bytes_in / 1024)); snprintf(in_str, sizeof(in_str), "Rx: %ld Kb", (bytes_in / 1024));
else else
snprintf(in_str, sizeof(in_str), "Rx: %d B", bytes_in); snprintf(in_str, sizeof(in_str), "Rx: %ld B", bytes_in);
edje_object_part_text_set(inst->net_obj, "rx_label", in_str); edje_object_part_text_set(inst->net_obj, "rx_label", in_str);
} }
@ -506,11 +503,11 @@ _net_cb_check(void *data)
else else
{ {
if (bytes_out > 1048576) if (bytes_out > 1048576)
snprintf(out_str, sizeof(out_str), "Tx: %d Mb", (bytes_out / 1048576)); snprintf(out_str, sizeof(out_str), "Tx: %ld Mb", (bytes_out / 1048576));
else if (bytes_out > 1024 && bytes_out < 1048576) else if (bytes_out > 1024 && bytes_out < 1048576)
snprintf(out_str, sizeof(out_str), "Tx: %d Kb", (bytes_out / 1024)); snprintf(out_str, sizeof(out_str), "Tx: %ld Kb", (bytes_out / 1024));
else else
snprintf(out_str, sizeof(out_str), "Tx: %d B", bytes_out); snprintf(out_str, sizeof(out_str), "Tx: %ld B", bytes_out);
edje_object_part_text_set(inst->net_obj, "tx_label", out_str); edje_object_part_text_set(inst->net_obj, "tx_label", out_str);
} }