[Gazpacho] [Fwd: Re: [Gazpacho-commits] r1724 - in gazpacho/trunk: . gazpacho]

Johan Dahlin johan at gnome.org
Mon Aug 29 22:40:46 CEST 2005


d'oh, wrong mail.

-------- Original Message --------
Subject: Re: [Gazpacho-commits] r1724 - in gazpacho/trunk: . gazpacho
Date: Mon, 29 Aug 2005 17:37:50 -0300
From: Johan Dahlin <jdahlin at async.com.br>
Organization: Async Open Source
To: lgs at sicem.biz
CC: gazpacho-commits at sicem.biz
References: <20050829203243.9185F11F465 at linuxserver.sicem.biz>

> @@ -425,8 +423,24 @@
>      def _dnd_drag_leave_cb(self, target_widget, drag_context, time):
>          if self._dnd_drop_region:
>              self._dnd_drop_region = None
> +            target_widget.queue_draw()

Why does this (the redrawing) need to be done, maybe you can add a comment?

>      def _dnd_drag_motion_cb(self, target_widget, drag_context, x, y, time):
> +        # Check if it is a valid target type
> +        targets = target_widget.drag_dest_get_target_list()
> +        target = target_widget.drag_dest_find_target(drag_context, targets)
> +        if target == "NONE":
> +            return False

Where is "NONE" coming from? Is it a constant?

> +        # Not a valid drop zone if target == source
> +        gtk_source = drag_context.get_source_widget()
> +        if gtk_source:
> +            gsource = Widget.from_widget(gtk_source)
> +            gwidget = gsource.dnd_widget
> +            if not gwidget or (gwidget == self):
> +                return False

Do you need both checks? the parenthesis is not neccessary.

-- 
Johan Dahlin <jdahlin at async.com.br>
Async Open Source




-- 
Johan Dahlin <jdahlin at async.com.br>
Async Open Source


-------------- next part --------------
A non-text attachment was scrubbed...
Name: johan.vcf
Type: text/x-vcard
Size: 125 bytes
Desc: not available
Url : http://sicem.biz/pipermail/gazpacho/attachments/20050829/204ea9f3/johan.vcf


More information about the Gazpacho mailing list