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 00000000..9cb5f6d6 Binary files /dev/null and b/experimental/ecdb/trunk/data/themes/default/images/icon_config.png differ 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;