Enlightenment CVS committal

Author  : devilhorns
Project : e_modules
Module  : mixer

Dir     : e_modules/mixer


Modified Files:
        e_mod_main.c mixer.edc 


Log Message:
Icon changes now when slider value changes to reflect current volume.

===================================================================
RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- e_mod_main.c        11 Sep 2006 09:54:10 -0000      1.10
+++ e_mod_main.c        11 Sep 2006 10:03:21 -0000      1.11
@@ -127,6 +127,7 @@
    mixer->base = edje_object_add(gc->evas);
    edje_object_file_set(mixer->base, buf, "e/modules/mixer/main");
    evas_object_show(mixer->base);
+   edje_object_signal_emit(mixer->base, "low", "");
 
    _mixer_system_init(mixer);
    
@@ -633,6 +634,13 @@
    val = e_slider_value_get(obj);
    printf("Slider value: %f\n", val);
    mixer->mix_sys->set_volume(ci->card_id, ci->channel_id, (int)(val * 100));
+
+   if ((val * 100) < 33)
+     edje_object_signal_emit(mixer->base, "low", "");
+   else if (((val * 100) >= 34) && ((val * 100) < 66))
+     edje_object_signal_emit(mixer->base, "medium", "");
+   else if ((val * 100) > 66)
+     edje_object_signal_emit(mixer->base, "high", "");
 }
 
 /* Called when the simple window is resized */
===================================================================
RCS file: /cvs/e/e_modules/mixer/mixer.edc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- mixer.edc   11 Sep 2006 09:06:50 -0000      1.3
+++ mixer.edc   11 Sep 2006 10:03:21 -0000      1.4
@@ -66,6 +66,37 @@
                         }
                    }
               } /* end icon part */
-         } /* end parts */     
+         } /* end parts */
+       programs 
+         {
+            program 
+              {
+                 name: "go_low";
+                 signal: "low";
+                 action: STATE_SET "low" 0.0;
+                 target: "icon";
+              }
+            program 
+              {
+                 name: "go_medium";
+                 signal: "medium";
+                 action: STATE_SET "medium" 0.0;
+                 target: "icon";
+              }
+            program 
+              {
+                 name: "go_high";
+                 signal: "high";
+                 action: STATE_SET "default" 0.0;
+                 target: "icon";
+              }
+            program 
+              {
+                 name: "go_mute";
+                 signal: "muted";
+                 action: STATE_SET "mute" 0.0;
+                 target: "icon";
+              }
+         } /* end programs */  
      } /* end group */
 } /* end collections */



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to