Well, thats really nice. But I use quite small gadgets of the size
52x52. But then, the text goes out from the gadget rectangle. Is it
possible to fit into gadget size ?

regards
aleksej

On 2/21/06, enlightenment-cvs@lists.sourceforge.net
<enlightenment-cvs@lists.sourceforge.net> wrote:
> Enlightenment CVS committal
>
> Author  : devilhorns
> Project : e_modules
> Module  : mem
>
> Dir     : e_modules/mem
>
>
> Modified Files:
>         e_mod_main.c
>
>
> Log Message:
> At morlenxus's request, Add total memory/used memory
> ===================================================================
> RCS file: /cvsroot/enlightenment/e_modules/mem/e_mod_main.c,v
> retrieving revision 1.2
> retrieving revision 1.3
> diff -u -3 -r1.2 -r1.3
> --- e_mod_main.c        20 Feb 2006 18:23:28 -0000      1.2
> +++ e_mod_main.c        21 Feb 2006 12:36:08 -0000      1.3
> @@ -16,7 +16,7 @@
>  static void _mem_face_cb_menu_edit      (void *data, E_Menu *mn, E_Menu_Item 
> *mi);
>  static void _mem_face_cb_menu_configure (void *data, E_Menu *mn, E_Menu_Item 
> *mi);
>  static int  _mem_face_update_values     (void *data);
> -static void _mem_face_get_mem_values    (Mem_Face *cf, int *real, int *swap);
> +static void _mem_face_get_mem_values    (Mem_Face *cf, int *real, int *swap, 
> int *total_real, int *total_swap);
>
>  static int mem_count;
>
> @@ -408,19 +408,19 @@
>  _mem_face_update_values(void *data)
>  {
>     Mem_Face *cf;
> -   int real, swap;
> +   int real, swap, total_real, total_swap;
>     Edje_Message_String_Set *msg;
>     char real_str[100];
>     char swap_str[100];
>
>     cf = data;
> -   _mem_face_get_mem_values(cf, &real, &swap);
> +   _mem_face_get_mem_values(cf, &real, &swap, &total_real, &total_swap);
>
>     real = real / 1024;
>     swap = swap / 1024;
>
> -   snprintf(real_str, sizeof(real_str), "%d MB", real);
> -   snprintf(swap_str, sizeof(swap_str), "%d MB", swap);
> +   snprintf(real_str, sizeof(real_str), "%d/%d MB", total_real, real);
> +   snprintf(swap_str, sizeof(swap_str), "%d/%d MB", total_swap, swap);
>
>     msg = malloc(sizeof(Edje_Message_String_Set) - sizeof(char *) + (1 + 
> sizeof(char *)));
>     msg->count = 2;
> @@ -433,7 +433,7 @@
>  }
>
>  static void
> -_mem_face_get_mem_values(Mem_Face *cf, int *real, int *swap)
> +_mem_face_get_mem_values(Mem_Face *cf, int *real, int *swap, int 
> *total_real, int *total_swap)
>  {
>     FILE *pmeminfo = NULL;
>     int cursor = 0;
> @@ -506,5 +506,7 @@
>
>     *real = mtotal - mfree;
>     *swap = stotal - sfree;
> +   *total_real = mtotal / 1024;
> +   *total_swap = stotal / 1024;
>     return;
>  }
>
>
>
>
> -------------------------------------------------------
> 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
>


--
Aleksej Struk
Master Degree Student
Free University of Bozen-Bolzano
Faculty of Computer Science
phone: +39-0471-061749
cell phone: +39-3204627049
[EMAIL PROTECTED] [EMAIL PROTECTED] - http://www.


-------------------------------------------------------
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&kid3432&bid#0486&dat1642
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to