diff --git a/data/init/images/Makefile.am b/data/init/images/Makefile.am index 392653bc9..c1ccbc534 100644 --- a/data/init/images/Makefile.am +++ b/data/init/images/Makefile.am @@ -1,6 +1,8 @@ MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = \ brushed.png \ +check1.png \ +check2.png \ loop_eintro_121.png \ loop_eintro_122.png \ loop_eintro_123.png \ diff --git a/data/init/images/check1.png b/data/init/images/check1.png new file mode 100644 index 000000000..3a246d5e3 Binary files /dev/null and b/data/init/images/check1.png differ diff --git a/data/init/images/check2.png b/data/init/images/check2.png new file mode 100644 index 000000000..a0ac5f3d1 Binary files /dev/null and b/data/init/images/check2.png differ diff --git a/data/init/init.edc b/data/init/init.edc index 1904e1cef..47567d2b0 100644 --- a/data/init/init.edc +++ b/data/init/init.edc @@ -64,6 +64,8 @@ images { image: "brushed.png" COMP; image: SM"shadow.png" LOSSY 70; image: SM"reflection_overlay.png" LOSSY 70; + image: "check1.png" COMP; + image: "check2.png" COMP; #ifdef ALLFRAMES image: SM"start_eintro_001.png" FRAME; @@ -500,6 +502,7 @@ collections { part { name: "background"; type: RECT; + mouse_events: 0; description { state: "default" 0.0; color: 255 255 255 255; @@ -507,6 +510,7 @@ collections { } part { name: "background_image"; + mouse_events: 0; description { state: "default" 0.0; image { @@ -522,6 +526,7 @@ collections { } part { name: "reflection_overlay"; + mouse_events: 0; description { state: "default" 0.0; image { @@ -533,6 +538,7 @@ collections { name: "title"; type: TEXT; effect: SOFT_SHADOW; + mouse_events: 0; description { state: "default" 0.0; align: 0.5 0.0; @@ -587,6 +593,7 @@ collections { name: "status"; type: TEXT; effect: SHADOW; + mouse_events: 0; description { state: "default" 0.0; align: 0.5 0.0; @@ -611,9 +618,115 @@ collections { } } } + part { + name: "disable_text"; + type: TEXT; + effect: SHADOW; + mouse_events: 0; + description { + state: "default" 0.0; + align: 0.0 0.5; + rel1 { + relative: 0.0 0.0; + offset: 5 5; + } + rel2 { + relative: 0.0 0.0; + offset: 5 20; + } + color: 0 0 0 128; + color3: 255 255 255 128; + text { + text: "Disable this splash screen in future."; + font: "Edje Vera"; + size: SSIZE; + min: 1 1; + align: 0.0 0.5; + } + } + } + part { + name: "disable_check"; + mouse_events: 0; + description { + state: "default" 0.0; + min: 16 16; + max: 16 16; + align: 0.0 0.5; + rel1 { + relative: 1.0 0.0; + offset: 5 0; + to: "disable_text"; + } + rel2 { + relative: 1.0 1.0; + offset: 5 -1; + to: "disable_text"; + } + image { + normal: "check1.png"; + } + } + description { + state: "active" 0.0; + inherit: "default" 0.0; + image { + normal: "check2.png"; + } + } + } + part { + name: "enable_event"; + type: RECT; + description { + state: "default" 0.0; + visible: 0; + color: 0 0 0 0; + rel1 { + to: "disable_text"; + relative: 0.0 0.0; + offset: -5 -5; + } + rel2 { + to: "disable_check"; + relative: 1.0 1.0; + offset: 4 4; + } + } + description { + state: "active" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { + name: "disable_event"; + type: RECT; + description { + state: "default" 0.0; + visible: 1; + color: 0 0 0 0; + rel1 { + to: "disable_text"; + relative: 0.0 0.0; + offset: -5 -5; + } + rel2 { + to: "disable_check"; + relative: 1.0 1.0; + offset: 4 4; + } + } + description { + state: "active" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } part { name: "icons"; type: SWALLOW; + mouse_events: 0; description { state: "default" 0.0; align: 0.5 0.0; @@ -635,6 +748,7 @@ collections { part { name: "logo_point"; type: RECT; + mouse_events: 0; description { state: "default" 0.0; color: 255 255 255 0; @@ -652,6 +766,7 @@ collections { part { name: "logo"; clip_to: "logo_point"; + mouse_events: 0; description { state: "default" 0.0; visible: 0; @@ -1136,6 +1251,7 @@ collections { } part { name: "shadow"; + mouse_events: 0; description { state: "default" 0.0; image { @@ -1187,6 +1303,35 @@ collections { target: "logo"; after: "logo_animate4"; } + + program { + name: "disable_down"; + signal: "mouse,down,1"; + source: "disable_event"; + action: STATE_SET "active" 0.0; + target: "disable_check"; + target: "disable_event"; + target: "enable_event"; + after: "disable_on"; + } + program { + name: "enable_down"; + signal: "mouse,down,1"; + source: "enable_event"; + action: STATE_SET "default" 0.0; + target: "disable_check"; + target: "disable_event"; + target: "enable_event"; + after: "disable_off"; + } + program { + name: "disable_on"; + action: SIGNAL_EMIT "disable_state" "disable"; + } + program { + name: "disable_off"; + action: SIGNAL_EMIT "disable_state" "enable"; + } } } group { diff --git a/src/bin/e_config.c b/src/bin/e_config.c index 8980d3e9c..6bef8efe1 100644 --- a/src/bin/e_config.c +++ b/src/bin/e_config.c @@ -109,6 +109,7 @@ e_config_init(void) #define D _e_config_edd /**/ /* == already configurable via ipc */ E_CONFIG_VAL(D, T, config_version, INT); /**/ + E_CONFIG_VAL(D, T, show_splash, INT); /**/ E_CONFIG_VAL(D, T, desktop_default_background, STR); /**/ E_CONFIG_VAL(D, T, menus_scroll_speed, DOUBLE); /**/ E_CONFIG_VAL(D, T, menus_fast_mouse_move_threshhold, DOUBLE); /**/ @@ -182,6 +183,7 @@ e_config_init(void) /* DEFAULT CONFIG */ e_config = E_NEW(E_Config, 1); e_config->config_version = E_CONFIG_FILE_VERSION; + e_config->show_splash = 1; e_config->desktop_default_background = strdup(PACKAGE_DATA_DIR"/data/themes/default.edj"); e_config->menus_scroll_speed = 1000.0; e_config->menus_fast_mouse_move_threshhold = 300.0; @@ -674,6 +676,7 @@ e_config_init(void) // e_config->evas_engine_container = E_EVAS_ENGINE_GL_X11; E_CONFIG_LIMIT(e_config->menus_scroll_speed, 1.0, 20000.0); + E_CONFIG_LIMIT(e_config->show_splash, 0, 1); E_CONFIG_LIMIT(e_config->menus_fast_mouse_move_threshhold, 1.0, 2000.0); E_CONFIG_LIMIT(e_config->menus_click_drag_timeout, 0.0, 10.0); E_CONFIG_LIMIT(e_config->border_shade_animate, 0, 1); diff --git a/src/bin/e_config.h b/src/bin/e_config.h index d131810c4..f19fd5a08 100644 --- a/src/bin/e_config.h +++ b/src/bin/e_config.h @@ -46,7 +46,7 @@ typedef Eet_Data_Descriptor E_Config_DD; * defaults for e to work - started at 100 when we introduced this config * versioning feature */ -#define E_CONFIG_FILE_VERSION 106 +#define E_CONFIG_FILE_VERSION 107 #define E_EVAS_ENGINE_DEFAULT 0 #define E_EVAS_ENGINE_SOFTWARE_X11 1 @@ -55,6 +55,7 @@ typedef Eet_Data_Descriptor E_Config_DD; struct _E_Config { int config_version; + int show_splash; char *desktop_default_background; double menus_scroll_speed; double menus_fast_mouse_move_threshhold; diff --git a/src/bin/e_init.c b/src/bin/e_init.c index 296178161..053716330 100644 --- a/src/bin/e_init.c +++ b/src/bin/e_init.c @@ -4,6 +4,7 @@ #include "e.h" static void _e_init_icons_del(void); +static void _e_init_cb_signal_disable(void *data, Evas_Object *obj, const char *emission, const char *source); /* local subsystem globals */ static Ecore_X_Window _e_init_win = 0; @@ -105,7 +106,10 @@ e_init_init(void) evas_object_resize(o, w, h); evas_object_show(o); } - + edje_object_part_text_set(_e_init_object, "disable_text", + _("Disable this splash screen in the future?")); + edje_object_signal_callback_add(_e_init_object, "disable_state", "*", + _e_init_cb_signal_disable, NULL); free(roots); return 1; } @@ -235,3 +239,11 @@ _e_init_icons_del(void) evas_object_del(_e_init_icon_box); _e_init_icon_box = NULL; } + +static void +_e_init_cb_signal_disable(void *data, Evas_Object *obj, const char *emission, const char *source) +{ + if (!strcmp(source, "disable")) e_config->show_splash = 0; + else e_config->show_splash = 1; + e_config_save_queue(); +} diff --git a/src/bin/e_main.c b/src/bin/e_main.c index 73c87c655..4014495b2 100644 --- a/src/bin/e_main.c +++ b/src/bin/e_main.c @@ -57,7 +57,6 @@ main(int argc, char **argv) { int ipc_failed = 0; int i; - int nosplash = 0; int nostartup = 0; int after_restart = 0; char buf[1024]; @@ -90,7 +89,6 @@ main(int argc, char **argv) /* for debugging by redirecting stdout of e to a log file to tail */ setvbuf(stdout, NULL, _IONBF, 0); - if (getenv("NOSPLASH")) nosplash = 1; if (getenv("NOSTARTUP")) nostartup = 1; if (getenv("RESTART")) after_restart = 1; @@ -337,14 +335,17 @@ main(int argc, char **argv) e_font_apply(); e_canvas_recache(); - /* setup init status window/screen */ - if (!e_init_init()) + if (!((!e_config->show_splash) || (after_restart))) { - e_error_message_show(_("Enlightenment cannot set up init screen.\n" - "Perhaps you are out of memory?")); - _e_main_shutdown(-1); + /* setup init status window/screen */ + if (!e_init_init()) + { + e_error_message_show(_("Enlightenment cannot set up init screen.\n" + "Perhaps you are out of memory?")); + _e_main_shutdown(-1); + } + _e_main_shutdown_push(e_init_shutdown); } - _e_main_shutdown_push(e_init_shutdown); /* manage the root window */ if (!_e_main_screens_init()) { @@ -432,11 +433,7 @@ main(int argc, char **argv) else e_startup(E_STARTUP_START); } - if ((nosplash) || (after_restart)) - { - ecore_timer_add(0.0, _e_main_cb_startup_fake_end, NULL); - } - else + if (!((!e_config->show_splash) || (after_restart))) { ecore_timer_add( 3.0, _e_main_cb_startup_fake_status, _("Artificially slowing startup so you can see it all.")); ecore_timer_add( 7.5, _e_main_cb_startup_fake_status, _("This is development code, so be warned."));