Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/data/themes


Modified Files:
        default_clock.edc 


Log Message:


damn - um... patches from mailing list - fix patch with layer number. da.po -
waiting for da.po i can use.. etc :)

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/data/themes/default_clock.edc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- default_clock.edc   13 Feb 2005 10:56:28 -0000      1.3
+++ default_clock.edc   12 Jul 2005 03:53:41 -0000      1.4
@@ -1,6 +1,7 @@
 images {
    image: "e17_clock_bg.png" COMP;
    image: "e17_clock_fg.png" COMP;
+   image: "e17_button.png" COMP;
    image: "e17_clock_seconds_00.png" COMP;
    image: "e17_clock_seconds_01.png" COMP;
    image: "e17_clock_seconds_02.png" COMP;
@@ -187,9 +188,23 @@
    script {
       public clock_cb(val) {
         new buf[11];
+        new digitalVal[15];
+        new hourStr[4], minuteStr[4], secondStr[4];
         new year, month, day, yearday, weekday, hour, minute;
         new Float:second;
         new v;
+        new isAfternoon;
+        new digiBuf[2];
+        new digitalStyle;
+        new DIGITAL_STYLE_NONE, DIGITAL_STYLE_NORMAL, DIGITAL_STYLE_MILITARY;
+
+       DIGITAL_STYLE_NONE = 0;
+       DIGITAL_STYLE_NORMAL = 1;
+       DIGITAL_STYLE_MILITARY = 2;
+
+        get_text(PART:"digitalStyle", digiBuf, 2);
+
+        digitalStyle = atoi(digiBuf);
 
         date(year, month, day, yearday, weekday, hour, minute, second);
         v = round(second);
@@ -200,6 +215,7 @@
 #endif
 #if E17_PROFILE != HIRES_PDA && E17_PROFILE != LOWRES_PDA && E17_PROFILE != 
MEDIUMRES_PDA
         buf[0] = 0;
+        digitalVal[0] = 0;
         if (v < 10) {snprintf(buf, 10, "0%i", v);}
         else        {snprintf(buf, 10, "%i", v);}
         set_state(PART:"seconds", buf, 0.0);
@@ -209,11 +225,61 @@
         if (v < 10) {snprintf(buf, 10, "0%i", v);}
         else        {snprintf(buf, 10, "%i", v);}
         set_state(PART:"minutes", buf, 0.0);
+
         v = ((hour % 12) * 5) + ((minute * 5) / 60);
         buf[0] = 0;
         if (v < 10) {snprintf(buf, 10, "0%i", v);}
         else        {snprintf(buf, 10, "%i", v);}
         set_state(PART:"hour", buf, 0.0);
+
+
+        buf[0] = 0;
+        v = round(second);
+        if (v < 10) {snprintf(buf, 10, "0%i", v);}
+        else        {snprintf(buf, 10, "%i", v);}
+        snprintf(secondStr, 3, "%s", buf);
+
+        buf[0] = 0;
+        if (minute < 10) {snprintf(buf, 10, "0%i", minute);}
+        else        {snprintf(buf, 10, "%i", minute);}
+        snprintf(minuteStr, 3, "%s", buf);
+
+        buf[0] = 0;
+        isAfternoon = 0;
+        v = hour;
+        if (hour >= 12 && hour < 24) { isAfternoon = 1; }
+        if (digitalStyle == DIGITAL_STYLE_MILITARY) {
+                if (v == 0) { v = 24; }
+        } else {
+                v = (v % 12);
+                if (v == 0) { v = 12; }
+        }
+        snprintf(buf, 10, "%i", v);
+        snprintf(hourStr, 3, "%s", buf);
+
+       buf[0] = 0;
+
+       if (isAfternoon == 1) {
+               snprintf(buf, 10, "PM");
+       } else {
+               snprintf(buf, 10, "AM");
+       }
+
+       if (digitalStyle != DIGITAL_STYLE_NONE) {
+               if (digitalStyle == DIGITAL_STYLE_NORMAL) {
+                       snprintf(digitalVal, 14, "%s:%s:%s %s", hourStr, 
minuteStr, secondStr, buf);
+               } else if (digitalStyle == DIGITAL_STYLE_MILITARY) {
+                       snprintf(digitalVal, 14, "%s:%s:%s", hourStr, 
minuteStr, secondStr);
+               }
+
+               set_text(PART:"digital", digitalVal);
+               set_state(PART:"digital", "digital", 0.0);
+               set_state(PART:"digital_bg", "digital", 0.0);
+       } else {
+               set_text(PART:"digital", "");
+               set_state(PART:"digital", "hidden", 0.0);
+               set_state(PART:"digital_bg", "hidden", 0.0);
+       }
       }
    }
    parts {
@@ -521,6 +587,83 @@
            }
         }
       }
+      part {
+        name:          "digital_bg";
+        mouse_events:  0;
+        description {
+           state:    "digital" 0.0;
+           image {
+              normal: "e17_button.png";
+           }
+           rel1 {
+              relative: 0.0 1.0;
+           }
+           rel2 {
+              relative: 1.0 1.2;
+           }
+        }
+        description {
+           state: "hidden" 0.0;
+           image {
+              normal: "e17_button.png";
+           }
+           rel1 {
+              relative: 0.0 0.0;
+           }
+           rel2 {
+              relative: 0.0 0.0;
+           }
+        }
+      }
+      part {
+        name:           "digital";
+        type:           TEXT;
+        effect:         SOFT_SHADOW;
+        description {
+           state: "digital" 0.0;
+           min: 0 11;
+           rel1 {
+              relative: 0.0 0.9;
+           }
+           rel2 {
+              relative: 1.0 1.0;
+           }
+           color: 255 255 255 255;
+           color3: 0 0 0 32;
+           text {
+              text:     "00:00:00 AM";
+              font:     "Edje Vera";
+              size:     7;
+              min:      1 0;
+              fit:      0 1;
+              align:    0.5 1.0;
+           }
+        }
+        description {
+           state: "hidden" 0.0;
+           aspect: 0.0 0.0;
+           rel1 {
+              relative: 0.0 0.0;
+           }
+           rel2 {
+              relative: 0.0 0.0;
+           }
+        }
+      }
+      part {
+        name:           "digitalStyle";
+        type:           TEXT;
+        description {
+           state: "hidden" 0.0;
+           aspect: 0.0 0.0;
+           rel1 {
+              relative: 0.0 0.0;
+           }
+           rel2 {
+              relative: 0.0 0.0;
+           }
+        }
+      }
    }
    programs {
       program {




-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to