[E-devel] Re: E CVS: cpu devilhorns

2006-02-27 Thread Aleksej Struk
Hi,

I do not know, if I relly report some bug or not. Maybe this will be
fixed this night... But any way. The cpu graph are drawn out of the
gadget. It seems, that there are not cliping region
for it.

sn

On 2/27/06, enlightenment-cvs@lists.sourceforge.net
enlightenment-cvs@lists.sourceforge.net wrote:
 Enlightenment CVS committal

 Author  : devilhorns
 Project : e_modules
 Module  : cpu

 Dir : e_modules/cpu


 Modified Files:
 cpu.edc e_mod_main.h e_mod_main.c


 Log Message:
 Ok, cpu module has a graph now. I'll make the config options for graph
 and/or text later tonight.

 ===
 RCS file: /cvsroot/enlightenment/e_modules/cpu/cpu.edc,v
 retrieving revision 1.5
 retrieving revision 1.6
 diff -u -3 -r1.5 -r1.6
 --- cpu.edc 26 Feb 2006 12:29:39 -  1.5
 +++ cpu.edc 27 Feb 2006 15:11:58 -  1.6
 @@ -21,8 +21,6 @@
 state: default 0.0;
 aspect: 1.0 1.0;
 align: 0.5 0.5;
 -   min: 45 50;
 -   max: 128 128;
 rel1 {
relative: 0.0 0.0;
 }
 @@ -78,6 +76,23 @@
  }
}

 +  part {
 +   name,  lines;
 +   mouse_events,  0;
 +   type,  SWALLOW;
 +clip_to:   fade_clip;
 +   description {
 + state,default 0.0;
 +   rel1 {
 +  relative: 0.0 0.0;
 +   }
 +   rel2 {
 +  relative: 1.0 1.0;
 +   }
 + color, 0 0 0 0;
 +   }
 +  }
 +
 }
  }//close group net
  }
 ===
 RCS file: /cvsroot/enlightenment/e_modules/cpu/e_mod_main.h,v
 retrieving revision 1.2
 retrieving revision 1.3
 diff -u -3 -r1.2 -r1.3
 --- e_mod_main.h20 Feb 2006 12:53:50 -  1.2
 +++ e_mod_main.h27 Feb 2006 15:11:58 -  1.3
 @@ -32,12 +32,14 @@
 E_Container *con;
 E_Menu *menu;
 Cpu *cpu;
 -
 +   Evas_List *old_values;
 +
 Config_Face *conf;
 E_Config_DD *conf_face_edd;

 Evas_Object *cpu_obj;
 Evas_Object *event_obj;
 +   Evas_Object *chart_obj;

 Ecore_Timer *monitor;

 ===
 RCS file: /cvsroot/enlightenment/e_modules/cpu/e_mod_main.c,v
 retrieving revision 1.6
 retrieving revision 1.7
 diff -u -3 -r1.6 -r1.7
 --- e_mod_main.c26 Feb 2006 12:21:58 -  1.6
 +++ e_mod_main.c27 Feb 2006 15:11:58 -  1.7
 @@ -18,7 +18,8 @@
  static int  _cpu_face_update_values (void *data);
  static int  _cpu_face_get_cpu_count (Cpu_Face *cf);
  static int  _cpu_face_get_load  (Cpu_Face *cf);
 -//static void _cpu_face_graph_values  (Cpu_Face *cf, int val);
 +static void _cpu_face_graph_values  (Cpu_Face *cf, int val);
 +static void _cpu_face_graph_clear   (Cpu_Face *cf);

  static int cpu_count;

 @@ -227,18 +228,16 @@
   {
 snprintf(buf, sizeof(buf), PACKAGE_DATA_DIR/cpu.edj);
 edje_object_file_set(o, buf, modules/cpu/main);
 - }
 -
 + }
 evas_object_show(o);

 -   /*
 -   o = evas_object_rectangle_add(cf-evas);
 -   cf-chart_clip_obj = o;
 +   o = edje_object_add(cf-evas); //evas_object_rectangle_add(cf-evas);
 +   cf-chart_obj = o;
 evas_object_layer_set(o, 1);
 evas_object_repeat_events_set(o, 0);
 -   evas_object_color_set(o, 255, 255, 255, 100);
 +   evas_object_pass_events_set(o, 1);
 +   evas_object_color_set(o, 255, 255, 255, 255);
 evas_object_show(o);
 -   */

 o = evas_object_rectangle_add(cf-evas);
 cf-event_obj = o;
 @@ -259,10 +258,9 @@
   E_GADMAN_POLICY_VSIZE);
 e_gadman_client_min_size_set(cf-gmc, 45, 50);
 e_gadman_client_max_size_set(cf-gmc, 128, 128);
 -   e_gadman_client_auto_size_set(cf-gmc, 40, 40);
 +   e_gadman_client_auto_size_set(cf-gmc, 45, 50);
 e_gadman_client_align_set(cf-gmc, 1.0, 1.0);
 -   //e_gadman_client_aspect_set(cf-gmc, 1.0, 1.0);
 -   e_gadman_client_resize(cf-gmc, 40, 40);
 +   e_gadman_client_resize(cf-gmc, 45, 50);
 e_gadman_client_change_func_set(cf-gmc, _cpu_face_cb_gmc_change, cf);
 e_gadman_client_load(cf-gmc);
 evas_event_thaw(cf-evas);
 @@ -297,7 +295,7 @@
 cf-conf-enabled = 1;
 e_config_save_queue();
 evas_object_show(cf-cpu_obj);
 -   /* evas_object_show(cf-chart_obj); */
 +   evas_object_show(cf-chart_obj);
 evas_object_show(cf-event_obj);
  }

 @@ -307,7 +305,7 @@
 cf-conf-enabled = 0;
 e_config_save_queue();
 evas_object_hide(cf-event_obj);
 -   /* evas_object_hide(cf-chart_obj); */
 +   evas_object_hide(cf-chart_obj);
 evas_object_hide(cf-cpu_obj);
  }

 @@ -322,11 +320,10 @@
   evas_object_del(cf-event_obj);
 if (cf-cpu_obj)
   evas_object_del(cf-cpu_obj);
 -
 -   /*
 if (cf-chart_obj)
   evas_object_del(cf-chart_obj);
 -*/
 +   if (cf-old_values)
 + 

[E-devel] Re: E CVS: cpu devilhorns

2006-02-27 Thread Aleksej Struk
Perfect ! :)

Now it works fine. Moreover, I would suggest just to decrease a
clipping region. To make it a little bit smaller. Then this module
would look more beautifully.

What about drawing the graph just over the processor image ? maybe a
little bit more ?

Thnx.
sn

On 2/27/06, enlightenment-cvs@lists.sourceforge.net
enlightenment-cvs@lists.sourceforge.net wrote:
 Enlightenment CVS committal

 Author  : devilhorns
 Project : e_modules
 Module  : cpu

 Dir : e_modules/cpu


 Modified Files:
 e_mod_main.c


 Log Message:
 Fix small bug with text still showing when asked not to.



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel