From 4486630d8e5b033eaedea2177a52ed40ed9cc8df Mon Sep 17 00:00:00 2001 From: Jaime Thomas Date: Thu, 19 Feb 2009 04:40:53 +0000 Subject: [PATCH] And allow the about page to be shown. --- .../data/themes/default/groups/about.edc | 31 ++-- .../data/themes/default/groups/window.edc | 146 ++++++++++++++++++ .../themes/default/images/icon_config.png | Bin 0 -> 5036 bytes .../data/themes/default/images/images.edc | 1 + experimental/ecdb/trunk/src/Makefile.am | 1 + experimental/ecdb/trunk/src/ecdb_gui.c | 15 +- 6 files changed, 183 insertions(+), 11 deletions(-) create mode 100644 experimental/ecdb/trunk/data/themes/default/images/icon_config.png diff --git a/experimental/ecdb/trunk/data/themes/default/groups/about.edc b/experimental/ecdb/trunk/data/themes/default/groups/about.edc index 52747f20..357d415c 100644 --- a/experimental/ecdb/trunk/data/themes/default/groups/about.edc +++ b/experimental/ecdb/trunk/data/themes/default/groups/about.edc @@ -1,8 +1,17 @@ /* vim: set sw=3 ts=3 sts=3 expandtab: */ group { name: "ecdb/about"; - min: 240 240; - max: 640 640; + min: 300 360; + max: 300 360; + + styles { + style { + name: "about_style"; + base: "font=ecdb/default:style=Bold font_size=10 align=center color=#000 style=soft_shadow shadow_color=#00000020 wrap=word"; + tag: "hilight" "+ font=ecdb/default:style=Bold text_class=tb_light color=#f00 style=soft_shadow"; + tag: "br" "\n"; + } + } parts { part { @@ -12,8 +21,8 @@ group { description { state: "default" 0.0; - min: 240 240; - max: 640 640; + min: 300 360; + max: 300 360; rel1 { relative: 0.0 0.0; @@ -49,29 +58,31 @@ group { } part { - name: "about"; + name: "ecdb.about.text"; type: TEXTBLOCK; mouse_events: 0; scale: 1; description { state: "default" 0.0; + min: 160 0; + max: 640 640; rel1 { to_y: "logo"; relative: 0.0 1.0; - offset: 8 -19; + offset: 32 17; } rel2 { to_y: "button.base"; relative: 1.0 0.0; - offset: -1 -1; + offset: -33 -17; } text { - style: "ecdb.about"; - min: 1 1; + style: "about_style"; + min: 0 1; text: "text"; } } @@ -98,7 +109,7 @@ group { rel2 { relative: 1.0 1.0; - offset: -1 -1; + offset: -1 -6; } image { diff --git a/experimental/ecdb/trunk/data/themes/default/groups/window.edc b/experimental/ecdb/trunk/data/themes/default/groups/window.edc index aba889d4..65890901 100644 --- a/experimental/ecdb/trunk/data/themes/default/groups/window.edc +++ b/experimental/ecdb/trunk/data/themes/default/groups/window.edc @@ -3,6 +3,20 @@ group { name: "ecdb/window"; min: 640 390; + script { + public settings_time_id = 0; + const Float:show_timeout = 1.0; + + public show_settings(val) { + run_program(PROGRAM:"settings,show"); + run_program(PROGRAM:"about_icon,show"); + if (get_int(settings_time_id) != 0) { + cancel_timer(get_int(settings_time_id)); + } + return 0; + } + } + parts { part { name: "background"; @@ -332,9 +346,141 @@ group { } } } + + part { + name: "settings_tab"; + type: RECT; + mouse_events: 1; + scale: 1; + + description { + state: "default" 0.0; + align: 1.0 0.0; + min: 24 24; + max: 24 24; + color: 0 0 0 0; + + rel1 { + relative: 0.0 0.0; + offset: 0 0; + } + + rel2 { + relative: 1.0 1.0; + offset: -1 -1; + } + } + + description { + state: "visible" 0.0; + inherit: "default" 0.0; + min: 72 72; + max: 72 72; + color: 0 0 0 128; + } + } + + part { + name: "about_icon"; + type: IMAGE; + mouse_events: 1; + repeat_events: 1; + scale: 1; + + description { + state: "default" 0.0; + min: 0 0; + max: 0 0; + color: 255 255 255 0; + + rel1 { + to: "settings_tab"; + relative: 0.0 0.0; + offset: 4 4; + } + + rel2 { + to: "settings_tab"; + relative: 1.0 1.0; + offset: -5 -5; + } + + image { + normal: "icon_config.png"; + } + } + + description { + state: "visible" 0.0; + inherit: "default" 0.0; + min: 64 64; + max: 64 64; + color: 255 255 255 255; + } + } } programs { + program { + name: "settings,activate"; + signal: "mouse,in"; + source: "settings_tab"; + script { + new i = timer(show_timeout, "show_settings", 0); + set_int(settings_time_id, i); + } + } + + program { + name: "settings,deactivate"; + signal: "mouse,out"; + source: "settings_tab"; + action: STATE_SET "default" 0.0; + target: "settings_tab"; + transition: DECELERATE 0.3; + } + + program { + name: "scripting,deactivate"; + signal: "mouse,out"; + source: "settings_tab"; + script { + run_program(PROGRAM:"about_icon,hide"); + if (get_int(settings_time_id) != 0) { + cancel_timer(get_int(settings_time_id)); + set_int(settings_time_id, 0); + } + } + } + + program { + name: "about_icon,hide"; + action: STATE_SET "default" 0.0; + target: "about_icon"; + transition: DECELERATE 0.3; + } + + program { + name: "about_icon,show"; + action: STATE_SET "visible" 0.0; + target: "about_icon"; + transition: DECELERATE 0.3; + } + + program { + name: "icon,clicked"; + signal: "mouse,clicked,1"; + source: "about_icon"; + action: SIGNAL_EMIT "ecdb/about/show" "ecdb"; + } + + program { + name: "settings,show"; + action: STATE_SET "visible" 0.0; + target: "settings_tab"; + transition: DECELERATE 0.3; + } + program { name: "filelist,visible"; signal: "ecdb,filelist,visible"; diff --git a/experimental/ecdb/trunk/data/themes/default/images/icon_config.png b/experimental/ecdb/trunk/data/themes/default/images/icon_config.png new file mode 100644 index 0000000000000000000000000000000000000000..9cb5f6d6eba2eca6a107f14533a0bfd707659204 GIT binary patch literal 5036 zcmWky2{cq+9DZYK$XF{oL$VE0Bxb0gnX&xsq@)HBSsJo7vJ4@+u@tfvLPGXr8%vfV zS%+lFzLS0Tf8BHLyXU=g&+p#*z3+bC@7^#2Jq;KWFB1R&FfC1t5!j;tRVV}a{9yld z3~cD!)U`~YVDW+4go5vkE}CX;V1Mer3Q?Cxc?N#uamU_uH+Hsl_p)+*1bBIQ$=VYf z-K?!#9?3ep+NG?j@B#p*q!vcah>%+0*12yna|whixG36I(Ow7fIP#n^2P~xgqlzv9 z%EV*}!NN>N&3AWVp6dZMO9B-Nabg?#Yj_!{tAj99Z_#42}L%1=<%p zQm?eX`f;r_uja2lf+^o}|IONZ?r~l_vk0~wmOMrVxS__BI$E{)yyT8vPRJer4N8y` z<$W;|EB96J^%bdF%8|;vz{AIR!pZjM0N8%E`?Fzw4(N*wNNHMbr+s^NBqP}~L{BZp z2zHl``%f0|7%~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z{kwY%=_WPcgdqNRU@NyKKmQj$O=Jk0w&GG`p}EaqX7S>!qhNX7Q0{~^IA=muvAbH};K7i;X{Mx$bhb#l1?@BN$dlu^>{(-3HG-`f zmBlys9bev@?J}q7z~CMNiRWx=(Oq)%0en;Xv$M1H?w~9Bt*6g zEAev*{-7ZFjAhT;TQ8+hNTicz%>yR_;e;dZSe&EYy|lwLR6U3b8_XxNY#?!|WTBLi zv=6G0{(~CN!hdc9BkQz;q2I~R6QV!z&vk3DeNHc+h1VXg)>w<{zOj*#l0pVfm{!MC zv6>6dr@G~DRD4Ff+Uk|qX|8XQmte;A`&66NQk&I#S!;!t?s3S9ofn~HntVrG4UPxeo<$}@AW93#$`*Es&TAf9pM&`v+8$RKiYp~c; n*v0!VrqXp*PC0;^ZF|mh2l5ZEeZ=Fzn>9cStA{C4w+#Freaei= literal 0 HcmV?d00001 diff --git a/experimental/ecdb/trunk/data/themes/default/images/images.edc b/experimental/ecdb/trunk/data/themes/default/images/images.edc index df1d0f97..a2ca3d24 100644 --- a/experimental/ecdb/trunk/data/themes/default/images/images.edc +++ b/experimental/ecdb/trunk/data/themes/default/images/images.edc @@ -30,4 +30,5 @@ images { image: "progress_bar_right.png" COMP; image: "progress_trough.png" COMP; image: "logo.png" COMP; + image: "icon_config.png" COMP; } diff --git a/experimental/ecdb/trunk/src/Makefile.am b/experimental/ecdb/trunk/src/Makefile.am index 2bece769..aa5a2546 100644 --- a/experimental/ecdb/trunk/src/Makefile.am +++ b/experimental/ecdb/trunk/src/Makefile.am @@ -17,6 +17,7 @@ ecdb_SOURCES = \ ecdb_burn_image_gui.c ecdb_burn_image_gui.h \ ecdb_burn_data_gui.c ecdb_burn_data_gui.h \ ecdb_filelist_custom.c ecdb_filelist_custom.h \ + ecdb_about.c ecdb_about.h \ ecdb_common.h ecdb_CFLAGS = @ECDB_CFLAGS@ diff --git a/experimental/ecdb/trunk/src/ecdb_gui.c b/experimental/ecdb/trunk/src/ecdb_gui.c index 7800c0ef..dd124015 100644 --- a/experimental/ecdb/trunk/src/ecdb_gui.c +++ b/experimental/ecdb/trunk/src/ecdb_gui.c @@ -3,7 +3,7 @@ static void ecdb_handle_typebuf(Evas_Object *gui, Ewl_Widget *fl); static void ecdb_cb_welcome_page_buttons_clicked(void *data, Evas_Object *o, - const char *emission, const char *source); + const char *emission, const char *source); static void ecdb_filelist_show(Ecdb_Page *page); static void ecdb_welcome_page_hide_finished(void *data, Evas_Object *o, const char *emission, @@ -11,6 +11,17 @@ static void ecdb_welcome_page_hide_finished(void *data, Evas_Object *o, static void _page_del(void *data, Evas *e, Evas_Object *obj, void *ev); static void _filelist_del(Ewl_Widget *w, void *ev_data, void *data); +static void ecdb_welcome_page_show_about(void *data, Evas_Object *o, + const char *emission, const char *source); + +static void +ecdb_welcome_page_show_about(void *data __UNUSED__, Evas_Object *o __UNUSED__, + const char *emission __UNUSED__, + const char *source __UNUSED__) +{ + ecdb_about_show(); +} + static void _filelist_del(Ewl_Widget *w, void *ev_data __UNUSED__, void *data __UNUSED__) { @@ -223,6 +234,8 @@ ecdb_create_main_gui(void) em->page = calloc(1, sizeof(Ecdb_Page)); em->page->gui = edje_object_add(ecore_evas_get(em->main_win_ee)); edje_object_file_set(em->page->gui, em->theme_path, "ecdb/window"); + edje_object_signal_callback_add(em->page->gui, "ecdb/about/show", + "ecdb", ecdb_welcome_page_show_about, NULL); edje_object_size_min_get(em->page->gui, &mw, &mh); if (mw <= 0) mw = 400; if (mh <= 0) mh = 300;