From d487bdcfc469b451da55003e69844f2fa1fafd95 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 27 May 2005 10:04:53 +0000 Subject: [PATCH] init splans has a checkbutton to disable it in the future... and e respects the config value SVN revision: 14968 --- data/init/images/Makefile.am | 2 + data/init/images/check1.png | Bin 0 -> 394 bytes data/init/images/check2.png | Bin 0 -> 802 bytes data/init/init.edc | 145 +++++++++++++++++++++++++++++++++++ src/bin/e_config.c | 3 + src/bin/e_config.h | 3 +- src/bin/e_init.c | 14 +++- src/bin/e_main.c | 23 +++--- 8 files changed, 175 insertions(+), 15 deletions(-) create mode 100644 data/init/images/check1.png create mode 100644 data/init/images/check2.png 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 0000000000000000000000000000000000000000..3a246d5e38633f084d4b6b42ad9cf29bc7396eba GIT binary patch literal 394 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE zxL18^+tUJz3nskRqIwK9madyLJymh33rFMWr%WFr8;kkg+xlMKaQkh+Ia}7A#}P?P z3Q8fNty{&O%gjE@Cb*Nk!;mRq?O!&Hr5B=-dk#u8cPJ?F-=1F@-tcDg+Q+ZC@=Ryh z&->5rQ5XH~=CzNv?bevG8k{%QR1NY<4e38Nqm)%3Ic1ib6Gy6NUDOf*C&oF)3*WRQ kYP|k=N^AA{?)dtb{J($Cbug5j{u>mep00i_>zopr0I_48l>h($ literal 0 HcmV?d00001 diff --git a/data/init/images/check2.png b/data/init/images/check2.png new file mode 100644 index 0000000000000000000000000000000000000000..a0ac5f3d1792b38f5ce1f8e68bdbf7224e271659 GIT binary patch literal 802 zcmV+-1Ks?IP)ZyMf-`UVt$H;5ZIaN(Kf7NTpI(mW5#$Xqwg@o}HcL z3+p)tHrf1k^D3qC2mm^OZQD4GLn@WR^E{-K?e;tm*LA5>F0pS%j@u7rm}?rww-Xqv{#$_f(`=Q(o3XYS53?)*MOzh7?C2>?yg&~?4-t?N35 zVGzeLVHi?a6XHCBpRPQjE;97@_amk3C}^67Qi^wfy=HDMWN~qk<>h6fDB{MA<7_WD zoV)dq2h&Te-?$my_sL{39fCNHnV+A>u0N*NNbt+gik)BWr&77cwD?o zEK?{H7#tj=r>Cbw5XUi7Q&VWV#%j-D-1BQl%IDPpQ3-4@#U<23B9p%uDtz4L#0qAl3fSC=j6l*)~L@6sP)gC&)kQv^XZP1XGX1`fbZ#@{@-~7X!1Fu| z!=TYconfig_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."));