Enlightenment CVS committal

Author  : devilhorns
Project : e_modules
Module  : evolume

Dir     : e_modules/evolume/src/module


Modified Files:
        e_mod_main.h e_mod_cdialog.c e_mod_config.c e_mod_main.c 
        e_mod_pack.c e_mod_slider.c e_mod_util.c e_mod_volume.c 


Log Message:
Removed some extra fprintfs (Be Quiet !!).
Allow this module to be configured from the Module Config Panel by providing
e_modapi_config function.

===================================================================
RCS file: /cvs/e/e_modules/evolume/src/module/e_mod_main.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_mod_main.h        5 Apr 2006 17:48:48 -0000       1.2
+++ e_mod_main.h        6 Apr 2006 19:13:37 -0000       1.3
@@ -18,11 +18,19 @@
 static char *
 D_(char *str)
 {
-   fprintf(stderr, "dgettext(%s, %s)\n", PACKAGE, str);
    return dgettext(PACKAGE, str);
 }
 
 extern char *module_root;
 extern char *module_theme;
+
+EAPI extern E_Module_Api e_modapi;
+
+EAPI void *e_modapi_init(E_Module *m);
+EAPI int e_modapi_shutdown(E_Module *m);
+EAPI int e_modapi_save(E_Module *m);
+EAPI int e_modapi_info(E_Module *m);
+EAPI int e_modapi_about(E_Module *m);
+EAPI int e_modapi_config(E_Module *m);
 
 #endif //E_MOD_MAIN_H_INCLUDED
===================================================================
RCS file: /cvs/e/e_modules/evolume/src/module/e_mod_cdialog.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_mod_cdialog.c     5 Apr 2006 17:48:48 -0000       1.3
+++ e_mod_cdialog.c     6 Apr 2006 19:13:37 -0000       1.4
@@ -60,7 +60,6 @@
 
              mcfd = calloc(1, sizeof(Mixer_CFData));
              mcfd->mixer = evas_list_data(l1);
-             fprintf(stderr, "mcfd->mixer->real = %s\n", mcfd->mixer->real);
              mcfd->active = mcfd->mixer->active;
              cfdata->mixers = evas_list_append(cfdata->mixers, mcfd);
           }
===================================================================
RCS file: /cvs/e/e_modules/evolume/src/module/e_mod_config.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_mod_config.c      5 Apr 2006 17:48:48 -0000       1.2
+++ e_mod_config.c      6 Apr 2006 19:13:37 -0000       1.3
@@ -115,7 +115,7 @@
 #endif
 
 #if 0
-        fprintf(stderr, "cms->system_id = %x, msn->system_id = %x\n", 
cms->system_id, msn->system_id);
+        DBG(stderr, "cms->system_id = %x, msn->system_id = %x\n", 
cms->system_id, msn->system_id);
 #endif
         if (SYSTEM_ID(cms->system_id) == SYSTEM_ID(msn->system_id))
            return cms;
@@ -157,7 +157,7 @@
         mixer_conf = evas_list_data(l);
 
 #if 0
-        fprintf(stderr, "mixer_id1 = %x, mixer_id2 = %x\n", 
mixer_conf->mixer_id, mixer_name->mixer_id);
+        DBG(stderr, "mixer_id1 = %x, mixer_id2 = %x\n", mixer_conf->mixer_id, 
mixer_name->mixer_id);
 #endif
         if (MIXER_ID(mixer_conf->mixer_id) == MIXER_ID(mixer_name->mixer_id))
           {
@@ -214,11 +214,11 @@
 #endif
 
 #if 0
-        fprintf(stderr, "elem->elem_id = %x, elem->elem_id = %x\n", 
ELEM_ID(elem->elem_id), elem->elem_id);
+        DBG(stderr, "elem->elem_id = %x, elem->elem_id = %x\n", 
ELEM_ID(elem->elem_id), elem->elem_id);
 #endif
         if (ELEM_ID(elem->elem_id) == ELEM_ID(melem->elem_id))
           {
-             fprintf(stderr, "found: %x\n", elem->elem_id);
+             DBG(stderr, "found: %x\n", elem->elem_id);
              return elem;
           }
      }
===================================================================
RCS file: /cvs/e/e_modules/evolume/src/module/e_mod_main.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_mod_main.c        5 Apr 2006 17:48:48 -0000       1.2
+++ e_mod_main.c        6 Apr 2006 19:13:37 -0000       1.3
@@ -16,6 +16,7 @@
 
 #include "e_mod_main.h"
 #include "e_mod_volume.h"
+#include "e_mod_cdialog.h"
 
 char *module_root = NULL;
 char *module_theme = NULL;
@@ -40,7 +41,6 @@
 
       snprintf(buf, 128, "%s/volume.edj", module_root);
       module_theme = strdup(buf);
-      fprintf(stderr, "module_theme = %s\n", module_theme);
    }
 
    /* actually init buttons */
@@ -71,7 +71,6 @@
    Volume *volume;
 
    volume = module->data;
-//   DBG(stderr,"conf_edd = %p, volume->conf = %p\n", conf_edd, volume->conf);
    e_config_domain_save("module.evolume", conf_edd, volume->conf);
    return 1;
 }
@@ -81,7 +80,7 @@
 {
    char buf[1024];
 
-   snprintf(buf, 1024, "%s/volume_icon.png", module_root);
+   snprintf(buf, 1024, "%s/module_icon.png", module_root);
    module->icon_file = strdup(buf);
    return 1;
 }
@@ -89,6 +88,38 @@
 int
 e_modapi_about(E_Module *module __UNUSED__)
 {
-   e_module_dialog_show("Enlightenment Button Module", "A simple module to 
give E17 a volume control " "for some mixers.");
+   e_module_dialog_show(_("Enlightenment Evolume Module"), 
+                       _("A simple module to give E17 a volume control for 
some mixers."));
    return 1;
+}
+
+int
+e_modapi_config(E_Module *module) 
+{
+   Volume *v;
+   E_Container *con;
+   Evas_List *l;
+   
+   v = module->data;
+   if (!v)
+      return 0;
+   if (!v->faces)
+      return 0;
+
+   con = e_container_current_get(e_manager_current_get());
+   for (l = v->faces; l; l = l->next) 
+     {
+       Volume_Face *vf;
+       
+       vf = l->data;
+       if (!vf)
+         continue;
+       
+       if (vf->con == con) 
+         {
+            e_volume_config_module(vf->con, vf);
+            break;
+         }
+     }
+   return 1;   
 }
===================================================================
RCS file: /cvs/e/e_modules/evolume/src/module/e_mod_pack.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_mod_pack.c        5 Apr 2006 17:48:48 -0000       1.2
+++ e_mod_pack.c        6 Apr 2006 19:13:37 -0000       1.3
@@ -51,7 +51,6 @@
    l = face->sliders;
    face->sliders = e_util_sliders_sort(l);
 
-   fprintf(stderr, "%s\n", __FUNCTION__);
    for (l = face->sliders, c = 0; l; l = evas_list_next(l), c++)
      {
         Mixer_Slider *sl;
@@ -71,7 +70,6 @@
 
      }
 
-   fprintf(stderr, "nth = %d\n", nth);
    if (nth == -1)
       nth = evas_list_count(face->sliders);
    if (nth == 0)
===================================================================
RCS file: /cvs/e/e_modules/evolume/src/module/e_mod_slider.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_mod_slider.c      5 Apr 2006 17:48:48 -0000       1.2
+++ e_mod_slider.c      6 Apr 2006 19:13:37 -0000       1.3
@@ -233,7 +233,6 @@
 
    /* Swallow object */
    slider->swallow_object = (Evas_Object *)edje_object_add(ev);
-   fprintf(stderr, "%s\n", module_theme);
    edje_object_file_set(slider->swallow_object, module_theme, "volume/mixer");
 
    slider->orient = orient;
@@ -302,7 +301,6 @@
    for (l = face->volume->mixer_system_names; l; l = evas_list_next(l))
      {
         msn = evas_list_data(l);
-        fprintf(stderr, "conf->elem_id = %x, system_id = %x\n", conf->elem_id, 
msn->system_id);
 
         if (SYSTEM_ID(conf->elem_id) == msn->system_id)
           {
@@ -310,8 +308,6 @@
                {
                   mixer_name = evas_list_data(l1);
 
-                  fprintf(stderr, "conf->elem_id = %x, mixer_id = %x\n", 
conf->elem_id, mixer_name->mixer_id);
-
                   if (MIXER_ID(conf->elem_id) == mixer_name->mixer_id);
                   break;
                }
@@ -330,20 +326,13 @@
         for (l2 = mixer->elems; l2; l2 = evas_list_next(l2))
           {
              melem = evas_list_data(l2);
-
-             fprintf(stderr, "conf->hash = %x, e_util_hash_gen = %x\n", 
conf->elem_id, GET_ELEM_ID(melem));
-
              if (conf->elem_id == GET_ELEM_ID(melem))
                {
-                  fprintf(stderr, "Calling e_volume_slider_create\n");
                   return e_volume_slider_create(melem, face->con->bg_evas, 
face->conf->orient, conf->balance, face, ref);
                }
           }
      }
-
-   fprintf(stderr, "conf->elem_id = %x, not found\n", conf->elem_id);
    return NULL;
-
 }
 
 void
===================================================================
RCS file: /cvs/e/e_modules/evolume/src/module/e_mod_util.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_mod_util.c        5 Apr 2006 17:48:48 -0000       1.2
+++ e_mod_util.c        6 Apr 2006 19:13:37 -0000       1.3
@@ -137,10 +137,7 @@
         elem_id = GET_ELEM_ID(melem);
 
         if (elem_id == conf->elem_id)
-          {
-             fprintf(stderr, "elem_id = %d, conf->elem_id = %d\n", elem_id, 
conf->elem_id);
-             return melem;
-          }
+         return melem;
      }
 
    return NULL;
===================================================================
RCS file: /cvs/e/e_modules/evolume/src/module/e_mod_volume.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_mod_volume.c      5 Apr 2006 17:48:48 -0000       1.2
+++ e_mod_volume.c      6 Apr 2006 19:13:37 -0000       1.3
@@ -405,10 +405,7 @@
 e_volume_mixers_create(Volume_Face *face, Mixer *mixer, Evas *evas, int ref)
 {
    _volume_get_entry_height(face, evas);
-
-   fprintf(stderr, "mixer = %p\n", mixer);
    _volume_mixer_create(mixer, evas, face, ref);
-
    return 1;
 }
 




-------------------------------------------------------
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