Enlightenment CVS committal
Author : devilhorns
Project : e_modules
Module : net
Dir : e_modules/net
Modified Files:
net.edc e_mod_main.c
Log Message:
Use edje_object_part_text_set instead of more complex edc script.
===================================================================
RCS file: /cvsroot/enlightenment/e_modules/net/net.edc,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- net.edc 21 Feb 2006 13:14:36 -0000 1.11
+++ net.edc 22 Feb 2006 10:40:48 -0000 1.12
@@ -12,20 +12,7 @@
{
group
{
- name: "modules/net/main";
- script {
- public message(Msg_Type:type, id, ...) {
- if (type == MSG_STRING_SET) {
- new in_str[64];
- new out_str[64];
- getsarg(2, in_str, sizeof(in_str));
- getsarg(3, out_str, sizeof(out_str));
- set_text(PART:"in-text", in_str);
- set_text(PART:"out-text", out_str);
- }
- }
- }
-
+ name: "modules/net/main";
parts{
part {
name: "base";
===================================================================
RCS file: /cvsroot/enlightenment/e_modules/net/e_mod_main.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- e_mod_main.c 21 Feb 2006 23:56:27 -0000 1.8
+++ e_mod_main.c 22 Feb 2006 10:40:48 -0000 1.9
@@ -488,19 +488,11 @@
old_out = out;
/* Update the modules text */
- Edje_Message_String_Set *msg;
char in_str[100];
char out_str[100];
-
snprintf(in_str, sizeof(in_str), "Rx: %d B", in_use);
snprintf(out_str, sizeof(out_str), "Tx: %d B", out_use);
-
- msg = malloc(sizeof(Edje_Message_String_Set) - sizeof(char *) + (1 +
sizeof(char *)));
- msg->count = 2;
- msg->str[0] = in_str;
- msg->str[1] = out_str;
- edje_object_message_send(nf->net_obj, EDJE_MESSAGE_STRING_SET, 1, msg);
- free(msg);
-
+ edje_object_part_text_set(nf->net_obj, "out-text", out_str);
+ edje_object_part_text_set(nf->net_obj, "in-text", in_str);
return 1;
}
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs