Enlightenment CVS committal

Author  : devilhorns
Project : e_modules
Module  : wlan

Dir     : e_modules/wlan


Modified Files:
        wlan.edc 


Log Message:
This should fix the wlan crashies
===================================================================
RCS file: /cvsroot/enlightenment/e_modules/wlan/wlan.edc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- wlan.edc    20 Feb 2006 15:15:32 -0000      1.1
+++ wlan.edc    20 Feb 2006 17:07:57 -0000      1.2
@@ -15,10 +15,23 @@
       name: "modules/wlan/main";
       script {
                public message(Msg_Type:type, id, ...) {
-                     if (type == MSG_STRING_SET) {
-                               new real_str[100];
-                               getsarg(2, real_str, sizeof(real_str));
-                               set_text(PART:"link-text", real_str);
+                     if (type == MSG_INT_SET) {
+                               new tmp;
+                               new in_str[64];
+                               
+                               tmp = getarg(2);
+                               if (tmp > 1048576) {
+                                       tmp = tmp / 1048576;
+                                       snprintf(in_str, sizeof(in_str), "%i 
MB", tmp);                                 
+                               }
+                               else if (tmp > 1024 && tmp < 1048576) {
+                                       tmp = tmp / 1024;
+                                       snprintf(in_str, sizeof(in_str), "%i 
KB", tmp);                                 
+                               }
+                               else {
+                                       snprintf(in_str, sizeof(in_str), "%i 
B", tmp);
+                               }
+                               set_text(PART:"link-text", in_str);             
                
                      }
               }      
       }




-------------------------------------------------------
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
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to