Enlightenment CVS committal

Author  : handyande
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/modules/temperature


Modified Files:
        e_mod_config.c e_mod_main.c e_mod_main.h 


Log Message:
Move the manipulation of user specified policy flags (ALLOW_OVERLAP and 
ALWAYS_ON_TOP (not used yet)) to the gadman edit menu, saves a LOT of code 
inside modules
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/apps/e/src/modules/temperature/e_mod_config.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- e_mod_config.c      13 Feb 2006 15:53:05 -0000      1.17
+++ e_mod_config.c      12 Mar 2006 16:12:59 -0000      1.18
@@ -30,8 +30,6 @@
    int high_method;
    int high_temp;
 
-   int allow_overlap;
-
    int sensor;
 };
 
@@ -112,8 +110,6 @@
      cfdata->sensor = 1;
    else if (!strcmp(t->conf->sensor_name, "temp3")) 
      cfdata->sensor = 2;
-
-   cfdata->allow_overlap = t->conf->allow_overlap;
 }
 
 static void *
@@ -215,11 +211,6 @@
        e_widget_list_object_append(o, of, 1, 1, 0.5);
      }
 
-   of = e_widget_framelist_add(evas, _("Extras"), 0);
-   ob = e_widget_check_add(evas, _("Allow windows to overlap this gadget"), 
&(cfdata->allow_overlap));
-   e_widget_framelist_object_append(of, ob);
-   e_widget_list_object_append(o, of, 1, 1, 0.5);
-
    return o;
 }
 
@@ -248,11 +239,6 @@
        t->conf->high = cfdata->high_method;
      }
 
-   if (cfdata->allow_overlap && !t->conf->allow_overlap)
-     t->conf->allow_overlap = 1;
-   else if (!cfdata->allow_overlap && t->conf->allow_overlap)
-     t->conf->allow_overlap = 0;
-
    e_border_button_bindings_grab_all();
    e_config_save_queue();
    
@@ -365,11 +351,6 @@
        e_widget_list_object_append(o, of, 1, 1, 0.5);
      }  
 
-   of = e_widget_framelist_add(evas, _("Extras"), 0);
-   ob = e_widget_check_add(evas, _("Allow windows to overlap this gadget"), 
&(cfdata->allow_overlap));
-   e_widget_framelist_object_append(of, ob);
-   e_widget_list_object_append(o, of, 1, 1, 0.5);
-
    return o;
 }
 
@@ -420,11 +401,6 @@
        break;
      }
    
-   if (cfdata->allow_overlap && !t->conf->allow_overlap)
-     t->conf->allow_overlap = 1;
-   else if (!cfdata->allow_overlap && t->conf->allow_overlap)
-     t->conf->allow_overlap = 0;
-
    e_border_button_bindings_grab_all();
    e_config_save_queue();
    
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/apps/e/src/modules/temperature/e_mod_main.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -3 -r1.54 -r1.55
--- e_mod_main.c        3 Feb 2006 01:07:21 -0000       1.54
+++ e_mod_main.c        12 Mar 2006 16:12:59 -0000      1.55
@@ -25,8 +25,6 @@
 
 static void      _temperature_face_level_set(E_Gadget_Face *face, double 
level);
 
-static void    _temperature_cb_update_policy(void *data);
-
 static E_Config_DD *conf_edd;
 static E_Config_DD *conf_face_edd;
 
@@ -166,7 +164,6 @@
    E_CONFIG_LIST(D, T, faces, conf_face_edd);
    E_CONFIG_VAL(D, T, sensor_name, STR);
    E_CONFIG_VAL(D, T, units, INT);
-   E_CONFIG_VAL(D, T, allow_overlap, INT);
 
    e->conf = e_config_domain_load("module.temperature", conf_edd);
    if (!e->conf)
@@ -177,13 +174,11 @@
        e->conf->high = 80;
        e->conf->sensor_name = "temp1";
        e->conf->units = CELCIUS;
-       e->conf->allow_overlap = 0;
      }
    E_CONFIG_LIMIT(e->conf->poll_time, 0.5, 1000.0);
    E_CONFIG_LIMIT(e->conf->low, 0, 100);
    E_CONFIG_LIMIT(e->conf->high, 0, 220);
    E_CONFIG_LIMIT(e->conf->units, CELCIUS, FAHRENHEIT);
-   E_CONFIG_LIMIT(e->conf->allow_overlap, 0, 1);
 
    e->have_temp = -1;
 
@@ -210,11 +205,6 @@
            E_GADMAN_POLICY_HSIZE |
            E_GADMAN_POLICY_VSIZE;
 
-   if (e->conf->allow_overlap == 0)
-     policy &= ~E_GADMAN_POLICY_ALLOW_OVERLAP;
-   else
-     policy |= E_GADMAN_POLICY_ALLOW_OVERLAP;
-
    e_gadman_client_policy_set(face->gmc, policy);
 
    ef->conf = evas_list_nth(e->conf->faces, face->face_num);
@@ -451,34 +441,6 @@
    /* Call all funcs needed to handle update */
    ecore_timer_del(temp->temperature_check_timer);
    temp->temperature_check_timer = ecore_timer_add(temp->conf->poll_time, 
_temperature_cb_check, temp->gad);
-   _temperature_cb_update_policy(temp);
    
 }
 
-void
-_temperature_cb_update_policy(void *data)
-{
-  Temperature *temp;
-  E_Gadget_Face *face;
-  Evas_List *l;
-  E_Gadman_Policy policy;
-  E_Gadget *gad;
-
-  temp = data;
-  if (!temp) return;
-  gad = temp->gad;
-  if (!gad) return;
-
-  for (l = gad->faces; l; l = l->next)
-    {
-      face = l->data;
-      policy = face->gmc->policy;
-
-      if (temp->conf->allow_overlap == 0)
-       policy &= ~E_GADMAN_POLICY_ALLOW_OVERLAP;
-      else
-       policy |= E_GADMAN_POLICY_ALLOW_OVERLAP;
-
-      e_gadman_client_policy_set(face->gmc, policy);
-    }
-}
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/apps/e/src/modules/temperature/e_mod_main.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- e_mod_main.h        26 Jan 2006 05:40:17 -0000      1.16
+++ e_mod_main.h        12 Mar 2006 16:12:59 -0000      1.17
@@ -22,7 +22,6 @@
    Evas_List *faces;
    char *sensor_name;
    Unit units;
-   int allow_overlap;
 };
 
 struct _Config_Face




-------------------------------------------------------
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=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to