xffm issues

edscott wilson garcia edscott at imp.mx
Tue May 6 19:57:57 CEST 2003


Hi Jasper,

On Tue, 2003-05-06 at 12:19, Jasper Huijsmans wrote:
> On Tue, 6 May 2003 16:04:02 +0200
> Jasper Huijsmans <jasper at moongroup.com> wrote:
> 
> > On 05 May 2003 22:02:24 +0200
> > Olivier Fourdan <fourdan at xfce.org> wrote:
> > 
> > > Hi Edscott,
> > > 
> > > It seems there are more and more issues in xffm :
> > > 
> > > - recent versions just show the local file system, no bookmarks, no
> > > fstab, no nothing
> > 
> > It seems this whole environmental variable thing doesn't work. First
> > of all, for xffm all 'hide' variables are set to 'yes' in main(), so
> > that doesn't work. But even if I change them to NULL they are still
> > defined, although empty, and thus nothing gets displayed.
> > 
> 
> So, I was wrong again, the 'yes' values in main() were correct. Other
> things were not. 
> 
> I committed a fix to CVS that:
> 
> + adds init_xffm_env() to main()
> 
> + checks the strlen() of the HIDE variables as well as simply their
>   existance


Great! Thanks! It seems that the environment stuff is handled
differently from system to system. I only had rh8.0 and fbsd4.7 to test
on.


Edscott

> 
> This seems to fix the empty window bug, so I took the liberty of
> committing it without approval. The patch is attached. 
> 
> 	Jasper
> 
> Index: src/main.c
> ===================================================================
> RCS file: /cvsroot/xfce/xfce-devel/xffm/src/main.c,v
> retrieving revision 1.32
> diff -u -r1.32 main.c
> --- src/main.c	26 Apr 2003 17:23:22 -0000	1.32
> +++ src/main.c	6 May 2003 17:14:28 -0000
> @@ -87,6 +87,7 @@
>      gtk_set_locale();
>      gtk_init(&argc, &argv);
>  
> +    init_xffm_env();
>   
>  #if 0
>      client_session = client_session_new(argc, argv, NULL /* data */ ,
> SESSION_RESTART_IF_RUNNING, 60);
> Index: src/treeview.c
> ===================================================================
> RCS file: /cvsroot/xfce/xfce-devel/xffm/src/treeview.c,v
> retrieving revision 1.61
> diff -u -r1.61 treeview.c
> --- src/treeview.c	30 Apr 2003 14:31:52 -0000	1.61
> +++ src/treeview.c	6 May 2003 17:14:30 -0000
> @@ -387,32 +387,34 @@
>  {
>      int i;
>      GtkTreeIter iter;
> +    const char *var;
> +    
>      for(i = 0; i < ROOT_TAGS; i++)
>      {
>  	gboolean will_show;
>  	will_show=TRUE;
>  	switch(i){
>  	  case ROOT_BOOKMARKS:
> -		if (getenv("XFFM_HIDE_BOOK")) will_show=FALSE;
> +		if ((var = getenv("XFFM_HIDE_BOOK")) && strlen(var))
> will_show=FALSE;
>  		break;
>  	  case ROOT_FILES:
> -		if (getenv("XFFM_HIDE_LOCAL")) will_show=FALSE;
> +		if ((var = getenv("XFFM_HIDE_LOCAL")) && strlen(var))
> will_show=FALSE;
>  		break;
>  	  case ROOT_NETWORK:
> -		if (getenv("XFFM_HIDE_NETWORK")) will_show=FALSE;
> +		if ((var = getenv("XFFM_HIDE_NETWORK")) && strlen(var))
> will_show=FALSE;
>  		break;
>  	  case ROOT_APP:
> -		if (getenv("XFFM_HIDE_APPS")) will_show=FALSE;
> +		if ((var = getenv("XFFM_HIDE_APPS")) && strlen(var))
> will_show=FALSE;
>  		break;
>  	  case ROOT_FIND:
> -		if (getenv("XFFM_HIDE_FIND")) will_show=FALSE;
> +		if ((var = getenv("XFFM_HIDE_FIND")) && strlen(var))
> will_show=FALSE;
>  		break;
>  	  case ROOT_TRASH:
> -		if (getenv("XFFM_HIDE_TRASH")) will_show=FALSE;
> +		if ((var = getenv("XFFM_HIDE_TRASH")) && strlen(var))
> will_show=FALSE;
>  		break;
>  #if defined(HAVE_GETMNTENT) || defined(HAVE_GETFSENT) ||
> defined(HAVE_GETVFSENT)
>  	  case ROOT_FSTAB:
> -		if (getenv("XFFM_HIDE_FSTAB")) will_show=FALSE;
> +		if ((var = getenv("XFFM_HIDE_FSTAB")) && strlen(var))
> will_show=FALSE;
>  		break;
>  #endif
>  	  default:
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> http://moongroup.com/mailman/listinfo/xfce4-dev
> 





More information about the Xfce4-dev mailing list