Enlightenment CVS committal Author : kiwi Project : e_modules Module : devian
Dir : e_modules/devian/data/themes/minimal/minimal_popup Modified Files: minimal_popup.edc minimal_popup_parts.edc minimal_popup_programs.edc Log Message: Work on picture loading, popups, and some cleanups * Rewrite popup system * Popups when loading picture, you can disable it * Fix loading in background and you can now stop thumbnailing when changing directory of pictures * Indent and cleanups in code =================================================================== RCS file: /cvs/e/e_modules/devian/data/themes/minimal/minimal_popup/minimal_popup.edc,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- minimal_popup.edc 3 Apr 2006 06:18:29 -0000 1.1 +++ minimal_popup.edc 2 May 2006 14:24:23 -0000 1.2 @@ -1,6 +1,12 @@ +/* Popup warning group */ + +#define POPUP_WARN_TYPE_NEWS 0 +#define POPUP_WARN_TYPE_INFO 1 +#define POPUP_WARN_TYPE_ERROR 2 + #define MSG_RECV_POPUP_WARN_SHOW_DISABLE 0 +#define MSG_RECV_POPUP_WARN_TYPE 1 -/* Popup warning group */ group { name: "devian/popup/warn"; @@ -8,6 +14,8 @@ script { public show_disabled; + public popup_type; + public popup_in_update; /* Message from C code */ public message(Msg_Type: type, id, msg) @@ -20,8 +28,34 @@ set_state(PART:"disable", "visible", 0.0); } } - } - } + if (id == MSG_RECV_POPUP_WARN_TYPE){ + if (type == MSG_INT){ + set_int(popup_type, getarg(2)); + if (get_int(popup_type) == POPUP_WARN_TYPE_NEWS) + { + if (get_int(popup_in_update)) + run_program(PROGRAM:"update_anim_news"); + else + set_state(PART:"logo", "default", 0.0); + } + if (get_int(popup_type) == POPUP_WARN_TYPE_INFO) + { + if (get_int(popup_in_update)) + run_program(PROGRAM:"update_anim_info"); + else + set_state(PART:"logo", "info", 0.0); + } + if (get_int(popup_type) == POPUP_WARN_TYPE_ERROR) + { + if (get_int(popup_in_update)) + run_program(PROGRAM:"update_anim_error"); + else + set_state(PART:"logo", "error", 0.0); + } + } + } + } + } parts { =================================================================== RCS file: /cvs/e/e_modules/devian/data/themes/minimal/minimal_popup/minimal_popup_parts.edc,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- minimal_popup_parts.edc 3 Apr 2006 06:18:29 -0000 1.1 +++ minimal_popup_parts.edc 2 May 2006 14:24:23 -0000 1.2 @@ -46,14 +46,44 @@ } image { - normal: "logo.png"; + normal: "popup_logo_news.png"; } } + description{ + state: "info" 0.0; + inherit: "default" 0.0; + image{ + normal: "popup_logo_info.png"; + } + } + description{ + state: "error" 0.0; + inherit: "default" 0.0; + image{ + normal: "popup_logo_error.png"; + } + } description { - state: "hidden" 0.0; + state: "news_hidden" 0.0; inherit: "default" 0.0; color: 255 255 255 0; + } + description{ + state: "info_hidden" 0.0; + inherit: "default" 0.0; + color: 255 255 255 0; + image{ + normal: "popup_logo_info.png"; + } + } + description{ + state: "error_hidden" 0.0; + inherit: "default" 0.0; + color: 255 255 255 0; + image{ + normal: "popup_logo_error.png"; + } } } part =================================================================== RCS file: /cvs/e/e_modules/devian/data/themes/minimal/minimal_popup/minimal_popup_programs.edc,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- minimal_popup_programs.edc 3 Apr 2006 06:18:29 -0000 1.1 +++ minimal_popup_programs.edc 2 May 2006 14:24:23 -0000 1.2 @@ -1,3 +1,12 @@ +program{ + name: "init"; + signal: "load"; + source: ""; + script{ + set_int(popup_type, POPUP_WARN_TYPE_NEWS); + set_int(popup_in_update, 0); + } +} program { name: "close_click"; @@ -13,18 +22,19 @@ name: "disable_click"; signal: "mouse,up,1"; source: "disable"; - action: STATE_SET "clicked" 0.0; - transition: DECELERATE 1.5; - target: "disable"; - after: "disable_click_1"; -} -program -{ - name: "disable_click_1"; script { emit("desactivate", "popup"); } + after: "disable_click_1"; +} +program +{ + name: "disable_click_1"; + action: STATE_SET "clicked" 0.0; + transition: DECELERATE 1.5; + target: "disable"; + after: "close_click"; } program { @@ -36,20 +46,68 @@ emit("next", "popup"); } } -program -{ +program{ name: "update_anim"; signal: "update"; source: "devian"; - action: STATE_SET "hidden" 0.0; - transition: DECELERATE 1; - target: "logo"; - after: "update_anim_1"; + script{ + if (get_int(popup_in_update) == 0) + { + set_int(popup_in_update, 1); + if (get_int(popup_type) == POPUP_WARN_TYPE_NEWS) + run_program(PROGRAM:"update_anim_news"); + if (get_int(popup_type) == POPUP_WARN_TYPE_INFO) + run_program(PROGRAM:"update_anim_info"); + if (get_int(popup_type) == POPUP_WARN_TYPE_ERROR) + run_program(PROGRAM:"update_anim_error"); + } + } } -program -{ - name: "update_anim_1"; +program{ + name: "update_anim_news"; + action: STATE_SET "news_hidden" 0.0; + transition: DECELERATE 1; + target: "logo"; + after: "update_anim_news_1"; + after: "update_anim_end"; +} +program{ + name: "update_anim_news_1"; action: STATE_SET "default" 0.0; - transition: DECELERATE 1; - target: "logo"; + transition: DECELERATE 1; + target: "logo"; +} +program{ + name: "update_anim_info"; + action: STATE_SET "info_hidden" 0.0; + transition: DECELERATE 1; + target: "logo"; + after: "update_anim_info_1"; + after: "update_anim_end"; +} +program{ + name: "update_anim_info_1"; + action: STATE_SET "info" 0.0; + transition: DECELERATE 1; + target: "logo"; +} +program{ + name: "update_anim_error"; + action: STATE_SET "error_hidden" 0.0; + transition: DECELERATE 1; + target: "logo"; + after: "update_anim_error_1"; + after: "update_anim_end"; +} +program{ + name: "update_anim_error_1"; + action: STATE_SET "error" 0.0; + transition: DECELERATE 1; + target: "logo"; +} +program{ + name: "update_anim_end"; + script{ + set_int(popup_in_update, 0); + } } ------------------------------------------------------- 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