Re: [evolution-patches] Fix for #41059 (shell)



Looks good

On Thu, 2003-04-24 at 14:47, Ettore Perazzoli wrote:
> On Thu, 2003-04-24 at 13:36, Dan Winship wrote:
> > > +	(async_open_folder_idle): Add the pending open to the pending open
> > > +	list before calling asyncOpenFolder, instead of after.
> > 
> > I guess the listener is being called before asyncOpenFolder returns?
> 
> Yeah, the standard async bug.  :-)
> 
> > > +		priv->pending_opens = g_list_remove_link (priv->pending_opens,
> > > +							  priv->pending_opens);
> > 
> > That leaks a GList *. You want g_list_remove (priv->pending_opens,
> > closure);
> 
> Ooops, I meant g_list_delete_link().
> 
> -- Ettore
> 
> ______________________________________________________________________
> Index: ChangeLog
> ===================================================================
> RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
> retrieving revision 1.1255
> diff -u -p -r1.1255 ChangeLog
> --- ChangeLog	23 Apr 2003 19:16:18 -0000	1.1255
> +++ ChangeLog	24 Apr 2003 18:16:07 -0000
> @@ -1,18 +1,26 @@
> +2003-04-24  Ettore Perazzoli  <ettore ximian com>
> +
> +	[#41059]
> +
> +	* e-corba-storage.c (async_open_cb): Added a missing unref of the
> +	storage in the closure.
> +	(async_open_folder_idle): Add the pending open to the pending open
> +	list before calling asyncOpenFolder, instead of after.
> +
>  2003-04-22  Anna Marie Dirks  <anna ximian com>
>  
> -       * e-shell-settings-dialog.c (init): Add appropriate padding 
> +	* e-shell-settings-dialog.c (init): Add appropriate padding 
>  	to the Evolution Settings window. This is another bit of the 
>  	fix for #41392.
>  
> -       * e-corba-config-page.c (e_corba_config_page_construct): Add 
> +	* e-corba-config-page.c (e_corba_config_page_construct): Add 
>  	appropriate padding to the corba_config_page widget. Partial 
>  	fix for #41392.
>  
> -
>  2003-04-23  Anna Marie Dirks  <anna ximian com>
>  
> -	*glade/e-folder-list.glade : replaced buttons with stock 
> -	buttons and added HIG-blessed spacing. Fixes 41145. 
> +	* glade/e-folder-list.glade: replaced buttons with stock buttons
> +	and added HIG-blessed spacing. Fixes 41145.
>  
>  2003-04-22  Anna Marie Dirks  <anna ximian com>
>  	
> @@ -24,7 +32,6 @@
>  	Group" . Partially fixes 41038.
>  	(rename_shortcut_cb): Corrected the label capitalization for 
>  	Rename dialog. Fixes 41567.
> -
>  
>  2003-04-21  Chris Toshok  <toshok ximian com>
>  
> Index: e-corba-storage.c
> ===================================================================
> RCS file: /cvs/gnome/evolution/shell/e-corba-storage.c,v
> retrieving revision 1.55
> diff -u -p -r1.55 e-corba-storage.c
> --- e-corba-storage.c	17 Apr 2003 18:46:07 -0000	1.55
> +++ e-corba-storage.c	24 Apr 2003 18:16:07 -0000
> @@ -596,6 +596,7 @@ async_open_cb (BonoboListener *listener,
>  			(* closure->callback) (closure->storage, result,
>  					       closure->path, closure->data);
>  			if (closure != orig_closure) {
> +				g_object_unref (orig_closure->storage);
>  				g_free (closure->path);
>  				g_free (closure);
>  			}
> @@ -636,6 +637,8 @@ async_open_folder_idle (gpointer data)
>  	listener = bonobo_listener_new (async_open_cb, closure);
>  	corba_listener = bonobo_object_corba_objref (BONOBO_OBJECT (listener));
>  
> +	priv->pending_opens = g_list_prepend (priv->pending_opens, closure);
> +
>  	CORBA_exception_init (&ev);
>  	GNOME_Evolution_Storage_asyncOpenFolder (priv->storage_interface,
>  						 closure->path,
> @@ -647,10 +650,12 @@ async_open_folder_idle (gpointer data)
>  		g_object_unref (closure->storage);
>  		g_free (closure->path);
>  		g_free (closure);
> +
> +		priv->pending_opens = g_list_delete_link (priv->pending_opens,
> +							  priv->pending_opens);
>  	}
>  	CORBA_exception_free (&ev);
>  
> -	priv->pending_opens = g_list_prepend (priv->pending_opens, closure);
>  	return FALSE;
>  }
>  



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]