Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_config.c e_config.h e_init.c e_main.c 


Log Message:


init splans has a checkbutton to disable it in the future... and e respects
the config value

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -3 -r1.55 -r1.56
--- e_config.c  26 May 2005 12:38:53 -0000      1.55
+++ e_config.c  27 May 2005 10:04:38 -0000      1.56
@@ -109,6 +109,7 @@
 #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 @@
        /* 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->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);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- e_config.h  21 May 2005 02:49:47 -0000      1.27
+++ e_config.h  27 May 2005 10:04:53 -0000      1.28
@@ -46,7 +46,7 @@
  * 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 @@
 struct _E_Config
 {
    int         config_version;
+   int         show_splash;
    char       *desktop_default_background;
    double      menus_scroll_speed;
    double      menus_fast_mouse_move_threshhold;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_init.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- e_init.c    25 May 2005 08:08:44 -0000      1.21
+++ e_init.c    27 May 2005 10:04:53 -0000      1.22
@@ -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 @@
        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 @@
      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();
+}
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_main.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -3 -r1.85 -r1.86
--- e_main.c    26 May 2005 15:30:10 -0000      1.85
+++ e_main.c    27 May 2005 10:04:53 -0000      1.86
@@ -57,7 +57,6 @@
 {
    int ipc_failed = 0;
    int i;
-   int nosplash = 0;
    int nostartup = 0;
    int after_restart = 0; 
    char buf[1024];
@@ -90,7 +89,6 @@
    /* 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 @@
    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 @@
        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."));




-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to