On Wed, 12 Sep 2012 09:42:30 -0700 "Enlightenment SVN"
<no-re...@enlightenment.org> said:

ummmmmmmmmmmmmmmm.

1. segfault land. you never check fileman_config->dev and path... and
insta-segv! (they are null - funny that, by default).
2. this is broken in that it ONLY remembers desktop 0 (the first screen). what
about the other screen? the whole config premise is broken as it stores only
one dev and path, not one per screen(zone/whatever). :)

thanks for waking me up first thing in the morning to my e segving :)

/me gives discomfitor a gold star for his b0rker team efforts

:)

> Log:
> efm now saves your first screen's desktop directory when desktop navigation
> is enabled so that it can display that directory on subsequent startups 
> 
> Author:       discomfitor
> Date:         2012-09-12 09:42:29 -0700 (Wed, 12 Sep 2012)
> New Revision: 76547
> Trac:         http://trac.enlightenment.org/e/changeset/76547
> 
> Modified:
>   trunk/e/src/modules/fileman/e_fwin.c
> trunk/e/src/modules/fileman/e_mod_main.c
> trunk/e/src/modules/fileman/e_mod_main.h 
> 
> Modified: trunk/e/src/modules/fileman/e_fwin.c
> ===================================================================
> --- trunk/e/src/modules/fileman/e_fwin.c      2012-09-12 16:34:45 UTC (rev
> 76546) +++ trunk/e/src/modules/fileman/e_fwin.c       2012-09-12 16:42:29
> UTC (rev 76547) @@ -459,7 +459,7 @@
>              if (e_fwin_zone_find(zone)) continue;
>              if ((zone->container->num == 0) && (zone->num == 0) &&
>                  (fileman_config->view.show_desktop_icons))
> -              e_fwin_zone_new(zone, "desktop", "/");
> +              e_fwin_zone_new(zone, fileman_config->dev,
> fileman_config->path); else
>                {
>                   char buf[256];
> @@ -1604,7 +1604,14 @@
>       e_fm2_custom_theme_set(obj, NULL);
>  
>     _e_fwin_icon_mouse_out(fwin, NULL, NULL);
> -   if (fwin->zone) return;
> +   if (fwin->zone)
> +     {
> +        if (fwin->zone->num) return;
> +        e_fm2_path_get(page->fm_obj, &dev, &path);
> +        eina_stringshare_replace(&fileman_config->dev, dev);
> +        eina_stringshare_replace(&fileman_config->path, path);
> +        return;
> +     }
>     _e_fwin_window_title_set(page);
>     if (page->setting) return;
>     if (page->flist) e_fm2_deselect_all(page->flist);
> 
> Modified: trunk/e/src/modules/fileman/e_mod_main.c
> ===================================================================
> --- trunk/e/src/modules/fileman/e_mod_main.c  2012-09-12 16:34:45 UTC
> (rev 76546) +++ trunk/e/src/modules/fileman/e_mod_main.c      2012-09-12
> 16:42:29 UTC (rev 76547) @@ -93,7 +93,7 @@
>                    if (e_fwin_zone_find(zone)) continue;
>                    if ((zone->container->num == 0) && (zone->num == 0) &&
>                        (fileman_config->view.show_desktop_icons))
> -                    e_fwin_zone_new(zone, "desktop", "/");
> +                    e_fwin_zone_new(zone, fileman_config->dev,
> fileman_config->path); else
>                      {
>                         char buf[256];
> @@ -701,6 +701,8 @@
>     E_CONFIG_VAL(D, T, tooltip.delay, DOUBLE);
>     E_CONFIG_VAL(D, T, tooltip.size, DOUBLE);
>     E_CONFIG_VAL(D, T, tooltip.enable, UCHAR);
> +   E_CONFIG_VAL(D, T, dev, STR);
> +   E_CONFIG_VAL(D, T, path, STR);
>  
>     fileman_config = e_config_domain_load("module.fileman", conf_edd);
>     if (fileman_config)
> @@ -772,6 +774,11 @@
>      fileman_config->tooltip.enable = 1;
>      IFMODCFGEND;
>  
> +    IFMODCFG(0x0111);
> +    fileman_config->dev = eina_stringshare_add("desktop");
> +    fileman_config->path = eina_stringshare_add("/");
> +    IFMODCFGEND;
> +
>      fileman_config->config_version = MOD_CONFIG_FILE_VERSION;
>  
>      /* UCHAR's give nasty compile warnings about comparisons so not gonna
> limit those */ @@ -790,12 +797,11 @@
>  static void
>  _e_mod_fileman_config_free(void)
>  {
> -   if (fileman_config->theme.background)
> -     eina_stringshare_del(fileman_config->theme.background);
> -   if (fileman_config->theme.frame)
> -     eina_stringshare_del(fileman_config->theme.frame);
> -   if (fileman_config->theme.icons)
> -     eina_stringshare_del(fileman_config->theme.icons);
> +   eina_stringshare_del(fileman_config->theme.background);
> +   eina_stringshare_del(fileman_config->theme.frame);
> +   eina_stringshare_del(fileman_config->theme.icons);
> +   eina_stringshare_del(fileman_config->dev);
> +   eina_stringshare_del(fileman_config->path);
>     E_FREE(fileman_config);
>  }
>  
> @@ -813,7 +819,7 @@
>     if (e_fwin_zone_find(zone)) return ECORE_CALLBACK_PASS_ON;
>     if ((zone->container->num == 0) && (zone->num == 0) &&
>         (fileman_config->view.show_desktop_icons))
> -     e_fwin_zone_new(zone, "desktop", "/");
> +     e_fwin_zone_new(zone, fileman_config->dev, fileman_config->path);
>     else
>       {
>          char buf[256];
> 
> Modified: trunk/e/src/modules/fileman/e_mod_main.h
> ===================================================================
> --- trunk/e/src/modules/fileman/e_mod_main.h  2012-09-12 16:34:45 UTC
> (rev 76546) +++ trunk/e/src/modules/fileman/e_mod_main.h      2012-09-12
> 16:42:29 UTC (rev 76547) @@ -4,7 +4,7 @@
>  /* Increment for Major Changes */
>  #define MOD_CONFIG_FILE_EPOCH      0x0001
>  /* Increment for Minor Changes (ie: user doesn't need a new config) */
> -#define MOD_CONFIG_FILE_GENERATION 0x0111
> +#define MOD_CONFIG_FILE_GENERATION 0x0112
>  #define MOD_CONFIG_FILE_VERSION    ((MOD_CONFIG_FILE_EPOCH << 16) |
>  #MOD_CONFIG_FILE_GENERATION)
>  
>  typedef struct _Config Config;
> @@ -101,6 +101,7 @@
>        const char   *icons;
>        unsigned char fixed;
>     } theme;
> +   const char *dev, *path; // stored from desktop navigation mode
>  };
>  
>  EAPI extern E_Module_Api e_modapi;
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> enlightenment-svn mailing list
> enlightenment-...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to