And allow the about page to be shown.

This commit is contained in:
Jaime Thomas 2009-02-19 04:40:53 +00:00
parent 25b42dc3d5
commit fe71ef55d8
6 changed files with 183 additions and 11 deletions

View File

@ -1,8 +1,17 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */ /* vim: set sw=3 ts=3 sts=3 expandtab: */
group { group {
name: "ecdb/about"; name: "ecdb/about";
min: 240 240; min: 300 360;
max: 640 640; 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 { parts {
part { part {
@ -12,8 +21,8 @@ group {
description { description {
state: "default" 0.0; state: "default" 0.0;
min: 240 240; min: 300 360;
max: 640 640; max: 300 360;
rel1 { rel1 {
relative: 0.0 0.0; relative: 0.0 0.0;
@ -49,29 +58,31 @@ group {
} }
part { part {
name: "about"; name: "ecdb.about.text";
type: TEXTBLOCK; type: TEXTBLOCK;
mouse_events: 0; mouse_events: 0;
scale: 1; scale: 1;
description { description {
state: "default" 0.0; state: "default" 0.0;
min: 160 0;
max: 640 640;
rel1 { rel1 {
to_y: "logo"; to_y: "logo";
relative: 0.0 1.0; relative: 0.0 1.0;
offset: 8 -19; offset: 32 17;
} }
rel2 { rel2 {
to_y: "button.base"; to_y: "button.base";
relative: 1.0 0.0; relative: 1.0 0.0;
offset: -1 -1; offset: -33 -17;
} }
text { text {
style: "ecdb.about"; style: "about_style";
min: 1 1; min: 0 1;
text: "text"; text: "text";
} }
} }
@ -98,7 +109,7 @@ group {
rel2 { rel2 {
relative: 1.0 1.0; relative: 1.0 1.0;
offset: -1 -1; offset: -1 -6;
} }
image { image {

View File

@ -3,6 +3,20 @@ group {
name: "ecdb/window"; name: "ecdb/window";
min: 640 390; 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 { parts {
part { part {
name: "background"; 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 { 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 { program {
name: "filelist,visible"; name: "filelist,visible";
signal: "ecdb,filelist,visible"; signal: "ecdb,filelist,visible";

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -30,4 +30,5 @@ images {
image: "progress_bar_right.png" COMP; image: "progress_bar_right.png" COMP;
image: "progress_trough.png" COMP; image: "progress_trough.png" COMP;
image: "logo.png" COMP; image: "logo.png" COMP;
image: "icon_config.png" COMP;
} }

View File

@ -17,6 +17,7 @@ ecdb_SOURCES = \
ecdb_burn_image_gui.c ecdb_burn_image_gui.h \ ecdb_burn_image_gui.c ecdb_burn_image_gui.h \
ecdb_burn_data_gui.c ecdb_burn_data_gui.h \ ecdb_burn_data_gui.c ecdb_burn_data_gui.h \
ecdb_filelist_custom.c ecdb_filelist_custom.h \ ecdb_filelist_custom.c ecdb_filelist_custom.h \
ecdb_about.c ecdb_about.h \
ecdb_common.h ecdb_common.h
ecdb_CFLAGS = @ECDB_CFLAGS@ ecdb_CFLAGS = @ECDB_CFLAGS@

View File

@ -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 _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 _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 static void
_filelist_del(Ewl_Widget *w, void *ev_data __UNUSED__, void *data __UNUSED__) _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 = calloc(1, sizeof(Ecdb_Page));
em->page->gui = edje_object_add(ecore_evas_get(em->main_win_ee)); 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_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); edje_object_size_min_get(em->page->gui, &mw, &mh);
if (mw <= 0) mw = 400; if (mw <= 0) mw = 400;
if (mh <= 0) mh = 300; if (mh <= 0) mh = 300;