Re: [PATCH] Drop text in Nautilus window, new file created



Am Dienstag, den 28.06.2005, 14:47 +0200 schrieb Alexander Larsson:
> On Thu, 2005-06-23 at 22:07 +0200, Christian Neumair wrote:
> > Am Dienstag, den 07.06.2005, 11:36 +0200 schrieb Alexander Larsson:
> 
> > > +			      NULL, NULL,
> > > +			      nautilus_marshal_VOID__STRING_INT_INT_INT,
> > > +			      G_TYPE_NONE, 4,
> > > +			      G_TYPE_STRING,
> > > +			      G_TYPE_INT,
> > > +			      G_TYPE_INT,
> > > +			      G_TYPE_INT);
> > > 
> > > This looks wrong. There is only two int args. The others seem wrong too.
> > 
> > Right, I've fixed the marshallers to take a GDK_TYPE_ACTION as the first
> > element of the action/x/y triple.
> 
> Eh? GdkAction? 

I mean GdkDragAction. Sorry for the confusion.

> Where in e.g:
> void	     (* handle_url)		  (NautilusIconContainer *container,
> 					   char *url,
> 					   int x,
> 					   int y);
> or
> +void	     (* handle_text)		  (NautilusIconContainer *container,
> +					   char *text,
> +					   int x,
> +					   int y);
> 
> is the GdkAction?

This seems to be a bug. While receive_dropped_uri_list and
receive_dropped_url both pass the action as third "handle_url" argument,
the handle_url/handle_text method definitions don't have it. Take for
instance a look at icon_view_handle_uri_list, it has a GdkDragAction as
third argument. But it doesn't really matter, since the signal handler
is defined right, and the objects' methods won't even be invoked.

> +		target_filename = gnome_vfs_uri_extract_short_name (source_uri);
> +		target_uri = gnome_vfs_uri_append_file_name (parent_uri, target_filename);
> +		g_free ((char *) target_filename);
> 
> This unnecessary re-uses a (const) argument as a (non-const!) local variable.

Yes I know. I was just too lazy to introduce a new variable.
target_filename was obvious. I'll fix it as well.

-- 
Christian Neumair <chris gnome-de org>

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil



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